public final class Items
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static ItemInfo |
get(net.minecraft.item.ItemStack stack)
Get a descriptor object for the block or item represented by the
specified item stack.
|
static ItemInfo |
get(java.lang.String name)
Get a descriptor object for the block or item with the specified name.
|
static net.minecraft.item.ItemStack |
registerEEPROM(java.lang.String name,
byte[] code,
byte[] data,
boolean readonly)
Register a single custom EEPROM.
|
static net.minecraft.item.ItemStack |
registerFloppy(java.lang.String name,
int color,
java.util.concurrent.Callable<FileSystem> factory)
Register a single loot floppy disk.
|
public static ItemInfo get(java.lang.String name)
API.items may not have been initialized
at that time. Only start calling these methods in the init phase or later.name - the name of the item to get the descriptor for.public static ItemInfo get(net.minecraft.item.ItemStack stack)
stack - the stack to get the descriptor for.public static net.minecraft.item.ItemStack registerFloppy(java.lang.String name,
int color,
java.util.concurrent.Callable<FileSystem> factory)
FileSystem.fromClass(java.lang.Class<?>, java.lang.String, java.lang.String) in your callable.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.public static 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.