BentoBoxWorld / Level

Add on for BentoBox to calculate island levels for BSkyBlock and AcidIsland. Please read the Wiki!
Eclipse Public License 2.0
24 stars 31 forks source link

Level addon counts and adds ocean floor blocks to level. #284

Closed tirangaming closed 1 year ago

tirangaming commented 1 year ago

Expected behavior

Level zeroing a fresh new island

Observed/Actual behavior

When ocean floor is enabled on AcidIsland addon and after creating a new island and doing /ai level, the level is 5k or more.

Steps/models to reproduce

Enable ocean floor in acidisland config, add level addon, start server, create island, /ai level.

BentoBox version

Running PAPER 1.19.3. BentoBox version: 1.23.2-SNAPSHOT-b2386 Database: JSON Loaded Game Worlds: stranded_world (Stranded): Overworld, Nether, The End Loaded Addons: AcidIsland 1.17.2 (ENABLED) Bank 1.5.0 (ENABLED) Level 2.10.0 (ENABLED) MagicCobblestoneGenerator 2.5.1 (ENABLED) NPCIslander 1.1-RELEASE (ENABLED) Warps 1.13.0 (ENABLED)

Plugin list

No response

Other

This problem does not occur when ocean-floor is on false.

tastybento commented 1 year ago

Yes, this is a known issue, but still valid. The issue is that the chunks that could encompass the island are not generate yet, and so to zero, all the chunks of the island would have to be created before the zeroing was done. Unfortunately, this would be excessive in terms of server drain. The only way I can think of to solve this is to mark all the potential generation blocks, e.g., coral, as having zero value.

I'll try and work out how to make the sea floor worth nothing...

BONNe commented 1 year ago

Maybe you could listen for chunk generation and if zeroing is enabled, increase island initial level?

tastybento commented 1 year ago

Maybe you could listen for chunk generation and if zeroing is enabled, increase island initial level?

Hmm, maybe. However, there is an edge case where the chunk could cover more than one island, if they abut each other.

One simple solution is to make the default underwater blocks worth 0.

tastybento commented 1 year ago

So, I tried this with the latest builds and I couldn't get Level to show anything other than zero as the level. This is with default settings.

Screenshot 2023-05-17 at 12 46 23 PM

I tried reseting a number of times, and trying different island types, but always zero. I suspect there is something else going on. @tirangaming Do you have any different settings on your server maybe? Did you change the name of the AcidIsland world? Or do you have a short view distance that causes the chunks not to load?

tirangaming commented 1 year ago

My view distance is 29. Now that you said about the chunks, I created a new island and I flew around the island to load the chunks. I then calculated the level and surprise surprise the level was almost at 0.

The problem is unloaded chunks. A normal player will not use 30 view distance and go around to load the chunks. The island area is 200x200.

Is there something that can be done about it or I should disable the floor?

tastybento commented 1 year ago

No need to disable the floor. Change the worlds section of blockconfig.yml file in Level data folder to as follows:

worlds:
  caveblock-world:
    STONE: 0
    GRANITE: 0
    ANDESITE: 0
    DIORITE: 0
  acidisland_world:
    BRAIN_CORAL: 0
    BRAIN_CORAL_BLOCK: 0
    BRAIN_CORAL_FAN: 0
    BRAIN_CORAL_WALL_FAN: 0
    BUBBLE_CORAL: 0
    BUBBLE_CORAL_BLOCK: 0
    BUBBLE_CORAL_FAN: 0
    BUBBLE_CORAL_WALL_FAN: 0
    DEAD_BRAIN_CORAL: 0
    DEAD_BRAIN_CORAL_BLOCK: 0
    DEAD_BRAIN_CORAL_FAN: 0
    DEAD_BRAIN_CORAL_WALL_FAN: 0
    DEAD_BUBBLE_CORAL: 0
    DEAD_BUBBLE_CORAL_BLOCK: 0
    DEAD_BUBBLE_CORAL_FAN: 0
    DEAD_BUBBLE_CORAL_WALL_FAN: 0
    FIRE_CORAL: 0
    FIRE_CORAL_BLOCK: 0
    FIRE_CORAL_FAN: 0
    FIRE_CORAL_WALL_FAN: 0
    DEAD_FIRE_CORAL: 0
    DEAD_FIRE_CORAL_BLOCK: 0
    DEAD_FIRE_CORAL_FAN: 0
    DEAD_FIRE_CORAL_WALL_FAN: 0
    HORN_CORAL: 0
    HORN_CORAL_BLOCK: 0
    HORN_CORAL_FAN: 0
    HORN_CORAL_WALL_FAN: 0
    DEAD_HORN_CORAL: 0
    DEAD_HORN_CORAL_BLOCK: 0
    DEAD_HORN_CORAL_FAN: 0
    DEAD_HORN_CORAL_WALL_FAN: 0
    TUBE_CORAL: 0
    TUBE_CORAL_BLOCK: 0
    TUBE_CORAL_FAN: 0
    TUBE_CORAL_WALL_FAN: 0
    DEAD_TUBE_CORAL: 0
    DEAD_TUBE_CORAL_BLOCK: 0
    DEAD_TUBE_CORAL_FAN: 0
    DEAD_TUBE_CORAL_WALL_FAN: 0
    SAND: 0
    SANDSTONE: 0
    RED_SAND: 0
    ICE: 0
    AMETHYST_CLUSTER: 0
    AMETHYST_BLOCK: 0
    LARGE_AMETHYST_BUD: 0
    MEDIUM_AMETHYST_BUD: 0
    SMALL_AMETHYST_BUD: 0
    BUDDING_AMETHYST: 0
    SEA_PICKLE: 0
    CALCITE: 0
    TALL_SEAGRASS: 0
    SEAGRASS: 0
    SMOOTH_BASALT: 0
BONNe commented 1 year ago

VIEW DISTANCE 30 ::SCREEM:::

tirangaming commented 1 year ago

I changed it and was still finding blocks underwater like obsidian, stone, dirt, andesite, diorite, tuff. The level was only 10 but still not at zero, so I added those blocks in the config. Level went to zero after flying a little bit around but it still found some other blocks. Points until next level said 9 so still some blocks. I guess I will have to decide if I either remain with the floor or remove the level addon for good