Class AirHandlerMachineFactory

java.lang.Object
me.desht.pneumaticcraft.common.pressure.AirHandlerMachineFactory
All Implemented Interfaces:
IAirHandlerMachineFactory

public class AirHandlerMachineFactory extends Object implements IAirHandlerMachineFactory
  • Constructor Details

    • AirHandlerMachineFactory

      public AirHandlerMachineFactory()
  • Method Details

    • getInstance

      public static AirHandlerMachineFactory getInstance()
    • createTierOneAirHandler

      public IAirHandlerMachine createTierOneAirHandler(int volume)
      Description copied from interface: IAirHandlerMachineFactory
      Create a standard tier one air handler.
      Specified by:
      createTierOneAirHandler in interface IAirHandlerMachineFactory
      Parameters:
      volume - the air handler volume, in mL.
      Returns:
      a new tier one air handler
    • createTierTwoAirHandler

      public IAirHandlerMachine createTierTwoAirHandler(int volume)
      Description copied from interface: IAirHandlerMachineFactory
      Create a standard tier two air handler.
      Specified by:
      createTierTwoAirHandler in interface IAirHandlerMachineFactory
      Parameters:
      volume - the air handler volume, in mL.
      Returns:
      a new tier two air handler
    • createAirHandler

      public IAirHandlerMachine createAirHandler(PressureTier tier, int volume)
      Description copied from interface: IAirHandlerMachineFactory
      Returns a new instance of an IAirHandler. This handler handles everything pressurized air related: air dispersion, blowing up when the pressure gets too high, providing a method for releasing air into the atmosphere... provided that you take the following steps:
      • Storing this object in your block entity
      • Providing access to it via LazyOptional and the PNCCapabilities.AIR_HANDLER_MACHINE_CAPABILITY capability
      • Loading and saving the air handler in BlockEntity.load(CompoundTag) and BlockEntity.saveAdditional(CompoundTag)
      • Ticking the air handler in your block entity's server-side tick implementation (your block entity must be ticked)
      Specified by:
      createAirHandler in interface IAirHandlerMachineFactory
      Parameters:
      tier - the pressure tier
      volume - volume of the machine's internal storage; the pressure (in bar) is the actual amount of air in the machine divided by its volume
      Returns:
      the air handler object