EwyBoy / OreTweaker

Add, remove, tweak and configure ore and underground generation features for Minecraft Forge
https://www.curseforge.com/minecraft/mc-mods/ore-tweaker
MIT License
20 stars 7 forks source link

[Feature] Make "spawnrate" support both count & chance #13

Closed Souperhero closed 3 years ago

Souperhero commented 3 years ago

No code or crashlog for this one, but more of a question leading to a suggestion.

Does spawnRate of 1 mean that 1 ore vein will spawn per chunk? If so, how possible is it to use a float so that between 0 and 1 would mean 1 vein every x chunks.

so a .11 would mean 1 vein every 9 chunks?

EwyBoy commented 3 years ago

Hello, Souperhero. Thank you for your suggestion. This can certainly be done. The minecraft world gen currently have 2 main categories for spawning in stuff.

  1. count (the one that is currently used)
  2. chance (pretty much what you proposed)

My plan is to make it so if you use a number less then 1 like 0.88 it will be converted into chance else it would use the regular count for whole integer numbers like 6 and 9.

EwyBoy commented 3 years ago

Both this and #12 will be added in the next major update since the changes required to the json file will break compatibility with earlier versions.

EwyBoy commented 3 years ago

Added in 2.3.1 on both 1.17 and 1.16