public interface Item
| Modifier and Type | Method and Description |
|---|---|
ManagedEnvironment |
createEnvironment(net.minecraft.item.ItemStack stack,
Container container)
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.
|
Slot |
slot(net.minecraft.item.ItemStack stack)
Deprecated.
This will be replaced in 1.4, where slot types will then be
referred to by name (using Strings) instead, to make this system more
flexible (not requiring an API change for each new slot type, e.g.).
|
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, Container container)
stack - the item stack for which to get the environment.container - the container the environment will be managed by.@Deprecated Slot 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.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.