Skip to content

Commit 6c8016c

Browse files
committed
fix: Port is_wearing_any_armor condition
1 parent 0926418 commit 6c8016c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

common/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,9 @@ public static void registerDefaults() {
401401
NoParameter.class,
402402
(context, parameters) -> {
403403
if (context.getEntity() instanceof LivingEntity livingEntity) {
404-
for (final var equipmentslot : EquipmentSlotGroup.ARMOR) {
405-
if (equipmentslot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR) {
406-
final var itemstack = livingEntity.getItemBySlot(equipmentslot);
407-
if (!itemstack.isEmpty()) {
408-
return true;
409-
}
404+
for (final var itemStack : livingEntity.getArmorAndBodyArmorSlots()) {
405+
if (!itemStack.isEmpty()) {
406+
return true;
410407
}
411408
}
412409
}

0 commit comments

Comments
 (0)