From 2c8ab7624045936e243582f2b252117900265ffd Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 26 Jan 2019 08:12:34 +1100 Subject: [PATCH] [1.13] Check canSustainPlant for valid ground in BlockBush (#5362) --- .../net/minecraft/block/BlockBush.java.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/block/BlockBush.java.patch b/patches/minecraft/net/minecraft/block/BlockBush.java.patch index 0639b7420..2ebb73e44 100644 --- a/patches/minecraft/net/minecraft/block/BlockBush.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBush.java.patch @@ -9,7 +9,16 @@ protected BlockBush(Block.Builder p_i48437_1_) { super(p_i48437_1_); } -@@ -44,4 +44,11 @@ +@@ -26,6 +26,8 @@ + + public boolean func_196260_a(IBlockState p_196260_1_, IWorldReaderBase p_196260_2_, BlockPos p_196260_3_) { + BlockPos blockpos = p_196260_3_.func_177977_b(); ++ if (p_196260_1_.func_177230_c() == this) //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check. ++ return p_196260_2_.func_180495_p(blockpos).canSustainPlant(p_196260_2_, blockpos, EnumFacing.UP, this); + return this.func_200014_a_(p_196260_2_.func_180495_p(blockpos), p_196260_2_, blockpos); + } + +@@ -44,4 +46,11 @@ public int func_200011_d(IBlockState p_200011_1_, IBlockReader p_200011_2_, BlockPos p_200011_3_) { return 0; }