Skip to content

Level Calculation Instability #448

Description

@mercurialmusic

Expected behavior

Treating this as a sort of draft issue since we're still trying to gather more info and nail down what's happening, but Level calculations went somewhat wild when we updated from Level-2.28.0-SNAPSHOT-b736 to Level-2.28.0-SNAPSHOT-b749.

We've been getting reports of high-level users suddenly having their levels reset completely, particularly on OneBlock, with some strange level fluctuations that can't be explained by block placement or tree growth, etc.

Not all users seem to be affected, and there isn't a permission-level difference at least between users who are affected or not, but more users seem to be affected than not.

Observed/Actual behavior

Levels are being wiped for some users and new calculations seem to be ignoring existing blocks on an island and only calculating new blocks placed since the last calculation was run.

I'm still trying to determine a trigger, but my current theory is a server restart wipes them or each calculation only takes into affect newly placed blocks since the last calculation.

From user reports:

when I check my oneblock level via /ob level, it tells me a different level every time i do it. i did it a few times because it originally (few days ago) said my level was -10 and i know i had at least level 100 because ive gotten the challenge for it. just now it told me level 60, the levels go up each time and its so weird

Another user reported that /ob detail seems to count blocks correctly but only newly placed blocks are reflected in the score. This was our top user who had a level over 13k, who logged on this morning to a level of -10:
Image

He tested with placing 22 netherite blocks and ran the level calculation again:
Image

So the new blocks are being calculated correctly, but the calculation is ignoring literally every other block on his otherwise massive island.

Select Level config.yml values relevant to the images above:

levelcost: 100
level-calc: blocks / level_cost
deathpenalty: 100

From blockconfig.yml:

blocks:
  netherite_block: 400

Steps/models to reproduce

Still working on this.

BentoBox version

[21:32:54 INFO]: Running PAPER 26.1.2.
[21:32:54 INFO]: (26.1.2-74-e4e17fc (MC: 26.1.2))
[21:32:54 INFO]: BentoBox version: 3.19.1-SNAPSHOT-b287
[21:32:54 INFO]: Database: JSON
[21:32:54 INFO]: Loaded Game Worlds:
[21:32:54 INFO]: acidisland_world (AcidIsland): Overworld, Nether, The End
[21:32:54 INFO]: boxed_world (Boxed): Overworld, Nether
[21:32:54 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, The End
[21:32:54 INFO]: oneblock_world (OneBlock): Overworld, Nether*
[21:32:54 INFO]: Loaded Addons:
[21:32:54 INFO]: AcidIsland 1.22.1-SNAPSHOT-b1116 (ENABLED)
[21:32:54 INFO]: AOneBlock 1.25.2-SNAPSHOT-b547 (ENABLED)
[21:32:54 INFO]: Bank 1.10.1 (ENABLED)
[21:32:54 INFO]: Border 4.8.4-SNAPSHOT-b319 (ENABLED)
[21:32:54 INFO]: Boxed 3.4.1-SNAPSHOT-b358 (ENABLED)
[21:32:54 INFO]: BSkyBlock 1.20.0-SNAPSHOT-b838 (ENABLED)
[21:32:54 INFO]: Challenges 1.7.0-SNAPSHOT-b676 (ENABLED)
[21:32:54 INFO]: DimensionalTrees 1.9.0-SNAPSHOT-b153 (ENABLED)
[21:32:54 INFO]: Greenhouses 1.9.5 (ENABLED)
[21:32:54 INFO]: InvSwitcher 1.19.1-SNAPSHOT-b324 (ENABLED)
[21:32:54 INFO]: Level 2.28.0-SNAPSHOT-b749 (ENABLED)
[21:32:54 INFO]: Limits 1.29.0 (ENABLED)
[21:32:54 INFO]: Warps 1.19.0-SNAPSHOT-b433 (ENABLED)

Plugin list

No response

Other

Happy to help if any more info would be helpful or you'd like us to test something in particular.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions