diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-08-29 16:04:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 16:04:28 +0200 |
commit | 7d1f51a8937e0a86486267437d444696e81e8aa0 (patch) | |
tree | a5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java | |
parent | 5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff) | |
download | GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2 GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip |
Buildscript + Spotless (#318)
* Convert AES.java to readable class
* Buildscript
* Spotless
Diffstat (limited to 'src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java')
-rw-r--r-- | src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java b/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java index 89232eb007..13d73a3df6 100644 --- a/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java +++ b/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java @@ -1,4 +1,3 @@ - package Ic2ExpReactorPlanner; import java.math.BigInteger; @@ -9,15 +8,15 @@ import java.math.BigInteger; */ public class TaloniusDecoder { private BigInteger dataStack = null; - + public TaloniusDecoder(final String dataCode) { dataStack = new BigInteger(dataCode, 36); } - + public int readInt(final int bits) { return readBigInteger(bits).intValue(); } - + private BigInteger readBigInteger(final int bits) { BigInteger data = dataStack.and(BigInteger.ONE.shiftLeft(bits).subtract(BigInteger.ONE)); dataStack = dataStack.shiftRight(bits); |