@Override public void onDeath(DamageSource damageSource) { if (!worldObj.isRemote) { BlockUtils.dropInventory(inventory, worldObj, posX, posY, posZ); } super.onDeath(damageSource); }
@Override public void onDeath(DamageSource damageSource) { if (!worldObj.isRemote && drop != null) { for (ItemStack itemStack : drop) { entityDropItem(itemStack, 0.0F); } } super.onDeath(damageSource); }
/** Called when the mob's health reaches 0. */ public void onDeath(DamageSource par1DamageSource) { super.onDeath(par1DamageSource); if (par1DamageSource.getEntity() instanceof EntityPlayer) { int i = Item.record13.itemID + this.rand.nextInt(Item.recordWait.itemID - Item.record13.itemID + 1); this.dropItem(i, 1); } }
/** Called when the mob's health reaches 0. */ public void onDeath(DamageSource damagesource) { if (rand.nextInt(10) == 0) { dropItem(Items.porkchop, rand.nextInt(3) + 1); } if (rand.nextInt(10) == 0) { dropItem(Items.reeds, rand.nextInt(3) + 1); } super.onDeath(damagesource); }
@Override public void onDeath(DamageSource source) { for (int i = 0; i < 8; i++) { worldObj.createExplosion( this, posX + rand.nextGaussian() * 5, posY + rand.nextGaussian() * 5, posZ + rand.nextGaussian() * 5, 6.0f, true); } super.onDeath(source); }
/** Called when the mob's health reaches 0. */ public void onDeath(DamageSource p_70645_1_) { super.onDeath(p_70645_1_); if (p_70645_1_.getSourceOfDamage() instanceof EntityThrownApple && p_70645_1_.getEntity() instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) p_70645_1_.getEntity(); double d0 = entityplayer.posX - this.posX; double d1 = entityplayer.posZ - this.posZ; if (d0 * d0 + d1 * d1 >= 2500.0D) { entityplayer.triggerAchievement(AchievementList.snipeSkeleton); } } }
/** Called when the mob's health reaches 0. */ public void onDeath(DamageSource cause) { super.onDeath(cause); if (cause.getEntity() instanceof EntitySkeleton) { int i = Item.getIdFromItem(Items.record_13); int j = Item.getIdFromItem(Items.record_wait); int k = i + this.rand.nextInt(j - i + 1); this.dropItem(Item.getItemById(k), 1); } else if (cause.getEntity() instanceof EntityCreeper && cause.getEntity() != this && ((EntityCreeper) cause.getEntity()).getPowered() && ((EntityCreeper) cause.getEntity()).isAIEnabled()) { ((EntityCreeper) cause.getEntity()).func_175493_co(); this.entityDropItem(new ItemStack(Items.skull, 1, 4), 0.0F); } }