Commit Graph

288 Commits

Author SHA1 Message Date
Zasco
351e31a889 Move deepslate ore registration within generation check 2023-12-12 23:16:51 +00:00
ancientmarinerdev
10a3d06360 Fix global variable references and exit mob_step if missing pos 2023-05-22 21:05:12 +00:00
ancientmarinerdev
3b1464ecc8 Tweak leaf generator numbers to catch missed jungle leaves 2023-04-16 17:50:22 +01:00
ancientmarinerdev
1015f5a569 Optimize folliage fixes code 2023-04-16 16:20:45 +00:00
ancientmarinerdev
31b65bac91 Move generator code to functions to aid in profiling 2023-04-16 16:20:45 +00:00
FossFanatic
01ac9ad685 Add old method back for foliage
This commit adds back the old `set_node` method for the foliage, since the foliage is much more difficult to work with via the VoxelManip method due to them being part of schematics that could span across mapblocks in some cases.

The old method will complement the new one by running after the VoxelManip has done its job, and fixes any foliage that the VoxelManip had missed.
2023-04-16 16:20:45 +00:00
FossFanatic
d28dcb1b10 Another small change to account for mangrove leaves
This one should actually work as expected.
2023-04-16 16:20:45 +00:00
FossFanatic
aac6af4c20 Small change to account for mangrove leaves 2023-04-16 16:20:45 +00:00
FossFanatic
d8d83dd21c Make vines use voxelmanip colouring as well
This commit adds some code to the `set_foliage_palette` function which checks for the `param2` of the foliage node in question to see whether or not said `param2` value is `0` upon first being generated.

If it isn't, then it's safe to assume that said foliage is a vine, and therefore needs to use the other method of calculating the final `param2` value.
2023-04-16 16:20:45 +00:00
FossFanatic
76bf98b26c Use voxelmanip to set the correct param2 for nodes
Voxelmanip is now used to set the correct `param2` for the nodes which use biome colouring or, in the case of seagrass, the correct meshoption.
2023-04-16 16:20:44 +00:00
ancientmarinerdev
0abc0ffc48 Mapgen optimisations 2023-04-01 18:53:51 +00:00
ancientmarinerdev
6989e00af7 Tweak lapis distribution. 2023-03-19 18:01:39 +00:00
FossFanatic
b80dd0294c Change the grass LBM & generator
This commit makes the grass LBM & generator look for nodes in the `grass_palette` group, instead of looking at a local list.
2023-03-05 12:45:44 +00:00
FossFanatic
a457853938 Improve code relating to vines
This commit makes the LBM and `register_on_generated` for foliage now use the better calculation for the vines.
2023-02-27 20:25:36 +00:00
FossFanatic
686bb38546 Add lbm and register_on_generated for water 2023-02-18 08:23:40 +00:00
FossFanatic
10d9eb2980 Upload files to 'mods/MAPGEN/mcl_mapgen_core' 2023-02-15 12:23:58 +00:00
FossFanatic
3d9df5c797 Fix issue with vines in certain biomes
This commit removes some excessive checks which caused vines to not get a biome colour in certain biomes at certain rotations.
2023-02-15 12:20:15 +00:00
FossFanatic
f919f73c24 Improve some code 2023-02-14 18:14:10 +00:00
FossFanatic
fee4ccf096 Convert old player leaves into new system
This commit adds a couple of lines to the `mcl_mapgen_core:fix_foliage_palette_indexes"` LBM, which ensures that player leaves which were placed before this update get converted into the new player leaves.

I would have included mangrove leaves, but decided against it because of an issue where the `param2` of mangrove leaves was accidentally set to 1 (in the schematics?). This meant that if I included mangrove leaves, the LBM would have converted the natural leaves as well.

This would have made it very tedious to clean up the leaves after chopping down a mangrove tree, since these would not rot by themselves.
2023-02-14 11:20:00 +00:00
FossFanatic
f653f47f26 Improve the new code somewhat 2023-02-14 08:36:49 +00:00
FossFanatic
aeddb7675f Don't run LBMs at every load
This commit makes it so the LBMs don't run at every load.

