Add missing Piglin Dancing API (#8894)

This commit is contained in:
Duckulus 2023-09-14 12:54:43 +02:00 committed by GitHub
parent eea0c649ca
commit e68fd7162a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 4 deletions

View file

@ -8,6 +8,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
Co-authored-by: booky10 <boooky10@gmail.com>
Co-authored-by: Amin <amin.haddou@frg.wwschool.de>
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index c9837c7c47314b5bdf6c7973e6bc962d390dc13d..b7a2cecb334ce39fa09d8ab949a29eedbdc44c36 100644
@ -736,10 +737,10 @@ index 3dafdf14ced991ae1179ef1ca455da62f8c3243e..2fe8e8868f12bd9e846baf8858cd2c33
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Piglin.java b/src/main/java/org/bukkit/entity/Piglin.java
index 6fdc0e0bb62189dbf3cf9ce7a87b7fbb995956a3..d4cb4b0ed1d9766a87867dcf1a3a839526ba9332 100644
index 6fdc0e0bb62189dbf3cf9ce7a87b7fbb995956a3..eb0b7c18c1266748ff1e8e18e49b6c4f6e078b83 100644
--- a/src/main/java/org/bukkit/entity/Piglin.java
+++ b/src/main/java/org/bukkit/entity/Piglin.java
@@ -90,4 +90,25 @@ public interface Piglin extends PiglinAbstract, InventoryHolder, com.destroystok
@@ -90,4 +90,47 @@ public interface Piglin extends PiglinAbstract, InventoryHolder, com.destroystok
*/
@NotNull
public Set<Material> getBarterList();
@ -762,6 +763,28 @@ index 6fdc0e0bb62189dbf3cf9ce7a87b7fbb995956a3..d4cb4b0ed1d9766a87867dcf1a3a8395
+ * @return is charging
+ */
+ boolean isChargingCrossbow();
+
+ /**
+ * Sets whether the Piglin is dancing or not
+ *
+ * @param dancing is dancing
+ */
+ void setDancing(boolean dancing);
+
+ /**
+ * Causes the piglin to dance for a
+ * specified amount of time
+ *
+ * @param duration duration of the dance in ticks
+ */
+ void setDancing(long duration);
+
+ /**
+ * Gets if the piglin is currently dancing
+ *
+ * @return is dancing
+ */
+ boolean isDancing();
+ // Paper end
+
}