aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0584-Get-entity-default-attributes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0584-Get-entity-default-attributes.patch')
-rw-r--r--patches/server/0584-Get-entity-default-attributes.patch15
1 files changed, 8 insertions, 7 deletions
diff --git a/patches/server/0584-Get-entity-default-attributes.patch b/patches/server/0584-Get-entity-default-attributes.patch
index 0364d2381c..fb93fa5806 100644
--- a/patches/server/0584-Get-entity-default-attributes.patch
+++ b/patches/server/0584-Get-entity-default-attributes.patch
@@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c09c494ebe7a0c13b8bce4234a23a92c300153f9..95a6f26f75efda7db41db9091107502e8d4e0453 100644
+index 5e8081350b2ec375373d8197bd1f3196652ec9d9..70c06eb6e743232d0e8243b12a927084c6c9414b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -538,6 +538,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -544,6 +544,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
}
@@ -105,10 +105,10 @@ index c09c494ebe7a0c13b8bce4234a23a92c300153f9..95a6f26f75efda7db41db9091107502e
@Override
diff --git a/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f61f80ce75
+index 0000000000000000000000000000000000000000..f512d416df883036965ff6c802fd242a4c9c8079
--- /dev/null
+++ b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java
-@@ -0,0 +1,39 @@
+@@ -0,0 +1,40 @@
+package io.papermc.paper.attribute;
+
+import org.bukkit.attribute.Attributable;
@@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f6
+import org.bukkit.attribute.AttributeInstance;
+import org.bukkit.attribute.AttributeModifier;
+import org.bukkit.entity.EntityType;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -124,12 +124,13 @@ index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f6
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public class EntityTypeAttributesTest extends AbstractTestingBase {
++@AllFeatures
++public class EntityTypeAttributesTest {
+
+ @Test
+ public void testIllegalEntity() {
+ assertFalse(EntityType.EGG.hasDefaultAttributes());
-+ assertThrows(IllegalArgumentException.class, () -> EntityType.EGG.getDefaultAttributes());
++ assertThrows(IllegalArgumentException.class, EntityType.EGG::getDefaultAttributes);
+ }
+
+ @Test