diff options
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r-- | patches/server/0010-Adventure.patch | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 8d235e570c..631f6c96d0 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -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 520f0742210342b43aa854b1e8b0c42a84935a9c..d13a662895737180f3d75b6e357ff90c72b0fe08 100644 +index 58872976048a1162602d5f11a85eaead837cd805..acd53d9005fc5f43b94c80ec5e7d0e1f9c86ca98 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; @@ -3354,10 +3354,10 @@ 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 e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8aa29bc887 100644 +index 5cf26c39b00ea1f7b1c5719f434af79fb20c6c60..8441cbe4ebd676d1aacff223abdabeb32b5658e0 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 { +@@ -610,8 +610,10 @@ public final class CraftServer implements Server { } @Override @@ -3368,7 +3368,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a } @Override -@@ -1569,7 +1571,15 @@ public final class CraftServer implements Server { +@@ -1581,7 +1583,15 @@ public final class CraftServer implements Server { return this.configuration.getInt("settings.spawn-radius", -1); } @@ -3384,7 +3384,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a public String getShutdownMessage() { return this.configuration.getString("settings.shutdown-message"); } -@@ -1737,7 +1747,20 @@ public final class CraftServer implements Server { +@@ -1749,7 +1759,20 @@ public final class CraftServer implements Server { } @Override @@ -3405,7 +3405,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a Set<CommandSender> recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { if (permissible instanceof CommandSender && permissible.hasPermission(permission)) { -@@ -1745,14 +1768,14 @@ public final class CraftServer implements Server { +@@ -1757,14 +1780,14 @@ public final class CraftServer implements Server { } } @@ -3422,7 +3422,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a for (CommandSender recipient : recipients) { recipient.sendMessage(message); -@@ -2014,6 +2037,14 @@ public final class CraftServer implements Server { +@@ -2026,6 +2049,14 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, type); } @@ -3437,7 +3437,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a @Override public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { Preconditions.checkArgument(type != null, "InventoryType cannot be null"); -@@ -2028,13 +2059,28 @@ public final class CraftServer implements Server { +@@ -2040,13 +2071,28 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, size); } @@ -3466,7 +3466,7 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a public Merchant createMerchant(String title) { return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title); } -@@ -2099,6 +2145,17 @@ public final class CraftServer implements Server { +@@ -2111,6 +2157,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 e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a @Override public String getMotd() { return this.console.getMotd(); -@@ -2536,4 +2593,57 @@ public final class CraftServer implements Server { +@@ -2548,4 +2605,57 @@ public final class CraftServer implements Server { public double[] getTPS() { return new double[]{0, 0, 0}; // TODO } @@ -3543,10 +3543,10 @@ index e51bed4771dcef6201f943e9289c4a53f029f1ab..c9453c4689d02a39fa4a01aa14fc8d8a + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2b0b9994751557e69ee7aa48fcb8319c128a5bbf..b2632cbc7903e23eb68e9901df039f5d8293bd77 100644 +index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474b4e903d3 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 { +@@ -161,6 +161,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this); private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); @@ -3554,7 +3554,7 @@ index 2b0b9994751557e69ee7aa48fcb8319c128a5bbf..b2632cbc7903e23eb68e9901df039f5d private static final Random rand = new Random(); -@@ -1646,6 +1647,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1659,6 +1660,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { entityTracker.broadcastAndSend(packet); } } @@ -3597,7 +3597,7 @@ index 2b0b9994751557e69ee7aa48fcb8319c128a5bbf..b2632cbc7903e23eb68e9901df039f5d private static Map<String, GameRules.Key<?>> gamerules; public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() { -@@ -2068,5 +2105,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2105,5 +2142,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void setSendViewDistance(final int viewDistance) { throw new UnsupportedOperationException("Not implemented yet"); } @@ -4137,10 +4137,10 @@ index 61759e8179d0f6342abf0c0294e5a024928db8d9..92e21126a9347f1ee2279ab09bb6abf2 public boolean isOp() { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec9953bc0a63e 100644 +index be3a8e54d64b3cc145ab09b0bc7abb3f4ee153c3..e5330d41512dc59b5f94d9cacda340a46f45fd76 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -300,14 +300,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -306,14 +306,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getDisplayName() { @@ -4180,7 +4180,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 @Override public String getPlayerListName() { return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName); -@@ -326,42 +351,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -332,42 +357,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } @@ -4232,7 +4232,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 this.getHandle().connection.send(packet); } -@@ -393,6 +418,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -399,6 +424,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.disconnect(message == null ? "" : message); } @@ -4256,7 +4256,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 @Override public void setCompassTarget(Location loc) { Preconditions.checkArgument(loc != null, "Location cannot be null"); -@@ -689,6 +731,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -695,6 +737,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } @@ -4281,7 +4281,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 @Override public void sendSignChange(Location loc, String[] lines) { this.sendSignChange(loc, lines, DyeColor.BLACK); -@@ -712,6 +772,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -718,6 +778,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (this.getHandle().connection == null) return; Component[] components = CraftSign.sanitizeLines(lines); @@ -4293,7 +4293,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState()); SignText text = sign.getFrontText(); text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData())); -@@ -721,7 +786,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -727,7 +792,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } sign.setText(text, true); @@ -4303,7 +4303,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 } @Override -@@ -1705,7 +1771,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1735,7 +1801,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url) { @@ -4312,7 +4312,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 } @Override -@@ -1720,7 +1786,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1750,7 +1816,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setResourcePack(String url, byte[] hash, boolean force) { @@ -4321,8 +4321,8 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 } @Override -@@ -1743,6 +1809,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } +@@ -1787,6 +1853,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + this.handlePushResourcePack(new ClientboundResourcePackPushPacket(id, url, hashStr, force, CraftChatMessage.fromStringOrNull(prompt, true)), false); } + // Paper start - adventure @@ -4381,7 +4381,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 @Override public void removeResourcePack(UUID id) { Preconditions.checkArgument(id != null, "Resource pack id cannot be null"); -@@ -2150,6 +2269,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2203,6 +2322,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance(); } @@ -4394,7 +4394,7 @@ index 5d2ece0c415526d8c632b507f441977e6888c2cb..f53e223e2412846b82298233459ec995 @Override public int getPing() { return this.getHandle().connection.latency(); -@@ -2200,6 +2325,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2253,6 +2378,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().allowsListing(); } @@ -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 ec1c0080642914ceeb931ee6ebdab31c2c6f1f59..a0dc52c805a82e267b66502a480cf76bc82a20d4 100644 +index 249d271338a75c49ec9bc886d034af637618bc7b..da100f451238a093bcaad83343a79254d4aa31ce 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 { @@ -4876,7 +4876,7 @@ index 9e05a8515c5f6f340182e91150fcad8bbf80a22b..adf22ce4f0bcd3bd57dc2030c6c92d3d @Override public CraftMerchant getCraftMerchant() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 7753018d4e36091d25badc030ed8a3c9e431a369..5e01357208fe52c1d270c68cb19029ea0f4057bb 100644 +index d1d4760ca6c392c1f1217b58d03a611e7fd6ee54..e0d4798e244add64cbe43201604ad9d57701515f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -2,8 +2,9 @@ package org.bukkit.craftbukkit.inventory; @@ -4890,7 +4890,7 @@ index 7753018d4e36091d25badc030ed8a3c9e431a369..5e01357208fe52c1d270c68cb19029ea import java.util.ArrayList; import java.util.Arrays; import java.util.List; -@@ -261,6 +262,148 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -262,6 +263,148 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { this.generation = (generation == null) ? null : generation.ordinal(); } @@ -5039,7 +5039,7 @@ index 7753018d4e36091d25badc030ed8a3c9e431a369..5e01357208fe52c1d270c68cb19029ea @Override public String getPage(final int page) { Preconditions.checkArgument(this.isValidPage(page), "Invalid page number (%s)", page); -@@ -402,7 +545,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -403,7 +546,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { } @Override @@ -5459,10 +5459,10 @@ index d4fc39c4c450e675c5696b376576a4449a475497..516b3fef4d388366df09f0dd88deadbc boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 32b73cd6d65abe1cd5fd33733d8c06467382acdc..1c98b1f1a1c6ab27bb31fd9b32927c97728f980c 100644 +index 56c3aa7647eb2890cf7f546d35002b0c43724500..5cbac19f3c5eaa1940b36891b5a289c425300b20 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -73,6 +73,43 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -78,6 +78,43 @@ public final class CraftMagicNumbers implements UnsafeValues { private CraftMagicNumbers() {} |