Missing Entity API

Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
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>
Co-authored-by: TrollyLoki <trollyloki@gmail.com>
Co-authored-by: FireInstall <kettnerl@hu-berlin.de>
Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com>
Co-authored-by: TotalledZebra <Holappa57@gmail.com>
This commit is contained in:
Owen1212055
2021-05-28 21:06:59 -04:00
parent fb8f31e8e3
commit a2a581ba6b
37 changed files with 1089 additions and 7 deletions

View File

@@ -107,6 +107,98 @@ public interface Panda extends Animals, Sittable {
*/
int getUnhappyTicks();
// Paper start - Panda API
/**
* Sets the sneeze progress in this animation.
* This value counts up only if {@link Panda#isSneezing()} is true
*
* @param ticks sneeze progress
*/
void setSneezeTicks(int ticks);
/**
* Gets the current sneeze progress, or how many ticks this panda will sneeze for.
*
* @return sneeze progress
*/
int getSneezeTicks();
/**
* Sets the eating ticks for this panda.
* <p>
*
* This starts counting up as long as it is greater than 0.
*
* @param ticks eating ticks
*/
void setEatingTicks(int ticks);
/**
* Gets the current eating progress, or how many ticks this panda has been eating for.
*
* @return eating progress
*/
int getEatingTicks();
/**
* Sets the number of ticks this panda will be unhappy for.
* <p>
* This value counts down.
*
* @param ticks unhappy ticks
*/
void setUnhappyTicks(int ticks);
/**
* Sets if this panda is currently on its back.
*
* @param onBack is on its back
* @deprecated use {@link #setOnBack(boolean)}
*/
@Deprecated(forRemoval = true, since = "1.19")
default void setIsOnBack(boolean onBack) {
this.setOnBack(onBack);
}
/**
* Sets if this panda is currently sitting.
*
* @param sitting is currently sitting
* @deprecated use {@link #setSitting(boolean)}
*/
@Deprecated(forRemoval = true, since = "1.19")
default void setIsSitting(boolean sitting) {
this.setSitting(sitting);
}
/**
* Sets if this panda is currently sitting.
*
* @param sitting is currently sitting
*/
@Override
void setSitting(boolean sitting);
/**
* Gets if this panda is sitting.
*
* @return is sitting
*/
@Override
boolean isSitting();
/**
* Gets this Panda's combined gene.
* <p>
* The combined gene can be modified using
* {@link #setMainGene(Gene)} or {@link #setHiddenGene(Gene)}.
*
* @return combined gene
*/
@NotNull
Gene getCombinedGene();
// Paper end - Panda API
public enum Gene {
NORMAL(false),