[1.12.2] Random values don't work correctly in palettes and spawning of buildings
spaseksplorer opened this issue ยท 13 comments
In the profile config, setting the park or fountain spawn chance to 0.0 does not prevent parks or fountains from spawning.
In palettes, the random values seem to have a underlying max sum they are trying to fill. Setting the random weights for blocks too low (so the sum of the weights is less than 100) makes the structure spawn with empty spaces where blocks should be. Setting the random weights for blocks to high (>100 each) prevents later items in the list from generating in the parts.
No idea about the fountains
yes indeed. That's how it is implemented for the random blocks
Why is the random weights for blocks implemented that way? Why is there an invisible, arbitrary limit to the value of weights I put in?
The limit is actually 128. So a weight of 32 means 1/4 chance.
This is done for efficiency reasons
The 1000 basically means: all the rest. Because the mod automatically caps the maximum to 128. So it's an easy way of saying: 'if it's not one of the above then take this'
Then how do the palettes that ship with the mod work? They have values of 8, 9, and 1000.
How does setting a limit improve efficiency? Is it possible to remove this limit?
It uses a lookup table internally with 128 values. So no, not possible to remove this limit
ok, but it's not possible. Also you asked for 1.12.2 and I no longer work on 1.12.2 (or 1.16.5)
To have finer control over the random weights. So it can actually function like a true weighted list.
Why is it not possible? Could you add a comment to the docs describing this limit then?
Line 738 might need to go where line 729 is to fix the parks still spawning issue.