Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("top")
- local meDrive = peripheral.wrap("right")
- while true do
- local disks = meDrive.list()
- monitor.clear()
- monitor.setTextColor(colors.white)
- monitor.setCursorPos(1, 1)
- -- Disklerin olup olmadığını kontrol et
- if #disks > 0 then
- -- Sadece 1. slotu kontrol et (1. disk)
- local disk = disks[1]
- if disk then
- local itemDetails = meDrive.getItemDetail(disk.slot)
- if itemDetails then
- -- Diskin detaylarını yazdır
- monitor.write("Disk Name: " .. disk.name .. "\n")
- monitor.write("Display Name: " .. (itemDetails.displayName or "No display name") .. "\n")
- monitor.write("Count: " .. (itemDetails.count or 0) .. "\n")
- monitor.write("Max Stack: " .. (itemDetails.maxStackSize or 0) .. "\n")
- monitor.write("NBT Data: " .. (itemDetails.nbt or "No NBT Data") .. "\n") -- NBT bilgisi
- end
- end
- else
- monitor.write("No disks found in the ME Drive.")
- end
- os.sleep(1) -- Her saniye güncellenir
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement