Interface IAirHandlerMachine.Connection

Enclosing interface:
IAirHandlerMachine

public static interface IAirHandlerMachine.Connection
Represents a connection to a neighbouring air handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the neighbouring air handler
    net.minecraft.core.Direction
    Get the direction of this connection.
    int
    Get the amount of air has been dispersed along this connection in this tick.
    int
    Get the maximum air which may be dispersed along this connection in this tick.
    void
    setAirToDisperse(int toDisperse)
    Set the air which will be dispersed along this connection in this tick.
    void
    setMaxDispersion(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 by IAirListener.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 with IAirListener.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 by IAirHandlerMachine.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 during IAirHandlerMachine.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 by IAirHandlerMachine.tick(BlockEntity).
      Parameters:
      toDisperse - the air which will be dispersed this tick