Repurposed Structures (Quilt/Fabric)

Repurposed Structures (Quilt/Fabric)

8M Downloads

[1.18.2] Unsafe Park, world generation hang

Reshy opened this issue ยท 4 comments

commented

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([email protected]/Native Method)
- parking to wait for <0x000000076fb16840> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
at java.util.concurrent.CompletableFuture$Signaller.block([email protected]/CompletableFuture.java:1864)
at java.util.concurrent.ForkJoinPool.compensatedBlock([email protected]/ForkJoinPool.java:3449)
at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3432)
at java.util.concurrent.CompletableFuture.waitingGet([email protected]/CompletableFuture.java:1898)
at java.util.concurrent.CompletableFuture.join([email protected]/CompletableFuture.java:2117)
at net.minecraft.server.level.ServerChunkCache.getChunkOffThread([email protected]/ServerChunkCache.java:1177)
at net.minecraft.server.level.ServerChunkCache.m_7587_([email protected]/ServerChunkCache.java:1142)
at net.minecraft.world.level.Level.m_6522_([email protected]/Level.java:169)
at net.minecraft.world.level.Level.m_46819_([email protected]/Level.java:2086)
at net.minecraft.world.level.chunk.ChunkGenerator.m_208059_([email protected]/ChunkGenerator.java:371)
at net.minecraft.world.level.chunk.ChunkGenerator.m_207970_([email protected]/ChunkGenerator.java:303)
at com.telepathicgrunt.repurposedstructures.misc.maptrades.StructureSpecificMaps$TreasureMapForEmeralds.getOffer([email protected]+1.18.2/StructureSpecificMaps.java:82)
at com.telepathicgrunt.repurposedstructures.misc.maptrades.StructureSpecificMaps$TreasureMapForEmeralds.m_5670_([email protected]+1.18.2/StructureSpecificMaps.java:66)
at net.minecraft.world.entity.npc.WanderingTrader.m_7604_([email protected]/WanderingTrader.java:131)
at net.minecraft.world.entity.npc.AbstractVillager.m_6616_([email protected]/AbstractVillager.java:99)
at net.minecraft.world.entity.npc.AbstractVillager.m_7380_([email protected]/AbstractVillager.java:149)
at net.minecraft.world.entity.npc.WanderingTrader.m_7380_([email protected]/WanderingTrader.java:139)
at net.minecraft.world.entity.Entity.m_20240_([email protected]/Entity.java:1494)
at net.minecraft.world.entity.Entity.m_20086_([email protected]/Entity.java:1421)
at net.minecraft.world.entity.Entity.m_20223_([email protected]/Entity.java:1428)
at net.minecraft.world.level.chunk.ProtoChunk.m_6286_([email protected]/ProtoChunk.java:185)
at net.minecraft.server.level.WorldGenRegion.m_7967_([email protected]/WorldGenRegion.java:318)
at net.minecraft.world.level.ServerLevelAccessor$$Lambda$50921/0x0000000804f85378.accept([email protected]/Unknown Source)
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining([email protected]/Streams.java:411)
at java.util.stream.ReferencePipeline$Head.forEach([email protected]/ReferencePipeline.java:762)
at net.minecraft.world.level.ServerLevelAccessor.m_47205_([email protected]/ServerLevelAccessor.java:11)
at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.lambda$addEntitiesToWorld$5([email protected]/StructureTemplate.java:426)
at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate$$Lambda$50920/0x0000000804f84f48.accept([email protected]/Unknown Source)
at java.util.Optional.ifPresent([email protected]/Optional.java:178)
at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.addEntitiesToWorld([email protected]/StructureTemplate.java:418)
at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.m_74536_([email protected]/StructureTemplate.java:336)
at net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement.m_207251_([email protected]/SinglePoolElement.java:126)
at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_192416_([email protected]/PoolElementStructurePiece.java:88)
at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_183269_([email protected]/PoolElementStructurePiece.java:84)
at net.minecraft.world.level.levelgen.structure.StructureStart.m_7129_([email protected]/StructureStart.java:53)
at net.minecraft.world.level.chunk.ChunkGenerator.m_211641_([email protected]/ChunkGenerator.java:438)
at net.minecraft.world.level.chunk.ChunkGenerator$$Lambda$50781/0x0000000804f52b48.accept([email protected]/Unknown Source)
at com.google.common.collect.ImmutableList.forEach([email protected]/ImmutableList.java:422)
at net.minecraft.world.level.chunk.ChunkGenerator.m_183372_([email protected]/ChunkGenerator.java:437)
at net.minecraft.world.level.chunk.ChunkStatus.m_187807_([email protected]/ChunkStatus.java:135)
at net.minecraft.world.level.chunk.ChunkStatus$$Lambda$3607/0x0000000800befac0.m_183270_([email protected]/Unknown Source)
at net.minecraft.world.level.chunk.ChunkStatus.md0f5a1b$lambda$injectLightmapSetup$1$4([email protected]/ChunkStatus.java:546)
at net.minecraft.world.level.chunk.ChunkStatus$$Lambda$3608/0x0000000800befcd8.m_183270_([email protected]/Unknown Source)
at net.minecraft.world.level.chunk.ChunkStatus.m_187788_([email protected]/ChunkStatus.java:262)
at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$22([email protected]/ChunkMap.java:589)
at net.minecraft.server.level.ChunkMap$$Lambda$50610/0x0000000804f23128.apply([email protected]/Unknown Source)
at com.mojang.datafixers.util.Either$Left.map([email protected]/Either.java:38)
at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$24([email protected]/ChunkMap.java:587)
at net.minecraft.server.level.ChunkMap$$Lambda$50566/0x0000000804f150d0.apply([email protected]/Unknown Source)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire([email protected]/CompletableFuture.java:1150)
at java.util.concurrent.CompletableFuture$Completion.run([email protected]/CompletableFuture.java:482)
at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_([email protected]/ChunkTaskPriorityQueueSorter.java:62)
at net.minecraft.server.level.ChunkTaskPriorityQueueSorter$$Lambda$50608/0x0000000804f22cd8.run([email protected]/Unknown Source)
at net.minecraft.util.thread.ProcessorMailbox.m_18759_([email protected]/ProcessorMailbox.java:91)
at net.minecraft.util.thread.ProcessorMailbox.m_18747_([email protected]/ProcessorMailbox.java:146)
at net.minecraft.util.thread.ProcessorMailbox.run([email protected]/ProcessorMailbox.java:102)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec([email protected]/ForkJoinTask.java:1395)
at java.util.concurrent.ForkJoinTask.doExec([email protected]/ForkJoinTask.java:373)
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec([email protected]/ForkJoinPool.java:1182)
at java.util.concurrent.ForkJoinPool.scan([email protected]/ForkJoinPool.java:1655)
at java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1622)
at java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:165)

commented

Check out my message here about the explorer map lag issue: #266 (comment)

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

commented

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

commented

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.

commented

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.