Skip to content

Instantly share code, notes, and snippets.

@misode
Last active October 1, 2023 23:03
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save misode/b83bfe4964e6bf53b2dd31b22ee94157 to your computer and use it in GitHub Desktop.
Save misode/b83bfe4964e6bf53b2dd31b22ee94157 to your computer and use it in GitHub Desktop.

Generator Settings

20w21a

Table of Contents
Noise
size_horizontal and size_vertical
density_factor and density_offset
sampling
top_slide and bottom_slide
Structures
spacing and separation
salt

External Links

Noise

size_horizontal and size_vertical

Integers between 1 and 4.

size_horizontal
size_vertical

1 2 4
1 size_horizontal_1_vertical_1 size_horizontal_2_vertical_1 size_horizontal_4_vertical_1
2 size_horizontal_1_vertical_2 size_horizontal_2_vertical_2 size_horizontal_4_vertical_2
3 size_horizontal_1_vertical_3 size_horizontal_2_vertical_3 size_horizontal_4_vertical_3
4 size_horizontal_1_vertical_4 size_horizontal_2_vertical_4 size_horizontal_4_vertical_4

Surprisingly, when size_horizontal is 3, it generates this interesting pattern size_horizontal_3_vertical_1

density_factor and density_offset

When editing these values, you need to keep in mind the following formula.

terrain height = ((density_offset / density_factor) + 1) * height / 2
density_factor density_offset
0.5 -0.25 density_factor_0.5_offset_n0.25
1 -0.5 density_factor_1_offset_n0.5
2 -1 density_factor_2_offset_n1
4 -2 density_factor_4_offset_n2

sampling

xz_scale

0.25 1 8
scale_0_25_factor_80 scale_1_factor_80 scale_8_factor_80

Setting xz_scale to 0 will cause a flat surface.

xz_factor

20 80 320
scale_1_factor_20 scale_1_factor_80 scale_1_factor_320

top_slide and bottom_slide

WIP

target

size

offset

Structures

spacing and separation

spacing determines the maximum space in chunks between two structures of this type. separation determines the minimum space in chunks. spacing must be larger than separation. A grid pattern forms when spacing is one larger than separation.

separation
spacing

1 2 3
2 separation_1_spacing_2
3 separation_1_spacing_3 separation_2_spacing_3
4 separation_1_spacing_4 separation_2_spacing_4 separation_3_spacing_4
5 separation_1_spacing_5 separation_2_spacing_5 separation_3_spacing_5

salt

Determines the random placement of the structures after being combined with the seed.

@MentalMouse
Copy link

MentalMouse commented Oct 6, 2020

The "checkerboard" type for the custom dimension generator doesn't seem to be generating syntax that's acceptable to the game. (As of 1.16.3

@jerDozzk
Copy link

jerDozzk commented Apr 5, 2022

I finally figured out why a size_horizontal of 3 causes the grid like patterns to occur. In one of the classes relating to world generation, the extracted size_horizontal is converted using bit shift operators to a different number. This number is usually a multiple of 16 if the size_horizontal number is either 1,2 or 4. However, for if it is 3, the conversion method spits out a 12.

This matters because in the chunk generator class, 16 is divided by the conversion value, and is usually resulted in an integer that is greater than 1. So, for a size_horizontal of 3, the conversion value is 12, and so, 16/12 = 1.333333.....; This value is taken into a for-loop(have not figured out what it does), and the iteration index is compared to if it is less than the states value above, and so it essentially is rounded down to 1. I would assume that this causes 1/4 of a chunk to not be generated. More testing is still needed. I will post a more detailed comment later on; still at work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment