Mechanic

projectile

Launches a custom projectile at the target

Aliases

p

Configuration Fields (10)

NameTypeDefaultDescription
type ProjectileTypeNORMALThe type of the projectile, NORMAL or METEOR
gravity
g
PlaceholderFloat0The gravity modifier the projectile uses
bounces PREM
bounce
booleanfalseThe projectile can bounce
bounceVelocity
bv
float0.9The velocity modifier of the bounce
highaccuracymode
ham
ProjectileTriOptionPLAYERS_ONLYWhether to use high-accuracy mode, which raytraces every tick to ensure the projectile cannot ever go anything
hugSurface
hs
ProjectileSurfaceModefalseWhether the projectile will hug the surface
hugLiquid
hugWater, hugLava
ProjectileSurfaceModefalseIf hugSurface is set, determines whether the projectile will hug liquid
heightFromSurface
hfs
float
maxClimbHeight
mch
float3The number of attempts the projectile will try to increase its y-location before terminating the projectile
maxDropHeight
mdh
float10The number of attempts the projectile will try to decrease its y-location before terminating the projectile

Examples & Notes

Special Notes

For the onStart Skill: onStart skills work in a special way - any buff or “special effect” mechanics fired by onStart that have a duration (such as ParticleTornado) will attach to the projectile for their duration, which allows for some interesting effects.

For the onTick Skill: using the @origin targeter will cause any skills or effects to target the projectile’s location. This is the intended way to configure how the projectile looks.

For the onHit Skill: Any targets the projectile hits are passed to the skill inherently. Any targeters you put in the onHit skill will override these and cause your skill to likely not work as you intend.

For the onEnd Skill: Special effects for the projectile’s end also use @origin. Also, If you want entities near the end-point of the projectile to be hit in a certain way (such as a final large fireball explosion) you can use the @PlayersNearOrigin{r=[radius]} targeter.

Types:
There are two types of projectiles, the normal variant and also the Meteor variant.
Meteor projectiles are created above the target, rather than at the mob that is firing the projectile.
Because of this, meteor projectiles cannot use certain attributes (which ones are pending further testing).

Projectile Bullets

The bullet type that will represent the projectile. These can be specified via the BulletType attribute. These work with the projectile, missile, and orbital mechanics.

BulletType Aliases Description
ARROW The bullet will be a minecraft projectile
BLOCK The bullet will be a block
SMALLBLOCK The bullet will be a small block
ITEM MYTHICITEM The bullet will be an item or MythicItem
MOB The bullet will be a mob. If a Mythicmobs, it will retain its skills
TRACKING ARMOR_STAND, ARMORSTAND, PSTAND The bullet will be an item, but its rotation will be adjusted depending on the projectile’s direction
REALTRACKING RTRACKING, REAL_ARMOR_STAND, REALARMORSTAND, STAND As above, but a real armor stand will also be spawned instead of a packet
DISPLAY The projectile will be a display entity
TEXT The projectile will display a line of text
ME MEG, MODELENGINE The projectile will be a ModelEngine model

Examples:

  - projectile{bulletType=ARROW;arrowType=TRIDENT;...}
  - projectile{bulletType=BLOCK;material=STONE;...}
  - projectile{bulletType=ITEM;material=MyMythicItem;...}
  - projectile{bulletType=MOB;mob=SkeletonKing;...}

Universal Bullet Attributes

Attribute Aliases Description Default
bulletforwardoffset bulletfo, bulletoffset, bfo The offset of the bullet 1.8
bulletYOffset byo The Y offset of the bullet 0

ARROW Bullet

Attribute Aliases Description Default
arrowtype bulletarrowtype The type of the projectile to use. Can be NORMAL,SPECTRAL,TRIDENT NORMAL

BLOCK Bullet

Attribute Aliases Description Default
bulletmaterial material, mat The material of the bullet STONE
bulletspin bspin The spin of the bullet 0
audience The [Audience][] of the bullet world

SMALLBLOCK Bullet

Attribute Aliases Description Default
bulletmaterial material, mat The material of the bullet STONE
audience The [Audience][] of the bullet world

ITEM Bullet

Attribute Aliases Description Default
bulletmaterial material, mat The material of the bullet, either a vanilla item type or custom MythicItem STONE
bulletModel model The CustomModelData integer for the material (define model strings on a MythicItem instead) 0
bulletColor The color of the material, if applicable
bulletmatchdirection bmd, bulletsmall Should the bullet face where the projectile is facing false
bulletEnchanted enchanted Should the material be enchanted false
audience The [Audience][] of the bullet world

MOB Bullet

Attribute Aliases Description Default
mob mobType, mm The mob of the bullet SkeletalKnight
bulletspin bspin The spin of the bullet 0
bulletmatchdirection bmd Should the bullet face where the projectile is facing false
bulletKillable bk Allow other entities to damage the projectile bullet false
bulletYOffset byo The Y offset of the bullet mob 1.35
bulletForwardOffset bfo The forward offset of the bullet mob 1.35

TRACKING Bullet

Attribute Aliases Description Default
bulletmaterial material, mat The material of the bullet, can be vanilla item type or MythicItem STONE
bulletModel model The CustomModelData integer for the material (define model strings on a MythicItem instead) 0
bulletColor The color of the material, if applicable
bulletEnchanted enchanted Should the material be enchanted false
pitch The pitch rotation, in radians 0
yaw The yaw rotation, in radians 0
roll The roll rotation, in radians 0
rotation rot The rotation of the bullet in radians, in the x,y,z format 0,0,0
pitchspeed ps The pitch rotation speed 0
yawspeed ys The yaw rotation speed 0
rollspeed rs The roll rotation speed 0
rotationspeed rotspeed, rots The rotation speed of the bullet, in the x,y,z format 0,0,0
audience The [Audience][] of the bullet world

