You can now set a weight for materials in the replaceWith and replenish As section for regions and the replaceWith section for the dynamic regions by right clicking the materials in the appropriate GUI and typing out a whole number!
In file, data for these sections are now stored as "Material,weight" instead of just Material now, for example "COBBLESTONE,50"
How rolling a block will go will be as follows:
Given this list:
GOLD_ORE,10
IRON_ORE,50
STONE,160
- The maximum weight is selected as the upper (exclusionary) boundary for the random number roll, meaning in this case, a number from 0-160 will be rolled.
- When a number is rolled, all potential blocks are checked from lowest to greatest weight. If the block’s chance is less than or equal to the roll, it and all other blocks with the same weight are put into a list and a random (equal chances) block is chosen from that list.
This means that Stone can only be rolled when 50 < roll <= 160, Gold Ore when roll <= 10, and Iron Ore when 10 < roll <= 50
Hope you all enjoy!