1
0
Fork 0

Log warning for non-serializable item entity fix

mobs^2
Nils Dagsson Moskopp 2021-07-29 15:46:50 +02:00 committed by Elias Fleckenstein
parent 693a5317ef
commit 256de2bc36
1 changed files with 7 additions and 0 deletions

View File

@ -511,6 +511,13 @@ minetest.register_entity(":__builtin:item", {
local stack = ItemStack(self.itemstring)
stack:get_meta():from_table(nil)
self.itemstring = stack:to_string()
minetest.log(
"warning",
"Overlong item entity metadata removed: “" ..
self.itemstring ..
"” had serialized length of " ..
#data
)
return self:get_staticdata()
end
return data