thedarkcolour / ExDeorum

Port of the original Ex Nihilo to 1.20+.
GNU General Public License v3.0
7 stars 3 forks source link

[enhancement] Display the odds in JEI of getting a drop from sieving in correct and more direct way #117

Open Gotkoew opened 3 weeks ago

Gotkoew commented 3 weeks ago

Problems with the current way of displaying odds (assuming we are using "type": "minecraft:binomial" in the recipe .json):

  1. Min. value will always be 0, even when "p", the probability of success per trial, exceeds 1 (100%). For example, if
    "result_amount": {
            "type": "minecraft:binomial",
            "p": 2,
            "n": 2
          }

    then it will display

    • Avg. Output: 4
    • Min: 0
    • Max: 2

which is incorrect, as i will always output 2 items.

  1. Problem is visible in the example above; Avg. Output: (4) is higher than Max: (2), which is not possible. When sieving though, it's actually impossible to get more drops than "n", the amount of trials (same number as Max:).

I suggest changing/adding an alternative version to display the odds, such as displaying the actual values of "n" and "p". Original

New

thedarkcolour commented 1 week ago

Well p>1 is incorrect. In a binomial distribution, p is the probability that an item is dropped.