Accurate Projectile Trajectory Preview 图标

Accurate Projectile Trajectory Preview

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.26
本资源为搬运资源,原资源地址: https://modrinth.com/mod/aptp
资源信息

Minecraft 版本: 1.21.11

平台: neoforge

标签: game-mechanics utility

资源介绍

Accurate Projectile Trajectory Preview

Forked from [Projectile Trajectory Preview](https://github.com/maDU59/ProjectilesTrajectoryPreview) by maDU59 ([MIT License](https://github.com/maDU59/ProjectilesTrajectoryPreview/blob/main/LICENSE))

Ever wondered where your arrow, snowball, or potion will land? This mod provides a visual preview of projectile trajectories, similar to PTP, but with improved prediction accuracy and no multiplayer limitations.

? Features

  • Trajectory Visualization: Displays the expected path of your projectile before launching.
  • Target Highlighting: Trajectory color indicates a higher likelihood of hitting a target.

⚠️ Limitations and Notes

  • Minecraft projectile physics include random spread offsets, so the actual impact position may slightly differ from the preview.
  • However, trajectory prediction is designed to be more precise than the original PTP implementation.

? Technical Changes Compared to Original PTP

  • This fork modifies both the simulation logic and multiplayer behavior:

Multiplayer behavior

  • Removed the server handshake check (serverHasMod)

  • Removed networking validation logic

  • Trajectory preview is now always available client-side (no server requirement)

Simulation changes

  1. Removed projectileInfo.order-based update system
    The original implementation updated motion using a configurable order array.
    This fork replaces it with a fixed per-tick update sequence:
  • position update

  • drag application

  • gravity application

This makes motion simulation consistent and closer to vanilla projectile behavior.

  1. Reworked entity collision handling
  • Reduced broad-phase AABB inflation from 1.0 to 0.3

  • Added distance-based spread-aware entity hit detection

  • Added a “guaranteed hit” detection flag when the ray intersects the true bounding box

  1. Improved spread simulation
  • Added distance-based spread offset:

spreadOffset = normalizedVelocity * (distanceFromStart * maxSpreadFactor)

  • Adjusted spread multiplier from * 3.0 to * 2.0

  • Spread is now simulated dynamically per step instead of being approximated

  1. Refined water physics handling
  • More explicit switching between normal drag/gravity and underwater values

  • Applied consistently during simulation loop

  1. Minor stability improvements
  • Early velocity zero-check (vel.lengthSqr() < 1e-8)

  • Added startPos tracking for spread calculation

? Modpacks

Feel free to include this mod in your modpacks.


Legal Information / Impressum: View Impressum on GitHub

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Bedrock Platform

价格:0 墨喵币
下载量:0

查看详情
Death=Mob

价格:0 墨喵币
下载量:0

查看详情
3D Resource Pack

价格:0 墨喵币
下载量:0

查看详情
LIFE-QUALITY OPTIMIZER

价格:0 墨喵币
下载量:0

查看详情