<?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=Negamartin</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=Negamartin"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/Negamartin"/>
		<updated>2026-07-11T21:21:49Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=IO_(API)&amp;diff=7447</id>
		<title>IO (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=IO_(API)&amp;diff=7447"/>
				<updated>2016-07-31T22:12:57Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: Undo revision 7446 by Negamartin (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IO is a reimplementation of the default Lua input / output API defined [http://www.lua.org/manual/5.1/manual.html#5.7 here], with some features trimmed. Most features should work. If you find a non-working feature, please list it here.&lt;br /&gt;
&lt;br /&gt;
List of non-working features from IO as of ComputerCraft 1.55:&lt;br /&gt;
&lt;br /&gt;
* io.open: Modes “a+”, “r+”, and “w+” are not supported.&lt;br /&gt;
* io.write: Does not accept multiple arguments.&lt;br /&gt;
* io.popen: Doesn’t exist.&lt;br /&gt;
* io.read: Only allows format string “*l”.&lt;br /&gt;
* io.tmpfile: Doesn’t exist.&lt;br /&gt;
* file:read: Doesn’t support format string “*n” or a character count.&lt;br /&gt;
* file:seek: Doesn’t exist.&lt;br /&gt;
* file:setvbuf: Doesn’t exist.&lt;br /&gt;
&lt;br /&gt;
All of the capabilities in this API are also available in the [[Fs (API)|Fs API]], along with some other functions not directly related to reading and writing individual files.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=IO_(API)&amp;diff=7446</id>
		<title>IO (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=IO_(API)&amp;diff=7446"/>
				<updated>2016-07-31T22:12:26Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: Added supported format &amp;quot;*a&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IO is a reimplementation of the default Lua input / output API defined [http://www.lua.org/manual/5.1/manual.html#5.7 here], with some features trimmed. Most features should work. If you find a non-working feature, please list it here.&lt;br /&gt;
&lt;br /&gt;
List of non-working features from IO as of ComputerCraft 1.55:&lt;br /&gt;
&lt;br /&gt;
* io.open: Modes “a+”, “r+”, and “w+” are not supported.&lt;br /&gt;
* io.write: Does not accept multiple arguments.&lt;br /&gt;
* io.popen: Doesn’t exist.&lt;br /&gt;
* io.read: Only allows format string “*l” and “*a”.&lt;br /&gt;
* io.tmpfile: Doesn’t exist.&lt;br /&gt;
* file:read: Doesn’t support format string “*n” or a character count.&lt;br /&gt;
* file:seek: Doesn’t exist.&lt;br /&gt;
* file:setvbuf: Doesn’t exist.&lt;br /&gt;
&lt;br /&gt;
All of the capabilities in this API are also available in the [[Fs (API)|Fs API]], along with some other functions not directly related to reading and writing individual files.&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User:Negamartin&amp;diff=7036</id>
		<title>User:Negamartin</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User:Negamartin&amp;diff=7036"/>
				<updated>2015-06-09T19:27:52Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: Created page with &amp;quot;You should really do something useful.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You should really do something useful.&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle.craft&amp;diff=7035</id>
		<title>Turtle.craft</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle.craft&amp;diff=7035"/>
				<updated>2015-06-09T19:23:54Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: Added turtle.craft(0) functionality (please add min. version if it exists)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=turtle.craft&lt;br /&gt;
|args={{type|number}} quantity ( if not supplied will craft as many as possible )&lt;br /&gt;
|returns={{type|boolean}} if an item was crafted&lt;br /&gt;
|api=turtle&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Requires a [[Turtle|Crafty Turtle]].&lt;br /&gt;
Crafts an item if items in the turtle's inventory matches a valid recipe. The items can be placed anywhere as long as they are oriented properly with respect to one another.&lt;br /&gt;
Can craft a maximum of one stack of items at a time; for example, if you put three stacks of 64 reed in a line and craft them, only 63 paper will be crafted, and three piles of 43 reed will remain in the turtle.&lt;br /&gt;
Will not craft if there are any items in the turtle's inventory that are not part of the recipe, including in the slots not used for crafting.&lt;br /&gt;
The produced items will appear in the selected slot, if that slot is free. If not, it will try the next available slot.&lt;br /&gt;
A parameter can also be supplied to specify the quantity of items to craft. If the quantity specified is 0, will return true if a valid recipe has been found in the turtle's inventory, and false otherwise.&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Crafts as many items as possible&lt;br /&gt;
|code=print( turtle.craft() )&lt;br /&gt;
|output=prints a {{type|boolean}} representing if any items were crafted&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Crafts 5 items&lt;br /&gt;
|code=print(turtle.craft(5))&lt;br /&gt;
|output=prints a {{type|boolean}} representing if any items were crafted&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Checks if the recipe is valid&lt;br /&gt;
|code=print(turtle.craft(0))&lt;br /&gt;
|output=prints a {{type|boolean}} representing if the recipe is valid&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Core_Functions]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Wireless_Modem&amp;diff=5285</id>
		<title>Wireless Modem</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Wireless_Modem&amp;diff=5285"/>
				<updated>2013-04-04T09:40:07Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: /* Modem as a Peripheral */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedsWork|The behaviour of Rednet has changed as of 1.5 - please consider updating this page with information. (Please don't add prerelease info!)}}&lt;br /&gt;
:''This page is for the Modem blocks. For the modem API, see [[Modem_(API)|Modem (API)]]''&lt;br /&gt;
{{Block&lt;br /&gt;
|name=Modem&lt;br /&gt;
|image=WirelessModem.png&lt;br /&gt;
|id=4094&lt;br /&gt;
|damage-value=1&lt;br /&gt;
|is-peripheral=Yes&lt;br /&gt;
|peripheral-api=Modem (API)&lt;br /&gt;
}}&lt;br /&gt;
Modems are blocks which can be used to wirelessly transfer data between [[Computer|computers]] and [[Turtle|turtles]], using the [[Rednet_(API)|Rednet API]] or the [[Modem_(API)|Modem API]].&lt;br /&gt;
To place a modem on a side of a computer, right-click to place the modem while sneaking.&lt;br /&gt;
&lt;br /&gt;
It is also possible to turn the modem on and off by typing &amp;quot;rednet.open ( side )&amp;quot; to open and &amp;quot;rednet.close ( side )&amp;quot; to close.&lt;br /&gt;
&lt;br /&gt;
Modems can send messages to other modems located up to 64 meters away, or 16 meters during a thunderstorm.&lt;br /&gt;
As of 1.4 Modem range is increased with higher altitudes. If there is no thunderstorm, the range will always be higher than 64, and at max altitude you would have a range of 384 meters.&lt;br /&gt;
&lt;br /&gt;
In 1.4 and 1.41 there is a miscalculation that causes the range to only be 381 meters at max altitude.&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone          |C1=stone&lt;br /&gt;
 |A2=stone |B2=ender_pearl    |C2=stone&lt;br /&gt;
 |A3=stone |B3=stone          |C3=stone&lt;br /&gt;
 |Output=Modem&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
== Example (Rednet API)==&lt;br /&gt;
* Place 2 computers and add modems to them by clicking the right mouse button while sneaking.&lt;br /&gt;
* Access them, and start Lua.&lt;br /&gt;
* Once Lua has started, type &amp;quot;[[rednet_(API)|rednet]].[[rednet.open|open]] (&amp;quot;&amp;lt;relative location to modem, e.g. left, right&amp;gt;&amp;quot;)&amp;quot; on both computers.&lt;br /&gt;
* Check if there exists a connection: a dim, red light should be found on the modem.&lt;br /&gt;
* Type on one computer &amp;quot;[[rednet_(API)|rednet]].[[rednet.receive|receive]] (60)&amp;quot;. This will make the computer freeze for 60 seconds, or until it has received a signal from the other computers.&lt;br /&gt;
* Now, type &amp;quot;[[rednet_(API)|rednet]].[[rednet.broadcast|broadcast]] ('&amp;lt;your message&amp;gt;')&amp;quot; on the other computer. This should send your message to all computers connected.&lt;br /&gt;
* Opening the first computer should show the message written on the second computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modem as a Peripheral==&lt;br /&gt;
To use a Modem as a peripheral, you need to either call a method directly using [[peripheral.call]](), or, wrap the modem using the [[Peripheral_(API)|Peripheral API]]. Wrapped modems provide all functions listed in the [[Modem_(API)|Modem API]].&lt;br /&gt;
&lt;br /&gt;
For this example, we have a Modem connected to the top of our [[Computer]], we are going to open channel 5:&lt;br /&gt;
&lt;br /&gt;
 -- Immediately invoke a method without wrapping&lt;br /&gt;
 peripheral.call(&amp;quot;top&amp;quot;, &amp;quot;open&amp;quot;,5)&lt;br /&gt;
&lt;br /&gt;
 -- You can also &amp;quot;wrap&amp;quot; the peripheral side to a variable:&lt;br /&gt;
 local modem = peripheral.wrap(&amp;quot;top&amp;quot;)&lt;br /&gt;
 modem.open(5)&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripherals]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Wireless_Modem&amp;diff=5284</id>
		<title>Wireless Modem</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Wireless_Modem&amp;diff=5284"/>
				<updated>2013-04-04T09:39:47Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: /* Modem as a Peripheral */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NeedsWork|The behaviour of Rednet has changed as of 1.5 - please consider updating this page with information. (Please don't add prerelease info!)}}&lt;br /&gt;
:''This page is for the Modem blocks. For the modem API, see [[Modem_(API)|Modem (API)]]''&lt;br /&gt;
{{Block&lt;br /&gt;
|name=Modem&lt;br /&gt;
|image=WirelessModem.png&lt;br /&gt;
|id=4094&lt;br /&gt;
|damage-value=1&lt;br /&gt;
|is-peripheral=Yes&lt;br /&gt;
|peripheral-api=Modem (API)&lt;br /&gt;
}}&lt;br /&gt;
Modems are blocks which can be used to wirelessly transfer data between [[Computer|computers]] and [[Turtle|turtles]], using the [[Rednet_(API)|Rednet API]] or the [[Modem_(API)|Modem API]].&lt;br /&gt;
To place a modem on a side of a computer, right-click to place the modem while sneaking.&lt;br /&gt;
&lt;br /&gt;
It is also possible to turn the modem on and off by typing &amp;quot;rednet.open ( side )&amp;quot; to open and &amp;quot;rednet.close ( side )&amp;quot; to close.&lt;br /&gt;
&lt;br /&gt;
Modems can send messages to other modems located up to 64 meters away, or 16 meters during a thunderstorm.&lt;br /&gt;
As of 1.4 Modem range is increased with higher altitudes. If there is no thunderstorm, the range will always be higher than 64, and at max altitude you would have a range of 384 meters.&lt;br /&gt;
&lt;br /&gt;
In 1.4 and 1.41 there is a miscalculation that causes the range to only be 381 meters at max altitude.&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone          |C1=stone&lt;br /&gt;
 |A2=stone |B2=ender_pearl    |C2=stone&lt;br /&gt;
 |A3=stone |B3=stone          |C3=stone&lt;br /&gt;
 |Output=Modem&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
== Example (Rednet API)==&lt;br /&gt;
* Place 2 computers and add modems to them by clicking the right mouse button while sneaking.&lt;br /&gt;
* Access them, and start Lua.&lt;br /&gt;
* Once Lua has started, type &amp;quot;[[rednet_(API)|rednet]].[[rednet.open|open]] (&amp;quot;&amp;lt;relative location to modem, e.g. left, right&amp;gt;&amp;quot;)&amp;quot; on both computers.&lt;br /&gt;
* Check if there exists a connection: a dim, red light should be found on the modem.&lt;br /&gt;
* Type on one computer &amp;quot;[[rednet_(API)|rednet]].[[rednet.receive|receive]] (60)&amp;quot;. This will make the computer freeze for 60 seconds, or until it has received a signal from the other computers.&lt;br /&gt;
* Now, type &amp;quot;[[rednet_(API)|rednet]].[[rednet.broadcast|broadcast]] ('&amp;lt;your message&amp;gt;')&amp;quot; on the other computer. This should send your message to all computers connected.&lt;br /&gt;
* Opening the first computer should show the message written on the second computer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modem as a Peripheral==&lt;br /&gt;
To use a Modem as a peripheral, you need to either call a method directly using [[peripheral.call]](), or, wrap the modem using the [[Peripheral_(API)|Peripheral API]]. Wrapped modems provide all functions listed in the [[Modem_(API)|Modem API]].&lt;br /&gt;
&lt;br /&gt;
For this example, we have a Modem connected to the top of our [[Computer]]:&lt;br /&gt;
&lt;br /&gt;
 -- Immediately invoke a method without wrapping&lt;br /&gt;
 peripheral.call(&amp;quot;top&amp;quot;, &amp;quot;open&amp;quot;,5)&lt;br /&gt;
&lt;br /&gt;
 -- You can also &amp;quot;wrap&amp;quot; the peripheral side to a variable:&lt;br /&gt;
 local modem = peripheral.wrap(&amp;quot;top&amp;quot;)&lt;br /&gt;
 modem.open(5)&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripherals]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5277</id>
		<title>Command Block (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5277"/>
				<updated>2013-03-30T06:10:16Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Block API allows you to run commands in a Command Block, using it as a peripheral.&lt;br /&gt;
(The peripheral can only be used if allowed in the config, which is default to false)&lt;br /&gt;
&lt;br /&gt;
Functions exposed by the Command Block:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Function&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|getCommand( )&lt;br /&gt;
|Returns a string containing the command currently inside the Command Block.&lt;br /&gt;
|-&lt;br /&gt;
|setCommand( [[string_(type)|string]] command )&lt;br /&gt;
|Sets the command in the Command Block. '''This does not run it.'''&lt;br /&gt;
|-&lt;br /&gt;
|runCommand( )&lt;br /&gt;
|Runs the command inside the Command Block previously set by setCommand( )&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
All Command Block functions are to be used ''after'' wrapping the block in a peripheral.&lt;br /&gt;
'''example''':&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
 command = peripheral.wrap(&amp;quot;left&amp;quot;)&lt;br /&gt;
 command.setCommand(&amp;quot;time set 1000&amp;quot;)&lt;br /&gt;
 command.runCommand()&lt;br /&gt;
 local currentCommand = command.getCommand()&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripheral APIs]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5276</id>
		<title>Command Block (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Command_Block_(API)&amp;diff=5276"/>
				<updated>2013-03-30T06:02:08Z</updated>
		
		<summary type="html">&lt;p&gt;Negamartin: Created the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Block API allows you to run commands in a Command Block, using it as a peripheral.&lt;br /&gt;
(The peripheral can only be used if allowed in the config, which is default to false)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot; style=&amp;quot;font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Grid_disk.png|24px]]&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
Command Block (API)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[command.getCommand]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Returns the command in the Command Block as a string.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #E8E8E8;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[command.setCommand]]([[string]] command)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Sets the command currently in the Command Block.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr style=&amp;quot;background-color: #FFFFFF;&amp;quot;&amp;gt;&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;[[command.runCommand]]()&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;border-top: solid #C9C9C9 1px; padding: .4em;&amp;quot;&amp;gt;Runs the command currently in the Command Block.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
All Command Block functions are to be used ''after'' wrapping the block in a peripheral.&lt;br /&gt;
'''example''': command = peripheral.wrap(&amp;quot;left&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Peripheral APIs]]&lt;/div&gt;</summary>
		<author><name>Negamartin</name></author>	</entry>

	</feed>