aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/util/Utils.kt
diff options
context:
space:
mode:
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