9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-archived-patches/unapplied/server/minecraft-patches/features/0067-Remove-stream-in-matchingSlot.patch
Dreeam 236010caba Cooking Tutorial
1. Wet the drys
2. Dry the wets
3. Wet the drys
4. Dry the wets
5. Wet the drys
6. Now dust the wets
2025-03-28 03:11:27 -04:00

28 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Taiyou06 <kaandindar21@gmail.com>
Date: Tue, 26 Nov 2024 19:58:29 -0500
Subject: [PATCH] Remove stream in matchingSlot
diff --git a/net/minecraft/world/item/enchantment/Enchantment.java b/net/minecraft/world/item/enchantment/Enchantment.java
index 7a620eb92b1e672cedd72ec4d986c01eba337686..183874d90d576d740c5d924accc5c0d7fdb8450c 100644
--- a/net/minecraft/world/item/enchantment/Enchantment.java
+++ b/net/minecraft/world/item/enchantment/Enchantment.java
@@ -126,7 +126,15 @@ public record Enchantment(Component description, Enchantment.EnchantmentDefiniti
}
public boolean matchingSlot(EquipmentSlot slot) {
- return this.definition.slots().stream().anyMatch(equipmentSlotGroup -> equipmentSlotGroup.test(slot));
+ // Leaf start - Remove stream in matchingSlot
+ for (EquipmentSlotGroup equipmentSlotGroup : this.definition.slots()) {
+ if (equipmentSlotGroup.test(slot)) {
+ return true;
+ }
+ }
+
+ return false;
+ // Leaf end - Remove stream in matchingSlot
}
public boolean isPrimaryItem(ItemStack stack) {