improve power substation power bank code #2753
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
remembered seeing this kila tier code when doing my multiblock pattern rework, now it should be better
Implementation Details
instead using a long array with the battery values it uses 2 longs, one is in base (1 << 63), this theorectically means it can only hold up to (1 << 126) - 1, but be real
also improves random tests for the power substation
Outcome
biginteger but mutable
Additional Information
nothing
Potential Compatibility Issues
none, probably if the legacy nbt code works