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.util.ResourceLocation loc,
net.minecraft.item.DyeColor 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.util.ResourceLocation loc, net.minecraft.item.DyeColor color, java.util.concurrent.Callable<FileSystem> factory, boolean doRecipeCycling)
FileSystem.fromResource(net.minecraft.util.ResourceLocation)
in your callable.
name
- the label and identifier to use for the loot disk.loc
- the location where the disk's contents are stored.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.