Skip to content

About

See where it lands: client-side projectile trajectories with an honest spread zone

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Trajectory Projected

Build Minecraft 26.1 | 26.2 | 26.3 Fabric Java 25 MIT

Trajectory Projected

See where it lands, and how far the spread can carry it.

Trajectory Projected is a client-side mod for Minecraft 26.1–26.3 / Fabric that shows where your bow, crossbow, trident or thrown item will land. The flight is simulated tick by tick in the order vanilla uses, from the same position and rotation the server will fire with, so the line follows the real arrow rather than an approximation of it.

Every shot also carries the server's random spread, which no line can show. Around the hit, a spread zone falls on the blocks like a shadow and marks where the projectile can actually land.

The bow has been measured in game with logged shots, and the fishing rod against real casts; see Accuracy.

What it shows

Projectiles

  • Bow while drawn, at the draw it would fire with.
  • Crossbow when charged: arrows, Multishot volleys with every arrow on its own path, and firework rockets.
  • Trident while readied. A trident with Riptide, which launches you instead, shows nothing.
  • Thrown items: snowballs, eggs, ender pearls, splash and lingering potions, bottles o' enchanting and wind charges.
  • Fishing rod while held and not cast: the path of the cast and a ghost of the hook where it will land, with a ring when it will float on water. Hooking a mob or a player shows the cross.

The line

  • A dotted path that keeps an even spacing on screen, near and far, and stays steady while you move.
  • Parts hidden behind blocks are drawn faint and outlined, so the path never disappears behind a wall.
  • In first person the line starts beside the view, from the hand that throws, and bends into the flight. Crossbow lines start at the eyes.
  • A rocket's lifetime is random: its line fades out after the earliest moment it can explode.

The target

  • A hit marker on the surface the projectile will meet.
  • On a mob or a player the marker becomes a cross, the line pulses gently, and the crosshair turns into a cross.
  • Spread zone: a soft shade with a thin rim on the blocks around the hit. It wraps over steps and walls, leaves out what other blocks shield from the projectile, and its inner ring marks where about half of the shots land. A ring for 90% of the shots and an allowance for draw timing on servers can be turned on, and each part has its own switch.

Honest by design

  • Only what the client already knows is shown. The mod never aims, shoots or picks targets for you.
  • Where the outcome is unknown, it shows less rather than a confident wrong line: the path stops at chunks that are not loaded, and Multishot volleys whose spread depends on conditions only the server can check show only the arrow that flies straight regardless.
  • A shot into water shows no zone where its spread scatters too widely to say where the arrow lands, as near a shore.

Getting started

Install Fabric Loader 0.19.3+, Fabric API and Java 25, then place the Trajectory Projected JAR for your Minecraft version from Releases in your Minecraft instance's mods folder. Each version has its own file:

File Minecraft Fabric API
+26.1.x 26.1, 26.1.1, 26.1.2 0.145.1 or newer
+26.2 26.2 0.161.0 or newer
+26.3 26.3 0.166.2 or newer

Nothing needs to be installed on the server.

Press F7 in-game to open settings. A key to turn trajectories on and off can be set under Options → Controls → Key Binds → Trajectory Projected.

Settings are grouped into General, Line and Target: the fishing rod, the lead-in from the side, dot size and spacing, dimming far away, the path behind blocks, the spread zone, the hit marker and the cues on living targets each have their own switch. Search works across all pages; hover a setting for details. Changes save automatically. English and Russian translations are included.

Compatibility

Built for Minecraft 26.1.x, 26.2 and 26.3 with Fabric. I play on 26.2 with Sodium (0.9.2 tested).

With Iris (1.11.4 tested) and a shader pack active, the line, markers and spread zone are drawn over the pack's finished image, so they look the same as without shaders and stay sharp; they are not lit or fogged by the pack. Checked with Complementary Reimagined r5.8.1 and BSL v10.1.8. Without a pack, Iris changes nothing.

On 26.3 the mod has been checked in a local client run with Sodium 0.9.2. Iris 1.11.7 does not start on 26.3 even without this mod, so shaders there are untested. On 26.1.x the line over a Complementary pack has been checked with Iris 1.11.4.

