Appearance
spool / LaunchOptions
Interface: LaunchOptions โ
Defined in: plugins/ballistics/launch.ts:19
Options for finding a launch that hits a target.
Flight time is the only free choice: for each time, the velocity that hits exactly is one division (see physics.ts). So the solver lists exact solutions and filters them by your constraints, rather than searching.
Whole ticks by default, so TNT with fuse = ticks explodes right on target.
Known differences from the game: no block collision, ground bounce or fluids; entities summoned mid-tick start moving next tick; TNT explodes 0.0625 above its feet; aim at feet; unloaded chunks don't tick; arrows fired by mobs get random spread.
Extended by โ
Properties โ
maxSpeed? โ
readonlyoptionalmaxSpeed?:number
Defined in: plugins/ballistics/launch.ts:25
Reject faster solutions, in blocks/tick. Default 10, vanilla's Motion limit.
maxTicks? โ
readonlyoptionalmaxTicks?:number
Defined in: plugins/ballistics/launch.ts:32
Latest flight time. Defaults to the projectile's fuse (80 for TNT), so it doesn't explode early.
minSpeed? โ
readonlyoptionalminSpeed?:number
Defined in: plugins/ballistics/launch.ts:23
Reject solutions slower than this, in blocks/tick. Default 0.
minTicks? โ
readonlyoptionalminTicks?:number
Defined in: plugins/ballistics/launch.ts:27
Earliest allowed flight time, in ticks. Default 1.
pitchRange? โ
readonlyoptionalpitchRange?: readonly [number,number]
Defined in: plugins/ballistics/launch.ts:37
Launch angle range in degrees, negative is up. [-90, -45] for a lob, [-20, 0] for a flat shot.
prefer? โ
readonlyoptionalprefer?:"min-speed"|"min-time"|"max-time"
Defined in: plugins/ballistics/launch.ts:44
Which exact solution to return:
"min-speed"(default): slowest shot that reaches."min-time": flattest and fastest."max-time": highest lob that fits; clears walls.
projectile? โ
readonlyoptionalprojectile?:ProjectileProfile
Defined in: plugins/ballistics/launch.ts:21
Which entity to model. Default PROJECTILES.tnt.
subTickSamples? โ
readonlyoptionalsubTickSamples?:number
Defined in: plugins/ballistics/launch.ts:49
Flight times tried per tick. Default 1. Raise for projectiles that must arrive between ticks.