Class DisenchantPurifyAction
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.purifier.DisenchantPurifyAction
- All Implemented Interfaces:
IPurifierAction
Purifier action to remove enchantments from tools.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Wrapper<net.minecraft.world.item.Item>The allowed book instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanWork(BlockEntityPurifier tile) Check if he Purifier can work in the current state.protected booleanisAllowed(net.minecraft.world.item.ItemStack itemStack) booleanisItemValidForAdditionalSlot(net.minecraft.world.item.ItemStack itemStack) Check if the given item can be inserted into the additional slot of the Purifier.booleanisItemValidForMainSlot(net.minecraft.world.item.ItemStack itemStack) Check if the given item can be inserted into the Purifier to purify.booleanwork(BlockEntityPurifier tile) Execute a valid Purifier action for the given Purifier tile.
-
Field Details
-
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:IPurifierActionCheck if the given item can be inserted into the Purifier to purify.- Specified by:
isItemValidForMainSlotin interfaceIPurifierAction- Parameters:
itemStack- TheItemStackthat 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:IPurifierActionCheck if the given item can be inserted into the additional slot of the Purifier.- Specified by:
isItemValidForAdditionalSlotin interfaceIPurifierAction- Parameters:
itemStack- TheItemStackthat could be inserted.- Returns:
- If the given item can be inserted into the additional slot of the Purifier.
-
canWork
Description copied from interface:IPurifierActionCheck if he Purifier can work in the current state.- Specified by:
canWorkin interfaceIPurifierAction- Parameters:
tile- The Purifier tile.- Returns:
- If the Purifier can work in the current state.
-
work
Description copied from interface:IPurifierActionExecute a valid Purifier action for the given Purifier tile.- Specified by:
workin interfaceIPurifierAction- Parameters:
tile- The Purifier tile.- Returns:
- If work is done
-