mojira.dev
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.

Linked issues

Comments 2

This is the same with all range predicates BTW; later values overwrite earlier values, and the inputted value is "VALUE or higher".

Can confirm in 1.20.4

Gatinh0

(Unassigned)

Community Consensus

Platform

Low

Textures and models

1.14.4, 1.16 Pre-release 7, 1.16.3, 1.20.4, 23w51b

24w45a

Retrieved