From 7771da2e0a983f829cacfce2e706406ae4b9d54c Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sat, 30 Mar 2024 21:52:09 -0400 Subject: [PATCH] fix autodetect ":" to beginning of entity registration for alias_mob * commit a4cf246fce9f7be8ec91892a3ad32ef90739cda5 has an error, alias must be registered with `:MODNAME:obejectname` so if you dont add the prefix of `:` the default is the mod class parent, so swaping here the sustitution detection, for now.. this addressed older https://notabug.org/TenPlus1/mobs_redo/issues/154 fixed in good way, also commit b1ad4451a7bba32d90a5b44450b93d0bddc9d83f --- api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 1943fff..f4b05d7 100644 --- a/api.lua +++ b/api.lua @@ -4962,10 +4962,10 @@ function mobs:alias_mob(old_name, new_name) end -- spawn egg - minetest.register_alias(old_name, new_name) + minetest.register_alias( (old_name:find(":") and old_name or ":"..old_name), new_name) -- entity - minetest.register_entity( (old_name:find(":") and old_name or ":"..old_name) , { + minetest.register_entity( ":"..old_name , { physical = false, static_save = false,