From 6f4fbe1c899fd9b637453da3edcce9f701587e8d Mon Sep 17 00:00:00 2001 From: Daniel Ennis Date: Mon, 2 Nov 2020 21:22:15 -0500 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728) Upstream has released updates that appears 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: 30885166 Update to Minecraft 1.16.4 CraftBukkit Changes: 3af81c71 Update to Minecraft 1.16.4 Spigot Changes: f011ca24 Update to Minecraft 1.16.4 Co-authored-by: Mariell Hoversholm --- Paper-MojangAPI/pom.xml | 2 +- README.md | 2 +- Spigot-API-Patches/POM-changes.patch | 2 +- ...support.patch => 0549-Brand-support.patch} | 0 ...support.patch => 0559-Brand-support.patch} | 0 ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 12 +++--- .../Add-LivingEntity-getTargetEntity.patch | 4 +- .../Add-Velocity-IP-Forwarding-Support.patch | 20 +++++----- .../Add-entity-liquid-API.patch | 8 ++-- .../Add-sun-related-API.patch | 2 +- .../Add-tick-times-API-and-mspt-command.patch | 4 +- ...d-mobs-to-jump-and-take-water-damage.patch | 6 +-- ...-a-custom-authentication-servers-dow.patch | 12 +++--- .../Basic-PlayerProfile-API.patch | 11 +++--- Spigot-Server-Patches/Book-Size-Limits.patch | 8 ++-- .../Chunk-registration-fixes.patch | 2 +- .../Configurable-RCON-IP-address.patch | 2 +- ...ble-connection-throttle-kick-message.patch | 4 +- ...nfigurable-top-of-nether-void-damage.patch | 9 +++-- .../Disable-explosion-knockback.patch | 2 +- Spigot-Server-Patches/Disable-thunder.patch | 4 +- .../Do-not-let-armorstands-drown.patch | 6 +-- .../Don-t-let-fishinghooks-use-portals.patch | 2 +- ...move-existing-players-to-world-spawn.patch | 2 +- .../EndermanEscapeEvent.patch | 2 +- .../Entity-Activation-Range-2.0.patch | 4 +- Spigot-Server-Patches/Entity-Jump-API.patch | 2 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- ...l-to-changed-postToMainThread-method.patch | 2 +- ...ng-a-passenger-in-CreatureSpawnEvent.patch | 6 +-- ...ld-Difficulty-Remembering-Difficulty.patch | 8 ++-- .../Fix-PlayerEditBookEvent.patch | 30 --------------- ...4-Bukkit-world-container-is-not-used.patch | 2 +- ...-non-whitelisted-player-when-white-l.patch | 2 +- ...-allowed-colored-signs-to-be-created.patch | 7 ++-- ...rs-not-working-in-some-kick-messages.patch | 37 ++++++++----------- ...turn-for-WorldServer-addAllEntitiesS.patch | 2 +- ...h-entity-loss-due-to-unloaded-chunks.patch | 4 +- .../Fix-this-stupid-bullshit.patch | 2 +- .../Hook-into-CB-plugin-rewrites.patch | 2 +- .../Improve-death-events.patch | 10 ++--- .../Improved-Watchdog-Support.patch | 2 +- .../Increase-Light-Queue-Size.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 2 +- .../Limit-Client-Sign-length-more.patch | 16 +++++--- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 10 ++--- ...-API-Replenishable-Lootables-Feature.patch | 1 + Spigot-Server-Patches/MC-Dev-fixes.patch | 13 +++++++ Spigot-Server-Patches/MC-Utils.patch | 6 +-- ...asks-Speed-up-processing-of-chunk-lo.patch | 2 +- .../Optimise-random-block-ticking.patch | 2 +- .../Optimise-removeQueue.patch | 34 ++++++++--------- .../Optional-TNT-doesn-t-move-in-water.patch | 2 +- Spigot-Server-Patches/POM-Changes.patch | 8 ++-- .../Player.setPlayerProfile-API.patch | 4 +- ...layerDeathEvent-shouldDropExperience.patch | 2 +- .../Reset-players-airTicks-on-respawn.patch | 4 +- ...dEffects-only-to-players-who-can-see.patch | 2 +- ...ient-crashes-server-lists-and-Mojang.patch | 2 +- .../Slime-Pathfinder-Events.patch | 8 ++-- Spigot-Server-Patches/Timings-v2.patch | 8 ++-- ...oleAppender-for-console-improvements.patch | 2 +- ...ctureManager-to-prevent-worldgen-dea.patch | 34 ----------------- ...entity-dismount-during-teleportation.patch | 10 ++--- .../incremental-chunk-saving.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 2 +- SHIT_TO_CHECK.md => UPDATE_NOTES.md | 5 +++ work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 71 files changed, 201 insertions(+), 246 deletions(-) rename Spigot-Server-Patches/{0550-Brand-support.patch => 0549-Brand-support.patch} (100%) rename Spigot-Server-Patches/{0560-Brand-support.patch => 0559-Brand-support.patch} (100%) delete mode 100644 Spigot-Server-Patches/Fix-PlayerEditBookEvent.patch delete mode 100644 Spigot-Server-Patches/Use-wrapped-StructureManager-to-prevent-worldgen-dea.patch rename SHIT_TO_CHECK.md => UPDATE_NOTES.md (59%) diff --git a/Paper-MojangAPI/pom.xml b/Paper-MojangAPI/pom.xml index ef3ab575b2..7075a42db1 100644 --- a/Paper-MojangAPI/pom.xml +++ b/Paper-MojangAPI/pom.xml @@ -10,7 +10,7 @@ com.destroystokyo.paper paper-mojangapi - 1.16.3-R0.1-SNAPSHOT + 1.16.4-R0.1-SNAPSHOT jar Paper-MojangAPI diff --git a/README.md b/README.md index b8559d696d..88ed27b010 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ How To (Plugin Developers) com.destroystokyo.paper paper-api - 1.16.3-R0.1-SNAPSHOT + 1.16.4-R0.1-SNAPSHOT provided ``` diff --git a/Spigot-API-Patches/POM-changes.patch b/Spigot-API-Patches/POM-changes.patch index a866301f58..d7dfe5b6a6 100644 --- a/Spigot-API-Patches/POM-changes.patch +++ b/Spigot-API-Patches/POM-changes.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - spigot-api + com.destroystokyo.paper + paper-api - 1.16.3-R0.1-SNAPSHOT + 1.16.4-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-Server-Patches/0550-Brand-support.patch b/Spigot-Server-Patches/0549-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0550-Brand-support.patch rename to Spigot-Server-Patches/0549-Brand-support.patch diff --git a/Spigot-Server-Patches/0560-Brand-support.patch b/Spigot-Server-Patches/0559-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0560-Brand-support.patch rename to Spigot-Server-Patches/0559-Brand-support.patch diff --git a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index c3447efd77..daff1ce6e6 100644 --- a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -26,14 +26,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - java.util.UUID uniqueId = i.getId(); - final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; + java.util.UUID uniqueId = i.getId(); + final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; -- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId); +- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId); + // Paper start + PlayerProfile profile = Bukkit.createProfile(uniqueId, playerName); + AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile); - server.getPluginManager().callEvent(asyncEvent); + server.getPluginManager().callEvent(asyncEvent); + profile = asyncEvent.getPlayerProfile(); + profile.complete(); + i = CraftPlayerProfile.asAuthlibCopy(profile); @@ -41,5 +41,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + uniqueId = i.getId(); + // Paper end - if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) { - final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId); + if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) { + final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId); diff --git a/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch index 9a66f462cc..fa6ea3b029 100644 --- a/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/Add-LivingEntity-getTargetEntity.patch @@ -61,8 +61,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.getPassengers().size() < 1; } -+ public final float getCollisionBorderSize() { return bf(); } // Paper - OBFHELPER - public float bf() { ++ public final float getCollisionBorderSize() { return bg(); } // Paper - OBFHELPER + public float bg() { return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch index c88c8b5a73..41b0f22c3a 100644 --- a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch @@ -151,7 +151,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.g = LoginListener.EnumProtocolState.HELLO; @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { this.g = LoginListener.EnumProtocolState.KEY; - this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); + this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e)); } else { + // Paper start - Velocity support + if (com.destroystokyo.paper.PaperConfig.velocitySupport) { @@ -168,15 +168,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class LoginHandler { public void fireEvents() throws Exception { -+ // Paper start - Velocity support -+ if (LoginListener.this.velocityLoginMessageId == -1 && com.destroystokyo.paper.PaperConfig.velocitySupport) { -+ disconnect("This server requires you to connect with Velocity."); -+ return; -+ } -+ // Paper end - String playerName = i.getName(); - java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); - java.util.UUID uniqueId = i.getId(); ++ // Paper start - Velocity support ++ if (LoginListener.this.velocityLoginMessageId == -1 && com.destroystokyo.paper.PaperConfig.velocitySupport) { ++ disconnect("This server requires you to connect with Velocity."); ++ return; ++ } ++ // Paper end + String playerName = i.getName(); + java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); + java.util.UUID uniqueId = i.getId(); @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { // Spigot end diff --git a/Spigot-Server-Patches/Add-entity-liquid-API.patch b/Spigot-Server-Patches/Add-entity-liquid-API.patch index 1381dd4ed1..5e696e252e 100644 --- a/Spigot-Server-Patches/Add-entity-liquid-API.patch +++ b/Spigot-Server-Patches/Add-entity-liquid-API.patch @@ -27,16 +27,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.isInWater() || this.isInRain() || this.k(); } -+ public final boolean isInWaterOrBubbleColumn() { return aG(); } // Paper - OBFHELPER - public boolean aG() { ++ public final boolean isInWaterOrBubbleColumn() { return aH(); } // Paper - OBFHELPER + public boolean aH() { return this.isInWater() || this.k(); } @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.O == tag; } -+ public final boolean isInLava() { return aP(); } // Paper - OBFHELPER - public boolean aP() { ++ public final boolean isInLava() { return aQ(); } // Paper - OBFHELPER + public boolean aQ() { return !this.justCreated && this.M.getDouble(TagsFluid.LAVA) > 0.0D; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/Spigot-Server-Patches/Add-sun-related-API.patch b/Spigot-Server-Patches/Add-sun-related-API.patch index a6dedad9f1..20fe3bb188 100644 --- a/Spigot-Server-Patches/Add-sun-related-API.patch +++ b/Spigot-Server-Patches/Add-sun-related-API.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public boolean isInDaylight() { return this.eG(); } // Paper - OBFHELPER protected boolean eG() { if (this.world.isDay() && !this.world.isClientSide) { - float f = this.aQ(); + float f = this.aR(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/Spigot-Server-Patches/Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/Add-tick-times-API-and-mspt-command.patch index 4530750b10..b7bd347a19 100644 --- a/Spigot-Server-Patches/Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/Add-tick-times-API-and-mspt-command.patch @@ -116,8 +116,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.methodProfiler.exit(); org.spigotmc.WatchdogThread.tick(); // Spigot @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant this.a.cw() || this.a.aP(); + return this.a.isInWater() && this.a.b((Tag) TagsFluid.WATER) > this.a.cx() || this.a.aQ(); } + public void update() { this.e(); } // Paper - OBFHELPER diff --git a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch index 5d939965c5..b4eb623efd 100644 --- a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch @@ -31,13 +31,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - LoginListener.this.i = LoginListener.this.a(gameprofile); - LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; - } else { + LoginListener.this.i = LoginListener.this.a(gameprofile); + LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; + } else { + // Paper start + if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) { + LoginListener.this.disconnect(new ChatComponentText(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage)); + } else // Paper end - LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down")); - LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable"); - } + LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down")); + LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable"); + } diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index a757107725..34645a9303 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -325,8 +325,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +public class PaperAuthenticationService extends YggdrasilAuthenticationService { + private final Environment environment; -+ public PaperAuthenticationService(Proxy proxy, String clientToken) { -+ super(proxy, clientToken); ++ public PaperAuthenticationService(Proxy proxy) { ++ super(proxy); + this.environment = (Environment)EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD);; + } + @@ -416,10 +416,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import com.mojang.authlib.Agent; +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; +import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication; ++import java.util.UUID; + +public class PaperUserAuthentication extends YggdrasilUserAuthentication { + public PaperUserAuthentication(YggdrasilAuthenticationService authenticationService, Agent agent) { -+ super(authenticationService, agent); ++ super(authenticationService, UUID.randomUUID().toString(), agent); + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java @@ -458,8 +459,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } File file = (File) optionset.valueOf("universe"); // CraftBukkit -- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); -+ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); // Paper +- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY); ++ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY); // Paper MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName())); diff --git a/Spigot-Server-Patches/Book-Size-Limits.patch b/Spigot-Server-Patches/Book-Size-Limits.patch index 4c54df95b6..fe7acd670e 100644 --- a/Spigot-Server-Patches/Book-Size-Limits.patch +++ b/Spigot-Server-Patches/Book-Size-Limits.patch @@ -25,8 +25,8 @@ diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -0,0 +0,0 @@ import java.util.Optional; - import java.util.Set; +@@ -0,0 +0,0 @@ import java.util.function.Consumer; + import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; +import org.apache.commons.lang3.StringEscapeUtils; @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void a(PacketPlayInBEdit packetplayinbedit) { + // Paper start -+ ItemStack testStack = packetplayinbedit.b(); ++ ItemStack testStack = packetplayinbedit.b(); // TODO(Proximyst): Add obfhelper here + if (!server.isPrimaryThread() && !testStack.isEmpty() && testStack.getTag() != null) { + NBTTagList pageList = testStack.getTag().getList("pages", 8); + long byteTotal = 0; @@ -73,6 +73,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + // Paper end - PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer()); // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { + this.disconnect("Book edited too quickly!"); diff --git a/Spigot-Server-Patches/Chunk-registration-fixes.patch b/Spigot-Server-Patches/Chunk-registration-fixes.patch index d5d3f53714..ebff68bba4 100644 --- a/Spigot-Server-Patches/Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/Chunk-registration-fixes.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { - if (entity.ck()) { + if (entity.cl()) { this.getMethodProfiler().enter("chunkCheck"); int i = MathHelper.floor(entity.locX() / 16.0D); - int j = MathHelper.floor(entity.locY() / 16.0D); diff --git a/Spigot-Server-Patches/Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/Configurable-RCON-IP-address.patch index c29a901007..6db45b0c73 100644 --- a/Spigot-Server-Patches/Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/Configurable-RCON-IP-address.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) { super(properties, optionset); @@ -0,0 +0,0 @@ public class DedicatedServerProperties extends PropertyManager(this); // Paper - @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end diff --git a/Spigot-Server-Patches/EndermanEscapeEvent.patch b/Spigot-Server-Patches/EndermanEscapeEvent.patch index 582906b5f7..017e62edb0 100644 --- a/Spigot-Server-Patches/EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/EndermanEscapeEvent.patch @@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (!super.setGoalTarget(entityliving, reason, fireEvent)) { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { if (this.world.isDay() && this.ticksLived >= this.bs + 600) { - float f = this.aQ(); + float f = this.aR(); - if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { + if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper diff --git a/Spigot-Server-Patches/Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/Entity-Activation-Range-2.0.patch index e2e9d1e2b2..4876e71c9e 100644 --- a/Spigot-Server-Patches/Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/Entity-Activation-Range-2.0.patch @@ -68,8 +68,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.ae; } -+ public final boolean isPushedByWater() { return this.bU(); } // Paper - OBFHELPER - the below is not an obfhelper, don't use it! - public boolean bU() { ++ public final boolean isPushedByWater() { return this.bV(); } // Paper - OBFHELPER - the below is not an obfhelper, don't use it! + public boolean bV() { // Paper start return this.pushedByWater(); diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java diff --git a/Spigot-Server-Patches/Entity-Jump-API.patch b/Spigot-Server-Patches/Entity-Jump-API.patch index 3de6c1dcc6..7b755aa5ff 100644 --- a/Spigot-Server-Patches/Entity-Jump-API.patch +++ b/Spigot-Server-Patches/Entity-Jump-API.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - } else if (this.aP() && (!this.onGround || d7 > d8)) { + } else if (this.aQ() && (!this.onGround || d7 > d8)) { this.c((Tag) TagsFluid.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) { + if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper diff --git a/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch index c6bf353ea2..d2dbeef458 100644 --- a/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/Expose-attack-cooldown-methods-for-Player.patch @@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.datawatcher.set(EntityHuman.bl, nbttagcompound); } -+ public float getCooldownPeriod() { return this.eQ(); } // Paper - OBFHELPER - public float eQ() { ++ public float getCooldownPeriod() { return this.eR(); } // Paper - OBFHELPER + public float eR() { return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/Spigot-Server-Patches/Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/Fix-CB-call-to-changed-postToMainThread-method.patch index f8d3572a19..dd2a17c58d 100644 --- a/Spigot-Server-Patches/Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/Fix-CB-call-to-changed-postToMainThread-method.patch @@ -16,4 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper } - @Override + private void a(T t0, Consumer consumer, BiFunction>> bifunction) { diff --git a/Spigot-Server-Patches/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch b/Spigot-Server-Patches/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch index 91e52946b8..1332822615 100644 --- a/Spigot-Server-Patches/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch @@ -11,9 +11,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } - public Stream co() { -- return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::co)); -+ return Stream.concat(Stream.of(this), com.google.common.collect.ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::co)); // Paper + public Stream cp() { +- return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::cp)); ++ return Stream.concat(Stream.of(this), com.google.common.collect.ImmutableList.copyOf(this.passengers).stream().flatMap(Entity::cp)); // Paper } public boolean hasSinglePlayerPassenger() { diff --git a/Spigot-Server-Patches/Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/Spigot-Server-Patches/Fix-Per-World-Difficulty-Remembering-Difficulty.patch index f84095cb86..467d2b73f2 100644 --- a/Spigot-Server-Patches/Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/Spigot-Server-Patches/Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -43,21 +43,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Sun, 16 Dec 2018 13:07:33 +1100 -Subject: [PATCH] Fix PlayerEditBookEvent - -- Updating book writing (not signing) mutated the original item, making -it impossible to properly cancel the event or modify the book meta - -- When the event was cancelled, the client's book would keep the -cancelled writing - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { - itemstack2.a("pages", (NBTBase) nbttaglist); - this.player.a(packetplayinbedit.d(), CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, itemstack2)); // CraftBukkit - } else { -- ItemStack old = itemstack1.cloneItemStack(); // CraftBukkit -- itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8)); -- CraftEventFactory.handleEditBookEvent(player, enumitemslot, old, itemstack1); // CraftBukkit -+ // Paper start - dont mutate players current item, set it from the event -+ ItemStack newBook = itemstack1.cloneItemStack(); -+ newBook.getOrCreateTagAndSet("pages", (NBTBase)itemstack.getTag().getList("pages", 8)); -+ this.player.setSlot(enumitemslot, CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, newBook)); -+ // Paper end - } - } - diff --git a/Spigot-Server-Patches/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/Spigot-Server-Patches/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch index 176a218c5d..bef3ff597c 100644 --- a/Spigot-Server-Patches/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch +++ b/Spigot-Server-Patches/Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch @@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + file = new File(bukkitConfiguration.getString("settings.world-container", ".")); + } + // Paper end - fix SPIGOT-5824 - YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); // Paper + YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY); // Paper MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); - UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName())); diff --git a/Spigot-Server-Patches/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/Spigot-Server-Patches/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index 763d70e112..62d1af6029 100644 --- a/Spigot-Server-Patches/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/Spigot-Server-Patches/Fix-deop-kicking-non-whitelisted-player-when-white-l.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant SharedConstants.getGameVersion().getProtocolVersion()) { -- chatmessage = new ChatMessage( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getGameVersion().getName() ) ); // Spigot -+ chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getGameVersion().getName() ) , true)[0]; // Spigot // Paper - Fix hex colors not working in some kick messages this.c.sendPacket(new PacketLoginOutDisconnect(chatmessage)); - this.c.close(chatmessage); - } else if (packethandshakinginsetprotocol.c() < SharedConstants.getGameVersion().getProtocolVersion()) { -- chatmessage = new ChatMessage( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getGameVersion().getName() ) ); // Spigot -+ chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getGameVersion().getName() ) , true)[0]; // Spigot // Paper - Fix hex colors not working in some kick messages - this.c.sendPacket(new PacketLoginOutDisconnect(chatmessage)); - this.c.close(chatmessage); - } else { @@ -0,0 +0,0 @@ public class HandshakeListener implements PacketHandshakingInListener { if (event.callEvent()) { // If we've failed somehow, let the client know so and go no further. if (event.isFailed()) { - chatmessage = new ChatMessage(event.getFailMessage()); -+ chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(event.getFailMessage(), true)[0]; // Paper - Fix hex colors not working in some kick messages ++ IChatBaseComponent chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(event.getFailMessage(), true)[0]; // Paper - Fix hex colors not working in some kick messages this.getNetworkManager().sendPacket(new PacketLoginOutDisconnect(chatmessage)); this.getNetworkManager().close(chatmessage); return; diff --git a/Spigot-Server-Patches/Fix-incorrect-return-for-WorldServer-addAllEntitiesS.patch b/Spigot-Server-Patches/Fix-incorrect-return-for-WorldServer-addAllEntitiesS.patch index 217528e1a6..71c09c761c 100644 --- a/Spigot-Server-Patches/Fix-incorrect-return-for-WorldServer-addAllEntitiesS.patch +++ b/Spigot-Server-Patches/Fix-incorrect-return-for-WorldServer-addAllEntitiesS.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { - if (entity.co().anyMatch(this::isUUIDTaken)) { + if (entity.cp().anyMatch(this::isUUIDTaken)) { return false; } else { - return this.addAllEntities(entity, reason); // CraftBukkit diff --git a/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index 5ef6019ee1..c5c254897a 100644 --- a/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -37,8 +37,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); } -- if (!entity.cj() && !this.isChunkLoaded(i, k)) { -+ if (!entity.valid && !entity.cj() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location +- if (!entity.ck() && !this.isChunkLoaded(i, k)) { ++ if (!entity.valid && !entity.ck() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location if (entity.inChunk) { WorldServer.LOGGER.warn("Entity {} left loaded chunk area", entity); } diff --git a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch index 78ecbd7fe5..17d990e8da 100644 --- a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -7); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/Spigot-Server-Patches/Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/Hook-into-CB-plugin-rewrites.patch index 5b2c7135e4..8679509e4d 100644 --- a/Spigot-Server-Patches/Hook-into-CB-plugin-rewrites.patch +++ b/Spigot-Server-Patches/Hook-into-CB-plugin-rewrites.patch @@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if ( Boolean.getBoolean( "debug.rewriteForIde" ) ) + { + // unversion incoming calls for pre-relocate debug work -+ final String NMS_REVISION_PACKAGE = "v1_16_R2/"; ++ final String NMS_REVISION_PACKAGE = "v1_16_R3/"; + + getAndRemove.put( "net/minecraft/".concat( "server/" + NMS_REVISION_PACKAGE ), NMS_REVISION_PACKAGE ); + getAndRemove.put( "org/bukkit/".concat( "craftbukkit/" + NMS_REVISION_PACKAGE ), NMS_REVISION_PACKAGE ); diff --git a/Spigot-Server-Patches/Improve-death-events.patch b/Spigot-Server-Patches/Improve-death-events.patch index 2c10cffee9..7c3760e077 100644 --- a/Spigot-Server-Patches/Improve-death-events.patch +++ b/Spigot-Server-Patches/Improve-death-events.patch @@ -141,17 +141,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public float getBukkitYaw() { @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback - if (this.dk()) { + if (this.dl()) { if (!this.f(damagesource)) { - SoundEffect soundeffect = this.getSoundDeath(); + // Paper start - moved into CraftEventFactory event caller for cancellable death event + //SoundEffect soundeffect = this.getSoundDeath(); - if (flag1 && soundeffect != null) { -- this.playSound(soundeffect, this.getSoundVolume(), this.dG()); +- this.playSound(soundeffect, this.getSoundVolume(), this.dH()); - } +// if (flag1 && soundeffect != null) { -+// this.playSound(soundeffect, this.getSoundVolume(), this.dG()); ++// this.playSound(soundeffect, this.getSoundVolume(), this.dH()); +// } + this.silentDeath = !flag1; // mark entity as dying silently + // Paper end @@ -269,8 +269,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return 1.0F; } -+ public float getSoundPitch() { return dG();} // Paper - OBFHELPER - protected float dG() { ++ public float getSoundPitch() { return dH();} // Paper - OBFHELPER + protected float dH() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/Spigot-Server-Patches/Improved-Watchdog-Support.patch b/Spigot-Server-Patches/Improved-Watchdog-Support.patch index d303427fec..87afddbe46 100644 --- a/Spigot-Server-Patches/Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/Improved-Watchdog-Support.patch @@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 r0.run(); } catch (Exception exception) { + if (exception.getCause() instanceof ThreadDeath) throw exception; // Paper - IAsyncTaskHandler.LOGGER.fatal("Error executing task on {}", this.bi(), exception); + IAsyncTaskHandler.LOGGER.fatal("Error executing task on {}", this.bj(), exception); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/Spigot-Server-Patches/Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/Increase-Light-Queue-Size.patch index 60fd7653d7..18313fa0ac 100644 --- a/Spigot-Server-Patches/Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/Increase-Light-Queue-Size.patch @@ -37,6 +37,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 worldloadlistener.b(); - chunkproviderserver.getLightEngine().a(5); + chunkproviderserver.getLightEngine().a(worldserver.paperConfig.lightQueueSize); // Paper - increase light queue size - this.bb(); + this.bc(); // CraftBukkit start diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index f01fa2edb3..126292acb4 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - this.es(); + this.et(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); diff --git a/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch index 258d5918d1..6b0c013b13 100644 --- a/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/Limit-Client-Sign-length-more.patch @@ -36,16 +36,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; - for (int i = 0; i < astring.length; ++i) { + for (int i = 0; i < list.size(); ++i) { + // Paper start - cap line length - modified clients can send longer data than normal -+ if (MAX_SIGN_LINE_LENGTH > 0 && astring[i].length() > MAX_SIGN_LINE_LENGTH) { ++ String currentLine = list.get(i); ++ if (MAX_SIGN_LINE_LENGTH > 0 && currentLine.length() > MAX_SIGN_LINE_LENGTH) { + // This handles multibyte characters as 1 -+ int offset = astring[i].codePoints().limit(MAX_SIGN_LINE_LENGTH).map(Character::charCount).sum(); -+ if (offset < astring[i].length()) { -+ astring[i] = astring[i].substring(0, offset); ++ int offset = currentLine.codePoints().limit(MAX_SIGN_LINE_LENGTH).map(Character::charCount).sum(); ++ if (offset < currentLine.length()) { ++ list.set(i, currentLine = currentLine.substring(0, offset)); + } + } + // Paper end - lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. + // Paper TODO(Proximyst): Add obfhelper when 1.16.4 runs +- lines[i] = SharedConstants.a(list.get(i)); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. ++ lines[i] = SharedConstants.a(currentLine); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. } SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + this.server.getPluginManager().callEvent(event); diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index fb2289b678..135ee86950 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -22,14 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.activeItem; } -+ public int getItemUseRemainingTime() { return this.dY(); } // Paper - OBFHELPER - public int dY() { ++ public int getItemUseRemainingTime() { return this.dZ(); } // Paper - OBFHELPER + public int dZ() { return this.bd; } -+ public int getHandRaisedTime() { return this.dZ(); } // Paper - OBFHELPER - public int dZ() { - return this.isHandRaised() ? this.activeItem.k() - this.dY() : 0; ++ public int getHandRaisedTime() { return this.ea(); } // Paper - OBFHELPER + public int ea() { + return this.isHandRaised() ? this.activeItem.k() - this.dZ() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index c5e39e616c..4ece59adcc 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -607,6 +607,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.lootableData.loadNbt(nbttagcompound); // Paper if (nbttagcompound.hasKeyOfType("LootTable", 8)) { this.lootTable = new MinecraftKey(nbttagcompound.getString("LootTable")); ++ try { org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate this.lootTableSeed = nbttagcompound.getLong("LootTableSeed"); - return true; + return false; // Paper - always load the items, table may still remain diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index faa6cd03c1..aa5e0d08e4 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -847,3 +847,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 NBTTagCompound nbttagcompound = this.a(s, SharedConstants.getGameVersion().getWorldVersion()); t0.a(nbttagcompound.getCompound("data")); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { + } + + // CraftBukkit - decompile error +- return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(it.unimi.dsi.fastutil.objects.Object2IntMap.Entry::getIntValue).reversed()).limit(5L).map((it_unimi_dsi_fastutil_objects_object2intmap_entry) -> { ++ return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Object2IntMap.Entry::getIntValue).reversed()).limit(5L).map((it_unimi_dsi_fastutil_objects_object2intmap_entry) -> { // Paper - decompile fix + return it_unimi_dsi_fastutil_objects_object2intmap_entry.getKey() + ":" + it_unimi_dsi_fastutil_objects_object2intmap_entry.getIntValue(); + }).collect(Collectors.joining(",")); + } catch (Exception exception) { diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 44e0aadf89..bee4a87ea5 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -3146,8 +3146,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 super(worldserver, worldserver.getSpawn(), worldserver.v(), gameprofile); this.spawnDimension = World.OVERWORLD; @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.G = 1.0F; this.c(worldserver); + this.co = minecraftserver.a(this); + this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper + @@ -4499,10 +4499,10 @@ diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; - import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry; +@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry; import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSets; + import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.ObjectIterator; import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; diff --git a/Spigot-Server-Patches/Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index f1a784171b..7912439450 100644 --- a/Spigot-Server-Patches/Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -239,7 +239,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.persistentRaid.a(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.doSounds.startTiming(); // Spigot - this.aj(); + this.ak(); timings.doSounds.stopTiming(); // Spigot + this.getMinecraftServer().midTickLoadChunks(); // Paper this.ticking = false; diff --git a/Spigot-Server-Patches/Optimise-random-block-ticking.patch b/Spigot-Server-Patches/Optimise-random-block-ticking.patch index a87626c766..145c018cf3 100644 --- a/Spigot-Server-Patches/Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/Optimise-random-block-ticking.patch @@ -291,7 +291,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - BlockPosition blockposition; + final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change - if (!this.paperConfig.disableThunder && flag && this.V() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + if (!this.paperConfig.disableThunder && flag && this.W() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder - blockposition = this.a(this.a(j, 0, k, 15)); + blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper if (this.isRainingAt(blockposition)) { diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index be7dc0f675..cae9b7ff12 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void initUUID() { @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); + this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e)); } else { // Spigot start - new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { @@ -43,25 +43,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - this.loginKey = packetlogininencryptionbegin.a(privatekey); - this.g = LoginListener.EnumProtocolState.AUTHENTICATING; - this.networkManager.a(this.loginKey); -- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { -+ // Paper start - Cache authenticator threads -+ authenticatorPool.execute(new Runnable() { - public void run() { - GameProfile gameprofile = LoginListener.this.i; + throw new IllegalStateException("Protocol error", cryptographyexception); + } + +- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { ++ // Paper start - Cache authenticator threads ++ authenticatorPool.execute(new Runnable() { + public void run() { + GameProfile gameprofile = LoginListener.this.i; @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - return LoginListener.this.server.V() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; - } -- }; + return LoginListener.this.server.W() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; + } +- }; - -- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER)); -- thread.start(); -+ }); -+ // Paper end - } +- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER)); +- thread.start(); ++ }); ++ // Paper end } + // Spigot start diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index 3077d4c279..9a7c8cac24 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } - public boolean bU() { + public boolean bV() { + // Paper start + return this.pushedByWater(); + } diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 324142b64c..05ab2ec5f9 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - spigot + paper jar - 1.16.3-R0.1-SNAPSHOT + 1.16.4-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + UTF-8 unknown - 1.16.3 + 1.16.4 @@ -0,0 +0,0 @@ @@ -202,12 +202,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class Main { } - if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { + if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { - Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L); + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -7); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 487fc58ac6..272c06bff5 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -32,13 +32,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private SecretKey loginKey; private EntityPlayer l; @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; + final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; // Paper start - PlayerProfile profile = Bukkit.createProfile(uniqueId, playerName); + PlayerProfile profile = CraftPlayerProfile.asBukkitMirror(getGameProfile()); AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile); - server.getPluginManager().callEvent(asyncEvent); + server.getPluginManager().callEvent(asyncEvent); profile = asyncEvent.getPlayerProfile(); - profile.complete(); - i = CraftPlayerProfile.asAuthlibCopy(profile); diff --git a/Spigot-Server-Patches/PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/PlayerDeathEvent-shouldDropExperience.patch index aaae8b073e..dc279458f3 100644 --- a/Spigot-Server-Patches/PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/PlayerDeathEvent-shouldDropExperience.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.eV(); + this.eW(); } // SPIGOT-5478 must be called manually now - this.dropExperience(); diff --git a/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch index 6f0a2d3947..c182b61a68 100644 --- a/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/Reset-players-airTicks-on-respawn.patch @@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -+ public final int getMaxAirTicks() { return bG(); } // Paper - OBFHELPER - public int bG() { ++ public final int getMaxAirTicks() { return bH(); } // Paper - OBFHELPER + public int bH() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch index 0f9f232304..cc8c8cb53a 100644 --- a/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); + sendSoundEffect(this, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility - this.ew(); + this.ex(); } @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index f9a0414736..6ccd8feeed 100644 --- a/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -7); if (buildDate.before(deadline.getTime())) { System.err.println("*** Error, this build is outdated ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***"); diff --git a/Spigot-Server-Patches/Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/Slime-Pathfinder-Events.patch index 937ef1d4f9..d647ba500e 100644 --- a/Spigot-Server-Patches/Slime-Pathfinder-Events.patch +++ b/Spigot-Server-Patches/Slime-Pathfinder-Events.patch @@ -56,8 +56,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public boolean a() { -- return (this.a.isInWater() || this.a.aP()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; -+ return (this.a.isInWater() || this.a.aP()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper +- return (this.a.isInWater() || this.a.aQ()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; ++ return (this.a.isInWater() || this.a.aQ()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper } @Override @@ -65,8 +65,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public boolean a() { -- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aP() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; -+ return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aP() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander; // Paper - add canWander +- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aQ() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime; ++ return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aQ() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander; // Paper - add canWander } @Override diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index 01ff1f09cf..9f88ef1deb 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -1038,7 +1038,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot } - protected BlockPosition ao() { + protected BlockPosition ap() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java @@ -1115,7 +1115,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.collideNearby(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); - if (!this.world.isClientSide && this.dN() && this.aF()) { + if (!this.world.isClientSide && this.dO() && this.aG()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -1714,7 +1714,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.L = new ObjectLinkedOpenHashSet(); this.Q = flag1; @@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { - this.P(); + this.Q(); this.b(); gameprofilerfiller.exitEnter("chunkSource"); + this.timings.chunkProviderTick.startTiming(); // Paper - timings @@ -1736,7 +1736,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.timings.raids.stopTiming(); // Paper - timings gameprofilerfiller.exitEnter("blockEvents"); timings.doSounds.startTiming(); // Spigot - this.aj(); + this.ak(); @@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed { } diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index 974edb7601..c1623662fe 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -325,7 +325,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper } - if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { + if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { @@ -0,0 +0,0 @@ public class Main { System.out.println("Unable to read system info"); } diff --git a/Spigot-Server-Patches/Use-wrapped-StructureManager-to-prevent-worldgen-dea.patch b/Spigot-Server-Patches/Use-wrapped-StructureManager-to-prevent-worldgen-dea.patch deleted file mode 100644 index 0d0e04b47d..0000000000 --- a/Spigot-Server-Patches/Use-wrapped-StructureManager-to-prevent-worldgen-dea.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MiniDigger | Martin -Date: Wed, 2 Sep 2020 13:56:18 +0200 -Subject: [PATCH] Use wrapped StructureManager to prevent worldgen deadlock - - -diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java -@@ -0,0 +0,0 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed { - private final BiomeManager m; - private final ChunkCoordIntPair n; - private final ChunkCoordIntPair o; -+ private final StructureManager structureManager; // Paper - cache wrapped structure manager - - public RegionLimitedWorldAccess(WorldServer worldserver, List list) { - int i = MathHelper.floor(Math.sqrt((double) list.size())); -@@ -0,0 +0,0 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed { - this.m = new BiomeManager(this, BiomeManager.a(this.g), worldserver.getDimensionManager().getGenLayerZoomer()); - this.n = ((IChunkAccess) list.get(0)).getPos(); - this.o = ((IChunkAccess) list.get(list.size() - 1)).getPos(); -+ this.structureManager = this.f.getStructureManager().a(this); // Paper - cache wrapped structure manager - } - } - -@@ -0,0 +0,0 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed { - - @Override - public Stream> a(SectionPosition sectionposition, StructureGenerator structuregenerator) { -- return this.f.a(sectionposition, structuregenerator); -+ return structureManager.a(sectionposition, structuregenerator); // Paper - wrapped structure manager to prevent deadlock, see #4272 and MC-199487 - } - } diff --git a/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch index c117d5ba42..253681782f 100644 --- a/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/force-entity-dismount-during-teleportation.patch @@ -27,9 +27,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -- public void be() { +- public void bf() { + // Paper start -+ public void be() { stopRiding(false); } ++ public void bf() { stopRiding(false); } + public void stopRiding(boolean suppressCancellation) { + // Paper end if (this.vehicle != null) { @@ -80,10 +80,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - @Override -- public void be() { -- super.be(); +- public void bf() { +- super.bf(); + // Paper start -+ @Override public void be() { stopRiding(false); } ++ @Override public void bf() { stopRiding(false); } + @Override public void stopRiding(boolean suppressCancellation) { + // Paper end + super.stopRiding(suppressCancellation); // Paper - suppress diff --git a/Spigot-Server-Patches/incremental-chunk-saving.patch b/Spigot-Server-Patches/incremental-chunk-saving.patch index 52e9320c86..e2656801e4 100644 --- a/Spigot-Server-Patches/incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/incremental-chunk-saving.patch @@ -317,7 +317,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end } -+ private void saveData() { this.ai(); } // Paper - OBFHELPER - private void ai() { ++ private void saveData() { this.aj(); } // Paper - OBFHELPER + private void aj() { if (this.dragonBattle != null) { this.worldDataServer.a(this.dragonBattle.a()); // CraftBukkit diff --git a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch index 4e250a7f36..d931dff672 100644 --- a/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/remove-null-possibility-for-getServer-singleton.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public MinecraftServer(OptionSet options, DataPackConfiguration datapackconfiguration, Thread thread, IRegistryCustom.Dimension iregistrycustom_dimension, Convertable.ConversionSession convertable_conversionsession, SaveData savedata, ResourcePackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) { super("Server"); + SERVER = this; // Paper - better singleton - this.m = new GameProfilerSwitcher(SystemUtils.a, this::ah); + this.m = new GameProfilerSwitcher(SystemUtils.a, this::ai); this.methodProfiler = GameProfilerDisabled.a; this.serverPing = new ServerPing(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant, int)` (CB bug). +The item is presumably edited with the new page contents before it ever reaches this method? \ No newline at end of file diff --git a/work/BuildData b/work/BuildData index b2025bdddd..501ea06074 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit b2025bdddde79aea004399ec5f3652a1bce56b7a +Subproject commit 501ea060743c7bba4436878207e4f1232298efce diff --git a/work/Bukkit b/work/Bukkit index 4abf9e96df..308851669a 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 4abf9e96df578e4c842c865e50d0933ce0616938 +Subproject commit 308851669a4b264468e83cfb75215bff3638b2c0 diff --git a/work/CraftBukkit b/work/CraftBukkit index dea4138900..3af81c7179 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit dea4138900788a64db46db74903cf7ed50681738 +Subproject commit 3af81c717980b5e114cb27029e7ee8f1defac841 diff --git a/work/Spigot b/work/Spigot index 57bbdd8eb7..f011ca24f2 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 57bbdd8eb797a51960cf9a47f764b68f97d4f18c +Subproject commit f011ca24f2b53e0fb0e7a1cfa7afd5336a85beec