#drinking animations?
19 messages · Page 1 of 1 (latest)
Please make sure to read #1029373817119838218 as it may answer your question!
Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.
You could use something like the bow does in its item model definition file, but change the model reference to your custom ones instead.
"model": {
"type": "minecraft:range_dispatch",
"property": "minecraft:use_duration",
"scale": 0.05,
"entries": [
{
"threshold": 0.25,
"model": {
"type": "minecraft:model",
"model": "minecraft:item/water_bucket"
}
},
{
"threshold": 0.5,
"model": {
"type": "minecraft:model",
"model": "minecraft:item/lava_bucket"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "minecraft:item/milk_bucket"
}
}
}```
like this would make the milk bucket swap to the water and lava bucket models while you drink it (if I didn't make any errors)
with enough models, yes
so i add this into a json in the "items" folder?
yes
-# (ofc with more entries and adjusted values)
this
now i just gotta add models for each stage
and if i want to combine it with the 2d sprites in my last post?
@devout mason do i need to make a seperate item file for each stage of milk drinking to have 2d textures?
no, you need to have all item_definition stuff for one item in one file
{
"model": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"ground",
"fixed"
],
"model": {
"type": "minecraft:range_dispatch",
"property": "minecraft:use_duration",
"scale": 0.05,
"entries": [
{
"threshold": 0.25,
"model": {
"type": "minecraft:model",
"model": "item/2d_use1"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/2d"
}
}
}
],
"fallback": {
"type": "minecraft:range_dispatch",
"property": "minecraft:use_duration",
"scale": 0.05,
"entries": [
{
"threshold": 0.25,
"model": {
"type": "minecraft:model",
"model": "item/3d_use1"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/3d"
}
}
}
}```
kinda like this (but with more model entries)
you can use misode's item generator if you don't wanna write the .json manually
https://misode.github.io/assets/item/?share=FKVg8TRyu3