Repository navigation
Home
Flame, piercing and power now works on arrows.
The following custom tags can be put on bows, crossbows and arrows:
- range
- force
- rangedDamage
- pierce
These attributes also work on weapons wielded by ranged mobs.
Range and force can also be put on droppable items, tridents and throwables which include: snowballs, ender pearls, eye of enders, eggs, experience bottles, potions and snowballs. Attributes on throwables and arrows activate if the item is shot from a dispenser.
The following custom tags can be put on player armor and are added to the weapon's base:
- armorRange
- armorForce
- armorRangedDamage
- armorPierce
The following custom tags can be put on player armor and are multiplied to the attribute:
- mulRange
- mulForce
- mulRangedDamage
- mulPierce
The following custom tags can be put on player offhands/mainhands (use the normal ones instead for the weapon itself) and are added to the weapon's base:
- handRange
- handForce
- handRangedDamage
- handPierce
The following custom tags can be put on player offhands/mainhands and are multiplied to the attribute:
- handMulRange
- handMulForce
- handMulRangedDamage
- handMulPierce
The total attribute is determined with this formula (sum of weapon+arrow+armor+hand) * (sum of multiplicative)% So two armor pieces with mulForce:20 will increase the force attribute by 40%.
Mobs are not affected by ranged attributes on their armor or held items, only the ones on their weapons.
If a value is set to 0 or no value is specified for an attribute the default will be used. So if a player crafts a bow or crossbow it will use the default. You can also set a default range and force for mobs. The default value is set in the settings:setup function. Throwables and tridents have seperate default settings.
Projectiles lose all momentum after they've existed for an amount of ticks equal to the range. Fireworks and tnt instead explode once the max range is reached. This means that charging a bow more will increase the effective range since the projectile flies farther in the same amount of time. A value of -1 means no max range.
Modifies projectile velocity by the specified percentage, for example 120 force means the projectile's velocity will be 20% higher than normal.
Force affects not only how fast arrows travel but also how much damage they deal. So 200% force will double the damage done by the arrow. You can lower the rangedDamage to account for this. Projectiles other than arrows like tridents and fireworks do not get increased damage from force.
A value of 100 means the projectile travels as usual.
At high speeds arrows may look like they're flying off to the side but it is simply deceiving particles, they (should) go straight forward.
Very high force values are not recommended due to the Motion being capped at 10 in each direction. Projectiles may get weird trajectories. For bows and crossbows this happens at about force 330.
Modifies the arrow's damage. The arrow's damage tag will be equal to the ranged damage attribute / 10. For a vanilla bow use a value of 20.
Only arrows are affected by rangedDamage.
The power enchantment adds rangedDamage equal to this formula: 5 + 5*level. If you use both rangedDamage and power then they are added together.
Modifies how many targets the arrow can pierce. For a vanilla bow use a value of 0.
Only arrows are affected by pierce.
Pierce scales identically to the vanilla enchantment. If you use both they are added together.
The launch tag can be used to create things like skeletons shooting creeper stacks or snowballs that become damage potions when thrown. Putting the launch tag on a ranged weapon, arrow or throwable will replace the projectile with an entity from the launch list. For example: “launch:2” will replace the projectile with the entity from the launch list with id 2.
To add a mob to the launch list, create a spawn egg for the mob, hold it and use “/function settings:add_mob”. The mob's id will be displayed in chat. The type of spawn egg doesn't matter, only the mob inside. Spawn eggs directly from the creative menu will unfortunately not work due to missing some nbt, create it using commands. You can use /function settings:reset_launch_mobs to reset the list and /data remove storage minecraft:launch Mobs[{LaunchId:999}] to remove a specific mob.
The launched mob will have the same motion as the projectile would have had and is affected by the force and range attributes.
If both the bow/crossbow and arrow have a launch value, the bow/crossbow's will be used. If the arrow has the tag overrideLaunch:1b then its will be used instead.
Note that fireball type entities will fly indefinitely and at very high speeds, consider using a lower force value.
You can modify the force / range of thrown projectiles by putting an item in the mobs offhand with force / range.
You can use the tags weaknessReplace, harmingReplace, slownessReplace, poisonReplace, healingReplace, regenerationReplace and snowballReplace to replace the specified throwable with an entity from the launch list. So “weaknessReplace:3” in a witch's offhand will replace weakness potions thrown by the witch with launch entity 3.
The projectile:1b tag will make it so force, range and launch are triggered when the item is dropped in item entity form. /give @s brick[custom_data={projectile:1b,force:500}] 1 This extremely aerodynamic brick for example, will fly away with tremendous speed when thrown. The tag mobless:1b will make it so the attributes trigger even it the item wasn't dropped by an entity, for example if it dropped from a block, broken chest or dropper.
In vanilla bows crit randomly when fully charged and crossbows always crit.
With custom criticals bows instead crit if you fire right after they’ve been fully charged and crossbows crit if you charge them extra long. Custom criticals can be turned off in settings:setup.
With this setting you can increase the damage of spectral arrows by X percent (stacks additively to multiplicative attributes). Spectral Arrow Damage can be adjusted in settings:setup. Default is 0, so no change from vanilla.
The nbt field can be used to apply arbitrary nbt onto projectiles. For example: /give @s bow[custom_data={nbt:{Glowing:1b,pickup:0b}}] This bow shoots arrows that glow and can't be picked up. The nbt is merged onto the entity.
If both the bow/crossbow and arrow have the nbt field, the bow/crossbow's will be applied first and the arrow's will then be merged on.
A completely vanilla bow: /give @p bow[custom_data={range:-1,force:100,piercing:0,rangedDamage:20}] 1 Will behave identically to a normal /give @p bow unless you have changed the default settings.
A helmet that doubles projectile speed but halves arrow damage so they still deal normal damage: /give @p iron_helmet[custom_data={armorForce:100,mulRangedDamage:-50}] 1
Example spawn egg for adding mobs to the launch list: /give @p bat_spawn_egg[entity_data={id:"minecraft:spider",Attributes:[{Name:generic.scale,Base:0.5}]}] 1