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,
net.minecraft.item.EnumDyeColor color,
java.util.concurrent.Callable<FileSystem> factory,
boolean doRecipeCycling)
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,
net.minecraft.item.EnumDyeColor 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.factory - the callable to call for creating file system instances.doRecipeCycling - whether to include this floppy disk in floppy disk cycling.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.