Package mekanism.common.item

Examples of mekanism.common.item.ItemBlockMachine


        MekanismRenderer.glowOff();
      }
    }
    else if(MachineType.get(item) == MachineType.ELECTRIC_CHEST)
    {
      ItemBlockMachine chest = (ItemBlockMachine)item.getItem();

      GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
      GL11.glTranslatef(0, 1.0F, 1.0F);
      GL11.glScalef(1.0F, -1F, -1F);

      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ElectricChest.png"));

      electricChest.renderAll();
    }
    else if(item.getItem() instanceof ItemRobit)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.5F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Robit.png"));
      robit.render(0.08F);
    }
    else if(item.getItem() == Mekanism.Jetpack)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glTranslatef(0.2F, -0.35F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
      jetpack.render(0.0625F);
    }
    else if(item.getItem() == Mekanism.ArmoredJetpack)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glTranslatef(0.2F, -0.35F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
      armoredJetpack.render(0.0625F);
    }
    else if(item.getItem() instanceof ItemGasMask)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glTranslatef(0.1F, 0.2F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
      gasMask.render(0.0625F);
    }
    else if(item.getItem() instanceof ItemScubaTank)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glScalef(1.6F, 1.6F, 1.6F);
      GL11.glTranslatef(0.2F, -0.5F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
      scubaTank.render(0.0625F);
    }
    else if(item.getItem() instanceof ItemFreeRunners)
    {
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
      GL11.glScalef(2.0F, 2.0F, 2.0F);
      GL11.glTranslatef(0.2F, -1.43F, 0.12F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png"));
      freeRunners.render(0.0625F);
    }
    else if(item.getItem() instanceof ItemBalloon)
    {
      if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON)
      {
        GL11.glScalef(2.5F, 2.5F, 2.5F);
        GL11.glTranslatef(0.2F, 0, 0.1F);
        GL11.glRotatef(15, -1, 0, 1);
        balloonRenderer.render(((ItemBalloon)item.getItem()).getColor(item), 0, 1.9F, 0);
      }
      else {
        balloonRenderer.render(((ItemBalloon)item.getItem()).getColor(item), 0, 1, 0);
      }
    }
    else if(item.getItem() instanceof ItemAtomicDisassembler)
    {
      GL11.glPushMatrix();
      GL11.glScalef(1.4F, 1.4F, 1.4F);
      GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);

      if(type == ItemRenderType.EQUIPPED)
      {
        GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(50, 1.0F, 0.0F, 0.0F);
        GL11.glScalef(2.0F, 2.0F, 2.0F);
        GL11.glTranslatef(0.0F, -0.4F, 0.4F);
      }
      else if(type == ItemRenderType.INVENTORY)
      {
        GL11.glRotatef(225, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(45, -1.0F, 0.0F, -1.0F);
        GL11.glScalef(0.6F, 0.6F, 0.6F);
        GL11.glTranslatef(0.0F, -0.2F, 0.0F);
      }
      else {
        GL11.glRotatef(45, 0.0F, 1.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.7F, 0.0F);
      }

      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png"));
      atomicDisassembler.render(0.0625F);
      GL11.glPopMatrix();
    }
    else if(item.getItem() instanceof ItemPartTransmitter)
    {
      GL11.glTranslated(-0.5, -0.5, -0.5);
      MekanismRenderer.blendOn();
      GL11.glDisable(GL11.GL_CULL_FACE);
      RenderPartTransmitter.getInstance().renderItem(TransmitterType.values()[item.getItemDamage()]);
      GL11.glEnable(GL11.GL_CULL_FACE);
      MekanismRenderer.blendOff();
    }
    else if(item.getItem() instanceof ItemGlowPanel)
    {
      GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
      GL11.glTranslated(-0.5, -0.5, -0.5);
      double d = 0.15;
      GL11.glTranslated(d, d, d);
      GL11.glScaled(2, 2, 2);
      GL11.glTranslated(0.4-2*d, -2*d, -2*d);
      GL11.glDisable(GL11.GL_CULL_FACE);
      RenderHelper.disableStandardItemLighting();
      RenderGlowPanel.getInstance().renderItem(item.getItemDamage());
      GL11.glEnable(GL11.GL_CULL_FACE);
      GL11.glPopAttrib();
    }
    else if(MachineType.get(item) == MachineType.PORTABLE_TANK)
    {
      GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PortableTank.png"));
     
      ItemBlockMachine itemMachine = (ItemBlockMachine)item.getItem();
      Fluid fluid = itemMachine.getFluidStack(item) != null ? itemMachine.getFluidStack(item).getFluid() : null;
      portableTankRenderer.render(fluid, itemMachine.getPrevScale(item), false, null, -0.5, -0.5, -0.5);
    }
    else {
      if(item.getItem() instanceof ItemBlockMachine)
      {
        RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Block.getBlockFromItem(item.getItem()), item.getItemDamage(), ClientProxy.MACHINE_RENDER_ID);
View Full Code Here


            lastTickUpdate = false;
          }
        }
        else if(mc.thePlayer.isSneaking() && StackUtils.getItem(mc.thePlayer.getCurrentEquippedItem()) instanceof ItemBlockMachine)
        {
          ItemBlockMachine item = (ItemBlockMachine)mc.thePlayer.getCurrentEquippedItem().getItem();

          if(MachineType.get(mc.thePlayer.getCurrentEquippedItem()) == MachineType.PORTABLE_TANK)
          {
            if(MekanismKeyHandler.modeSwitchKey.getIsKeyPressed())
            {
              if(!lastTickUpdate)
              {
                item.setBucketMode(stack, !item.getBucketMode(stack));
                Mekanism.packetHandler.sendToServer(new PortableTankStateMessage(item.getBucketMode(stack)));
                mc.thePlayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + MekanismUtils.localize("tooltip.portableTank.bucketMode") + ": " + (item.getBucketMode(stack) ? (EnumColor.DARK_GREEN + "ON") : (EnumColor.DARK_RED + "OFF"))));
                lastTickUpdate = true;
              }
            }
            else {
              lastTickUpdate = false;
            }
          }
        }
        else if(mc.thePlayer.isSneaking() && StackUtils.getItem(mc.thePlayer.getCurrentEquippedItem()) instanceof ItemWalkieTalkie)
        {
          ItemWalkieTalkie item = (ItemWalkieTalkie)mc.thePlayer.getCurrentEquippedItem().getItem();

          if(MekanismKeyHandler.modeSwitchKey.getIsKeyPressed() && item.getOn(stack))
          {
            if(!lastTickUpdate)
            {
              int newChan = item.getChannel(stack) < 9 ? item.getChannel(stack)+1 : 1;
              item.setChannel(stack, newChan);
              Mekanism.packetHandler.sendToServer(new WalkieTalkieStateMessage(newChan));
              SoundHandler.playSound("mekanism:etc.Ding");
              lastTickUpdate = true;
            }
          }
View Full Code Here

TOP

Related Classes of mekanism.common.item.ItemBlockMachine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.