Posted 18 December 2018 - 06:29 PM
This code
returns this:
o.0 (what is all this…)
Using a friendly vanilla non custom creeper nearby. I want to see the name "Creeper" or something similar returned.
In theory getEntityData(id,"mob") should return custom name etc. Why isnt it? maybe one of you guys knows whats going on.
Any help would be appreciated :)/>.
local p = peripheral.wrap("bottom") -- Presuming the sensor is on the left
for _, id in ipairs(p.getEntityIds("mob")) do -- Or just p.getMobIds() -- Can also use "minecart" and "item"
print("Entity: " .. id)
for k, v in pairs(p.getEntityData(id,"mob")) do
print(k .. ": " .. tostring(v))
end
end
returns this:
o.0 (what is all this…)
Using a friendly vanilla non custom creeper nearby. I want to see the name "Creeper" or something similar returned.
In theory getEntityData(id,"mob") should return custom name etc. Why isnt it? maybe one of you guys knows whats going on.
Any help would be appreciated :)/>.
Edited on 19 December 2018 - 05:13 PM