use of org.terasology.engine.world.block.tiles.BlockTile in project Terasology by MovingBlocks.
the class BlockBuilder method applyLiquidShapes.
private void applyLiquidShapes(Block block, Map<BlockPart, BlockTile> tiles) {
for (Side side : Side.values()) {
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(), blockTile.getLength());
block.setLowLiquidMesh(part.getSide(), lowMeshPart);
BlockMeshPart topMeshPart = topShape.getMeshPart(part).mapTexCoords(worldAtlas.getTexCoords(blockTile, true), worldAtlas.getRelativeTileSize(), blockTile.getLength());
block.setTopLiquidMesh(part.getSide(), topMeshPart);
}
}
}
Aggregations