Bountiful

Bountiful

49M Downloads

[Bug]: JVM vendor seemingly dictates objective variety

ejektaflex opened this issue ยท 1 comments

commented

What happened?

It seems like, depending on the JVM vendor, objective variety may be different.

How can we reproduce it?

User used one reward:

{
    "content": {

        "reward_coin": {
            "type": "item",
            "rarity": "COMMON",
            "content": "simcur:small_coin",
            "amount": {
                "min": 16,
                "max": 32
            },
            "unitWorth": 200
        }
    }
}

And 30+ objectives:

eUZwYuME.txt

These all should be roughly equal on a Rep 0 board, since the worth ranges are identical. However, the affected user noticed that the board favored certain specific objectives nearing the top of the objective pool and not ones near the bottom.

I hypothesized that this could be due to an implicit ordering used by a Map<,> on the JVM when picking objectives - since map order is undefined and vendor/implementation specific, then it could be that we are implicitely relying on it without realizing it.

User tested on Adoptium JDK instead of Oracle JDK and noticed that results were supposedly different, which is what led to creation of this issue.

Mod Version

1.20.1

Mod Loader

None

Mod Loader Version

Unknown/Irrelevant

Relevant log output

No response

commented

Closing this, as user was unable to replicate this a second time.