MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / canPlaceOn

Method canPlaceOn

src/main/java/net/minecraft/block/BlockTorch.java:58–69  ·  view source on GitHub ↗
(World worldIn, BlockPos pos)

Source from the content-addressed store, hash-verified

56 }
57
58 private boolean canPlaceOn(World worldIn, BlockPos pos)
59 {
60 if (World.doesBlockHaveSolidTopSurface(worldIn, pos))
61 {
62 return true;
63 }
64 else
65 {
66 Block block = worldIn.getBlockState(pos).getBlock();
67 return block instanceof BlockFence || block == Blocks.glass || block == Blocks.cobblestone_wall || block == Blocks.stained_glass;
68 }
69 }
70
71 public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
72 {

Callers 2

canPlaceAtMethod · 0.95

Calls 3

getBlockMethod · 0.65
getBlockStateMethod · 0.65

Tested by

no test coverage detected