Projectile
Customize how the projectile flies and interacts
This section defines how your projectile moves and interacts with the environment. Remember that your projectiles are not actual entities. Instead, WeaponMechanics uses math and ray-tracing to simulate the position/movement of the projectile.
Projectile: <path to another Projectile>
Usually, you define projectiles in the projectiles
folder, that way you can re-use the projectile in multiple weapons. For example, in this config, my_weapon
and my_other_weapon
both use my_projectile
for their projectile. This saves you time, so you don't have to type things over.
Type
Projectile_Item_Or_Block
Some entities can use an item for extra data. A DROPPED_ITEM
requires it to determine which item to drop. FALLING_BLOCK
requires it to determine which block to use. ARMOR_STAND
will add any item here on it's head. The armor stand is very useful for showing custom ammo models, like a rocket for an RPG.
Gravity
This defines vertical acceleration. Positive numbers make the projectile fall down over time, and negative numbers make the projectile float up over time. The numbers are in blocks/second^2
. Vanilla Minecraft uses 10
here. Earth's gravity is about 9.8
, and the Moon's gravity is about 1.62
. Using 0
will make the projectile "float" in a straight line.
Minimum
Speed
The minimum speed the projectile can travel at.
Remove_Projectile
Whether to remove the projectile when the minimum speed is reached.
true = The projectile will be removed when the minimum speed is reached.
Maximum
Speed
:The maximum speed the projectile can travel at.
Remove_Projectile
:Whether to remove the projectile when the maximum speed is reached.
Drag
Drag allows you to multiply projectile velocity by a number every tick. Since we want the projectile to slow down, we should use a number between 0.0
and 1.0
(But you probably want to keep this between 0.9
and 1.0
, otherwise the projectile may slow down too quickly). Using exactly 1.0
will keep speed constant, and using any number above 1.0
will increase speed over time.
Base
The amount to multiply the speed by every tick.
In_Water
The amount to multiply the speed by when the projectile is in liquid.
When_Raining_Or_Snowing
The amount to multiply the speed by when it is raining or snowing.
You cannot use negative numbers for drag. To slow the projectile down, use a positive number <1, like 0.98
. To speed the projectile up like a rocket, use a positive number >1, like 1.03
.
Disable_Entity_Collisions
Setting this to true
will stop the projectile from colliding with entities. This is useful for providing a CPU performance boost to your projectile, but it will disable all entity interacts.
Maximum_Alive_Ticks
Defines the maximum amount of time, in ticks, in which projectile can be alive.
Defaults to 600
which is equal to 30
seconds.
Maximum_Travel_Distance
Defines the maximum amount of distance this projectile can travel before being removed.
Size
Defines the size of projectile that is used for hit detection. This size is added to each direction. Meaning 0.5
is same as 1x1x1 in size. Important note about using this is that, this only works for entities and NOT for blocks.
Defaults to 0.1
. As an example arrow
and snowball
have this set to 0.3
in vanilla.
Sticky
Use the Sticky wiki page.
Bouncy
Use the Bouncy wiki page.
Through
Use the Through wiki page.
Mechanics:
Casts mechanics to projectile's location. Useful when you want to make beeping for a grenade. Use Mechanics.
Last updated