Class StaticChemicalHandler

java.lang.Object
ml.pluto7073.chemicals.handlers.ChemicalHandler
ml.pluto7073.chemicals.handlers.StaticChemicalHandler

public abstract class StaticChemicalHandler extends ChemicalHandler
An implementation of ConsumableChemicalHandler for a chemical that stays in the player and resets once a maximum amount is reached, performing an action on the player
  • Field Details

    • maxAmount

      protected final float maxAmount
  • Constructor Details

    • StaticChemicalHandler

      public StaticChemicalHandler(float maxAmount)
      Creates a new StaticChemicalHandler instance
      Parameters:
      maxAmount - The maximum amount of this chemical, or 0 if no limit is desired
  • Method Details

    • onMaxAmountReached

      public abstract void onMaxAmountReached(net.minecraft.world.entity.player.Player player)
    • doTick

      public void doTick(net.minecraft.world.entity.player.Player player)
      Description copied from class: ChemicalHandler
      Updates the current amount of the chemical in the specified player
      Specified by:
      doTick in class ChemicalHandler
      Parameters:
      player - The player to update