aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0010-Adventure.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-01-14 01:46:04 -0800
committerGitHub <[email protected]>2024-01-14 10:46:04 +0100
commit8657cd91d7f4741959e2f35b155cde76f08b51d5 (patch)
tree6959e2ca3fdd11ca62df29859ed47cb0dfbf01b3 /patches/server/0010-Adventure.patch
parent78fcb8e7663307931f932ad0087ee42d65a203de (diff)
downloadPaper-8657cd91d7f4741959e2f35b155cde76f08b51d5.tar.gz
Paper-8657cd91d7f4741959e2f35b155cde76f08b51d5.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
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: 63c208dd Remove no longer used import 70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY ae21f4ac PR-955: Add methods to place structures with block/entity transformers e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value b125516c Fix typo in RecipeChoice.ExactChoice docs 309497c1 Add EntityMountEvent and EntityDismount Event 2fd45ae3 Improve ItemFactory#enchantItem consistency 2b198268 PR-933: Define native persistent data types for lists CraftBukkit Changes: 771182f70 PR-1327: Add methods to place structures with block/entity transformers e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM 76931e8bd Add EntityMountEvent and EntityDismount Event 9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore 1462ebe85 Reformat Commodore.java 9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency 4e419c774 PR-1295: Define native persistent data types for lists dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet 690278200 Only fetch an online UUID in online mode 1da8d9a53 Fire PreLogin events even in offline mode 2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation Spigot Changes: 864e4acc Restore accidentally removed package-info.java f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent 828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed cdc4e035 Remove obsolete patch fetching correct mode UUIDs 49e36b8e Merge related BungeeCord patches 6e87b9ab Remove obsolete firing of PreLogin events in offline mode 5c76b183 Remove redundant patch dealing with exceptions in the crash reporter 3a2219d1 Remove redundant patch logging cause of unexpected exception
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r--patches/server/0010-Adventure.patch94
1 files changed, 47 insertions, 47 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index 59f6755727..93b956b36b 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -2648,7 +2648,7 @@ index a5578cbce2d1d39ba3315e53425d5323e6823a65..7a036c08fa67504d06c8f72a32c22814
@Override
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index d4fb6d031acbb009fcb600718a16ac0b5437d88e..47f01de166a4048824f3075deb596084b7d42978 100644
+index 0c77b4b201f6586b4d143ce2c3e710bf9d276a20..3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -191,6 +191,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
@@ -2669,7 +2669,7 @@ index d4fb6d031acbb009fcb600718a16ac0b5437d88e..47f01de166a4048824f3075deb596084
private int playerIdleTimeout;
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
-@@ -1317,7 +1317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1311,7 +1311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private ServerStatus buildServerStatus() {
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
@@ -2678,7 +2678,7 @@ index d4fb6d031acbb009fcb600718a16ac0b5437d88e..47f01de166a4048824f3075deb596084
}
private ServerStatus.Players buildPlayerStatus() {
-@@ -1349,6 +1349,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1343,6 +1343,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
SpigotTimings.schedulerTimer.startTiming(); // Spigot
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
SpigotTimings.schedulerTimer.stopTiming(); // Spigot
@@ -2686,7 +2686,7 @@ index d4fb6d031acbb009fcb600718a16ac0b5437d88e..47f01de166a4048824f3075deb596084
this.profiler.push("commandFunctions");
SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
this.getFunctions().tick();
-@@ -1728,10 +1729,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1715,10 +1716,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public String getMotd() {
@@ -2708,7 +2708,7 @@ index d4fb6d031acbb009fcb600718a16ac0b5437d88e..47f01de166a4048824f3075deb596084
this.motd = motd;
}
-@@ -2452,23 +2463,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2439,23 +2450,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) {
@@ -2933,7 +2933,7 @@ index a60fef571c94858998a91711b17d3670c28a81bd..04a728a16bb629adbae1cd8586764a6d
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 04344fd06419ed849f4e49b89a34d48141410b4e..36e659171d299b116b48cae868a20be467ce4ae2 100644
+index 520f0742210342b43aa854b1e8b0c42a84935a9c..d13a662895737180f3d75b6e357ff90c72b0fe08 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -44,6 +44,7 @@ import net.minecraft.nbt.ListTag;
@@ -3008,33 +3008,33 @@ index 04344fd06419ed849f4e49b89a34d48141410b4e..36e659171d299b116b48cae868a20be4
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
-index 03c6c96fd259215c68c70f7285701cb80cf89685..315f51b6c76695e204ddfae3419103c797ad2dfd 100644
+index b62f20585e8d4d62b734b21112ee773dae6e9f51..55c15d942ddd230dec073039b7c5f95a14ff937c 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
-@@ -285,7 +285,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
- if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
- final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
- if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
-- event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage());
-+ event.disallow(asyncEvent.getResult(), asyncEvent.kickMessage()); // Paper - Adventure
- }
- Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
- @Override
-@@ -296,12 +296,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
-
- ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
- if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
-- ServerLoginPacketListenerImpl.this.disconnect(event.getKickMessage());
-+ ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
- return;
- }
- } else {
- if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
-- ServerLoginPacketListenerImpl.this.disconnect(asyncEvent.getKickMessage());
-+ ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(asyncEvent.kickMessage())); // Paper - Adventure
- return;
- }
- }
+@@ -292,7 +292,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
+ if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
+ final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
+ if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
+- event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage());
++ event.disallow(asyncEvent.getResult(), asyncEvent.kickMessage()); // Paper - Adventure
+ }
+ Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
+ @Override
+@@ -304,12 +304,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
+
+ ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
+ if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
+- this.disconnect(event.getKickMessage());
++ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
+ return;
+ }
+ } else {
+ if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
+- this.disconnect(asyncEvent.getKickMessage());
++ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(asyncEvent.kickMessage())); // Paper - Adventure
+ return;
+ }
+ }
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
index b23480fab4a7cba922b36cb31d4f77f720bf3aac..7dd3dfd2ccc820d45849a89707239b7dbcaf44c3 100644
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
@@ -3354,7 +3354,7 @@ index 23bdb77690ba15bcbbfb0c70af23336d08ac7752..8f144a357174bbe096ac9b38a5e67a61
}
collection = icons;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d14312b874 100644
+index 82d5c749a70f7a808c073263e861e09913c529d4..a3ef246b6765f93605bb3af6525adff01e71dd46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -608,8 +608,10 @@ public final class CraftServer implements Server {
@@ -3422,7 +3422,7 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d1
for (CommandSender recipient : recipients) {
recipient.sendMessage(message);
-@@ -2015,6 +2038,14 @@ public final class CraftServer implements Server {
+@@ -2014,6 +2037,14 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
}
@@ -3437,7 +3437,7 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d1
@Override
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
-@@ -2029,13 +2060,28 @@ public final class CraftServer implements Server {
+@@ -2028,13 +2059,28 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
}
@@ -3466,7 +3466,7 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d1
public Merchant createMerchant(String title) {
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
}
-@@ -2100,6 +2146,17 @@ public final class CraftServer implements Server {
+@@ -2099,6 +2145,17 @@ public final class CraftServer implements Server {
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
}
@@ -3484,7 +3484,7 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d1
@Override
public String getMotd() {
return this.console.getMotd();
-@@ -2534,4 +2591,57 @@ public final class CraftServer implements Server {
+@@ -2533,4 +2590,57 @@ public final class CraftServer implements Server {
return this.spigot;
}
// Spigot end
@@ -3543,7 +3543,7 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..4e155510337d73cd65f722c1360d87d1
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 8bc43dde03f461d9f7470c521f47e959d07cde67..d98020ea7f56418fdab03c7e7772ce062672b728 100644
+index 9bd43d8859874c4d499f9b8d5ae6e08a23e0d4f2..68a7db9c840f101950435b386058f4cf409bfc05 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -155,6 +155,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -3597,7 +3597,7 @@ index 8bc43dde03f461d9f7470c521f47e959d07cde67..d98020ea7f56418fdab03c7e7772ce06
private static Map<String, GameRules.Key<?>> gamerules;
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
-@@ -2054,5 +2091,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
+@@ -2045,5 +2082,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return ret;
}
@@ -4085,7 +4085,7 @@ index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a
@Override
public boolean isPermissionSet(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
-index a93534f9e855df5ee10b90fb2126870a30f23421..233dd760713a48770178c5fb532f86aee52ad0aa 100644
+index 4a70c2dfb3606bb67b80e99cae316906385f7ff3..52222f15399f2e1828f93b0f69e34157e3abff23 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -320,9 +320,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -4670,7 +4670,7 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
@Override
public int getLineWidth() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 97cb754bcac8b1c511c59f9cd1c007749d8b7965..756fc13c34cceeab054ee8e9678a16a56cc3f8ea 100644
+index ec1c0080642914ceeb931ee6ebdab31c2c6f1f59..a0dc52c805a82e267b66502a480cf76bc82a20d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -904,7 +904,7 @@ public class CraftEventFactory {
@@ -4814,12 +4814,12 @@ index 4dd9a80af9901287ab6740b072f2b89678c3d0cb..b2586684295b295a3196a2a9cf724cec
public String getTitle() {
return this.title;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
-index 293c1b23ea78891a08830887ba18b2f597d65c01..4c5ef6472947baf2ca3cc294eed77ceebd6cd5af 100644
+index d2c54674711f5d4b0273de628cc6d244969de057..0875dfe89644f5f54d004488ed980092b31c6416 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
-@@ -498,4 +498,17 @@ public final class CraftItemFactory implements ItemFactory {
- EnchantmentHelper.enchantItem(source, craft.handle, level, allowTreasures);
- return craft;
+@@ -492,4 +492,17 @@ public final class CraftItemFactory implements ItemFactory {
+ CraftItemStack craft = (CraftItemStack) itemStack;
+ return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, allowTreasures));
}
+
+ // Paper start - Adventure
@@ -5092,10 +5092,10 @@ index cc588fb207062829637adad79129ca91950496cb..8b27ca7606869798486c3afd03e86205
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index adc67d73681ad5486c266e2a464ae2a1385ba7f4..fbde42a814f846ce8c9df6ea621f10610d9322b3 100644
+index 92e73e0a41a7f63c51e426534ecb2604d9fca958..fcef34d7c88f7f8e21f9789ce3d0962e64d2f092 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -750,6 +750,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -751,6 +751,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return !(this.hasDisplayName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isUnbreakable() || this.hasDamage() || this.hasAttributeModifiers());
}
@@ -5114,7 +5114,7 @@ index adc67d73681ad5486c266e2a464ae2a1385ba7f4..fbde42a814f846ce8c9df6ea621f1061
@Override
public String getDisplayName() {
return CraftChatMessage.fromJSONComponent(this.displayName);
-@@ -785,6 +797,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -786,6 +798,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore != null && !this.lore.isEmpty();
}