use of gregtech.common.pipelike.fluidpipe.ItemBlockFluidPipe in project GregTech by GregTechCE.
the class FluidPipeRenderer method renderItem.
@Override
public void renderItem(ItemStack rawItemStack, TransformType transformType) {
ItemStack stack = ModCompatibility.getRealItemStack(rawItemStack);
if (!(stack.getItem() instanceof ItemBlockFluidPipe)) {
return;
}
CCRenderState renderState = CCRenderState.instance();
GlStateManager.enableBlend();
renderState.reset();
renderState.startDrawing(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
BlockFluidPipe blockFluidPipe = (BlockFluidPipe) ((ItemBlockFluidPipe) stack.getItem()).getBlock();
FluidPipeType pipeType = blockFluidPipe.getItemPipeType(stack);
Material material = blockFluidPipe.getItemMaterial(stack);
if (pipeType != null && material != null) {
renderPipeBlock(material, pipeType, IPipeTile.DEFAULT_INSULATION_COLOR, renderState, new IVertexOperation[0], 0);
}
renderState.draw();
GlStateManager.disableBlend();
}
Aggregations