Other rendering mods have not been tested.

On multiplayer I have tested one small server of my own; the results are under Accuracy. Plugins and custom rules can change what a server fires. Some servers don't allow mods like this one, so check the rules of the server you play on.

Accuracy

The simulation follows vanilla's own code: the launch, the order of operations in each tick, water, entity hitboxes and the random spread. Unit tests compare it with vanilla's formulas, which says nothing about the game itself, so I also measured it in game.

The measurements below were made on 26.2. Each version's file follows its own vanilla, and the unit tests run against each version's code; 26.1.x and 26.3 have not been measured in game separately.

I fired 334 logged bow shots and compared each prediction with the launch the server sent and with where the arrow stopped. The first 30 partial draws on the server exposed a bug in how the mod counted the draw. It is fixed, and the table shows the series fired after the fix instead.

Conditions Shots Launch within vanilla's spread limit Largest flight error, blocks
Singleplayer, standing, 25–59 blocks 92 92 0.049
Singleplayer, moving, jumping, partial draw, 12–73 blocks 92 92 0.009
Server, full draw, standing and strafing 60 60 0.009
Server, partial draw, 9–15 blocks 60 38 0.002

Flight error is how far the arrow stopped from a simulation started from the launch the server actually sent, so it leaves out the random spread. Apart from one shot at 0.049 blocks, which I can't explain, it stayed under 0.01.

The random spread is what you see in practice. Standing in singleplayer, arrows stopped a median of 0.6 blocks from the predicted point at 25 blocks, 1.6 at 43 and 1.3 at 59, and never more than 4.6. Zero misses in 184 singleplayer launches puts the real rate below about 1.6% (95% confidence).

The zone's rings hold up against real shots. The log has the spread the server drew for each arrow, and of 291 bow shots, 48.8% fell inside the half ring (95% confidence 43–55%) and 92.4% inside the 90% ring (89–95%). This is counted across the launch direction, before the flight bends the spread. The 43 shots the server counted at another draw tick are left out.

Fishing rod

In my test runs in singleplayer, real casts on the ground, on water, against a wall and next to a mob came to rest within 0.09 blocks of the prediction. The hook's own random spread moves it by up to about 0.2 blocks, less than the ghost bobber. On my own server, the same one as above, I didn't notice a cast landing outside the ghost, even on the very edge of a block. That was by eye, not logged.

Spread on servers

At full draw a server behaved like singleplayer. A partial draw is different: the client and the server count the draw separately, and in 22 of those 60 shots the server counted one tick more or less than the client. Those 22 are all the launches outside the limit in the table. The client can't know when this happens. The likely cause is that client and server ticks aren't in step, but I haven't confirmed that.

A tick matters because a partial draw gains power with every tick. At 9–15 blocks, a shot a tick off stopped about 1.1–1.4 blocks from the prediction, up to 2.1, while shots with a matching count stopped a median of 0.14–0.24 blocks away. At full draw the power no longer changes, so a tick makes no difference.

Allow for draw timing, on the Target page and off by default, widens the spread zone to cover a tick more or less as well. The zone gets larger and busier, so use it if you shoot partial draws on servers. It only applies to the bow, and has no effect in singleplayer or at full draw. Its weights (60% same tick, 20% each side) are a rough figure from that one server, and I haven't checked the widened zone against real shots yet.

Limits

  • The server results come from one server and one evening: about 166 ms ping and no other players. Other latency, server load or plugins may give different numbers.
  • Only the bow has been measured with logged shots. The crossbow, the trident and thrown items had short singleplayer checks: 10 crossbow arrows, 4 ender pearls and 3 tridents all landed inside their zones. On a server the fishing rod was checked by eye only.
  • The widened zone for draw timing has not been checked against real shots.
  • A client loses track of an arrow at about 64 blocks, so past that distance the log has only the arrow's last known position.

License

The code is under the MIT license. The mod icon and the banner are simplified recolors of Minecraft textures, which belong to Mojang, and are not covered by that license.

About

See where it lands: client-side projectile trajectories with an honest spread zone

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages