Advertisement
CodeSalat

alltheforge10_client_tree

Dec 4th, 2023
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("top")
  2. rednet.host("energy", "tree")
  3. local cube = peripheral.wrap("right")
  4.  
  5. while true do
  6.     local sender, message, distance = rednet.receive("energy")
  7.     if message == "energyUpdate" then
  8.         rednet.send(sender, cube.getEnergyFilledPercentage()*10, "energy")
  9.     end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement