public interface InventoryProvider
getInventory(net.minecraft.item.ItemStack, net.minecraft.entity.player.EntityPlayer)
should save changes
back to the item stack when IInventory.markDirty()
is called.
Return null if the specified stack is not supported.Modifier and Type | Method and Description |
---|---|
net.minecraft.inventory.IInventory |
getInventory(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer player)
Get an inventory implementation that allows interfacing with the
item inventory represented by the specified item stack.
|
boolean |
worksWith(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.EntityPlayer player)
Checks whether this provider works for the specified item stack.
|
boolean worksWith(net.minecraft.item.ItemStack stack, net.minecraft.entity.player.EntityPlayer player)
stack
- the item stack to check for.player
- the player holding the item, may be null.net.minecraft.inventory.IInventory getInventory(net.minecraft.item.ItemStack stack, net.minecraft.entity.player.EntityPlayer player)
stack
- the item stack to get the inventory for.player
- the player holding the item, may be null.