Class PurifierActionRegistry

java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.purifier.PurifierActionRegistry
All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry, IPurifierActionRegistry

public class PurifierActionRegistry extends Object implements IPurifierActionRegistry
  • Constructor Details

    • PurifierActionRegistry

      public PurifierActionRegistry()
  • Method Details

    • register

      public void register(IPurifierAction purifyAction)
      Description copied from interface: IPurifierActionRegistry
      Register a new repair action.
      Specified by:
      register in interface IPurifierActionRegistry
      Parameters:
      purifyAction - The repair action instance.
    • isItemValidForMainSlot

      public boolean isItemValidForMainSlot(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IPurifierActionRegistry
      Check if the given item can be inserted into the Purifier to purify.
      Specified by:
      isItemValidForMainSlot in interface IPurifierActionRegistry
      Parameters:
      itemStack - The ItemStack that could be inserted.
      Returns:
      If the given item can be inserted into the Purifier.
    • isItemValidForAdditionalSlot

      public boolean isItemValidForAdditionalSlot(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IPurifierActionRegistry
      Check if the given item can be inserted into the additional slot of the Purifier.
      Specified by:
      isItemValidForAdditionalSlot in interface IPurifierActionRegistry
      Parameters:
      itemStack - The ItemStack that could be inserted.
      Returns:
      If the given item can be inserted into the additional slot of the Purifier.
    • canWork

      public int canWork(BlockEntityPurifier tile)
      Description copied from interface: IPurifierActionRegistry
      Check if he Purifier can work in the current state.
      Specified by:
      canWork in interface IPurifierActionRegistry
      Parameters:
      tile - The Purifier tile.
      Returns:
      The action id for the workable action.
    • work

      public boolean work(int actionId, BlockEntityPurifier tile)
      Description copied from interface: IPurifierActionRegistry
      Execute a valid Purifier action for the given Purifier tile.
      Specified by:
      work in interface IPurifierActionRegistry
      Parameters:
      actionId - -1 if none of the actions apply, otherwise the actionId that applies.
      tile - The Purifier tile.
      Returns:
      If work is done