BentoBoxWorld / Boxed

A game mode where you are boxed into a tiny space that only expands by completing advancements
Eclipse Public License 2.0
15 stars 4 forks source link

Box size decreases following server restart #96

Closed mattc4t closed 1 month ago

mattc4t commented 2 months ago

Expected behavior

The box should stay at the size that it was prior to server restart.

Observed/Actual behavior

Players see the box has decreased in size following server restart.

Steps/models to reproduce

image

-Get some advancements in boxed that increase the box size -Restart the server

(Note: In the attached image, a player waited until a regular restart of our paper server running boxed; and noted the difference in box size prior to restart, and after the server started again. We had not been able to identify when the box was decreasing in size...)

BentoBox version

21.09 07:22:37 [Multicraft] admin ran command: bbox version 21.09 07:22:37 [Server] INFO Running PAPER 1.21.1. 21.09 07:22:37 [Server] INFO (1.21.1-56-227c94a (MC: 1.21.1)) 21.09 07:22:37 [Server] INFO BentoBox version: 2.5.3 21.09 07:22:37 [Server] INFO Database: JSON 21.09 07:22:37 [Server] INFO Loaded Game Worlds: 21.09 07:22:37 [Server] INFO acidisland_world (AcidIsland): Overworld, Nether, The End 21.09 07:22:37 [Server] INFO boxed_world (Boxed): Overworld, Nether 21.09 07:22:37 [Server] INFO bskyblock_world (BSkyBlock): Overworld, Nether, The End 21.09 07:22:37 [Server] INFO caveblock-world (CaveBlock): Overworld, Nether, The End 21.09 07:22:37 [Server] INFO oneblock_world (OneBlock): Overworld, Nether, The End 21.09 07:22:37 [Server] INFO skygrid-world (SkyGrid): Overworld, Nether, The End 21.09 07:22:37 [Server] INFO Loaded Addons: 21.09 07:22:37 [Server] INFO AcidIsland 1.19.0 (ENABLED) 21.09 07:22:37 [Server] INFO AOneBlock 1.17.0 (ENABLED) 21.09 07:22:37 [Server] INFO Biomes 2.1.1 (ENABLED) 21.09 07:22:37 [Server] INFO Border 4.3.0 (ENABLED) 21.09 07:22:37 [Server] INFO Boxed 2.7.2 (ENABLED) 21.09 07:22:37 [Server] INFO BSkyBlock 1.18.1 (ENABLED) 21.09 07:22:37 [Server] INFO CauldronWitchery 2.0.1 (ENABLED) 21.09 07:22:37 [Server] INFO CaveBlock 1.19.0 (ENABLED) 21.09 07:22:37 [Server] INFO Challenges 1.3.1 (ENABLED) 21.09 07:22:37 [Server] INFO Chat 1.1.4 (ENABLED) 21.09 07:22:37 [Server] INFO CheckMeOut 1.1.1 (ENABLED) 21.09 07:22:37 [Server] INFO ControlPanel 1.13.1 (ENABLED) 21.09 07:22:37 [Server] INFO DimensionalTrees 1.7.0 (ENABLED) 21.09 07:22:37 [Server] INFO ExtraMobs 1.12 (ENABLED) 21.09 07:22:37 [Server] INFO Greenhouses 1.7.5 (ENABLED) 21.09 07:22:37 [Server] INFO InvSwitcher 1.13.0 (ENABLED) 21.09 07:22:37 [Server] INFO Level 2.15.0 (ENABLED) 21.09 07:22:37 [Server] INFO Likes 2.4.0 (ENABLED)

Plugin list

