Sync up canPlaceTorchOnTop logic with BlockTorch#isValidPosition

This commit is contained in:
tterrag committed 2019-04-24 00:59:03 -04:00
1 parent 822dce47cd
commit a4cf5951ca
2 files changed
+3 -10

No files matched your search

@@ -465,9 +465,10 @@ public interface IForgeBlock
*/
default boolean canPlaceTorchOnTop(IBlockState state, IWorldReaderBase world, BlockPos pos)
{
// Keep conditionals in sync with BlockTorch#isValidPosition
if (this == Blocks.END_GATEWAY) {
return false;
} else if (state.isTopSolid() || this instanceof BlockFence || this == Blocks.GLASS || this == Blocks.COBBLESTONE_WALL || this instanceof BlockStainedGlass) {
} else if (this instanceof BlockFence || this instanceof BlockStainedGlass || this == Blocks.GLASS || this == Blocks.COBBLESTONE_WALL || this == Blocks.MOSSY_COBBLESTONE_WALL || state.isTopSolid()) {
return true;
} else {
BlockFaceShape shape = state.getBlockFaceShape(world, pos, EnumFacing.UP);