mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Updated Upstream (Bukkit/CraftBukkit) (#7875)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 6a039faf PR-745: Expose more information about advancements 52148c47 PR-749: Various javadoc improvements 23c2d841 PR-748: Remove permissible recalculation from Permission constructor CraftBukkit Changes: a59dc59e SPIGOT-7025: Use existing item in hand for ranged Drowned attack e4cca0ca PR-1050: Expose more information about advancements
This commit is contained in:
parent
693f001b92
commit
bcde5dbffe
7 changed files with 39 additions and 15 deletions
|
@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
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
|
||||
@@ -0,0 +0,0 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
|
|
|
@ -171,16 +171,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/advancement/Advancement.java
|
||||
+++ b/src/main/java/org/bukkit/advancement/Advancement.java
|
||||
@@ -0,0 +0,0 @@ public interface Advancement extends Keyed {
|
||||
*/
|
||||
@NotNull
|
||||
Collection<String> getCriteria();
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
/**
|
||||
- * Returns the display information for this advancement.
|
||||
+ * Get the display info of this advancement.
|
||||
+ * <p>
|
||||
+ * 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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ /**
|
||||
+ * 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<Advancement> getChildren();
|
||||
|
@ -212,3 +217,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/advancement/AdvancementDisplay.java
|
||||
+++ b/src/main/java/org/bukkit/advancement/AdvancementDisplay.java
|
||||
@@ -0,0 +0,0 @@ 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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -2697,7 +2697,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- 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) {
|
||||
|
|
|
@ -90,11 +90,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
@@ -0,0 +0,0 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement {
|
||||
public Collection<String> getCriteria() {
|
||||
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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ final var children = com.google.common.collect.ImmutableList.<org.bukkit.advancement.Advancement>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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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
|
||||
|
|
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d565a710e0d16d31b6b7db8009a227aba68348fa
|
||||
Subproject commit 6a039faf7488beba29527a112404cbab84d0cbd3
|
|
@ -1 +1 @@
|
|||
Subproject commit 9d46b56e26f3e91392572f6dccec7bfdbd5728c6
|
||||
Subproject commit a59dc59e88299b03b52335d95f83a880f131e3a4
|
Loading…
Reference in a new issue