BlueMap-Minecraft / BlueMap

A Minecraft mapping tool that creates 3D models of your Minecraft worlds and displays them in a web viewer.
https://bluecolo.red/bluemap
MIT License
1.91k stars 132 forks source link

Add support for dimension-data stored directly into the level.dat (probably forge being weird?) #517

Closed 704009905 closed 5 months ago

704009905 commented 8 months ago

What i did / Steps to reproduce

  1. Use a custom dimension type (from datapack or mods)
  2. /bluemap reload to reload config and resources.

Expected result

Successfully reload and working.

Actual result

[28Feb2024 19:32:34.786] [BlueMap-Plugin-ReloadCommand/ERROR] [BlueMap/]: Failed to reload BlueMap! java.lang.IllegalStateException: STRING tag expected but got COMPOUND. At: Data.WorldGenSettings.dimensions.cae:void.type For stacktrace please see here. This is due to the 4.0 snapshot only handling preset dimension types, not custom ones, see mc wiki. See related dimension data here.

Context

BlueMap Version: BlueMap-4.0-forge-1.18.1.jar

BlueMap-3.20-forge-1.18.1.jar works fine.

TBlueF commented 8 months ago
Stacktrace ``` [28Feb2024 19:32:34.786] [BlueMap-Plugin-ReloadCommand/ERROR] [BlueMap/]: Failed to reload BlueMap! java.lang.IllegalStateException: STRING tag expected but got COMPOUND. At: Data.WorldGenSettings.dimensions.cae:void.type at de.bluecolored.shadow.bluenbt.adapter.PrimitiveAdapterFactory.readString(PrimitiveAdapterFactory.java:195) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:109) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.lambda$new$17(DefaultAdapterFactory.java:111) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$TypeDeserializerFieldAccessor.read(DefaultAdapterFactory.java:167) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.read(DefaultAdapterFactory.java:141) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.MapAdapterFactory$MapAdapter.read(MapAdapterFactory.java:74) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.MapAdapterFactory$MapAdapter.read(MapAdapterFactory.java:62) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:109) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.lambda$new$17(DefaultAdapterFactory.java:111) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$TypeDeserializerFieldAccessor.read(DefaultAdapterFactory.java:167) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.read(DefaultAdapterFactory.java:141) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:109) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.lambda$new$17(DefaultAdapterFactory.java:111) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$TypeDeserializerFieldAccessor.read(DefaultAdapterFactory.java:167) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.read(DefaultAdapterFactory.java:141) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:109) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.lambda$new$17(DefaultAdapterFactory.java:111) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$TypeDeserializerFieldAccessor.read(DefaultAdapterFactory.java:167) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.adapter.DefaultAdapterFactory$DefaultAdapter.read(DefaultAdapterFactory.java:141) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:109) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:105) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.shadow.bluenbt.BlueNBT.read(BlueNBT.java:113) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.core.world.mca.MCAWorld.load(MCAWorld.java:262) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.BlueMapService.loadMap(BlueMapService.java:228) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.BlueMapService.getOrLoadMaps(BlueMapService.java:167) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.BlueMapService.getOrLoadMaps(BlueMapService.java:150) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.plugin.Plugin.load(Plugin.java:181) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.plugin.Plugin.load(Plugin.java:112) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.plugin.Plugin.reload(Plugin.java:471) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at de.bluecolored.bluemap.common.plugin.commands.Commands.lambda$reloadCommand$5(Commands.java:400) ~[BlueMap-4.0-forge-1.18.1.jar%2375!/:4.0] at java.lang.Thread.run(Thread.java:1583) [?:?] ```
Dimension Config ```json { "type": { "ultrawarm": false, "natural": true, "piglin_safe": false, "respawn_anchor_works": false, "bed_works": true, "has_raids": false, "has_skylight": true, "has_ceiling": false, "coordinate_scale": 1, "ambient_light": 1, "fixed_time": 0, "logical_height": 320, "effects": "minecraft:overworld", "infiniburn": "#minecraft:infiniburn_overworld", "min_y": -64, "height": 320 }, "generator": { "type": "minecraft:noise", "seed": 1340138607, "settings": "cae:weirdness", "biome_source": { "type": "minecraft:multi_noise", "biomes": [ { "biome": "cae:void", "parameters": { "temperature": -2, "humidity": 1, "continentalness": 1, "erosion": 2, "weirdness": 2, "depth": 2, "offset": 0 } }, { "biome": "cae:source_valley", "parameters": { "temperature": 1.5, "humidity": 0, "continentalness": 1.7, "erosion": -0.6, "weirdness": 1, "depth": 1.1, "offset": 1 } }, { "biome": "cae:arcane_desert", "parameters": { "temperature": 2, "humidity": -2, "continentalness": [ 0, 2 ], "erosion": 0, "weirdness": [ 1, 2 ], "depth": 0, "offset": 1 } }, { "biome": "cae:arcane_snow", "parameters": { "temperature": -1.3, "humidity": [ -2, 2 ], "continentalness": 0.2, "erosion": -1.7, "weirdness": 2, "depth": -2, "offset": 1 } }, { "biome": "cae:soul_forest", "parameters": { "temperature": [ -1, 1 ], "humidity": -2, "continentalness": [ 0, 1 ], "erosion": -2, "weirdness": -1, "depth": 1, "offset": 1 } }, { "biome": "cae:arcane_plains", "parameters": { "temperature": 1.4, "humidity": 1.4, "continentalness": 1, "erosion": -1, "weirdness": 1, "depth": 0, "offset": 1 } } ] } } } ```
TBlueF commented 8 months ago

Can you please send me the level.dat file of your world that includes that custom dimension?

TBlueF commented 8 months ago

@704009905 The error seems like it is caused by your level.dat file having a Compound-Element in a place where it should have a String. To analyze if this is a corrupted level.dat file on your end, or if it's an issue on bluemaps end, i'd need to look at that file.

I can't reproduce this issue, so i will close it for now.

Please reopen this ticket if you can send me the level.dat file of your world.

704009905 commented 8 months ago

Please reopen this ticket if you can send me the level.dat file of your world.

Sorry for the late reply, here it is: level.dat.zip

There are four dimensions that use custom generator types: arsomega:demon_realm from Ars Omega, three cae dims from kubejs, used in Create: Arcane Engineering modpack. They all trigger the crash.

I can't reopen this issue due to permission.

TBlueF commented 8 months ago

The type-data of your dimension is stored directly into the level.dat instead of into a datapack json format asset.. interesting.. I wonder if that is some forge-shenanigans going on there.

I think i can add support for this, i'll have to investigate