Search in sources :

Example 6 with RenderEngine

use of net.minecraft.client.renderer.RenderEngine in project MineFactoryReloaded by powercrystals.

the class NeedleGunItemRenderer method renderItem.

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    RenderEngine renderengine = Minecraft.getMinecraft().renderEngine;
    if (renderengine != null) {
        renderengine.bindTexture("/textures/itemmodels/powercrystals/minefactoryreloaded/NeedleGun.png");
    }
    GL11.glPushMatrix();
    if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
        GL11.glRotatef(270, 0, 1, 0);
        GL11.glRotatef(300, 1, 0, 0);
        GL11.glTranslatef(-0.2F, 0.5F, 0.2F);
    } else if (type == ItemRenderType.EQUIPPED) {
        GL11.glRotatef(270, 1, 0, 0);
        GL11.glTranslatef(1.0F, 0, 0.2F);
    } else {
        GL11.glRotatef(270, 1, 0, 0);
        GL11.glTranslatef(0, -0.4F, 0);
    }
    GL11.glScalef(0.03F, 0.03F, 0.03F);
    _model.renderAll();
    GL11.glPopMatrix();
}
Also used : RenderEngine(net.minecraft.client.renderer.RenderEngine)

Example 7 with RenderEngine

use of net.minecraft.client.renderer.RenderEngine in project MineFactoryReloaded by powercrystals.

the class RocketItemRenderer method renderItem.

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    RenderEngine renderengine = Minecraft.getMinecraft().renderEngine;
    if (renderengine != null) {
        renderengine.bindTexture("/textures/itemmodels/powercrystals/minefactoryreloaded/Rocket.png");
    }
    GL11.glPushMatrix();
    if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
        GL11.glRotatef(270, 0, 1, 0);
        GL11.glRotatef(300, 1, 0, 0);
        GL11.glTranslatef(-0.3F, 0.3F, 0.5F);
        GL11.glScalef(0.03F, 0.03F, 0.03F);
    } else if (type == ItemRenderType.EQUIPPED) {
        GL11.glRotatef(270, 1, 0, 0);
        GL11.glTranslatef(0.3F, -0.4F, 1.0F);
        GL11.glScalef(0.03F, 0.03F, 0.03F);
    } else {
        GL11.glRotatef(270, 1, 0, 0);
        GL11.glScalef(0.025F, 0.025F, 0.025F);
    }
    _model.renderAll();
    GL11.glPopMatrix();
}
Also used : RenderEngine(net.minecraft.client.renderer.RenderEngine)

Aggregations

RenderEngine (net.minecraft.client.renderer.RenderEngine)7 Tessellator (net.minecraft.client.renderer.Tessellator)2 RenderBlocks (net.minecraft.client.renderer.RenderBlocks)1 ItemBlock (net.minecraft.item.ItemBlock)1 BlockFactoryGlassPane (powercrystals.minefactoryreloaded.block.BlockFactoryGlassPane)1 TileEntityRedNetHistorian (powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetHistorian)1