Exemplo n.º 1
0
 public void onDeath(DamageSource damagesource) {
   super.onDeath(damagesource);
   setSize(0.2F, 0.2F);
   setPosition(posX, posY, posZ);
   motionY = 0.10000000149011612D;
   if (username.equals("Notch")) {
     dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true);
   }
   inventory.dropAllItems();
   if (damagesource != null) {
     motionX = -MathHelper.cos(((attackedAtYaw + rotationYaw) * 3.141593F) / 180F) * 0.1F;
     motionZ = -MathHelper.sin(((attackedAtYaw + rotationYaw) * 3.141593F) / 180F) * 0.1F;
   } else {
     motionX = motionZ = 0.0D;
   }
   yOffset = 0.1F;
   addStat(StatList.deathsStat, 1);
 }