Fix Button/Torch/Lever placement on stairs and slabs. Closes #2291
This commit is contained in:
parent
1cd0bf9ee4
commit
d2248c3774
3 changed files with 10 additions and 7 deletions
|
@ -188,7 +188,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ItemStack func_180643_i(IBlockState p_180643_1_)
|
protected ItemStack func_180643_i(IBlockState p_180643_1_)
|
||||||
@@ -1010,6 +1030,1062 @@
|
@@ -1010,6 +1030,1065 @@
|
||||||
return "Block{" + field_149771_c.func_177774_c(this) + "}";
|
return "Block{" + field_149771_c.func_177774_c(this) + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,9 @@
|
||||||
+
|
+
|
||||||
+ if (this instanceof BlockSlab)
|
+ if (this instanceof BlockSlab)
|
||||||
+ {
|
+ {
|
||||||
+ return func_149730_j() || (state.func_177229_b(BlockSlab.field_176554_a) == BlockSlab.EnumBlockHalf.TOP && side == EnumFacing.UP);
|
+ return func_149730_j()
|
||||||
|
+ || (state.func_177229_b(BlockSlab.field_176554_a) == BlockSlab.EnumBlockHalf.TOP && side == EnumFacing.UP )
|
||||||
|
+ || (state.func_177229_b(BlockSlab.field_176554_a) == BlockSlab.EnumBlockHalf.BOTTOM && side == EnumFacing.DOWN);
|
||||||
+ }
|
+ }
|
||||||
+ else if (this instanceof BlockFarmland)
|
+ else if (this instanceof BlockFarmland)
|
||||||
+ {
|
+ {
|
||||||
|
@ -280,6 +282,7 @@
|
||||||
+ BlockStairs.EnumShape shape = (BlockStairs.EnumShape)state.func_177229_b(BlockStairs.field_176310_M);
|
+ BlockStairs.EnumShape shape = (BlockStairs.EnumShape)state.func_177229_b(BlockStairs.field_176310_M);
|
||||||
+ EnumFacing facing = (EnumFacing)state.func_177229_b(BlockStairs.field_176309_a);
|
+ EnumFacing facing = (EnumFacing)state.func_177229_b(BlockStairs.field_176309_a);
|
||||||
+ if (side == EnumFacing.UP) return flipped;
|
+ if (side == EnumFacing.UP) return flipped;
|
||||||
|
+ if (side == EnumFacing.DOWN) return !flipped;
|
||||||
+ if (facing == side) return true;
|
+ if (facing == side) return true;
|
||||||
+ if (flipped)
|
+ if (flipped)
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
- BlockPos blockpos = p_181088_1_.func_177972_a(p_181088_2_);
|
- BlockPos blockpos = p_181088_1_.func_177972_a(p_181088_2_);
|
||||||
- return p_181088_2_ == EnumFacing.DOWN ? World.func_175683_a(p_181088_0_, blockpos) : p_181088_0_.func_180495_p(blockpos).func_177230_c().func_149721_r();
|
- return p_181088_2_ == EnumFacing.DOWN ? World.func_175683_a(p_181088_0_, blockpos) : p_181088_0_.func_180495_p(blockpos).func_177230_c().func_149721_r();
|
||||||
+ return p_181088_2_ == EnumFacing.DOWN && World.func_175683_a(p_181088_0_, p_181088_1_.func_177977_b()) ? true : p_181088_0_.isSideSolid(p_181088_1_.func_177972_a(p_181088_2_), p_181088_2_);
|
+ return p_181088_2_ == EnumFacing.DOWN && World.func_175683_a(p_181088_0_, p_181088_1_.func_177977_b()) ? true : p_181088_0_.isSideSolid(p_181088_1_.func_177972_a(p_181088_2_), p_181088_2_.func_176734_d());
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
- if (enumfacing$axis.func_176722_c() && !p_176592_1_.func_175677_d(p_176592_2_.func_177972_a(enumfacing1), true))
|
- if (enumfacing$axis.func_176722_c() && !p_176592_1_.func_175677_d(p_176592_2_.func_177972_a(enumfacing1), true))
|
||||||
+ if (enumfacing$axis.func_176722_c() && !p_176592_1_.isSideSolid(p_176592_2_.func_177972_a(enumfacing1), enumfacing1, true))
|
+ if (enumfacing$axis.func_176722_c() && !p_176592_1_.isSideSolid(p_176592_2_.func_177972_a(enumfacing1), enumfacing, true))
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue