Clearmobs: clear empty nametagged as well as nil (#2429) #2433

Merged
cora merged 1 commits from fix_clearmobs_horses into master 2022-07-15 13:54:04 +02:00
Contributor

This PR fixes #2429

For some reason horses get an empty string as nametag.

Testing

In survival:

  • /findbiome Plains
  • wait for horses to spawn
  • /clearmobs
  • without this patch horses do not get removed
  • with this patch they do (unless tamed)

Note that in creative they are all tamed and if you spawn them with an egg they're tamed too so this needs to be done via natural spawning in survival.

This PR fixes #2429 For some reason horses get an empty string as nametag. #### Testing *In survival:* * /findbiome Plains * wait for horses to spawn * /clearmobs * without this patch horses do not get removed * with this patch they do (unless tamed) Note that in creative they are all tamed and if you spawn them with an egg they're tamed too so this needs to be done via natural spawning in survival.
cora added 1 commit 2022-07-15 04:44:24 +02:00

It works :)

It works :)
Member

Yes, works.

Though, as an FYI; you need to hold sneak while using mob spawn eggs in order for them to be un-tamed.

Description:
https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ENTITIES/mcl_mobs/api.lua#L4270

And, actual code for this:
https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ENTITIES/mcl_mobs/api.lua#L4321-L4326

Yes, works. Though, as an FYI; you need to hold sneak while using mob spawn eggs in order for them to be un-tamed. Description: https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ENTITIES/mcl_mobs/api.lua#L4270 And, actual code for this: https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/ENTITIES/mcl_mobs/api.lua#L4321-L4326
MysticTempest approved these changes 2022-07-15 06:43:31 +02:00
cora merged commit 14cba8197e into master 2022-07-15 13:54:04 +02:00
cora deleted branch fix_clearmobs_horses 2022-07-15 13:54:16 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#2433
No description provided.