Links
Tags
Creators
Details
Licensed GPL-3.0-only
Published 7 months ago
Updated 3 months ago
All versions
2.1
Beta
Math Function 2.14 months ago 24
Compatibility
Minecraft: Java Edition
1.21.1
Platform
NeoForge
Supported environments
Client and server
Changes
【中文更新日志】
2.1 版本更新 - 弹道运动逻辑全面重写:
- 重写了箭矢、TNT 以及新增的烟花火箭的弹道计算,采用逐帧定位而非速度驱动,使轨迹精确贴合数学函数图像,消除原版因速度累积造成的偏差。
- 引入路径碰撞预检测,每 tick 检查飞行路径上的方块与实体:箭矢碰撞后恢复原版物理(含重力),TNT 碰撞后立即爆炸。
- 根据函数在当前点的切线斜率动态计算弹射物的俯仰角(pitch)和偏航角(yaw),飞行姿态更自然,朝向始终与曲线切线方向一致。
- 调整水平速度(HORIZONTAL_SPEED = 0.3)和轨迹缩放(TRAJECTORY_SCALE = 1.0),使轨迹表现更平滑,避免原版可能出现的跳跃感。
- 修复初始高度 f(0) 的定位逻辑,以发射点(origin)为参考基准,结合水平投影距离计算目标位置,确保不同发射角度下轨迹均正确。
【English Changelog】
Version 2.1 - Trajectory logic completely rewritten:
- Rewrote the trajectory calculation for arrows, TNT, and newly added fireworks, using per-tick position interpolation instead of velocity-driven motion, ensuring precise adherence to the mathematical function curve and eliminating deviations caused by accumulated velocity.
- Introduced pre-collision detection along the flight path; arrows revert to vanilla physics (with gravity) upon collision, and TNT explodes immediately.
- Dynamically sets pitch and yaw based on the tangent slope at each point, resulting in more natural flight attitudes aligned with the curve tangent.
- Adjusted HORIZONTAL_SPEED (now 0.3) and TRAJECTORY_SCALE (now 1.0) parameters for smoother trajectory performance, avoiding the stuttering effect of the previous version.
- Fixed initial height f(0) positioning: now uses the launch origin as reference and computes target positions from horizontal projection distance, ensuring correct trajectories for any firing angle.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:PCGFmGm4:ZBM6M9sV"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:PCGFmGm4:ZBM6M9sV"
}

