aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/util/Utils.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-09 22:12:27 +0200
committerLinnea Gräf <nea@nea.moe>2024-05-09 22:12:27 +0200
commitdce5a156849a3ba1b09e28dbfc153fc14a7f7b2c (patch)
treeb51bffce829a14ed1bdccb581acec2dd1838540e /src/main/kotlin/com/dulkirfabric/util/Utils.kt
parent9d2b7bec68f98228acf913f029f0383e4dcff3d7 (diff)
downloadDulkirMod-Fabric-dce5a156849a3ba1b09e28dbfc153fc14a7f7b2c.tar.gz
DulkirMod-Fabric-dce5a156849a3ba1b09e28dbfc153fc14a7f7b2c.tar.bz2
DulkirMod-Fabric-dce5a156849a3ba1b09e28dbfc153fc14a7f7b2c.zip
Port to 1.20.6HEADmaster
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util/Utils.kt')
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/Utils.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/Utils.kt b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
index 342dc48..e6342cb 100644
--- a/src/main/kotlin/com/dulkirfabric/util/Utils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/Utils.kt
@@ -6,6 +6,7 @@ import com.dulkirfabric.events.WorldLoadEvent
import com.dulkirfabric.events.chat.ChatEvents
import meteordevelopment.orbit.EventHandler
import net.minecraft.block.entity.SkullBlockEntity
+import net.minecraft.component.DataComponentTypes
import net.minecraft.entity.Entity
import net.minecraft.item.ItemStack
import net.minecraft.nbt.NbtHelper
@@ -72,7 +73,7 @@ object Utils {
}
fun getSkullTexture(itemStack: ItemStack): String? {
- return itemStack.getSubNbt(SkullBlockEntity.SKULL_OWNER_KEY)?.let(NbtHelper::toGameProfile)?.properties?.get(
+ return itemStack.get(DataComponentTypes.PROFILE)?.properties?.get(
"textures")?.first()?.value
}
} \ No newline at end of file