public interface ItemAPI
Modifier and Type | Method and Description |
---|---|
ItemInfo |
get(net.minecraft.item.ItemStack stack)
Get a descriptor object for the block or item represented by the
specified item stack.
|
ItemInfo |
get(java.lang.String name)
Get a descriptor object for the block or item with the specified name.
|
net.minecraft.item.ItemStack |
registerEEPROM(java.lang.String name,
byte[] code,
byte[] data,
boolean readonly)
Register a single custom EEPROM.
|
net.minecraft.item.ItemStack |
registerFloppy(java.lang.String name,
int color,
java.util.concurrent.Callable<FileSystem> factory)
Deprecated.
use
registerFloppy(String, int, Callable, boolean) instead. |
net.minecraft.item.ItemStack |
registerFloppy(java.lang.String name,
int color,
java.util.concurrent.Callable<FileSystem> factory,
boolean doRecipeCycling)
Register a single loot floppy disk.
|
ItemInfo get(java.lang.String name)
name
- the name of the item to get the descriptor for.ItemInfo get(net.minecraft.item.ItemStack stack)
stack
- the stack to get the descriptor for.@Deprecated net.minecraft.item.ItemStack registerFloppy(java.lang.String name, int color, java.util.concurrent.Callable<FileSystem> factory)
registerFloppy(String, int, Callable, boolean)
instead.FileSystem.fromClass(java.lang.Class<?>, java.lang.String, java.lang.String)
in your callable.
Call this in the init phase or later, not in pre-init.name
- the label and identifier to use for the loot disk.color
- the color of the disk, as a Minecraft color (so 0-15,
with 0 being black, 1 red and so on).factory
- the callable to call for creating file system instances.net.minecraft.item.ItemStack registerFloppy(java.lang.String name, int color, java.util.concurrent.Callable<FileSystem> factory, boolean doRecipeCycling)
FileSystem.fromClass(java.lang.Class<?>, java.lang.String, java.lang.String)
in your callable.
If doRecipeCycling is true, the floppy disk will be
included in the floppy disk recipe cycle if that is enabled.
Call this in the init phase or later, not in pre-init.name
- the label and identifier to use for the loot disk.color
- the color of the disk, as a Minecraft color (so 0-15,
with 0 being black, 1 red and so on).factory
- the callable to call for creating file system instances.doRecipeCycling
- whether to include this floppy disk in floppy disk cycling.net.minecraft.item.ItemStack registerEEPROM(java.lang.String name, byte[] code, byte[] data, boolean readonly)
name
- the label of the EEPROM.code
- the code section of the EEPROM.data
- the data section of the EEPROM.readonly
- whether the code section is read-only.