Commit graph

12582 commits

Author SHA1 Message Date
kno10
dcfd31d17a Avoid random jumps when standing due to gravity (fewer villagers on the roofs) (#4547)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4547
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-30 11:22:31 +02:00
teknomunk
c34aecfcab Don't make 'ignore' nodes break bamboo or kelp (#4551)
This modifies the behavior of kelp and bamboo so that neither breaks when an unloaded node is encountered.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4551
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2024-09-29 13:57:52 +02:00
Mikita Wiśniewski
9cb4f51468 Fix invalid global call in mcl_chests LBM (#4667)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4667
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-29 13:34:20 +02:00
kno10
d264ba70d8 Fix growth logic, clean up mcl_farming/shared_functions (#4640)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4640
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-20 14:00:49 +02:00
Mikita Wiśniewski
513413afc7 Use remove_node instead of dig_node in mcl_core ABMs (fixes #4628) (#4629)
The mycelium ABM has been left untouched because of the potential destructiveness. If we ever find that to be an issue, it can be fixed as part of a bigger PR.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4629
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-19 18:54:39 +02:00
kno10
011be754ca Allow deepslate copper to be mined with stone pickaxe (#4635)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4635
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <kno10@noreply.git.minetest.land>
Co-committed-by: kno10 <kno10@noreply.git.minetest.land>
2024-09-18 10:11:55 +02:00
teknomunk
eea96867c4 Don't add rain skycolor layer if the current layer is already the rain skycolor (#4648)
Fixes #4647 Rain makes the sky black until restart. This also fixes a memory leak caused by rain adding a color layer every time step.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4648
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2024-09-18 10:10:53 +02:00
the-real-herowl
cd2ee49591 Merge pull request 'Make Soul Speed work on Soul Soil' (#4604) from upstream/soul_soil_speed into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4604
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-18 10:06:03 +02:00
seventeenthShulker
de3b34f5ea Update English translation keys with soul soil 2024-09-18 10:06:03 +02:00
seventeenthShulker
e2bcd129c1 Use soul_block group for soul speed bonus 2024-09-18 10:06:03 +02:00
seventeenthShulker
79e8452f62 Soul speed works on soul soil too
(needs localization)
2024-09-18 10:06:03 +02:00
the-real-herowl
b239549774 Merge pull request 'Correct space check when spawning mobs' (#4445) from fix-has_room into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4445
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
2024-09-17 11:49:29 +02:00
teknomunk
0b62c827aa Remove has_room debug data 2024-09-16 13:32:06 +02:00
teknomunk
626bdd13d8 Change several places where mobs are created to use mcl_mobs.spawn() instead of minetest.add_entity() 2024-09-16 13:32:06 +02:00
teknomunk
31a3788ce1 Address review comments 2024-09-16 13:32:06 +02:00
teknomunk
e65370b845 Fixes 2024-09-16 13:32:06 +02:00
teknomunk
6c50e0a82b Fix volume used for room check during spawn, make mcl_mobs.spawn check for room before adding entity, change iron golems and mob spawners to use mcl_mobs.spawn 2024-09-16 13:32:06 +02:00
teknomunk
8ef08128b1 Add short circuit if sub-node space check isn't possible: 2024-09-16 13:32:06 +02:00
teknomunk
15efd00a29 Replace second call to minetest.find_nodes_in_area with checking top layer for matching nodes, change p2 calculation to use ceil(value) - 1, fix dx*dy*dz calculation 2024-09-16 13:32:06 +02:00
teknomunk
fa3df0d8c6 Add check for presence of minetest.get_node_boxes before attempting sub-node space checks 2024-09-16 13:32:06 +02:00
teknomunk
c41ce8ba59 Make spiders require 3x1x3 space to spawn 2024-09-16 13:32:06 +02:00
teknomunk
4d58f63485 Implement partial node spawning check 2024-09-16 13:32:06 +02:00
teknomunk
fa09b65010 Add most of the code for sub-node accurate spawning volume check (needs a function to calculate bounding box height of nodes) 2024-09-16 13:32:06 +02:00
teknomunk
d8d39ffd52 Add spawnbox parameter that overrides collision box for spawn volume checks 2024-09-16 13:32:06 +02:00
teknomunk
b6aafedf25 Fix space check function has_room() in mcl_mobs/spawning.lua so it allows spiderproofing 2024-09-16 13:32:06 +02:00
Mikita Wiśniewski
178cb9340d Clean-up set_string(..., nil) usage (fixes #4639) (#4641)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4641
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-16 12:12:55 +02:00
kno10
f219e5f4ae Fix structure spawns under water + peaceful spawns (#4607)
- peaceful structure spawns would not run in peaceful mode (e.g., parrots)
- water structure spawns (e.g., guardians) would not run because the code required air above
- small code improvements

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4607
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-15 23:15:30 +02:00
kno10
66b7a52d47 Make zombies and skeletons not float (#4512)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4512
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-15 23:14:10 +02:00
WillConker
ce5eb8d88d Remove mobs_mc name check from mcl_mobspawners warning (#4501)
Fixes a warning.
Mobs spawners really only need to check the entity `.is_mob` as all mobs should have this set.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4501
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: WillConker <willconker@noreply.git.minetest.land>
Co-committed-by: WillConker <willconker@noreply.git.minetest.land>
2024-09-15 23:08:37 +02:00
the-real-herowl
6eb0d3c9d9 Merge pull request 'SmallJoker's mod load order patches' (#4541) from dependency_paradise into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4541
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-09-15 22:25:44 +02:00
teknomunk
1707eef672 Fix two additional dependency issues 2024-09-15 22:25:44 +02:00
SmallJoker
fb3e9dae84 autogroup: Do node overwrites after all mods have loaded 2024-09-15 22:25:44 +02:00
SmallJoker
7f5b19cda8 Fix missing dependencies for random_mod_load_order 2024-09-15 22:25:44 +02:00
the-real-herowl
7f372d066e Merge pull request 'FIX spawning' (#4636) from kno10/VoxeLibre:fix-spawning-brown-paperbag into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4636
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-09-15 22:21:23 +02:00
kno10
f9290c6493 drop entirely 2024-09-15 22:21:23 +02:00
kno10
52124bd201 FIX spawning 2024-09-15 22:21:23 +02:00
Mikita Wiśniewski
19d662dee4 Fix some typos in the API documentation (#4630)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4630
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-12 18:13:52 +02:00
the-real-herowl
2be54212b7 Merge pull request 'Performance optimizations of spawning' (#4470) from kno10/VoxeLibre:delay_binome_check into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4470
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-09-09 20:41:27 +02:00
kno10
7d763b7257 more mob spawn code improvements 2024-09-09 20:33:03 +02:00
kno10
bdd3ae2cd8 avoid spawning ground mobs in shallow water 2024-09-09 20:33:03 +02:00
kno10
2e1df31399 Refactor and clean up spawn checks, optimize. 2024-09-09 20:33:03 +02:00
kno10
382a35bb44 delay biome check when spawning 2024-09-09 20:33:03 +02:00
kno10
0752ed17d8 Improve cacti and cane growth ABM (#4590)
- local functions, as they are not called by anywhere else
- delay water check of reed, first check height
- reduce number of get_node calls (for height 1,2,3 the old code used 4,5,4 calls, the new only 2,3,3)
- cane growth rate is also reduced

This will make the ABM cheaper.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4590
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-09 20:22:04 +02:00
kno10
72c7489976 use vector.new in mcl_dungeons (#4567)
No functional changes, just more vector API, which supposedly is faster?

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4567
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-09 20:08:30 +02:00
kno10
71881154e9 use vector.in_area instead of own code in mapgen (#4562)
`between` and `in_cube` duplicate functionality already in minetest `vector`.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4562
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-09 20:05:59 +02:00
kno10
6c38823606 More randomness for slime chunks (#4466)
Use a classic pseudo-random hashing approach, by multiplication of chunk numbers
with large primes that should be more random.
- make slime density (as 1 in N) and maximum light level (default: no limit) configurable
- Allow using a 3d chunking system where y is also used for hashing

This does *not* modify spawn frequency, only the chunk logic.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4466
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-09 19:58:54 +02:00
kno10
dd4898b319 Fix surface pools with deep holes (#4571)
Sometimes, pools would spawn deep underground and then produce deep holes.
I noticed that such pools would be at +48, at the block boundary.
IMHO this may be an error in minetest surface detection.

Nevertheless, here is a workaround: require air above pool spawns.

Also clean up the pool code

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4571
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-09 13:25:30 +02:00
JoseDouglas26
38822aba0a Piglin brutes are not immune to fire and lava (#4378)
Thank you again WillConker

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4378
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: JoseDouglas26 <josedouglas20002014@gmail.com>
Co-committed-by: JoseDouglas26 <josedouglas20002014@gmail.com>
2024-09-08 14:01:05 +02:00
kno10
d85febdb15 Cactus damage cleanup, drop redundant conditions (#4625)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4625
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-09-08 05:21:42 +02:00
Mikita Wiśniewski
fb4a6b0e7b Fix old angled heads not being converted (#4627)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4627
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-09-08 04:26:51 +02:00