Advertisement
Alexr360

Entity Lock

Apr 7th, 2024 (edited)
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. -- Listen for events from the "crystal_interface" peripheral
  2. local crystalInterface = peripheral.find("crystal_interface")
  3. if not crystalInterface then
  4.     print("Crystal interface peripheral not found!")
  5.     return
  6. end
  7.  
  8. -- Function to handle incoming events
  9. local function handleEvent(eventName, travelerType, displayName, uuid)
  10.     if eventName == "stargate_reconstructing_entity" then
  11.         print("Traveler Type:", travelerType)
  12.         print("Entity Display Name:", displayName)
  13.         print("UUID:", uuid)
  14.     end
  15. end
  16.  
  17. -- Main event loop
  18. while true do
  19.     local event = {os.pullEvent()}
  20.     handleEvent(unpack(event))
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement