Skip to content

Math Function 2.0 for Minecraft 1.21.1 (NeoForge)

BetaApril 18, 2026Minecraft 1.21.1NeoForge43 downloads on Modrinth
This isn't the latest version. The latest for 1.21.1 · NeoForge is 2.10Open 2.10 →
Test version — may have bugs. For a game without surprises, choose a release 2.10.

Files · 1

function_math-2.0-neoforge-1.21.1.jarPrimary47.7 KBDownload
Primary · 47.7 KB
SHA-1813b34ee1d354aba007d3c8d97fcaac08d4116f3SHA-512eb8ffe827e21271e9022a0f31fe1c395626de8ec1d7efa1ccca962c760e8557b7a2485c486d09a72d23273b9b9d79f2302b811fcef2e0b8dac5c7fdc7ccd6bec
Download

What's changed

【中文更新日志】

  • 新增“函数轨迹”附魔(弓、弩、打火石):

    • 将物品重命名为 f(x)=表达式 或 y=表达式 格式(例如 f(x)=x^2),即可激活特殊弹道。
    • 箭矢和 TNT 会沿数学函数 y = f(x) 的轨迹飞行,其中 x 为沿玩家面向方向的水平距离,y 为相对于发射点的高度。
    • 支持基本运算符(+ - * / ^)、三角函数(sin/cos/tan)、对数(log/ln)、平方根(sqrt)等。
    • 箭矢和 TNT 的起始高度自动设为 f(0),确保常函数或带常数项的函数正确上升。
    • TNT 点燃后引信延长至 10 秒,并沿函数轨迹飞行,碰撞到方块或实体时立即爆炸。
    • 兼容多重射击附魔(箭矢会略微分散)。
    • 箭矢/TNT 飞行时生成烟花/火焰粒子尾迹。
    • 超出距离(1000 格)或时间(600 tick)后自动恢复重力或爆炸。
  • 技术细节:使用 ConcurrentHashMap 避免多线程并发修改崩溃;采用数值微分计算切线速度,弹道平滑自然。

【English Changelog】

  • Added "Math Function" enchantment (for bow, crossbow, flint-and-steel):

    • Rename the item to f(x)=expression or y=expression (e.g. f(x)=x^2) to activate custom trajectory.
    • Arrows and TNT will follow the curve y = f(x), where x is the horizontal distance along player's facing direction, and y is height relative to launch point.
    • Supports basic operators (+ - * / ^), trig functions (sin/cos/tan), logarithms (log/ln), square root (sqrt), etc.
    • Initial height is set to f(0), so constant functions or those with constant terms work correctly.
    • TNT fuse extended to 10 seconds; it flies along the function curve and explodes immediately upon hitting blocks or entities.
    • Compatible with Multishot enchantment (arrows spread slightly).
    • Firework/flame particle trails are generated during flight.
    • Automatically reverts to gravity or explodes after exceeding max distance (1000 blocks) or ticks (600).
  • Technical: Uses ConcurrentHashMap to avoid ConcurrentModificationException; numerical differentiation provides smooth tangent-based velocity.

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More