use of net.minecraft.util.IIcon in project TecTech by Technus.
the class QuantumStuffRender method renderInventoryBlock.
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
GL11.glPushMatrix();
// Get icons from custom register (useful for renderers and fluids)
IIcon side = QuantumStuffBlock.stuff;
tes.startDrawingQuads();
tes.setNormal(0.0F, -1.0F, 0.0F);
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
tes.startDrawingQuads();
tes.setNormal(0.0F, 0.0F, -1.0F);
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
tes.startDrawingQuads();
tes.setNormal(0.0F, 0.0F, 1.0F);
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
tes.startDrawingQuads();
tes.setNormal(-1.0F, 0.0F, 0.0F);
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
tes.startDrawingQuads();
tes.setNormal(1.0F, 0.0F, 0.0F);
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
tes.startDrawingQuads();
tes.setNormal(0.0F, 1.0F, 0.0F);
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, side);
tes.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
GL11.glPopMatrix();
}
use of net.minecraft.util.IIcon in project TecTech by Technus.
the class GT_GUIContainer_DataReader method renderItemSimple.
public void renderItemSimple(GT_Slot_Holo slot, ItemStack itemStack) {
int x = slot.xDisplayPosition;
int y = slot.yDisplayPosition;
this.zLevel = 100.0F;
itemRender.zLevel = 100.0F;
if (itemStack == null) {
IIcon iicon = slot.getBackgroundIconIndex();
if (iicon != null) {
GL11.glDisable(GL11.GL_LIGHTING);
// Forge: Blending needs to be enabled for this.
GL11.glEnable(GL11.GL_BLEND);
this.mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
this.drawTexturedModelRectFromIcon(x, y, iicon, 16, 16);
// Forge: And clean that up
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
}
}
GL11.glEnable(GL11.GL_DEPTH_TEST);
itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), itemStack, x, y);
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), itemStack, x, y);
itemRender.zLevel = 0.0F;
this.zLevel = 0.0F;
}
use of net.minecraft.util.IIcon in project Armourers-Workshop by RiskyKen.
the class RenderItemBowSkin method renderNomalIcon.
private void renderNomalIcon(ItemStack stack) {
IIcon icon = stack.getItem().getIcon(stack, 0);
renderItem.renderIcon(0, 0, icon, icon.getIconWidth(), icon.getIconHeight());
icon = stack.getItem().getIcon(stack, 1);
renderItem.renderIcon(0, 0, icon, icon.getIconWidth(), icon.getIconHeight());
}
use of net.minecraft.util.IIcon in project Armourers-Workshop by RiskyKen.
the class RenderItemSwordSkin method renderNomalIcon.
private void renderNomalIcon(ItemStack stack) {
IIcon icon = stack.getItem().getIcon(stack, 0);
renderItem.renderIcon(0, 0, icon, icon.getIconWidth(), icon.getIconHeight());
icon = stack.getItem().getIcon(stack, 1);
renderItem.renderIcon(0, 0, icon, icon.getIconWidth(), icon.getIconHeight());
}
use of net.minecraft.util.IIcon in project Armourers-Workshop by RiskyKen.
the class ModRenderHelper method renderItemStack.
public static void renderItemStack(ItemStack stack) {
IIcon icon = stack.getItem().getIcon(stack, 0);
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
}
Aggregations