Search in sources :

Example 6 with RenderHelper

use of uk.co.qmunity.lib.client.render.RenderHelper in project BluePower by Qmunity.

the class PartLamp method renderItem.

/**
     * @author Koen Beckers (K4Unl)
     */
@Override
@SideOnly(Side.CLIENT)
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    power = (byte) 0;
    RenderHelper rh = RenderHelper.instance;
    rh.setRenderCoords(null, 0, 0, 0);
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    Tessellator.instance.startDrawingQuads();
    renderStatic(new Vec3i(0, 0, 0), rh, RenderBlocks.getInstance(), 0);
    Tessellator.instance.draw();
    rh.reset();
    GL11.glPushMatrix();
    renderGlow(1);
    GL11.glPopMatrix();
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
}
Also used : Vec3i(uk.co.qmunity.lib.vec.Vec3i) RenderHelper(uk.co.qmunity.lib.client.render.RenderHelper) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 7 with RenderHelper

use of uk.co.qmunity.lib.client.render.RenderHelper in project BluePower by Qmunity.

the class PneumaticTube method renderItem.

@Override
@SideOnly(Side.CLIENT)
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    GL11.glPushMatrix();
    GL11.glTranslated(0, -0.125D, 0);
    Tessellator t = Tessellator.instance;
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    t.startDrawingQuads();
    connections[ForgeDirection.DOWN.ordinal()] = true;
    connections[ForgeDirection.UP.ordinal()] = true;
    RenderHelper renderer = RenderHelper.instance;
    renderer.fullReset();
    RenderBlocks rb = new RenderBlocks();
    renderStatic(new Vec3i(0, 0, 0), renderer, rb, 0);
    renderStatic(new Vec3i(0, 0, 0), renderer, rb, 1);
    t.draw();
    renderSide();
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
    GL11.glPopMatrix();
}
Also used : Vec3i(uk.co.qmunity.lib.vec.Vec3i) RenderBlocks(net.minecraft.client.renderer.RenderBlocks) Tessellator(net.minecraft.client.renderer.Tessellator) RenderHelper(uk.co.qmunity.lib.client.render.RenderHelper) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

RenderHelper (uk.co.qmunity.lib.client.render.RenderHelper)7 SideOnly (cpw.mods.fml.relauncher.SideOnly)4 Vec3i (uk.co.qmunity.lib.vec.Vec3i)4 Vec3dCube (uk.co.qmunity.lib.vec.Vec3dCube)3 Tessellator (net.minecraft.client.renderer.Tessellator)2 IIcon (net.minecraft.util.IIcon)2 Rotation (uk.co.qmunity.lib.transform.Rotation)2 Vec3d (uk.co.qmunity.lib.vec.Vec3d)2 IAdvancedSilkyRemovable (com.bluepowermod.api.block.IAdvancedSilkyRemovable)1 ISilkyRemovable (com.bluepowermod.api.block.ISilkyRemovable)1 IScrewdriver (com.bluepowermod.api.misc.IScrewdriver)1 BlockLamp (com.bluepowermod.block.machine.BlockLamp)1 ItemPart (com.bluepowermod.item.ItemPart)1 GateComponentQuartzResonator (com.bluepowermod.part.gate.component.GateComponentQuartzResonator)1 GateComponentSiliconChip (com.bluepowermod.part.gate.component.GateComponentSiliconChip)1 GateComponentTaintedSiliconChip (com.bluepowermod.part.gate.component.GateComponentTaintedSiliconChip)1 PartRedwireFace (com.bluepowermod.part.wire.redstone.PartRedwireFace)1 PartRedwireFaceUninsulated (com.bluepowermod.part.wire.redstone.PartRedwireFace.PartRedwireFaceUninsulated)1 GuiScreen (net.minecraft.client.gui.GuiScreen)1 GuiContainer (net.minecraft.client.gui.inventory.GuiContainer)1