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

Method canBlockBePlaced

src/main/java/net/minecraft/world/World.java:3160–3165  ·  view source on GitHub ↗
(Block blockIn, BlockPos pos, boolean p_175716_3_, EnumFacing side, Entity entityIn, ItemStack itemStackIn)

Source from the content-addressed store, hash-verified

3158 }
3159
3160 public boolean canBlockBePlaced(Block blockIn, BlockPos pos, boolean p_175716_3_, EnumFacing side, Entity entityIn, ItemStack itemStackIn)
3161 {
3162 Block block = this.getBlockState(pos).getBlock();
3163 AxisAlignedBB axisalignedbb = p_175716_3_ ? null : blockIn.getCollisionBoundingBox(this, pos, blockIn.getDefaultState());
3164 return axisalignedbb != null && !this.checkNoEntityCollision(axisalignedbb, entityIn) ? false : (block.getMaterial() == Material.circuits && blockIn == Blocks.anvil ? true : block.getMaterial().isReplaceable() && blockIn.canReplace(this, pos, side, itemStackIn));
3165 }
3166
3167 public int func_181545_F()
3168 {

Callers 5

onItemUseMethod · 0.80
onItemUseMethod · 0.80
canPlaceBlockOnSideMethod · 0.80
onUpdateMethod · 0.80
onItemUseMethod · 0.80

Calls 8

getBlockStateMethod · 0.95
getMaterialMethod · 0.95
getDefaultStateMethod · 0.80
canReplaceMethod · 0.80
getBlockMethod · 0.65
isReplaceableMethod · 0.45

Tested by

no test coverage detected