Skip to content

Commit 2c8d48c

Browse files
Make Panda implement Sittable (#7414)
1 parent 4a745f9 commit 2c8d48c

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

patches/api/0312-Missing-Entity-Behavior-API.patch

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,19 @@ index 498e182846b81d50b3a594254e8b341fb23e8763..3826363a1954afcddaadec7f96ac1830
176176
+ // Paper end - Add more fox behavior API
177177
}
178178
diff --git a/src/main/java/org/bukkit/entity/Panda.java b/src/main/java/org/bukkit/entity/Panda.java
179-
index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..9d065625be5931d970d7f34e1225fae1af960314 100644
179+
index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..1dcc2c8f4899da029af8b1c1b2ff1b5e368e82c1 100644
180180
--- a/src/main/java/org/bukkit/entity/Panda.java
181181
+++ b/src/main/java/org/bukkit/entity/Panda.java
182-
@@ -63,4 +63,112 @@ public interface Panda extends Animals {
182+
@@ -5,7 +5,7 @@ import org.jetbrains.annotations.NotNull;
183+
/**
184+
* Panda entity.
185+
*/
186+
-public interface Panda extends Animals {
187+
+public interface Panda extends Animals, Sittable { // Paper
188+
189+
/**
190+
* Gets this Panda's main gene.
191+
@@ -63,4 +63,125 @@ public interface Panda extends Animals {
183192
return recessive;
184193
}
185194
}
@@ -281,14 +290,27 @@ index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..9d065625be5931d970d7f34e1225fae1
281290
+ * Sets if this panda is currently sitting.
282291
+ *
283292
+ * @param sitting is currently sitting
293+
+ * @deprecated use {@link #setSitting(boolean)}
284294
+ */
285-
+ void setIsSitting(boolean sitting);
295+
+ @Deprecated(forRemoval = true)
296+
+ default void setIsSitting(boolean sitting) {
297+
+ this.setSitting(sitting);
298+
+ }
299+
+
300+
+ /**
301+
+ * Sets if this panda is currently sitting.
302+
+ *
303+
+ * @param sitting is currently sitting
304+
+ */
305+
+ @Override
306+
+ void setSitting(boolean sitting);
286307
+
287308
+ /**
288309
+ * Gets if this panda is sitting.
289310
+ *
290311
+ * @return is sitting
291312
+ */
313+
+ @Override
292314
+ boolean isSitting();
293315
+ // Paper end - Panda API
294316
}

patches/server/0682-Missing-Entity-Behavior-API.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ index b647a5b9fdc1da61c4035d6f2cef7814033dc608..9795341efa748c2d94567e882cd5f26a
157157
+ // Paper end - Add more fox behavior API
158158
}
159159
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
160-
index 2d2620dbb16aec850e8afda02174508a4be5a313..ec56a520da22248cdcdfaa179489aa0db0f2273f 100644
160+
index 2d2620dbb16aec850e8afda02174508a4be5a313..ba4e6deaaa725296be830324d2c6486844a4e886 100644
161161
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
162162
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
163163
@@ -46,6 +46,77 @@ public class CraftPanda extends CraftAnimals implements Panda {
@@ -231,7 +231,7 @@ index 2d2620dbb16aec850e8afda02174508a4be5a313..ec56a520da22248cdcdfaa179489aa0d
231231
+ }
232232
+
233233
+ @Override
234-
+ public void setIsSitting(boolean sitting) {
234+
+ public void setSitting(boolean sitting) {
235235
+ this.getHandle().sit(sitting);
236236
+ }
237237
+ // Paper end - Panda API

0 commit comments

Comments
 (0)