Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-184653

[Crash] "java.lang.IllegalArgumentException: value already present:" - Game crashes when worldgen dimension type presets are not unique

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.16 Pre-release 3
    • 20w21a, 20w22a, 1.16 Pre-release 2
    • None
    • Confirmed
    • Crash
    • Very Important

      The bug

      When there are multiple dimensions with the same dimension type, the game crashes. When type is a string, it is supposedly a preset for dimension options like ultrawarm, shrunk, etc. However only one dimension can use the default values overworld, the_nether and the_end.

      How to reproduce

      1. Download the worldgen settings duplicate.json
      2. Create a new world and select the downloaded file when importing world settings
        The game crashes because the custom:overworld also used the overworld dimension type preset.

      Workaround

      Instead of using one of the presets, specify all the default properties like this:

      "type": {
        "ultrawarm": false,
        "natural": true,
        "shrunk": false,
        "ambient_light": 0,
        "has_skylight": true,
        "has_ceiling": false
      }

      Stack trace

      Description: Exception in server tick loop
       
      java.lang.IllegalArgumentException: value already present: chf@6204b89e
          at com.google.common.collect.HashBiMap.put(HashBiMap.java:287)
          at com.google.common.collect.HashBiMap.put(HashBiMap.java:262)
          at gg.a(SourceFile:51)
          at gg.a(SourceFile:62)
          at gl$a.a(SourceFile:28)
          at net.minecraft.server.MinecraftServer.a(SourceFile:407)
          at net.minecraft.server.MinecraftServer.i_(SourceFile:334)
          at enr.d(SourceFile:65)
          at net.minecraft.server.MinecraftServer.run(SourceFile:666)
          at java.lang.Thread.run(Thread.java:745)
      

        1. crash-2020-05-21_16.57.04-server.txt
          2 kB
          [Helper] Misode
        2. duplicate.json
          1 kB
          [Helper] Misode
        3. newdims.json
          2 kB
          Zeta

            fry [Mojang] Georgii Gavrichev
            MicherBugs Zeta
            Votes:
            10 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: