Fix horse armor desync (#11341)
This commit is contained in:
parent
e01ddf4627
commit
509ea2fd17
846 changed files with 335 additions and 341 deletions
23
patches/server/0756-Add-entity-knockback-API.patch
Normal file
23
patches/server/0756-Add-entity-knockback-API.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MelnCat <melncatuwu@gmail.com>
|
||||
Date: Sun, 16 Oct 2022 12:10:17 -0700
|
||||
Subject: [PATCH] Add entity knockback API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index f278346bb5fe816f3c559a02692b125dde0446f4..3cc29107c018848a364e0fca689acf16cdd0ddb0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1098,4 +1098,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
throw new UnsupportedOperationException("Cannot set the hurt direction on a non player");
|
||||
}
|
||||
// Paper end - hurt direction API
|
||||
+
|
||||
+ // Paper start - knockback API
|
||||
+ @Override
|
||||
+ public void knockback(final double strength, final double directionX, final double directionZ) {
|
||||
+ Preconditions.checkArgument(strength > 0, "Knockback strength must be > 0");
|
||||
+ this.getHandle().knockback(strength, directionX, directionZ);
|
||||
+ };
|
||||
+ // Paper end - knockback API
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue