diff --git a/patches/api/0005-Adventure.patch b/patches/api/0005-Adventure.patch index 07cba38c8..98f21f2bc 100644 --- a/patches/api/0005-Adventure.patch +++ b/patches/api/0005-Adventure.patch @@ -2686,7 +2686,7 @@ index d06684aba7688ce06777dbd837a46856a9d7767f..4af1d064fcb57773dfa8f6ad40d64829 @NotNull diff --git a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java -index 14c337f15fc804f52e52cb0a185aad38d89303a8..2b3f57d1a1c79923a2173f52d9cf61da1f75b7fc 100644 +index 2f6ca42330675733b2b4132cbb66e433788d05d5..efbf4b657c99ce3a5096d041d275af9ccaea7911 100644 --- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java @@ -10,35 +10,84 @@ import org.jetbrains.annotations.NotNull; @@ -2697,7 +2697,7 @@ index 14c337f15fc804f52e52cb0a185aad38d89303a8..2b3f57d1a1c79923a2173f52d9cf61da - private String kickReason; + private net.kyori.adventure.text.Component leaveMessage; // Paper + private net.kyori.adventure.text.Component kickReason; // Paper - private Boolean cancel; + private boolean cancel; + @Deprecated // Paper public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final String kickReason, @NotNull final String leaveMessage) { diff --git a/patches/api/0306-Add-PlayerKickEvent-causes.patch b/patches/api/0306-Add-PlayerKickEvent-causes.patch index 3f40de695..348009297 100644 --- a/patches/api/0306-Add-PlayerKickEvent-causes.patch +++ b/patches/api/0306-Add-PlayerKickEvent-causes.patch @@ -24,7 +24,7 @@ index 015252e0fbb705c48b2c1e497d4ffd263739b125..40e365e6dad1dfead4d0253d0b4c011b /** diff --git a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java -index 2b3f57d1a1c79923a2173f52d9cf61da1f75b7fc..45235379b7b54f1ca36dff3bf02c496cef2f3254 100644 +index efbf4b657c99ce3a5096d041d275af9ccaea7911..b76966953753dabcb31293846d39a4b4d5ef472a 100644 --- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java @@ -12,6 +12,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable { @@ -32,7 +32,7 @@ index 2b3f57d1a1c79923a2173f52d9cf61da1f75b7fc..45235379b7b54f1ca36dff3bf02c496c private net.kyori.adventure.text.Component leaveMessage; // Paper private net.kyori.adventure.text.Component kickReason; // Paper + private final Cause cause; // Paper - private Boolean cancel; + private boolean cancel; @Deprecated // Paper @@ -19,14 +20,25 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable { diff --git a/patches/api/0333-Add-advancement-display-API.patch b/patches/api/0333-Add-advancement-display-API.patch index fc21e58ed..ad65b9eb8 100644 --- a/patches/api/0333-Add-advancement-display-API.patch +++ b/patches/api/0333-Add-advancement-display-API.patch @@ -167,20 +167,22 @@ index 0000000000000000000000000000000000000000..67341bb70762a2326030abd2548372b9 + } +} diff --git a/src/main/java/org/bukkit/advancement/Advancement.java b/src/main/java/org/bukkit/advancement/Advancement.java -index 7c5009974ac8d64d0e738e60cec45acb0d4ca89a..3bbc7dffc36fa31099a8794ceeec77aeae0c49cb 100644 +index 17527c2f7bd5b8a5528388a53f2472bc1869c7f3..792d5ab90e9252b4f660434f72f004fade14a84c 100644 --- a/src/main/java/org/bukkit/advancement/Advancement.java +++ b/src/main/java/org/bukkit/advancement/Advancement.java -@@ -17,4 +17,41 @@ public interface Advancement extends Keyed { - */ +@@ -19,13 +19,41 @@ public interface Advancement extends Keyed { @NotNull Collection getCriteria(); + + // Paper start -+ /** + /** +- * Returns the display information for this advancement. + * Get the display info of this advancement. + *

