Merge pull request #2643 from diesieben07/beetroots

Fix BlockCrops.getDrops not respecting new age methods (for beetroots)
This commit is contained in:
LexManos 2016-03-23 16:33:03 -07:00
commit 640670052c

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));
+ }