minecraft_storm

modem test

Apr 29th, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. local modem = peripheral.find("modem") or error("No modem attached", 0)
  2. modem.open(0)
  3.  
  4. while true do
  5. local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
  6. print(("Message received on side %s on channel %d (reply to %d) from %f blocks away with message %s"):format(
  7. side, channel, replyChannel, distance, tostring(message)
  8. ))
  9. end
Add Comment
Please, Sign In to add comment