Add UUID Locking (per unique item locking that allows movement)
This commit is contained in:
@@ -13,6 +13,7 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen
|
||||
import net.minecraft.text.Text
|
||||
import net.minecraft.util.math.BlockPos
|
||||
import moe.nea.firmament.events.TickEvent
|
||||
import moe.nea.firmament.mixins.accessor.AccessorHandledScreen
|
||||
|
||||
object MC {
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
*/
|
||||
|
||||
@file:UseSerializers(DashlessUUIDSerializer::class)
|
||||
|
||||
package moe.nea.firmament.util
|
||||
|
||||
import io.github.moulberry.repo.data.NEUItem
|
||||
import io.github.moulberry.repo.data.Rarity
|
||||
import java.util.UUID
|
||||
import java.util.*
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.UseSerializers
|
||||
import kotlinx.serialization.decodeFromString
|
||||
@@ -73,6 +74,12 @@ private val jsonparser = Json { ignoreUnknownKeys = true }
|
||||
val ItemStack.extraAttributes: NbtCompound
|
||||
get() = getOrCreateSubNbt("ExtraAttributes")
|
||||
|
||||
val ItemStack.skyblockUUIDString: String?
|
||||
get() = extraAttributes.getString("uuid")?.takeIf { it.isNotBlank() }
|
||||
|
||||
val ItemStack.skyblockUUID: UUID?
|
||||
get() = skyblockUUIDString?.let { UUID.fromString(it) }
|
||||
|
||||
val ItemStack.petData: HypixelPetInfo?
|
||||
get() {
|
||||
val jsonString = extraAttributes.getString("petInfo")
|
||||
|
||||
Reference in New Issue
Block a user