Add entity heal API (#10267)

This commit is contained in:
TotalledZebra 2024-05-30 23:31:45 +03:00 committed by GitHub
parent a47e11d464
commit 3181470ad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 87 additions and 23 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 382b4f0854284a561325dde141000434a9ddd885..eaeacf28295a5f1af37c8733f36066a69d858cc3 100644
index 88cd49128a19efee6bf20dcfdcfda4b9bd5e4808..c761156e2b192ba26d608adc1a9366ff08f90ce3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -561,8 +561,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -568,8 +568,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@ -25,7 +25,7 @@ index 382b4f0854284a561325dde141000434a9ddd885..eaeacf28295a5f1af37c8733f36066a6
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
@@ -649,6 +656,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -656,6 +663,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);
}