Package mekanism.api.gas

Examples of mekanism.api.gas.GasStack


    Point offset = gui.getRecipePosition(recipe);

    int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft)-offset.x;
    int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop)-offset.y;

    GasStack stack = null;

    if(xAxis >= 45 && xAxis <= 51 && yAxis >= 33 && yAxis <= 45)
    {
      stack = new GasStack(((CachedIORecipe)arecipes.get(recipe)).input.gasType, 1);
    }

    if(stack != null)
    {
      if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
View Full Code Here


    Point offset = gui.getRecipePosition(recipe);

    int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft)-offset.x;
    int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop)-offset.y;

    GasStack stack = null;

    if(xAxis >= 45 && xAxis <= 51 && yAxis >= 33 && yAxis <= 45)
    {
      stack = new GasStack(((CachedIORecipe)arecipes.get(recipe)).input.gasType, 1);
    }

    if(stack != null)
    {
      if(button == 0)
View Full Code Here

        toSave += remain;
      }

      if(toSave > 0)
      {
        GasStack stack = new GasStack(getTransmitterNetwork().gasStored.getGas(), toSave);

        lastWrite = stack;
        nbtTags.setTag("cacheGas", stack.write(new NBTTagCompound()));
      }
    }
  }
View Full Code Here

          }
        }
       
        if(gasType != null && FuelHandler.getFuel(gasType) != null)
        {
          GasStack removed = GasTransmission.removeGas(inventory[0], gasType, fuelTank.getNeeded());
          fuelTank.receive(removed, true);
        }
      }

      if(canOperate())
View Full Code Here

  {
    super.handlePacketData(dataStream);
   
    if(dataStream.readBoolean())
    {
      fuelTank.setGas(new GasStack(GasRegistry.getGas(dataStream.readInt()), dataStream.readInt()));
    }
    else {
      fuelTank.setGas(null);
    }
   
View Full Code Here

    Point point = GuiDraw.getMousePosition();

    int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
    int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);

    GasStack gas = null;
    FluidStack fluid = null;

    if(xAxis >= 6 && xAxis <= 22 && yAxis >= 5+13 && yAxis <= 63+13)
    {
      fluid = new FluidStack(FluidRegistry.WATER, 1);
View Full Code Here

    Point point = GuiDraw.getMousePosition();

    int xAxis = point.x - (Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
    int yAxis = point.y - (Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);

    GasStack gas = null;
    FluidStack fluid = null;

    if(xAxis >= 6 && xAxis <= 22 && yAxis >= 5+13 && yAxis <= 63+13)
    {
      fluid = new FluidStack(FluidRegistry.WATER, 1);
View Full Code Here

        ItemScubaTank tank = (ItemScubaTank)mc.thePlayer.getEquipmentInSlot(3).getItem();

        final int max = 300;
       
        tank.useGas(mc.thePlayer.getEquipmentInSlot(3));
        GasStack received = tank.removeGas(mc.thePlayer.getEquipmentInSlot(3), max-mc.thePlayer.getAir());
       
        if(received != null)
        {
          mc.thePlayer.setAir(mc.thePlayer.getAir()+received.amount);
         
View Full Code Here

    Point point = GuiDraw.getMousePosition();

    int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
    int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);

    GasStack stack = null;

    if(xAxis >= 26 && xAxis <= 42 && yAxis >= 14+13 && yAxis <= 72+13)
    {
      stack = ((CachedIORecipe)arecipes.get(recipe)).chemicalInput.leftGas;
    }
View Full Code Here

    Point point = GuiDraw.getMousePosition();

    int xAxis = point.x - (Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
    int yAxis = point.y - (Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);

    GasStack stack = null;

    if(xAxis >= 26 && xAxis <= 42 && yAxis >= 14+13 && yAxis <= 72+13)
    {
      stack = ((CachedIORecipe)arecipes.get(recipe)).chemicalInput.leftGas;
    }
View Full Code Here

TOP

Related Classes of mekanism.api.gas.GasStack

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.