Mojira Archive
MC-158872

Models use model of last matched predicate, not closest match

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.

Fixed

Scott Miller

2019-08-13, 12:12 AM

2024-11-04, 03:15 PM

2024-11-04, 03:15 PM

9

5

Community Consensus

Low

Platform

Textures and models

1.14.4 - 23w51b1.14.4, 1.16 Pre-release 7, 1.16.3, 1.20.4, 23w51b

24w45a