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

Blockstates not working properly with two model options

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 17w48a, Minecraft 17w50a
    • Fix Version/s: Minecraft 18w01a
    • Environment:

      Windows 10
      Java version packaged with java edition

    • Confirmation Status:
      Unconfirmed

      Description

      When using blockstates to randomize block models, using a blockstate file that randomly selects between two models selects the first model 100% of the time even though it should be a 50/50 chance for each. Adding "weight": 1 to the second model allows it to be included as a workaround. Blockstates having three or more model options do not experience this issue. In this example, only the model for stone will be used even though dirt is included. My best guess is that the second model is given a weight of 0 unless otherwise specified.

      {
          "variants": {
              "normal": [ 
                  { "model": "stone" }, 
                  { "model": "dirt" }
              ]
          }
      }
      

      edit:

      This has been fixed for most blocks, however blocks such as flowers still exhibit this behavior.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fry [Mojang] Georgii Gavrichev
                Reporter:
                Silver_David David Bakle
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: