diff options
author | ronald <inglettronald@gmail.com> | 2023-07-30 17:41:02 -0500 |
---|---|---|
committer | ronald <inglettronald@gmail.com> | 2023-07-30 17:41:02 -0500 |
commit | cb1c7a0db3ba8990c65dce812a435bc1abadd369 (patch) | |
tree | c4ff025989ed50d40d9a7f9861961104667ba397 /src/main/kotlin/com/dulkirfabric/util | |
parent | d6faaa1f987b8766637fbc1e20a97112dfce164a (diff) | |
download | DulkirMod-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.kt | 9 |
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 |