Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default update mode does not change #150

Open
WindsorMacmillan opened this issue Mar 5, 2025 · 7 comments
Open

Default update mode does not change #150

WindsorMacmillan opened this issue Mar 5, 2025 · 7 comments
Assignees
Labels
Status: Under investigation Investigating the interest and the feasability of the issue. Type: Bug A bug in code.

Comments

@WindsorMacmillan
Copy link

Expected behavior

I attemped to change biomes default update mode due to players‘ misusage too many times.
So I edited config.yml as default-mode: CHUNK.

Image
Image

Observed/Actual behavior

No matter how I set the default update mode, left-click on the biome always changes on WHOLE island.

Image

Steps/models to reproduce

Using Bentobox 3.2.3 and BSkyBlock 1.19.0 on any spigot-based server.
Configure to [default-mode: CHUNK] in plugins\BentoBox\addons\Biomes\config.yml.
Execute command in game: /is biomes.
Left-click on a biome for default update mode.
Plugin shows "Starting biome changing to [biome] in XXX chunks", which is far more than changing only 1 chunk.

BentoBox version

[16:11:55 INFO]: Rodando PAPER 1.21.3.
[16:11:55 INFO]: (1.21.3-91-46e8b6c (MC: 1.21.3))
[16:11:55 INFO]: BentoBox versão: 3.2.3
[16:11:55 INFO]: Banco de dados: JSON
[16:11:55 INFO]: Mundos de Jogo Carregados:
[16:11:55 INFO]: bskyblock_world (空岛): Overworld, Nether, The End
[16:11:55 INFO]: Addons carregados:
[16:11:55 INFO]: Biomes 2.2.0 (ENABLED)
[16:11:55 INFO]: BSkyBlock 1.19.0 (ENABLED)
[16:11:55 INFO]: Challenges 1.4.0 (ENABLED)
[16:11:55 INFO]: Level 2.17.0 (ENABLED)
[16:11:55 INFO]: Visit 1.6.0 (ENABLED)
[16:11:55 INFO]: Warps 1.16.0 (ENABLED)

Plugin list

[16:12:17 INFO]: Server Plugins (52):
[16:12:17 INFO]: Paper Plugins:
[16:12:17 INFO]: - CrazyTotem
[16:12:17 INFO]: Bukkit Plugins:
[16:12:17 INFO]: - AdvancedCleaner, AuthMe, BentoBox, BentoBox-Biomes, BentoBox-BSkyBlock, BentoBox-Challenges, BentoBox-Level, BentoBox-Visit, BentoBox-Warps, BestTools
[16:12:17 INFO]: BlockPiglinsTranformation, CommandAPI, Craftorithm, CustomSprays, DecentHolograms, DMenuForPaper, EClock, Elevators, Essentials, EssentialsChat
[16:12:17 INFO]: EssentialsSpawn, fakeplayer, InteractiveChat, KcTransfer, LegendaryDailyQuests, LiteAnnouncer, LiteSignIn, LuckPerms, MythicMobs, Not-Too-Expensive
[16:12:17 INFO]: ObsidianToLava, OpenInv, PersonalPhantoms, PetPassenger, PlaceholderAPI, PlayerTitle, ProtocolLib, QuickShop-Hikari, RemoveEnchant, shears_item_frame
[16:12:17 INFO]: SkinsRestorer, SweetAdaptiveShop, SweetMiao, TabTPS, TreeCuter, Vault, ViaVersion, WanderingTrades, WorldEdit, XYFLY
[16:12:17 INFO]: yeeeesmotd

Other

Whole island biomes changing is quite easy to misuse. Hope default config can be set to Chunkmode for safer using purpose.

@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Mar 6, 2025
@tastybento tastybento self-assigned this Mar 6, 2025
@tastybento tastybento added the Type: Bug A bug in code. label Mar 7, 2025
@tastybento
Copy link
Member

The issue is that the biomes addon was originally designed for commands and then had the GUI added later. As a result, the GUI does not currently check the settings for the mode. The quick workaround is to set the action type to CHUNK in the addons/Bioomes/panels/main_panel.yml file, like this:

    biomes_button:
      data:
        type: BIOME
      actions:
        left:
          type: CHANGE
          # Supports ISLAND | CHUNK:NUMBER | RANGE:NUMBER
          content: CHUNK:1
          tooltip: biomes.gui.tips.left-click-to-apply

I'll look into changing the code so that it uses the settings in the config.yml rather than using the panel setting.

@tastybento
Copy link
Member

Note that a 1 chunk setting may not work how you expect - you may need to set the number of chunks to something like 3 to get sufficient coverage around the player.

Also, the original biomes command still works, e.g., users can select the style of biome change via the command line, e.g. /is biomes set pretty_caves ISLAND. This is probably something that should be turned off as well.

@WindsorMacmillan
Copy link
Author

Yes, players prefer GUI panel and get used to chunk mode. But they hardly ever use whole island mode, as I noticed. It is easy to directly left-click on the biome and then apply whole island update.

@BONNe
Copy link
Member

BONNe commented Mar 7, 2025

Actually, decoupling the GUI and Default action was done on purpose.

It was a request from a person that wanted the ability to have multiple different apply methods and use the content section of action to choose the update method.

The simple fix could be that if the content of action is not set, it should use default one. It would solve this issue, and keep needed behaviour.

@BONNe
Copy link
Member

BONNe commented Mar 7, 2025

The code could be something like this:

https://github.com/BentoBoxWorld/Biomes/blob/develop/src/main/java/world/bentobox/biomes/panels/user/BiomesPanel.java#L240C29-L240C74

 String[] split;

if (action.content() == null || action.content().isEmpty())
{ 
      split = new String[2];
      split[0] = this.addon.getSettings().getDefaultMode().name();
      split[1] = this.addon.getSettings().getDefaultSize();
}  
else
{
      split = action.content().split(":");
}

Also, it could validate if written action is a valid change mode. Not entirely necessary, as validation is done inside command itself.

And then to apply it to the default settings for people that do not want to have different change options for different biomes would be to remove:

@tastybento
Copy link
Member

Aha, that makes sense. Thanks for the explanation @BONNe. I'll put something together.

@WindsorMacmillan
Copy link
Author

Thanks, that's useful enough for my server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Under investigation Investigating the interest and the feasability of the issue. Type: Bug A bug in code.
Projects
None yet
Development

No branches or pull requests

3 participants