-- -- model_probe.lua -- -- Dumps the FULL getItemDetail table for every data model found, so we can see -- how the tier (e.g. "Self Aware") is exposed to CC - a lore line, a tag, an nbt -- field, whatever. Writes to model_probe.txt. -- -- model_probe -- scans every inventory on the network -- model_probe minecraft:barrel_3 -- just this inventory -- -- Put BOTH a Self-Aware model and a lower-tier one in the barrel before running, -- so we can compare and find what distinguishes them. Then: -- pastebin put model_probe.txt -- local only = ... local OUT = "model_probe.txt" local f = fs.open(OUT, "w") if not f then error("model_probe: cannot open " .. OUT, 0) end local function w(s) f.writeLine(s or "") end local targets = {} if only then targets = { only } else for _, n in ipairs(peripheral.getNames()) do local p = peripheral.wrap(n) if p and p.list then targets[#targets + 1] = n end end end w("model_probe - " .. os.date("%Y-%m-%d %H:%M:%S")) local found = 0 for _, n in ipairs(targets) do local p = peripheral.wrap(n) local ok, list = pcall(p.list) if ok and list and p.getItemDetail then for slot, item in pairs(list) do if item.name:find("data_model") then found = found + 1 w(string.rep("=", 50)) w(n .. " slot " .. slot .. " : " .. item.name .. " x" .. item.count) w(string.rep("-", 50)) local okd, det = pcall(p.getItemDetail, slot) if okd and type(det) == "table" then w(textutils.serialize(det)) else w("getItemDetail failed: " .. tostring(det)) end w("") end end end end f.close() print("Found " .. found .. " data model(s). Wrote /" .. OUT) print("Send it: pastebin put " .. OUT)