* 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.
This spawns a villager per bed on village gen and saves the bed
position in the entity. If it moves too far from the village
it gets teleported (for now) back.
As map generation and growing mechanics have been changed to generate
uncarved pumpkins instead of carved, requiring players to shear every
pumpkin before trading it with villagers seems like useless busywork.
* For some unexplained reason, `mcl_burning.storage[player]` can
sometimes be `nil`, causing a crash in `on_leaveplayer()`. This
commit adds a check for that. If a `nil` is encountered, a sane
value is substituted and a warning is set to the log.
* Remove unused code that was commented out. The code tried to find
fire luaentities in the same spot as the newly created fire luaentity.
It may have been intended to optimize getting set on fire multiple
times, but it makes no sense as it does not discriminate between fire
luaentities attached to the object set on fire and those attached to
other objects. The function that this code was in also has a better
way to prevent adding multiple fire luaentities in the first place.
* In mineclone5 a crash was reported to occur when deserialization of
storage returned nil in on_joinplayer. https://git.minetest.land/
MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09
This commit uses a different, but equally effective fix.
* Remove animation_frame from fire entity state, it is now kept in the
storage table of the parent entity.
* Rename animation_timer in fire entity table to _mcl_animation_timer,
in line with mineclone2 policy on adding custom members to minetest
tables.
* Comment out code that does nothing sensible. Scheduled for deletion
at a later time.
* Mobs redo uses `registered_items[]` where clearly the proper table
accessed should be `registered_nodes[]`. Perhaps this magically
works, but it looks nonsensical. Switch to the use the more
sensible `registered_nodes[]` table.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Reduce redundant `== false` condition check.