diff --git a/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch index f06fef223..d133a0dd9 100644 --- a/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -173,7 +173,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Override // Paper public void setCollarColor(@NotNull DyeColor color); - // Paper start + /** diff --git a/src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java b/src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java diff --git a/patches/api/Add-more-Witch-API.patch b/patches/api/Add-more-Witch-API.patch index 5ef789d94..68b4b88b3 100644 --- a/patches/api/Add-more-Witch-API.patch +++ b/patches/api/Add-more-Witch-API.patch @@ -20,15 +20,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** * Represents a Witch */ - public interface Witch extends Raider, RangedEntity { // Paper -+ // Paper start -+ /** -+ * Check if Witch is drinking a potion -+ * -+ * @return True if drinking a potion -+ */ -+ boolean isDrinkingPotion(); +@@ -0,0 +0,0 @@ public interface Witch extends Raider, RangedEntity { // Paper + * @return whether the witch is drinking a potion + */ + boolean isDrinkingPotion(); + ++ // Paper start + /** + * Get time remaining (in ticks) the Witch is drinking a potion + * @@ -51,8 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * + * @return The potion the witch is drinking + */ -+ @Nullable -+ ItemStack getDrinkingPotion(); ++ @Nullable ItemStack getDrinkingPotion(); + + /** + * Set the potion the Witch should drink diff --git a/patches/api/Add-more-Zombie-API.patch b/patches/api/Add-more-Zombie-API.patch index 805f9554f..7f76c6e18 100644 --- a/patches/api/Add-more-Zombie-API.patch +++ b/patches/api/Add-more-Zombie-API.patch @@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Zombie.java +++ b/src/main/java/org/bukkit/entity/Zombie.java @@ -0,0 +0,0 @@ public interface Zombie extends Monster, Ageable { - * @param time new conversion time + * @param flag Whether this zombie can break doors */ - void setConversionTime(int time); + void setCanBreakDoors(boolean flag); ++ + // Paper start + /** + * Check if zombie is drowning diff --git a/patches/api/Missing-Entity-Behavior-API.patch b/patches/api/Missing-Entity-Behavior-API.patch index 6d13f8097..7b1b3aef8 100644 --- a/patches/api/Missing-Entity-Behavior-API.patch +++ b/patches/api/Missing-Entity-Behavior-API.patch @@ -242,42 +242,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param faceplanted face planted + */ + public void setFaceplanted(boolean faceplanted); -+ -+ /** -+ * Gets if the fox face planted. -+ * -+ * @return fox face planted -+ */ -+ public boolean isFaceplanted(); + // Paper end - Add more fox behavior API } diff --git a/src/main/java/org/bukkit/entity/Ghast.java b/src/main/java/org/bukkit/entity/Ghast.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Ghast.java +++ b/src/main/java/org/bukkit/entity/Ghast.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - /** - * Represents a Ghast. - */ --public interface Ghast extends Flying {} -+// Paper start -+public interface Ghast extends Flying { -+ -+ /** -+ * Returns whether the ghast is charging an attack. -+ * -+ * @return whether the ghast is charging an attack -+ */ -+ boolean isCharging(); -+ -+ /** -+ * Sets whether the ghast is charging an attack. -+ * This determines whether the client displays the charging animation. -+ * -+ * @param charging whether the ghast is charging an attack -+ */ -+ void setCharging(boolean charging); +@@ -0,0 +0,0 @@ public interface Ghast extends Flying { + * @param flag Whether the Ghast is charging + */ + void setCharging(boolean flag); + ++ // Paper start + /** + * Returns the explosion power of shot fireballs. + * @@ -293,25 +269,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + void setExplosionPower(int explosionPower); + // Paper end -+} + } diff --git a/src/main/java/org/bukkit/entity/Panda.java b/src/main/java/org/bukkit/entity/Panda.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Panda.java +++ b/src/main/java/org/bukkit/entity/Panda.java -@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull; - /** - * Panda entity. - */ --public interface Panda extends Animals { -+public interface Panda extends Animals, Sittable { // Paper +@@ -0,0 +0,0 @@ public interface Panda extends Animals, Sittable { + */ + int getUnhappyTicks(); - /** - * Gets this Panda's main gene. -@@ -0,0 +0,0 @@ public interface Panda extends Animals { - return recessive; - } - } -+ + // Paper start - Panda API + /** + * Sets the sneeze progress in this animation. @@ -329,22 +295,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int getSneezeTicks(); + + /** -+ * Sets if the panda is sneezing, which causes the sneeze counter to count. -+ *
-+ * When false, this will automatically set the sneeze ticks to 0. -+ * -+ * @param sneeze if the panda is sneezing or not -+ */ -+ void setSneezing(boolean sneeze); -+ -+ /** -+ * Gets if the panda is sneezing -+ * -+ * @return is sneezing -+ */ -+ boolean isSneezing(); -+ -+ /** + * Sets the eating ticks for this panda. + *
+ * @@ -371,39 +321,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + void setUnhappyTicks(int ticks); + + /** -+ * Gets how many ticks this panda will be unhappy for. -+ * -+ * @return unhappy ticks -+ */ -+ int getUnhappyTicks(); -+ -+ /** -+ * Sets if this panda is currently rolling. -+ * -+ * @param rolling should roll -+ */ -+ void setRolling(boolean rolling); -+ -+ /** -+ * Gets if this panda is currently rolling on the ground. -+ * -+ * @return is rolling -+ */ -+ boolean isRolling(); -+ -+ /** + * Sets if this panda is currently on its back. + * + * @param onBack is on its back ++ * @deprecated use {@link #setOnBack(boolean)} + */ -+ void setIsOnBack(boolean onBack); -+ -+ /** -+ * Gets if this panda is currently on its back. -+ * -+ * @return is on back -+ */ -+ boolean isOnBack(); ++ @Deprecated(forRemoval = true) ++ default void setIsOnBack(boolean onBack) { ++ this.setOnBack(onBack); ++ } + + /** + * Sets if this panda is currently sitting. @@ -432,7 +358,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Override + boolean isSitting(); + // Paper end - Panda API - } ++ + public enum Gene { + + NORMAL(false), diff --git a/src/main/java/org/bukkit/entity/Piglin.java b/src/main/java/org/bukkit/entity/Piglin.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Piglin.java @@ -672,33 +601,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param value whether the wither can travel through portals + */ + void setCanTravelThroughPortals(boolean value); -+ // Paper end - } -diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/entity/Wolf.java -+++ b/src/main/java/org/bukkit/entity/Wolf.java -@@ -0,0 +0,0 @@ public interface Wolf extends Tameable, Sittable { - * @param color the color to apply - */ - public void setCollarColor(@NotNull DyeColor color); -+ -+ // Paper start -+ /** -+ * Sets if the wolf is interested. -+ *
-+ * This causes the wolf to tilt its head to the side. -+ * -+ * @param interested is interested -+ */ -+ void setInterested(boolean interested); -+ -+ /** -+ * Gets if the wolf is interested. -+ * -+ * @return is interested -+ */ -+ boolean isInterested(); + // Paper end } diff --git a/src/main/java/org/bukkit/entity/ZombieVillager.java b/src/main/java/org/bukkit/entity/ZombieVillager.java diff --git a/patches/api/RangedEntity-API.patch b/patches/api/RangedEntity-API.patch index 63bdb64fe..ba982d881 100644 --- a/patches/api/RangedEntity-API.patch +++ b/patches/api/RangedEntity-API.patch @@ -165,7 +165,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 */ -public interface Witch extends Raider { +public interface Witch extends Raider, RangedEntity { // Paper - } + + /** + * Gets whether the witch is drinking a potion diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/bukkit/entity/Wither.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Wither.java diff --git a/patches/api/Turtle-API.patch b/patches/api/Turtle-API.patch index 4ea3dee7f..f7dcdfa08 100644 --- a/patches/api/Turtle-API.patch +++ b/patches/api/Turtle-API.patch @@ -233,10 +233,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** * Represents a turtle. */ --public interface Turtle extends Animals { } -+public interface Turtle extends Animals { -+ // Paper start +@@ -0,0 +0,0 @@ public interface Turtle extends Animals { + * @return Whether the turtle is laying an egg + */ + boolean isLayingEgg(); + ++ // Paper start + /** + * Get the turtle's home location + * @@ -267,24 +269,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + boolean isDigging(); + + /** -+ * Get if turtle is carrying egg -+ * -+ * @return True if carrying egg -+ */ -+ boolean hasEgg(); -+ -+ /** + * Set if turtle is carrying egg + * + * @param hasEgg True if carrying egg + */ + void setHasEgg(boolean hasEgg); -+ -+ /** -+ * Returns whether the turtle is currently laying an egg. -+ * -+ * @return whether the turtle is laying an egg -+ */ -+ boolean isLayingEgg(); + // Paper end -+} + } diff --git a/patches/api/Zombie-API-breaking-doors.patch b/patches/api/Zombie-API-breaking-doors.patch index 7782dfb50..43c86121c 100644 --- a/patches/api/Zombie-API-breaking-doors.patch +++ b/patches/api/Zombie-API-breaking-doors.patch @@ -8,35 +8,31 @@ diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Zombie.java +++ b/src/main/java/org/bukkit/entity/Zombie.java +@@ -0,0 +0,0 @@ public interface Zombie extends Monster, Ageable { + + /** + * Sets whether this zombie can break doors +- * +- * This will be ignored if the entity is a Drowned. Will also stop the action if ++ *
++ * Check {@link #supportsBreakingDoors()} to see
++ * if this zombie type will even be affected by using
++ * this method. Will also stop the action if
+ * the entity is currently breaking a door.
+ *
+ * @param flag Whether this zombie can break doors
@@ -0,0 +0,0 @@ public interface Zombie extends Monster, Ageable {
* @param shouldBurnInDay True to burn in sunlight
*/
void setShouldBurnInDay(boolean shouldBurnInDay);
+
+ /**
-+ * Check if this zombie can break doors
-+ *
-+ * @return True if zombie can break doors
-+ */
-+ boolean canBreakDoors();
-+
-+ /**
-+ * Sets if this zombie can break doors.
-+ * Check {@link #supportsBreakingDoors()} to see
-+ * if this zombie type will even be affected by using
-+ * this method.
-+ *
-+ * @param canBreakDoors True if zombie can break doors
-+ */
-+ void setCanBreakDoors(boolean canBreakDoors);
-+
-+ /**
+ * Checks if this zombie type supports breaking doors.
+ * {@link Drowned} do not have support for breaking doors
+ * so using {@link #setCanBreakDoors(boolean)} on them has
+ * no effect.
+ *
-+ * @return
++ * @return true if entity supports breaking doors
+ */
+ boolean supportsBreakingDoors();
// Paper end
diff --git a/patches/server/Add-more-Witch-API.patch b/patches/server/Add-more-Witch-API.patch
index 652ad2934..413686ff3 100644
--- a/patches/server/Add-more-Witch-API.patch
+++ b/patches/server/Add-more-Witch-API.patch
@@ -8,15 +8,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/m
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
-@@ -0,0 +0,0 @@
- package net.minecraft.world.entity.monster;
-
-+// Paper start
-+import com.destroystokyo.paper.event.entity.WitchReadyPotionEvent;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
- import java.util.Iterator;
- import java.util.List;
- import java.util.UUID;
@@ -0,0 +0,0 @@ public class Witch extends Raider implements RangedAttackMob {
}
@@ -98,15 +89,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public class CraftWitch extends CraftRaider implements Witch, com.destroystokyo.paper.entity.CraftRangedEntity