Skip to content

Commit

Permalink
Apparently they actually put the null in the map (#10173)
Browse files Browse the repository at this point in the history
  • Loading branch information
uecasm authored Aug 27, 2024
1 parent 74eef59 commit ba52cef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ private static float getArmorValue(final ArmorMaterial material)
int value = 0;
for (final ArmorItem.Type type : ArmorItem.Type.values())
{
value += material.defense().getOrDefault(type, 0);
value += Objects.requireNonNullElse(material.defense().get(type), 0);
}
return value + material.toughness() * 4;
}
Expand Down

0 comments on commit ba52cef

Please sign in to comment.