Ender Modem

From ComputerCraft Wiki
Jump to: navigation, search
This page is for the Modem blocks. For the modem API, see Modem (API)
Grid workbench.png   Ender Modem
EnderModem.png
Item ID computercraft:advanced_modem
Damage Value 0
Peripheral? Yes- Modem (API)

Ender Modems are advanced versions of the Wireless Modem, introduced by ComputerCraft version 1.76 (for Minecraft 1.8). They use the same Modem API, but are capable of cross-dimensional transmissions.

They have an extreme range, capable of functioning across distances of up to 2,147,483,647 blocks (2^31-1, unaffected by height or weather), and are compatible with regular Wireless Modem signals. If the modems are not located with the same dimension, however, then the "distance" parameter will be excluded from the resulting modem_message events.

Whether or not communications between two modems are possible depends only on the range of the stronger of the two. This means, for example, that a single system running the Repeat script through an Ender Modem effectively opens up Rednet communications between regular Wireless Modems server-wide; while one Ender Modem-equipped GPS cluster per dimension is sufficient to handle most all location requests.

See also: Wired Modem, Wireless Modem.

Recipe

Gold_Ingot

Gold_Ingot

Gold_Ingot

Gold_Ingot

Eye_of_Ender

Gold_Ingot

Gold_Ingot

Gold_Ingot

Gold_Ingot

Ender_Modem



Example (Modem API)

  • Place 2 computers and add modems to them by clicking the right mouse button while sneaking.
  • Access them, and start Lua.
  • Once Lua has started, wrap your modem using peripheral.wrap() (something like "modem = peripheral.wrap("<side of modem>")
  • Type "modem.open (<A modem port number, anything from 1 to 65535>)" on one computer.
  • Check if there exists a connection: a dim, red light should be found on the modem.
  • Now, type "modem.transmit (<Same number as above>, <Also the same number>, 'Your message')" on the other computer. This should send your message to all computers connected.
  • Opening the first computer should show the message written on the second computer.


Modem as a Peripheral

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. Wrapped modems provide all functions listed in the Modem API.

For this example, we have a Modem connected to the top of our Computer, we are going to open channel 5:

-- Immediately invoke a method without wrapping
peripheral.call( "top", "open", 5 )
-- You can also "wrap" the peripheral side to a variable:
local modem = peripheral.wrap( "top" )
modem.open( 5 )
Grid Redstone.pngComputerCraft Blocks and Items
Grid paper.png  Blocks
Iso Computer.png  Computer Iso Advanced Computer.png  Advanced Computer Iso Command Computer.png  Command Computer Iso DiskDrive.png  Disk Drive
Iso Monitor.png  Monitor Iso Advanced Monitor.png  Advanced Monitor Iso Printer.png  Printer Grid turtle.png  Turtle
Grid Modem.png  Wireless Modem Grid Ender Modem.png  Ender Modem Grid Wired Modem.png  Wired Modem Grid Networking Cable.png  Networking Cable
Grid paper.png  Items
Grid Pocket Computer.png  Pocket Computer Grid Advanced Pocket Computer.png  Advanced Pocket Computer Grid disk.png  Floppy Disk Grid printed page.png  Printed Page
Grid printed pages.png  Printed Pages Grid printed book .png  Printed Book