public void handleHealthUpdate(byte byte0) { if (byte0 == 2) { field_704_R = 1.5F; field_9306_bj = field_9366_o; hurtTime = maxHurtTime = 10; attackedAtYaw = 0.0F; worldObj.playSoundAtEntity( this, getHurtSound(), getSoundVolume(), (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F); attackEntityFrom(null, 0); } else if (byte0 == 3) { worldObj.playSoundAtEntity( this, getDeathSound(), getSoundVolume(), (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F); health = 0; onDeath(null); } else { super.handleHealthUpdate(byte0); } }
public void handleEntityStatus(Packet38EntityStatus var1) { Entity var2 = this.getEntityByID(var1.entityId); if (var2 != null) { var2.handleHealthUpdate(var1.entityStatus); } }