Skip to content

Commit

Permalink
Fixed vanilla bug where top part of double plants would flicker a tif…
Browse files Browse the repository at this point in the history
…ferent texture before dissapearing.
  • Loading branch information
LexManos committed Dec 1, 2014
1 parent c539d53 commit 2a02804
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -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;
}

Expand All @@ -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
{
Expand Down

0 comments on commit 2a02804

Please sign in to comment.