Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biome API / cavegen: Add definable cave liquid for a biome #7192

Merged
merged 1 commit into from
Apr 5, 2018
Merged

Biome API / cavegen: Add definable cave liquid for a biome #7192

merged 1 commit into from
Apr 5, 2018

Conversation

paramat
Copy link
Contributor

@paramat paramat commented Apr 3, 2018

For #7181
Integrates (at last) large pseudorandom cave liquids into the Biome API.
New biome field 'node_cave_liquid' added.
For each segment of a large cave the code gets the biome at (X, Y, Z) point.
If 'node_cave_liquid' is stated for that biome, it is used, otherwise falls back to classic hardcoded behaviour (lava or water according to a hardcoded 3D noise).

@paramat paramat added @ Script API @ Mapgen WIP Feature ✨ PRs that add or enhance a feature and removed WIP labels Apr 3, 2018
@paramat
Copy link
Contributor Author

paramat commented Apr 4, 2018

Testing with 4 very small scale biomes, to test change within a single large cave:
Stone with meselamps.
Sandstone with glowing sand.
Desert sandstone with glowing desert sand.
Silver sandstone with glowing silver sand.

screenshot_20180405_000734

screenshot_20180405_000810

@paramat paramat removed the WIP label Apr 4, 2018
@paramat
Copy link
Contributor Author

paramat commented Apr 4, 2018

Added docs, ready.

getintfield(L, index, "y_min", b->min_pos.Y);
b->max_pos = getv3s16field_default(L, index, "max_pos", v3s16(31000, 31000, 31000));
b->max_pos = getv3s16field_default(
L, index, "max_pos", v3s16(31000, 31000, 31000));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above is just splitting long lines.

@paramat
Copy link
Contributor Author

paramat commented Apr 4, 2018

Build fail is Travis error.

Add 'node_cave_liquid' as a new field in biome registration.
If field is absent cave liquids fall back to classic behaviour.
@paramat paramat merged commit 32d456b into minetest:master Apr 5, 2018
@paramat paramat mentioned this pull request Apr 5, 2018
@paramat paramat deleted the caveliquid branch April 20, 2018 21:37
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 23, 2019
…7192)

Add 'node_cave_liquid' as a new field in biome registration.
If field is absent cave liquids fall back to classic behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants