scanEntities(range) table missing health fields
DaymasS opened this issue · 0 comments
Describe
Some passive mobs like chicken, sheep, horse, cow (may be more), Do not have health and maxHealth fields in the table that function scanEntities(range) returns.
Steps to reproduce
- Connect "environmentDetector" to a computer
- Summon some passive creatures (chickens, sheep, ...)
- Call scanEntities(range) from the detector
- Look through the returned table
local scanner = peripheral.wrap("environmentDetector_0")
local SEARCH_RADIUS = 128
file_handler = io.open("out", "w")
io.output(file_handler)
for _, entity in pairs(scanner.scanEntities(SEARCH_RADIUS)) do
for field, value in pairs(entity) do
if (field == "name" or field == "health") then
io.write(field .. " : " .. tostring(value) .. "\n")
end
end
io.write("-----\n")
end
io.close(file_handler)
Multiplayer?
No
Version
1.19.2-0.7.34r (Latest 1.19.2)
Minecraft, Forge and maybe other related mods versions
Froge - 43.3.8; MC - 1.19.2
Screenshots or Videos
No response
Crashlog/log
No response