<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sand</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sand"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/Sand"/>
		<updated>2026-07-11T11:47:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&amp;diff=3328</id>
		<title>Talk:Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&amp;diff=3328"/>
				<updated>2012-10-07T04:52:49Z</updated>
		
		<summary type="html">&lt;p&gt;Sand: /* Detecting Fluids */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is there a way to detect a block's type? Preferably without picking it up; it would be nice to be able to write a function to check the block about to be broken against a list of &amp;quot;Do not break&amp;quot; blocks, such as Industrial craft's MFSU, which loses all held power when picked up. &lt;br /&gt;
&lt;br /&gt;
Also I request a way to set server-wide list of blocks immune to the turtle.dig() functions, such as say personal safes (Industrial Craft again).&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:50.131.199.48|50.131.199.48]] ([[User talk:50.131.199.48|talk]] • [[Special:Contributions/50.131.199.48|contribs]]) &amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;!-- Template:Unsigned --&amp;gt;&lt;br /&gt;
:As far as I know, there's no way to check the block type with the current API. Could be a feature in the future though, never know. {{User:Scarfacial/Signature|22:17 - 8 March 2012}}&lt;br /&gt;
::Would be interesting to see if one could write a function for that. {{User:Banane9/Signature|22:43 - 9 March 2012}}&lt;br /&gt;
:::i would see it too please. But i dont think that you can make that in a function&lt;br /&gt;
:::[[User:Dude|Dude]] 22:13, 9 March 2012 (UTC)&lt;br /&gt;
::::You can determine if the block matches the one in its inventory using turtle.select(slot) and then turtle.compare() or turtle.compareUp() or turtle.compareDown()&lt;br /&gt;
&lt;br /&gt;
== turtle collect ? ==&lt;br /&gt;
&lt;br /&gt;
i understand that the turtle can drop items from its inventory with turtle.drop( [amount] )&lt;br /&gt;
but is there a way to make the turtle collect items (like a player would do) around and store it in inventory ?&lt;br /&gt;
(from what i understand right now the turtle collects items taken from a digged block ?&lt;br /&gt;
thanks&lt;br /&gt;
:Nope they don't collect items that are already dropped --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)&lt;br /&gt;
:Now in 1.4 there is the [[turtle.suck|turtle.suck()]] function --[[User:Dadmob18|Dadmob18]] 12:22, 27 Sep 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== treefarm ==&lt;br /&gt;
&lt;br /&gt;
i have write a big programm (120 lines) that destory the tree full (with the leaves) when the tree is grown. so the turtle can plant an new tree an beginn at the start. My problem: the programm dont work and i cant find the faults... &amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Dude|Dude]] ([[User talk:Dude|talk]] • [[Special:Contributions/Dude|contribs]]) &amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;!-- Template:Unsigned --&amp;gt;&lt;br /&gt;
:Maybe because the leaves of the tree decay and that f*cks up the code? We cant help you without seeing your code ;) --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)&lt;br /&gt;
::On a similar note, I have written a disassembler script which (mostly) disassembles arbitrary things from the top down, but it really gets messed up by doors and other turtles and pistons, it is basically because interacting with blocks only works well if the blocks don't change while you are trying to deal with them/use them for navigating.&lt;br /&gt;
&lt;br /&gt;
== Turtle API to detect block/item ID? ==&lt;br /&gt;
&lt;br /&gt;
I have a suggestion, what if you have a function like: turtle.getBlockID() which would return ID, damage value, or simmilar&lt;br /&gt;
:Dan doesn't want Block IDs as they'd break the 4th wall. --[[User:Pinkishu|Pinkishu]] 13:12, 16 August 2012 (CEST)&lt;br /&gt;
&lt;br /&gt;
== More than 1 mover per turtle.up() ==&lt;br /&gt;
&lt;br /&gt;
is there a way to make a turtle go up more than once for each turtle.up() ? like maybe turtle.up(36) (i tried that but it said attempt to call nil)&lt;br /&gt;
&lt;br /&gt;
You could use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
turtleold = turtle.up&lt;br /&gt;
function turtlenew(times)&lt;br /&gt;
for i=1,times do&lt;br /&gt;
turtle.up()&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
turtle.up = turtlenew&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then just use turtle.up(5) and stuff, because it overrides the function.&lt;br /&gt;
&lt;br /&gt;
Can you tell the turtle to drop/not pick up unwanted items like dirt, cobble, sand and gravel?&lt;br /&gt;
&lt;br /&gt;
== Detecting Fluids ==&lt;br /&gt;
&lt;br /&gt;
It seems as though water or lava aren't considered as blocks, and I was wondering if it would be possible to make it possible to detect a fluid but not directly, something like a fluid temperature attachment, and&lt;br /&gt;
with that you could distinguish between water, lava and air and perhaps fire. As i said nothing too easy like a function that spits out a string like &amp;quot;water&amp;quot; or &amp;quot;lava&amp;quot; or &amp;quot;air&amp;quot;. Just something that allows the programmer to make functions that can come to those conclusions.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sand|Sand]] 00:46, 7 October 2012 (EDT)&lt;br /&gt;
&lt;br /&gt;
I have also just realized that if there is going to be a way to detect fluids, there will need to be a way to pick them up/ place them as well.&lt;/div&gt;</summary>
		<author><name>Sand</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&amp;diff=3327</id>
		<title>Talk:Turtle (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&amp;diff=3327"/>
				<updated>2012-10-07T04:46:50Z</updated>
		
		<summary type="html">&lt;p&gt;Sand: /* Detecting Fluids */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is there a way to detect a block's type? Preferably without picking it up; it would be nice to be able to write a function to check the block about to be broken against a list of &amp;quot;Do not break&amp;quot; blocks, such as Industrial craft's MFSU, which loses all held power when picked up. &lt;br /&gt;
&lt;br /&gt;
Also I request a way to set server-wide list of blocks immune to the turtle.dig() functions, such as say personal safes (Industrial Craft again).&amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:50.131.199.48|50.131.199.48]] ([[User talk:50.131.199.48|talk]] • [[Special:Contributions/50.131.199.48|contribs]]) &amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;!-- Template:Unsigned --&amp;gt;&lt;br /&gt;
:As far as I know, there's no way to check the block type with the current API. Could be a feature in the future though, never know. {{User:Scarfacial/Signature|22:17 - 8 March 2012}}&lt;br /&gt;
::Would be interesting to see if one could write a function for that. {{User:Banane9/Signature|22:43 - 9 March 2012}}&lt;br /&gt;
:::i would see it too please. But i dont think that you can make that in a function&lt;br /&gt;
:::[[User:Dude|Dude]] 22:13, 9 March 2012 (UTC)&lt;br /&gt;
::::You can determine if the block matches the one in its inventory using turtle.select(slot) and then turtle.compare() or turtle.compareUp() or turtle.compareDown()&lt;br /&gt;
&lt;br /&gt;
== turtle collect ? ==&lt;br /&gt;
&lt;br /&gt;
i understand that the turtle can drop items from its inventory with turtle.drop( [amount] )&lt;br /&gt;
but is there a way to make the turtle collect items (like a player would do) around and store it in inventory ?&lt;br /&gt;
(from what i understand right now the turtle collects items taken from a digged block ?&lt;br /&gt;
thanks&lt;br /&gt;
:Nope they don't collect items that are already dropped --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)&lt;br /&gt;
:Now in 1.4 there is the [[turtle.suck|turtle.suck()]] function --[[User:Dadmob18|Dadmob18]] 12:22, 27 Sep 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== treefarm ==&lt;br /&gt;
&lt;br /&gt;
i have write a big programm (120 lines) that destory the tree full (with the leaves) when the tree is grown. so the turtle can plant an new tree an beginn at the start. My problem: the programm dont work and i cant find the faults... &amp;lt;small&amp;gt;&amp;lt;span class=&amp;quot;autosigned&amp;quot;&amp;gt;— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Dude|Dude]] ([[User talk:Dude|talk]] • [[Special:Contributions/Dude|contribs]]) &amp;lt;/span&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;!-- Template:Unsigned --&amp;gt;&lt;br /&gt;
:Maybe because the leaves of the tree decay and that f*cks up the code? We cant help you without seeing your code ;) --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)&lt;br /&gt;
::On a similar note, I have written a disassembler script which (mostly) disassembles arbitrary things from the top down, but it really gets messed up by doors and other turtles and pistons, it is basically because interacting with blocks only works well if the blocks don't change while you are trying to deal with them/use them for navigating.&lt;br /&gt;
&lt;br /&gt;
== Turtle API to detect block/item ID? ==&lt;br /&gt;
&lt;br /&gt;
I have a suggestion, what if you have a function like: turtle.getBlockID() which would return ID, damage value, or simmilar&lt;br /&gt;
:Dan doesn't want Block IDs as they'd break the 4th wall. --[[User:Pinkishu|Pinkishu]] 13:12, 16 August 2012 (CEST)&lt;br /&gt;
&lt;br /&gt;
== More than 1 mover per turtle.up() ==&lt;br /&gt;
&lt;br /&gt;
is there a way to make a turtle go up more than once for each turtle.up() ? like maybe turtle.up(36) (i tried that but it said attempt to call nil)&lt;br /&gt;
&lt;br /&gt;
You could use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
turtleold = turtle.up&lt;br /&gt;
function turtlenew(times)&lt;br /&gt;
for i=1,times do&lt;br /&gt;
turtle.up()&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
turtle.up = turtlenew&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then just use turtle.up(5) and stuff, because it overrides the function.&lt;br /&gt;
&lt;br /&gt;
Can you tell the turtle to drop/not pick up unwanted items like dirt, cobble, sand and gravel?&lt;br /&gt;
&lt;br /&gt;
== Detecting Fluids ==&lt;br /&gt;
&lt;br /&gt;
It seems as though water or lava aren't considered as blocks, and I was wondering if it would be possible to make it possible to detect a fluid but not directly, something like a fluid temperature attachment, and&lt;br /&gt;
with that you could distinguish between water, lava and air and perhaps fire. As i said nothing too easy like a function that spits out a string like &amp;quot;water&amp;quot; or &amp;quot;lava&amp;quot; or &amp;quot;air&amp;quot;. Just something that allows the programmer to make functions that can come to those conclusions.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sand|Sand]] 00:46, 7 October 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>Sand</name></author>	</entry>

	</feed>