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_)
|
||||
@@ -1010,6 +1030,1062 @@
|
||||
@@ -1010,6 +1030,1065 @@
|
||||
return "Block{" + field_149771_c.func_177774_c(this) + "}";
|
||||
}
|
||||
|
||||
|
@ -240,10 +240,10 @@
|
|||
+
|
||||
+ /**
|
||||
+ * Check if the face of a block should block rendering.
|
||||
+ *
|
||||
+ *
|
||||
+ * Faces which are fully opaque should return true, faces with transparency
|
||||
+ * or faces which do not span the full size of the block should return false.
|
||||
+ *
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param pos Block position in world
|
||||
+ * @param side The side to check
|
||||
|
@ -268,7 +268,9 @@
|
|||
+
|
||||
+ 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)
|
||||
+ {
|
||||
|
@ -280,6 +282,7 @@
|
|||
+ BlockStairs.EnumShape shape = (BlockStairs.EnumShape)state.func_177229_b(BlockStairs.field_176310_M);
|
||||
+ EnumFacing facing = (EnumFacing)state.func_177229_b(BlockStairs.field_176309_a);
|
||||
+ if (side == EnumFacing.UP) return flipped;
|
||||
+ if (side == EnumFacing.DOWN) return !flipped;
|
||||
+ if (facing == side) return true;
|
||||
+ if (flipped)
|
||||
+ {
|
||||
|
@ -808,7 +811,7 @@
|
|||
+
|
||||
+ /**
|
||||
+ * Allows a block to override the standard EntityLivingBase.updateFallState
|
||||
+ * particles, this is a server side method that spawns particles with
|
||||
+ * particles, this is a server side method that spawns particles with
|
||||
+ * WorldServer.spawnParticle
|
||||
+ *
|
||||
+ * @param world The current Server world
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
- 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_, 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_)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
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_.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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue