Skip to content

Commit

Permalink
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Browse files Browse the repository at this point in the history
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:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf5617 PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac6 Implement APIs for per world view and simulation distances
57d7ef4 Preserve empty enchantment tags for glow effect
465ec3f Remove connected check on setScoreboard
f90ce62 Use one PermissibleBase for all command blocks
5876cca SPIGOT-7550: Fix creation of Arrow instances
f03fc3a SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
  • Loading branch information
kennytv committed Dec 25, 2023
1 parent 61768e0 commit e035fd7
Show file tree
Hide file tree
Showing 524 changed files with 578 additions and 622 deletions.
39 changes: 20 additions & 19 deletions patches/api/0006-Adventure.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
return warning == null || warning.value();
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index cd000a064732ebaa8802f3d7b7ba9bd7ba101f14..30dc2f85b60877930cab68230d3259ce92c08618 100644
index 6e7d5545e0f79d81832ccd5c8405a70d8daa256f..d59acc729ad5af515b8ef4c98a3edeb440854820 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -45,7 +45,7 @@ import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -3601,27 +3601,27 @@ index 36b436e145a7215682b692a87ab894df25752c1d..c5e8bffef736365881953161ff812c98
return locale;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674c58a98cf 100644
index 2bc81b0aa73f7f5b0352121f6bf18fa63acf7a83..eaa0548cf430bf5b58ff84e0a4403c451699db28 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -17,7 +17,7 @@ public class PlayerLoginEvent extends PlayerEvent {
private final InetAddress address;
@@ -18,7 +18,7 @@ public class PlayerLoginEvent extends PlayerEvent {
private final InetAddress realAddress;
private final String hostname;
private Result result = Result.ALLOWED;
- private String message = "";
+ private net.kyori.adventure.text.Component message = net.kyori.adventure.text.Component.empty();
private final InetAddress realAddress; // Spigot

/**
@@ -53,12 +53,52 @@ public class PlayerLoginEvent extends PlayerEvent {
* This constructor defaults message to an empty string, and result to
@@ -60,13 +60,53 @@ public class PlayerLoginEvent extends PlayerEvent {
* @param result The result status for this event
* @param message The message to be displayed if result denies login
* @param realAddress the actual, unspoofed connecting address
+ * @deprecated in favour of {@link #PlayerLoginEvent(Player, String, InetAddress, Result, net.kyori.adventure.text.Component, InetAddress)}
*/
+ @Deprecated // Paper
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) {
this(player, hostname, address, realAddress);
this.result = result;
+ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper
+ }
Expand All @@ -3638,12 +3638,12 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
+ * @param message The message to be displayed if result denies login
+ * @param realAddress the actual, unspoofed connecting address
+ */
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) { // Spigot
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) {
+ this(player, hostname, address, realAddress); // Spigot
+ this.result = result;
+ this.message = message;
+ }
+
this.message = message;
}
+ /**
+ * Gets the current kick message that will be used if getResult() !=
+ * Result.ALLOWED
Expand All @@ -3660,13 +3660,14 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
+ * @param message New kick message
+ */
+ public void kickMessage(net.kyori.adventure.text.@NotNull Component message) {
this.message = message;
}
+ this.message = message;
+ }
+ // Paper end

// Spigot start
+
/**
@@ -96,19 +136,23 @@ public class PlayerLoginEvent extends PlayerEvent {
* Gets the current result of the login, as an enum
*
@@ -91,19 +131,23 @@ public class PlayerLoginEvent extends PlayerEvent {
* Result.ALLOWED
*
* @return Current kick message
Expand All @@ -3692,7 +3693,7 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
}

/**
@@ -127,7 +171,7 @@ public class PlayerLoginEvent extends PlayerEvent {
@@ -122,7 +166,7 @@ public class PlayerLoginEvent extends PlayerEvent {
*/
public void allow() {
result = Result.ALLOWED;
Expand All @@ -3701,7 +3702,7 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
}

/**
@@ -135,8 +179,21 @@ public class PlayerLoginEvent extends PlayerEvent {
@@ -130,8 +174,21 @@ public class PlayerLoginEvent extends PlayerEvent {
*
* @param result New result for disallowing the player
* @param message Kick message to display to the user
Expand Down
16 changes: 8 additions & 8 deletions patches/api/0018-Add-view-distance-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Add per player no-tick, tick, and send view distances.
Also add send/no-tick view distance to World.

diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 30dc2f85b60877930cab68230d3259ce92c08618..2867faf0acbbbb2e99c5b503f0c6bc83f3bfe80f 100644
index d59acc729ad5af515b8ef4c98a3edeb440854820..33f0cecdcd28efd721c58ebf1eb664bb5dba3803 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2745,6 +2745,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
int getSimulationDistance();
// Spigot end
@@ -2869,6 +2869,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Set<FeatureFlag> getFeatureFlags();

+ // Paper start - view distance api
+ /**
Expand Down Expand Up @@ -71,11 +71,11 @@ index 30dc2f85b60877930cab68230d3259ce92c08618..2867faf0acbbbb2e99c5b503f0c6bc83
+ void setSendViewDistance(int viewDistance);
+ // Paper end - view distance api
+
// Spigot start
public class Spigot {

/**
* Represents various map environment types that a world may be
*/
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6cf37df9c12510846b40d37d71577de061d058de..6ed90056c16f8f3c0b844d378147397be94c3b58 100644
index c03b5f24304d28a5ebabdf6301165cf04dd5176c..15d73986499cc190de925c1024cea6dfdf930065 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2391,6 +2391,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Upstream added methods for this so the original methods
are now deprecated

diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 7c82644de3c438f45476ac02ce2c51c6fdbd543a..390bb294d09389877937ee2c6c3f346e65dfb178 100644
index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..1fdbfb14eaef0550363c5dd9793f933d8ece16ac 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -215,12 +215,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -217,12 +217,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
public int getArrowsInBody();

Expand Down Expand Up @@ -38,7 +38,7 @@ index 7c82644de3c438f45476ac02ce2c51c6fdbd543a..390bb294d09389877937ee2c6c3f346e

/**
* Returns the living entity's current maximum no damage ticks.
@@ -722,4 +736,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -749,4 +763,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return Whether the entity is invisible
*/
public boolean isInvisible();
Expand Down
10 changes: 5 additions & 5 deletions patches/api/0056-Fix-upstream-javadocs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ index 1c088886add66f1e99bee42f70e5bc742c912e88..5a8f15195b0a87bb7a49983e5ee0dee6
* @return an array containing all previous players
*/
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79e3989cbe 100644
index 61639a865b8b8a845c78dcaf0a866082ef54bf63..f3607ab95f7f725283e8317c426dbc11bcc15cde 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2659,7 +2659,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2673,7 +2673,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is
Expand All @@ -154,7 +154,7 @@ index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79
* temporarily freezing while locating an unexplored structure.
* <p>
* The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2693,7 +2693,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2707,7 +2707,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is
Expand All @@ -163,7 +163,7 @@ index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79
* temporarily freezing while locating an unexplored structure.
* <p>
* The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2726,7 +2726,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2740,7 +2740,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link Structure}. Finding
* unexplored structures can, and will, block if the world is looking in
Expand Down Expand Up @@ -386,7 +386,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
@Override
public int getConversionTime();
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 732acee61a0a0c894df1b040dfd1d8a05141b5c4..4fd0ec2d6e520f60d20832325a8d171125ed9eef 100644
index 27d5503638d13ca2998ce4a4c6589ea62066128e..0c5f57e7530430de22a5eeb861032f04b2bc66c4 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -432,15 +432,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0068-LivingEntity-setKiller.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller


diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 390bb294d09389877937ee2c6c3f346e65dfb178..6a9df4ec0eee205bcd37de9c4d04a6c67eb21644 100644
index 1fdbfb14eaef0550363c5dd9793f933d8ece16ac..f0dd1a3d2d03366de104ba7d07f19fc9a2221925 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -319,6 +319,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -321,6 +321,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Nullable
public Player getKiller();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,10 @@ index ca6d0eaa9d9a37c07f3e1630b83a79bf98211edb..26d02aa5da444112f8fa84c07e3080bb
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 58a15d8fd57d55848b37bfc8fffa101692efce87..93c46d40efd73293d84c7eaadf4e360cc3706e2a 100644
index 27b6825a04e7857e7924ba32f9cc43e960edd238..89d948229eee47c90d078ffa26b019bfe24a8115 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2841,7 +2841,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2855,7 +2855,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable


diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 6a9df4ec0eee205bcd37de9c4d04a6c67eb21644..b470d86c00be238a430e64d349a247e2740cfeec 100644
index f0dd1a3d2d03366de104ba7d07f19fc9a2221925..9be2901986b14bc4a66a25fa3be231e2738b3792 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -764,5 +764,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -791,5 +791,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setArrowsStuck(int arrows);
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0117-LivingEntity-Hand-Raised-Item-Use-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e1405
public ItemStack getItemInUse();

diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b470d86c00be238a430e64d349a247e2740cfeec..97d0f82041a229e85217a7e575bf003eddc31b70 100644
index 9be2901986b14bc4a66a25fa3be231e2738b3792..3a2f5ba52c6be8930f7b411476b36afc161834c9 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -778,5 +778,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -805,5 +805,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param delay Delay in ticks
*/
void setShieldBlockingDelay(int delay);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ index 0000000000000000000000000000000000000000..c896d172519a8552a132031cb956378d
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 97d0f82041a229e85217a7e575bf003eddc31b70..8a18f269ee1767d57367160cb0e3513a4e2969fb 100644
index 3a2f5ba52c6be8930f7b411476b36afc161834c9..b7bf0cc404634693d03c6700dc50c92697951c37 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -83,6 +83,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -85,6 +85,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
public Block getTargetBlock(@Nullable Set<Material> transparent, int maxDistance);

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0156-Add-LivingEntity-getTargetEntity.patch
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ index 0000000000000000000000000000000000000000..af8765b213390cf75fe02a6eb68aecf7
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 8a18f269ee1767d57367160cb0e3513a4e2969fb..79fdb183887cb8153254f6ac84a981a7ffcb561c 100644
index b7bf0cc404634693d03c6700dc50c92697951c37..47c4096699bc0334eacf10b6403c4a4329797f0e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -173,6 +173,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -175,6 +175,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Deprecated(forRemoval = true)
@Nullable
public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
Expand Down
Loading

0 comments on commit e035fd7

Please sign in to comment.