REALTRACKING Bullet

Attribute Aliases Description Default
bulletmaterial material, mat The material of the bullet, can be vanilla item type or MythicItem STONE
bulletModel model The CustomModelData integer for the material (define model strings on a MythicItem instead) 0
bulletColor The color of the material, if applicable
bulletEnchanted enchanted Should the material be enchanted false

DISPLAY Bullet

Attribute Aliases Description Default
bulletmaterial material, mat, bulletitem The material of the bullet, can be vanilla item type or MythicItem STONE
bulletModel model The model of the bullet
bulletcustommodeldata custommodeldata, cmd The CustomModelData integer for the material 0
bulletColor The color of the material, if applicable
bulletEnchanted enchanted Should the material be enchanted false
bulletscale scale The scale of the bullet 0.5,0.5,0.5
bulletyoffset byoffset, byo The y offset of the bullet 0.2
bulletBillboarding bulletBillboard The [billboard type] of the bullet FIXED
bulletbrightness bulletbrightnessblock The bullet’s brightness -1
bulletbrightnesssky The bullet’s sky light brightness bulletbrightness
bulletCullingDistance bulletViewDistance, bulletViewRange The range in which the bullet will be visible 50
pitch The pitch rotation, in radians 0
yaw The yaw rotation, in radians 0
roll The roll rotation, in radians 0
rotation rot The rotation of the bullet in radians, in the x,y,z format 0,0,0
pitchspeed ps The pitch rotation speed 0
yawspeed ys The yaw rotation speed 0
rollspeed rs The roll rotation speed 0
rotationspeed rotspeed, rots The rotation speed of the bullet, in the x,y,z format 0,0,0
tx The translation on the x axis 0
ty The translation on the y axis 0
tz The translation on the z axis 0
translation pos, offset The translations on the axes, in the x,y,z format 0,0,0
hideFirstTick hft Hides the item for the first tick false
bulletCullingHeight cullHeight The bullet’s display culling height 0.0
bulletCullingWidth cullWidth The bullet’s display culling width 0.0
audience The [Audience][] of the bullet world
bulletgen generation, bulletgeneration If MythicCrucible is installed, the generation option for the bullet item

ME Bullet

Attribute Aliases Description Default
bulletModel model The MEG model to use for the bullet
bulletstate state The state to play for the MEG model
bulletcolor The tint of the bullet’s model
bulletscale The scale of the bullet 1
bulletEnchanted enchanted Whether the bullet’s model should be enchanted false
bulletGlowing glowing Whether the bullet’s model should be glowing false
bulletglowcolor The glow color of the bullet, if bulletGlowing is set to true
bulletCulling culling Whether to apply culling for the bullet model true
bulletViewRadius From how far the bullet can be seen, if greater than 0. -1
bulletBrightness The brightness of the bullet
bulletalod alod Whether to use LOD culling on the bullet true

TEXT Bullet

Attribute Aliases Description Default
bulletText text The text of the bullet *
bulletBillboard billboard The [billboard type] of the bullet CENTER
bulletscale scale The scale of the bullet 0.5,0.5,0.5
forcedBulletRotation forcedRotation Forces the rotation of the bullet with the specified pitch, yaw and roll, in the x,y,z format. Leave empty to allow the bullet to dynamically rotate based on the travel direction
bulletRotatesBasedOnDirection Whether the text bullet should rotate based on the direction of movement. Might not be what you expect false
bulletyoffset byoffset, byo The y offset of the bullet 0
bulletforwardoffset bulletfo, bulletoffset, bfo The forward offset of the bullet 1.8
backgroundcolor color The Background color, in the ARGB format 64,0,0,0
bulletCullingDistance bulletViewDistance, bulletViewRange The range in which the bullet will be visible 50
bulletCullingHeight cullHeight The bullet’s display culling height 0.0
bulletCullingWidth cullWidth The bullet’s display culling width 0.0
bulletBrightness bulletBrightnessBlock The bullet’s brightness, if the value is > -1 -1
bulletBrightnessSky The bullet’s sky light brightness, if the value is > -1 -1
audience The [Audience][] of the bullet world

Examples

This example shoots a fast-moving ball of ice that damages and slows the first entity it hits:
Mob File

Mob:
  Type: SKELETON
  Skills:
  - skill{s=IceBolt} @target ~onTimer:100

Skills File

IceBolt:
  Skills:
  - projectile{onTick=IceBolt-Tick;onHit=IceBolt-Hit;v=8;i=1;hR=1;vR=1;hnp=true}
IceBolt-Tick:
  Skills:
  - effect:particles{p=snowballpoof;amount=20;speed=0;hS=0.2;vS=0.2} @origin
IceBolt-Hit:
  Skills:
  - damage{a=10}
  - potion{type=SLOW;duration=100;lvl=2}

hitConditions usage example:

  - projectile{hitConditions=[  - isMonster true  - isFrozen false ]}

Universal Mechanic Options

Mentioned by

Author:
Ashijin
Community-maintained documentation for the Mythic plugin ecosystem.