Interface IAirHandlerMachine.Connection
- Enclosing interface:
- IAirHandlerMachine
public static interface IAirHandlerMachine.Connection
Represents a connection to a neighbouring air handler.
-
Method Summary
Modifier and TypeMethodDescriptionGet the neighbouring air handlernet.minecraft.core.DirectionGet the direction of this connection.intGet the amount of air has been dispersed along this connection in this tick.intGet the maximum air which may be dispersed along this connection in this tick.voidsetAirToDisperse(int toDisperse) Set the air which will be dispersed along this connection in this tick.voidsetMaxDispersion(int maxDispersion) Set the max air which may be dispersed along this connection.
-
Method Details
-
getAirHandler
IAirHandlerMachine getAirHandler()Get the neighbouring air handler- Returns:
- a machine air handler
-
getDirection
@Nullable net.minecraft.core.Direction getDirection()Get the direction of this connection. This may be null if this is a "special" connection, created byIAirListener.addConnectedPneumatics(List)- Returns:
- the direction of this connection if it's physically adjacent, otherwise null
-
getMaxDispersion
int getMaxDispersion()Get the maximum air which may be dispersed along this connection in this tick. This can be controlled withIAirListener.getMaxDispersion(IAirHandlerMachine, Direction).- Returns:
- the maximum dispersal allowed
-
setMaxDispersion
void setMaxDispersion(int maxDispersion) Set the max air which may be dispersed along this connection. You should not normally call this directly; it is handled byIAirHandlerMachine.tick(BlockEntity)- Parameters:
maxDispersion- the maximum dispersal allowed
-
getDispersedAir
int getDispersedAir()Get the amount of air has been dispersed along this connection in this tick. Note that this will be 0 until calculated duringIAirHandlerMachine.tick(BlockEntity).- Returns:
- the air which has been dispersed this tick.
-
setAirToDisperse
void setAirToDisperse(int toDisperse) Set the air which will be dispersed along this connection in this tick. You should not normally call this directly; it is handled byIAirHandlerMachine.tick(BlockEntity).- Parameters:
toDisperse- the air which will be dispersed this tick
-