Allow functions for mobs_debug
This commit is contained in:
parent
4fc7e61f28
commit
1ab378b248
@ -29,8 +29,12 @@ function mcl_mobs.mob_class:get_nametag()
|
||||
local name = self.nametag ~= "" and self.nametag or self.name
|
||||
local elements = {}
|
||||
for _, k in ipairs(mcl_mobs_debug.fields_default) do
|
||||
if type(k) =="function" then
|
||||
table.insert(elements, k(self))
|
||||
else
|
||||
table.insert(elements, k.." = "..tostring(self[k]))
|
||||
end
|
||||
end
|
||||
for _, k in ipairs(self._debug_fields or {}) do
|
||||
if type(k) == "function" then
|
||||
table.insert(elements, k(self))
|
||||
|
Loading…
x
Reference in New Issue
Block a user