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

Diagonal patterns for shaped crafting recipes have unintuitive behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.17.1
    • None
    • Windows 10 using the Java version that is bundled with the launcher (currently 64-bit Java 16.0.1). I used only vanilla Minecraft (Java Edition 1.17.1) in my testing.
    • Unconfirmed
    • (Unassigned)

      Summary:

      When a recipe pattern only has ingredients placed on the diagonal of the grid (like the one below), the recipe can be crafted with the ingredients placed on either diagonal, rather than being limited to the diagonal defined in the recipe.

      {
        "type": "minecraft:crafting_shaped",
        "group": "wooden_button",
        "pattern": [
          " #",
          "# "
        ],
        "key": {
          "#": {
            "item": "minecraft:acacia_planks"
          }
        },
        "result": {
          "item": "minecraft:acacia_button",
          "count": 2
        }
      }

      To Test:

      • Download the attached data pack zip file and place it into any vanilla Minecraft 1.17.1 world. The data pack provides one 2x2 recipe and one 3x3 recipe, both of which have been defined so that their ingredients (acacia planks) should be placed along the diagonal of the crafting grid from bottom-left to top-right. The 2x2 recipe produces 2 acacia buttons, and the 3x3 recipe produces 2 acacia pressure plates.
      • Open the Minecraft world containing the data pack.
      • Give yourself 3 acacia planks.
      • Perform the following tests in the player inventory grid:
        • Attempt to craft the 2x2 recipe by placing planks in the bottom-left and top-right slots.
        • Attempt to craft the 2x2 recipe again, but this time, place the planks in the top-left and bottom-right slots.
      • Perform the following tests in a crafting table grid:
        • Attempt to craft the 3x3 recipe by placing planks along the diagonal from bottom-left to top-right.
        • Attempt to craft the 3x3 recipe again, but this time, place the planks along the diagonal from top-left to bottom-right.

       

      Expected Behavior:

      From my understanding, each entry in a recipe pattern represents the row in the crafting grid corresponding to its index in the pattern, so the first entry in the pattern represents the top (first) row in the crafting grid, the second entry in the pattern represents the second row in the crafting grid (the middle row of a 3x3 grid; the bottom row of a 2x2 grid), and the third entry in the pattern (if provided) represents the third (bottom) row of a 3x3 grid.

      Based on that understanding, the added recipes should behave as follows:

      • Placing planks on the diagonal from bottom-left to top-right should produce 2 acacia buttons for the 2x2 recipe and 2 acacia pressure plates for the 3x3 recipe.
      • Placing planks on the diagonal from top-left to bottom-right should not produce anything, as that pattern does not match the patterns specified in the data pack.

       

      Actual Behavior:

      In 1.17.1, the actual observed behavior is as follows:

      • Placing planks on the diagonal from bottom-left to top-right produces 2 buttons for the 2x2 recipe and 2 pressure plates for the 3x3 recipe, as expected.
      • Placing planks on the diagonal from top-left to bottom-right also produces 2 buttons for the 2x2 recipe and 2 pressure plates for the 3x3 recipe, contrary to the expected behavior. This behavior is unintuitive since this pattern does not match the patterns defined for the recipes by the data pack.

       

      It is possible that I'm just misunderstanding how patterns are supposed to work, but based on what I've observed while playing around with the crafting system and also what I've been able to find on the Minecraft wiki and a few other sites online, it seems that the case of using only the diagonals is behaving differently than other similar use cases. For example, all of the ingredients for stone pressure plates or stone slabs must be placed in a single row, but these recipes cannot be crafted if the ingredients are instead placed in a single column; likewise, the ingredients for a torch must be place in a single column and will not produce torches if they are instead placed in a single row.

      If the diagonals are currently behaving as intended, I would suggest that maybe their behavior should be altered to fall more in line with the behavior of the rest of the crafting system so that the patterns using only the diagonals are more intuitive to work with.

        1. 2_buttons_correct-1.png
          2_buttons_correct-1.png
          330 kB
        2. 2_buttons_incorrect.png
          2_buttons_incorrect.png
          329 kB
        3. 2_pressure_plates_correct.png
          2_pressure_plates_correct.png
          322 kB
        4. 2_pressure_plates_incorrect.png
          2_pressure_plates_incorrect.png
          314 kB
        5. acacia_button_2.json
          0.2 kB
        6. acacia_pressure_plate_2.json
          0.3 kB
        7. test_alternate_recipes.zip
          1 kB

            Unassigned Unassigned
            RogueAnvil Spencer Meredith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: