Class DisenchantPurifyAction

java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.purifier.DisenchantPurifyAction
All Implemented Interfaces:
IPurifierAction

public class DisenchantPurifyAction extends Object implements IPurifierAction
Purifier action to remove enchantments from tools.
  • Field Details

    • ALLOWED_BOOK

      public static final Wrapper<net.minecraft.world.item.Item> ALLOWED_BOOK
      The allowed book instance.
  • Constructor Details

    • DisenchantPurifyAction

      public DisenchantPurifyAction()
  • Method Details

    • isAllowed

      protected boolean isAllowed(net.minecraft.world.item.ItemStack itemStack)
    • isItemValidForMainSlot

      public boolean isItemValidForMainSlot(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IPurifierAction
      Check if the given item can be inserted into the Purifier to purify.
      Specified by:
      isItemValidForMainSlot in interface IPurifierAction
      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: IPurifierAction
      Check if the given item can be inserted into the additional slot of the Purifier.
      Specified by:
      isItemValidForAdditionalSlot in interface IPurifierAction
      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 boolean canWork(BlockEntityPurifier tile)
      Description copied from interface: IPurifierAction
      Check if he Purifier can work in the current state.
      Specified by:
      canWork in interface IPurifierAction
      Parameters:
      tile - The Purifier tile.
      Returns:
      If the Purifier can work in the current state.
    • work

      public boolean work(BlockEntityPurifier tile)
      Description copied from interface: IPurifierAction
      Execute a valid Purifier action for the given Purifier tile.
      Specified by:
      work in interface IPurifierAction
      Parameters:
      tile - The Purifier tile.
      Returns:
      If work is done