get Item Count
Gets the number of items in the specified slot.
agent.getItemCount(1);
Parameters
- slot: the slot index for which to count items, from 1 to 27, eg: 1
Returns
- a value that is the number of items in the slot.
Example
Displays how many blocks the agent has in its second slot in the game chat.
player.say("" + agent.getItemCount(2));