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

Blockstates not working properly with two model options

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 17w48a, Minecraft 17w50a
    • Minecraft 18w01a
    • Windows 10
      Java version packaged with java edition
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: