aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0387-ItemStack-damage-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0387-ItemStack-damage-API.patch')
-rw-r--r--patches/api/0387-ItemStack-damage-API.patch9
1 files changed, 5 insertions, 4 deletions
diff --git a/patches/api/0387-ItemStack-damage-API.patch b/patches/api/0387-ItemStack-damage-API.patch
index f2c4cc4355..a07dfddbc3 100644
--- a/patches/api/0387-ItemStack-damage-API.patch
+++ b/patches/api/0387-ItemStack-damage-API.patch
@@ -8,14 +8,15 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241ddb8970907 100644
+index b5d882622d9b350b81b6c61348515cbc5aa65777..6807354bf157060cbddb395dd6220040b84e7c8d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1233,5 +1233,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
- * @param directionZ The relative z position of the knockback source direction
+@@ -1334,4 +1334,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void knockback(double strength, double directionX, double directionZ);
+ // Paper end - knockback API
+
++ // Paper start - ItemStack damage API
+ /**
+ * Notifies all clients tracking this entity that the item in
+ * the slot of this entity broke.
@@ -62,7 +63,7 @@ index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241dd
+ * @param amount the amount of damage to do
+ */
+ void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
- // Paper end
++ // Paper end - ItemStack damage API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f236f9bfa4d43dcbad5919abef3620fcd0696880..845037909658884167136955a02b99af0040fa9c 100644