aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/util
diff options
context:
space:
mode:
authorronald <inglettronald@gmail.com>2023-07-30 17:41:02 -0500
committerronald <inglettronald@gmail.com>2023-07-30 17:41:02 -0500
commitcb1c7a0db3ba8990c65dce812a435bc1abadd369 (patch)
treec4ff025989ed50d40d9a7f9861961104667ba397 /src/main/kotlin/com/dulkirfabric/util
parentd6faaa1f987b8766637fbc1e20a97112dfce164a (diff)
downloadDulkirMod-Fabric-cb1c7a0db3ba8990c65dce812a435bc1abadd369.tar.gz
DulkirMod-Fabric-cb1c7a0db3ba8990c65dce812a435bc1abadd369.tar.bz2
DulkirMod-Fabric-cb1c7a0db3ba8990c65dce812a435bc1abadd369.zip
Added Rift Stuff and some cooldowns
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util')
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/Utils.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/Utils.kt b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
index c2d65c3..18a442e 100644
--- a/src/main/kotlin/com/dulkirfabric/util/Utils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
@@ -4,7 +4,11 @@ import com.dulkirfabric.events.PlaySoundEvent
import com.dulkirfabric.events.SlayerBossEvents
import com.dulkirfabric.events.chat.ChatEvents
import meteordevelopment.orbit.EventHandler
+import net.minecraft.block.entity.SkullBlockEntity
+import net.minecraft.client.texture.PlayerSkinProvider
import net.minecraft.entity.Entity
+import net.minecraft.item.ItemStack
+import net.minecraft.nbt.NbtHelper
import net.minecraft.util.math.Vec3d
object Utils {
@@ -42,4 +46,9 @@ object Utils {
SlayerBossEvents.Fail(ScoreBoardUtils.slayerType ?: return ScoreBoardUtils.err()).post()
}
}
+
+ fun getSkullTexture(itemStack: ItemStack): String? {
+ return itemStack.getSubNbt(SkullBlockEntity.SKULL_OWNER_KEY)?.let(NbtHelper::toGameProfile)?.properties?.get(
+ PlayerSkinProvider.TEXTURES)?.first()?.value
+ }
} \ No newline at end of file