Commit Graph

1402 Commits

Author SHA1 Message Date
cora
8fe40fcd26 remove old debug line 2022-07-08 23:57:02 +02:00
cora
98c48dab8c abolish child labor 2022-07-08 23:57:02 +02:00
PrairieAstronomer
465d91036f Added Campfire to Fisherman Villager Trades 2022-07-08 02:37:20 +02:00
cora
31289f5686 villagers that haven't traded loose job on js gone 2022-07-05 23:47:30 +02:00
cora
672b9dbedf make pathfinding to jobsite more smooth 2022-07-05 23:47:30 +02:00
cora
dd5e9afbd9 villagers only get a job when they touch jobsite 2022-07-05 23:47:30 +02:00
cora
21d5ab88a5 comment out natural villager spawning 2022-07-05 23:47:30 +02:00
cora
0e6250b2a3 Fix rabbit spawning biomes 2022-07-04 12:50:48 +02:00
cora
bc2e61921f do not spawn polar bears in extremehills+_snowtop 2022-07-04 01:46:41 +02:00
cora
b1c97a0510 prevent ground squids, variable spawn height 2022-07-04 01:41:45 +02:00
MysticTempest
677110e39f Disable the despawn timer catchup for items that were unloaded. 2022-07-03 04:28:43 -05:00
PrairieAstronomer
40a421ddd0 Hidden in the Depths Advancement 2022-07-01 12:41:01 -06:00
PrairieAstronomer
687bc04560 Who is Cutting Onions? Advancement 2022-07-01 12:39:10 -06:00
PrairieAstronomer
ed2fc6601e Added Smithing Table to Toolsmith Villager Jobsite 2022-06-30 14:11:13 +02:00
cora
d9e40d5223 set profession first in on_spawn 2022-06-26 11:20:20 +02:00
cora
86651e7557 Fix zombie villager curing (crash) 2022-06-26 11:20:20 +02:00
RandomLegoBrick
b5eda3000e Merge branch 'master' into grindstone 2022-06-20 19:58:49 +00:00
TheRandomLegoBrick
99469ff1c5 Add grindstones 2022-06-20 12:46:59 -07:00
cora
e3c5b2cbb5 Fix crash on ghast explosions
In certain situations the arrow can be invalidated until its
get_pos() is called here - e.g. when the player wears over-
enchanted blast protection (65k in this case).

This uses the player position for the explosion in these cases
2022-06-20 13:40:05 +02:00
cora
5b366c692d Enable mob spawning in new biomes
lower ghast spawning chance
2022-06-19 00:24:52 +02:00
cora
8efbd89b6a Add basalt columns & lava pools 2022-06-19 00:24:52 +02:00
cora
98a322443b make "old" villagers keep their job 2022-06-17 13:59:32 +00:00
cora
cd43076ea3 additionally rate limit villager jobhunts 2022-06-17 15:54:53 +02:00
cora
e630ea59c9 Rate limit pathfinding attempts
In certain situation it otherwise results in excessive attempts to
find a path.
2022-06-17 15:54:53 +02:00
cora
8651e3b04e randomize spawning list 2022-06-15 05:06:31 +02:00
cora
60f164d46a Fix horse and wolf spawning biomes 2022-06-15 05:06:31 +02:00
cora
9cea10a706 fix more blast resistance and hardness values 2022-06-13 02:48:00 +02:00
cora
a43627e268 Fix 2 wrong variable uses that made warnings 2022-06-12 01:35:27 +00:00
PrairieAstronomer
b544fb819d What A Deal! Advancement 2022-06-11 15:35:48 -06:00
MysticTempest
45ec876167 Knockback fixes:
This PR enables knockback for snowballs, and eggs.
And disables knockback for the following mobs: Shulkers, Iron Golems,
and Ender Dragons.
2022-06-07 02:55:19 -05:00
epCode
ad486a56fd Add more Villager sounds 2022-06-06 12:09:14 -07:00
epCode
42c764e149 Make Villager nod/head shake 2022-06-06 11:12:57 -07:00
cora
ef093d0c00 Be more careful with possibly expired objects 2022-06-04 20:26:00 +02:00
MysticTempest
b4c5805afe Make items flowing in water use acceleration for movement. 2022-06-03 05:46:27 -05:00
MysticTempest
5dde594c19 Item movement fixes:
This PR fixes items at flowing_water edges not falling down holes.
As well as fixing items not sliding on slippery nodes like ice.

