Links
Tags
Creators
Details
Licensed GPL-3.0-only
Published 7 months ago
Updated 3 months ago
All versions
2.6
Beta
Math Function 2.64 months ago 17
Compatibility
Minecraft: Java Edition
1.21.1
Platform
NeoForge
Supported environments
Client and server
Changes
【中文更新日志】
2.6 版本更新 - 表达式解析器升级:
- 重写了数学表达式解析器,现在支持更丰富的函数和更灵活的语法。
- 新增函数支持:
abs(绝对值)、exp(自然指数,#1)、带任意底数的log(base, value)(例如log(2, 8)计算以 2 为底 8 的对数)、以及sqrt(root, value)(求任意次方根,如sqrt(3, 64)计算 64 的 3 次方根)。 - 支持
logN简写形式,例如log2表示以 2 为底的对数,log10表示常用对数。 - 解析器更加健壮,能够正确处理函数嵌套和复杂表达式。
- 所有函数附魔和命令功能均使用新解析器,计算更准确,支持更广泛的数学表达式。
【English Changelog】
Version 2.6 - Expression parser upgrade:
- Rewrote the mathematical expression parser with support for more functions and flexible syntax.
- New functions added:
abs(absolute value),exp(natural exponential, #1),log(base, value)for arbitrary base logarithms (e.g.log(2, 8)computes log base 2 of 8), andsqrt(root, value)for arbitrary roots (e.g.sqrt(3, 64)computes the cube root of 64). - Supports shorthand
logNnotation, e.g.log2for base-2 logarithm,log10for common logarithm. - Parser is now more robust, correctly handling nested functions and complex expressions.
- All function enchantments and command features utilize the new parser for more accurate calculations and broader mathematical expression support.
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:Z2tJyNH1"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:PCGFmGm4:Z2tJyNH1"
}

