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) {