Last active
April 10, 2016 02:41
-
-
Save StillManic/a801176902a40c233576ed15d4adc30e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean canBuildStructure(World world, StructureBoundingBox box, EnumFacing facing) { | |
BlockPos min = new BlockPos(box.minX, box.minY, box.minZ); | |
BlockPos max = new BlockPos(box.maxX, box.maxY, box.maxZ); | |
return Lists.newArrayList(BlockPos.getAllInBox(min, max)).stream().allMatch(pos -> world.getBlockState(pos).getBlock().isReplaceable(world, pos)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment