turtle.getItemCount

From ComputerCraft
Jump to navigation Jump to search

turtle.getItemCount
Function
Syntax
turtle.getItemCount()
Returns number count
API turtle
Source CC:Tweaked (source)

Get the number of items in a slot. It will use the current selected slot, if slot is not specified.

ExampleExampleGet the item count
Get the item count of the currently selected slot and print it.
Code
print(turtle.getItemCount())
Output
5