Skip to content

Commit

Permalink
rebased and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Machine-Maker committed Aug 17, 2024
1 parent 21c4bdf commit 8504463
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Fri, 19 Jul 2024 08:43:01 -0700
Subject: [PATCH] Add even more Enchantment API

In a separate patch because it uses RegistryKeySet which
is after the previous "more enchant api" patch.

diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index 53dbb852d6a34f0814b81852c7f10f55c38299e7..1aee23103b8dceb036be6e97473a5aa8831cb66b 100644
index 53dbb852d6a34f0814b81852c7f10f55c38299e7..f38321c437b19125d57d25419e3cb564e3928d89 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -438,6 +438,56 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
Expand All @@ -19,7 +21,7 @@ index 53dbb852d6a34f0814b81852c7f10f55c38299e7..1aee23103b8dceb036be6e97473a5aa8
+ *
+ * @return the description component.
+ */
+ public abstract net.kyori.adventure.text.Component description();
+ public abstract net.kyori.adventure.text.@NotNull Component description();
+
+ /**
+ * Provides the registry key set referencing the items this enchantment is supported on.
Expand All @@ -33,7 +35,7 @@ index 53dbb852d6a34f0814b81852c7f10f55c38299e7..1aee23103b8dceb036be6e97473a5aa8
+ * Provides the registry key set referencing the item types this enchantment can be applied to when
+ * enchanting in an enchantment table.
+ * <p>
+ * If this value is {@code null}, {@link #supportedItems()} will be sourced instead in the context of an enchantment table.
+ * If this value is {@code null}, {@link #getSupportedItems()} will be sourced instead in the context of an enchantment table.
+ * Additionally, the tag {@link io.papermc.paper.registry.keys.tags.EnchantmentTagKeys#IN_ENCHANTING_TABLE} defines
+ * which enchantments can even show up in an enchantment table.
+ *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Fri, 19 Jul 2024 08:42:45 -0700
Subject: [PATCH] Add even more Enchantment API

In a separate patch because RegistryKeySet is used
and the previous "more enchant api" patch is before that.

diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
index 4221a1e9cba35c8dc58e51e162e7fcbd0e8b31af..34934f0dbe66ee200cd99c002c53645660041548 100644
Expand Down

0 comments on commit 8504463

Please sign in to comment.