Difference between revisions of "Turtle.drop"
From ComputerCraft Wiki
(Minecraft 1.5 changed how furnaces work, so some clarification on changes) |
(Adding "see also" for the oldly created articles and making the description clearer.) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=turtle.drop | |name=turtle.drop | ||
− | |args=[<nowiki></nowiki>{{type| | + | |args=[<nowiki></nowiki>{{type|number}} count] |
|returns={{type|boolean}} true if an item was dropped; false otherwise. | |returns={{type|boolean}} true if an item was dropped; false otherwise. | ||
|api=turtle | |api=turtle | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Drops all items | + | |desc=Drops all items off the selected slot, or, if ''count'' is specified, drops that many items. The items are dropped on the ground by default, but if there is an inventory in that block, the items go to that inventory instead. Then the items will be placed in the first available slot of the inventory, starting at the top left, moving right and then down. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
Line 21: | Line 13: | ||
}} | }} | ||
}} | }} | ||
+ | |||
+ | ==See also== | ||
+ | *[[turtle.dropDown]] | ||
+ | *[[turtle.dropUp]] | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Latest revision as of 20:56, 21 April 2015
Function turtle.drop | |
Drops all items off the selected slot, or, if count is specified, drops that many items. The items are dropped on the ground by default, but if there is an inventory in that block, the items go to that inventory instead. Then the items will be placed in the first available slot of the inventory, starting at the top left, moving right and then down. | |
Syntax | turtle.drop([number count]) |
Returns | boolean true if an item was dropped; false otherwise. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Drops all items in the first available slot. | |
Code |
turtle.drop() |