This commit also adds some new `minetest.register_on_generated()` code, which should ensure that any newly generated mapblocks have the correct foliage colours.
2023-02-13 18:50:26 +00:00
FossFanatic
2ccfd89379 Add nil checks 2023-02-13 15:49:19 +00:00
FossFanatic
1c84bc6572 Put all affected grass blocks in a local
This commit puts all nodes which make use of the grass palette in a local, to make for less messy code.
2023-02-13 10:33:47 +00:00
FossFanatic
3590ff6dfb Improve some LBM code 2023-02-12 08:23:19 +00:00
FossFanatic
b789845f62 Indentation improvements 2023-02-10 15:19:02 +00:00
FossFanatic
4ddab8bdf1 Remove the ABMs
There are likely better ways to fix any palettes that the LBMs missed.
2023-02-09 16:16:13 +00:00
FossFanatic
b95ebb3fca Add LBMs, ABMs, and more
This commit adds 1 new LBM (for foliage) and 2 new ABMs (one for foliage, and one for grass).

This also adds a new generator so any new maps created will have biome coloured leaves with a faster method. (Vines are excluded from this generator since I don't know yet how to get those to work with this.)
2023-02-08 16:17:33 +00:00
FossFanatic
cbb3260471 Make the palette fix LBM not run on v6 & singlenode
This fixes a crash when loading a world that doesn't have any biomes and the LBM tries to give the grassy nodes a biome colour.
2023-02-01 22:35:13 +00:00
FossFanatic
9afdd09d9d Fix wrong init accident
I accidentally put the `init.lua` of `mcl_biomes` instead of `mcl_mapgen_core` in my previous commit. This fixes that.
2023-01-23 10:25:48 +00:00
FossFanatic
2d81d153bd Unsimplify the LBM 2023-01-22 18:02:31 +00:00
FossFanatic
dc7a46df4e Simplify the LBM even more 2023-01-22 17:46:17 +00:00
FossFanatic
ad25b0bc4b Make set palette safer 2023-01-22 16:51:40 +00:00
FossFanatic
b77260253a Make grass palette fix LBM more efficient 2023-01-22 15:59:10 +00:00
FossFanatic
9746dbc376 Make the LBM run at every load again
After testing this out, it seems that the LBM only works consistenly when it runs at every load.
2023-01-17 16:04:12 +00:00
FossFanatic
a500528613 Make the LBM run only once
Since some people complained about the LBM running at every load, I changed it so it only runs once instead. It shouldn't even need to run more than once anyways, unless somebody could prove the contrary.
2023-01-13 17:58:51 +00:00
FossFanatic
5ec7b8ed89 Add LBM to fix grass palette indexes
Adds a LBM which basically fixes the grass palette indexes of the nodes from older worlds. I have also added some more nodes to `block_fixes`.
2022-12-29 14:18:37 +00:00
FossFanatic
137179ac8e revert 3afb42b2f7
revert Add a LBM to fix grass palette indexes on older worlds
2022-12-29 14:13:50 +00:00
FossFanatic
3afb42b2f7 Add a LBM to fix grass palette indexes on older worlds 2022-12-29 14:12:00 +00:00
FossFanatic
c1cde073c8 Rename _mcl_palette_index to _mcl_grass_palette_index 2022-12-28 19:34:24 +00:00
FossFanatic
1f601c68c5 Make snowy grass blocks have a palette index
This fixes the issue where snowy grass blocks always have the same coloured grass underneath them.
2022-12-28 17:02:58 +00:00
cora
fe68e1eaac Generate netherrack and ores under the lava
another hack using minetest.generate_ores this time
2022-11-01 04:52:17 +01:00
cora
5d26595f4a enforce cavern setting for nether generation
people unticking the "caverns" box probably do not expect that this
only applies to nether "terrain"
2022-11-01 04:52:17 +01:00
cora
98dad0b191 Generate netherrack under the bedrock ceiling
this is a somewhat ugly hack that uses minetest.generate_decorations
which generates decorations regardless of biome so additional steps
had to be taken to ensure no other decorations "spill over" due to
this.
2022-11-01 04:52:17 +01:00
cora
d866b61d1c Add lower cavern threshhold for all mgs that support it 2022-11-01 04:52:17 +01:00
cora
a03973a80b tweak v7 cavern threshhold for larger nether caves 2022-11-01 04:52:17 +01:00
cora
a8a55f9d6e don't run block fixes at all in singlenode 2022-10-22 12:10:29 +02:00
cora
2a10be4174 Fix possible crash in v6 / singlenode mapgen 2022-10-22 12:10:29 +02:00
cora
642559c758 Fix issue with wrong lighting in caves 2022-09-16 15:09:32 +02:00
cora
47d06ff6b9 Fix undeclared var 2022-09-14 20:37:08 +00:00
cora
78703d2baa Fix lighting issues in the end 2022-09-14 20:37:08 +00:00