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
This commit is contained in:
mckaygerhard 2024-03-30 21:52:09 -04:00
parent 910a46b16d
commit 7771da2e0a

View File

@ -4962,10 +4962,10 @@ function mobs:alias_mob(old_name, new_name)
end end
-- spawn egg -- spawn egg
minetest.register_alias(old_name, new_name) minetest.register_alias( (old_name:find(":") and old_name or ":"..old_name), new_name)
-- entity -- entity
minetest.register_entity( (old_name:find(":") and old_name or ":"..old_name) , { minetest.register_entity( ":"..old_name , {
physical = false, static_save = false, physical = false, static_save = false,