Fix BlockCrops.getDrops not respecting new age methods (for beetroots)

This commit is contained in:
Take Weiland 2016-03-23 19:51:15 +01:00
parent 1d608c6fe4
commit 8a6dafc3bb

View file

@ -32,16 +32,16 @@
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
+ int age = ((Integer)state.func_177229_b(func_185524_e())).intValue();
+ int age = func_185527_x(state);
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
+
+ if (age >= 7)
+ if (age >= func_185526_g())
+ {
+ int k = 3 + fortune;
+
+ for (int i = 0; i < 3 + fortune; ++i)
+ {
+ if (rand.nextInt(15) <= age)
+ if (rand.nextInt(2 * func_185526_g()) <= age)
+ {
+ ret.add(new ItemStack(this.func_149866_i(), 1, 0));
+ }