aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0967-Fix-equipment-slot-and-group-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0967-Fix-equipment-slot-and-group-API.patch')
-rw-r--r--patches/server/0967-Fix-equipment-slot-and-group-API.patch14
1 files changed, 8 insertions, 6 deletions
diff --git a/patches/server/0967-Fix-equipment-slot-and-group-API.patch b/patches/server/0967-Fix-equipment-slot-and-group-API.patch
index 34fd77dcd9..e45968e407 100644
--- a/patches/server/0967-Fix-equipment-slot-and-group-API.patch
+++ b/patches/server/0967-Fix-equipment-slot-and-group-API.patch
@@ -10,7 +10,7 @@ Adds the following:
Co-authored-by: SoSeDiK <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 0398ba2cac2b69111ce7c5f9e5680119dd27c6cf..7e280955067169f63f15162e9cad1e86e824a8e5 100644
+index fb6465bbb2a8bb7597c15d7ac8375f696b897e43..34641a6356876c46d05188a988c02835d0c06dc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1211,4 +1211,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -52,10 +52,10 @@ index 9d74577af071954e1e37201a96368c1360076209..eafa54c870c3e2aef30c3f9f96f51660
throw new IllegalArgumentException("Not implemented. This is a bug");
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f03b11bcb 100644
+index 88e1156510f3a43dd37e279205e5ed5dd120c1db..7f6f404f5a2be7876ae239355979e8c8a7a198ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -1448,7 +1448,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1450,7 +1450,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.attributeModifiers == null) return LinkedHashMultimap.create(); // Paper - don't change the components
SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create();
for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
@@ -64,7 +64,7 @@ index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f
result.put(entry.getKey(), entry.getValue());
}
}
-@@ -1522,9 +1522,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1524,9 +1524,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
while (iter.hasNext()) {
Map.Entry<Attribute, AttributeModifier> entry = iter.next();
@@ -77,10 +77,10 @@ index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f
}
diff --git a/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java b/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3122c3b99
+index 0000000000000000000000000000000000000000..a26dc8f4787276468417196440cb8f73670a56c7
--- /dev/null
+++ b/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java
-@@ -0,0 +1,51 @@
+@@ -0,0 +1,53 @@
+package io.papermc.paper.inventory.item;
+
+import java.lang.reflect.Field;
@@ -90,6 +90,7 @@ index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3
+import net.minecraft.world.entity.EquipmentSlot;
+import org.bukkit.craftbukkit.CraftEquipmentSlot;
+import org.bukkit.inventory.EquipmentSlotGroup;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+import org.junit.jupiter.params.provider.MethodSource;
@@ -97,6 +98,7 @@ index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
++@Normal
+class EquipmentSlotGroupTest {
+
+ static List<EquipmentSlotGroup> apiValues() throws ReflectiveOperationException {