Advertisement
colhaydutu

Untitled

Feb 12th, 2025 (edited)
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. local monitor = peripheral.wrap("top")
  2. local meDrive = peripheral.wrap("right")
  3.  
  4. while true do
  5. local disks = meDrive.list()
  6.  
  7. monitor.clear()
  8. monitor.setTextColor(colors.white)
  9. monitor.setCursorPos(1, 1)
  10.  
  11. -- Disklerin olup olmadığını kontrol et
  12. if #disks > 0 then
  13. -- Sadece 1. slotu kontrol et (1. disk)
  14. local disk = disks[1]
  15. if disk then
  16. local itemDetails = meDrive.getItemDetail(disk.slot)
  17.  
  18. if itemDetails then
  19. -- Diskin detaylarını yazdır
  20. monitor.write("Disk Name: " .. disk.name .. "\n")
  21. monitor.write("Display Name: " .. (itemDetails.displayName or "No display name") .. "\n")
  22. monitor.write("Count: " .. (itemDetails.count or 0) .. "\n")
  23. monitor.write("Max Stack: " .. (itemDetails.maxStackSize or 0) .. "\n")
  24. monitor.write("NBT Data: " .. (itemDetails.nbt or "No NBT Data") .. "\n") -- NBT bilgisi
  25. end
  26. end
  27. else
  28. monitor.write("No disks found in the ME Drive.")
  29. end
  30.  
  31. os.sleep(1) -- Her saniye güncellenir
  32. end
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement