Throwable
This mod allows you to turn any item into a throwable weapon with a flexible configuration system.
To make an item throwable, simply add it to the #throwable:throwable tag. By default, all swords can be thrown. After throwing, the item needs to be picked up by clicking (this behavior can be changed in settings).
If a throwable item is enchanted with "Fire Aspect", it will set the target on fire for level*5 seconds.
For versions 1.21+ only: You can apply "Loyalty" enchantment to any throwable items.
Configuration
Global Settings
Create a file .minecraft/config/throwable.json (if it doesn't exist yet).
{
//Whether only the owner can pick up the item
"ownerPickUpOnly": false,
//Automatic pickup when nearby
"autoPick": false,
//Turn into item when despawning
"dropWhenDespawn": true,
//Time until despawn in ticks, -1 for infinite (not recommended)
"despawnDelayTicks": 6000
}
Item-Specific Settings
Create a file data/<item namespace>/throwable/throwable/<item ID>.json and add the following parameters:
{
//All parameters are optional, default values shown
//Use time for critical damage
"maxUseTime": 72000,
//Damage multiplier from item's base damage
"damageScale": 0.5,
//Display scale
"scale": 1,
//Rotation offset as in item frames
"rotateOffset": 0,
//Sound when thrown
"throwSound": "minecraft:item.trident.throw",
//Sound when hitting ground
"hitGroundSound": "minecraft:item.trident.hit_ground"
}