1. Wiki
  2. /Items
  3. /minecraft:use_modifiers

minecraft:use_modifiers

Don't want to write this by hand? GodCraft sets minecraft:use_modifiers for you with a switch.Get GodCraft

Overview

minecraft:use_modifiers is an item component: it goes in the components object of a custom item. Controls holding the use button: how long one use takes and how slow the player walks meanwhile. Food, potions and bows need this.

Fields

FieldTypeDefaultDescription
start_usingStartUsing"if_first"Whether using starts only if nothing else has ("if_first") or restarts every time ("always").
use_durationnumber0Seconds the item takes to finish using, like the time to eat.Range: 0 to …
emit_vibrationsbooleantrueWhen true, starting and stopping use make vibrations that sculk sensors can hear.
start_soundLevelSoundEventnoneSound played when the player starts using the item.
movement_modifiernumbernoneWalk speed while using: 1 is normal speed, 0.35 is the slow walk of eating.Range: 0 to 1

Example

Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):

BP/items/<name>.json
{
  "minecraft:use_modifiers": {
    "start_using": "if_first",
    "use_duration": 0,
    "emit_vibrations": true,
    "start_sound": {},
    "movement_modifier": 0
  }
}

Items: Behavior pack

We use cookies to improve your experience and analyse site traffic. Learn more