From bdd826036dd18a891038a8bb4f7434d9fe30c506 Mon Sep 17 00:00:00 2001 From: tr7zw Date: Sat, 7 Dec 2024 13:13:01 +0100 Subject: [PATCH] Fix wearing default player heads crashing. Fix #205 --- .../java/dev/tr7zw/skinlayers/mixin/CustomHeadLayerMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/tr7zw/skinlayers/mixin/CustomHeadLayerMixin.java b/src/main/java/dev/tr7zw/skinlayers/mixin/CustomHeadLayerMixin.java index 61f305e..f81f358 100644 --- a/src/main/java/dev/tr7zw/skinlayers/mixin/CustomHeadLayerMixin.java +++ b/src/main/java/dev/tr7zw/skinlayers/mixin/CustomHeadLayerMixin.java @@ -52,7 +52,7 @@ public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int return; // too far away } //#if MC >= 12104 - if ((!livingEntityRenderState.headItem.isEmpty() || livingEntityRenderState.wornHeadType != null) && livingEntityRenderState.wornHeadProfile.isResolved()) { + if ((!livingEntityRenderState.headItem.isEmpty() || livingEntityRenderState.wornHeadType != null) && livingEntityRenderState.wornHeadProfile != null && livingEntityRenderState.wornHeadProfile.isResolved()) { GameProfile gameProfile = livingEntityRenderState.wornHeadProfile.gameProfile(); lastSkull = (SkullSettings) itemCache.computeIfAbsent(gameProfile, it -> new ItemSettings()); if (!lastSkull.initialized() && lastSkull.getHeadLayers() == null) {