mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Sync up canPlaceTorchOnTop logic with BlockTorch#isValidPosition
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user