diff options
Diffstat (limited to 'patches/api/0282-Attributes-API-for-item-defaults.patch')
-rw-r--r-- | patches/api/0282-Attributes-API-for-item-defaults.patch | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/patches/api/0282-Attributes-API-for-item-defaults.patch b/patches/api/0282-Attributes-API-for-item-defaults.patch index 7fbe487dca..a7e57fedef 100644 --- a/patches/api/0282-Attributes-API-for-item-defaults.patch +++ b/patches/api/0282-Attributes-API-for-item-defaults.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Attributes API for item defaults (Now replaced by upstream's API) diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 044c563daee7898c676bd6ba58ee395c52eda121..f6c3a4de2f07348d599e44d0b3173b8674ee85ac 100644 +index 04cb8279f2296cc42405355c7c1f120e761202c4..1df815c2e430a308baea08c9a7f3ca43377dc16e 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -4765,6 +4765,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - public io.papermc.paper.inventory.ItemRarity getItemRarity() { - return new org.bukkit.inventory.ItemStack(this).getRarity(); +@@ -4771,6 +4771,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla } -+ + // Paper end - item rarity API + ++ // Paper start - item default attributes API + /** + * Returns an immutable multimap of attributes for the slot. + * {@link #isItem()} must be true for this material. @@ -28,6 +28,8 @@ index 044c563daee7898c676bd6ba58ee395c52eda121..f6c3a4de2f07348d599e44d0b3173b86 + public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) { + return this.getDefaultAttributeModifiers(equipmentSlot); + } - // Paper end - ++ // Paper end - item default attributes API ++ /** + * Do not use for any reason. + * |