Class PurifierActionRegistry
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.purifier.PurifierActionRegistry
- All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry,IPurifierActionRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcanWork(BlockEntityPurifier tile) Check if he Purifier can work in the current state.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.voidregister(IPurifierAction purifyAction) Register a new repair action.booleanwork(int actionId, BlockEntityPurifier tile) Execute a valid Purifier action for the given Purifier tile.
-
Constructor Details
-
PurifierActionRegistry
public PurifierActionRegistry()
-
-
Method Details
-
register
Description copied from interface:IPurifierActionRegistryRegister a new repair action.- Specified by:
registerin interfaceIPurifierActionRegistry- Parameters:
purifyAction- The repair action instance.
-
isItemValidForMainSlot
public boolean isItemValidForMainSlot(net.minecraft.world.item.ItemStack itemStack) Description copied from interface:IPurifierActionRegistryCheck if the given item can be inserted into the Purifier to purify.- Specified by:
isItemValidForMainSlotin interfaceIPurifierActionRegistry- 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:IPurifierActionRegistryCheck if the given item can be inserted into the additional slot of the Purifier.- Specified by:
isItemValidForAdditionalSlotin interfaceIPurifierActionRegistry- 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:IPurifierActionRegistryCheck if he Purifier can work in the current state.- Specified by:
canWorkin interfaceIPurifierActionRegistry- Parameters:
tile- The Purifier tile.- Returns:
- The action id for the workable action.
-
work
Description copied from interface:IPurifierActionRegistryExecute a valid Purifier action for the given Purifier tile.- Specified by:
workin interfaceIPurifierActionRegistry- Parameters:
actionId- -1 if none of the actions apply, otherwise the actionId that applies.tile- The Purifier tile.- Returns:
- If work is done
-