[ci skip] Move logic in our patches to ItemType/BlockType (#10772)

This commit is contained in:
Jake Potrebic
2024-05-23 10:32:02 -07:00
parent c7e42591dd
commit 98853ee548
12 changed files with 177 additions and 77 deletions

View File

@@ -10,10 +10,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -0,0 +0,0 @@ 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();
}
+
// 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 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ 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.
*