private boolean hasRequiredSupportOnSideForBlock(Vector3i location, Side sideChanged, Block block) { final BlockMeshPart part = block.getPrimaryAppearance().getPart(BlockPart.fromSide(sideChanged)); if (part != null) { // This block has mesh on this side, therefore it requires a support on that side if (!hasSupportFromBlockOnSide(location, sideChanged, Collections.<Vector3i, Block>emptyMap())) { return false; } } return true; }
public BlockPart rotate(Rotation rot) { if (isSide()) { return BlockPart.fromSide(rot.rotate(getSide())); } return this; } }
private void setBlockFullSides(Block block, BlockShape shape, Rotation rot) { for (Side side : Side.getAllSides()) { BlockPart targetPart = BlockPart.fromSide(rot.rotate(side)); block.setFullSide(targetPart.getSide(), shape.isBlockingSide(side)); } }
private void applyLiquidShapes(Block block, Map<BlockPart, BlockTile> tiles) { for (Side side : Side.getAllSides()) { BlockPart part = BlockPart.fromSide(side); BlockTile blockTile = tiles.get(part); if (blockTile != null) { BlockMeshPart lowMeshPart = lowShape .getMeshPart(part) .mapTexCoords(worldAtlas.getTexCoords(blockTile, true), worldAtlas.getRelativeTileSize()); block.setLowLiquidMesh(part.getSide(), lowMeshPart); BlockMeshPart topMeshPart = topShape .getMeshPart(part) .mapTexCoords(worldAtlas.getTexCoords(blockTile, true), worldAtlas.getRelativeTileSize()); block.setTopLiquidMesh(part.getSide(), topMeshPart); } } }