Package mekanism.api.energy

Examples of mekanism.api.energy.IEnergizedItem


    }

    if(item.getItem() instanceof IEnergyCube)
    {
      EnergyCubeTier tier = ((IEnergyCube)item.getItem()).getEnergyCubeTier(item);
      IEnergizedItem energized = (IEnergizedItem)item.getItem();
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube" + tier.name + ".png"));

      GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
      GL11.glTranslatef(0.0F, -1.0F, 0.0F);

      energyCube.render(0.0625F);

      GL11.glPushMatrix();
      GL11.glTranslated(0.0, 1.0, 0.0);
      Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCore.png"));

      GL11.glShadeModel(GL11.GL_SMOOTH);
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

      MekanismRenderer.glowOn();

      EnumColor c = tier.color;

      GL11.glPushMatrix();
      GL11.glScalef(0.4F, 0.4F, 0.4F);
      GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float)(energized.getEnergy(item)/energized.getMaxEnergy(item)));
      GL11.glTranslatef(0, (float)Math.sin(Math.toRadians((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 3)) / 7, 0);
      GL11.glRotatef((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 0);
      GL11.glRotatef(36F + (MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 1);
      energyCore.render(0.0625F);
      GL11.glPopMatrix();
View Full Code Here


    if(tileEntity == null)
    {
      return null;
    }

    IEnergizedItem electricItem = (IEnergizedItem)itemStack.getItem();
    electricItem.setEnergy(itemStack, tileEntity.electricityStored);

    ISustainedInventory inventory = (ISustainedInventory)itemStack.getItem();
    inventory.setInventory(tileEntity.getInventory(), itemStack);
   
    if(tileEntity instanceof ISustainedData)
View Full Code Here

      itemStack.stackTagCompound.setInteger("controlType", control.getControlType().ordinal());
    }

    if(tileEntity instanceof TileEntityElectricBlock)
    {
      IEnergizedItem energizedItem = (IEnergizedItem)itemStack.getItem();
      energizedItem.setEnergy(itemStack, ((TileEntityElectricBlock)tileEntity).electricityStored);
    }

    if(tileEntity instanceof TileEntityContainerBlock && ((TileEntityContainerBlock)tileEntity).inventory.length > 0)
    {
      ISustainedInventory inventory = (ISustainedInventory)itemStack.getItem();
View Full Code Here

    ItemStack itemStack = new ItemStack(Mekanism.EnergyCube);

    IEnergyCube energyCube = (IEnergyCube)itemStack.getItem();
    energyCube.setEnergyCubeTier(itemStack, tileEntity.tier);

    IEnergizedItem energizedItem = (IEnergizedItem)itemStack.getItem();
    energizedItem.setEnergy(itemStack, tileEntity.electricityStored);

    ISustainedInventory inventory = (ISustainedInventory)itemStack.getItem();
    inventory.setInventory(((ISustainedInventory)tileEntity).getInventory(), itemStack);

    return itemStack;
View Full Code Here

TOP

Related Classes of mekanism.api.energy.IEnergizedItem

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.