The Modem is used to allow your Computers to communicate over rednet.You place this on a computer by holding sneak and right clicking the computer. The range of a modem is 64 blocks, but during a thunderstorm, is limited to only 17.
In order to place a modem, right click any side of the computer while holding it in your hand, and holding your set sneak button.
The important Lua codes to control a modem can be seen by typing the following command into the console or turtle:
help rednet
The LUA codes are as follows:
For specifying side of networking
rednet.open(side) rednet.close(side) rednet.isOpen(side)
For sending messages
rednet.announce() rednet.send( receiverID, message) -- Send to a specific computer rednet.broadcast( message ) -- Send to all computers
For receiving messages
rednet.receive( timeout ) -- Returns: senderID, message [Note: You can also handle the "rednet_message" event to receive messages without calling receive(), the arguments are the same as the receive() return values.]
Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.