Java Code Examples for net.minecraft.util.BlockRenderLayer#SOLID
The following examples show how to use
net.minecraft.util.BlockRenderLayer#SOLID .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InvPipeRenderer.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
@Override public boolean renderBlock(IBlockAccess world, BlockPos pos, IBlockState state, BufferBuilder buffer) { CCRenderState renderState = CCRenderState.instance(); renderState.reset(); renderState.bind(buffer); renderState.setBrightness(world, pos); IVertexOperation[] pipeline = {new Translation(pos)}; BlockInventoryPipe block = (BlockInventoryPipe) state.getBlock(); TileEntityInventoryPipe tileEntity = (TileEntityInventoryPipe) block.getPipeTileEntity(world, pos); if (tileEntity == null) { return false; } int paintingColor = tileEntity.getInsulationColor(); int connectedSidesMask = block.getActualConnections(tileEntity, world); BlockRenderLayer renderLayer = MinecraftForgeClient.getRenderLayer(); if (renderLayer == BlockRenderLayer.SOLID) { renderPipe(renderState, pipeline, paintingColor, connectedSidesMask); } ICoverable coverable = tileEntity.getCoverableImplementation(); coverable.renderCovers(renderState, new Matrix4().translate(pos.getX(), pos.getY(), pos.getZ()), renderLayer); return true; }
Example 2
Source File: BlockRenderLayerDeserializer.java From customstuff4 with GNU General Public License v3.0 | 6 votes |
@Override public BlockRenderLayer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if (json.isJsonPrimitive()) { JsonPrimitive primitive = json.getAsJsonPrimitive(); if (primitive.isString()) { String string = primitive.getAsString(); if (string.equals("solid")) return BlockRenderLayer.SOLID; if (string.equals("mippedCutout")) return BlockRenderLayer.CUTOUT_MIPPED; if (string.equals("cutout")) return BlockRenderLayer.CUTOUT; if (string.equals("translucent")) return BlockRenderLayer.TRANSLUCENT; } } throw new JsonParseException("Invalid block render layer: " + json); }
Example 3
Source File: BlockApricotLeaves.java From TofuCraftReload with MIT License | 4 votes |
@Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return Minecraft.getMinecraft().gameSettings.fancyGraphics ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID; }
Example 4
Source File: BlockTofuLeaves.java From TofuCraftReload with MIT License | 4 votes |
@Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return Minecraft.getMinecraft().gameSettings.fancyGraphics ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID; }
Example 5
Source File: BlockPuzzle.java From YouTubeModdingTutorial with MIT License | 4 votes |
@Override public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) { return layer == BlockRenderLayer.TRANSLUCENT || layer == BlockRenderLayer.SOLID; }
Example 6
Source File: BlockAlienLeaves.java From AdvancedRocketry with MIT License | 4 votes |
@SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return super.leavesFancy ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID; }
Example 7
Source File: BlockLeaves.java From TFC2 with GNU General Public License v3.0 | 4 votes |
@Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return this.isTransparent ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID; }
Example 8
Source File: BlockPhasing.java From enderutilities with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) { boolean phased = this.isBlockNormalCube(state) == false; return (phased && layer == BlockRenderLayer.TRANSLUCENT) || (phased == false && layer == BlockRenderLayer.SOLID); }