TelepathicGrunt / RepurposedStructures

Reusing and modifying vanilla structures for extra variety!
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures
GNU Lesser General Public License v3.0
165 stars 26 forks source link

[1.18.2] Unsafe Park, world generation hang #269

Closed Reshy closed 1 year ago

Reshy commented 1 year ago

Thread Dump: https://pastebin.com/bCyXeiXn

"Worker-Main-8" #90 daemon prio=5 os_prio=0 cpu=149828.12ms elapsed=2684.04s tid=0x00000277d5806410 nid=0x7424 waiting on condition [0x000000a4403fd000] java.lang.Thread.State: WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@17.0.1/Native Method)

TelepathicGrunt commented 1 year ago

Check out my message here about the explorer map lag issue: https://github.com/TelepathicGrunt/RepurposedStructures/issues/266#issuecomment-1454687066

Basically, this is more of a vanilla issue where explorer maps takes extra long time to find a structure if the structure is rare and far away. As it searches, it stalls the game.

I already worked around the vanilla issue in 1.19.2 by offloading the work to a separate thread so the server/game no longer stalls. For now, in 1.18.2, you can override the wandering trader map json file I linked in my message I linked above. Then you can remove the problematic map items from trades

Reshy commented 1 year ago

That's good to know about Async Locator, maybe worth updating the description for 1.18.2 to install it possibly to mitigate lag?

Reshy commented 1 year ago

The option to disable the feature entirely seems to only work for the 1.19.2 version, checked and no version 1.18.2 so I guess I'll be doing Async Locator for certain.

TelepathicGrunt commented 1 year ago

There is no config option because it is in JSON and is meant to be overridden by datapack. The JSON existed in 1.18.2: https://github.com/TelepathicGrunt/RepurposedStructures/tree/1.18.2-Forge/src/main/resources/data/repurposed_structures/structure_map_trades

To disable, you make a datapack that overrides this and removes the entries. Like this: Repurposed_Structures-No_Map_Trades.zip

That's how you disable it.