Java 类net.minecraft.network.play.server.S04PacketEntityEquipment 实例源码

项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
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());
    }
}
项目:NeptuneMod    文件:NeptunePacketFactory.java   
@Override
public Packet entityEquipment(int entityID, int slot, Item item) {
    return (Packet) new S04PacketEntityEquipment(entityID, slot, (ItemStack) item);
}
项目:ZeldaSwordSkills    文件:EntityChu.java   
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;
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment p_147242_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleEntityEquipment(S04PacketEntityEquipment p_147242_1_);