Package noppes.npcs.api
Interface IContainer
-
public interface IContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcount(IItemStack itemStack, boolean ignoreDamage, boolean ignoreNBT)voiddetectAndSendChanges()Sends changes to be reflected on the player's client.IItemStack[]getItems()net.minecraft.inventory.ContainergetMCContainer()net.minecraft.inventory.IInventorygetMCInventory()intgetSize()IItemStackgetSlot(int slot)booleanisCustomGUI()booleanisPlayerNotUsingContainer(IPlayer player)voidsetSlot(int slot, IItemStack item)
-
-
-
Method Detail
-
getSize
int getSize()
-
getSlot
IItemStack getSlot(int slot)
-
setSlot
void setSlot(int slot, IItemStack item)- Parameters:
slot- The slot to be replaceditem- The item replacing the previous item in that slot, as an IItemStack object
-
getMCInventory
net.minecraft.inventory.IInventory getMCInventory()
- Returns:
- An obfuscated MC inventory object.
-
getMCContainer
net.minecraft.inventory.Container getMCContainer()
- Returns:
- An obfuscated MC container object.
-
count
int count(IItemStack itemStack, boolean ignoreDamage, boolean ignoreNBT)
- Parameters:
itemStack- The item stack to be searched in the containerignoreDamage- Whether damage should be ignored when searchingignoreNBT- Whether NBT values should be ignored when searching- Returns:
- The amount of the item stack found, based on the flags given above.
-
getItems
IItemStack[] getItems()
- Returns:
- A list of all item stacks in the container as a list of IItemStack objects.
-
isCustomGUI
boolean isCustomGUI()
- Returns:
- True if this container belongs to a Custom GUI.
-
detectAndSendChanges
void detectAndSendChanges()
Sends changes to be reflected on the player's client.
-
isPlayerNotUsingContainer
boolean isPlayerNotUsingContainer(IPlayer player)
-
-