Package mekanism.api.gas

Examples of mekanism.api.gas.GasStack


    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;

    if(xAxis >= 134-5 && xAxis <= 150-5 && yAxis >= 14-11 && yAxis <= 72-11)
    {
      GasStack stack = ((CachedIORecipe)arecipes.get(recipe)).outputStack;

      if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
      {
        if(doGasLookup(stack, false))
        {
View Full Code Here


    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;

    if(xAxis >= 134-5 && xAxis <= 150-5 && yAxis >= 14-11 && yAxis <= 72-11)
    {
      GasStack stack = ((CachedIORecipe)arecipes.get(recipe)).outputStack;

      if(button == 0)
      {
        if(doGasLookup(stack, false))
        {
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 >= 11+7 && yAxis <= 69+7)
    {
      fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput;
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 >= 11+7 && yAxis <= 69+7)
    {
      fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput;
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 gas = null;
    FluidStack fluid = null;

    if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
    {
      fluid = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getFluid();
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 gas = null;
    FluidStack fluid = null;

    if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
    {
      fluid = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getFluid();
View Full Code Here

      ItemScubaTank tank = (ItemScubaTank)player.getEquipmentInSlot(3).getItem();

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

    {
      for(Gas gas : GasRegistry.getRegisteredGasses())
      {
        if(gas.hasFluid())
        {
          arecipes.add(new CachedIORecipe(new GasStack(gas, 1), new FluidStack(gas.getFluid(), 1), true));
          arecipes.add(new CachedIORecipe(new GasStack(gas, 1), new FluidStack(gas.getFluid(), 1), false));
        }
      }
    }
    else if(outputId.equals("gas") && results.length == 1 && results[0] instanceof GasStack)
    {
      GasStack gas = (GasStack)results[0];

      if(gas.getGas().hasFluid())
      {
        arecipes.add(new CachedIORecipe(new GasStack(gas.getGas(), 1), new FluidStack(gas.getGas().getFluid(), 1), false));
      }
    }
    else if(outputId.equals("fluid") && results.length == 1 && results[0] instanceof FluidStack)
    {
      FluidStack fluid = (FluidStack)results[0];
      Gas gas = GasRegistry.getGas(fluid.getFluid());

      if(gas != null)
      {
        arecipes.add(new CachedIORecipe(new GasStack(gas, 1), new FluidStack(fluid.getFluid(), 1), true));
      }
    }
    else {
      super.loadCraftingRecipes(outputId, results);
    }
View Full Code Here

  @Override
  public void loadUsageRecipes(String inputId, Object... ingredients)
  {
    if(inputId.equals("gas") && ingredients.length == 1 && ingredients[0] instanceof GasStack)
    {
      GasStack gas = (GasStack)ingredients[0];

      if(gas.getGas().hasFluid())
      {
        arecipes.add(new CachedIORecipe(new GasStack(gas.getGas(), 1), new FluidStack(gas.getGas().getFluid(), 1), true));
      }
    }
    else if(inputId.equals("fluid") && ingredients.length == 1 && ingredients[0] instanceof FluidStack)
    {
      FluidStack fluid = (FluidStack)ingredients[0];
      Gas gas = GasRegistry.getGas(fluid.getFluid());

      if(gas != null)
      {
        arecipes.add(new CachedIORecipe(new GasStack(gas, 1), new FluidStack(fluid.getFluid(), 1), false));
      }
    }
    else {
      super.loadUsageRecipes(inputId, ingredients);
    }
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 >= 26 && xAxis <= 42 && yAxis >= 14+4 && yAxis <= 72+4)
    {
      gas = ((CachedIORecipe)arecipes.get(recipe)).gasStack;
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.