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 Summary
Modifier and TypeMethodDescriptioncreateAirHandler(PressureTier tier, int volume) Returns a new instance of an IAirHandler.createTierOneAirHandler(int volume) Create a standard tier one air handler.createTierTwoAirHandler(int volume) Create a standard tier two air handler.
-
Method Details
-
createTierOneAirHandler
Create a standard tier one air handler.- Parameters:
volume- the air handler volume, in mL.- Returns:
- a new tier one air handler
-
createTierTwoAirHandler
Create a standard tier two air handler.- Parameters:
volume- the air handler volume, in mL.- Returns:
- a new tier two air handler
-
createAirHandler
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
LazyOptionaland thePNCCapabilities.AIR_HANDLER_MACHINE_CAPABILITYcapability - Loading and saving the air handler in
BlockEntity.load(CompoundTag)andBlockEntity.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 tiervolume- 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
-