From 2a0280437933d054f3561987e9bc625785b135d0 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Sun, 30 Nov 2014 23:50:56 -0800 Subject: [PATCH] Fixed vanilla bug where top part of double plants would flicker a tifferent texture before dissapearing. --- .../net/minecraft/block/BlockDoublePlant.java.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch index a5a811850c..cbe1c8fe28 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoublePlant.java.patch @@ -45,7 +45,7 @@ { super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_); } -@@ -296,6 +293,23 @@ +@@ -296,6 +293,32 @@ return Block.EnumOffsetType.XZ; } @@ -65,6 +65,15 @@ + if (type == EnumPlantType.GRASS) ret.add(new ItemStack(Blocks.field_150329_H, 2, BlockTallGrass.EnumType.GRASS.func_177044_a())); + return ret; + } ++ @Override ++ public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest) ++ { ++ //Forge: Break both parts on the client to prevent the top part flickering as default type for a few frames. ++ IBlockState state = world.func_180495_p(pos); ++ if (state.func_177229_b(field_176492_b) == EnumBlockHalf.LOWER && world.func_180495_p(pos.func_177984_a()).func_177230_c() == this) ++ world.func_175698_g(pos.func_177984_a()); ++ return world.func_175698_g(pos); ++ } + static enum EnumBlockHalf implements IStringSerializable {