diff options
author | nea <nea@nea.moe> | 2023-05-30 22:47:56 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-30 22:47:56 +0200 |
commit | 88cb9468b4432f68d1197f512f68c951fdbdf3dd (patch) | |
tree | fb9da150d4173cbe33d68b80c6d86240fe03c4e2 /src/main/kotlin/moe/nea/firmament/util/uuid.kt | |
parent | 3139306088f8d3cad1b4906c3bbd1b412b9bda6f (diff) | |
download | firmament-88cb9468b4432f68d1197f512f68c951fdbdf3dd.tar.gz firmament-88cb9468b4432f68d1197f512f68c951fdbdf3dd.tar.bz2 firmament-88cb9468b4432f68d1197f512f68c951fdbdf3dd.zip |
Forge recipes and coin items
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/uuid.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/uuid.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/uuid.kt b/src/main/kotlin/moe/nea/firmament/util/uuid.kt new file mode 100644 index 0000000..d5409fa --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/util/uuid.kt @@ -0,0 +1,10 @@ +package moe.nea.firmament.util + +import java.math.BigInteger +import java.util.UUID + +fun parseDashlessUUID(dashlessUuid: String): UUID { + val most = BigInteger(dashlessUuid.substring(0, 16), 16) + val least = BigInteger(dashlessUuid.substring(16, 32), 16) + return UUID(most.toLong(), least.toLong()) +} |