Commit Graph

1190 Commits

Author SHA1 Message Date
cora 12a943e222 Make villagers homeless when bed is gone on return 2022-05-09 10:29:58 +00:00
cora 3774044f86 Walk back to bed instead of teleporting 2022-05-09 10:29:57 +00:00
cora 46dbf8c0ab Spawn villagers on villagegen, stay in village
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.
2022-05-09 10:29:57 +00:00
kabou 4e3a2a7b4c Fix list of spawnable biomes for rabbits.
* Rabbits spawn in Desert biome.
* Rabbits do no spawn in Forest and Swamp biomes.
2022-05-08 19:59:04 +00:00
cora e1ed990f58 sp. farm animals on grass, villagers near beds 2022-05-08 18:50:37 +00:00
cora e4c5f81524 make husks spawn only in deserts, zombies not 2022-05-08 18:50:37 +00:00
kay27 53042b6f48 Adopt mob spawning from mcl5 2022-05-08 18:50:37 +00:00
Elias Fleckenstein 34e5bb0334 Add Wither Spawning 2022-05-06 19:40:39 +00:00
Elias Fleckenstein c05a2d3a9d Add wither spawning schems 2022-05-06 19:40:39 +00:00
Nils Dagsson Moskopp 5ba36c08b6 Drop carved pumpkin when shearing snow golem 2022-04-22 18:07:37 +00:00
Nils Dagsson Moskopp a2dd8c935d Make villagers accept uncarved pumpkin in trades
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.
2022-04-22 18:07:37 +00:00
cora b6ab815adc Fix endermen dropping node AND taking it 2022-04-22 01:02:20 +02:00
NO411 e790bf90f4 Make shields work with all mobs 2022-04-09 16:21:22 +02:00
kabou 1b99b73894 Fix wrong player name accessor.
* Duh..
2022-03-30 01:31:38 +02:00
kabou 14da059ce7 Add extra check and warning on missing player data.
* 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.
2022-03-29 12:06:00 +02:00
NO11 5974b6f609 Merge branch 'master' into shields2 2022-03-28 12:27:57 +00:00
cora 1c9f0c3238 don't spawn mobs on non opaque nodes or leaves
with the preliminary jordanspaning mobs would spawn on trees
and water regularly.
2022-03-22 22:02:15 +01:00
cora 50e99f470e fix certain mobs not spawning in certain biomes 2022-03-22 15:16:48 +01:00
kabou 46ee5aaa59 Fix undefined luaentity crash.
* Add nil check to get_luaentity() access.
* Cache get_luaentity() call in local var.
2022-03-21 01:39:02 +00:00
kabou 9eba0e4860 Remove unused code.
* 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.
2022-03-18 11:39:11 +01:00
kabou 90311da514 Preempt possible crash on nil in on_joinplayer.
* 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.
2022-03-18 11:36:33 +01:00
kabou e9ff2ba32a Minor changes to mcl_burning.
* 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.
2022-03-18 11:36:23 +01:00
NO411 db68c0e26b Add shield 2022-03-15 15:58:27 +01:00
GNU Hacker f430aec0cd
item pickup sound gain more MC like 2022-03-13 14:58:01 +01:00
kabou 11ee1d133f Fix cut-n-paste error.
* Swap misplaced lines.
* Concatenate conditional expression.
2022-03-09 18:26:51 +01:00
kabou 9bac0da01a Fix registered_items oddity and add check for unknown nodes.
* 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.
2022-03-09 13:11:53 +01:00
kabou 818cbb2f48 Add check for unknown nodes.
* 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.
2022-03-09 12:11:59 +01:00
kabou 88f7a150c7 Add check for unknown nodes.
* Add check for unknown node in `handle_node_drops()` and return
  immediately if the dug node has no definition table.
2022-03-09 04:00:48 +01:00
kabou 962500b189 Add check for unknown nodes.
* 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.
2022-03-09 02:23:18 +01:00
kabou 95cfa43483 Add check for unknown nodes.
* 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.
2022-03-09 02:15:33 +01:00
kabou 4a1b93bbfa Add check for unknown nodes.
* 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.
2022-03-09 02:05:38 +01:00
kabou b9c2c3bd0a Add check for unknown nodes.
* 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.
2022-03-09 00:01:23 +01:00
kabou c3e0996902 Fix fire HUD not showing on join while burning.
* Add the fire HUD to a player who joins the server while still burning
  from the previous session.
2022-03-02 17:15:05 +01:00
kabou d424d4f10e Add comments to mcl_burning.update_hud(). 2022-03-02 16:39:27 +01:00
kabou e80006f4ea Do not set fire to objects that are already burning.
Changes to mcl_burning.set_on_fire():
* Add logic that only updates the burn time, but skips adding fire
  entities to objects that are already burning.
* Condense code a little, remove single use variables.
* Add a comment to a questionable piece of code.
* Add comments to the function.
2022-03-02 16:25:40 +01:00
kabou b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
2022-03-02 15:40:29 +01:00
kabou 86a4ece7d2 Add local copy of minetest.find_nodes_in_area. 2022-03-02 15:25:03 +01:00
kabou df5d24104d Make player burning HUD work without csm.
* Add update_hud() function.
* Remove the client channels.
* Unglobalize animation_frames variable.
* Fix bug where player state was not stored on shutdown of singleplayer
  game.
* Remove superfluous sanity_check() function, this code could easily be
  inlined in its only caller.
2022-03-02 15:21:55 +01:00
kabou 56b63463a5 Fix burning entity animation.
The parameters for the flames sprite were incorrect, causing the reverse
side of the sprite to appear as an opaque black rectangle.  Use the
correct incantation.
2022-03-02 10:47:46 +01:00
AFCMS b51e322304
make fire charges activate target (+ fix possible crash) 2022-02-26 22:38:34 +01:00
cora 3feca330c9 fix the other 2 throw_xp occurences 2022-02-25 00:40:26 +00:00
cora caacb378de fix api change in enchanting 2022-02-25 00:40:26 +00:00
cora 379972ea11 fix crash when blaze attacks logged off player 2022-02-25 00:40:26 +00:00
cora 435b5d756d throw_experience->throw_xp (api change) 2022-02-25 00:40:26 +00:00
cora 2bb416765c revert to old mobs ( 32c03dc27e )
This reverts the hierarchies ENTITIES/mcl_mobs, ENTITIES/mobs_mc
and ENTITIES/mobs_mc_gameconfig to the state of commit
32c03dc27e
2022-02-25 00:40:26 +00:00
Emojigit b02f7cd974 mcl_mobs 2022-02-23 23:58:05 +01:00
Emojigit b01d4eba88 mcl_paintings 2022-02-23 23:58:05 +01:00
Emojigit 26dadb1846 mcl_falling_nodes 2022-02-23 23:58:05 +01:00
Emojigit c3dd5e6c2c MORE MESS SORRY XD 2022-02-23 23:58:05 +01:00
Emojigit 21808390f9 Revert "add translates for `mcl_boats`"
This reverts commit 2ee84f2ad3.
2022-02-23 23:58:05 +01:00