Update item entity for lodestone compass.

* Added another special case to the item entity registration for
  lodestone compasses, without this a dropped lodestone compass would
  turn into a regular compass on being dropped.
* Update the compass and lodestone compass frame number to be the
  stereotype frame.
This commit is contained in:
kabou 2022-05-12 20:57:54 +02:00
parent 00dba67cd8
commit baf8e0b79c
1 changed files with 5 additions and 1 deletions

View File

@ -418,7 +418,11 @@ minetest.register_entity(":__builtin:item", {
end
local stack = ItemStack(itemstring)
if minetest.get_item_group(stack:get_name(), "compass") > 0 then
stack:set_name("mcl_compass:16")
if string.find(stack:get_name(), "_lodestone") then
stack:set_name("mcl_compass:18_lodestone")
else
stack:set_name("mcl_compass:18")
end
itemstring = stack:to_string()
self.itemstring = itemstring
end