SPIGOT-5380, SPIGOT-6958, #772: Add some missing entity API

By: Ollie <69084614+olijeffers0n@users.noreply.github.com>
This commit is contained in:
Bukkit/Spigot
2022-07-21 21:01:23 +10:00
parent 8c38fbb68a
commit ecc4ce98ab
8 changed files with 169 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Panda entity.
*/
public interface Panda extends Animals {
public interface Panda extends Animals, Sittable {
/**
* Gets this Panda's main gene.
@@ -37,6 +37,76 @@ public interface Panda extends Animals {
*/
void setHiddenGene(@NotNull Gene gene);
/**
* Gets whether the Panda is rolling
*
* @return Whether the Panda is rolling
*/
boolean isRolling();
/**
* Sets whether the Panda is rolling
*
* @param flag Whether the Panda is rolling
*/
void setRolling(boolean flag);
/**
* Gets whether the Panda is sneezing
*
* @return Whether the Panda is sneezing
*/
boolean isSneezing();
/**
* Sets whether the Panda is sneezing
*
* @param flag Whether the Panda is sneezing
*/
void setSneezing(boolean flag);
/**
* Gets whether the Panda is on its back
*
* @return Whether the Panda is on its back
*/
boolean isOnBack();
/**
* Sets whether the Panda is on its back
*
* @param flag Whether the Panda is on its back
*/
void setOnBack(boolean flag);
/**
* Gets whether the Panda is eating
*
* @return Whether the Panda is eating
*/
boolean isEating();
/**
* Sets the Panda's eating status. The panda must be holding food for this to work
*
* @param flag Whether the Panda is eating
*/
void setEating(boolean flag);
/**
* Gets whether the Panda is scared
*
* @return Whether the Panda is scared
*/
boolean isScared();
/**
* Gets how many ticks the panda will be unhappy for
*
* @return The number of ticks the panda will be unhappy for
*/
int getUnhappyTicks();
public enum Gene {
NORMAL(false),