Difference between revisions of "Turtle.suck"

From ComputerCraft Wiki
Jump to: navigation, search
(Reworded to remove 'turtle' versus 'chest'/'ground' ambiguity.)
(Minecraft 1.5 changed how furnaces work, so some clarification on changes)
Line 12: Line 12:
 
* If the currently selected turtle slot is filled up before all of the items are picked up, the remaining picked up items are put in the next available turtle slot.  
 
* If the currently selected turtle slot is filled up before all of the items are picked up, the remaining picked up items are put in the next available turtle slot.  
 
* If the currently selected turtle slot is 16 and the next slot is required, it will loop around and try turtle slot 1, and so on.
 
* If the currently selected turtle slot is 16 and the next slot is required, it will loop around and try turtle slot 1, and so on.
 +
* As of Minecraft 1.5/ComputerCraft 1.51, turtle.suckUp can be used to pick items out of the output slot of a furnace.
 
|examples=
 
|examples=
 
{{Example
 
{{Example

Revision as of 04:45, 11 July 2013


Grid Redstone.png  Function turtle.suck
Moves one or more items from either the ground in front of the turtle, or, from an inventory-enabled block (such as a chest) in front of the turtle.
  • If an item is in the square directly in front of the turtle, it picks up one of those items.
  • If a chest is in the square directly in front of the turtle, it picks up the items from the first non-empty chest slot, moving from top left to bottom right. The items are moved into the currently selected turtle slot if there is room.
  • If the currently selected turtle slot is filled up before all of the items are picked up, the remaining picked up items are put in the next available turtle slot.
  • If the currently selected turtle slot is 16 and the next slot is required, it will loop around and try turtle slot 1, and so on.
  • As of Minecraft 1.5/ComputerCraft 1.51, turtle.suckUp can be used to pick items out of the output slot of a furnace.
Syntax turtle.suck()
Returns boolean true if at least one item was moved into the turtle's inventory; false otherwise.
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Picks up some items.
Code
turtle.suck()