Search in sources :

Example 21 with IIcon

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();
}
Also used : IIcon(net.minecraft.util.IIcon)

Example 22 with IIcon

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;
}
Also used : IIcon(net.minecraft.util.IIcon)

Example 23 with IIcon

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());
}
Also used : IIcon(net.minecraft.util.IIcon)

Example 24 with IIcon

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());
}
Also used : IIcon(net.minecraft.util.IIcon)

Example 25 with IIcon

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);
}
Also used : IIcon(net.minecraft.util.IIcon)

Aggregations

IIcon (net.minecraft.util.IIcon)79 Tessellator (net.minecraft.client.renderer.Tessellator)19 SideOnly (cpw.mods.fml.relauncher.SideOnly)17 Vec3dCube (uk.co.qmunity.lib.vec.Vec3dCube)11 ItemStack (net.minecraft.item.ItemStack)6 EntityItem (net.minecraft.entity.item.EntityItem)5 Fluid (net.minecraftforge.fluids.Fluid)5 Rotation (uk.co.qmunity.lib.transform.Rotation)5 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)4 AMVector2 (am2.api.math.AMVector2)3 Block (net.minecraft.block.Block)3 EntityDiggingFX (net.minecraft.client.particle.EntityDiggingFX)3 TubeColor (com.bluepowermod.api.tube.IPneumaticTube.TubeColor)2 IExplosiveHandler (com.builtbroken.mc.api.explosive.IExplosiveHandler)2 ITexturedExplosiveHandler (com.builtbroken.mc.api.explosive.ITexturedExplosiveHandler)2 IExplosiveContainerItem (com.builtbroken.mc.api.items.explosives.IExplosiveContainerItem)2 ItemStackWrapper (com.builtbroken.mc.prefab.items.ItemStackWrapper)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 FluidStack (net.minecraftforge.fluids.FluidStack)2 DoubleCoordinates (network.rs485.logisticspipes.world.DoubleCoordinates)2