Bulldog83 / JustMap

A minimap mod for Minecraft with Fabric launcher.
GNU General Public License v3.0
42 stars 17 forks source link

Cave mapping on servers fails with ArrayIndexOutOfBoundsException #84

Closed 0xfeeddeadbeef closed 4 years ago

0xfeeddeadbeef commented 4 years ago

When I join servers, cave map does not work (I'm using unlimited version), it is all black, and these errors are logged in latest.log:

[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]: java.lang.ArrayIndexOutOfBoundsException: Index -255 out of bounds for length 65536
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getGrassColor(BiomeColors.java:74)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getGrassColor(BiomeColors.java:52)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorPalette.getGrassColor(ColorPalette.java:101)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.Colors.getGrassColor(Colors.java:102)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getGrassColor(ColorProviders.java:88)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.lambda$registerProviders$0(ColorProviders.java:34)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getColor(ColorProviders.java:126)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:306)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:287)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateBlock(ChunkData.java:253)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateArea(ChunkData.java:228)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.lambda$updateChunkArea$1(ChunkData.java:185)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager$Task.run(TaskManager.java:150)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager.work(TaskManager.java:123)
[18:23:01] [justmap-chunk-updater-1/INFO]: [STDERR]:    at java.base/java.lang.Thread.run(Thread.java:832)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]: java.lang.ArrayIndexOutOfBoundsException: Index -255 out of bounds for length 65536
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getGrassColor(BiomeColors.java:74)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getGrassColor(BiomeColors.java:52)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorPalette.getGrassColor(ColorPalette.java:101)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.Colors.getGrassColor(Colors.java:102)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getGrassColor(ColorProviders.java:88)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.lambda$registerProviders$0(ColorProviders.java:34)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getColor(ColorProviders.java:126)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:306)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:287)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateBlock(ChunkData.java:253)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateArea(ChunkData.java:228)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.lambda$updateChunkArea$1(ChunkData.java:185)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager$Task.run(TaskManager.java:150)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager.work(TaskManager.java:123)
[18:23:01] [justmap-chunk-updater-2/INFO]: [STDERR]:    at java.base/java.lang.Thread.run(Thread.java:832)

Mapping works on the surface. Cave mapping also works on local worlds. Previous version also does work.

Version: justmap-1.2.11-1.16.3-unlimited.jar

0xfeeddeadbeef commented 4 years ago

Cave mapping seemingly works now, but exception still happens:

[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]: java.lang.ArrayIndexOutOfBoundsException: Index -255 out of bounds for length 65536
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getFoliageColor(BiomeColors.java:86)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.BiomeColors.getFoliageColor(BiomeColors.java:46)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorPalette.getFoliageColor(ColorPalette.java:97)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.Colors.getFoliageColor(Colors.java:97)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getFoliageColor(ColorProviders.java:102)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.lambda$registerProviders$4(ColorProviders.java:46)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorProviders.getColor(ColorProviders.java:126)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:306)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.colors.ColorUtil.blockColor(ColorUtil.java:287)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateBlock(ChunkData.java:253)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.updateArea(ChunkData.java:228)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.map.data.ChunkData.lambda$updateChunkArea$1(ChunkData.java:185)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager$Task.run(TaskManager.java:150)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at ru.bulldog.justmap.util.tasks.TaskManager.work(TaskManager.java:123)
[19:34:23] [justmap-chunk-updater-2/INFO]: [STDERR]:    at java.base/java.lang.Thread.run(Thread.java:832)
[19:34:23] [justmap-chunk-updater-1/INFO]: [STDERR]: java.lang.ArrayIndexOutOfBoundsException
Bulldog83 commented 4 years ago

Damn, I've forgotten about foliage...

Bulldog83 commented 4 years ago

Fixed