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();
}
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();
}
Aggregations