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

custom_model_data predicates have issues with magnitude and order.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4, 1.16 Pre-release 7
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      java minecraft 1.14.4 single and multiplayer
    • Confirmation Status:
      Unconfirmed
    • Category:
      Textures and models

      Description

      A value of 100 can be interpreted as 1 in an item model json predicate.

      An example item, in this illustration the item is cod and exists with

      tag:{CustomModelData:100,display:{Name:'{"text":"Calamari"}'}}

      The following predicate order will incorrectly model the item as if it had CustomModelData:1 which is this example is sushi.

              {"predicate": {"custom_model_data":100}, "model": "item/calamari"},
              {"predicate": {"custom_model_data":1}, "model": "item/sushi"}
      

      The following predicate order will correctly model the item as CustomModelData:100

              {"predicate": {"custom_model_data":1}, "model": "item/sushi"},
              {"predicate": {"custom_model_data":100}, "model": "item/calamari"}
      

      It would seem the predicate comparative does not check the entire number and thus accepts 1=100 unless a better magnitude match comes later, 100=100.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Gatinh0 Scott Miller
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: