Class AirHandlerMachineFactory
java.lang.Object
me.desht.pneumaticcraft.common.pressure.AirHandlerMachineFactory
- All Implemented Interfaces:
IAirHandlerMachineFactory
-
Constructor Summary
Constructors -
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.static AirHandlerMachineFactory
-
Constructor Details
-
AirHandlerMachineFactory
public AirHandlerMachineFactory()
-
-
Method Details
-
getInstance
-
createTierOneAirHandler
Description copied from interface:IAirHandlerMachineFactoryCreate a standard tier one air handler.- Specified by:
createTierOneAirHandlerin interfaceIAirHandlerMachineFactory- Parameters:
volume- the air handler volume, in mL.- Returns:
- a new tier one air handler
-
createTierTwoAirHandler
Description copied from interface:IAirHandlerMachineFactoryCreate a standard tier two air handler.- Specified by:
createTierTwoAirHandlerin interfaceIAirHandlerMachineFactory- Parameters:
volume- the air handler volume, in mL.- Returns:
- a new tier two air handler
-
createAirHandler
Description copied from interface:IAirHandlerMachineFactoryReturns 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)
- Specified by:
createAirHandlerin interfaceIAirHandlerMachineFactory- 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
-