package makeo.gadomancy.client.renderers.block; import makeo.gadomancy.common.blocks.IBlockTransparent; import makeo.gadomancy.common.registration.RegisteredBlocks; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.world.IBlockAccess; /** * This class is part of the Gadomancy Mod * Gadomancy is Open Source and distributed under the * GNU LESSER GENERAL PUBLIC LICENSE * for more read the LICENSE file * * Created by makeo @ 29.09.2015 20:53 */ public class RenderBlockTransparent extends BlockRenderingHandler { @Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { if(block instanceof IBlockTransparent) { renderAllFaces(renderer, block, x, y, z, ((IBlockTransparent) block).getTransparentIcon()); } return false; } @Override public boolean shouldRender3DInInventory(int modelId) { return false; } @Override public int getRenderId() { return RegisteredBlocks.rendererTransparentBlock; } }