Sync up canPlaceTorchOnTop logic with BlockTorch#isValidPosition
This commit is contained in:
parent
822dce47cd
commit
a4cf5951ca
2 changed files with 3 additions and 10 deletions
|
@ -1,14 +1,6 @@
|
|||
--- a/net/minecraft/item/BlockItemUseContext.java
|
||||
+++ b/net/minecraft/item/BlockItemUseContext.java
|
||||
@@ -5,6 +5,7 @@
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
+import net.minecraftforge.event.terraingen.BiomeEvent.GetGrassColor;
|
||||
|
||||
public class BlockItemUseContext extends ItemUseContext {
|
||||
private final BlockPos field_196014_j;
|
||||
@@ -25,7 +26,7 @@
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
public boolean func_196011_b() {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue