fix autodetect ":" to beginning of entity registration for alias_mob

* commit a4cf246fce 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 b1ad4451a7
main
mckaygerhard 2024-03-30 21:52:09 -04:00
parent 910a46b16d
commit 7771da2e0a
1 changed files with 2 additions and 2 deletions

View File

@ -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,