mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
Add Missing Entity API: Cat (#5744)
This commit is contained in:
@@ -4,6 +4,36 @@ 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/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
|
||||
@@ -0,0 +0,0 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
|
||||
public void setCollarColor(DyeColor color) {
|
||||
this.getHandle().setCollarColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData()));
|
||||
}
|
||||
+ // Paper Start - More cat api
|
||||
+ @Override
|
||||
+ public void setLyingDown(boolean lyingDown) {
|
||||
+ this.getHandle().setLying(lyingDown);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isLyingDown() {
|
||||
+ return this.getHandle().isLying();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setHeadUp(boolean headUp) {
|
||||
+ this.getHandle().setRelaxStateOne(headUp);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isHeadUp() {
|
||||
+ return this.getHandle().isRelaxStateOne();
|
||||
+ }
|
||||
+ // Paper End - More cat 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
|
||||
@@ -15,42 +45,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - Add more fox behavior API
|
||||
+ @Override
|
||||
+ public void setInterested(boolean interested) {
|
||||
+ getHandle().setIsInterested(interested);
|
||||
+ this.getHandle().setIsInterested(interested);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isInterested() {
|
||||
+ return getHandle().isInterested();
|
||||
+ return this.getHandle().isInterested();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setLeaping(boolean leaping) {
|
||||
+ getHandle().setIsPouncing(leaping);
|
||||
+ this.getHandle().setIsPouncing(leaping);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isLeaping() {
|
||||
+ return getHandle().isPouncing();
|
||||
+ return this.getHandle().isPouncing();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setDefending(boolean defending) {
|
||||
+ getHandle().setDefending(defending);
|
||||
+ this.getHandle().setDefending(defending);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isDefending() {
|
||||
+ return getHandle().isDefending();
|
||||
+ return this.getHandle().isDefending();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setFaceplanted(boolean faceplanted) {
|
||||
+ getHandle().setFaceplanted(faceplanted);
|
||||
+ this.getHandle().setFaceplanted(faceplanted);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isFaceplanted() {
|
||||
+ return getHandle().isFaceplanted();
|
||||
+ return this.getHandle().isFaceplanted();
|
||||
+ }
|
||||
+ // Paper end - Add more fox behavior API
|
||||
}
|
||||
|
Reference in New Issue
Block a user