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

random_patch features are now forced to be square instead of rectangular

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 21w39a
    • None
    • Unconfirmed
    • (Unassigned)

      Hi,

      In previous versions, it was possible to make a random_patch with a rectangular shape. This was critical to many features of numerous world generation datapacks as it was one of the only existing ways to generate blocks in an area with an offset that is somewhat configurable.

      In 21w39a this feature was removed, most likely by accident. While this functionality was primitive, the inability to generate 'asymmetrical' regions is very detrimental to world generation. An offset decorator or just restoring the old functionality would be great.

      Example from patch_red_mushroom, 21w38a:

       

      {
        "config": {
          "can_replace": false,
          "project": false,
          "need_water": false,
          "xspread": 7,
          "yspread": 3,
          "zspread": 7,
          "whitelist": [],
          "blacklist": [],
          "tries": 64,
          "state_provider": {
            "state": {
              "Name": "minecraft:red_mushroom"
            },
            "type": "minecraft:simple_state_provider"
          },
          "block_placer": {
            "type": "minecraft:simple_block_placer"
          }
        },
        "type": "minecraft:random_patch"
      }
      

      And in 21w39a:

       

      {
        "config": {
          "allowed_on": [],
          "disallowed_on": [],
          "only_in_air": false,
          "feature": {
            "config": {
              "feature": {
                "config": {
                  "to_place": {
                    "state": {
                      "Name": "minecraft:red_mushroom"
                    },
                    "type": "minecraft:simple_state_provider"
                  }
                },
                "type": "minecraft:simple_block"
              },
              "decorator": {
                "config": {
                  "predicate": {
                    "blocks": [
                      "minecraft:air"
                    ],
                    "offset": [
                      0,
                      0,
                      0
                    ],
                    "type": "minecraft:matching_blocks"
                  }
                },
                "type": "minecraft:block_filter"
              }
            },
            "type": "minecraft:decorated"
          },
          "tries": 96,
          "xz_spread": 7,
          "y_spread": 3
        },
        "type": "minecraft:random_patch"
      }

      There is only xz_spread now, which is probably not intended because it significantly reduces the functionality of the feature at no benefit to the game.

       

            Unassigned Unassigned
            Starmute Starmute
            Votes:
            31 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: