You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there. Found a bug in 3D view that might also be related to another issue that's not listed here
What:
When importing a map (from an MC world, 1.12.2) with a biome ID 255 in it and then opening 3D view a crash occurs with the following call stack. java.lang.ArrayIndexOutOfBoundsException: Index 255 out of bounds for length 255 at org.pepsoft.worldpainter.layers.renderers.BiomeRenderer.<init>(BiomeRenderer.java:35) at org.pepsoft.worldpainter.TileRenderer.<init>(TileRenderer.java:40) at org.pepsoft.worldpainter.threedeeview.Tile3DRenderer.<init>(Tile3DRenderer.java:42) at org.pepsoft.worldpainter.threedeeview.Background3DTileRenderer.<init>(Background3DTileRenderer.java:28) at org.pepsoft.worldpainter.threedeeview.ThreeDeeRenderManager.startThreads(ThreeDeeRenderManager.java:95) at org.pepsoft.worldpainter.threedeeview.ThreeDeeRenderManager.renderTile(ThreeDeeRenderManager.java:38) at java.lang.Iterable.forEach(Iterable.java:75) at org.pepsoft.worldpainter.threedeeview.ThreeDeeView.actionPerformed(ThreeDeeView.java:358) at javax.swing.Timer.fireActionPerformed(Timer.java:311) at javax.swing.Timer$DoPostEvent.run(Timer.java:243)
Possibly related issue:
The same map also does not render any layers or preview in the center view. All I see is the biomes that would create based on the seed of this world but not the world itself. However, the bottom info bar clearly shows that elevation, slope, terrain and biome data was loaded and it is being displayed in text in the bottom row. Just the rendering seems to glitch out. This is what prompted me to click on 3D view in the first place.
How to fix:
This file: WorldPainter/WPCore/src/main/java/org/pepsoft/worldpainter/layers/renderers/BiomeRenderer.java
Array "patterns" is initialized with 255 elements, meaning it's index will range from 0 to 254.
At line 35 a biome ID is used as an index in said array, biome ID's can go up to 255 (possible values of a byte 0-255, 256 total)
The size of pattern should therefor be 256 in order to accommodate all possible biome IDs
There might be similar bugs like this elsewhere in world painter
Hope this helps, have a nice day
The text was updated successfully, but these errors were encountered:
Hello there. Found a bug in 3D view that might also be related to another issue that's not listed here
What:
When importing a map (from an MC world, 1.12.2) with a biome ID 255 in it and then opening 3D view a crash occurs with the following call stack.
java.lang.ArrayIndexOutOfBoundsException: Index 255 out of bounds for length 255 at org.pepsoft.worldpainter.layers.renderers.BiomeRenderer.<init>(BiomeRenderer.java:35) at org.pepsoft.worldpainter.TileRenderer.<init>(TileRenderer.java:40) at org.pepsoft.worldpainter.threedeeview.Tile3DRenderer.<init>(Tile3DRenderer.java:42) at org.pepsoft.worldpainter.threedeeview.Background3DTileRenderer.<init>(Background3DTileRenderer.java:28) at org.pepsoft.worldpainter.threedeeview.ThreeDeeRenderManager.startThreads(ThreeDeeRenderManager.java:95) at org.pepsoft.worldpainter.threedeeview.ThreeDeeRenderManager.renderTile(ThreeDeeRenderManager.java:38) at java.lang.Iterable.forEach(Iterable.java:75) at org.pepsoft.worldpainter.threedeeview.ThreeDeeView.actionPerformed(ThreeDeeView.java:358) at javax.swing.Timer.fireActionPerformed(Timer.java:311) at javax.swing.Timer$DoPostEvent.run(Timer.java:243)
Possibly related issue:
The same map also does not render any layers or preview in the center view. All I see is the biomes that would create based on the seed of this world but not the world itself. However, the bottom info bar clearly shows that elevation, slope, terrain and biome data was loaded and it is being displayed in text in the bottom row. Just the rendering seems to glitch out. This is what prompted me to click on 3D view in the first place.
How to fix:
This file: WorldPainter/WPCore/src/main/java/org/pepsoft/worldpainter/layers/renderers/BiomeRenderer.java
Array "patterns" is initialized with 255 elements, meaning it's index will range from 0 to 254.
At line 35 a biome ID is used as an index in said array, biome ID's can go up to 255 (possible values of a byte 0-255, 256 total)
The size of pattern should therefor be 256 in order to accommodate all possible biome IDs
There might be similar bugs like this elsewhere in world painter
Hope this helps, have a nice day
The text was updated successfully, but these errors were encountered: