Skip to content

Fix incorrect capacity multiplier crashing the game when using comparator on blood altar - #137

Merged
koolkrafter5 merged 2 commits into
GTNewHorizons:masterfrom
HectorHW:fix-division-by-zero-capacity-multiplier
Jul 12, 2026
Merged

Fix incorrect capacity multiplier crashing the game when using comparator on blood altar#137
koolkrafter5 merged 2 commits into
GTNewHorizons:masterfrom
HectorHW:fix-division-by-zero-capacity-multiplier

Conversation

@HectorHW

@HectorHW HectorHW commented Jul 8, 2026

Copy link
Copy Markdown

Summary

!99 introduced comparator logic to get total amount of blood in player's soul network. Unfortunately using this new logic can crash the game with division by zero (VIDEO, also see attached crash log) and in some cases make your world impossible to join (actually happened in my singleplayer world on 2.8.4, also seen on dailies).

Debugging (or, more specifically, putting a logging statement in comparator code) has shown that in some cases .getOrbMultiplier() returns 0 (interestingly, this does not happen on the first comparator reading, but instead multiplier drops from 1.56 to 0 in my world after some updates). Determining the actual root cause is beyond my abilities, but at least using a neutral element for default should prevent crashing.

Fixes GTNewHorizons/GT-New-Horizons-Modpack#25627

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

crash-2026-07-08_22.16.37-client.txt
fml-client-latest.log

@koolkrafter5
koolkrafter5 enabled auto-merge (squash) July 12, 2026 09:31
@koolkrafter5
koolkrafter5 merged commit 708bbb5 into GTNewHorizons:master Jul 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comparator reading LP network state from Blood Altar causes java.lang.ArithmeticException: / by zero

2 participants