aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0273-More-Enchantment-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0273-More-Enchantment-API.patch')
-rw-r--r--patches/api/0273-More-Enchantment-API.patch20
1 files changed, 11 insertions, 9 deletions
diff --git a/patches/api/0273-More-Enchantment-API.patch b/patches/api/0273-More-Enchantment-API.patch
index 14f5473ccb..1119346aaa 100644
--- a/patches/api/0273-More-Enchantment-API.patch
+++ b/patches/api/0273-More-Enchantment-API.patch
@@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..aec3b41d7c3388e26fa203e3c062f1e6
+ }
+}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index daae9bb234d2e10530b2bed35fada98652514e0e..fc30fbffd83285d4ec102a18454ed95289329667 100644
+index daae9bb234d2e10530b2bed35fada98652514e0e..53dbb852d6a34f0814b81852c7f10f55c38299e7 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -290,11 +290,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
@@ -56,11 +56,11 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..fc30fbffd83285d4ec102a18454ed952
public abstract boolean isCursed();
/**
-@@ -328,6 +324,116 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
- * @return the name of the enchantment with {@code level} applied
- */
+@@ -330,6 +326,118 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
-+
+ // Paper end
+
++ // Paper start - more Enchantment API
+ /**
+ * Checks if this enchantment can be found in villager trades.
+ *
@@ -129,7 +129,7 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..fc30fbffd83285d4ec102a18454ed952
+ * @return the damage increase
+ * @deprecated Enchantments now have a complex effect systems that cannot be reduced to a simple damage increase.
+ */
-+ @Contract("-> fail")
++ @Contract("_, _ -> fail")
+ @Deprecated(forRemoval = true, since = "1.20.5")
+ public abstract float getDamageIncrease(int level, @NotNull org.bukkit.entity.EntityCategory entityCategory);
+
@@ -141,7 +141,7 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..fc30fbffd83285d4ec102a18454ed952
+ * @return the damage increase
+ * @deprecated Enchantments now have a complex effect systems that cannot be reduced to a simple damage increase.
+ */
-+ @Contract("-> fail")
++ @Contract("_, _ -> fail")
+ @Deprecated(forRemoval = true, since = "1.21")
+ public abstract float getDamageIncrease(int level, @NotNull org.bukkit.entity.EntityType entityType);
+
@@ -170,9 +170,11 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..fc30fbffd83285d4ec102a18454ed952
+ */
+ @NotNull
+ public abstract java.util.Set<org.bukkit.inventory.EquipmentSlotGroup> getActiveSlotGroups();
- // Paper end
-
++ // Paper end - more Enchantment API
++
// Paper start - mark translation key as deprecated
+ /**
+ * @deprecated this method assumes that the enchantments description
diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
index ac0371285370594d4de1554871b19bbcd2311730..da5d153a3e55a38b767359564001ad8663f9730b 100644
--- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java