Skip to content

Commit

Permalink
Final 1.20.6 Paper Upstream \o/
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@79e2cb6 Update upstream (Bukkit/CraftBukkit/Spigot) (#10875)
  • Loading branch information
granny committed Jun 13, 2024
1 parent 7219263 commit cc56332
Show file tree
Hide file tree
Showing 37 changed files with 162 additions and 117 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.20.6-R0.1-SNAPSHOT

mcVersion = 1.20.6
paperCommit = 906df69f05d0779906377abb809bfec9fc3c3546
paperCommit = 79e2cb620ef03539390d97940824b38b707918f5

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0004-Purpur-client-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur client support


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6c327a07bf8a6aa11a2d7dad12b2830acc539484..d972cb242102a3ee7c017299aed64340628c79d8 100644
index eb34f22e973fe46529eb93f435f5bf7f85091404..813096eee6a09419209baca9139d9aac1593d8ca 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3806,4 +3806,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3854,4 +3854,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Override
Spigot spigot();
// Spigot end
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0009-AFK-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] AFK API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d972cb242102a3ee7c017299aed64340628c79d8..972cca3e02296f94099f965a4f7662ec63a067ea 100644
index 813096eee6a09419209baca9139d9aac1593d8ca..a03f473dee39eb160196e2468e4c26c6f8f6ce2a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3814,5 +3814,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3862,5 +3862,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @return True if Player uses Purpur Client
*/
public boolean usesPurpurClient();
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0011-ExecuteCommandEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] ExecuteCommandEvent


diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..83f84a76cbfdf5138ecccf3a886d38151a500bf2 100644
index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..a09b5458191eb5df4787859b72a37fa1fa2bffba 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -152,6 +152,19 @@ public class SimpleCommandMap implements CommandMap {
@@ -153,6 +153,19 @@ public class SimpleCommandMap implements CommandMap {
return false;
}

Expand All @@ -28,7 +28,7 @@ index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..83f84a76cbfdf5138ecccf3a886d3815
// Paper start - Plugins do weird things to workaround normal registration
if (target.timings == null) {
target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
@@ -161,7 +174,7 @@ public class SimpleCommandMap implements CommandMap {
@@ -162,7 +175,7 @@ public class SimpleCommandMap implements CommandMap {
try {
try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
Expand Down
8 changes: 4 additions & 4 deletions patches/api/0015-ItemStack-convenience-methods.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods


diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 4f7f91b5e2903ce3b180c637cb463e01a860271e..5b14cea8d246f31c51b09baa731e673f305aea6e 100644
index 762216a117145676d3df2b74036799b024461fb7..54c080d650f807b05e5d8347f78e2bc243791172 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -5733,4 +5733,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -5764,4 +5764,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
return Registry.BLOCK.get(material.key);
}
Expand Down Expand Up @@ -50,7 +50,7 @@ index 4f7f91b5e2903ce3b180c637cb463e01a860271e..5b14cea8d246f31c51b09baa731e673f
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9a14bc73c 100644
index 40cde68c7b73a0a92e2a96667a90138d67ce66ff..fee2469bdedff0e55ef4dcda410cac35c6319258 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -19,6 +19,17 @@ import org.bukkit.inventory.meta.ItemMeta;
Expand All @@ -71,7 +71,7 @@ index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9

/**
* Represents a stack of items.
@@ -1079,4 +1090,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1081,4 +1092,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player);
}
// Paper end - expose itemstack tooltip lines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Subject: [PATCH] Add predicate to recipe's ExactChoice ingredient


diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..81c563d44c311ea1b49425d93c57f46beb4a2ef9 100644
index e7796054f3f65f5bea7f93c75320195f6c2f0561..1b1d05b77e93abe93ed782883f8d791f6559f778 100644
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
@@ -180,6 +180,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -191,6 +191,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
public static class ExactChoice implements RecipeChoice {

private List<ItemStack> choices;
+ private Predicate<ItemStack> predicate; // Purpur

public ExactChoice(@NotNull ItemStack stack) {
this(Arrays.asList(stack));
@@ -229,6 +230,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -241,6 +242,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {

@Override
public boolean test(@NotNull ItemStack t) {
+ if (predicate != null) return predicate.test(t); // Purpur
for (ItemStack match : choices) {
if (t.isSimilar(match)) {
return true;
@@ -238,6 +240,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
@@ -250,6 +252,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
return false;
}

Expand Down
10 changes: 5 additions & 5 deletions patches/api/0027-Fix-default-permission-system.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ Subject: [PATCH] Fix default permission system


diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java
index cd3296fea01648592d2af89b3d80135acb6d0958..45797a6fbae1d8edc4211cb30def24ad4f59bd49 100644
index 75b77cc4fe189b4b6baa1af3663dc492e992a266..30b98d1645c571ba5c18e5cc93b0bec3f74b1d3b 100644
--- a/src/main/java/org/bukkit/permissions/PermissibleBase.java
+++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java
@@ -168,7 +168,7 @@ public class PermissibleBase implements Permissible {
@@ -169,7 +169,7 @@ public class PermissibleBase implements Permissible {

for (Permission perm : defaults) {
String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH);
String name = perm.getName().toLowerCase(Locale.ROOT);
- permissions.put(name, new PermissionAttachmentInfo(parent, name, null, true));
+ permissions.put(name, new PermissionAttachmentInfo(parent, name, null, perm.getDefault().getValue(isOp()))); // Purpur
Bukkit.getServer().getPluginManager().subscribeToPermission(name, parent);
calculateChildPermissions(perm.getChildren(), false, null);
}
@@ -196,7 +196,7 @@ public class PermissibleBase implements Permissible {
@@ -197,7 +197,7 @@ public class PermissibleBase implements Permissible {
String name = entry.getKey();

Permission perm = Bukkit.getServer().getPluginManager().getPermission(name);
- boolean value = entry.getValue() ^ invert;
+ boolean value = (entry.getValue() == null && perm != null ? perm.getDefault().getValue(isOp()) : entry.getValue()) ^ invert; // Purpur
String lname = name.toLowerCase(java.util.Locale.ENGLISH);
String lname = name.toLowerCase(Locale.ROOT);

permissions.put(lname, new PermissionAttachmentInfo(parent, lname, attachment, value));
diff --git a/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java b/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0029-Clean-up-version-command-output.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c

@Override
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index fd5d9881abfd930bb883120f018f76dc78b62b14..3d29c47ac0620af82d990faf5dfc266c6f0235f1 100644
index e64bb57f74e6d6f78927be228825b3e0bdf41f48..c880d0010849ab733ad13bbd18fab3c864d0cf61 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -214,7 +214,7 @@ public class VersionCommand extends BukkitCommand {
@@ -215,7 +215,7 @@ public class VersionCommand extends BukkitCommand {
String version = Bukkit.getVersion();
// Paper start
if (version.startsWith("null")) { // running from ide?
Expand All @@ -34,7 +34,7 @@ index fd5d9881abfd930bb883120f018f76dc78b62b14..3d29c47ac0620af82d990faf5dfc266c
return;
}
setVersionMessage(getVersionFetcher().getVersionMessage(version));
@@ -255,9 +255,11 @@ public class VersionCommand extends BukkitCommand {
@@ -256,9 +256,11 @@ public class VersionCommand extends BukkitCommand {
// Paper start
private void setVersionMessage(final @NotNull Component msg) {
lastCheck = System.currentTimeMillis();
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0035-Add-local-difficulty-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api


diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e..099516b90c504205b894b387542221e8c0c98b40 100644
index fdb87adfb8d6eff2bfabe7a41398c53d15d4cd98..25a049040a982194e7337d283898b252568f09e0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4249,6 +4249,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4276,6 +4276,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public DragonBattle getEnderDragonBattle();

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0036-Remove-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9
new ArrayList<String>(TIMINGS_SUBCOMMANDS.size()));
}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 83f84a76cbfdf5138ecccf3a886d38151a500bf2..fdedac32544be6534288c8ba28abe7f5c4c56f3b 100644
index a09b5458191eb5df4787859b72a37fa1fa2bffba..7740ad53796d08584bb0110f99af5639993e4d71 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -172,10 +172,10 @@ public class SimpleCommandMap implements CommandMap {
@@ -173,10 +173,10 @@ public class SimpleCommandMap implements CommandMap {
// Paper end

try {
Expand Down
12 changes: 6 additions & 6 deletions patches/api/0038-Debug-Marker-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Debug Marker API


diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 0b298161d8b94d655113328ebc0cd19a65619c72..83b979fbb8c0dd64f0a19feef654af2b165bd603 100644
index ad5f2a8991c3b7925626fd463110765ff964beb9..bb09c468ab1261ea4eaf59012d30a2e45199caf7 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2951,5 +2951,89 @@ public final class Bukkit {
Expand Down Expand Up @@ -99,7 +99,7 @@ index 0b298161d8b94d655113328ebc0cd19a65619c72..83b979fbb8c0dd64f0a19feef654af2b
// Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index cecf7b49e3858359ae7eaa4318180d7f11728a7a..916db0d6096338c4f1b8707048eb38b50a2b027d 100644
index e75cccea44c9a693dfe52a419c742da9a62da42a..36d8ce7a21513600ab10b7e6f47c9f1d2cc51947 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2588,5 +2588,75 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
Expand Down Expand Up @@ -179,10 +179,10 @@ index cecf7b49e3858359ae7eaa4318180d7f11728a7a..916db0d6096338c4f1b8707048eb38b5
// Purpur end
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 099516b90c504205b894b387542221e8c0c98b40..83a5b68c785a88594e6e3824ed282844086f7f1a 100644
index 25a049040a982194e7337d283898b252568f09e0..0f2f7cb8acb226d6f9a1085ec9cac3f8faa77813 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4257,6 +4257,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4284,6 +4284,76 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The local difficulty
*/
public float getLocalDifficultyAt(@NotNull Location location);
Expand Down Expand Up @@ -260,10 +260,10 @@ index 099516b90c504205b894b387542221e8c0c98b40..83a5b68c785a88594e6e3824ed282844

/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 972cca3e02296f94099f965a4f7662ec63a067ea..ec49be86fa9b2612ae2853f06f503bffa3a1271d 100644
index a03f473dee39eb160196e2468e4c26c6f8f6ce2a..2443f32d5a832b8913cd00042b94fda96658a3c2 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3834,5 +3834,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3882,5 +3882,75 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @deprecated Use {@link #resetIdleDuration()} instead
*/
void resetIdleTimer();
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0039-Add-death-screen-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ec49be86fa9b2612ae2853f06f503bffa3a1271d..d057743b8f6a463434c1f76398c7a98614b19d47 100644
index 2443f32d5a832b8913cd00042b94fda96658a3c2..c41b5e13c519b3f48cbc866ad77b153cdde13136 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3904,5 +3904,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3952,5 +3952,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Clears all debug block highlights
*/
void clearBlockHighlights();
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ index 4f3cc14d48690bb183d09bb7a5ba1e23e8a0c08a..c366d84518979e842a6f10f969a59515
stringbuilder.append(CrashReport.getErrorComment());
stringbuilder.append("\n\n");
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0ed42fa899721f83b598db05be1b5f321af3614a..d42cd000684f6bed26a188bfcf2c633e49b51370 100644
index 3751c2a077bd13bac330b93c6efc2a640a17f4f2..38d2dfcee9462aaf9aa4954effe2b40242d4bb76 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -956,7 +956,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand Down Expand Up @@ -252,10 +252,10 @@ index e85b9bb3f9c225d289a4959921970b9963881199..c1e2d3a75b9d4710ab6d8b5c62af4bc1
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 4788a591f40f506d81b10fd9f6ab68f308a68e23..de3f413dc60ee501e540b68a7b3c1118c750ca0b 100644
index f99353a60e3f236735ef6e2e6f13381b50ae9b7b..e29826bdfcdde938c1e1ea4092efccda13f52218 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -503,7 +503,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -504,7 +504,7 @@ public final class CraftMagicNumbers implements UnsafeValues {

@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
Expand Down
Loading

0 comments on commit cc56332

Please sign in to comment.