#drinking animations?

19 messages · Page 1 of 1 (latest)

mighty mesa
#

how can i get an animation so that the milk goes down, or the bowl soup goes down as the player drinks it? 1.21.4
could this also be applied to solid foods so they lose mass as they are eaten? thanks.

near citrusBOT
#
Welcome to the help forum!

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.

devout mason
#
  "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)
devout mason
#

with enough models, yes

mighty mesa
#

so i add this into a json in the "items" folder?

devout mason
#

yes
-# (ofc with more entries and adjusted values)

mighty mesa
#

aight

#

ill test it out

#

it works

mighty mesa
#

now i just gotta add models for each stage

#

and if i want to combine it with the 2d sprites in my last post?

mighty mesa
#

@devout mason do i need to make a seperate item file for each stage of milk drinking to have 2d textures?

devout mason
#
{
  "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)