diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index ed63e02..e53870c 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -1,8 +1,9 @@ name: Automatically update Paper commit hash on: workflow_dispatch: {} - schedule: - - cron: "0 0 * * *" + # Paper did not release a ver/1.21.3 branch, so we need to disable it manually + # schedule: + # - cron: "0 0 * * *" jobs: build: runs-on: ubuntu-latest diff --git a/gradle.properties b/gradle.properties index a847228..ed1c7f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=net.sparklypower.sparklypaper version=1.21.3-R0.1-SNAPSHOT mcVersion=1.21.3 -paperRef=5403894bd447327d4bc0c8495b1ed371e0980a29 +paperRef=da7138233f6392e791d790d1c3407414c855f9c2 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0004-SPARKLYPOWER-Add-custom-blocks.patch b/patches/api/0004-SPARKLYPOWER-Add-custom-blocks.patch index 6f77214..a086f72 100644 --- a/patches/api/0004-SPARKLYPOWER-Add-custom-blocks.patch +++ b/patches/api/0004-SPARKLYPOWER-Add-custom-blocks.patch @@ -33,7 +33,7 @@ index 41eaa8159f8c028faa118300e95f6a0fb9cfe989..5b5ddb19b39d5201da422f9b10e2491a /** diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index c7ce8fa1ff9feda66d5a4e497112a24ff51c9d2b..b121cf287460b9256eb6c26fae98d831b9bc7eea 100644 +index 028ac35df6c4d044d07b3869751736d418c1eb0e..dd9795e0725275b0fe5a3f4ecfd4d587a23f963f 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -3843,6 +3843,22 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla @@ -57,5 +57,5 @@ index c7ce8fa1ff9feda66d5a4e497112a24ff51c9d2b..b121cf287460b9256eb6c26fae98d831 + SPARKLYPOWER_ASPHALT_PLAYER_SLAB(13009, Slab.class), + // SparklyPaper end // ----- Legacy Separator ----- - @Deprecated + @Deprecated(since = "1.13") LEGACY_AIR(0, 0), diff --git a/patches/server/0008-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch b/patches/server/0008-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch index c95737f..dbafeb4 100644 --- a/patches/server/0008-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch +++ b/patches/server/0008-Skip-EntityScheduler-s-executeTick-checks-if-there-i.patch @@ -73,7 +73,7 @@ index c03608fec96b51e1867f43d8f42e5aefb1520e46..15b21fa3907db1b77ed5b5d1050a37f4 throw new IllegalStateException("Ticking retired scheduler"); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c26e3a239441376f2694782d4f07943538677c71..114b379bb3a56099dbd4e4bf11f6a1b7ddc488f7 100644 +index 4158473fd553a16fec23bcbcf9a278d413120600..8cc953b72a7132a92390ab1f5e62b267d08e706a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -333,7 +333,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> { // Paper - rewrite chunk system -@@ -1803,6 +1804,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { for (final Entity entity : level.getEntities().getAll()) { if (entity.isRemoved()) { -@@ -1814,6 +1827,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1865,50 +1799,71 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> oldLevels = this.levels; Map, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels); newLevels.remove(level.dimension()); @@ -905,7 +905,7 @@ index e49e8e98ebbd3c8ba8a784f1626132699209b4e3..d952d42b8faee38f9d55fe578c030891 // SparklyPaper start - Spooky month optimizations halloweenManager.startHalloweenEpochTask(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8de30b5dff3dc0e30f1a56303abcb31df8f85c9f..b3917c319c32eb9926418f788faf4adecf40a09a 100644 +index ba899bcf05b967db784b7435895d6ff7b72b40f2..f750d015bf8ffb533713f298a9d1df13de60693e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -200,7 +200,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -1022,7 +1022,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..f58331b6be3a26e76082d16894d3eb4d // Paper end - Inventory close reason this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 30de3d1a7792c38ae946f19cb0e14637919b5001..0ea2d2b32aacdbfca80c0c626520bd863601bbd2 100644 +index 1a956249828156fdc273888de59128c3d1a0b898..6484a87853eb2a907f729365edadc39e87e395bb 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -137,7 +137,7 @@ public abstract class PlayerList { @@ -1505,10 +1505,10 @@ index 84f4664950e0cef7bd823bfc74f37cefce620d9e..b0c3b64da7aed676a5614c442948bbe9 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc667312e5 100644 +index 57da11c0da7322e74810e7108e9c8000b0c36520..71709c8a8c5cec6403ec92badde412427c8f276b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -458,7 +458,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -459,7 +459,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { } private boolean unloadChunk0(int x, int z, boolean save) { @@ -1517,7 +1517,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc if (!this.isChunkLoaded(x, z)) { return true; } -@@ -481,6 +481,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -482,6 +482,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!unloadChunk0(x, z, false)) { return false; } @@ -1525,7 +1525,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc warnUnsafeChunk("regenerating a faraway chunk", x, z); // Paper final long chunkKey = ChunkCoordIntPair.pair(x, z); -@@ -502,6 +503,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -503,6 +504,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -1533,7 +1533,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; -@@ -562,7 +564,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -563,7 +565,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { @@ -1542,7 +1542,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc warnUnsafeChunk("loading a faraway chunk", x, z); // Paper ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper -@@ -814,6 +816,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -815,6 +817,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) { @@ -1550,7 +1550,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc this.world.captureTreeGeneration = true; this.world.captureBlockStates = true; boolean grownTree = this.generateTree(loc, type); -@@ -929,6 +932,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -930,6 +933,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { } public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source, Consumer configurator) { // Paper end - expand explosion API @@ -1558,7 +1558,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc net.minecraft.world.level.Level.ExplosionInteraction explosionType; if (!breakBlocks) { explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks -@@ -1020,6 +1024,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1021,6 +1025,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -1566,7 +1566,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc warnUnsafeChunk("getting a faraway chunk", x >> 4, z >> 4); // Paper // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); -@@ -1050,6 +1055,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1051,6 +1056,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setBiome(int x, int y, int z, Holder bb) { BlockPos pos = new BlockPos(x, 0, z); @@ -1574,7 +1574,7 @@ index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..12f780b349e825747c2441d9636ae1dc if (this.world.hasChunkAt(pos)) { net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos); -@@ -2322,6 +2328,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2327,6 +2333,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) { diff --git a/patches/server/0024-Fix-getMaxHeight-to-be-exclusive-instead-of-inclusiv.patch b/patches/server/0024-Fix-getMaxHeight-to-be-exclusive-instead-of-inclusiv.patch deleted file mode 100644 index dafe3f2..0000000 --- a/patches/server/0024-Fix-getMaxHeight-to-be-exclusive-instead-of-inclusiv.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrPowerGamerBR -Date: Wed, 27 Nov 2024 02:26:32 -0300 -Subject: [PATCH] Fix getMaxHeight to be exclusive instead of inclusive to - match docs - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 12f780b349e825747c2441d9636ae1dc667312e5..41df2df1be37af38d96ee6d26bdb7a10efaf9681 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1544,7 +1544,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { - - @Override - public int getMaxHeight() { -- return this.world.getMaxY(); -+ return this.world.getMaxY() + 1; // Paper - Fix getMaxHeight to be exclusive instead of inclusive - } - - @Override diff --git a/patches/server/0025-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch b/patches/server/0024-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch similarity index 100% rename from patches/server/0025-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch rename to patches/server/0024-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch diff --git a/patches/server/0026-SPARKLYPOWER-Add-custom-blocks.patch b/patches/server/0025-SPARKLYPOWER-Add-custom-blocks.patch similarity index 100% rename from patches/server/0026-SPARKLYPOWER-Add-custom-blocks.patch rename to patches/server/0025-SPARKLYPOWER-Add-custom-blocks.patch