And, allows for movement starting at the source block of a
flowing water node. While ensuring regular water_source blocks
do not bug out.
2022-06-02 09:44:04 +00:00
MysticTempest
983b8f0934 Make breaking boats by hand easier. 2022-06-02 00:20:44 -05:00
MysticTempest
31106a2031 Fix items obtained from villager trades:
This PR stops the load_enchantments function from being
called for all items in the villager trades.
Fixing non-enchanted items from villagers being unable to stack
with their regular counterparts.

As they now, no longer have any description metadata.
While also ensuring that enchanted items still have their
tooltips, and work.
2022-05-30 15:11:22 -05:00
cora
dc21b02d04 update old mobs_mc_ horse armor textures 2022-05-30 10:49:38 +00:00
cora
e4a4648b25 fix size of black cat texture 2022-05-29 02:34:02 +02:00
cora
da6563a5b3 Spawn witch and black cat on witchhut generation 2022-05-29 02:34:02 +02:00
cora
7bc63d2882 fix mcl_mobs api_changes 2022-05-28 00:06:29 +02:00
cora
c0a9cb7020 don't hurt perched parrot on punch 2022-05-28 00:05:04 +02:00
cora
e90e17e533 clean up perch code, smoother behavior 2022-05-28 00:05:04 +02:00
cora
3d13000599 tweak detaching behavior 2022-05-28 00:05:04 +02:00
cora
86bc398a79 don't do flying animation while perching,fix anims 2022-05-28 00:05:04 +02:00
cora
14ec1aa014 add basic parrot perching 2022-05-28 00:05:04 +02:00
Elias Fleckenstein
e7898352d8 Remove mobs_mc_gameconfig 2022-05-27 02:44:39 +02:00
cora
47fa43825c count only mobs for cramming 2022-05-26 14:20:19 +02:00
cora
af7dc0fb8f change "constant" declaration to match mcl_mobs 2022-05-26 14:16:38 +02:00
cora
87f50d6423 entity cramming: clean up check logic 2022-05-26 14:16:38 +02:00
cora
fb4f21cba0 entity cramming: spare the children 2022-05-26 14:16:38 +02:00
cora
85b599edba entity cramming: check less often 2022-05-26 14:16:38 +02:00
cora
b4cbc528a3 mcl_mobs: add entity_cramming 2022-05-26 14:16:38 +02:00
Elias Fleckenstein
f6a40ffb78
Run tools/strip_trailing_whitespace.sh 2022-05-26 07:29:28 +02:00
Elias Fleckenstein
dd1f8cb59c Remove enderman gameconfig 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
ff33794487 Rename mobs global to mcl_mobs 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
e0f70b54ec Remove _cmi_is_mob 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
4054f05a4c Remove support for invisibility mod 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
f6be8bac5a Remove checks for MCL2 mods 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
8db9e76529 Remove unused version field 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
6ae722a6ee Remove use_cmi 2022-05-25 23:13:33 +02:00
Elias Fleckenstein
fc3992ceb6 Remove mobs.is_creative 2022-05-25 23:13:33 +02:00
cora
028d1c1f4f do not tame villagers 2022-05-22 14:43:44 +02:00
cora
a5ba8f739f Add bell to villager trades 2022-05-22 02:01:21 +02:00
cora
ec73afd21a use iron texture for apprentice badge, not stone 2022-05-22 02:01:21 +02:00
cora
e353ec3b16 Iron golems pick and pick up one (stack of) poppy 2022-05-21 12:36:57 +02:00
cora
5dafeaadc6 Fix indentation in mcl_mobs/api.txt 2022-05-21 12:36:57 +02:00
cora
27d0d778e2 Update TODO list 2022-05-21 12:36:57 +02:00
cora
a74fcab06b Make iron golem stay near set _home position 2022-05-21 12:36:57 +02:00
cora
e5806215f0 fix possible crash 2022-05-21 12:36:57 +02:00
cora
08b36e3eb3 Add textures for all professions 2022-05-21 12:36:57 +02:00
cora
53df441c1b Don't pick up near player, add more breeding stuff 2022-05-21 12:36:57 +02:00
cora
873e018faf Dynamically add trading tier badge to texture 2022-05-21 12:36:57 +02:00
cora
b58422a584 write villager id into bed nodemeta 2022-05-21 12:36:57 +02:00
cora
539c31e8d6 fix trading crash 2022-05-21 12:36:57 +02:00
cora
db865ede56 villagers open doors in daytime and close at night 2022-05-21 12:36:57 +02:00
cora
0d56ef1a90 add jobsites to villagegen schematics 2022-05-21 12:36:57 +02:00
cora
67939f7b7a pathfinding: find doors close to target as well 2022-05-21 12:36:57 +02:00
cora
9ccbf91706 mobs api: document api additions 2022-05-21 12:36:57 +02:00
cora
dfb74cf9e9 mobs: add nofollow option so v. dont follow bread 2022-05-21 12:36:57 +02:00
cora
9a866e873e breed by throwing bread at villagers 2022-05-21 12:36:57 +02:00
cora
e6b65af3b4 add mobs item pickup 2022-05-21 12:36:57 +02:00
cora
4ac41a793e fix two crashes in pathfinding 2022-05-21 12:36:57 +02:00
cora
98231f15ae change function name go_wplist -> gopath 2022-05-21 12:36:57 +02:00
cora
e3bb7fe4be codestyle: replace inline functions 2022-05-21 12:36:57 +02:00
cora
f8fc111b4a pathfind to jobsites 2022-05-21 12:36:57 +02:00
cora
dbc5564d02 move movement code to mcl_mobs 2022-05-21 12:36:57 +02:00
cora
ce7a882c86 Show trade tier in formspec 2022-05-21 12:36:57 +02:00
cora
12bc8f1a3b initial pathfinding experiments
to test rightclick a villager and it will try to path find to
0,9,0 (i'm using flat mapgen for testing for now).
2022-05-21 12:36:57 +02:00
cora
0598aa35c0 add simple jobsite logic 2022-05-21 12:36:57 +02:00
PrairieWind
d93704fa0e Merge branch 'master' into furnaces 2022-05-17 18:33:20 +00:00
PrairieAstronomer
fe36d579eb Add Blast Furnace and Smoker to Villager Workstations 2022-05-17 10:37:55 -06:00
cora
5282a63bcb add options for nametagged mobs and range 2022-05-15 20:04:09 +00:00
cora
e5de4bba65 keep nametagged mobs, add "all" argument 2022-05-15 20:04:09 +00:00
cora
628686ce79 Add a command to safely remove all mob objects 2022-05-15 20:04:09 +00:00
PrairieAstronomer
5abfa555eb Added new workstations to villager jobsite definitions 2022-05-14 15:52:37 -06:00
cora
31b8ea26a2 add jobsites to professions table 2022-05-14 00:32:15 +02:00
cora
fd6f2be485 update cleric trades 2022-05-14 00:32:15 +02:00
cora
07e0a90051 update tool smith trades 2022-05-14 00:32:15 +02:00
cora
f073d4d420 update weapon smith trades 2022-05-14 00:32:15 +02:00
cora
89aaf6b709 update butcher trades 2022-05-14 00:32:15 +02:00
cora
f09b578034 update leatherworker trades 2022-05-14 00:32:15 +02:00
cora
0ce1a92282 update armorer trades 2022-05-14 00:32:15 +02:00
cora
135ee97b21 update cartographer trades 2022-05-14 00:32:15 +02:00
cora
51cf92a909 update librarian trades 2022-05-14 00:32:15 +02:00
cora
2d47ad3e5f update fletcher trades 2022-05-14 00:32:15 +02:00
cora
c28d700caf update fisherman trades 2022-05-14 00:32:15 +02:00
cora
ba861d7b74 update farmer trades 2022-05-14 00:32:15 +02:00
cora
9b8b7ce6b4 refactor go home logic 2022-05-14 00:32:15 +02:00
cora
354d17a14c enable simple villager breeding 2022-05-14 00:30:44 +02:00
rudzik8
7f3ba7d4a2 Enable placing carpets on llamas and add textures for it 2022-05-13 22:00:09 +00:00
kabou
baf8e0b79c Update item entity for lodestone compass.
* 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.
2022-05-12 21:08:52 +02:00
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