compile fixes

compile fixes

compile fixes
This commit is contained in:
Jason Penilla 2024-04-24 20:40:32 -07:00
commit ce0e78c103
No known key found for this signature in database
GPG key ID: 0E75A301420E48F8
137 changed files with 222 additions and 204 deletions

View file

@ -11,10 +11,10 @@ the logic associated with damaging them
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a188aefec543352b4e0d9ce03103ac842db61fc8..48505c6df9d5fdbd426127e306926fae9824d0a9 100644
index a188aefec543352b4e0d9ce03103ac842db61fc8..e03cd68d6636dbd35249c0535072f22e3bd0d1ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1114,4 +1114,52 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1114,4 +1114,48 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().knockback(strength, directionX, directionZ);
};
// Paper end - knockback API
@ -59,11 +59,7 @@ index a188aefec543352b4e0d9ce03103ac842db61fc8..48505c6df9d5fdbd426127e306926fae
+ }
+
+ private void damageItemStack0(final net.minecraft.world.item.ItemStack nmsStack, final int amount, final net.minecraft.world.entity.EquipmentSlot slot) {
+ nmsStack.hurtAndBreak(amount, this.getHandle(), livingEntity -> {
+ if (slot != null) {
+ livingEntity.broadcastBreakEvent(slot);
+ }
+ });
+ nmsStack.hurtAndBreak(amount, this.getHandle(), slot);
+ }
+ // Paper end - ItemStack damage API
}