geforkt von Mirrors/Paper
Add more fox API (#5743)
Dieser Commit ist enthalten in:
Ursprung
ed04368157
Commit
4a7d7decce
@ -215,3 +215,11 @@ public net.minecraft.world.entity.monster.Witch usingTime
|
||||
|
||||
# PlayerDeathEvent#getItemsToKeep
|
||||
public net.minecraft.world.entity.player.Inventory compartments
|
||||
|
||||
# Missing Entity API
|
||||
public net.minecraft.world.entity.animal.Fox isDefending()Z
|
||||
public net.minecraft.world.entity.animal.Fox setDefending(Z)V
|
||||
|
||||
public net.minecraft.world.entity.animal.Fox isFaceplanted()Z
|
||||
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
|
||||
|
||||
|
73
patches/api/Missing-Entity-Behavior-API.patch
Normale Datei
73
patches/api/Missing-Entity-Behavior-API.patch
Normale Datei
@ -0,0 +1,73 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Fri, 28 May 2021 21:06:59 -0400
|
||||
Subject: [PATCH] Missing Entity Behavior API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Fox.java b/src/main/java/org/bukkit/entity/Fox.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fox.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Fox.java
|
||||
@@ -0,0 +0,0 @@ public interface Fox extends Animals, Sittable {
|
||||
RED,
|
||||
SNOW;
|
||||
}
|
||||
+
|
||||
+ // Paper start - Add more fox behavior API
|
||||
+ /**
|
||||
+ * Sets if the fox is interested.
|
||||
+ *
|
||||
+ * @param interested is interested
|
||||
+ */
|
||||
+ public void setInterested(boolean interested);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the fox is interested.
|
||||
+ *
|
||||
+ * @return fox is interested
|
||||
+ */
|
||||
+ public boolean isInterested();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if the fox is leaping.
|
||||
+ *
|
||||
+ * @param leaping is leaping
|
||||
+ */
|
||||
+ public void setLeaping(boolean leaping);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the fox is leaping.
|
||||
+ *
|
||||
+ * @return fox is leaping
|
||||
+ */
|
||||
+ public boolean isLeaping();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if the fox is defending.
|
||||
+ *
|
||||
+ * @param defending is defending
|
||||
+ */
|
||||
+ public void setDefending(boolean defending);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the fox is defending.
|
||||
+ *
|
||||
+ * @return fox is defending
|
||||
+ */
|
||||
+ public boolean isDefending();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if the fox face planted.
|
||||
+ *
|
||||
+ * @param faceplanted face planted
|
||||
+ */
|
||||
+ public void setFaceplanted(boolean faceplanted);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the fox face planted.
|
||||
+ *
|
||||
+ * @return fox face planted
|
||||
+ */
|
||||
+ public boolean isFaceplanted();
|
||||
+ // Paper end - Add more fox behavior API
|
||||
}
|
56
patches/server/Missing-Entity-Behavior-API.patch
Normale Datei
56
patches/server/Missing-Entity-Behavior-API.patch
Normale Datei
@ -0,0 +1,56 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Mon, 21 Jun 2021 23:56:07 -0400
|
||||
Subject: [PATCH] Missing Entity Behavior API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
|
||||
@@ -0,0 +0,0 @@ public class CraftFox extends CraftAnimals implements Fox {
|
||||
|
||||
this.getHandle().getEntityData().set(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_1, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
|
||||
}
|
||||
+ // Paper start - Add more fox behavior API
|
||||
+ @Override
|
||||
+ public void setInterested(boolean interested) {
|
||||
+ getHandle().setIsInterested(interested);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isInterested() {
|
||||
+ return getHandle().isInterested();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setLeaping(boolean leaping) {
|
||||
+ getHandle().setIsPouncing(leaping);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isLeaping() {
|
||||
+ return getHandle().isPouncing();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setDefending(boolean defending) {
|
||||
+ getHandle().setDefending(defending);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isDefending() {
|
||||
+ return getHandle().isDefending();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setFaceplanted(boolean faceplanted) {
|
||||
+ getHandle().setFaceplanted(faceplanted);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isFaceplanted() {
|
||||
+ return getHandle().isFaceplanted();
|
||||
+ }
|
||||
+ // Paper end - Add more fox behavior API
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren