Waystones Calculate Inverted Minimum XP Cost Incorrectly
voidsong-dragonfly opened this issue ยท 1 comments
Minecraft Version
1.19.2 (LTS)
Mod Loader
Forge
Mod Loader Version
43.2.21
Mod Version
11.4.1
Balm Version
4.6.0
Describe the Issue
The minimum cost for XP for inverted distance calculations is improperly clamped. It has no minimum value because L162-L166 of PlayerWaystoneManager,
xpLevelCost = Mth.clamp(Math.floor(dist / (float) WaystonesConfig.getActive().blocksPerXPLevel()), minimumXpCost, maximumXpCost);
if (WaystonesConfig.getActive().inverseXpCost()) {
xpLevelCost = maximumXpCost - xpLevelCost;
}
only clamp to the minimum level to calculate the XP cost, and then inversion is done by subtracting from the maximum cost. This means that the XP cost is not clamped, and can reach zero as you approach the maximum configured distance.
Logs
No response
Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?
No response
Related: #738