geforkt von Mirrors/Paper
Add entity API for getting the combined gene of a Panda (#9891)
Dieser Commit ist enthalten in:
Ursprung
5a34a7c895
Commit
d1c10d63dc
@ -705,6 +705,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @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 {
|
||||
|
@ -850,9 +850,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPanda extends CraftAnimals implements Panda {
|
||||
public void setHiddenGene(Gene gene) {
|
||||
this.getHandle().setHiddenGene(CraftPanda.toNms(gene));
|
||||
}
|
||||
|
||||
+ // Paper start - Panda API
|
||||
+ @Override
|
||||
+ public void setSneezeTicks(int ticks) {
|
||||
@ -878,10 +878,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void setUnhappyTicks(int ticks) {
|
||||
+ this.getHandle().setUnhappyCounter(ticks);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Gene getCombinedGene() {
|
||||
+ return CraftPanda.fromNms(this.getHandle().getVariant());
|
||||
+ }
|
||||
+ // Paper end - Panda API
|
||||
|
||||
+
|
||||
@Override
|
||||
public boolean isRolling() {
|
||||
return this.getHandle().isRolling();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren