Search in sources :

Example 1 with SmartWrenchItem

use of mcjty.rftools.items.smartwrench.SmartWrenchItem in project RFTools by McJty.

the class EndergenicRenderer method render.

@Override
public void render(EndergenicTileEntity tileEntity, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
    Tessellator tessellator = Tessellator.getInstance();
    BlockPos coord = tileEntity.getPos();
    if (coord.equals(RFTools.instance.clientInfo.getSelectedTE())) {
        bindTexture(redglow);
        RenderGlowEffect.renderGlow(tessellator, x, y, z);
    } else if (coord.equals(RFTools.instance.clientInfo.getDestinationTE())) {
        bindTexture(blueglow);
        RenderGlowEffect.renderGlow(tessellator, x, y, z);
    }
    GlStateManager.depthMask(false);
    GlStateManager.enableBlend();
    GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
    GlStateManager.disableAlpha();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
    this.bindTexture(halo);
    float s = (System.currentTimeMillis() % 1000) / 1000.0f;
    if (s > 0.5f) {
        s = 1.0f - s;
    }
    // + random.nextFloat() * .05f);
    RenderHelper.renderBillboardQuadBright(0.2f + s * 0.3f);
    GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
    if (tileEntity.getGoodCounter() > 0) {
        this.bindTexture(whiteflash);
        RenderHelper.renderBillboardQuadBright(0.8f * (tileEntity.getGoodCounter() / 10.0f));
    }
    if (tileEntity.getBadCounter() > 0) {
        this.bindTexture(blackflash);
        RenderHelper.renderBillboardQuadBright(0.8f * (tileEntity.getBadCounter() / 20.0f));
    }
    GlStateManager.popMatrix();
    ItemStack mainHand = Minecraft.getMinecraft().player.getHeldItemMainhand();
    ItemStack offHand = Minecraft.getMinecraft().player.getHeldItemOffhand();
    boolean showOverlay = (!mainHand.isEmpty() && mainHand.getItem() instanceof SmartWrenchItem) || (!offHand.isEmpty() && offHand.getItem() instanceof SmartWrenchItem);
    if (showOverlay) {
        HudRenderer.renderHud(tileEntity, x, y, z);
    }
}
Also used : Tessellator(net.minecraft.client.renderer.Tessellator) SmartWrenchItem(mcjty.rftools.items.smartwrench.SmartWrenchItem) BlockPos(net.minecraft.util.math.BlockPos) ItemStack(net.minecraft.item.ItemStack)

Example 2 with SmartWrenchItem

use of mcjty.rftools.items.smartwrench.SmartWrenchItem in project RFTools by McJty.

the class ModItems method setupVariousItems.

private static void setupVariousItems() {
    shapeCardItem = new ShapeCardItem();
    shapeCardItem.setUnlocalizedName("ShapeCard");
    shapeCardItem.setCreativeTab(RFTools.tabRfTools);
    shapeCardItem.setTextureName(RFTools.MODID + ":shapeCardItem");
    GameRegistry.registerItem(shapeCardItem, "shapeCardItem");
    smartWrenchItem = new SmartWrenchItem();
    smartWrenchItem.setUnlocalizedName("SmartWrench");
    smartWrenchItem.setCreativeTab(RFTools.tabRfTools);
    smartWrenchItem.setTextureName(RFTools.MODID + ":smartWrenchItem");
    GameRegistry.registerItem(smartWrenchItem, "smartWrenchItem");
    networkMonitorItem = new NetworkMonitorItem();
    networkMonitorItem.setUnlocalizedName("NetworkMonitor");
    networkMonitorItem.setCreativeTab(RFTools.tabRfTools);
    networkMonitorItem.setTextureName(RFTools.MODID + ":networkMonitorItem");
    GameRegistry.registerItem(networkMonitorItem, "networkMonitorItem");
    rfToolsManualItem = new RFToolsManualItem();
    rfToolsManualItem.setUnlocalizedName("RFToolsManual");
    rfToolsManualItem.setCreativeTab(RFTools.tabRfTools);
    rfToolsManualItem.setTextureName(RFTools.MODID + ":rftoolsManual");
    GameRegistry.registerItem(rfToolsManualItem, "rfToolsManualItem");
    rfToolsManualDimensionItem = new RFToolsManualDimensionItem();
    rfToolsManualDimensionItem.setUnlocalizedName("RFToolsManualDimension");
    rfToolsManualDimensionItem.setCreativeTab(RFTools.tabRfTools);
    rfToolsManualDimensionItem.setTextureName(RFTools.MODID + ":rftoolsManualDimension");
    GameRegistry.registerItem(rfToolsManualDimensionItem, "rfToolsManualDimensionItem");
    developersDelightItem = new DevelopersDelightItem();
    developersDelightItem.setUnlocalizedName("DevelopersDelight");
    developersDelightItem.setCreativeTab(RFTools.tabRfTools);
    developersDelightItem.setTextureName(RFTools.MODID + ":developersDelightItem");
    GameRegistry.registerItem(developersDelightItem, "developersDelightItem");
    shardWandItem = new ShardWandItem();
    shardWandItem.setUnlocalizedName("ShardWand");
    shardWandItem.setCreativeTab(RFTools.tabRfTools);
    shardWandItem.setTextureName(RFTools.MODID + ":shardWandItem");
    GameRegistry.registerItem(shardWandItem, "shardWandItem");
}
Also used : ShapeCardItem(mcjty.rftools.items.shapecard.ShapeCardItem) NetworkMonitorItem(mcjty.rftools.items.netmonitor.NetworkMonitorItem) SmartWrenchItem(mcjty.rftools.items.smartwrench.SmartWrenchItem) RFToolsManualDimensionItem(mcjty.rftools.items.manual.RFToolsManualDimensionItem) ShardWandItem(mcjty.rftools.items.devdelight.ShardWandItem) RFToolsManualItem(mcjty.rftools.items.manual.RFToolsManualItem) DevelopersDelightItem(mcjty.rftools.items.devdelight.DevelopersDelightItem)

Aggregations

SmartWrenchItem (mcjty.rftools.items.smartwrench.SmartWrenchItem)2 DevelopersDelightItem (mcjty.rftools.items.devdelight.DevelopersDelightItem)1 ShardWandItem (mcjty.rftools.items.devdelight.ShardWandItem)1 RFToolsManualDimensionItem (mcjty.rftools.items.manual.RFToolsManualDimensionItem)1 RFToolsManualItem (mcjty.rftools.items.manual.RFToolsManualItem)1 NetworkMonitorItem (mcjty.rftools.items.netmonitor.NetworkMonitorItem)1 ShapeCardItem (mcjty.rftools.items.shapecard.ShapeCardItem)1 Tessellator (net.minecraft.client.renderer.Tessellator)1 ItemStack (net.minecraft.item.ItemStack)1 BlockPos (net.minecraft.util.math.BlockPos)1