There was an error while loading. Please reload this page.
is_wearing_any_armor
1 parent 0926418 commit 6c8016cCopy full SHA for 6c8016c
1 file changed
common/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java
@@ -401,12 +401,9 @@ public static void registerDefaults() {
401
NoParameter.class,
402
(context, parameters) -> {
403
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
- }
+ for (final var itemStack : livingEntity.getArmorAndBodyArmorSlots()) {
+ if (!itemStack.isEmpty()) {
+ return true;
410
}
411
412
0 commit comments