mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Log warning for non-serializable item entity fix
This commit is contained in:
parent
693a5317ef
commit
256de2bc36
@ -511,6 +511,13 @@ minetest.register_entity(":__builtin:item", {
|
|||||||
local stack = ItemStack(self.itemstring)
|
local stack = ItemStack(self.itemstring)
|
||||||
stack:get_meta():from_table(nil)
|
stack:get_meta():from_table(nil)
|
||||||
self.itemstring = stack:to_string()
|
self.itemstring = stack:to_string()
|
||||||
|
minetest.log(
|
||||||
|
"warning",
|
||||||
|
"Overlong item entity metadata removed: “" ..
|
||||||
|
self.itemstring ..
|
||||||
|
"” had serialized length of " ..
|
||||||
|
#data
|
||||||
|
)
|
||||||
return self:get_staticdata()
|
return self:get_staticdata()
|
||||||
end
|
end
|
||||||
return data
|
return data
|
||||||
|
Loading…
Reference in New Issue
Block a user