Interface IAirHandlerMachineFactory

All Known Implementing Classes:
AirHandlerMachineFactory

public interface IAirHandlerMachineFactory
Use this interface to get instances of air handlers for your tile entities. You can then expose those air handler instances via the IAirHandlerMachine capability interface; PNCCapabilities.AIR_HANDLER_MACHINE_CAPABILITY can be used for this.

Get an instance of this factory with PneumaticRegistry.IPneumaticCraftInterface.getAirHandlerMachineFactory().

  • Method Details

    • createTierOneAirHandler

      IAirHandlerMachine createTierOneAirHandler(int volume)
      Create a standard tier one air handler.
      Parameters:
      volume - the air handler volume, in mL.
      Returns:
      a new tier one air handler
    • createTierTwoAirHandler

      IAirHandlerMachine createTierTwoAirHandler(int volume)
      Create a standard tier two air handler.
      Parameters:
      volume - the air handler volume, in mL.
      Returns:
      a new tier two air handler
    • createAirHandler

      IAirHandlerMachine createAirHandler(PressureTier tier, int volume)
      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)
      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