Package org.terasology.world.block.shapes

Examples of org.terasology.world.block.shapes.BlockMeshPart


    }

    private void generateMesh() {
        Tessellator tessellator = new Tessellator();
        for (BlockPart dir : BlockPart.values()) {
            BlockMeshPart part = primaryAppearance.getPart(dir);
            if (part != null) {
                if (doubleSided) {
                    tessellator.addMeshPartDoubleSided(part);
                } else {
                    tessellator.addMeshPart(part);
View Full Code Here


    }

    private void applyLoweredShape(Block block, BlockShape shape, Map<BlockPart, AssetUri> tileUris) {
        for (Side side : Side.values()) {
            BlockPart part = BlockPart.fromSide(side);
            BlockMeshPart meshPart = shape
                    .getMeshPart(part)
                    .rotate(Rotation.none().getQuat4f())
                    .mapTexCoords(atlas.getTexCoords(tileUris.get(part), true), atlas.getRelativeTileSize());
            block.setLoweredLiquidMesh(part.getSide(), meshPart);
        }
View Full Code Here

        }
        return false;
    }

    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;
            }
View Full Code Here

TOP

Related Classes of org.terasology.world.block.shapes.BlockMeshPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.