minecraft:throwable for you with a switch.Get GodCraftOverview
minecraft:throwable is an item component: it goes in the components object of a custom item. Lets the player throw the item, like a snowball or egg. Add minecraft:projectile so something actually flies out.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
do_swing_animation | boolean | false | When true, the arm swings when the item is thrown. |
min_draw_duration | number | 0 | Shortest time in seconds the player must hold before a throw. |
max_draw_duration | number | 0 | Longest time in seconds that charging keeps adding power. |
launch_power_scale | number | 1 | How quickly throw power grows while charging. |
max_launch_power | number | 1 | The strongest a throw can be. |
scale_power_by_draw_duration | boolean | false | When true, holding longer makes the throw go farther, like a trident. |
Example
Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):
BP/items/<name>.json
{
"minecraft:throwable": {
"do_swing_animation": false,
"min_draw_duration": 0,
"max_draw_duration": 0,
"launch_power_scale": 1,
"max_launch_power": 1,
"scale_power_by_draw_duration": false
}
}