• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java S04PacketEntityEquipment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.network.play.server.S04PacketEntityEquipment的典型用法代码示例。如果您正苦于以下问题:Java S04PacketEntityEquipment类的具体用法?Java S04PacketEntityEquipment怎么用?Java S04PacketEntityEquipment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



S04PacketEntityEquipment类属于net.minecraft.network.play.server包,在下文中一共展示了S04PacketEntityEquipment类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
public void handleEntityEquipment(S04PacketEntityEquipment packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID());

    if (entity != null)
    {
        entity.setCurrentItemOrArmor(packetIn.getEquipmentSlot(), packetIn.getItemStack());
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:NetHandlerPlayClient.java


示例2: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
public void handleEntityEquipment(S04PacketEntityEquipment packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
	Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID());

	if (entity != null) {
		entity.setCurrentItemOrArmor(packetIn.getEquipmentSlot(), packetIn.getItemStack());
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:9,代码来源:NetHandlerPlayClient.java


示例3: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
public void handleEntityEquipment(S04PacketEntityEquipment p_147242_1_)
{
    Entity var2 = this.clientWorldController.getEntityByID(p_147242_1_.func_149389_d());

    if (var2 != null)
    {
        var2.setCurrentItemOrArmor(p_147242_1_.func_149388_e(), p_147242_1_.func_149390_c());
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:10,代码来源:NetHandlerPlayClient.java


示例4: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
public void handleEntityEquipment(S04PacketEntityEquipment p_147242_1_)
{
    Entity entity = this.clientWorldController.getEntityByID(p_147242_1_.func_149389_d());

    if (entity != null)
    {
        entity.setCurrentItemOrArmor(p_147242_1_.func_149388_e(), p_147242_1_.func_149390_c());
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:10,代码来源:NetHandlerPlayClient.java


示例5: entityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
@Override
public Packet entityEquipment(int entityID, int slot, Item item) {
    return (Packet) new S04PacketEntityEquipment(entityID, slot, (ItemStack) item);
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:5,代码来源:NeptunePacketFactory.java


示例6: entityLivingBaseUpdate

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
private void entityLivingBaseUpdate() {
	if (!this.worldObj.isRemote) {
		int i = this.getArrowCountInEntity();
		if (i > 0) {
			if (this.arrowHitTimer <= 0) {
				this.arrowHitTimer = 20 * (30 - i);
			}
			--this.arrowHitTimer;
			if (this.arrowHitTimer <= 0) {
				this.setArrowCountInEntity(i - 1);
			}
		}
		for (int j = 0; j < 5; ++j) {
			ItemStack itemstack = this.previousEquipment[j];
			ItemStack itemstack1 = this.getEquipmentInSlot(j);
			if (!ItemStack.areItemStacksEqual(itemstack1, itemstack)) {
				((WorldServer) worldObj).getEntityTracker().sendToAllTrackingEntity(this, new S04PacketEntityEquipment(this.getEntityId(), j, itemstack1));
				if (itemstack != null) {
					getAttributeMap().removeAttributeModifiers(itemstack.getAttributeModifiers());
				}
				if (itemstack1 != null) {
					getAttributeMap().applyAttributeModifiers(itemstack1.getAttributeModifiers());
				}
				this.previousEquipment[j] = itemstack1 == null ? null : itemstack1.copy();
			}
		}
		if (ticksExisted % 20 == 0) {
			getCombatTracker().reset();
		}
	}
	this.onLivingUpdate();
	double d0 = this.posX - this.prevPosX;
	double d1 = this.posZ - this.prevPosZ;
	float f = (float)(d0 * d0 + d1 * d1);
	float f1 = this.renderYawOffset;
	float f2 = 0.0F;
	this.prevOnGroundSpeedFactor = this.onGroundSpeedFactor;
	float f3 = 0.0F;
	if (f > 0.0025000002F) {
		f3 = 1.0F;
		f2 = (float)Math.sqrt((double)f) * 3.0F;
		f1 = (float)Math.atan2(d1, d0) * 180.0F / (float)Math.PI - 90.0F;
	}
	if (this.swingProgress > 0.0F) {
		f1 = this.rotationYaw;
	}
	if (!this.onGround) {
		f3 = 0.0F;
	}
	this.onGroundSpeedFactor += (f3 - this.onGroundSpeedFactor) * 0.3F;
	this.worldObj.theProfiler.startSection("headTurn");
	f2 = this.updateDistance(f1, f2);
	this.worldObj.theProfiler.endSection();
	this.worldObj.theProfiler.startSection("rangeChecks");
	while (this.rotationYaw - this.prevRotationYaw < -180.0F) {
		this.prevRotationYaw -= 360.0F;
	}
	while (this.rotationYaw - this.prevRotationYaw >= 180.0F) {
		this.prevRotationYaw += 360.0F;
	}
	while (this.renderYawOffset - this.prevRenderYawOffset < -180.0F) {
		this.prevRenderYawOffset -= 360.0F;
	}
	while (this.renderYawOffset - this.prevRenderYawOffset >= 180.0F) {
		this.prevRenderYawOffset += 360.0F;
	}
	while (this.rotationPitch - this.prevRotationPitch < -180.0F) {
		this.prevRotationPitch -= 360.0F;
	}
	while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
		this.prevRotationPitch += 360.0F;
	}
	while (this.rotationYawHead - this.prevRotationYawHead < -180.0F) {
		this.prevRotationYawHead -= 360.0F;
	}
	while (this.rotationYawHead - this.prevRotationYawHead >= 180.0F) {
		this.prevRotationYawHead += 360.0F;
	}
	this.worldObj.theProfiler.endSection();
	this.movedDistance += f2;
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:82,代码来源:EntityChu.java


示例7: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
void handleEntityEquipment(S04PacketEntityEquipment packetIn); 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:2,代码来源:INetHandlerPlayClient.java


示例8: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
void handleEntityEquipment(S04PacketEntityEquipment var1); 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:2,代码来源:INetHandlerPlayClient.java


示例9: handleEntityEquipment

import net.minecraft.network.play.server.S04PacketEntityEquipment; //导入依赖的package包/类
void handleEntityEquipment(S04PacketEntityEquipment p_147242_1_); 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayClient.java



注:本文中的net.minecraft.network.play.server.S04PacketEntityEquipment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HeaderHttpSessionStrategy类代码示例发布时间:2022-05-23
下一篇:
Java DefaultMuleContextFactory类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap