public class BloodChestRepairActionRegistry extends java.lang.Object implements IBloodChestRepairActionRegistry
IBloodChestRepairAction instances.| Modifier and Type | Class and Description |
|---|---|
static class |
BloodChestRepairActionRegistry.ItemBlacklistChanged
The changed callback for the item blacklist.
|
| Constructor and Description |
|---|
BloodChestRepairActionRegistry()
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
canRepair(net.minecraft.item.ItemStack itemStack,
int tick)
Check if a given item can be repaired.
|
boolean |
isItemValidForSlot(net.minecraft.item.ItemStack itemStack)
Check if the given item can be inserted into the Blood Chest.
|
protected boolean |
isNotBlacklisted(net.minecraft.item.ItemStack itemStack) |
void |
register(IBloodChestRepairAction repairAction)
Register a new repair action.
|
void |
repair(net.minecraft.item.ItemStack itemStack,
java.util.Random random,
int actionID)
The repair logic for a given item for one tick.
|
void |
setBlacklist(java.lang.String[] blacklist)
Set the blacklist of item names.
|
public BloodChestRepairActionRegistry()
public void register(IBloodChestRepairAction repairAction)
IBloodChestRepairActionRegistryregister in interface IBloodChestRepairActionRegistryrepairAction - The repair action instance.public boolean isItemValidForSlot(net.minecraft.item.ItemStack itemStack)
IBloodChestRepairActionRegistryisItemValidForSlot in interface IBloodChestRepairActionRegistryitemStack - The ItemStack that could be inserted.public int canRepair(net.minecraft.item.ItemStack itemStack,
int tick)
IBloodChestRepairActionRegistrycanRepair in interface IBloodChestRepairActionRegistryitemStack - The item that could be repaired.tick - The current tick inside the Blood Chest.public void repair(net.minecraft.item.ItemStack itemStack,
java.util.Random random,
int actionID)
IBloodChestRepairActionRegistryrepair in interface IBloodChestRepairActionRegistryitemStack - The item to repair.random - A random instance.actionID - the ID of the action to call.protected boolean isNotBlacklisted(net.minecraft.item.ItemStack itemStack)
public void setBlacklist(java.lang.String[] blacklist)
IBloodChestRepairActionRegistrysetBlacklist in interface IBloodChestRepairActionRegistryblacklist - The names of items that are not allowed into the blood chest.