From baf8e0b79c2c07d6af500d901aee4eae83a8c692 Mon Sep 17 00:00:00 2001 From: kabou Date: Thu, 12 May 2022 20:57:54 +0200 Subject: [PATCH] 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. --- mods/ENTITIES/mcl_item_entity/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index e39e21bfb9..5d86071ebc 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -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