Package mods.railcraft.common.blocks.aesthetics.slab

Examples of mods.railcraft.common.blocks.aesthetics.slab.TileSlab


    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderBlocks) {
        boolean rendered = false;
        TileEntity tile = world.getTileEntity(x, y, z);
        if (tile instanceof TileSlab) {
            TileSlab slab = (TileSlab) tile;
            if (slab.getTopSlab() != null && slab.getTopSlab() == slab.getBottomSlab()) {
                if (canRenderInPass(renderBlocks, slab.getTopSlab())) {
                    BlockRailcraftSlab.textureSlab = slab.getTopSlab();
                    renderBlocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                    renderBlocks.renderStandardBlock(block, x, y, z);
                    BlockRailcraftSlab.textureSlab = null;
                    rendered = true;
                }
            } else {
                if (slab.getTopSlab() != null)
                    if (canRenderInPass(renderBlocks, slab.getTopSlab())) {
                        BlockRailcraftSlab.textureSlab = slab.getTopSlab();
                        renderBlocks.setRenderBounds(0.0F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F);
                        renderBlocks.renderStandardBlock(block, x, y, z);
                        BlockRailcraftSlab.textureSlab = null;
                        rendered = true;
                    }
                if (slab.getBottomSlab() != null)
                    if (canRenderInPass(renderBlocks, slab.getBottomSlab())) {
                        BlockRailcraftSlab.textureSlab = slab.getBottomSlab();
                        renderBlocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
                        renderBlocks.renderStandardBlock(block, x, y, z);
                        BlockRailcraftSlab.textureSlab = null;
                        rendered = true;
                    }
View Full Code Here

TOP

Related Classes of mods.railcraft.common.blocks.aesthetics.slab.TileSlab

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.