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

Set a object in the custom biome "features" array field cannot prevent data packs from loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.4
    • None
    • Unconfirmed
    • (Unassigned)

      Loading custom biome through data pack is an experiment feature. All experimental registers (like damage_type, worldgen/*, etc) have a feature where the game will refuse to load data packs if the JSON format or data type is incorrect. Instead of a simple warning and keep loading the data packs. But this is an exception.

      If you attempt to load this file, the game output only warning this:

      data/example/worldgen/biome/feature_object.json
      ...
        "carvers": [],
        "features": [
          {
            "feature": {
              "type": "minecraft:ore",
              "config": {
                "discard_chance_on_air_exposure": 0,
                "targets": [
                  {
                    "target": {
                      "predicate_type": "minecraft:tag_match",
                      "tag": "minecraft:base_stone_overworld"
                    },
                    "state": {
                      "Name": "minecraft:orange_stained_glass_pane"
                    }
                  }
                ],
                "size": 20
              }
            },
            "placement": [
              {
                "type": "minecraft:count",
                "count": 4
              },
              {
                "type": "minecraft:height_range",
                "height": {
                  "type": "minecraft:uniform",
                  "min_inclusive": {
                    "absolute": -30
                  },
                  "max_inclusive": {
                    "absolute": 30
                  }
                }
              },
              {
                "type": "minecraft:biome"
              }
            ]
          }
        ],
        "spawners": {},
      ...
      
      game output
      Features: Failed to parse either. First: Not a string: {"feature":{"type":"minecraft:ore","config":{"discard_chance_on_air_exposure":0,"targets":[{"target":{"predicate_type":"minecraft:tag_match","tag":"minecraft:base_stone_overworld"},"state":{"Name":"minecraft:orange_stained_glass_pane"}}],"size":20}},"placement":[{"type":"minecraft:count","count":4},{"type":"minecraft:height_range","height":{"type":"minecraft:uniform","min_inclusive":{"absolute":-30},"max_inclusive":{"absolute":30}}},{"type":"minecraft:biome"}]}; Second: Not a json array: {"feature":{"type":"minecraft:ore","config":{"discard_chance_on_air_exposure":0,"targets":[{"target":{"predicate_type":"minecraft:tag_match","tag":"minecraft:base_stone_overworld"},"state":{"Name":"minecraft:orange_stained_glass_pane"}}],"size":20}},"placement":[{"type":"minecraft:count","count":4},{"type":"minecraft:height_range","height":{"type":"minecraft:uniform","min_inclusive":{"absolute":-30},"max_inclusive":{"absolute":30}}},{"type":"minecraft:biome"}]}
      

      Steps to Reproduce:

      1. Load this pack datapack_object.zip.
      2. Check the game output.
      3. Open Single Biome world type and search for the "example:feature_object".
        This biome appears in the list, which means that the game has loaded the biome correctly.
      4. Select it and create the world.
      5. When you enter the world, you can do them:
      1. Enter F3 and ckeck the biome.
        The biome is "example:feature_object".
      2. Run these command for search "orange_stained_glass_pane ore":
        /gamemode spectator @s
        /effect give @s minecraft:night_vision infinite 0 true
        

        There in no "orange_stained_glass_pane ore", which means that the features field is incorrectly.

      The datapack_array.zip use correctly format, can generate "orange_stained_glass_pane ore",

      These means set a object in "features" array field is a incorrectly format.

      Expected Result:

      Here should be "Data Pack Vaildation failed" screen and prevent loading world.

      Observed Result.

      See above. The biome loaded normally with game output warning.

            Unassigned Unassigned
            wplxfore wplxfore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: