From ce8c91600bea4095248629ec1efe8deea9a8004b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 26 Jun 2020 22:12:11 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) 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: 3284612a SPIGOT-5853: Add DragonBattle#generateEndPortal() e4db04ae SPIGOT-5841: New map colours broken CraftBukkit Changes: d4243510 SPIGOT-5853: DragonBattle#getEndPortalLocation() throws NPE on new world 1601ec31 SPIGOT-5845: ChatColor.RESET does not work in ItemMeta to reset italics 4d92db6f CraftChatMessageTest does not need AbstractTestingBase 71045d3d SPIGOT-5828: Unlock worlds on unload dbc347b9 SPIGOT-5841: New map colours broken 14053c70 SPIGOT-5847: BlockFadeEvent cannot be triggered asynchronously from another thread Spigot Changes: 6f4ff1b6 SPIGOT-5851: ChatColor (HEX) doesn't appear correctly in the ActionBar d94a518a SPIGOT-5848: PlayerSpawnLocationEvent throws NPE when setting a location of another world --- .../Add-PlayerInitialSpawnEvent.patch | 5 +++-- ...-to-disable-ender-dragon-legacy-check.patch | 18 ------------------ ...-t-fire-BlockFade-on-worldgen-threads.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 6 files changed, 8 insertions(+), 25 deletions(-) diff --git a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch index 0518e8186..df948df91 100644 --- a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch @@ -21,9 +21,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Bukkit.getPluginManager().callEvent(ev); Location loc = ev.getSpawnLocation(); - worldserver = ((CraftWorld) loc.getWorld()).getHandle(); +@@ -0,0 +0,0 @@ public abstract class PlayerList { - entityplayer.spawnIn(worldserver); + entityplayer.spawnIn(worldserver1); + entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); - entityplayer.setPosition(loc.getX(), loc.getY(), loc.getZ()); + entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world) entityplayer.setYawPitch(loc.getYaw(), loc.getPitch()); diff --git a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch index c6a412428..db52112c6 100644 --- a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch @@ -46,21 +46,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.world = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("Dragon")) { -@@ -0,0 +0,0 @@ public class EnderDragonBattle { - - private void a(BlockPosition blockposition) { - this.world.triggerEffect(3000, blockposition, 0); -- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); -+ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error - } - - private void a(boolean flag) { -@@ -0,0 +0,0 @@ public class EnderDragonBattle { - } - } - -- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); -+ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error - } - - private EntityEnderDragon o() { diff --git a/Spigot-Server-Patches/Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/Don-t-fire-BlockFade-on-worldgen-threads.patch index da24b2112..ea6b460ce 100644 --- a/Spigot-Server-Patches/Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/Spigot-Server-Patches/Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -15,8 +15,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start + if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation if (!this.canPlace(iblockdata, generatoraccess, blockposition)) { - CraftBlockState blockState = CraftBlockState.getBlockState(generatoraccess, blockposition); - blockState.setData(Blocks.AIR.getBlockData()); + // Suppress during worldgen + if (!(generatoraccess instanceof World)) { @@ -0,0 +0,0 @@ public class BlockFire extends BlockFireAbstract { return blockState.getHandle(); } diff --git a/work/Bukkit b/work/Bukkit index edc7a378c..3284612a1 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit edc7a378c9258ef533f90de135e250ca91b1ae02 +Subproject commit 3284612a10e704b4658aa087213a3fa9670b6926 diff --git a/work/CraftBukkit b/work/CraftBukkit index 4ff609e60..d42435101 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4ff609e60c191f107682681b5e3a8262f8a4c844 +Subproject commit d4243510102530684b860dbe927311bf47c488db diff --git a/work/Spigot b/work/Spigot index 16d78990f..6f4ff1b69 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 16d78990fe27633e0ec129216f96d3b50f770025 +Subproject commit 6f4ff1b691828e538ae534eac66e80a1bf2c1adf