public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { super.dropNaturally(world, i, j, k, l, f, i1); if (!world.isStatic) { Item item = null; if (this.blockFruit == Block.PUMPKIN) { item = Item.PUMPKIN_SEEDS; } if (this.blockFruit == Block.MELON) { item = Item.MELON_SEEDS; } for (int j1 = 0; j1 < 3; ++j1) { if (world.random.nextInt(15) <= l) { float f1 = 0.7F; float f2 = world.random.nextFloat() * f1 + (1.0F - f1) * 0.5F; float f3 = world.random.nextFloat() * f1 + (1.0F - f1) * 0.5F; float f4 = world.random.nextFloat() * f1 + (1.0F - f1) * 0.5F; EntityItem entityitem = new EntityItem( world, (double) ((float) i + f2), (double) ((float) j + f3), (double) ((float) k + f4), new ItemStack(item)); entityitem.pickupDelay = 10; world.addEntity(entityitem); } } } }
/** Drops the block items with a specified chance of dropping the specified items */ public void dropNaturally( World var1, int var2, int var3, int var4, int var5, float var6, int var7) { super.dropNaturally(var1, var2, var3, var4, var5, var6, var7); if (!var1.isStatic) { Item var8 = null; if (this.blockFruit == Block.PUMPKIN) { var8 = Item.PUMPKIN_SEEDS; } if (this.blockFruit == Block.MELON) { var8 = Item.MELON_SEEDS; } for (int var9 = 0; var9 < 3; ++var9) { if (var1.random.nextInt(15) <= var5) { this.a(var1, var2, var3, var4, new ItemStack(var8)); } } } }