Fix DoublePlant placement, closes #921

This commit is contained in:
Lex Manos 2014-01-04 13:07:05 -08:00
parent a1b68d938d
commit 0da954cc10

View file

@ -0,0 +1,10 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDoublePlant.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDoublePlant.java
@@ -81,6 +81,7 @@
public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
+ if (p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_, p_149718_4_) != this) return super.func_149718_j(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_); //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.
int l = p_149718_1_.getBlockMetadata(p_149718_2_, p_149718_3_, p_149718_4_);
return func_149887_c(l) ? p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_) == this : p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ + 1, p_149718_4_) == this && super.func_149718_j(p_149718_1_, p_149718_2_, p_149718_3_, p_149718_4_);
}