+ * Will be {@code null} when totally hidden, for example with crafting + * recipes. -+ * + * +- * This includes it's name, description and other visible tags. + * @return the display info + */ + @org.jetbrains.annotations.Nullable @@ -196,9 +198,12 @@ index 7c5009974ac8d64d0e738e60cec45acb0d4ca89a..3bbc7dffc36fa31099a8794ceeec77ae + + /** + * Gets all the direct children advancements. -+ * + * +- * @return a AdvancementDisplay object, or null if not set. + * @return the children advancements -+ */ + */ +- @Nullable +- AdvancementDisplay getDisplay(); + @NotNull + @org.jetbrains.annotations.Unmodifiable + Collection getChildren(); @@ -212,3 +217,18 @@ index 7c5009974ac8d64d0e738e60cec45acb0d4ca89a..3bbc7dffc36fa31099a8794ceeec77ae + Advancement getRoot(); + // Paper end } +diff --git a/src/main/java/org/bukkit/advancement/AdvancementDisplay.java b/src/main/java/org/bukkit/advancement/AdvancementDisplay.java +index 0ff86a39025a94ca128364a45bf171728cb81027..aec6be7e121da3eb8a464b6934da29ab6b473885 100644 +--- a/src/main/java/org/bukkit/advancement/AdvancementDisplay.java ++++ b/src/main/java/org/bukkit/advancement/AdvancementDisplay.java +@@ -5,7 +5,10 @@ import org.jetbrains.annotations.NotNull; + + /** + * Holds information about how the advancement is displayed by the game. ++ * ++ * @deprecated use {@link io.papermc.paper.advancement.AdvancementDisplay} + */ ++@Deprecated(forRemoval = true) // Paper + public interface AdvancementDisplay { + + /** diff --git a/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch index 0e8194266..dc3022d4f 100644 --- a/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -index b0778270bc9fa5df57974e6f37dc7bfb4b809e3e..030ddefe45563bdd0a7091ae60d365f9aa58b6fc 100644 +index abc88d6dcebec75d4b4336891d480a0b7b1d23df..0a318583a5fc5ecb50f858d93d357baf1edf5a93 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -@@ -77,7 +77,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob { this.goalSelector.addGoal(7, new RandomStrollGoal(this, 1.0D)); - this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, Drowned.class)).setAlertOthers(ZombifiedPiglin.class)); + this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[]{Drowned.class})).setAlertOthers(ZombifiedPiglin.class)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::okTarget)); - this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)); + if (this.level.spigotConfig.zombieAggressiveTowardsVillager) this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)); // Paper diff --git a/patches/server/0715-Add-advancement-display-API.patch b/patches/server/0715-Add-advancement-display-API.patch index c2bd6b94c..472e3067a 100644 --- a/patches/server/0715-Add-advancement-display-API.patch +++ b/patches/server/0715-Add-advancement-display-API.patch @@ -86,15 +86,18 @@ index db939a754e9308ad68f1b09a970f7a1b00a673bf..538f19f15b553d14ad95f09b1c81359f public DisplayInfo(ItemStack icon, Component title, Component description, @Nullable ResourceLocation background, FrameType frame, boolean showToast, boolean announceToChat, boolean hidden) { this.title = title; diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java -index 20d51358b4b47cbf43c3d172765243e96aa1966c..fd42cf61699337acde751249131c016555fd1ea5 100644 +index c47cae84f3b6970247d78382f48ae8ddbc202b59..0a46eeefa7d704350321828166f0049d497e3e41 100644 --- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java +++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java -@@ -27,4 +27,33 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement { - public Collection getCriteria() { +@@ -29,12 +29,33 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement { return Collections.unmodifiableCollection(this.handle.getCriteria().keySet()); } + + // Paper start -+ @Override + @Override +- public AdvancementDisplay getDisplay() { +- if (this.handle.getDisplay() == null) { +- return null; + public io.papermc.paper.advancement.AdvancementDisplay getDisplay() { + return this.handle.getDisplay() == null ? null : this.handle.getDisplay().paper; + } @@ -109,10 +112,11 @@ index 20d51358b4b47cbf43c3d172765243e96aa1966c..fd42cf61699337acde751249131c0165 + final var children = com.google.common.collect.ImmutableList.builder(); + for (Advancement advancement : this.handle.getChildren()) { + children.add(advancement.bukkit); -+ } + } + return children.build(); + } -+ + +- return new CraftAdvancementDisplay(this.handle.getDisplay()); + @Override + public org.bukkit.advancement.Advancement getRoot() { + Advancement advancement = this.handle; @@ -120,7 +124,7 @@ index 20d51358b4b47cbf43c3d172765243e96aa1966c..fd42cf61699337acde751249131c0165 + advancement = advancement.getParent(); + } + return advancement.bukkit; -+ } + } + // Paper end } diff --git a/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java b/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java diff --git a/work/Bukkit b/work/Bukkit index d565a710e..6a039faf7 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit d565a710e0d16d31b6b7db8009a227aba68348fa +Subproject commit 6a039faf7488beba29527a112404cbab84d0cbd3 diff --git a/work/CraftBukkit b/work/CraftBukkit index 9d46b56e2..a59dc59e8 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 9d46b56e26f3e91392572f6dccec7bfdbd5728c6 +Subproject commit a59dc59e88299b03b52335d95f83a880f131e3a4