diff --git a/gradle.properties b/gradle.properties index f38476f5..8f40ec49 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group=org.leavesmc.leaves version=1.21.3-R0.1-SNAPSHOT mcVersion=1.21.3 -paperRef=27e4ddcd067d4825eb01cb05d6975c46252eeafa +paperRef=da7138233f6392e791d790d1c3407414c855f9c2 preVersion=true org.gradle.jvmargs=-Xmx2G org.gradle.caching=true diff --git a/patches/api/0002-Add-isShrink-to-EntityResurrectEvent.patch b/patches/api/0002-Add-isShrink-to-EntityResurrectEvent.patch index b59b2563..6b9618fa 100644 --- a/patches/api/0002-Add-isShrink-to-EntityResurrectEvent.patch +++ b/patches/api/0002-Add-isShrink-to-EntityResurrectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent diff --git a/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java b/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java -index 2f6ad5c2fc7ae7cf22cb424df3543c24f3ee6ebe..379237368070555890f07e71b003d2c42d8ab2b0 100644 +index 372825dc8ae52983f0e8ff2fd80e02887f0044ad..2a598f7dc7de0be7a83a4f7a52ec22c42f417c71 100644 --- a/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityResurrectEvent.java @@ -15,19 +15,43 @@ import org.jetbrains.annotations.Nullable; @@ -30,7 +30,7 @@ index 2f6ad5c2fc7ae7cf22cb424df3543c24f3ee6ebe..379237368070555890f07e71b003d2c4 + this(what, hand, true); + } + - @Deprecated + @Deprecated(since = "1.19.2") public EntityResurrectEvent(@NotNull LivingEntity what) { - this(what, null); + this(what, null, true); diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index f2c3d8ec..51fe86a5 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -197,10 +197,10 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..c060857cb0551fff8f5033553b887f3a private static final String BUILD_DEV = "DEV"; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 780582ebaa8deb0c0b0c8de17de5abcebafa4bd3..5201b1aaedabdf6021ea9ac3f84be70a6d03aa8f 100644 +index 4158473fd553a16fec23bcbcf9a278d413120600..9af88810bc722d7cb6d00db5b239ad3e55df53c1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1263,7 +1263,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> optional = PoiTypes.forState(oldBlock); -@@ -2685,6 +2693,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2693,6 +2701,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true if (entity instanceof ServerPlayer entityplayer) { ServerLevel.this.players.add(entityplayer); @@ -192,7 +192,7 @@ index 1d3f8b2c040b64e0f8548409a731d7f47d127f2c..1b1350485ba333e9bda048b01273de97 ServerLevel.this.updateSleepingPlayerList(); } -@@ -2762,6 +2775,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2770,6 +2783,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ServerLevel.this.getChunkSource().removeEntity(entity); if (entity instanceof ServerPlayer entityplayer) { ServerLevel.this.players.remove(entityplayer); @@ -270,7 +270,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..ebae6c704844755c75aa0c6f460603c5 PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level().getCraftServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 9b1645cf1fa47b8d7592c7eda4a4497ad9d6bbf8..9b3fbc13779ded07c696e151772d834ff8d61a7d 100644 +index e0eb02f60fd29610c7c5fde1123801ed890bd903..bc8764fcf0aedcf11d4826738a89300262cf299c 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -124,6 +124,8 @@ import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason; @@ -556,10 +556,10 @@ index 3435629606def598ca998fb41ef303677c4cbea4..26ef09c86315c1125167af044323dbd3 + // Leaves end - Bot API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..df51d6d7909d407d8dcdbe1bfc5ca3a423005d5c 100644 +index 57da11c0da7322e74810e7108e9c8000b0c36520..d47bab785d7be71155c964ef13e839768797c9cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -241,7 +241,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -242,7 +242,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getPlayerCount() { @@ -568,7 +568,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..df51d6d7909d407d8dcdbe1bfc5ca3a4 } @Override -@@ -1285,9 +1285,9 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1286,9 +1286,9 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public List getPlayers() { @@ -580,7 +580,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..df51d6d7909d407d8dcdbe1bfc5ca3a4 HumanEntity bukkitEntity = human.getBukkitEntity(); if ((bukkitEntity != null) && (bukkitEntity instanceof Player)) { -@@ -1960,7 +1960,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1965,7 +1965,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void playSound(final net.kyori.adventure.sound.Sound sound) { org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper final long seed = sound.seed().orElseGet(this.world.getRandom()::nextLong); @@ -589,7 +589,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..df51d6d7909d407d8dcdbe1bfc5ca3a4 player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player.getX(), player.getY(), player.getZ(), seed, null)); } } -@@ -1988,7 +1988,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1993,7 +1993,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper final long seed = sound.seed().orElseGet(this.getHandle().getRandom()::nextLong); if (emitter == net.kyori.adventure.sound.Sound.Emitter.self()) { @@ -598,7 +598,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..df51d6d7909d407d8dcdbe1bfc5ca3a4 player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player, seed, null)); } } else if (emitter instanceof CraftEntity craftEntity) { -@@ -2212,7 +2212,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2217,7 +2217,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType()); } this.getHandle().sendParticles( diff --git a/patches/server/0022-Config-to-disable-method-profiler.patch b/patches/server/0022-Config-to-disable-method-profiler.patch index 9700fefd..9be611da 100644 --- a/patches/server/0022-Config-to-disable-method-profiler.patch +++ b/patches/server/0022-Config-to-disable-method-profiler.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Config to disable method profiler This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f0d2c8bc40b36e6d638ad418963289ac2737f5a0..feaf9b26c12f4da94aedfdab7362c8d94c7a72eb 100644 +index 186813428916c93545b7bad706b8584a4e338627..10d56397dbdf98668489b6968dc66ff138aa9d5f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1321,7 +1321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= i) { return (List) object; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 98d1e4c934e25e5c0dfe844e6aa3dd236d411da0..585d5d98abbd0a9842bef5d5cff24f8429f378d9 100644 +index 21a8c087dfe93ff6570d17e2757fe4c2250b3245..94c239ccf8d5ebca84810509abd13db1badfe008 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1775,7 +1775,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop !playerList.isOp(player.getGameProfile())) .map(player -> player.getGameProfile().getName()), diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a88ca4aaaca3c9e6370bba7e6fbdb0f57c6065f7..6952bd0b9229aa2c1c4db5d5659c315374e927a9 100644 +index f1a570b1eb25f2cbe83ce31a59ebfc26887add76..4ff490f7fcf574d0c42a2e1c2773ccf85a80fdb9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2712,7 +2712,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2720,7 +2720,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (entity instanceof ServerPlayer entityplayer) { ServerLevel.this.players.add(entityplayer); // Leaves start - skip @@ -159,7 +159,7 @@ index a88ca4aaaca3c9e6370bba7e6fbdb0f57c6065f7..6952bd0b9229aa2c1c4db5d5659c3153 ServerLevel.this.realPlayers.add(entityplayer); } // Leaves end - skip -@@ -2794,7 +2794,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2802,7 +2802,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (entity instanceof ServerPlayer entityplayer) { ServerLevel.this.players.remove(entityplayer); // Leaves start - skip @@ -169,7 +169,7 @@ index a88ca4aaaca3c9e6370bba7e6fbdb0f57c6065f7..6952bd0b9229aa2c1c4db5d5659c3153 } // Leaves end - skip diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index aa864ac20bb3d0ddef8376768bf5921e81eb9597..0a88fb90b72e9f4bda6067cb42e024bb44b5101b 100644 +index 0d64e38f37f471de62d093de092ec5c0975f10ee..13dea31c8232cdb08aff09627e84711d2ef0aa6b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -125,6 +125,7 @@ import org.bukkit.event.player.PlayerSpawnChangeEvent; @@ -436,7 +436,7 @@ index dea387f418cd173980be2e6e24797b55f9f58409..3e230983586f044c3a5e021fc8e27f6b // Special case complex part, since there is no extra entity type for them if (entity instanceof EnderDragonPart complexPart) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 554714e449d1d2439b05d7e15f72afccd17d4df5..08de38dfc4b2f6f48e9f3ae1d303712ea619e21f 100644 +index d4e497961578bb693275cdf95915b60b2cc76eb7..d0132751fb057dc29e13ae3489beedb580225fa7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2259,7 +2259,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0105-Servux-Protocol.patch b/patches/server/0105-Servux-Protocol.patch index a10da9ac..996146c7 100644 --- a/patches/server/0105-Servux-Protocol.patch +++ b/patches/server/0105-Servux-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Servux Protocol diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6952bd0b9229aa2c1c4db5d5659c315374e927a9..e663b795f8656745ba27b24bb136491dab96c22d 100644 +index 4ff490f7fcf574d0c42a2e1c2773ccf85a80fdb9..cf53a0f9a8c9827ec4f6a52a13c872f1b0f1e1f0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2162,6 +2162,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2170,6 +2170,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } this.lastSpawnChunkRadius = i; diff --git a/patches/server/0110-Fast-resume.patch b/patches/server/0110-Fast-resume.patch index eb1b9417..208f0e93 100644 --- a/patches/server/0110-Fast-resume.patch +++ b/patches/server/0110-Fast-resume.patch @@ -59,7 +59,7 @@ index 91a6f57f35fc1553159cca138a0619e703b2b014..32a6f6e0d05ab43e1d5b48c45e55119d return this.removeTicketAtLevel(type, CoordinateUtils.getChunkKey(chunkPos), level, identifier); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 585d5d98abbd0a9842bef5d5cff24f8429f378d9..96ca6702fa67e1d26d39367d0fe64a508787998e 100644 +index 94c239ccf8d5ebca84810509abd13db1badfe008..1ca8771eb18c04d14c69b08554f0e697b29a0347 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -766,6 +766,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop