From 012a1b83f39ab50a10d03ef3c1a8e2651e517053 Mon Sep 17 00:00:00 2001 From: GabrielOlvH Date: Tue, 21 Jun 2022 22:33:34 -0300 Subject: [PATCH] Fix crash with modular armor renderer (closes #470) --- src/main/kotlin/me/steven/indrev/armor/ModuleFeatureRenderer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/me/steven/indrev/armor/ModuleFeatureRenderer.kt b/src/main/kotlin/me/steven/indrev/armor/ModuleFeatureRenderer.kt index 684de2947..6d2b33253 100644 --- a/src/main/kotlin/me/steven/indrev/armor/ModuleFeatureRenderer.kt +++ b/src/main/kotlin/me/steven/indrev/armor/ModuleFeatureRenderer.kt @@ -32,7 +32,7 @@ class ModuleFeatureRenderer, A : Biped val itemStack = livingEntity.getEquippedStack(equipmentSlot) val item = itemStack.item as? IRModularArmorItem ?: return if (item.slotType == equipmentSlot) { - (this.contextModel as BipedEntityModel).setAttributes(bipedEntityModel) + (this.contextModel as? BipedEntityModel)?.setAttributes(bipedEntityModel) ?: return setVisible(bipedEntityModel, equipmentSlot) val rgb = item.getColor(itemStack) val r = (rgb and 0xFF0000 shr 16) / 255f