diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index d0e2a70921..ec0dbc3a7d 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d45118d75526 100644 +index 0466cd48f5ccd1479f2909c70654d884dc1e8f24..7bc5bf271e435e1e0d85af133f1352f319f462b5 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ @@ -16,7 +16,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 - spigot + paper jar - 1.15.2-R0.1-SNAPSHOT + 1.16.1-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ + Paper @@ -27,7 +27,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 + UTF-8 unknown - 1.15.2 + 1.16.1 @@ -19,16 +18,22 @@ @@ -56,7 +56,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 compile @@ -50,6 +55,17 @@ - 7.3.1 + 8.0.1 compile + @@ -190,18 +190,18 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451 diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 91e2d0b9d9f698f54b49636944a6282adcff5b4b..3fb78997d8c4d913770a9a6a35f34e2c61b896fa 100644 +index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc6785539a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -186,7 +186,7 @@ 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, -3); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index f8d47ac482..1995587bd2 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -530,10 +530,10 @@ index 0000000000000000000000000000000000000000..a738657394bcccd859ef260a801736d4 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee47b27cd29 100644 +index 062a82c37723b7f032103ba2904877ae79b1ae01..5585b5646b5f3650aa3b795be06f920699a85403 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -270,15 +270,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider { } } @@ -543,22 +543,22 @@ index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee4 + @Override public boolean a(Entity entity) { long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4); - return this.a(i, PlayerChunk::b); + return this.a(i, (Function>>) PlayerChunk::b); // CraftBukkit - decompile error } - @Override - public boolean a(ChunkCoordIntPair chunkcoordintpair) { + public final boolean isEntityTickingChunk(ChunkCoordIntPair chunkcoordintpair) { return this.a(chunkcoordintpair); } // Paper - OBFHELPER + @Override public boolean a(ChunkCoordIntPair chunkcoordintpair) { - return this.a(chunkcoordintpair.pair(), PlayerChunk::b); + return this.a(chunkcoordintpair.pair(), (Function>>) PlayerChunk::b); // CraftBukkit - decompile error } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376c94edeee 100644 +index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804d294a5d0 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -170,6 +170,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); +@@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.registerCommands(); // Spigot end + // Paper start @@ -571,14 +571,14 @@ index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376 + com.destroystokyo.paper.PaperConfig.registerCommands(); + // Paper end - this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); - this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); + this.setPVP(dedicatedserverproperties.pvp); + this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce59909b9bbbd 100644 +index 390dafff979ebdd99b98db312035d665ab1eabda..2f81613099f3fa8828ce0a20c2cc26d431f208e5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { - private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); +@@ -136,9 +136,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { + private static final DataWatcherObject aA = DataWatcher.a(Entity.class, DataWatcherRegistry.i); protected static final DataWatcherObject POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s); public boolean inChunk; - public int chunkX; @@ -587,23 +587,23 @@ index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce599 + public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER + public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER + public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER + private boolean aB; public long Z; public long aa; - public long ab; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6980cf11a 100644 +index 62f62c2c98fbaff163d9079091e6f39db2d77fa0..484e78746aa62bb0b12968165bf8e056b27152f3 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - import com.mojang.datafixers.DataFixUtils; - import java.util.Collections; +@@ -2,6 +2,7 @@ package net.minecraft.server; + + import com.google.common.collect.ImmutableSet; import java.util.Optional; +import java.util.Set; // Paper import java.util.UUID; import java.util.function.Function; import java.util.stream.Stream; -@@ -435,4 +436,10 @@ public class EntityTypes { - return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, this.f, this.g); +@@ -463,4 +464,10 @@ public class EntityTypes { + return new EntityTypes<>(this.a, this.b, this.d, this.e, this.f, this.g, this.c, this.j, this.h, this.i); } } + @@ -614,10 +614,10 @@ index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e78c6322f 100644 +index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc310c65519 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -70,6 +70,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -76,6 +76,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean populating; public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -626,27 +626,27 @@ index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e public final SpigotTimings.WorldTimingsHandler timings; // Spigot public static BlockPosition lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -90,6 +92,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot + protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, ResourceKey resourcekey1, DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot + this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b549172bea56ec 100644 +index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c98ea1e25 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -769,6 +769,7 @@ public final class CraftServer implements Server { +@@ -792,6 +792,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot + com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper for (WorldServer world : console.getWorlds()) { - world.worldData.setDifficulty(config.difficulty); + world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -796,6 +797,7 @@ public final class CraftServer implements Server { +@@ -819,6 +820,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -654,7 +654,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 } pluginManager.clearPlugins(); -@@ -803,6 +805,7 @@ public final class CraftServer implements Server { +@@ -826,6 +828,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -662,7 +662,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2000,4 +2003,35 @@ public final class CraftServer implements Server { +@@ -2051,4 +2054,35 @@ public final class CraftServer implements Server { { return spigot; } @@ -699,7 +699,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc0895d13364 100644 +index a5c4b7f28f13f0aad4712912f60ba5fc6785539a..3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -129,6 +129,14 @@ public class Main { @@ -718,7 +718,7 @@ index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc08 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index a52cbba6e681bc96a15a3eea62831a1628f921a7..98ed975a6241395b6119d5b3a62d24329aa1f05b 100644 +index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,36 +39,36 @@ public class SpigotWorldConfig