diff --git a/patches/api/Missing-Entity-Behavior-API.patch b/patches/api/Missing-Entity-Behavior-API.patch index a0d2e41f70..0b833ba2b0 100644 --- a/patches/api/Missing-Entity-Behavior-API.patch +++ b/patches/api/Missing-Entity-Behavior-API.patch @@ -7,6 +7,7 @@ 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> diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -1113,6 +1114,26 @@ diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Wither.java +++ b/src/main/java/org/bukkit/entity/Wither.java +@@ -0,0 +0,0 @@ public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.Ra + * Returns the wither's current invulnerability ticks. + * + * @return amount of invulnerability ticks ++ * @deprecated Duplicate api, use {@link #getInvulnerableTicks()} + */ ++ @Deprecated(forRemoval = true) // Paper + int getInvulnerabilityTicks(); + + /** +@@ -0,0 +0,0 @@ public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.Ra + * When invulnerability ticks reach 0, the wither will trigger an explosion. + * + * @param ticks amount of invulnerability ticks ++ * @deprecated Duplicate api, use {@link #setInvulnerableTicks(int)} + */ ++ @Deprecated(forRemoval = true) // Paper + void setInvulnerabilityTicks(int ticks); + + /** @@ -0,0 +0,0 @@ public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.Ra LEFT, RIGHT @@ -1147,6 +1168,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param value whether the wither can travel through portals + */ + void setCanTravelThroughPortals(boolean value); ++ ++ /** ++ * Makes the wither invulnerable for 11 seconds and ++ * sets the health to one third of the max health. ++ * <br> ++ * This is called in vanilla directly after spawning the wither. ++ */ ++ void enterInvulnerabilityPhase(); + // 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/server/Missing-Entity-Behavior-API.patch b/patches/server/Missing-Entity-Behavior-API.patch index 134a214c2a..f15a52d6d8 100644 --- a/patches/server/Missing-Entity-Behavior-API.patch +++ b/patches/server/Missing-Entity-Behavior-API.patch @@ -35,6 +35,7 @@ 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> diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -1237,5 +1238,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void setCanTravelThroughPortals(boolean value) { + getHandle().setCanTravelThroughPortals(value); + } ++ ++ @Override ++ public void enterInvulnerabilityPhase() { ++ this.getHandle().makeInvulnerable(); ++ } + // Paper end }