Interface ICitizenInventoryHandler
- All Known Implementing Classes:
CitizenInventoryHandler
public interface ICitizenInventoryHandler
-
Method Summary
Modifier and TypeMethodDescriptionintfindFirstSlotInInventoryWith(net.minecraft.world.item.Item targetItem) Returns the first slot in the inventory with a specific item.intfindFirstSlotInInventoryWith(net.minecraft.world.level.block.Block block) Returns the first slot in the inventory with a specific block.intgetItemCountInInventory(net.minecraft.world.item.Item targetItem) Returns the amount of a certain item in the inventory.intgetItemCountInInventory(net.minecraft.world.level.block.Block block) Returns the amount of a certain block in the inventory.booleanhasItemInInventory(net.minecraft.world.item.Item item) Checks if citizen has a certain item in the inventory.booleanhasItemInInventory(net.minecraft.world.level.block.Block block) Checks if citizen has a certain block in the inventory.booleanChecks whether or not the inventory is full
-
Method Details
-
findFirstSlotInInventoryWith
int findFirstSlotInInventoryWith(net.minecraft.world.item.Item targetItem) Returns the first slot in the inventory with a specific item.- Parameters:
targetItem- the item.- Returns:
- the slot.
-
findFirstSlotInInventoryWith
int findFirstSlotInInventoryWith(net.minecraft.world.level.block.Block block) Returns the first slot in the inventory with a specific block.- Parameters:
block- the block.- Returns:
- the slot.
-
getItemCountInInventory
int getItemCountInInventory(net.minecraft.world.level.block.Block block) Returns the amount of a certain block in the inventory.- Parameters:
block- the block.- Returns:
- the quantity.
-
getItemCountInInventory
int getItemCountInInventory(net.minecraft.world.item.Item targetItem) Returns the amount of a certain item in the inventory.- Parameters:
targetItem- the block.- Returns:
- the quantity.
-
hasItemInInventory
boolean hasItemInInventory(net.minecraft.world.level.block.Block block) Checks if citizen has a certain block in the inventory.- Parameters:
block- the block.- Returns:
- true if so.
-
hasItemInInventory
boolean hasItemInInventory(net.minecraft.world.item.Item item) Checks if citizen has a certain item in the inventory.- Parameters:
item- the item.- Returns:
- true if so.
-
isInventoryFull
boolean isInventoryFull()Checks whether or not the inventory is full- Returns:
- true if the inventory is full
-