Examples of Gas


Examples of mekanism.api.gas.Gas

    if(ticksSinceFailedExtract > 25 && ticksSinceFailedExtract % 10 != 0) {
      // after 25 ticks of failing, only check every 10 ticks
      return;
    }

    Gas f = tank.getGas() == null ? null : tank.getGas().getGas();
    for (ForgeDirection dir : externalConnections) {
      if(autoExtractForDir(dir)) {
        if(network.extractFrom(this, dir, MAX_EXTRACT_PER_TICK)) {
          ticksSinceFailedExtract = 0;
        }
View Full Code Here

Examples of mekanism.api.gas.Gas

    if(getGas(itemstack) == null)
    {
      return null;
    }

    Gas type = getGas(itemstack).getGas();

    int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
    setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));

    return new GasStack(type, gasToUse);
View Full Code Here

Examples of mekanism.api.gas.Gas

      for(IFuel s : BuildcraftFuelRegistry.fuel.getFuels())
      {

        if(!(s.getFluid() == null || GasRegistry.containsGas(s.getFluid().getName())))
        {
          GasRegistry.register(new Gas(s.getFluid()));
        }
      }

      BuildcraftFuelRegistry.fuel.addFuel(FluidRegistry.getFluid("ethene"), (int)(240 * Mekanism.TO_TE), 40 * FluidContainerRegistry.BUCKET_VOLUME);
    }
 
View Full Code Here

Examples of mekanism.api.gas.Gas

    else if(config.getAbsolutePath().contains("tekkit"))
    {
      logger.info("Detected Tekkit in root directory - hello, fellow user!");
    }
   
    GasRegistry.register(new Gas("hydrogen")).registerFluid();
    GasRegistry.register(new Gas("oxygen")).registerFluid();
    GasRegistry.register(new Gas("water")).registerFluid();
    GasRegistry.register(new Gas("chlorine")).registerFluid();
    GasRegistry.register(new Gas("sulfurDioxideGas")).registerFluid();
    GasRegistry.register(new Gas("sulfurTrioxideGas")).registerFluid();
    GasRegistry.register(new Gas("sulfuricAcid")).registerFluid();
    GasRegistry.register(new Gas("hydrogenChloride")).registerFluid();
    GasRegistry.register(new Gas("liquidOsmium").setVisible(false));
    GasRegistry.register(new Gas("liquidStone").setVisible(false));
    GasRegistry.register(new Gas("ethene").registerFluid());
    GasRegistry.register(new Gas("sodium").registerFluid());
    GasRegistry.register(new Gas("brine").registerFluid());
   
    for(Resource resource : Resource.values())
    {
      String name = resource.getName();
     
View Full Code Here

Examples of mekanism.api.gas.Gas

    {
      ChargeUtils.charge(1, this);

      if(inventory[0] != null && fuelTank.getStored() < MAX_GAS)
      {
        Gas gasType = null;
       
        if(fuelTank.getGas() != null)
        {
          gasType = fuelTank.getGas().getGas();
        }
View Full Code Here

Examples of mekanism.api.gas.Gas

    if(getGas(itemstack) == null)
    {
      return null;
    }

    Gas type = getGas(itemstack).getGas();

    int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
    setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));

    return new GasStack(type, gasToUse);
View Full Code Here

Examples of mekanism.api.gas.Gas

      }
    }
    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));
      }
View Full Code Here

Examples of mekanism.api.gas.Gas

      }
    }
    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));
      }
View Full Code Here

Examples of mekanism.api.gas.Gas

    if(getGas(itemstack) == null)
    {
      return null;
    }

    Gas type = getGas(itemstack).getGas();

    int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
    setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));

    return new GasStack(type, gasToUse);
View Full Code Here

Examples of mekanism.api.gas.Gas

    public static void initGas()
    {
        if (EnergyConfigHandler.isMekanismLoaded())
        {
            Gas oxygen = GasRegistry.getGas("oxygen");

            if (oxygen == null)
            {
                EnergyConfigHandler.gasOxygen = GasRegistry.register(new Gas("oxygen")).registerFluid();
            }
            else
            {
                EnergyConfigHandler.gasOxygen = oxygen;
            }

            Gas hydrogen = GasRegistry.getGas("hydrogen");

            if (hydrogen == null)
            {
                EnergyConfigHandler.gasHydrogen = GasRegistry.register(new Gas("hydrogen")).registerFluid();
            }
            else
            {
                EnergyConfigHandler.gasHydrogen = hydrogen;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.