Class LiquidModule

java.lang.Object
mindustry.world.modules.BlockModule
mindustry.world.modules.LiquidModule

public class LiquidModule extends BlockModule
  • Constructor Details

    • LiquidModule

      public LiquidModule()
  • Method Details

    • updateFlow

      public void updateFlow()
    • stopFlow

      public void stopFlow()
    • getFlowRate

      public float getFlowRate(Liquid liquid)
      Returns:
      current liquid's flow rate in u/s; any value < 0 means 'not ready'.
    • hasFlowLiquid

      public boolean hasFlowLiquid(Liquid liquid)
    • current

      public Liquid current()
      Last received or loaded liquid. Only valid for liquid modules with 1 type of liquid.
    • reset

      public void reset(Liquid liquid, float amount)
    • set

      public void set(Liquid liquid, float amount)
    • currentAmount

      public float currentAmount()
    • get

      public float get(Liquid liquid)
    • clear

      public void clear()
    • add

      public void add(Liquid liquid, float amount)
    • handleFlow

      public void handleFlow(Liquid liquid, float amount)
    • remove

      public void remove(Liquid liquid, float amount)
    • each

      public void each(LiquidModule.LiquidConsumer cons)
    • sum

      public float sum(LiquidModule.LiquidCalculator calc)
    • write

      public void write(Writes write)
      Specified by:
      write in class BlockModule
    • read

      public void read(Reads read, boolean legacy)
      Overrides:
      read in class BlockModule