Interface IBloodChestRepairActionRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
BloodChestRepairActionRegistry
public interface IBloodChestRepairActionRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Registry for
IBloodChestRepairAction instances.-
Method Summary
Modifier and TypeMethodDescriptionintcanRepair(net.minecraft.world.item.ItemStack itemStack, int tick) Check if a given item can be repaired.booleanisItemValidForSlot(net.minecraft.world.item.ItemStack itemStack) Check if the given item can be inserted into the Blood Chest.voidregister(IBloodChestRepairAction repairAction) Register a new repair action.org.apache.commons.lang3.tuple.Pair<Float,net.minecraft.world.item.ItemStack> repair(net.minecraft.world.item.ItemStack itemStack, Random random, int actionID, boolean doAction, boolean isBulk) The repair logic for a given item for one tick.
-
Method Details
-
register
Register a new repair action.- Parameters:
repairAction- The repair action instance.
-
isItemValidForSlot
boolean isItemValidForSlot(net.minecraft.world.item.ItemStack itemStack) Check if the given item can be inserted into the Blood Chest.- Parameters:
itemStack- TheItemStackthat could be inserted.- Returns:
- If the given item can be inserted into the given slot of the Blood Chest.
-
canRepair
int canRepair(net.minecraft.world.item.ItemStack itemStack, int tick) Check if a given item can be repaired.- Parameters:
itemStack- The item that could be repaired.tick- The current tick inside the Blood Chest.- Returns:
- -1 if none of the actions apply, otherwise the actionID that applies.
-
repair
org.apache.commons.lang3.tuple.Pair<Float,net.minecraft.world.item.ItemStack> repair(net.minecraft.world.item.ItemStack itemStack, Random random, int actionID, boolean doAction, boolean isBulk) The repair logic for a given item for one tick.- Parameters:
itemStack- The item to repair.random- A random instance.actionID- the ID of the action to call.doAction- If the actual repair action should be performed, otherwise this is just a simulation.isBulk- If the repairing container repairs things in bulk.- Returns:
- Pair of blood usage multiplier and new itemstack.
-