GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
154 stars 63 forks source link

Server still crashes when generating loot #4271

Closed ArmonicPvP closed 2 months ago

ArmonicPvP commented 4 months ago

Describe the bug

Server crashes when generating loot

https://hastebin.com/share/uyedivikur.markdown

https://github.com/GC-spigot/AdvancedEnchantments/issues/4233

How to reproduce

Generate loot in 1.20.4

Screenshots / Videos

No response

"/ae plinfo" link

https://paste.md-5.net/jawahixibe

Server Log

No response

SirJben commented 4 months ago

Helloo @ArmonicPvP did you modified your loot file? If so, send it here.

ArmonicPvP commented 4 months ago

https://hastebin.com/share/ucezekukik.yaml

GC-spigot commented 4 months ago

Does the default configuration crash for you or is this modified?

ArmonicPvP commented 4 months ago

Default configuration of the lootConfiguration.yml or the whole plugin? I've modified most of the configs.

ThomasWega commented 4 months ago

try with default loot config first. If it still crashes try with everything fresh

ArmonicPvP commented 4 months ago

lootConfiguration.yml does not spawn randomized loot by default. I will enable it and test.

ArmonicPvP commented 4 months ago

Still happens, even with completely default settings. I've attached my config settings as well. I am going to see if I can figure out what structure (or generation) is causing the issue.

config.zip

ArmonicPvP commented 4 months ago

Does debug show when loot is generated in chests?

ArmonicPvP commented 4 months ago

Got a massive one here: https://hastebin.com/share/pofiqeqapu.markdown

I went and counted the amount of chests in that spot. There are none. I checked the seed map. There are no structures around the area I generated. I expanded the area to instead of my set render distance to the server set render distance since I am unsure if paper only sends the chunks the player needs but generates the server distance chunks or if that is not the case. When doing so, I find these structures below: image

For testing, I set the maxItemsPerContainer to 18, 100% chance, and 95% random_enchant_book and 5% soul_tracker.

Here is the seed: 3571388013154003028

As a note, I am using Terralith, Incendium, and Structory. AdvancedEnchantments generates custom loot inside of the custom loot chests in all three of these datapacks.

Here is what I noticed:

My assumption is that an error appears when loot cannot be generated because there is no chest there when it expects there to be one and attempts to find it and lags the server.

ThomasWega commented 4 months ago

Aha! This might be the info we need to find out the issue. Great job and great testing! We'll look at it soon. Thank you!

ThomasWega commented 2 months ago

Please don't upload to hastebin. It has expired now. Wanted to take a look at it now, but cannot. Resend the logs if possible