Add more missing entity API (#7592)
This commit is contained in:
parent
7b46444bea
commit
a686ff5670
3 changed files with 253 additions and 0 deletions
|
@ -69,6 +69,39 @@ index 0d88dce9978243a1f995c5fb448c5d71b01136eb..cad47139de57642fb3bb483e7a5acaa7
|
|||
+ public void setEating(boolean eating);
|
||||
+ // Paper end - Horse API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Bee.java b/src/main/java/org/bukkit/entity/Bee.java
|
||||
index adb20a9abba33c32d553f620fa82b27dff64ab5f..ca6baec5ce00b4d169ab4ff416f616db32615010 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Bee.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Bee.java
|
||||
@@ -93,4 +93,28 @@ public interface Bee extends Animals {
|
||||
* @param ticks Ticks the bee cannot enter a hive for
|
||||
*/
|
||||
void setCannotEnterHiveTicks(int ticks);
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Sets the override for if the bee is currently rolling.
|
||||
+ *
|
||||
+ * @param rolling is rolling, or unset for vanilla behavior
|
||||
+ */
|
||||
+ void setRollingOverride(@org.jetbrains.annotations.NotNull net.kyori.adventure.util.TriState rolling);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the plugin set override for if the bee is currently rolling.
|
||||
+ *
|
||||
+ * @return plugin set rolling override
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.NotNull
|
||||
+ net.kyori.adventure.util.TriState getRollingOverride();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the bee is currently rolling.
|
||||
+ *
|
||||
+ * @return is rolling
|
||||
+ */
|
||||
+ boolean isRolling();
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index c2a566b864c82ffb094b7334d9e6e25a1bfc87d1..c340fecb61bac66baf0f44189d21bc85289b1269 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
|
@ -400,6 +433,36 @@ index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..1dcc2c8f4899da029af8b1c1b2ff1b5e
|
|||
+ boolean isSitting();
|
||||
+ // Paper end - Panda API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Piglin.java b/src/main/java/org/bukkit/entity/Piglin.java
|
||||
index 6fdc0e0bb62189dbf3cf9ce7a87b7fbb995956a3..d4cb4b0ed1d9766a87867dcf1a3a839526ba9332 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
|
||||
*/
|
||||
@NotNull
|
||||
public Set<Material> getBarterList();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Causes the piglin to appear as if they are charging
|
||||
+ * a crossbow.
|
||||
+ * <p>
|
||||
+ * This works with any item currently held in the piglin's hand.
|
||||
+ *
|
||||
+ * @param chargingCrossbow is charging
|
||||
+ */
|
||||
+ void setChargingCrossbow(boolean chargingCrossbow);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the piglin is currently charging the
|
||||
+ * item in their hand.
|
||||
+ *
|
||||
+ * @return is charging
|
||||
+ */
|
||||
+ boolean isChargingCrossbow();
|
||||
+ // Paper end
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/PolarBear.java b/src/main/java/org/bukkit/entity/PolarBear.java
|
||||
index 479f7a7c54c85cb685f56e60906650d1989c03ff..60267ee382de80fab86b440ff72a2455f427d148 100644
|
||||
--- a/src/main/java/org/bukkit/entity/PolarBear.java
|
||||
|
@ -498,6 +561,48 @@ index 28cdb3b544572ba7aeb9061e3163e3895ac7d4e6..c8015ff610e3c1222cb368ea1d8a0c2f
|
|||
+ void setLoyaltyLevel(int loyaltyLevel);
|
||||
+}
|
||||
+// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java
|
||||
index c34a3ea7b4d16817b4bee25d5c69787e22ec44d8..6a39042f1ea18b4849c4b6d2343938e0f430aefb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Vex.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Vex.java
|
||||
@@ -40,5 +40,37 @@ public interface Vex extends Monster {
|
||||
* @param summoner New summoner
|
||||
*/
|
||||
void setSummoner(@Nullable Mob summoner);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if this vex should start to take damage
|
||||
+ * once {@link Vex#getLimitedLifetimeTicks()} is less than or equal to 0.
|
||||
+ *
|
||||
+ * @return will take damage
|
||||
+ */
|
||||
+ boolean hasLimitedLifetime();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if this vex should start to take damage
|
||||
+ * once {@link Vex#getLimitedLifetimeTicks()} is less than or equal to 0.
|
||||
+ *
|
||||
+ * @param hasLimitedLifetime should take damage
|
||||
+ */
|
||||
+ void setLimitedLifetime(boolean hasLimitedLifetime);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the number of ticks remaining until the vex will start
|
||||
+ * to take damage.
|
||||
+ *
|
||||
+ * @return ticks until the vex will start to take damage
|
||||
+ */
|
||||
+ int getLimitedLifetimeTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the number of ticks remaining until the vex takes damage.
|
||||
+ * This number is ticked down only if {@link Vex#hasLimitedLifetime()} is true.
|
||||
+ *
|
||||
+ * @param ticks ticks remaining
|
||||
+ */
|
||||
+ void setLimitedLifetimeTicks(int ticks);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/bukkit/entity/Wither.java
|
||||
index 426d3693317cd303d35d8203026b528d87e401d5..8c95cd6933f11076de936854f379e6fc8600b525 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wither.java
|
||||
|
@ -537,3 +642,30 @@ index 426d3693317cd303d35d8203026b528d87e401d5..8c95cd6933f11076de936854f379e6fc
|
|||
+ void setCanTravelThroughPortals(boolean value);
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
index 0e5decadf31140d6cb121c298f935ccc12c7a7e7..490395f38c4d9977d30a6f48585a4ea0e7faff0f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wolf.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
@@ -39,4 +39,22 @@ public interface Wolf extends Tameable, Sittable {
|
||||
* @param color the color to apply
|
||||
*/
|
||||
public void setCollarColor(@NotNull DyeColor color);
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Sets if the wolf is interested.
|
||||
+ * <p>
|
||||
+ * This causes the wolf to tilt its head to the side.
|
||||
+ *
|
||||
+ * @param interested is interested
|
||||
+ */
|
||||
+ void setInterested(boolean interested);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the wolf is interested.
|
||||
+ *
|
||||
+ * @return is interested
|
||||
+ */
|
||||
+ boolean isInterested();
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue