Dynamic Trees - Terralith

Dynamic Trees - Terralith

480k Downloads

Crash on generating Terralith - DT biome

Scriese opened this issue ยท 1 comments

commented

Hello Friend,

thanks for making the effort of creating this mod. I've been using it for a while without any issues, but recently it completely broke, to the point where it crashes the game and makes worlds unplayable.

At first glance, I noticed the crash in 1.19.2 at the attempt of generating a birch taiga biome from Terralith. As far as I checked, this was the first and only Terralith-biome in the world that included trees and was generated with Dynamic Trees. The entire point of the mod, I suppose.

Removing your mod loads the trunks of the trees without any leaves. No extra tree packs are used.

Please have a look at the stacktrace below:

java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 5
	at com.djs.dtterralith.cellkits.DTTerralithCellKits$2.getCellForLeaves(DTTerralithCellKits.java:69) ~[DynamicTrees-Terralith-1.19.2-1.1.1.jar%23218!/:1.19.2-1.1.1] {re:classloading}
	at com.ferreusveritas.dynamictrees.block.leaves.DynamicLeavesBlock.getHydrationCell(DynamicLeavesBlock.java:499) ~[DynamicTrees-1.19.2-1.2.2.jar%23217!/:1.19.2-1.2.2] {re:classloading}
	at com.ferreusveritas.dynamictrees.block.leaves.DynamicLeavesBlock.getHydrationLevelFromNeighbors(DynamicLeavesBlock.java:491) ~[DynamicTrees-1.19.2-1.2.2.jar%23217!/:1.19.2-1.2.2] {re:classloading}
	at com.ferreusveritas.dynamictrees.block.leaves.DynamicLeavesBlock.age(DynamicLeavesBlock.java:186) ~[DynamicTrees-1.19.2-1.2.2.jar%23217!/:1.19.2-1.2.2] {re:classloading}
	at com.ferreusveritas.dynamictrees.block.leaves.DynamicLeavesBlock.doTick(DynamicLeavesBlock.java:156) ~[DynamicTrees-1.19.2-1.2.2.jar%23217!/:1.19.2-1.2.2] {re:classloading}
	at com.ferreusveritas.dynamictrees.block.leaves.DynamicLeavesBlock.m_213898_(DynamicLeavesBlock.java:131) ~[DynamicTrees-1.19.2-1.2.2.jar%23217!/:1.19.2-1.2.2] {re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_222972_(BlockBehaviour.java:698) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:computing_frames,re:mixin,re:classloading}
	at net.minecraft.server.level.ServerLevel.m_8714_(ServerLevel.java:446) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_serverlevel,xf:fml:sereneseasons:temperature_transformer,re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_serverlevel,xf:fml:sereneseasons:temperature_transformer}
	at net.minecraft.server.level.ServerChunkCache.m_8490_(ServerChunkCache.java:360) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.level.ServerChunkCache.m_201698_(ServerChunkCache.java:310) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:285) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_serverlevel,xf:fml:sereneseasons:temperature_transformer,re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_serverlevel,xf:fml:sereneseasons:temperature_transformer}
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:866) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,xf:fml:xaerominimap:xaero_minecraftserver}
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,xf:fml:xaerominimap:xaero_minecraftserver}
	at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:118) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,xf:OptiFine:default}
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,xf:fml:xaerominimap:xaero_minecraftserver}
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[client-1.19.2-20220805.130853-srg.jar%23245!/:?] {re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,xf:fml:xaerominimap:xaero_minecraftserver}
	at java.lang.Thread.run(Thread.java:833) [?:?] {}

EDIT: I have done a little more testing since posting this and it seems like other DT-Terralith biomes generate without problems, even of the same type. From the way the game crashes, I suspect it must be a single chunk or even a block that triggers the exception.

Thank you for looking into this error, looking forward to a solution!

commented

Also happens on 1.20.1, on the same line of code, same error.

java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 5
at maxhyper.dtterralith.cellkits.DTTerralithCellKits$2.getCellForLeaves(DTTerralithCellKits.java:69) ~[DynamicTreesTerralith-1.20.1-1.2.4.jar%23271!/:1.20.1-1.2.4] {re:classloading}