diff --git a/src/main/java/com/minelittlepony/unicopia/compat/trinkets/TrinketsDelegate.java b/src/main/java/com/minelittlepony/unicopia/compat/trinkets/TrinketsDelegate.java index beb2e98e..dfa184dc 100644 --- a/src/main/java/com/minelittlepony/unicopia/compat/trinkets/TrinketsDelegate.java +++ b/src/main/java/com/minelittlepony/unicopia/compat/trinkets/TrinketsDelegate.java @@ -6,6 +6,7 @@ import java.util.stream.Stream; import com.minelittlepony.unicopia.EntityConvertable; import com.minelittlepony.unicopia.container.SpellbookScreenHandler; + import net.fabricmc.loader.api.FabricLoader; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; @@ -67,7 +68,7 @@ public interface TrinketsDelegate { } default Set getAvailableTrinketSlots(LivingEntity entity, Set probedSlots) { - return probedSlots.stream().filter(slot -> getEquipped(entity, slot).count() == 0).collect(Collectors.toSet()); + return probedSlots.stream().filter(slot -> getEquipped(entity, slot).anyMatch(ItemStack::isEmpty)).collect(Collectors.toSet()); } default Stream getEquipped(LivingEntity entity, Identifier slot) { diff --git a/src/main/java/com/minelittlepony/unicopia/item/WearableItem.java b/src/main/java/com/minelittlepony/unicopia/item/WearableItem.java index 9ff3c50c..b745b9bb 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/WearableItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/WearableItem.java @@ -51,11 +51,11 @@ public abstract class WearableItem extends Item implements Equipment { @Override public final EquipmentSlot getSlotType() { - return EquipmentSlot.OFFHAND; + return getSlotType(getDefaultStack()); } public EquipmentSlot getSlotType(ItemStack stack) { - return getSlotType(); + return EquipmentSlot.OFFHAND; } public static boolean dispenseArmor(BlockPointer pointer, ItemStack armor) {