#(andet_) Help from custom model data

1 messages · Page 1 of 1 (latest)

uncut hare
#

how to use custom_model_data mechanisms in item script container on minecraft version 1.21.4

jaunty quailBOT
#

(andet_) Help from custom model data

jaunty quailBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

uncut hare
#

i tried to turn paper into a stick for tests and used the paper model below but it didn't work

{
  "model": {
    "type": "minecraft:select",
    "property": "minecraft:custom_model_data",
    "cases": [
      {
        "when": "1",
        "model": {
          "type": "minecraft:model",
          "model": "minecraft:item/stick"
        }
      }
    ],
    "fallback": {
      "type": "minecraft:model",
      "model": "minecraft:item/paper"
    }
  }
}```
#

to transform in the game i used this command
/exs inventory adjust slot:hand custom_model_data:1
has_custom_model_data return true But item did not change its model

uncut hare
#

I found a solution

  "model": {
    "type": "range_dispatch",
    "property": "custom_model_data",
    "fallback": {
      "type": "model",
      "model": "item/stick" # original item
    },
    "entries": [
      {
        "threshold": 19002, # vale on custom_model_data
        "model": {
          "type": "model",
          "model": "item/custom_items" # your custom item
        }
      }
    ]
  }
}```
bleak tulipBOT
#
Resolved

Thread closed as resolved.

bleak tulipBOT
#
Thread Reopened

Thread was manually reopened by @karmic moth.