21.09 07:23:22 [Server] INFO Bukkit Plugins: 21.09 07:23:22 [Server] INFO - AdminNotes, BanManager, BentoBox, BentoBox-AcidIsland, BentoBox-AOneBlock, BentoBox-Biomes, BentoBox-Boxed, BentoBox-BSkyBlock, BentoBox-CauldronWitchery, BentoBox-CaveBlock 21.09 07:23:22 [Server] INFO BentoBox-Challenges, BentoBox-CheckMeOut, BentoBox-Greenhouses, BentoBox-Level, BentoBox-Likes, BentoBox-Limits, BentoBox-MagicCobblestoneGenerator, BentoBox-SkyGrid, BentoBox-Visit, BentoBox-Warps 21.09 07:23:22 [Server] INFO BlocksHub, BungeeTabListPlus, ChatControlRed, ColoredBooked, ColoredSigns, ConsoleSay, CoreProtect, Essentials, FastAsyncWorldEdit, LuckPerms 21.09 07:23:22 [Server] INFO LumberJack, Multiverse-Core, Multiverse-NetherPortals, MyCommand, ParticleNativeAPI, PlaceholderAPI, PremiumVanish, ProtocolLib, SignEdit, TicketManager 21.09 07:23:22 [Server] INFO Vault, ViaBackwards, ViaVersion, VoidGen, WarpSystem, WorldEditSelectionVisualizer, WorldGuard

Other

I did not see any errors in plugins during server shutdown. Boxed world regions/chunks saved fine... as did other Bentobox worlds.

tastybento commented 2 months ago

The box size is regularly updated based on the value of the advancements the player has done. Did those change at all? If you restarted the the advancements config file would have been reloaded.

mattc4t commented 2 months ago

I last updated the advancement file on the 15th to enable advancements for building a crafting table and wooden pickaxe. Our server restarts nightly, with no other changes to the advancement file through those nightly restarts. advancements.yml.txt

(I've provided a copy of the advancement file, with extension changed to .txt so it could attach here...)

tastybento commented 2 months ago

I could not replicate this in general, however, I suspect I know what happened.

Firstly, I should explain a few things about your advancements.yml file:

  1. You have automatic-scoring: true set, so all of the custom scores in the advancements: are ignored. Nothing will be used there at all.
  2. The changes you made to the score for the wooden_pickaxe and crafting table recipes will not be used because automatic-scoring: true, but even if it did, these advancements are not for making a wooden pickaxe or a crafting table but simply for "discovering" the recipe. Everyone gets the crafting table recipe by default immediately actually, and to get the wooden pickaxe recipe, you just need to make sticks from planks of wood. If you want to give points for crafting those items, you would have to make some custom Advancements and put them into a data pack.
  3. In general, giving points for recipes is not a good idea because it's too easy and not really an advancement, so usually all recipes are scored as zero. That is why unknown-recipe-increase: 0.
  4. Now, in testing this, I realized that there is actually a bug with custom recipe scores - they were never being given out, even if set, and automatic-scoring: false. So, I have fixed that, but that is not related to your problem.

So, what happened for you? The only reason why a box would have contracted would be because the score for the Advancements had changed. I suspect that you have have originally have set automatic-scoring: false and had some scores in there that when the file was edited and then automatic-scoring: true became active, the scores were different. Then the box became smaller. I don't know if this is what happened exactly, but this is the only way I can think of it happening.

If you want to give the player their blocks back, you could switch back to non-automatic scoring, but then you'd need to adjust the file to give more blocks for some of the Advancements. If you have backups of your server you may be able to find the original file before you edited it and see what it had.

I hope this helps!

mattc4t commented 2 months ago

Yes, this has been helpful. Thank you for describing the setting as well as the behavior for advancements in the file: I agree that merely having a recipe for crafting table and wooden pickaxe and counting that as an advancement that increases box size, is not a good idea!

I had only made two changes from the original advancement file (for crafting table and wooden pickaxe), so I restored the advancement configuration back to the original one generated by the Boxed add-in.

I have started checking for other possible causes for the issue:

tastybento commented 2 months ago

There is another possibility - if the player received a boost to their range via a command then it only lasts until they log back in because then the Advancements are calculated again. Maybe an admin gave it.

There is also the possibility that the box moved? This is possible with the Ender Pearl. Not sure if you enable that but that can shift the box.

Also, if you do /boxadmin info in their box then it will tell you the largest the box has ever been and then the current size. This at least will confirm that they did indeed have a larger box at some point.

mattc4t commented 2 months ago

Thank you! I will follow-up with the player on that and check their box..