diff --git a/gradle.properties b/gradle.properties index 37d1b67..4581d2f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=org.galemc.gale version=1.21-R0.1-SNAPSHOT mcVersion=1.21 -paperRef=7eec21e80da15cb4b6fcb445910006e115729682 +paperRef=8c8b227547fa78b8f3295e4ac8ee066777e04e98 org.gradle.caching=false org.gradle.parallel=true diff --git a/patches/server/0005-Gale-branding-changes.patch b/patches/server/0005-Gale-branding-changes.patch index 0de76b2..64bf633 100644 --- a/patches/server/0005-Gale-branding-changes.patch +++ b/patches/server/0005-Gale-branding-changes.patch @@ -221,7 +221,7 @@ index 94a9ed024d3859793618152ea559a168bbcbb5e2..e60008693e017bec1b4eb49c84be3898 -. +. diff --git a/build.gradle.kts b/build.gradle.kts -index fc4e25d39c309e3be83e9a380eb6f5f0b58f5191..8f97350aac2f19a0d19e35630261dacc7b46ce52 100644 +index 525a2087472f6fba3552efb8eaf6f485f158802c..b6b99aff8940d62bf63cebf260faf7f923c0baed 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -89,14 +89,14 @@ tasks.jar { @@ -464,10 +464,10 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..2596e0ee4df5b96f181e28a742ef3459 @Override diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 68f60e77e0bfd42b6419491c1d59b6432974216b..1591b251f082eeeef6c86e3164570206ef82f6a8 100644 +index 330bee331335454a61cf8350a6654217c8124445..0cad1ba77b055c2665d1bec51d687294ccb88a88 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -966,7 +966,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return false; } : this::haveTime); -@@ -1261,7 +1227,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers @@ -328,7 +328,7 @@ index d0f72610b6a9e3e308f83f64d3468e48c6efd641..4307145528278b10efdc19d50b4814bc try { worldserver.timings.doTick.startTiming(); // Spigot worldserver.tick(shouldKeepTicking); -@@ -1747,17 +1694,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = Lists.newArrayListWithCapacity(this.chunkMap.size()); Iterator iterator = this.chunkMap.getChunks().iterator(); if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper -@@ -435,7 +423,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -436,7 +424,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } if (this.level.tickRateManager().runsNormally()) { @@ -712,7 +712,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a1 this.level.timings.countNaturalMobs.startTiming(); // Paper - timings int k = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns -@@ -464,7 +451,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -465,7 +452,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings this.lastSpawnState = spawnercreature_d; @@ -720,7 +720,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a1 boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit Util.shuffle(list, this.level.random); -@@ -499,7 +485,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -505,7 +491,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } this.level.timings.chunkTicks.stopTiming(); // Paper @@ -728,7 +728,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a1 if (flag) { try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); -@@ -507,14 +492,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -513,14 +498,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } } @@ -743,7 +743,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a1 } } -@@ -695,7 +677,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -701,7 +683,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @Override protected void doRunTask(Runnable task) { @@ -752,7 +752,7 @@ index 82e7f7c3c2f51bc135585f43bc5167bcde2f8a98..de485dd53a200bb53f3ba697c4eca3a1 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c869fc0fa90 100644 +index 152ac3595ae74f2b5dc5cacc72a539d16590d786..ac75bc19da217f7f2f5660345770ec89508ecc53 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -80,7 +80,6 @@ import net.minecraft.util.ProgressListener; @@ -763,7 +763,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 import net.minecraft.util.valueproviders.IntProvider; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; -@@ -502,15 +501,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -519,15 +518,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. // Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error @@ -784,7 +784,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 this.pathTypesByPosCache = new PathTypeCache(); this.navigatingMobs = new ObjectOpenHashSet(); this.blockEvents = new ObjectLinkedOpenHashSet(); -@@ -623,16 +624,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -640,16 +641,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. } public void tick(BooleanSupplier shouldKeepTicking) { @@ -801,7 +801,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 this.advanceWeatherCycle(); } -@@ -664,30 +661,23 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -681,30 +678,23 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. this.tickTime(); } @@ -832,7 +832,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 if (flag) { this.timings.doSounds.startTiming(); // Spigot this.runBlockEvents(); -@@ -695,7 +685,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -712,7 +702,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. } this.handlingTick = false; @@ -840,7 +840,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this if (flag1) { -@@ -703,12 +692,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -720,12 +709,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. } if (flag1 || this.emptyTime++ < 300) { @@ -853,7 +853,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 } org.spigotmc.ActivationRange.activateEntities(this); // Spigot -@@ -718,9 +704,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -735,9 +721,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed entity.discard(); } else if (!tickratemanager.isEntityFrozen(entity)) { @@ -863,7 +863,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - rewrite chunk system Entity entity1 = entity.getVehicle(); -@@ -732,22 +716,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -749,22 +733,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. entity.stopRiding(); } @@ -886,7 +886,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 } @Override -@@ -802,9 +781,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -819,9 +798,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. boolean flag = this.isRaining(); int j = chunkcoordintpair.getMinBlockX(); int k = chunkcoordintpair.getMinBlockZ(); @@ -896,7 +896,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); -@@ -833,8 +810,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -850,8 +827,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. } } @@ -905,7 +905,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow for (int l = 0; l < randomTickSpeed; ++l) { if (this.random.nextInt(48) == 0) { -@@ -843,7 +818,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -860,7 +835,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. } } // Paper - Option to disable ice and snow @@ -913,7 +913,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 timings.chunkTicksBlocks.startTiming(); // Paper if (randomTickSpeed > 0) { LevelChunkSection[] achunksection = chunk.getSections(); -@@ -858,7 +832,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -875,7 +849,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. for (int l1 = 0; l1 < randomTickSpeed; ++l1) { BlockPos blockposition1 = this.getBlockRandomPos(j, k1, k, 15); @@ -921,7 +921,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 BlockState iblockdata = chunksection.getBlockState(blockposition1.getX() - j, blockposition1.getY() - k1, blockposition1.getZ() - k); if (iblockdata.isRandomlyTicking()) { -@@ -871,14 +844,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -888,14 +861,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. fluid.randomTick(this, blockposition1, this.random); } @@ -936,7 +936,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 } @VisibleForTesting -@@ -1177,19 +1148,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1204,19 +1175,13 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. try { // Paper end - timings entity.setOldPosAndRot(); @@ -956,7 +956,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 } finally { timer.stopTiming(); } // Paper - timings Iterator iterator = entity.getPassengers().iterator(); -@@ -1212,12 +1177,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1239,12 +1204,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. // Paper end passenger.setOldPosAndRot(); ++passenger.tickCount; @@ -969,7 +969,7 @@ index 11f0017a8557f7528e379285bbb55e37c533463f..186c5eb85bb0807d49f8ad35a4a08c86 // Paper start - EAR 2 if (isActive) { passenger.rideTick(); -@@ -1229,7 +1189,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1256,7 +1216,6 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. vehicle.positionRider(passenger); } // Paper end - EAR 2 @@ -1777,7 +1777,7 @@ index bff83fe413c7baef4ba56a3270ea4463a58c792f..807964a19ac15717715c9a92aeefadbe if (this.fire) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157a4cc8cbf 100644 +index e27f118ff2f49234dee68bb89086d7f9d5e62130..93c2c9f06fb6e2c8b1c5af50b81ed68a4638027c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -132,7 +132,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @@ -1804,7 +1804,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 final List ret = new java.util.ArrayList<>(); ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate); -@@ -262,7 +259,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -267,7 +264,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } // Paper end - rewrite chunk system @@ -1813,7 +1813,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration -@@ -277,7 +274,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -282,7 +279,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } // CraftBukkit end @@ -1821,7 +1821,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 this.levelData = worlddatamutable; this.dimensionTypeRegistration = holder; final DimensionType dimensionmanager = (DimensionType) holder.value(); -@@ -941,9 +937,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -946,9 +942,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } protected void tickBlockEntities() { @@ -1831,7 +1831,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 this.timings.tileEntityPending.startTiming(); // Spigot this.tickingBlockEntities = true; if (!this.pendingBlockEntityTickers.isEmpty()) { -@@ -979,7 +972,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -989,7 +982,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl this.timings.tileEntityTick.stopTiming(); // Spigot this.tickingBlockEntities = false; co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper @@ -1839,7 +1839,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1183,7 +1175,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1194,7 +1186,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl @Override public List getEntities(@Nullable Entity except, AABB box, Predicate predicate) { @@ -1847,7 +1847,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 // Paper start - rewrite chunk system final List ret = new java.util.ArrayList<>(); -@@ -1209,8 +1200,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1220,8 +1211,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl public void getEntities(final EntityTypeTest entityTypeTest, final AABB boundingBox, final Predicate predicate, final List into, final int maxCount) { @@ -1856,7 +1856,7 @@ index 676969f0a0fe21dae1c30d63a8bb4b0e9b33d057..607388409c0ac63d8e4f05d2be39e157 if (entityTypeTest instanceof net.minecraft.world.entity.EntityType byType) { if (maxCount != Integer.MAX_VALUE) { ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getEntities(byType, boundingBox, into, predicate, maxCount); -@@ -1504,11 +1493,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1515,11 +1504,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } public ProfilerFiller getProfiler() { diff --git a/patches/server/0033-Inline-level-height.patch b/patches/server/0033-Inline-level-height.patch index 9309ca3..4b322ae 100644 --- a/patches/server/0033-Inline-level-height.patch +++ b/patches/server/0033-Inline-level-height.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index d7a638680fa349caba43f07ab9e6e4fa7303fb48..13b38b21d0425527e1a83e655e6be4bd6c5c2a02 100644 +index 93c2c9f06fb6e2c8b1c5af50b81ed68a4638027c..f489b74217b5cab017cbcade7e19fb7b8ec94f7c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -259,6 +259,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -264,6 +264,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } // Paper end - rewrite chunk system @@ -50,7 +50,7 @@ index d7a638680fa349caba43f07ab9e6e4fa7303fb48..13b38b21d0425527e1a83e655e6be4bd protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config & Anti-Xray // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config -@@ -278,6 +287,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -283,6 +292,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl this.dimensionTypeRegistration = holder; final DimensionType dimensionmanager = (DimensionType) holder.value(); diff --git a/patches/server/0037-Remove-lambda-from-ticking-guard.patch b/patches/server/0037-Remove-lambda-from-ticking-guard.patch index eb427ad..9f90696 100644 --- a/patches/server/0037-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0037-Remove-lambda-from-ticking-guard.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 186c5eb85bb0807d49f8ad35a4a08c869fc0fa90..585f3ff427440b44a9d2c186bd0054d6d4e65ae8 100644 +index ac75bc19da217f7f2f5660345770ec89508ecc53..466315a6171c8962bd23fb5e2aaafbbbcc0479bd 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -716,7 +716,20 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -733,7 +733,20 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. entity.stopRiding(); } @@ -57,10 +57,10 @@ index 186c5eb85bb0807d49f8ad35a4a08c869fc0fa90..585f3ff427440b44a9d2c186bd0054d6 } } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7de579a46300b94a4bf29f13e074cc365e384b99..85a16978a80d8b6a3f0df65eb4eb3a06b4b3c0af 100644 +index f489b74217b5cab017cbcade7e19fb7b8ec94f7c..09852f93fc200a971bd4db5212646d29db663161 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -995,12 +995,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1005,12 +1005,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl try { tickConsumer.accept(entity); } catch (Throwable throwable) { @@ -74,4 +74,4 @@ index 7de579a46300b94a4bf29f13e074cc365e384b99..85a16978a80d8b6a3f0df65eb4eb3a06 + entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Gale - Airplane - remove lambda from ticking guard - diff on change ServerLevel#tick // Paper end - Prevent block entity and entity crashes } - } + this.moonrise$midTickTasks(); // Paper - rewrite chunk system diff --git a/patches/server/0072-Reduce-array-allocations.patch b/patches/server/0072-Reduce-array-allocations.patch index 78b2db2..627652b 100644 --- a/patches/server/0072-Reduce-array-allocations.patch +++ b/patches/server/0072-Reduce-array-allocations.patch @@ -573,10 +573,10 @@ index 7c3e561f2ca2522ab8336487c0307e1b69a397a8..a7ee93c0d94be3bb6c8ea8e8ca7f8abf String[] strings = new String[pattern.size() - l - k]; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 85a16978a80d8b6a3f0df65eb4eb3a06b4b3c0af..beedd65eafc386ca9644b149c91f8247a85898e0 100644 +index 09852f93fc200a971bd4db5212646d29db663161..2fa7260811cc8946da1405a724cf44fb75a24489 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1276,7 +1276,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1287,7 +1287,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) { ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ); if (slices == null) { diff --git a/patches/server/0097-Reduce-block-destruction-packet-allocations.patch b/patches/server/0097-Reduce-block-destruction-packet-allocations.patch index 8688eb6..422f705 100644 --- a/patches/server/0097-Reduce-block-destruction-packet-allocations.patch +++ b/patches/server/0097-Reduce-block-destruction-packet-allocations.patch @@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 585f3ff427440b44a9d2c186bd0054d6d4e65ae8..02d870e451b7eb1cff89a97fee7530b667affd50 100644 +index 466315a6171c8962bd23fb5e2aaafbbbcc0479bd..09949bcea0b1c22e9da5979ce88909f440a22dd5 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1480,7 +1480,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1507,7 +1507,17 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @Override public void destroyBlockProgress(int entityId, BlockPos pos, int progress) { @@ -35,7 +35,7 @@ index 585f3ff427440b44a9d2c186bd0054d6d4e65ae8..02d870e451b7eb1cff89a97fee7530b6 // CraftBukkit start Player entityhuman = null; -@@ -1514,7 +1524,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -1541,7 +1551,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. // CraftBukkit end if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { diff --git a/patches/server/0108-Skip-unnecessary-mob-spawning-computations.patch b/patches/server/0108-Skip-unnecessary-mob-spawning-computations.patch index 5c62f1b..c1a7680 100644 --- a/patches/server/0108-Skip-unnecessary-mob-spawning-computations.patch +++ b/patches/server/0108-Skip-unnecessary-mob-spawning-computations.patch @@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index de485dd53a200bb53f3ba697c4eca3a164452bfd..8367edebdfa2f022bcda1ec2b0e7881285d8bb9c 100644 +index ebae8578a2d0dfd0d329861f45d0f278fea1dd85..280fc455064dcc08ffaaceb8336ed0aada2c8d11 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -423,11 +423,16 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -424,11 +424,16 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } if (this.level.tickRateManager().runsNormally()) { @@ -34,7 +34,7 @@ index de485dd53a200bb53f3ba697c4eca3a164452bfd..8367edebdfa2f022bcda1ec2b0e78812 if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled // re-set mob counts for (ServerPlayer player : this.level.players) { -@@ -451,7 +456,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -452,7 +457,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings this.lastSpawnState = spawnercreature_d; @@ -47,7 +47,7 @@ index de485dd53a200bb53f3ba697c4eca3a164452bfd..8367edebdfa2f022bcda1ec2b0e78812 Util.shuffle(list, this.level.random); // Paper start - PlayerNaturallySpawnCreaturesEvent -@@ -474,7 +483,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -475,7 +484,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon if (this.level.isNaturalSpawningAllowed(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair)) { chunk1.incrementInhabitedTime(j); @@ -56,7 +56,7 @@ index de485dd53a200bb53f3ba697c4eca3a164452bfd..8367edebdfa2f022bcda1ec2b0e78812 NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); } -@@ -500,6 +509,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -506,6 +515,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } } diff --git a/patches/server/0114-5-second-TPS-average.patch b/patches/server/0114-5-second-TPS-average.patch index b876ea2..bf3bf88 100644 --- a/patches/server/0114-5-second-TPS-average.patch +++ b/patches/server/0114-5-second-TPS-average.patch @@ -59,10 +59,10 @@ index 039a86034928a5eb7aaa2d7ca76a7bddcca346bd..7c32c60100cf2bd109eb8762efa856c1 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4307145528278b10efdc19d50b4814bc5218b4ff..f8909886e6c1e4c64fd674b8a19b0cc6242160cb 100644 +index 3361ad2c93dfc1c8e3aad53ca4f4c8d96b834395..5b2113a3a48551aecd20e46b8c6a1eb71ff8f47b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1085,6 +1085,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop