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

Cleanup chunkgen & reduce the size and number of oceans #79

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

maityyy
Copy link
Contributor

@maityyy maityyy commented Oct 17, 2024

See #74

This PR is a second attempt of #78

  • Despite the large code changes, the chunkgen is fully preserved — the datagen files confirm this
  • In addition to cleaning up the code, I also documented all the chunkgen changes (mine and those made before me)

Example seed:
-1811070148404453930

/execute in aylyth:aylyth run tp @s 0 250 0

Old:
image

New:
image

context.register(TEMPERATURE, new NoiseParameters(-10, 1.5, 0, 1, 0, 0, 0));
context.register(VEGETATION, new NoiseParameters(-8, 1, 1, 0, 0, 0, 0));
context.register(CONTINENTS, new NoiseParameters(-9, 1, 1, 2, 2, 2, 1, 1, 1, 1));
context.register(EROSION, new NoiseParameters(-9, 1, 1, 0, 0, 1, 1)); // [1, 0, 1, 1] -> [1, 0, 0, 1, 1]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to know why this change was made

private static DensityFunction caves(RegistryEntry<NoiseParameters> cavesLayerNoise, RegistryEntry<NoiseParameters> cavesCheeseNoise, DensityFunction slopedCheese, DensityFunction cavesSpaghetti2d, DensityFunction cavesSpaghettiRoughness, DensityFunction cavesEntrances, DensityFunction cavesPillars) {
var cavesLayer = mul(constant(4), noise(cavesLayerNoise, 8).square());
var cavesCheese = add(
add(constant(0.27), noise(cavesCheeseNoise, 2, 0.95)).clamp(-1, 1), // 1 -> 2; 0.6666666666666666 -> 0.95
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, what does it do?

Comment on lines -133 to -136
constant(-0.95),
mul(
constant(-0.35),
noise(noiseParameters.getOrThrow(SPAGHETTI_2D_THICKNESS), 2.0, 1.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

About the cave changes, here's the original code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant