mojira.dev
MC-237934

random_patch features are now forced to be square instead of rectangular

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.

 

Comments 3

please reopen this issue.

Please consider reopening this issue, It adversely affects some of the best datapack creators.

Issues that are resolved as Works as Intended are not negotiable. Please don't bug Mojang asking them to reopen this issue. Hopefully we can get some replacement but that's outside of the domain of the bug tracker.

Starmute

(Unassigned)

Unconfirmed

(Unassigned)

21w39a

Retrieved