public interface Item
Modifier and Type | Method and Description |
---|---|
ManagedEnvironment |
createEnvironment(net.minecraft.item.ItemStack stack,
EnvironmentHost host)
Create a new managed environment interfacing the specified item.
|
net.minecraft.nbt.NBTTagCompound |
dataTag(net.minecraft.item.ItemStack stack)
Get the tag compound based on the item stack to use for persisting the
environment associated with the specified item stack.
|
java.lang.String |
slot(net.minecraft.item.ItemStack stack)
The slot type of the specified item this driver supports.
|
int |
tier(net.minecraft.item.ItemStack stack)
The tier of the specified item this driver supports.
|
boolean |
worksWith(net.minecraft.item.ItemStack stack)
Used to determine the item types this driver handles.
|
boolean worksWith(net.minecraft.item.ItemStack stack)
stack
- the item to check.ManagedEnvironment createEnvironment(net.minecraft.item.ItemStack stack, EnvironmentHost host)
stack
- the item stack for which to get the environment.host
- the host the environment will be managed by.java.lang.String slot(net.minecraft.item.ItemStack stack)
worksWith(net.minecraft.item.ItemStack)
with the same stack returned true.stack
- the item stack to get the slot type for.Slot
int tier(net.minecraft.item.ItemStack stack)
worksWith(net.minecraft.item.ItemStack)
with the same stack returned true.
Important: tiers are zero-indexed.stack
- the item stack to get the tier for.net.minecraft.nbt.NBTTagCompound dataTag(net.minecraft.item.ItemStack stack)
stack
- the item to get the child tag from.