Skip to content

Commit

Permalink
Fix crash with modular armor renderer (closes #470)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielOlvH committed Jun 22, 2022
1 parent a8b0b92 commit 012a1b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ModuleFeatureRenderer<T : LivingEntity, M : BipedEntityModel<T>, A : Biped
val itemStack = livingEntity.getEquippedStack(equipmentSlot)
val item = itemStack.item as? IRModularArmorItem ?: return
if (item.slotType == equipmentSlot) {
(this.contextModel as BipedEntityModel<T>).setAttributes(bipedEntityModel)
(this.contextModel as? BipedEntityModel<T>)?.setAttributes(bipedEntityModel) ?: return
setVisible(bipedEntityModel, equipmentSlot)
val rgb = item.getColor(itemStack)
val r = (rgb and 0xFF0000 shr 16) / 255f
Expand Down

0 comments on commit 012a1b8

Please sign in to comment.