Dungeon Crawl

Dungeon Crawl

51M Downloads

Crash java.lang.IllegalArgumentException

SquirrelCraft opened this issue ยท 3 comments

commented

I posted a bug report on my own tracker for my mod pack that has all the info below. I am able to reproduce it with only the this mod and using certain seed and location.

Seed: -1
Teleport to x= -1005, y= 104, z= 2363

https://github.com/SquirrelCraft/SquirrelPAK-MC16/issues/2

commented

Thanks for the report! That was an oversight and very easy to fix. A new version with this fix will be available on curseforge soon!

commented

Posting the error here as well

Time: 8/6/21, 10:01 PM
Description: Exception generating new chunk

java.lang.IllegalArgumentException: bound must be positive
	at java.util.Random.nextInt(Random.java:388) ~[?:?] {}
	at xiroc.dungeoncrawl.dungeon.generator.layer.NewLayerGenerator.generateLayer(NewLayerGenerator.java:109) ~[dungeoncrawl:2.3.0] {re:classloading}
	at xiroc.dungeoncrawl.dungeon.generator.DefaultDungeonGenerator.generateLayer(DefaultDungeonGenerator.java:62) ~[dungeoncrawl:2.3.0] {re:classloading}
	at xiroc.dungeoncrawl.dungeon.DungeonBuilder.generateLayout(DungeonBuilder.java:144) ~[dungeoncrawl:2.3.0] {re:classloading}
	at xiroc.dungeoncrawl.dungeon.DungeonBuilder.build(DungeonBuilder.java:105) ~[dungeoncrawl:2.3.0] {re:classloading}
	at xiroc.dungeoncrawl.dungeon.Dungeon$Start.generatePieces(Dungeon.java:141) ~[dungeoncrawl:2.3.0] {re:classloading}
	at xiroc.dungeoncrawl.dungeon.Dungeon$Start.func_230364_a_(Dungeon.java:130) ~[dungeoncrawl:2.3.0] {re:classloading}
	at net.minecraft.world.gen.feature.structure.Structure.func_242785_a(Structure.java:224) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.StructureMixin,pl:mixin:A}
	at net.minecraft.world.gen.feature.StructureFeature.func_242771_a(SourceFile:35) ~[?:?] {re:classloading}
	at net.minecraft.world.gen.ChunkGenerator.func_242705_a(SourceFile:278) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:betterstrongholds.mixins.json:VanillaStrongholdSpawnMixin,pl:mixin:A}
	at net.minecraft.world.gen.ChunkGenerator.func_242707_a(SourceFile:267) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:betterstrongholds.mixins.json:VanillaStrongholdSpawnMixin,pl:mixin:A}
	at net.minecraft.world.chunk.ChunkStatus.func_222586_d(ChunkStatus.java:41) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:common.world.ChunkStatusMixin,pl:mixin:A}
	at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:common.world.ChunkStatusMixin,pl:mixin:A}
	at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:524) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ftbchunks-common.mixins.json:ChunkMapMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerUpdatePlayerPosMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerChunksAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?] {re:classloading}
	at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$20(ChunkManager.java:522) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ftbchunks-common.mixins.json:ChunkMapMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerUpdatePlayerPosMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerChunksAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
	at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072) ~[?:?] {}
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) ~[?:?] {}
	at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:94) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:137) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:105) ~[?:?] {re:classloading}
	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426) ~[?:?] {}
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?] {}
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?] {}
commented

@xyroc Let me know if you need a tester to test a fix