diff --git a/gradle.properties b/gradle.properties index 25ad4f58..690157d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=io.sapphiremc.sapphire version=1.20.2-R0.1-SNAPSHOT mcVersion=1.20.2 -pufferfishRef=0ba7617d7efe39b7e15d5b080e9df2a512144fb0 +pufferfishRef=003a28a5dc785ecb8347718dbc59e348d139d33b org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0002-Sapphire-configuration.patch b/patches/api/0002-Sapphire-configuration.patch index 95188db8..08eb7305 100644 --- a/patches/api/0002-Sapphire-configuration.patch +++ b/patches/api/0002-Sapphire-configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Sapphire configuration diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 8d8fe04e6b09d2a5b1cc05002073df5c58cdcb96..b5c9eddef4fc98a31089b0d7c1f7df463032fe73 100644 +index d0c634629aa0b6bac0da93655dd86ad3aea0ce30..2139deea292386904f5216ddec9de598d9840a82 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2121,6 +2121,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2190,6 +2190,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Paper end diff --git a/patches/api/0003-Chromium-client-support.patch b/patches/api/0003-Chromium-client-support.patch index 736a2d13..2bc59a78 100644 --- a/patches/api/0003-Chromium-client-support.patch +++ b/patches/api/0003-Chromium-client-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Chromium client support diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 20fa1024f9ad8f478a347be5c554b5e45b398a1c..cc992cc5d2ac2ccd60f4876be8f20f45a2ea75ee 100644 +index 9240ea09206461d61cc08d4252e8507555bf41cf..66d477ba99c622ed5786dbe3b8f2880602cf1a79 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3278,4 +3278,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3307,4 +3307,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @Override Spigot spigot(); // Spigot end diff --git a/patches/server/0001-Rebrand.patch b/patches/server/0001-Rebrand.patch index 98d92948..69364ea8 100644 --- a/patches/server/0001-Rebrand.patch +++ b/patches/server/0001-Rebrand.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand diff --git a/build.gradle.kts b/build.gradle.kts -index 77f76653c22c44ac9ab7f396b686affc228502c9..316663e83d09f15024de586651c37064b5752a71 100644 +index b99daeab0d9a22dde4cd8d7395a5471f91ebc9f6..9278a32ff2f8bbbd5631421a6aee8c7d63d11583 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,9 +13,9 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -137,7 +137,7 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..1abd60741ece7982bdb6a2d90f81df36 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 371049c1236c6443384c0ce184e99d5b9f8e57c2..5a39cc6d975f39185d65b1849a42a7a002ae09ea 100644 +index 58d076e2a8fa1cf56c4c8d15a502e85fcf48aa90..3c3130359d0c2b4bd3fcb0a6516786708627999e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -910,7 +910,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 20122bf191ebc74c223310aea1f004fdbb163e57..e378e06b1d897f9a83d9f07c52ea5b2a7c394b14 100644 +index 598f807f0d0caac98b81e0e2991f1bd497c4534e..b5d96fba65b0a195c04f29587e8b46f780a96ed3 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -112,6 +112,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -108,10 +108,10 @@ index 20122bf191ebc74c223310aea1f004fdbb163e57..e378e06b1d897f9a83d9f07c52ea5b2a try { byte[] data = new byte[payload.readableBytes()]; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 604ed1f6742a6b028b9db2809f7bd4b9a3b38f4d..b1201da0c81a632e247c6543cf533ad4d7998aeb 100644 +index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..aa8b663e35632c24fd04b6b2eeb14ef0d2f37898 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3283,4 +3283,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3287,4 +3287,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.spigot; } // Spigot end diff --git a/patches/server/0009-Allow-force-spawns.patch b/patches/server/0009-Allow-force-spawns.patch index e3d16f0a..ee336c10 100644 --- a/patches/server/0009-Allow-force-spawns.patch +++ b/patches/server/0009-Allow-force-spawns.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow force spawns Ported from EmpireCraft diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c1b03e4c37ea85ddf283479682d0eb2eca57ee3c..0375ad7ba6d79c7965e98766ba5cc337c044b93c 100644 +index 945783d090e44ebed1d4968c1d1ec0b68f6d494f..3bbd01f0ae1f190584bc302ba9a184ce04463ac3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1630,7 +1630,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -19,10 +19,10 @@ index c1b03e4c37ea85ddf283479682d0eb2eca57ee3c..0375ad7ba6d79c7965e98766ba5cc337 public void addDuringTeleport(Entity entity, CreatureSpawnEvent.SpawnReason reason) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 193ad79f57255b1ea4cf7930071b4f4988dc2b04..0dc72f3ef8e7cb42ab05a5327575726b990c73ae 100644 +index 5dc160b743534665c6b3efb10b10f7c36e2da5ab..62babfd61a2c8b50907ff456125d73c0b68819a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -754,7 +754,7 @@ public class CraftEventFactory { +@@ -756,7 +756,7 @@ public class CraftEventFactory { event = CraftEventFactory.callEntitySpawnEvent(entity); } diff --git a/patches/server/0010-Entity-dismount-reason-API.patch b/patches/server/0010-Entity-dismount-reason-API.patch index 46da83c4..8049c9ef 100644 --- a/patches/server/0010-Entity-dismount-reason-API.patch +++ b/patches/server/0010-Entity-dismount-reason-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Entity dismount reason API Ported from EmpireCraft diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0375ad7ba6d79c7965e98766ba5cc337c044b93c..f2f818d97a362854ecc681696387e7bff3c29373 100644 +index 3bbd01f0ae1f190584bc302ba9a184ce04463ac3..b20fc30f59129c633be774296761e7030130cffe 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -893,6 +893,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -26,7 +26,7 @@ index 0375ad7ba6d79c7965e98766ba5cc337c044b93c..f2f818d97a362854ecc681696387e7bf } } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e7ef3953dc8cc418f3e155f706f2ba851b5597a1..e4618f872a5bd32a7e54db18a104939995c262ec 100644 +index 11f4bff9d4679035140f7460800b243f2f50500f..f7ac1b2d499c67b998bbb444dc323dec8da1c3e7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1761,10 +1761,11 @@ public class ServerPlayer extends Player { @@ -59,10 +59,10 @@ index e7ef3953dc8cc418f3e155f706f2ba851b5597a1..e4618f872a5bd32a7e54db18a1049399 } else { this.setCamera(this); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 48d1444fbad1c57738807d0128b94160a5a17a4d..7ae30c6ad69d84859da14d6a5dc72ca2c76eca14 100644 +index 33abcf12b4426572b74ca4c813e4392c823494bc..12ef8abbaee35156847e94a257cd8f5ea20b808f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -621,6 +621,7 @@ public abstract class PlayerList { +@@ -642,6 +642,7 @@ public abstract class PlayerList { if (entity.hasExactlyOnePlayerPassenger()) { PlayerList.LOGGER.debug("Removing player mount"); @@ -71,18 +71,18 @@ index 48d1444fbad1c57738807d0128b94160a5a17a4d..7ae30c6ad69d84859da14d6a5dc72ca2 entity.getPassengersAndSelf().forEach((entity1) -> { // Paper start diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f520c80ef 100644 +index c5a5e6aa4f512b8343a7cac6bd9ab8b72fa4adb4..40ab1a292fbe8a220b4e9cbf4fa295d0be93f0c3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -534,6 +534,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -537,6 +537,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.teleportTo(worldserver, null); } // Paper end - make end portalling safe + public org.spigotmc.event.entity.EntityDismountEvent.DismountReason dismountReason; // Sapphire - public Entity(EntityType type, Level world) { - this.id = Entity.ENTITY_COUNTER.incrementAndGet(); -@@ -794,6 +795,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + public boolean isLegacyTrackingEntity = false; + +@@ -827,6 +828,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking this.feetBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { @@ -90,7 +90,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f this.stopRiding(); } -@@ -2882,6 +2884,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2894,6 +2896,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // Spigot end if (this.isPassenger()) { @@ -98,7 +98,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f this.stopRiding(); } -@@ -2903,6 +2906,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2915,6 +2918,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void ejectPassengers() { @@ -111,7 +111,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f for (int i = this.passengers.size() - 1; i >= 0; --i) { ((Entity) this.passengers.get(i)).stopRiding(); } -@@ -2953,6 +2962,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2965,6 +2974,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // Paper start protected boolean removePassenger(Entity entity) { return removePassenger(entity, false);} protected boolean removePassenger(Entity entity, boolean suppressCancellation) { // CraftBukkit @@ -120,7 +120,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f // Paper end if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); -@@ -2977,7 +2988,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2989,7 +3000,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // CraftBukkit end // Spigot start @@ -129,7 +129,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f // Suppress during worldgen if (this.valid) { Bukkit.getPluginManager().callEvent(event); -@@ -4772,7 +4783,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4784,7 +4795,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.stopRiding(); } @@ -144,7 +144,7 @@ index 505ed0f8f933428192f5fc806ff52d84acea7f99..0ed4cca2b04728826951bd081d0c2d0f // Paper start - Folia schedulers if (!(this instanceof ServerPlayer) && reason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7a9e034b80deb2c9d314f0e5d88783555e9f0a68..9e56e1afbdc33bedf3ed829d47b7a86335bab901 100644 +index dea64ea241f0a0e45b00d7a1d0625b5dbbbc4abf..85a999e350d4a1924a78ecc4ea2bac5bc53af2ea 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -451,6 +451,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -155,7 +155,7 @@ index 7a9e034b80deb2c9d314f0e5d88783555e9f0a68..9e56e1afbdc33bedf3ed829d47b7a863 this.stopRiding(); } } else if (this.getAirSupply() < this.getMaxAirSupply()) { -@@ -4315,6 +4316,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4312,6 +4313,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public void startSleeping(BlockPos pos) { if (this.isPassenger()) { @@ -164,10 +164,10 @@ index 7a9e034b80deb2c9d314f0e5d88783555e9f0a68..9e56e1afbdc33bedf3ed829d47b7a863 } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 4cb836dfa7cbd2e634d4a3a567da0305aac0da4d..99d0f1d447834575134b2f9c0a373c78ef2c38d2 100644 +index 944c22ea172796492a683d2f2bddfb0938d7a8c9..8f109231a39bdea4a89fde317fd72447892c1590 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1547,6 +1547,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1545,6 +1545,7 @@ public abstract class Mob extends LivingEntity implements Targeting { } if (this.isPassenger()) { @@ -176,7 +176,7 @@ index 4cb836dfa7cbd2e634d4a3a567da0305aac0da4d..99d0f1d447834575134b2f9c0a373c78 } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index d58b4c0dbe651b5068212e5f14dce3164ee520f5..b1b7c20c133d08a8421f5c764118e93e8e98569b 100644 +index 481c3e321cfc0f20bb1c4c6942b8bdbd23c06339..3c38f985f55ad21323bcb6ebfeac6e2d8315789a 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -524,6 +524,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0012-Include-kotlin-stdlib-in-server-jar.patch b/patches/server/0012-Include-kotlin-stdlib-in-server-jar.patch index a72bca9c..3db9e90c 100644 --- a/patches/server/0012-Include-kotlin-stdlib-in-server-jar.patch +++ b/patches/server/0012-Include-kotlin-stdlib-in-server-jar.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Include kotlin-stdlib in server jar diff --git a/build.gradle.kts b/build.gradle.kts -index 316663e83d09f15024de586651c37064b5752a71..761653acaebbc0788eb58051d6b9f6bcd50e3f84 100644 +index 9278a32ff2f8bbbd5631421a6aee8c7d63d11583..cc0f79c4037bb80fbf2c7ff4e2bd21080dd30161 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -56,6 +56,9 @@ dependencies { +@@ -55,6 +55,9 @@ dependencies { runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") -+ implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.10") // Sapphire -+ implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.10") // Sapphire ++ implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.20") // Sapphire ++ implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.20") // Sapphire + // Pufferfish start implementation("org.yaml:snakeyaml:1.32")