JLFork Power Scale Bridge
本项目基于以下确切的 JAR 文件构建:
- JustLevelingFork 1.2.9
- Silent's Power Scale 0.3.1.1
- NeoForge 21.1.215
- Minecraft 1.21.1
- Java 21
功能说明
该桥接监听 Power Scale 的 SetMobDifficultyEvent,读取怪物所在维度中距离最近的非旁观模式玩家,获取该玩家的 JLFork Strength(力量)专长等级,并用基于 Strength 的难度替代 Power Scale 原有的本地难度。
默认映射关系:
Strength 1 -> Power Scale 难度 0 -> Power Scale 力量等级 1
Strength 2 -> 难度 1 -> 力量等级 2
Strength 10 -> 难度 9 -> 力量等级 10
Strength 25 -> 难度 24 -> 力量等级 25
这与 Power Scale 自身的公式一致:新力量等级 = (int)新难度 + 1。
为何需要 Tick 处理器
Power Scale 的 MobDifficulty 类每 200 个 Tick 重新计算一次本地难度,且该路径不会触发 SetMobDifficultyEvent。因此,桥接组件还会以最低优先级监听 EntityTickEvent.Post,并在 Power Scale 自身的 Tick 处理器之后重新应用基于 Strength 的难度。
配置
服务器配置文件为 config/jlforkpowerscale-server.toml:
strength_multiplier = 1.0
minimum_difficulty = 0.0
maximum_difficulty = 100.0
use_nearest_player = true
reapply_on_tick = true
在乘数 1.0 时,Strength 被视为目标 Power Scale 力量等级。
注意事项
Power Scale 仍会在 setDifficultyClamped 内部对其所属实体的最小/最大难度进行限制。如果某个 Boss 或敌对群体配置的最大难度低于请求值,则该群体的上限将生效。
桥接组件有意不修改 Power Scale 的缩放属性定义。它仅提供难度;Power Scale 仍负责处理生命值、攻击伤害、移动速度、投射物伤害、枯萎效果及其他配置的缩放行为。
构建
使用标准的 NeoForge 1.21.1 Java 21 环境。提供的两个模组 JAR 文件位于 libs/ 目录下,作为仅编译依赖项。
创建此归档包的环境能够检查并验证所提供 JAR 的确切公共 API,但由于无法下载 NeoForge Gradle 工具链,因此未在此环境中编译该归档包。
JLFork Power Scale Bridge
This project is built around these exact JARs:
- JustLevelingFork 1.2.9
- Silent's Power Scale 0.3.1.1
- NeoForge 21.1.215
- Minecraft 1.21.1
- Java 21
What it does
The bridge listens for Power Scale's SetMobDifficultyEvent, reads the nearest non-spectator player in the mob's dimension, obtains that player's JLFork Strength aptitude, and replaces Power Scale's normal local difficulty with a Strength-derived difficulty.
Default mapping:
Strength 1 -> Power Scale difficulty 0 -> Power Scale power level 1
Strength 2 -> difficulty 1 -> power level 2
Strength 10 -> difficulty 9 -> power level 10
Strength 25 -> difficulty 24 -> power level 25
This matches Power Scale's own formula: new power level = (int)newDifficulty + 1.
Why there is a tick handler
Power Scale's MobDifficulty class recalculates local difficulty every 200 ticks and that path does NOT post SetMobDifficultyEvent. The bridge therefore also listens to EntityTickEvent.Post at LOWEST priority and reapplies the Strength-based difficulty after Power Scale's own tick handler.
Configuration
The server config is config/jlforkpowerscale-server.toml:
strength_multiplier = 1.0
minimum_difficulty = 0.0
maximum_difficulty = 100.0
use_nearest_player = true
reapply_on_tick = true
At multiplier 1.0, Strength is treated as the target Power Scale power level.
Notes
Power Scale still applies its own entity-group min/max clamp inside setDifficultyClamped. If a boss or hostile group has a configured maximum below the requested value, that group's cap wins.
The bridge intentionally does not modify Power Scale's scaling-attribute definitions. It only supplies the difficulty; Power Scale remains responsible for health, attack damage, movement speed, projectile damage, blights, and other configured scaling behavior.
Build
Use a normal NeoForge 1.21.1 Java 21 environment. The two supplied mod JARs are in libs/ and are compile-only dependencies.
The environment used to create this archive could inspect and validate the exact public API of both supplied JARs, but it could not download the NeoForge Gradle toolchain, so the archive has not been compiled in this environment.
评论 0
登录后参与评分
还没有评论,来抢沙发吧