Random Pattern produces incorrect distribution
GavvyDizzle opened this issue ยท 2 comments
Server Implementation
Paper
Server Version
1.19.4
Describe the bug
Using very uncommon chance values to create a random pattern can have undesired behavior which causes a single block in the pattern to place (seems like the second block listed will place).
To Reproduce
The following commands are some examples I found:
//set 800000%stone,90000%iron_ore,10000%gold_ore
works as intended
//set 800001%stone,90000%iron_ore,10000%gold_ore
only places iron ore
//set 799999%stone,90000%iron_ore,10000%gold_ore
only places iron ore
//set 800000%stone,90000%iron_ore,10000%gold_ore,1%ancient_debris
only places iron ore
- Low values of ancient debris are inconsistent, but it seems like multiples of 10 work more often than numbers a few away
Expected behaviour
The commands are expected to produce a random distribution of blocks, which does not happen in some cases. The command works using WorldEdit 100% of the time
Screenshots / Videos
No response
Error log (if applicable)
No response
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/c375da465518440786e16f936d937f6b
Fawe Version
2.6.2-SNAPSHOT-416
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
Why you should go over 100% of all blocks in the first place? That does not make sense
The % is just how you add the chance to the pattern. I assumed should support any weight because WorldEdit does.
More specifically, I have a system that stores weights as integers. Instead of converting these to be out of 100%, I just pass in the weights directly and assumed the pattern would handle the rest.