diff --git a/leaf-server/minecraft-patches/features/0048-Cache-player-profileResult.patch b/leaf-server/minecraft-patches/features/0048-Cache-player-profileResult.patch deleted file mode 100644 index 5b903ec9..00000000 --- a/leaf-server/minecraft-patches/features/0048-Cache-player-profileResult.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Thu, 28 Mar 2024 13:36:09 -0400 -Subject: [PATCH] Cache player profileResult - -This patch includes code that references the Caffeine caching library, -which is licensed under the Apache License, Version 2.0. - -Caffeine (https://github.com/ben-manes/caffeine) -Copyright (c) Ben Manes - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 069477e524a28b20a0289221858bdc802704a890..114b25f933c6a1b011523581a5a02a5a2c1e827e 100644 ---- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -71,6 +71,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - private net.minecraft.server.level.ServerPlayer player; // CraftBukkit - public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding - private int velocityLoginMessageId = -1; // Paper - Add Velocity IP Forwarding Support -+ // Leaf start - Cache player profileResult -+ private static final com.github.benmanes.caffeine.cache.Cache playerProfileResultCache = com.github.benmanes.caffeine.cache.Caffeine.newBuilder() -+ .expireAfterWrite(org.dreeam.leaf.config.modules.misc.Cache.cachePlayerProfileResultTimeout, java.util.concurrent.TimeUnit.MINUTES) -+ .build(); -+ private static final com.github.benmanes.caffeine.cache.Cache playerSession = com.github.benmanes.caffeine.cache.Caffeine.newBuilder() -+ .expireAfterWrite(org.dreeam.leaf.config.modules.misc.Cache.cachePlayerProfileResultTimeout, java.util.concurrent.TimeUnit.MINUTES) -+ .build(); -+ // Leaf end - Cache player profileResult - - public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection, boolean transferred) { - this.server = server; -@@ -304,9 +312,30 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - String string1 = Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized"); - - try { -- ProfileResult profileResult = ServerLoginPacketListenerImpl.this.server -- .getSessionService() -- .hasJoinedServer(string1, string, this.getAddress()); -+ // Leaf start - Cache player profileResult -+ ProfileResult profileResult; -+ if (org.dreeam.leaf.config.modules.misc.Cache.cachePlayerProfileResult) { -+ profileResult = playerProfileResultCache.getIfPresent(string1); -+ -+ InetAddress address = this.getAddress(); -+ InetAddress lastAddress = playerSession.getIfPresent(string1); -+ if (isInvalidSession(address, lastAddress)) { -+ // Send request to mojang server to verify session -+ // Result will be null if is invalid and will do disconnect logic below -+ profileResult = ServerLoginPacketListenerImpl.this.server -+ .getSessionService() -+ .hasJoinedServer(string1, string, address); -+ if (profileResult != null && address != null) { -+ playerProfileResultCache.put(string1, profileResult); -+ playerSession.put(string1, address); -+ } -+ } -+ } else { -+ profileResult = ServerLoginPacketListenerImpl.this.server -+ .getSessionService() -+ .hasJoinedServer(string1, string, this.getAddress()); -+ } -+ // Leaf end - Cache player profileResult - if (profileResult != null) { - GameProfile gameProfile = profileResult.profile(); - // CraftBukkit start - fire PlayerPreLoginEvent -@@ -351,6 +380,20 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - // Paper end - Cache authenticator threads - } - -+ // Leaf start - Cache player profileResult -+ private static boolean isInvalidSession(@org.jetbrains.annotations.Nullable InetAddress currAddress, @org.jetbrains.annotations.Nullable InetAddress lastAddress) { -+ // Invalid address or non-public IP address -+ if (currAddress == null || -+ currAddress.isAnyLocalAddress() || -+ currAddress.isLinkLocalAddress() || -+ currAddress.isLoopbackAddress() || -+ currAddress.isSiteLocalAddress()) { -+ return true; -+ } -+ return !currAddress.equals(lastAddress); -+ } -+ // Leaf end - Cache player profileResult -+ - // CraftBukkit start - private GameProfile callPlayerPreLoginEvents(GameProfile gameprofile) throws Exception { // Paper - Add more fields to AsyncPlayerPreLoginEvent - // Paper start - Add Velocity IP Forwarding Support diff --git a/leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed.patch b/leaf-server/minecraft-patches/features/0048-Matter-Secure-Seed.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed.patch rename to leaf-server/minecraft-patches/features/0048-Matter-Secure-Seed.patch index 6278be9a..598bb8fc 100644 --- a/leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed.patch +++ b/leaf-server/minecraft-patches/features/0048-Matter-Secure-Seed.patch @@ -36,7 +36,7 @@ index 5748658abf0b90812005ae9d426df92daf5532f0..4a0eed7d7645ed539857592d233214e9 this.get("generator-settings", property -> GsonHelper.parse(!property.isEmpty() ? property : "{}"), new JsonObject()), this.get("level-type", property -> property.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString()) diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 54895ed9ad9b9b2c4c12cfcce89af453c430e3e6..721d89144074c5749642feb0a08d21fbcce4b2fe 100644 +index c49eced5b0187bcec1d8d7543f63f1294e25ee44..32005b9d01169c6ad391a66101fdf26edb02fabc 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -710,6 +710,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -48,7 +48,7 @@ index 54895ed9ad9b9b2c4c12cfcce89af453c430e3e6..721d89144074c5749642feb0a08d21fb } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f8bd39ddd7b6948734254acfb8b0235eff774133..3c92508724bd2c8244ee4591c6b00b01657216f2 100644 +index 7eff4de2a491033d84a192c96af1fc2942845e37..e413e8e68d162d7296180bbe65ed73b29ffb11ac 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -633,6 +633,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe diff --git a/leaf-server/minecraft-patches/features/0050-Matter-Secure-Seed-command.patch b/leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed-command.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0050-Matter-Secure-Seed-command.patch rename to leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed-command.patch diff --git a/leaf-server/minecraft-patches/features/0051-Faster-random-generator.patch b/leaf-server/minecraft-patches/features/0050-Faster-random-generator.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0051-Faster-random-generator.patch rename to leaf-server/minecraft-patches/features/0050-Faster-random-generator.patch index 6e5d78c8..8f059e43 100644 --- a/leaf-server/minecraft-patches/features/0051-Faster-random-generator.patch +++ b/leaf-server/minecraft-patches/features/0050-Faster-random-generator.patch @@ -14,7 +14,7 @@ ThreadUnsafeRandom (Moonrise): 102,265,100 ns SimpleThreadUnsafeRandom (Moonrise): 97,054,600 ns diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 4070a6eb52f6097e38c2d85c231d39ea3785cf46..bb76dbf98979fdc725676c98dafe64ea941cb290 100644 +index 32005b9d01169c6ad391a66101fdf26edb02fabc..20388a43937a460f817c7186d2acbc0c1beee78c 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -150,7 +150,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -27,7 +27,7 @@ index 4070a6eb52f6097e38c2d85c231d39ea3785cf46..bb76dbf98979fdc725676c98dafe64ea final ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkData chunkData = ((ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkSystemChunkHolder)((ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkSystemLevelChunk)levelChunk).moonrise$getChunkAndHolder().holder()) .moonrise$getRealChunkHolder().holderData; diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 3c92508724bd2c8244ee4591c6b00b01657216f2..0290e1f0c45677d337f77a0c8269894b32a43ca9 100644 +index e413e8e68d162d7296180bbe65ed73b29ffb11ac..275b640f4536366152f59acf071dd4eba15696c8 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -902,7 +902,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe diff --git a/leaf-server/minecraft-patches/features/0052-Don-t-save-primed-tnt-entity.patch b/leaf-server/minecraft-patches/features/0051-Don-t-save-primed-tnt-entity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0052-Don-t-save-primed-tnt-entity.patch rename to leaf-server/minecraft-patches/features/0051-Don-t-save-primed-tnt-entity.patch diff --git a/leaf-server/minecraft-patches/features/0053-Don-t-save-falling-block-entity.patch b/leaf-server/minecraft-patches/features/0052-Don-t-save-falling-block-entity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0053-Don-t-save-falling-block-entity.patch rename to leaf-server/minecraft-patches/features/0052-Don-t-save-falling-block-entity.patch diff --git a/leaf-server/minecraft-patches/features/0054-Configurable-connection-message.patch b/leaf-server/minecraft-patches/features/0053-Configurable-connection-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0054-Configurable-connection-message.patch rename to leaf-server/minecraft-patches/features/0053-Configurable-connection-message.patch diff --git a/leaf-server/minecraft-patches/features/0055-Configurable-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0054-Configurable-unknown-command-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0055-Configurable-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0054-Configurable-unknown-command-message.patch diff --git a/leaf-server/minecraft-patches/features/0056-Remove-stream-in-BlockBehaviour-cache-blockstate.patch b/leaf-server/minecraft-patches/features/0055-Remove-stream-in-BlockBehaviour-cache-blockstate.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0056-Remove-stream-in-BlockBehaviour-cache-blockstate.patch rename to leaf-server/minecraft-patches/features/0055-Remove-stream-in-BlockBehaviour-cache-blockstate.patch diff --git a/leaf-server/minecraft-patches/features/0057-Remove-stream-in-entity-visible-effects-filter.patch b/leaf-server/minecraft-patches/features/0056-Remove-stream-in-entity-visible-effects-filter.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0057-Remove-stream-in-entity-visible-effects-filter.patch rename to leaf-server/minecraft-patches/features/0056-Remove-stream-in-entity-visible-effects-filter.patch index 0e7a3551..60790510 100644 --- a/leaf-server/minecraft-patches/features/0057-Remove-stream-in-entity-visible-effects-filter.patch +++ b/leaf-server/minecraft-patches/features/0056-Remove-stream-in-entity-visible-effects-filter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stream in entity visible effects filter diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ca1d8c9ea018368cc85da46185aee71df8d48ce0..a307ee08f12cb21d17cfbaf969db7c46f10040fb 100644 +index a0886253c20099795a50d8f45db3f7a2b5273d4d..d29b0000d799db839bd0e0be8928b22369f854ac 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -988,12 +988,15 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/leaf-server/minecraft-patches/features/0058-Remove-stream-and-double-iteration-in-enough-deep-sl.patch b/leaf-server/minecraft-patches/features/0057-Remove-stream-and-double-iteration-in-enough-deep-sl.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0058-Remove-stream-and-double-iteration-in-enough-deep-sl.patch rename to leaf-server/minecraft-patches/features/0057-Remove-stream-and-double-iteration-in-enough-deep-sl.patch diff --git a/leaf-server/minecraft-patches/features/0059-Remove-stream-in-trial-spawner-ticking.patch b/leaf-server/minecraft-patches/features/0058-Remove-stream-in-trial-spawner-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0059-Remove-stream-in-trial-spawner-ticking.patch rename to leaf-server/minecraft-patches/features/0058-Remove-stream-in-trial-spawner-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0060-Remove-stream-in-Brain.patch b/leaf-server/minecraft-patches/features/0059-Remove-stream-in-Brain.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0060-Remove-stream-in-Brain.patch rename to leaf-server/minecraft-patches/features/0059-Remove-stream-in-Brain.patch diff --git a/leaf-server/minecraft-patches/features/0061-Remove-stream-in-BehaviorUtils.patch b/leaf-server/minecraft-patches/features/0060-Remove-stream-in-BehaviorUtils.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0061-Remove-stream-in-BehaviorUtils.patch rename to leaf-server/minecraft-patches/features/0060-Remove-stream-in-BehaviorUtils.patch diff --git a/leaf-server/minecraft-patches/features/0062-Remove-stream-in-YieldJobSite.patch b/leaf-server/minecraft-patches/features/0061-Remove-stream-in-YieldJobSite.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0062-Remove-stream-in-YieldJobSite.patch rename to leaf-server/minecraft-patches/features/0061-Remove-stream-in-YieldJobSite.patch diff --git a/leaf-server/minecraft-patches/features/0063-Remove-stream-in-PlayerSensor.patch b/leaf-server/minecraft-patches/features/0062-Remove-stream-in-PlayerSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0063-Remove-stream-in-PlayerSensor.patch rename to leaf-server/minecraft-patches/features/0062-Remove-stream-in-PlayerSensor.patch diff --git a/leaf-server/minecraft-patches/features/0064-Remove-stream-in-GolemSensor.patch b/leaf-server/minecraft-patches/features/0063-Remove-stream-in-GolemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0064-Remove-stream-in-GolemSensor.patch rename to leaf-server/minecraft-patches/features/0063-Remove-stream-in-GolemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0065-Remove-stream-in-GateBehavior.patch b/leaf-server/minecraft-patches/features/0064-Remove-stream-in-GateBehavior.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0065-Remove-stream-in-GateBehavior.patch rename to leaf-server/minecraft-patches/features/0064-Remove-stream-in-GateBehavior.patch diff --git a/leaf-server/minecraft-patches/features/0066-Remove-stream-in-updateFluidOnEyes.patch b/leaf-server/minecraft-patches/features/0065-Remove-stream-in-updateFluidOnEyes.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0066-Remove-stream-in-updateFluidOnEyes.patch rename to leaf-server/minecraft-patches/features/0065-Remove-stream-in-updateFluidOnEyes.patch index ff4f9d28..ddf854f0 100644 --- a/leaf-server/minecraft-patches/features/0066-Remove-stream-in-updateFluidOnEyes.patch +++ b/leaf-server/minecraft-patches/features/0065-Remove-stream-in-updateFluidOnEyes.patch @@ -46,7 +46,7 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89 public String toString() { return "Reference{" + this.key + "=" + this.value + "}"; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 970420761b2c3b82a60479c556e76e385bf211e1..4d88aa70c01e03baf8aea897b00f335c7be91f46 100644 +index 18dfaa60da8de12aea95cda21ee55636bf66f487..7f23b2fdf69d25b3f9a67f3ec945198602ca33fb 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -1984,7 +1984,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0067-Remove-stream-in-matchingSlot.patch b/leaf-server/minecraft-patches/features/0066-Remove-stream-in-matchingSlot.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0067-Remove-stream-in-matchingSlot.patch rename to leaf-server/minecraft-patches/features/0066-Remove-stream-in-matchingSlot.patch diff --git a/leaf-server/minecraft-patches/features/0068-Replace-Entity-active-effects-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0067-Replace-Entity-active-effects-map-with-optimized-col.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0068-Replace-Entity-active-effects-map-with-optimized-col.patch rename to leaf-server/minecraft-patches/features/0067-Replace-Entity-active-effects-map-with-optimized-col.patch index 237d0012..e2e6283c 100644 --- a/leaf-server/minecraft-patches/features/0068-Replace-Entity-active-effects-map-with-optimized-col.patch +++ b/leaf-server/minecraft-patches/features/0067-Replace-Entity-active-effects-map-with-optimized-col.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Replace Entity active effects map with optimized collection Dreeam TODO: check this diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index a307ee08f12cb21d17cfbaf969db7c46f10040fb..4f0da30fa659ecabdfbd1d17e50888c32501b6e7 100644 +index d29b0000d799db839bd0e0be8928b22369f854ac..f56d279cab4922136ebc95cb57f3803b1af3d9cc 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -211,6 +211,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/leaf-server/minecraft-patches/features/0069-Replace-criterion-map-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0068-Replace-criterion-map-with-optimized-collection.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0069-Replace-criterion-map-with-optimized-collection.patch rename to leaf-server/minecraft-patches/features/0068-Replace-criterion-map-with-optimized-collection.patch index 4501508c..9ab73538 100644 --- a/leaf-server/minecraft-patches/features/0069-Replace-criterion-map-with-optimized-collection.patch +++ b/leaf-server/minecraft-patches/features/0068-Replace-criterion-map-with-optimized-collection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Replace criterion map with optimized collection diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index e4ea26ae84efde7ce54e08a246a6ea2ae2a17151..ddd1eac136fc3327aea8286769efd2d7309f67ec 100644 +index 0a4bcc4c44fed2ededafaf0641315e072b7ba771..d2159a747fe42aa95cfc6bca0e55e3f4485847bb 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java @@ -60,7 +60,7 @@ public class PlayerAdvancements { diff --git a/leaf-server/minecraft-patches/features/0070-Replace-brain-maps-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0069-Replace-brain-maps-with-optimized-collection.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0070-Replace-brain-maps-with-optimized-collection.patch rename to leaf-server/minecraft-patches/features/0069-Replace-brain-maps-with-optimized-collection.patch diff --git a/leaf-server/minecraft-patches/features/0071-Reduce-worldgen-allocations.patch b/leaf-server/minecraft-patches/features/0070-Reduce-worldgen-allocations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0071-Reduce-worldgen-allocations.patch rename to leaf-server/minecraft-patches/features/0070-Reduce-worldgen-allocations.patch diff --git a/leaf-server/minecraft-patches/features/0072-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch b/leaf-server/minecraft-patches/features/0071-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0072-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch rename to leaf-server/minecraft-patches/features/0071-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch index fbcb9faa..94044430 100644 --- a/leaf-server/minecraft-patches/features/0072-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch +++ b/leaf-server/minecraft-patches/features/0071-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch @@ -23,7 +23,7 @@ See the License for the specific language governing permissions and limitations under the License. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 24aca7ba2cc3ec5f05bb4ea7d373feb730d8dd90..c30e017e6cffa6aa828b0f6e8889885dbaaa4680 100644 +index 4c39a5d0ee3bf532fd536884232df542154e8a48..327b3bc89920c4ab02c1126dc63bca05ce3abefe 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -330,17 +330,12 @@ public class ServerGamePacketListenerImpl diff --git a/leaf-server/minecraft-patches/features/0073-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0072-Do-not-place-player-if-the-server-is-full.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0073-Do-not-place-player-if-the-server-is-full.patch rename to leaf-server/minecraft-patches/features/0072-Do-not-place-player-if-the-server-is-full.patch diff --git a/leaf-server/minecraft-patches/features/0074-Fix-MC-65198.patch b/leaf-server/minecraft-patches/features/0073-Fix-MC-65198.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0074-Fix-MC-65198.patch rename to leaf-server/minecraft-patches/features/0073-Fix-MC-65198.patch diff --git a/leaf-server/minecraft-patches/features/0075-Fix-MC-200418.patch b/leaf-server/minecraft-patches/features/0074-Fix-MC-200418.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0075-Fix-MC-200418.patch rename to leaf-server/minecraft-patches/features/0074-Fix-MC-200418.patch diff --git a/leaf-server/minecraft-patches/features/0076-Fix-MC-119417.patch b/leaf-server/minecraft-patches/features/0075-Fix-MC-119417.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0076-Fix-MC-119417.patch rename to leaf-server/minecraft-patches/features/0075-Fix-MC-119417.patch diff --git a/leaf-server/minecraft-patches/features/0077-Fix-MC-223153.patch b/leaf-server/minecraft-patches/features/0076-Fix-MC-223153.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0077-Fix-MC-223153.patch rename to leaf-server/minecraft-patches/features/0076-Fix-MC-223153.patch diff --git a/leaf-server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch b/leaf-server/minecraft-patches/features/0077-Configurable-player-knockback-zombie.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch rename to leaf-server/minecraft-patches/features/0077-Configurable-player-knockback-zombie.patch index 2df01656..79d92060 100644 --- a/leaf-server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch +++ b/leaf-server/minecraft-patches/features/0077-Configurable-player-knockback-zombie.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable player knockback zombie diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 4f0da30fa659ecabdfbd1d17e50888c32501b6e7..f744c9dca670cbbcc7549be17bf51eb683dd1ae0 100644 +index f56d279cab4922136ebc95cb57f3803b1af3d9cc..d502325d693539842fd6f5485365e0e9b786b7aa 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -1998,6 +1998,8 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/leaf-server/minecraft-patches/features/0079-Hide-specified-item-components.patch b/leaf-server/minecraft-patches/features/0078-Hide-specified-item-components.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0079-Hide-specified-item-components.patch rename to leaf-server/minecraft-patches/features/0078-Hide-specified-item-components.patch diff --git a/leaf-server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/leaf-server/minecraft-patches/features/0079-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch rename to leaf-server/minecraft-patches/features/0079-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch index 2078d623..e622fa8a 100644 --- a/leaf-server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch +++ b/leaf-server/minecraft-patches/features/0079-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch @@ -8,7 +8,7 @@ Original project: https://github.com/PaperMC/Paper Paper pull request: https://github.com/PaperMC/Paper/pull/10990 diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 8b3dfb1385a2252a4aaead5558c0ffbd5c204971..c32086ddf90fafcc55600f9e0724b9f915671482 100644 +index 73e88f96abee63bd8397575308baac018d12cf26..faf05f0c8f273bc723bbe54c70aebdd26c479a6b 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java @@ -219,6 +219,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab diff --git a/leaf-server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/leaf-server/minecraft-patches/features/0080-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch rename to leaf-server/minecraft-patches/features/0080-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch diff --git a/leaf-server/minecraft-patches/features/0082-PaperPR-Fix-some-beacon-event-issues.patch b/leaf-server/minecraft-patches/features/0081-PaperPR-Fix-some-beacon-event-issues.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0082-PaperPR-Fix-some-beacon-event-issues.patch rename to leaf-server/minecraft-patches/features/0081-PaperPR-Fix-some-beacon-event-issues.patch diff --git a/leaf-server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch b/leaf-server/minecraft-patches/features/0082-Dont-send-useless-entity-packets.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch rename to leaf-server/minecraft-patches/features/0082-Dont-send-useless-entity-packets.patch index b24fe9d6..9c0833cb 100644 --- a/leaf-server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch +++ b/leaf-server/minecraft-patches/features/0082-Dont-send-useless-entity-packets.patch @@ -9,7 +9,7 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index ddf2a5e2cfeaa666a081dd857d6a6003d65d0e00..d8298c7925e3bcea07ead4d438478cc51abcfa16 100644 +index 51b35808fcef8dd497d7ed6dc9d47940f2ddf88b..1dee20436fc29537319ee456756a8e8f7b6fe66a 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -199,6 +199,8 @@ public class ServerEntity { diff --git a/leaf-server/minecraft-patches/features/0084-Don-t-spawn-if-lastSpawnState-is-null.patch b/leaf-server/minecraft-patches/features/0083-Don-t-spawn-if-lastSpawnState-is-null.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0084-Don-t-spawn-if-lastSpawnState-is-null.patch rename to leaf-server/minecraft-patches/features/0083-Don-t-spawn-if-lastSpawnState-is-null.patch index 8c25fb76..bb93b24d 100644 --- a/leaf-server/minecraft-patches/features/0084-Don-t-spawn-if-lastSpawnState-is-null.patch +++ b/leaf-server/minecraft-patches/features/0083-Don-t-spawn-if-lastSpawnState-is-null.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't spawn if lastSpawnState is null diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 6c031f6b1d9c762c8ce7c39a002f9f151347d3a1..6735f9e23c8972b7cf1438a2f3b49d780c1ff78c 100644 +index 20388a43937a460f817c7186d2acbc0c1beee78c..0fd51020ca9480be2855eb58a7d4d43511829512 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -661,7 +661,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon diff --git a/leaf-server/minecraft-patches/features/0085-Multithreaded-Tracker.patch b/leaf-server/minecraft-patches/features/0084-Multithreaded-Tracker.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0085-Multithreaded-Tracker.patch rename to leaf-server/minecraft-patches/features/0084-Multithreaded-Tracker.patch diff --git a/leaf-server/minecraft-patches/features/0086-Nitori-Async-playerdata-saving.patch b/leaf-server/minecraft-patches/features/0085-Nitori-Async-playerdata-saving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0086-Nitori-Async-playerdata-saving.patch rename to leaf-server/minecraft-patches/features/0085-Nitori-Async-playerdata-saving.patch diff --git a/leaf-server/minecraft-patches/features/0087-Optimize-nearby-alive-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0086-Optimize-nearby-alive-players-for-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0087-Optimize-nearby-alive-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0086-Optimize-nearby-alive-players-for-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0088-Cache-blockstate-cache-array.patch b/leaf-server/minecraft-patches/features/0087-Cache-blockstate-cache-array.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0088-Cache-blockstate-cache-array.patch rename to leaf-server/minecraft-patches/features/0087-Cache-blockstate-cache-array.patch diff --git a/leaf-server/minecraft-patches/features/0089-Asynchronous-locator.patch b/leaf-server/minecraft-patches/features/0088-Asynchronous-locator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0089-Asynchronous-locator.patch rename to leaf-server/minecraft-patches/features/0088-Asynchronous-locator.patch diff --git a/leaf-server/minecraft-patches/features/0090-Smart-sort-entities-in-NearestLivingEntitySensor.patch b/leaf-server/minecraft-patches/features/0089-Smart-sort-entities-in-NearestLivingEntitySensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0090-Smart-sort-entities-in-NearestLivingEntitySensor.patch rename to leaf-server/minecraft-patches/features/0089-Smart-sort-entities-in-NearestLivingEntitySensor.patch diff --git a/leaf-server/minecraft-patches/features/0091-Further-reduce-memory-footprint-of-CompoundTag.patch b/leaf-server/minecraft-patches/features/0090-Further-reduce-memory-footprint-of-CompoundTag.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0091-Further-reduce-memory-footprint-of-CompoundTag.patch rename to leaf-server/minecraft-patches/features/0090-Further-reduce-memory-footprint-of-CompoundTag.patch diff --git a/leaf-server/minecraft-patches/features/0092-Optimize-Entity-distanceToSqr.patch b/leaf-server/minecraft-patches/features/0091-Optimize-Entity-distanceToSqr.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0092-Optimize-Entity-distanceToSqr.patch rename to leaf-server/minecraft-patches/features/0091-Optimize-Entity-distanceToSqr.patch index 2e0a9008..ca02b191 100644 --- a/leaf-server/minecraft-patches/features/0092-Optimize-Entity-distanceToSqr.patch +++ b/leaf-server/minecraft-patches/features/0091-Optimize-Entity-distanceToSqr.patch @@ -8,7 +8,7 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o these methods more able to be inlined by the JIT compiler. diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4d88aa70c01e03baf8aea897b00f335c7be91f46..4544dd876d3cbcdb9b774b4a1f0c4737f3124bc5 100644 +index 7f23b2fdf69d25b3f9a67f3ec945198602ca33fb..80ad278eac81aac72d6ec7737287ad018eff7c54 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -2194,31 +2194,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0093-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch b/leaf-server/minecraft-patches/features/0092-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0093-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch rename to leaf-server/minecraft-patches/features/0092-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch diff --git a/leaf-server/minecraft-patches/features/0094-Cache-tile-entity-position.patch b/leaf-server/minecraft-patches/features/0093-Cache-tile-entity-position.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0094-Cache-tile-entity-position.patch rename to leaf-server/minecraft-patches/features/0093-Cache-tile-entity-position.patch diff --git a/leaf-server/minecraft-patches/features/0095-TT20-Lag-compensation.patch b/leaf-server/minecraft-patches/features/0094-TT20-Lag-compensation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0095-TT20-Lag-compensation.patch rename to leaf-server/minecraft-patches/features/0094-TT20-Lag-compensation.patch diff --git a/leaf-server/minecraft-patches/features/0096-C2ME-Reduce-Allocations.patch b/leaf-server/minecraft-patches/features/0095-C2ME-Reduce-Allocations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0096-C2ME-Reduce-Allocations.patch rename to leaf-server/minecraft-patches/features/0095-C2ME-Reduce-Allocations.patch diff --git a/leaf-server/minecraft-patches/features/0097-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch b/leaf-server/minecraft-patches/features/0096-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0097-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch rename to leaf-server/minecraft-patches/features/0096-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch index 855e6d09..a3cb2403 100644 --- a/leaf-server/minecraft-patches/features/0097-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch +++ b/leaf-server/minecraft-patches/features/0096-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch @@ -12,7 +12,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 0ac8b7bd9d899daf61aeb58f80bdcebe87974d51..eb79e6984810410c646d7b1910694d7df75dccba 100644 +index a99527409e9aae6c8b321a5ed100b2645151087e..cbd68d1d5b92e426062776658a6bf525553ecb1b 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -2739,6 +2739,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/leaf-server/minecraft-patches/features/0098-Lithium-fast-util.patch b/leaf-server/minecraft-patches/features/0097-Lithium-fast-util.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0098-Lithium-fast-util.patch rename to leaf-server/minecraft-patches/features/0097-Lithium-fast-util.patch index cbb8440e..1bc377c5 100644 --- a/leaf-server/minecraft-patches/features/0098-Lithium-fast-util.patch +++ b/leaf-server/minecraft-patches/features/0097-Lithium-fast-util.patch @@ -11,7 +11,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/core/Direction.java b/net/minecraft/core/Direction.java -index 216f97207dac88cc1dc3df59c6ee8a62c7614b4a..3a76b1ec8570e4c9f328e9d362b41057b092be45 100644 +index e5738ed10b58cf00e58c7b210be7fea3c09f2a02..1ed78ac66ae766262131921f03af2bf1b9d0eff0 100644 --- a/net/minecraft/core/Direction.java +++ b/net/minecraft/core/Direction.java @@ -217,7 +217,7 @@ public enum Direction implements StringRepresentable, ca.spottedleaf.moonrise.pa diff --git a/leaf-server/minecraft-patches/features/0099-Lithium-cached-iterate-outwards.patch b/leaf-server/minecraft-patches/features/0098-Lithium-cached-iterate-outwards.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0099-Lithium-cached-iterate-outwards.patch rename to leaf-server/minecraft-patches/features/0098-Lithium-cached-iterate-outwards.patch diff --git a/leaf-server/minecraft-patches/features/0100-Use-faster-and-thread-safe-ban-list-date-format-pars.patch b/leaf-server/minecraft-patches/features/0099-Use-faster-and-thread-safe-ban-list-date-format-pars.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0100-Use-faster-and-thread-safe-ban-list-date-format-pars.patch rename to leaf-server/minecraft-patches/features/0099-Use-faster-and-thread-safe-ban-list-date-format-pars.patch diff --git a/leaf-server/minecraft-patches/features/0101-C2ME-Optimize-world-gen-math.patch b/leaf-server/minecraft-patches/features/0100-C2ME-Optimize-world-gen-math.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0101-C2ME-Optimize-world-gen-math.patch rename to leaf-server/minecraft-patches/features/0100-C2ME-Optimize-world-gen-math.patch diff --git a/leaf-server/minecraft-patches/features/0102-Cache-chunk-key.patch b/leaf-server/minecraft-patches/features/0101-Cache-chunk-key.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0102-Cache-chunk-key.patch rename to leaf-server/minecraft-patches/features/0101-Cache-chunk-key.patch diff --git a/leaf-server/minecraft-patches/features/0103-Cache-random-tick-block-status.patch b/leaf-server/minecraft-patches/features/0102-Cache-random-tick-block-status.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0103-Cache-random-tick-block-status.patch rename to leaf-server/minecraft-patches/features/0102-Cache-random-tick-block-status.patch diff --git a/leaf-server/minecraft-patches/features/0104-Cache-part-of-canHoldFluid-result.patch b/leaf-server/minecraft-patches/features/0103-Cache-part-of-canHoldFluid-result.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0104-Cache-part-of-canHoldFluid-result.patch rename to leaf-server/minecraft-patches/features/0103-Cache-part-of-canHoldFluid-result.patch diff --git a/leaf-server/minecraft-patches/features/0105-Configurable-tripwire-dupe.patch b/leaf-server/minecraft-patches/features/0104-Configurable-tripwire-dupe.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0105-Configurable-tripwire-dupe.patch rename to leaf-server/minecraft-patches/features/0104-Configurable-tripwire-dupe.patch diff --git a/leaf-server/minecraft-patches/features/0106-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch b/leaf-server/minecraft-patches/features/0105-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0106-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch rename to leaf-server/minecraft-patches/features/0105-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch diff --git a/leaf-server/minecraft-patches/features/0107-Sepals-Rearrange-the-attackable-conditions.patch b/leaf-server/minecraft-patches/features/0106-Sepals-Rearrange-the-attackable-conditions.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0107-Sepals-Rearrange-the-attackable-conditions.patch rename to leaf-server/minecraft-patches/features/0106-Sepals-Rearrange-the-attackable-conditions.patch diff --git a/leaf-server/minecraft-patches/features/0108-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch b/leaf-server/minecraft-patches/features/0107-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0108-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch rename to leaf-server/minecraft-patches/features/0107-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch diff --git a/leaf-server/minecraft-patches/features/0109-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch b/leaf-server/minecraft-patches/features/0108-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0109-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch rename to leaf-server/minecraft-patches/features/0108-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch diff --git a/leaf-server/minecraft-patches/features/0110-Optimize-checking-nearby-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0109-Optimize-checking-nearby-players-for-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0110-Optimize-checking-nearby-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0109-Optimize-checking-nearby-players-for-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0111-Cache-supporting-block-check.patch b/leaf-server/minecraft-patches/features/0110-Cache-supporting-block-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0111-Cache-supporting-block-check.patch rename to leaf-server/minecraft-patches/features/0110-Cache-supporting-block-check.patch diff --git a/leaf-server/minecraft-patches/features/0112-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch b/leaf-server/minecraft-patches/features/0111-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0112-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch rename to leaf-server/minecraft-patches/features/0111-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch diff --git a/leaf-server/minecraft-patches/features/0113-Replace-brain-activity-maps-with-optimized-collectio.patch b/leaf-server/minecraft-patches/features/0112-Replace-brain-activity-maps-with-optimized-collectio.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0113-Replace-brain-activity-maps-with-optimized-collectio.patch rename to leaf-server/minecraft-patches/features/0112-Replace-brain-activity-maps-with-optimized-collectio.patch index 855fae09..83bde05c 100644 --- a/leaf-server/minecraft-patches/features/0113-Replace-brain-activity-maps-with-optimized-collectio.patch +++ b/leaf-server/minecraft-patches/features/0112-Replace-brain-activity-maps-with-optimized-collectio.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Replace brain activity maps with optimized collection diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java -index 0f50db187e04582e9b66a63201af987f6db74939..b143cd6d5636dc61458a864cd548c886d14cd30c 100644 +index 10986e50bd3307f81074c4cb371eb4d7defc9cfc..636a945ce2a91b8bf73b790e0e9e412368b3fe71 100644 --- a/net/minecraft/world/entity/ai/Brain.java +++ b/net/minecraft/world/entity/ai/Brain.java @@ -390,8 +390,8 @@ public class Brain { diff --git a/leaf-server/minecraft-patches/features/0114-Remove-stream-in-villagers.patch b/leaf-server/minecraft-patches/features/0113-Remove-stream-in-villagers.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0114-Remove-stream-in-villagers.patch rename to leaf-server/minecraft-patches/features/0113-Remove-stream-in-villagers.patch diff --git a/leaf-server/minecraft-patches/features/0115-Optimize-baby-villager-sensor.patch b/leaf-server/minecraft-patches/features/0114-Optimize-baby-villager-sensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0115-Optimize-baby-villager-sensor.patch rename to leaf-server/minecraft-patches/features/0114-Optimize-baby-villager-sensor.patch diff --git a/leaf-server/minecraft-patches/features/0116-Only-player-pushable.patch b/leaf-server/minecraft-patches/features/0115-Only-player-pushable.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0116-Only-player-pushable.patch rename to leaf-server/minecraft-patches/features/0115-Only-player-pushable.patch diff --git a/leaf-server/minecraft-patches/features/0117-Remove-iterators-from-Inventory-contains.patch b/leaf-server/minecraft-patches/features/0116-Remove-iterators-from-Inventory-contains.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0117-Remove-iterators-from-Inventory-contains.patch rename to leaf-server/minecraft-patches/features/0116-Remove-iterators-from-Inventory-contains.patch diff --git a/leaf-server/minecraft-patches/features/0118-Cache-eligible-players-for-despawn-checks.patch b/leaf-server/minecraft-patches/features/0117-Cache-eligible-players-for-despawn-checks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0118-Cache-eligible-players-for-despawn-checks.patch rename to leaf-server/minecraft-patches/features/0117-Cache-eligible-players-for-despawn-checks.patch diff --git a/leaf-server/minecraft-patches/features/0119-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0118-Slightly-optimise-getNearestPlayer.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0119-Slightly-optimise-getNearestPlayer.patch rename to leaf-server/minecraft-patches/features/0118-Slightly-optimise-getNearestPlayer.patch diff --git a/leaf-server/minecraft-patches/features/0120-Bulk-writes-to-writeLongArray-during-chunk-loading.patch b/leaf-server/minecraft-patches/features/0119-Bulk-writes-to-writeLongArray-during-chunk-loading.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0120-Bulk-writes-to-writeLongArray-during-chunk-loading.patch rename to leaf-server/minecraft-patches/features/0119-Bulk-writes-to-writeLongArray-during-chunk-loading.patch diff --git a/leaf-server/minecraft-patches/features/0121-Improve-sorting-in-SortedArraySet.patch b/leaf-server/minecraft-patches/features/0120-Improve-sorting-in-SortedArraySet.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0121-Improve-sorting-in-SortedArraySet.patch rename to leaf-server/minecraft-patches/features/0120-Improve-sorting-in-SortedArraySet.patch diff --git a/leaf-server/minecraft-patches/features/0122-Make-removeIf-slightly-faster.patch b/leaf-server/minecraft-patches/features/0121-Make-removeIf-slightly-faster.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0122-Make-removeIf-slightly-faster.patch rename to leaf-server/minecraft-patches/features/0121-Make-removeIf-slightly-faster.patch diff --git a/leaf-server/minecraft-patches/features/0123-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0122-Optimize-LinearPalette.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0123-Optimize-LinearPalette.patch rename to leaf-server/minecraft-patches/features/0122-Optimize-LinearPalette.patch diff --git a/leaf-server/minecraft-patches/features/0124-Slightly-optimized-VarInt-write.patch b/leaf-server/minecraft-patches/features/0123-Slightly-optimized-VarInt-write.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0124-Slightly-optimized-VarInt-write.patch rename to leaf-server/minecraft-patches/features/0123-Slightly-optimized-VarInt-write.patch diff --git a/leaf-server/minecraft-patches/features/0125-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0124-Rewrite-ClientboundLightUpdatePacketData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0125-Rewrite-ClientboundLightUpdatePacketData.patch rename to leaf-server/minecraft-patches/features/0124-Rewrite-ClientboundLightUpdatePacketData.patch diff --git a/leaf-server/minecraft-patches/features/0126-Async-chunk-send.patch b/leaf-server/minecraft-patches/features/0125-Async-chunk-send.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0126-Async-chunk-send.patch rename to leaf-server/minecraft-patches/features/0125-Async-chunk-send.patch diff --git a/leaf-server/minecraft-patches/features/0127-Spawner-Configurations.patch b/leaf-server/minecraft-patches/features/0126-Spawner-Configurations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0127-Spawner-Configurations.patch rename to leaf-server/minecraft-patches/features/0126-Spawner-Configurations.patch diff --git a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/minecraft-patches/features/0127-SparklyPaper-Parallel-world-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0128-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/minecraft-patches/features/0127-SparklyPaper-Parallel-world-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0129-SparklyPaper-Track-each-world-MSPT.patch b/leaf-server/minecraft-patches/features/0128-SparklyPaper-Track-each-world-MSPT.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0129-SparklyPaper-Track-each-world-MSPT.patch rename to leaf-server/minecraft-patches/features/0128-SparklyPaper-Track-each-world-MSPT.patch diff --git a/leaf-server/minecraft-patches/features/0130-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch b/leaf-server/minecraft-patches/features/0129-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0130-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch rename to leaf-server/minecraft-patches/features/0129-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch diff --git a/leaf-server/minecraft-patches/features/0131-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch b/leaf-server/minecraft-patches/features/0130-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0131-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch rename to leaf-server/minecraft-patches/features/0130-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch diff --git a/leaf-server/minecraft-patches/features/0132-Remove-streams-on-InsideBrownianWalk.patch b/leaf-server/minecraft-patches/features/0131-Remove-streams-on-InsideBrownianWalk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0132-Remove-streams-on-InsideBrownianWalk.patch rename to leaf-server/minecraft-patches/features/0131-Remove-streams-on-InsideBrownianWalk.patch diff --git a/leaf-server/minecraft-patches/features/0133-Use-BFS-on-getSlopeDistance.patch b/leaf-server/minecraft-patches/features/0132-Use-BFS-on-getSlopeDistance.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0133-Use-BFS-on-getSlopeDistance.patch rename to leaf-server/minecraft-patches/features/0132-Use-BFS-on-getSlopeDistance.patch diff --git a/leaf-server/minecraft-patches/features/0134-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/minecraft-patches/features/0133-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0134-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/minecraft-patches/features/0133-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/leaf-server/minecraft-patches/features/0135-Improve-BlockEntity-ticking-isRemoved-check.patch b/leaf-server/minecraft-patches/features/0134-Improve-BlockEntity-ticking-isRemoved-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0135-Improve-BlockEntity-ticking-isRemoved-check.patch rename to leaf-server/minecraft-patches/features/0134-Improve-BlockEntity-ticking-isRemoved-check.patch diff --git a/leaf-server/minecraft-patches/features/0136-Raytrace-AntiXray-SDK-integration.patch b/leaf-server/minecraft-patches/features/0135-Raytrace-AntiXray-SDK-integration.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0136-Raytrace-AntiXray-SDK-integration.patch rename to leaf-server/minecraft-patches/features/0135-Raytrace-AntiXray-SDK-integration.patch diff --git a/leaf-server/minecraft-patches/features/0137-Optimize-addOrUpdateTransientModifier.patch b/leaf-server/minecraft-patches/features/0136-Optimize-addOrUpdateTransientModifier.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0137-Optimize-addOrUpdateTransientModifier.patch rename to leaf-server/minecraft-patches/features/0136-Optimize-addOrUpdateTransientModifier.patch diff --git a/leaf-server/minecraft-patches/features/0138-Optimize-ContextMap.create.patch b/leaf-server/minecraft-patches/features/0137-Optimize-ContextMap.create.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0138-Optimize-ContextMap.create.patch rename to leaf-server/minecraft-patches/features/0137-Optimize-ContextMap.create.patch diff --git a/leaf-server/minecraft-patches/features/0139-Micro-optimizations-for-random-tick.patch b/leaf-server/minecraft-patches/features/0138-Micro-optimizations-for-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0139-Micro-optimizations-for-random-tick.patch rename to leaf-server/minecraft-patches/features/0138-Micro-optimizations-for-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0140-Remove-streams-on-updateConnectedPlayersWithinRange.patch b/leaf-server/minecraft-patches/features/0139-Remove-streams-on-updateConnectedPlayersWithinRange.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0140-Remove-streams-on-updateConnectedPlayersWithinRange.patch rename to leaf-server/minecraft-patches/features/0139-Remove-streams-on-updateConnectedPlayersWithinRange.patch diff --git a/leaf-server/minecraft-patches/features/0141-Remove-streams-on-PlayerDetector.patch b/leaf-server/minecraft-patches/features/0140-Remove-streams-on-PlayerDetector.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0141-Remove-streams-on-PlayerDetector.patch rename to leaf-server/minecraft-patches/features/0140-Remove-streams-on-PlayerDetector.patch diff --git a/leaf-server/minecraft-patches/features/0142-Use-direct-iteration-on-Sensing.tick.patch b/leaf-server/minecraft-patches/features/0141-Use-direct-iteration-on-Sensing.tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0142-Use-direct-iteration-on-Sensing.tick.patch rename to leaf-server/minecraft-patches/features/0141-Use-direct-iteration-on-Sensing.tick.patch diff --git a/leaf-server/minecraft-patches/features/0143-Optimise-non-flush-packet-sending.patch b/leaf-server/minecraft-patches/features/0142-Optimise-non-flush-packet-sending.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0143-Optimise-non-flush-packet-sending.patch rename to leaf-server/minecraft-patches/features/0142-Optimise-non-flush-packet-sending.patch diff --git a/leaf-server/minecraft-patches/features/0144-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch b/leaf-server/minecraft-patches/features/0143-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0144-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch rename to leaf-server/minecraft-patches/features/0143-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch diff --git a/leaf-server/minecraft-patches/features/0145-Null-handling-on-MultifaceSpreader.patch b/leaf-server/minecraft-patches/features/0144-Null-handling-on-MultifaceSpreader.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0145-Null-handling-on-MultifaceSpreader.patch rename to leaf-server/minecraft-patches/features/0144-Null-handling-on-MultifaceSpreader.patch diff --git a/leaf-server/minecraft-patches/features/0146-More-virtual-threads.patch b/leaf-server/minecraft-patches/features/0145-More-virtual-threads.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0146-More-virtual-threads.patch rename to leaf-server/minecraft-patches/features/0145-More-virtual-threads.patch diff --git a/leaf-server/minecraft-patches/features/0147-Async-target-finding.patch b/leaf-server/minecraft-patches/features/0146-Async-target-finding.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0147-Async-target-finding.patch rename to leaf-server/minecraft-patches/features/0146-Async-target-finding.patch diff --git a/leaf-server/minecraft-patches/features/0148-Optimize-ThreadedTicketLevelPropagator.patch b/leaf-server/minecraft-patches/features/0147-Optimize-ThreadedTicketLevelPropagator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0148-Optimize-ThreadedTicketLevelPropagator.patch rename to leaf-server/minecraft-patches/features/0147-Optimize-ThreadedTicketLevelPropagator.patch diff --git a/leaf-server/minecraft-patches/features/0149-Optimise-MobEffectUtil-getDigSpeedAmplification.patch b/leaf-server/minecraft-patches/features/0148-Optimise-MobEffectUtil-getDigSpeedAmplification.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0149-Optimise-MobEffectUtil-getDigSpeedAmplification.patch rename to leaf-server/minecraft-patches/features/0148-Optimise-MobEffectUtil-getDigSpeedAmplification.patch diff --git a/leaf-server/minecraft-patches/features/0150-Optimise-chunkUnloads.patch b/leaf-server/minecraft-patches/features/0149-Optimise-chunkUnloads.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0150-Optimise-chunkUnloads.patch rename to leaf-server/minecraft-patches/features/0149-Optimise-chunkUnloads.patch diff --git a/leaf-server/minecraft-patches/features/0151-Optimize-BlockEntityType-isValid.patch b/leaf-server/minecraft-patches/features/0150-Optimize-BlockEntityType-isValid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0151-Optimize-BlockEntityType-isValid.patch rename to leaf-server/minecraft-patches/features/0150-Optimize-BlockEntityType-isValid.patch diff --git a/leaf-server/minecraft-patches/features/0152-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch b/leaf-server/minecraft-patches/features/0151-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0152-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch rename to leaf-server/minecraft-patches/features/0151-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch diff --git a/leaf-server/minecraft-patches/features/0153-PaperPR-Fix-save-load-NaN-Entity-Motion.patch b/leaf-server/minecraft-patches/features/0152-PaperPR-Fix-save-load-NaN-Entity-Motion.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0153-PaperPR-Fix-save-load-NaN-Entity-Motion.patch rename to leaf-server/minecraft-patches/features/0152-PaperPR-Fix-save-load-NaN-Entity-Motion.patch diff --git a/leaf-server/minecraft-patches/features/0154-PaperPR-Fix-unnecessary-map-data-saves.patch b/leaf-server/minecraft-patches/features/0153-PaperPR-Fix-unnecessary-map-data-saves.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0154-PaperPR-Fix-unnecessary-map-data-saves.patch rename to leaf-server/minecraft-patches/features/0153-PaperPR-Fix-unnecessary-map-data-saves.patch diff --git a/leaf-server/minecraft-patches/features/0155-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-server/minecraft-patches/features/0154-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0155-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch rename to leaf-server/minecraft-patches/features/0154-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch diff --git a/leaf-server/minecraft-patches/features/0156-Sakura-copy-EntityList-implementation-to-BasicEntity.patch b/leaf-server/minecraft-patches/features/0155-Sakura-copy-EntityList-implementation-to-BasicEntity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0156-Sakura-copy-EntityList-implementation-to-BasicEntity.patch rename to leaf-server/minecraft-patches/features/0155-Sakura-copy-EntityList-implementation-to-BasicEntity.patch diff --git a/leaf-server/minecraft-patches/features/0157-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0156-Protocol-Core.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0157-Protocol-Core.patch rename to leaf-server/minecraft-patches/features/0156-Protocol-Core.patch diff --git a/leaf-server/minecraft-patches/features/0158-Async-switch-connection-state.patch b/leaf-server/minecraft-patches/features/0157-Async-switch-connection-state.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0158-Async-switch-connection-state.patch rename to leaf-server/minecraft-patches/features/0157-Async-switch-connection-state.patch index 16dfdbb5..272fd349 100644 --- a/leaf-server/minecraft-patches/features/0158-Async-switch-connection-state.patch +++ b/leaf-server/minecraft-patches/features/0157-Async-switch-connection-state.patch @@ -110,10 +110,10 @@ index 2e9eb04c7c4342393c05339906c267bca9ff29b1..53b9daa909c2b89046d5af515e17afe0 try { PlayerList playerList = this.server.getPlayerList(); diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 114b25f933c6a1b011523581a5a02a5a2c1e827e..5907f1c75002be5e2ef1f9875974e665f964db7a 100644 +index 069477e524a28b20a0289221858bdc802704a890..fba665715978853979b9d1d1e6133ce8e38ea146 100644 --- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -494,11 +494,31 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -451,11 +451,31 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY); } diff --git a/leaf-server/minecraft-patches/features/0159-Optimize-BlockEntities-tickersInLevel.patch b/leaf-server/minecraft-patches/features/0158-Optimize-BlockEntities-tickersInLevel.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0159-Optimize-BlockEntities-tickersInLevel.patch rename to leaf-server/minecraft-patches/features/0158-Optimize-BlockEntities-tickersInLevel.patch diff --git a/leaf-server/minecraft-patches/features/0160-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch b/leaf-server/minecraft-patches/features/0159-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0160-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch rename to leaf-server/minecraft-patches/features/0159-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch diff --git a/leaf-server/minecraft-patches/features/0161-Flush-location-while-knockback.patch b/leaf-server/minecraft-patches/features/0160-Flush-location-while-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0161-Flush-location-while-knockback.patch rename to leaf-server/minecraft-patches/features/0160-Flush-location-while-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0162-Only-tick-items-at-hand.patch b/leaf-server/minecraft-patches/features/0161-Only-tick-items-at-hand.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0162-Only-tick-items-at-hand.patch rename to leaf-server/minecraft-patches/features/0161-Only-tick-items-at-hand.patch diff --git a/leaf-server/minecraft-patches/features/0163-Smart-sort-items-in-NearestItemSensor.patch b/leaf-server/minecraft-patches/features/0162-Smart-sort-items-in-NearestItemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0163-Smart-sort-items-in-NearestItemSensor.patch rename to leaf-server/minecraft-patches/features/0162-Smart-sort-items-in-NearestItemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0164-Optimise-player-movement-checks.patch b/leaf-server/minecraft-patches/features/0163-Optimise-player-movement-checks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0164-Optimise-player-movement-checks.patch rename to leaf-server/minecraft-patches/features/0163-Optimise-player-movement-checks.patch diff --git a/leaf-server/minecraft-patches/features/0165-Remove-streams-in-MobSensor.patch b/leaf-server/minecraft-patches/features/0164-Remove-streams-in-MobSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0165-Remove-streams-in-MobSensor.patch rename to leaf-server/minecraft-patches/features/0164-Remove-streams-in-MobSensor.patch diff --git a/leaf-server/minecraft-patches/features/0166-Remove-streams-in-TemptingSensor.patch b/leaf-server/minecraft-patches/features/0165-Remove-streams-in-TemptingSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0166-Remove-streams-in-TemptingSensor.patch rename to leaf-server/minecraft-patches/features/0165-Remove-streams-in-TemptingSensor.patch diff --git a/leaf-server/minecraft-patches/features/0167-Use-HashedList-on-WeightedRandomList.patch b/leaf-server/minecraft-patches/features/0166-Use-HashedList-on-WeightedRandomList.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0167-Use-HashedList-on-WeightedRandomList.patch rename to leaf-server/minecraft-patches/features/0166-Use-HashedList-on-WeightedRandomList.patch diff --git a/leaf-server/minecraft-patches/features/0168-Add-configurable-death-item-drop-knockback-settings.patch b/leaf-server/minecraft-patches/features/0167-Add-configurable-death-item-drop-knockback-settings.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0168-Add-configurable-death-item-drop-knockback-settings.patch rename to leaf-server/minecraft-patches/features/0167-Add-configurable-death-item-drop-knockback-settings.patch diff --git a/leaf-server/minecraft-patches/features/0169-Optimize-getScaledTrackingDistance.patch b/leaf-server/minecraft-patches/features/0168-Optimize-getScaledTrackingDistance.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0169-Optimize-getScaledTrackingDistance.patch rename to leaf-server/minecraft-patches/features/0168-Optimize-getScaledTrackingDistance.patch diff --git a/leaf-server/minecraft-patches/features/0170-Optimize-SynchedEntityData-packDirty.patch b/leaf-server/minecraft-patches/features/0169-Optimize-SynchedEntityData-packDirty.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0170-Optimize-SynchedEntityData-packDirty.patch rename to leaf-server/minecraft-patches/features/0169-Optimize-SynchedEntityData-packDirty.patch diff --git a/leaf-server/minecraft-patches/features/0171-Optimize-isEyeInFluid.patch b/leaf-server/minecraft-patches/features/0170-Optimize-isEyeInFluid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0171-Optimize-isEyeInFluid.patch rename to leaf-server/minecraft-patches/features/0170-Optimize-isEyeInFluid.patch diff --git a/leaf-server/minecraft-patches/features/0172-Cache-block-path-type.patch b/leaf-server/minecraft-patches/features/0171-Cache-block-path-type.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0172-Cache-block-path-type.patch rename to leaf-server/minecraft-patches/features/0171-Cache-block-path-type.patch diff --git a/leaf-server/minecraft-patches/features/0173-optimize-getEntityStatus.patch b/leaf-server/minecraft-patches/features/0172-optimize-getEntityStatus.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0173-optimize-getEntityStatus.patch rename to leaf-server/minecraft-patches/features/0172-optimize-getEntityStatus.patch diff --git a/leaf-server/minecraft-patches/features/0174-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/leaf-server/minecraft-patches/features/0173-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0174-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to leaf-server/minecraft-patches/features/0173-Rail-Optimization-optimized-PoweredRailBlock-logic.patch diff --git a/leaf-server/minecraft-patches/features/0175-optimise-ChunkGenerator-getMobsAt.patch b/leaf-server/minecraft-patches/features/0174-optimise-ChunkGenerator-getMobsAt.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0175-optimise-ChunkGenerator-getMobsAt.patch rename to leaf-server/minecraft-patches/features/0174-optimise-ChunkGenerator-getMobsAt.patch diff --git a/leaf-server/minecraft-patches/features/0176-optimise-getBiome.patch b/leaf-server/minecraft-patches/features/0175-optimise-getBiome.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0176-optimise-getBiome.patch rename to leaf-server/minecraft-patches/features/0175-optimise-getBiome.patch diff --git a/leaf-server/minecraft-patches/features/0177-optimize-mob-spawning.patch b/leaf-server/minecraft-patches/features/0176-optimize-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0177-optimize-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0176-optimize-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0178-optimize-structure-map.patch b/leaf-server/minecraft-patches/features/0177-optimize-structure-map.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0178-optimize-structure-map.patch rename to leaf-server/minecraft-patches/features/0177-optimize-structure-map.patch diff --git a/leaf-server/minecraft-patches/features/0179-throttle-mob-spawning.patch b/leaf-server/minecraft-patches/features/0178-throttle-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0179-throttle-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0178-throttle-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0180-Add-BlockExplosionHitEvent.patch b/leaf-server/minecraft-patches/features/0179-Add-BlockExplosionHitEvent.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0180-Add-BlockExplosionHitEvent.patch rename to leaf-server/minecraft-patches/features/0179-Add-BlockExplosionHitEvent.patch diff --git a/leaf-server/minecraft-patches/features/0181-Old-Blast-Protection-explosion-knockback.patch b/leaf-server/minecraft-patches/features/0180-Old-Blast-Protection-explosion-knockback.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0181-Old-Blast-Protection-explosion-knockback.patch rename to leaf-server/minecraft-patches/features/0180-Old-Blast-Protection-explosion-knockback.patch diff --git a/leaf-server/minecraft-patches/features/0182-Use-UUID-for-cure-reputation.patch b/leaf-server/minecraft-patches/features/0181-Use-UUID-for-cure-reputation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0182-Use-UUID-for-cure-reputation.patch rename to leaf-server/minecraft-patches/features/0181-Use-UUID-for-cure-reputation.patch diff --git a/leaf-server/minecraft-patches/features/0183-Cache-potential-behaviors-in-Brain.patch b/leaf-server/minecraft-patches/features/0182-Cache-potential-behaviors-in-Brain.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0183-Cache-potential-behaviors-in-Brain.patch rename to leaf-server/minecraft-patches/features/0182-Cache-potential-behaviors-in-Brain.patch diff --git a/leaf-server/minecraft-patches/features/0184-Use-ActivationList-on-runningBehaviors.patch b/leaf-server/minecraft-patches/features/0183-Use-ActivationList-on-runningBehaviors.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0184-Use-ActivationList-on-runningBehaviors.patch rename to leaf-server/minecraft-patches/features/0183-Use-ActivationList-on-runningBehaviors.patch diff --git a/leaf-server/minecraft-patches/features/0185-Paper-Fix-infinite-loop-in-RegionFile-IO.patch b/leaf-server/minecraft-patches/features/0184-Paper-Fix-infinite-loop-in-RegionFile-IO.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0185-Paper-Fix-infinite-loop-in-RegionFile-IO.patch rename to leaf-server/minecraft-patches/features/0184-Paper-Fix-infinite-loop-in-RegionFile-IO.patch diff --git a/leaf-server/minecraft-patches/features/0186-Paper-Fix-excess-slot-updates.patch b/leaf-server/minecraft-patches/features/0185-Paper-Fix-excess-slot-updates.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0186-Paper-Fix-excess-slot-updates.patch rename to leaf-server/minecraft-patches/features/0185-Paper-Fix-excess-slot-updates.patch diff --git a/leaf-server/minecraft-patches/features/0187-Paper-Fix-incorrect-createPath-overload-arguments.patch b/leaf-server/minecraft-patches/features/0186-Paper-Fix-incorrect-createPath-overload-arguments.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0187-Paper-Fix-incorrect-createPath-overload-arguments.patch rename to leaf-server/minecraft-patches/features/0186-Paper-Fix-incorrect-createPath-overload-arguments.patch diff --git a/leaf-server/minecraft-patches/features/0188-Fix-crash-during-parsing-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0187-Fix-crash-during-parsing-unknown-command-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0188-Fix-crash-during-parsing-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0187-Fix-crash-during-parsing-unknown-command-message.patch diff --git a/leaf-server/minecraft-patches/features/0189-Paw-optimization.patch b/leaf-server/minecraft-patches/features/0188-Paw-optimization.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0189-Paw-optimization.patch rename to leaf-server/minecraft-patches/features/0188-Paw-optimization.patch diff --git a/leaf-server/minecraft-patches/features/0190-optimize-random-tick.patch b/leaf-server/minecraft-patches/features/0189-optimize-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0190-optimize-random-tick.patch rename to leaf-server/minecraft-patches/features/0189-optimize-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0191-count-all-chunks-for-ticking.patch b/leaf-server/minecraft-patches/features/0190-count-all-chunks-for-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0191-count-all-chunks-for-ticking.patch rename to leaf-server/minecraft-patches/features/0190-count-all-chunks-for-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0192-Fix-infinite-loop-in-dismount-loc-check.patch b/leaf-server/minecraft-patches/features/0191-Fix-infinite-loop-in-dismount-loc-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0192-Fix-infinite-loop-in-dismount-loc-check.patch rename to leaf-server/minecraft-patches/features/0191-Fix-infinite-loop-in-dismount-loc-check.patch diff --git a/leaf-server/minecraft-patches/features/0193-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch b/leaf-server/minecraft-patches/features/0192-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0193-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch rename to leaf-server/minecraft-patches/features/0192-Re-route-SetClosestHomeAsWalkTarget-s-poi-finding-to.patch diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/Cache.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/Cache.java deleted file mode 100644 index d7d6e7fc..00000000 --- a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/Cache.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.dreeam.leaf.config.modules.misc; - -import org.dreeam.leaf.config.ConfigModules; -import org.dreeam.leaf.config.EnumConfigCategory; - -public class Cache extends ConfigModules { - - public String getBasePath() { - return EnumConfigCategory.MISC.getBaseKeyName() + ".cache"; - } - - public static boolean cachePlayerProfileResult = false; - public static int cachePlayerProfileResultTimeout = 1440; - - @Override - public void onLoaded() { - cachePlayerProfileResult = config.getBoolean(getBasePath() + ".cache-player-profile-result", cachePlayerProfileResult, config.pickStringRegionBased(""" - Cache the player profile result on they first join. - It's useful if Mojang's verification server is down.""", - """ - 玩家首次加入时缓存 PlayerProfile. - 正版验证服务器宕机时非常有用.""")); - cachePlayerProfileResultTimeout = config.getInt(getBasePath() + ".cache-player-profile-result-timeout", cachePlayerProfileResultTimeout, - config.pickStringRegionBased( - "The timeout of the cache. Unit: Minutes.", - "缓存过期时间. 单位: 分钟." - )); - } -} diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/CacheProfileLookup.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/CacheProfileLookup.java new file mode 100644 index 00000000..c21c107b --- /dev/null +++ b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/CacheProfileLookup.java @@ -0,0 +1,31 @@ +package org.dreeam.leaf.config.modules.misc; + +import org.dreeam.leaf.config.ConfigModules; +import org.dreeam.leaf.config.EnumConfigCategory; + +public class CacheProfileLookup extends ConfigModules { + + public String getBasePath() { + return EnumConfigCategory.MISC.getBaseKeyName() + ".cache.profile-lookup"; + } + + public static boolean enabled = false; + public static int timeout = 1440; // 24 hours in minutes + public static int maxSize = 8192; + + @Override + public void onLoaded() { + enabled = config.getBoolean(getBasePath() + ".enabled", enabled, config.pickStringRegionBased(""" + Cache profile data lookups (skins, textures, etc.) to reduce API calls to Mojang.""", + """ + 缓存玩家资料查询 (皮肤, 材质等) 以减少对 Mojang API 的调用.""")); + timeout = config.getInt(getBasePath() + ".timeout", timeout, config.pickStringRegionBased( + "The timeout for profile lookup cache. Unit: Minutes.", + "玩家资料查询缓存过期时间. 单位: 分钟. (推荐: 1440 = 24小时)" + )); + maxSize = config.getInt(getBasePath() + ".max-size", maxSize, config.pickStringRegionBased( + "Maximum number of profiles to cache. Higher values use more memory (not that much).", + "最大缓存的玩家资料数量. 更高的值会使用更多内存." + )); + } +} diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveSpigotCheckBungee.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveSpigotCheckBungee.java index 42bfa036..d252a7c3 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveSpigotCheckBungee.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveSpigotCheckBungee.java @@ -9,7 +9,7 @@ public class RemoveSpigotCheckBungee extends ConfigModules { return EnumConfigCategory.MISC.getBaseKeyName() + ".remove-spigot-check-bungee-config"; } - public static boolean enabled = true; + public static boolean enabled = false; @Override public void onLoaded() { diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveVanillaUsernameCheck.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveVanillaUsernameCheck.java index dcb0d23c..d035246a 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveVanillaUsernameCheck.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/misc/RemoveVanillaUsernameCheck.java @@ -9,7 +9,7 @@ public class RemoveVanillaUsernameCheck extends ConfigModules { return EnumConfigCategory.MISC.getBaseKeyName() + ".remove-vanilla-username-check"; } - public static boolean enabled = true; + public static boolean enabled = false; @Override public void onLoaded() {