diff --git a/patches/api/0315-Add-Git-information-to-version-command-on-startup.patch b/patches/api/0315-Add-Git-information-to-version-command-on-startup.patch index 422587447..d5db2f52a 100644 --- a/patches/api/0315-Add-Git-information-to-version-command-on-startup.patch +++ b/patches/api/0315-Add-Git-information-to-version-command-on-startup.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Git information to version command/on startup diff --git a/src/main/java/io/papermc/paper/util/JarManifests.java b/src/main/java/io/papermc/paper/util/JarManifests.java new file mode 100644 -index 0000000000000000000000000000000000000000..cfd5fa044f58c8a5493f8efc08280b22c401a1da +index 0000000000000000000000000000000000000000..2b06b17e20826fb95c9ad58101b4102308ea4b29 --- /dev/null +++ b/src/main/java/io/papermc/paper/util/JarManifests.java -@@ -0,0 +1,32 @@ +@@ -0,0 +1,34 @@ +package io.papermc.paper.util; + +import java.io.IOException; @@ -18,8 +18,10 @@ index 0000000000000000000000000000000000000000..cfd5fa044f58c8a5493f8efc08280b22 +import java.util.Map; +import java.util.WeakHashMap; +import java.util.jar.Manifest; -+import org.checkerframework.checker.nullness.qual.Nullable; ++ +import org.jetbrains.annotations.ApiStatus; ++import org.jetbrains.annotations.NotNull; ++import org.jetbrains.annotations.Nullable; + +@ApiStatus.Internal +public final class JarManifests { @@ -28,7 +30,7 @@ index 0000000000000000000000000000000000000000..cfd5fa044f58c8a5493f8efc08280b22 + + private static final Map MANIFESTS = Collections.synchronizedMap(new WeakHashMap<>()); + -+ public static Manifest manifest(final ClassLoader loader) { ++ public static @NotNull Manifest manifest(final @NotNull ClassLoader loader) { + return MANIFESTS.computeIfAbsent(loader, classLoader -> { + final @Nullable InputStream stream = classLoader.getResourceAsStream("META-INF/MANIFEST.MF"); + if (stream == null) { diff --git a/patches/removed/1.18/0432-Optimize-isOutsideRange-to-use-distance-maps.patch b/patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 53% rename from patches/removed/1.18/0432-Optimize-isOutsideRange-to-use-distance-maps.patch rename to patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch index 66bffb1df..f5e3bcb17 100644 --- a/patches/removed/1.18/0432-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/patches/server/0432-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Optimize isOutsideRange to use distance maps Use a distance map to find the players in range quickly diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index a3ba56f437fe9e4dac59370463052341eb9b7524..c6c4d2fd3205dfcaff9e0f1a6b92b74903275991 100644 +index 51175994b37e966af8983df1f15a0fc5a638a0b5..347cf5d00d986ae8ad60af7f6eabde9fbfd78561 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -100,6 +100,18 @@ public class ChunkHolder { - } - // Paper end +@@ -73,6 +73,18 @@ public class ChunkHolder { + boolean isUpdateQueued = false; // Paper + private final ChunkMap chunkMap; // Paper + // Paper start - optimise isOutsideOfRange + // cached here to avoid a map lookup @@ -28,7 +28,7 @@ index a3ba56f437fe9e4dac59370463052341eb9b7524..c6c4d2fd3205dfcaff9e0f1a6b92b749 public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) { this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size()); this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE; -@@ -121,6 +133,7 @@ public class ChunkHolder { +@@ -94,6 +106,7 @@ public class ChunkHolder { this.setTicketLevel(level); this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()]; this.chunkMap = (ChunkMap)playersWatchingChunkProvider; // Paper @@ -37,13 +37,13 @@ index a3ba56f437fe9e4dac59370463052341eb9b7524..c6c4d2fd3205dfcaff9e0f1a6b92b749 // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 1a2e2f629840b3311b51f3810ab3a8c7257d103a..790761848d0ea0934b07c852675e8f746edac211 100644 +index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..4aad2cee76f4368f607475425c5bf516f51f830d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -205,6 +205,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - return MinecraftServer.getServer().getScaledTrackingDistance(vanilla); - } - // Paper end - use distance map to optimise tracker +@@ -176,21 +176,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + final CallbackExecutor chunkLoadConversionCallbackExecutor = new CallbackExecutor(); // Paper + // Paper start - distance maps + private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); + // Paper start - optimise PlayerChunkMap#isOutsideRange + // A note about the naming used here: + // Previously, mojang used a "spawn range" of 8 for controlling both ticking and @@ -58,53 +58,34 @@ index 1a2e2f629840b3311b51f3810ab3a8c7257d103a..790761848d0ea0934b07c852675e8f74 void addPlayerToDistanceMaps(ServerPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.getX()); -@@ -218,6 +229,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); - } - // Paper end - use distance map to optimise entity tracker + int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); + // Note: players need to be explicitly added to distance maps before they can be updated + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); -+ // Paper end - optimise PlayerChunkMap#isOutsideRange -+ // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); + // Paper end - optimise PlayerChunkMap#isOutsideRange - // Paper start - no-tick view distance - int effectiveTickViewDistance = this.getEffectiveViewDistance(); - int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -239,6 +256,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - this.playerEntityTrackerTrackMaps[i].remove(player); - } - // Paper end - use distance map to optimise tracker + } + + void removePlayerFromDistanceMaps(ServerPlayer player) { +- + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerMobSpawnMap.remove(player); + this.playerChunkTickRangeMap.remove(player); + // Paper end - optimise PlayerChunkMap#isOutsideRange - // Paper start - no-tick view distance - this.playerViewDistanceBroadcastMap.remove(player); - this.playerViewDistanceTickMap.remove(player); -@@ -258,6 +279,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); - } - // Paper end - use distance map to optimise entity tracker -+ // Paper start - optimise PlayerChunkMap#isOutsideRange -+ this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); -+ // Paper end - optimise PlayerChunkMap#isOutsideRange - // Paper start - no-tick view distance - int effectiveTickViewDistance = this.getEffectiveViewDistance(); - int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -336,7 +360,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - this.mainThreadMailbox = this.queueSorter.getProcessor(mailbox, false); - this.mailboxLight = this.queueSorter.getProcessor(lightthreaded, false);// Paper - this.lightEngine = new ThreadedLevelLightEngine(chunkProvider, this, this.level.dimensionType().hasSkyLight(), threadedmailbox1, this.queueSorter.getProcessor(threadedmailbox1, false)); -- this.distanceManager = new ChunkMap.ChunkDistanceManager(executor, mainThreadExecutor); -+ this.distanceManager = new ChunkMap.ChunkDistanceManager(executor, mainThreadExecutor); this.distanceManager.chunkMap = this; // Paper - this.overworldDataStorage = persistentStateManagerFactory; - this.poiManager = new PoiManager(new File(file, "poi"), dataFixer, dsync, world); - this.setViewDistance(viewDistance); -@@ -423,6 +447,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); - } - // Paper end - use distance map to optimise entity tracker + } + + void updateMaps(ServerPlayer player) { + int chunkX = MCUtil.getChunkCoordinate(player.getX()); + int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); + // Note: players need to be explicitly added to distance maps before they can be updated ++ this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise PlayerChunkMap#isOutsideRange + } + // Paper end + // Paper start +@@ -265,6 +284,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + this.regionManagers.add(this.dataRegionManager); + // Paper end + this.playerMobDistanceMap = this.level.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, + (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, @@ -139,8 +120,8 @@ index 1a2e2f629840b3311b51f3810ab3a8c7257d103a..790761848d0ea0934b07c852675e8f74 + // Paper end - optimise PlayerChunkMap#isOutsideRange } - // Paper start -@@ -610,6 +666,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + protected ChunkGenerator generator() { +@@ -493,6 +544,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { if (holder != null) { holder.setTicketLevel(level); @@ -148,127 +129,127 @@ index 1a2e2f629840b3311b51f3810ab3a8c7257d103a..790761848d0ea0934b07c852675e8f74 } if (holder != null) { -@@ -1431,29 +1488,50 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - return this.isOutsideOfRange(chunkPos, false); +@@ -1342,43 +1394,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + return this.anyPlayerCloseEnoughForSpawning(pos, false); } -- boolean isOutsideOfRange(ChunkPos chunkcoordintpair, boolean reducedRange) { +- boolean anyPlayerCloseEnoughForSpawning(ChunkPos chunkcoordintpair, boolean reducedRange) { - int chunkRange = level.spigotConfig.mobSpawnRange; - chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; - chunkRange = (chunkRange > 8) ? 8 : chunkRange; +- +- final int finalChunkRange = chunkRange; // Paper for lambda below +- //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event +- double blockRange = 16384.0D; // Paper +- // Spigot end +- long i = chunkcoordintpair.toLong(); + // Paper start - optimise isOutsideOfRange -+ final boolean isOutsideOfRange(ChunkPos chunkcoordintpair, boolean reducedRange) { -+ return this.isOutsideOfRange(this.getUpdatingChunkIfPresent(chunkcoordintpair.toLong()), chunkcoordintpair, reducedRange); ++ final boolean anyPlayerCloseEnoughForSpawning(ChunkPos chunkcoordintpair, boolean reducedRange) { ++ return this.anyPlayerCloseEnoughForSpawning(this.getUpdatingChunkIfPresent(chunkcoordintpair.toLong()), chunkcoordintpair, reducedRange); + } -+ final boolean isOutsideOfRange(ChunkHolder playerchunk, ChunkPos chunkcoordintpair, boolean reducedRange) { + +- if (!this.distanceManager.hasPlayersNearby(i)) { ++ final boolean anyPlayerCloseEnoughForSpawning(ChunkHolder playerchunk, ChunkPos chunkcoordintpair, boolean reducedRange) { + // this function is so hot that removing the map lookup call can have an order of magnitude impact on its performance + // tested and confirmed via System.nanoTime() + com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet playersInRange = reducedRange ? playerchunk.playersInMobSpawnRange : playerchunk.playersInChunkTickRange; + if (playersInRange == null) { -+ return true; + return false; +- } else { +- Iterator iterator = this.playerMap.getPlayers(i).iterator(); +- +- ServerPlayer entityplayer; + } + Object[] backingSet = playersInRange.getBackingSet(); -- final int finalChunkRange = chunkRange; // Paper for lambda below -- //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event -- // Spigot end -- long i = chunkcoordintpair.toLong(); -- -- return !this.distanceManager.hasPlayersNearby(i) ? true : this.playerMap.getPlayers(i).noneMatch((entityplayer) -> { -- // Paper start - add PlayerNaturallySpawnCreaturesEvent -- com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event; -- double blockRange = 16384.0D; -- if (reducedRange) { -- event = entityplayer.playerNaturallySpawnedEvent; -- if (event == null || event.isCancelled()) return false; -- blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); +- do { +- if (!iterator.hasNext()) { +- return false; + if (reducedRange) { + for (int i = 0, len = backingSet.length; i < len; ++i) { + Object raw = backingSet[i]; -+ if (!(raw instanceof ServerPlayer)) { ++ if (!(raw instanceof ServerPlayer player)) { + continue; -+ } -+ ServerPlayer player = (ServerPlayer) raw; + } +- +- entityplayer = (ServerPlayer) iterator.next(); +- // Paper start - add PlayerNaturallySpawnCreaturesEvent +- com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event; +- blockRange = 16384.0D; +- if (reducedRange) { +- event = entityplayer.playerNaturallySpawnedEvent; +- if (event == null || event.isCancelled()) return false; +- blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); + // don't check spectator and whatnot, already handled by mob spawn map update -+ if (player.lastEntitySpawnRadiusSquared > euclideanDistanceSquared(chunkcoordintpair, player)) { -+ return false; // in range -+ } - } -- // Paper end -- return !entityplayer.isSpectator() && ChunkMap.euclideanDistanceSquared(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot -- }); ++ if (this.playerIsCloseEnoughForSpawning(player, chunkcoordintpair, player.lastEntitySpawnRadiusSquared)) { ++ return true; // in range + } +- // Paper end +- } while (!this.playerIsCloseEnoughForSpawning(entityplayer, chunkcoordintpair, blockRange)); // Spigot +- +- return true; ++ } + } else { + final double range = (DistanceManager.MOB_SPAWN_RANGE * 16) * (DistanceManager.MOB_SPAWN_RANGE * 16); + // before spigot, mob spawn range was actually mob spawn range + tick range, but it was split + for (int i = 0, len = backingSet.length; i < len; ++i) { + Object raw = backingSet[i]; -+ if (!(raw instanceof ServerPlayer)) { ++ if (!(raw instanceof ServerPlayer player)) { + continue; + } -+ ServerPlayer player = (ServerPlayer) raw; + // don't check spectator and whatnot, already handled by mob spawn map update -+ if (range > euclideanDistanceSquared(chunkcoordintpair, player)) { -+ return false; // in range ++ if (this.playerIsCloseEnoughForSpawning(player, chunkcoordintpair, range)) { ++ return true; // in range + } + } -+ } + } + // no players in range -+ return true; ++ return false; ++ // Paper end - optimise isOutsideOfRange } -+ // Paper end - optimise isOutsideOfRange - private boolean skipPlayer(ServerPlayer player) { - return player.isSpectator() && !this.level.getGameRules().getBoolean(GameRules.RULE_SPECTATORSGENERATECHUNKS); + public List getPlayersCloseForSpawning(ChunkPos pos) { diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java -index b49d380ef088aed3204ec71abc437c348ef004fa..577b391dcba1db712c1e2c83296e1c87b3e34ab2 100644 +index 8868ffcda194e8c2300181a2cdda9337dbde6284..95f195980e28bb59f43e5ca1d5e79ebe8c3ddaea 100644 --- a/src/main/java/net/minecraft/server/level/DistanceManager.java +++ b/src/main/java/net/minecraft/server/level/DistanceManager.java -@@ -45,7 +45,7 @@ public abstract class DistanceManager { +@@ -48,7 +48,7 @@ public abstract class DistanceManager { final Long2ObjectMap> playersPerChunk = new Long2ObjectOpenHashMap(); public final Long2ObjectOpenHashMap>> tickets = new Long2ObjectOpenHashMap(); private final DistanceManager.ChunkTicketTracker ticketTracker = new DistanceManager.ChunkTicketTracker(); - private final DistanceManager.FixedPlayerDistanceChunkTracker naturalSpawnChunkCounter = new DistanceManager.FixedPlayerDistanceChunkTracker(8); + public static final int MOB_SPAWN_RANGE = 8; // private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); // Paper - no longer used + private final TickingTracker tickingTicketsTracker = new TickingTracker(); private final DistanceManager.PlayerTicketTracker playerTicketManager = new DistanceManager.PlayerTicketTracker(33); // Paper start use a queue, but still keep unique requirement - public final java.util.Queue pendingChunkUpdates = new java.util.ArrayDeque() { -@@ -64,6 +64,8 @@ public abstract class DistanceManager { - final Executor mainThreadExecutor; - private long ticketTickCounter; - -+ ChunkMap chunkMap; // Paper -+ - protected DistanceManager(Executor workerExecutor, Executor mainThreadExecutor) { - Objects.requireNonNull(mainThreadExecutor); - ProcessorHandle mailbox = ProcessorHandle.of("player ticket throttler", mainThreadExecutor::execute); -@@ -108,7 +110,7 @@ public abstract class DistanceManager { +@@ -125,7 +125,7 @@ public abstract class DistanceManager { protected abstract ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k); - public boolean runAllUpdates(ChunkMap playerchunkmap) { + public boolean runAllUpdates(ChunkMap chunkStorage) { - this.naturalSpawnChunkCounter.runAllUpdates(); + //this.f.a(); // Paper - no longer used + this.tickingTicketsTracker.runAllUpdates(); this.playerTicketManager.runAllUpdates(); int i = Integer.MAX_VALUE - this.ticketTracker.runDistanceUpdates(Integer.MAX_VALUE); - boolean flag = i != 0; -@@ -244,7 +246,7 @@ public abstract class DistanceManager { +@@ -272,7 +272,7 @@ public abstract class DistanceManager { ((ObjectSet) this.playersPerChunk.computeIfAbsent(i, (j) -> { return new ObjectOpenHashSet(); })).add(player); - this.naturalSpawnChunkCounter.update(i, 0, true); + //this.f.update(i, 0, true); // Paper - no longer used this.playerTicketManager.update(i, 0, true); + this.tickingTicketsTracker.addTicket(TicketType.PLAYER, chunkcoordintpair, this.getPlayerTicketLevel(), chunkcoordintpair); } - -@@ -256,7 +258,7 @@ public abstract class DistanceManager { +@@ -286,7 +286,7 @@ public abstract class DistanceManager { if (objectset != null) objectset.remove(player); // Paper - some state corruption happens here, don't crash, clean up gracefully. if (objectset == null || objectset.isEmpty()) { // Paper this.playersPerChunk.remove(i); - this.naturalSpawnChunkCounter.update(i, Integer.MAX_VALUE, false); + //this.f.update(i, Integer.MAX_VALUE, false); // Paper - no longer used this.playerTicketManager.update(i, Integer.MAX_VALUE, false); + this.tickingTicketsTracker.removeTicket(TicketType.PLAYER, chunkcoordintpair, this.getPlayerTicketLevel(), chunkcoordintpair); } - -@@ -280,13 +282,17 @@ public abstract class DistanceManager { +@@ -324,13 +324,17 @@ public abstract class DistanceManager { } public int getNaturalSpawnChunkCount() { @@ -280,62 +261,24 @@ index b49d380ef088aed3204ec71abc437c348ef004fa..577b391dcba1db712c1e2c83296e1c87 + // Paper end - use distance map to implement } - public boolean hasPlayersNearby(long i) { + public boolean hasPlayersNearby(long chunkPos) { - this.naturalSpawnChunkCounter.runAllUpdates(); -- return this.naturalSpawnChunkCounter.chunks.containsKey(i); +- return this.naturalSpawnChunkCounter.chunks.containsKey(chunkPos); + // Paper start - use distance map to implement + // note: this is the is spawn chunk method -+ return this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(i) != null; ++ return this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(chunkPos) != null; + // Paper end - use distance map to implement } public String getDebugStatus() { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index fe9711daa67151187906128c9d07ad967b72e677..0ce86c72cb829b816ec7bfb8f0d19396e1b12eb6 100644 +index a66d9d6df1fc0ad68f51ea96d4e1a2d725c73b05..00305a06885b2457615b6bd35bb1a84721ca1d77 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -892,6 +892,37 @@ public class ServerChunkCache extends ChunkSource { - boolean flag1 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit +@@ -928,15 +928,7 @@ public class ServerChunkCache extends ChunkSource { + boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit - if (!flag) { -+ // Paper start - optimize isOutisdeRange -+ ChunkMap playerChunkMap = this.chunkMap; -+ for (ServerPlayer player : this.level.players) { -+ if (!player.affectsSpawning || player.isSpectator()) { -+ playerChunkMap.playerMobSpawnMap.remove(player); -+ continue; -+ } -+ -+ int viewDistance = this.chunkMap.getEffectiveViewDistance(); -+ -+ // copied and modified from isOutisdeRange -+ int chunkRange = level.spigotConfig.mobSpawnRange; -+ chunkRange = (chunkRange > viewDistance) ? (byte)viewDistance : chunkRange; -+ chunkRange = (chunkRange > DistanceManager.MOB_SPAWN_RANGE) ? DistanceManager.MOB_SPAWN_RANGE : chunkRange; -+ -+ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(player.getBukkitEntity(), (byte)chunkRange); -+ event.callEvent(); -+ if (event.isCancelled() || event.getSpawnRadius() < 0 || playerChunkMap.playerChunkTickRangeMap.getLastViewDistance(player) == -1) { -+ playerChunkMap.playerMobSpawnMap.remove(player); -+ continue; -+ } -+ -+ int range = Math.min(event.getSpawnRadius(), 32); // limit to max view distance -+ int chunkX = net.minecraft.server.MCUtil.getChunkCoordinate(player.getX()); -+ int chunkZ = net.minecraft.server.MCUtil.getChunkCoordinate(player.getZ()); -+ -+ playerChunkMap.playerMobSpawnMap.addOrUpdate(player, chunkX, chunkZ, range); -+ player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange -+ player.playerNaturallySpawnedEvent = event; -+ } -+ // Paper end - optimize isOutisdeRange - this.level.getProfiler().push("pollingChunks"); - int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); - boolean flag2 = level.ticksPerAnimalSpawns != 0L && worlddata.getGameTime() % level.ticksPerAnimalSpawns == 0L; // CraftBukkit -@@ -922,15 +953,7 @@ public class ServerChunkCache extends ChunkSource { - List list = Lists.newArrayList(this.chunkMap.getChunks()); - - Collections.shuffle(list); + //Collections.shuffle(list); // Paper - no... just no... - // Paper start - call player naturally spawn event - int chunkRange = level.spigotConfig.mobSpawnRange; - chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; @@ -346,30 +289,30 @@ index fe9711daa67151187906128c9d07ad967b72e677..0ce86c72cb829b816ec7bfb8f0d19396 - }; - // Paper end + // Paper - moved natural spawn event up - this.level.timings.chunkTicks.startTiming(); // Paper - list.forEach((playerchunk) -> { - Optional optional = ((Either) playerchunk.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left(); -@@ -939,9 +962,9 @@ public class ServerChunkCache extends ChunkSource { - LevelChunk chunk = (LevelChunk) optional.get(); - ChunkPos chunkcoordintpair = chunk.getPos(); + Iterator iterator1 = list.iterator(); -- if (this.level.isPositionEntityTicking(chunkcoordintpair) && !this.chunkMap.noPlayersCloseForSpawning(chunkcoordintpair)) { -+ if (this.level.isPositionEntityTicking(chunkcoordintpair) && !this.chunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, false)) { // Paper - optimise isOutsideOfRange - chunk.setInhabitedTime(chunk.getInhabitedTime() + j); -- if (flag1 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunk.getPos()) && !this.chunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot -+ if (flag1 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunk.getPos()) && !this.chunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange - NaturalSpawner.spawnForChunk(this.level, chunk, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag2); - } + while (iterator1.hasNext()) { +@@ -944,9 +936,9 @@ public class ServerChunkCache extends ChunkSource { + LevelChunk chunk1 = chunkproviderserver_a.chunk; + ChunkPos chunkcoordintpair = chunk1.getPos(); + +- if (this.level.isPositionEntityTicking(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair)) { ++ if (this.level.isPositionEntityTicking(chunkcoordintpair) && this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkproviderserver_a.holder, chunkcoordintpair, false)) { // Paper - optimise isOutsideOfRange + chunk1.incrementInhabitedTime(j); +- if (flag2 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && !this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkcoordintpair, true)) { // Spigot ++ if (flag2 && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair) && !this.chunkMap.anyPlayerCloseEnoughForSpawning(chunkproviderserver_a.holder, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange + NaturalSpawner.spawnForChunk(this.level, chunk1, spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1); + } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 40692f3559eec910a653e89d3bc199fb9f17db27..0f4f07513f4fe43c059a50257fcad5c30d1cc81d 100644 +index beebb7a0e6b8b1fa4e7d2f9fdf1962357cc2ebc3..2f13055a39c26fe12d2c1094103186635e536166 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -250,6 +250,7 @@ public class ServerPlayer extends Player { +@@ -253,6 +253,7 @@ public class ServerPlayer extends Player { // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper - boolean needsChunkCenterUpdate; // Paper - no-tick view distance + public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { diff --git a/patches/removed/1.18/0431-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch similarity index 86% rename from patches/removed/1.18/0431-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch index d7150647b..638d95c81 100644 --- a/patches/removed/1.18/0431-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0433-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7257d103a 100644 +index 4aad2cee76f4368f607475425c5bf516f51f830d..0bd55c5a43bfed7d5c80f6859b2827b7da3d0804 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; +@@ -66,6 +66,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket; import net.minecraft.network.protocol.game.DebugPackets; import net.minecraft.server.MCUtil; @@ -17,10 +17,10 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.util.CsvOutput; -@@ -187,11 +188,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerViewDistanceTickMap; - public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerViewDistanceNoTickMap; - // Paper end - no-tick view distance +@@ -187,10 +188,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick + public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; + // Paper end - optimise PlayerChunkMap#isOutsideRange + // Paper start - use distance map to optimise tracker + public static boolean isLegacyTrackingEntity(Entity entity) { + return entity.isLegacyTrackingEntity; @@ -42,7 +42,6 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 void addPlayerToDistanceMaps(ServerPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); - // Note: players need to be explicitly added to distance maps before they can be updated + // Paper start - use distance map to optimise entity tracker + for (int i = 0, len = TRACKING_RANGE_TYPES.length; i < len; ++i) { + com.destroystokyo.paper.util.misc.PlayerAreaMap trackMap = this.playerEntityTrackerTrackMaps[i]; @@ -51,23 +50,22 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 + trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); + } + // Paper end - use distance map to optimise entity tracker - // Paper start - no-tick view distance - int effectiveTickViewDistance = this.getEffectiveViewDistance(); - int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -208,7 +234,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + // Note: players need to be explicitly added to distance maps before they can be updated + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); +@@ -199,6 +225,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } void removePlayerFromDistanceMaps(ServerPlayer player) { -- + // Paper start - use distance map to optimise tracker + for (int i = 0, len = TRACKING_RANGE_TYPES.length; i < len; ++i) { + this.playerEntityTrackerTrackMaps[i].remove(player); + } + // Paper end - use distance map to optimise tracker - // Paper start - no-tick view distance - this.playerViewDistanceBroadcastMap.remove(player); - this.playerViewDistanceTickMap.remove(player); -@@ -220,6 +250,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerMobSpawnMap.remove(player); + this.playerChunkTickRangeMap.remove(player); +@@ -209,6 +240,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated @@ -79,12 +77,12 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 + trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); + } + // Paper end - use distance map to optimise entity tracker - // Paper start - no-tick view distance - int effectiveTickViewDistance = this.getEffectiveViewDistance(); - int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -346,6 +384,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - }); - // Paper end - no-tick view distance + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise PlayerChunkMap#isOutsideRange + } + // Paper end +@@ -284,6 +323,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + this.regionManagers.add(this.dataRegionManager); + // Paper end this.playerMobDistanceMap = this.level.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - use distance map to optimise entity tracker + this.playerEntityTrackerTrackMaps = new com.destroystokyo.paper.util.misc.PlayerAreaMap[TRACKING_RANGE_TYPES.length]; @@ -125,10 +123,10 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 + this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); + } + // Paper end - use distance map to optimise entity tracker - } - - // Paper start -@@ -1418,17 +1495,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + // Paper start - optimise PlayerChunkMap#isOutsideRange + this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, + (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, +@@ -1517,17 +1595,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void move(ServerPlayer player) { @@ -147,7 +145,7 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 int i = SectionPos.blockToSectionCoord(player.getBlockX()); int j = SectionPos.blockToSectionCoord(player.getBlockZ()); -@@ -1583,7 +1650,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1657,7 +1725,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); @@ -156,7 +154,7 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -1627,7 +1694,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1701,7 +1769,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = null; // Paper - We're no longer tracked } @@ -193,8 +191,8 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 + // Paper end - optimized tracker List list = Lists.newArrayList(); List list1 = this.level.players(); - -@@ -1735,23 +1832,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially + ObjectIterator objectiterator = this.entityMap.values().iterator(); +@@ -1772,23 +1870,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -238,7 +236,7 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 Iterator iterator; Entity entity1; -@@ -1834,6 +1939,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1864,6 +1970,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.lastSectionPos = SectionPos.of(entity); } @@ -282,10 +280,10 @@ index 3a546b879d093702e36118231020cf41fe972410..1a2e2f629840b3311b51f3810ab3a8c7 return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false; } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fbcbe0443f843d04738938f10b433bfe1631fe78..ee461f8da2663acc45896a9ae418c2f2129e3319 100644 +index 95fcf31b0ea68312f6c3475c1b4a01ca2b269536..9d4dc7d8d8b6633a3e88a8fc43d3d798683ef1d9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -50,6 +50,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; +@@ -51,6 +51,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -293,7 +291,7 @@ index fbcbe0443f843d04738938f10b433bfe1631fe78..ee461f8da2663acc45896a9ae418c2f2 import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -@@ -350,6 +351,39 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -353,6 +354,39 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } // Paper end @@ -334,10 +332,18 @@ index fbcbe0443f843d04738938f10b433bfe1631fe78..ee461f8da2663acc45896a9ae418c2f2 this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.passengers = ImmutableList.of(); diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java -index 24b1dfcf91d36947c87e9e5c2524317f8775ba95..e5bcbfe175a697e04886d04543e1278b7e83a184 100644 +index 55ce69b5fe097841d00ef5c241459dce9bb0d4db..daaf057380a55e6841831f56657cafb5ac97fb27 100644 --- a/src/main/java/org/spigotmc/TrackingRange.java +++ b/src/main/java/org/spigotmc/TrackingRange.java -@@ -24,6 +24,7 @@ public class TrackingRange +@@ -6,6 +6,7 @@ import net.minecraft.world.entity.ExperienceOrb; + import net.minecraft.world.entity.decoration.ItemFrame; + import net.minecraft.world.entity.decoration.Painting; + import net.minecraft.world.entity.item.ItemEntity; ++import net.minecraft.world.entity.monster.Ghast; + + public class TrackingRange + { +@@ -24,6 +25,7 @@ public class TrackingRange { return defaultRange; } @@ -345,11 +351,11 @@ index 24b1dfcf91d36947c87e9e5c2524317f8775ba95..e5bcbfe175a697e04886d04543e1278b SpigotWorldConfig config = entity.level.spigotConfig; if ( entity instanceof ServerPlayer ) { -@@ -47,8 +48,48 @@ public class TrackingRange +@@ -47,8 +49,48 @@ public class TrackingRange return config.miscTrackingRange; } else { -- if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon) return ((net.minecraft.server.level.ServerLevel)(entity.getCommandSenderWorld())).getChunkSource().chunkMap.getLoadViewDistance(); // Paper - enderdragon is exempt +- if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon) return ((net.minecraft.server.level.ServerLevel)(entity.getCommandSenderWorld())).getChunkSource().chunkMap.getEffectiveViewDistance(); // Paper - enderdragon is exempt return config.otherTrackingRange; } } diff --git a/patches/removed/1.18/0431-Optimize-ServerLevels-chunk-level-checking-methods.patch b/patches/server/0434-Optimize-ServerLevels-chunk-level-checking-methods.patch similarity index 91% rename from patches/removed/1.18/0431-Optimize-ServerLevels-chunk-level-checking-methods.patch rename to patches/server/0434-Optimize-ServerLevels-chunk-level-checking-methods.patch index e1e6497e2..864655d94 100644 --- a/patches/removed/1.18/0431-Optimize-ServerLevels-chunk-level-checking-methods.patch +++ b/patches/server/0434-Optimize-ServerLevels-chunk-level-checking-methods.patch @@ -8,10 +8,10 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index cdacb26699a54659d1e43ec0f73640556a743700..32bfde94533fcba205e0de3bc55baa8359f8fae6 100644 +index cda574e825164587bd126029d5b556c049c18015..a5f0fe87bd5d75bf9a12ef284b0d635d8f6dd3a1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2136,15 +2136,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2139,15 +2139,18 @@ public class ServerLevel extends Level implements WorldGenLevel { } private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { @@ -34,10 +34,10 @@ index cdacb26699a54659d1e43ec0f73640556a743700..32bfde94533fcba205e0de3bc55baa83 private final class EntityCallbacks implements LevelCallback { diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java -index 18c8988dcb5b475c8738a313f1775b73c9d961f4..32037377737cd45fa55ecbe19c201f424a127714 100644 +index 4c5f8a103b550a681178926096d5f758654c61a7..d2952a1a84ae7326e2d4a1f19497db8f978e4688 100644 --- a/src/main/java/net/minecraft/world/level/ChunkPos.java +++ b/src/main/java/net/minecraft/world/level/ChunkPos.java -@@ -49,7 +49,7 @@ public class ChunkPos { +@@ -50,7 +50,7 @@ public class ChunkPos { } public static long asLong(BlockPos pos) { diff --git a/patches/server/0432-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0435-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/server/0432-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0435-Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/server/0433-Maps-shouldn-t-load-chunks.patch b/patches/server/0436-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from patches/server/0433-Maps-shouldn-t-load-chunks.patch rename to patches/server/0436-Maps-shouldn-t-load-chunks.patch diff --git a/patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0437-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/server/0434-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0437-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/server/0435-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0438-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/server/0435-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0438-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/server/0436-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0439-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/server/0436-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0439-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/server/0437-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0440-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/server/0437-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0440-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/server/0438-Fix-sand-duping.patch b/patches/server/0441-Fix-sand-duping.patch similarity index 100% rename from patches/server/0438-Fix-sand-duping.patch rename to patches/server/0441-Fix-sand-duping.patch diff --git a/patches/server/0439-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0442-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from patches/server/0439-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0442-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/patches/server/0440-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0443-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from patches/server/0440-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0443-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/patches/server/0441-Expose-Arrow-getItemStack.patch b/patches/server/0444-Expose-Arrow-getItemStack.patch similarity index 100% rename from patches/server/0441-Expose-Arrow-getItemStack.patch rename to patches/server/0444-Expose-Arrow-getItemStack.patch diff --git a/patches/server/0442-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0445-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/server/0442-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0445-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/patches/server/0443-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0446-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/server/0443-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0446-Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/server/0444-Add-permission-for-command-blocks.patch b/patches/server/0447-Add-permission-for-command-blocks.patch similarity index 100% rename from patches/server/0444-Add-permission-for-command-blocks.patch rename to patches/server/0447-Add-permission-for-command-blocks.patch diff --git a/patches/server/0445-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0448-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 86% rename from patches/server/0445-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0448-Ensure-Entity-AABB-s-are-never-invalid.patch index 5d1aa3472..f10b441c9 100644 --- a/patches/server/0445-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/patches/server/0448-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 95fcf31b0ea68312f6c3475c1b4a01ca2b269536..7b6f23136330e14e977dd4fe24b18339ca25be6e 100644 +index 9d4dc7d8d8b6633a3e88a8fc43d3d798683ef1d9..8f634603a871567ea7f7e237856e844caf867dc0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -555,8 +555,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -589,8 +589,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public void setPos(double x, double y, double z) { @@ -19,7 +19,7 @@ index 95fcf31b0ea68312f6c3475c1b4a01ca2b269536..7b6f23136330e14e977dd4fe24b18339 } protected AABB makeBoundingBox() { -@@ -3727,6 +3727,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3761,6 +3761,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public final void setPosRaw(double x, double y, double z) { @@ -31,7 +31,7 @@ index 95fcf31b0ea68312f6c3475c1b4a01ca2b269536..7b6f23136330e14e977dd4fe24b18339 if (this.position.x != x || this.position.y != y || this.position.z != z) { this.position = new Vec3(x, y, z); int i = Mth.floor(x); -@@ -3749,6 +3754,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3783,6 +3788,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } } diff --git a/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0449-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 100% rename from patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0449-Fix-Per-World-Difficulty-Remembering-Difficulty.patch diff --git a/patches/server/0447-Paper-dumpitem-command.patch b/patches/server/0450-Paper-dumpitem-command.patch similarity index 100% rename from patches/server/0447-Paper-dumpitem-command.patch rename to patches/server/0450-Paper-dumpitem-command.patch diff --git a/patches/server/0448-Don-t-allow-null-UUID-s-for-chat.patch b/patches/server/0451-Don-t-allow-null-UUID-s-for-chat.patch similarity index 100% rename from patches/server/0448-Don-t-allow-null-UUID-s-for-chat.patch rename to patches/server/0451-Don-t-allow-null-UUID-s-for-chat.patch diff --git a/patches/server/0449-Improve-Legacy-Component-serialization-size.patch b/patches/server/0452-Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/server/0449-Improve-Legacy-Component-serialization-size.patch rename to patches/server/0452-Improve-Legacy-Component-serialization-size.patch diff --git a/patches/server/0450-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0453-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/server/0450-Optimize-Bit-Operations-by-inlining.patch rename to patches/server/0453-Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/server/0451-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0454-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from patches/server/0451-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/0454-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/patches/server/0452-Stop-copy-on-write-operations-for-updating-light-dat.patch b/patches/server/0455-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from patches/server/0452-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to patches/server/0455-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/patches/server/0453-Support-old-UUID-format-for-NBT.patch b/patches/server/0456-Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/server/0453-Support-old-UUID-format-for-NBT.patch rename to patches/server/0456-Support-old-UUID-format-for-NBT.patch diff --git a/patches/server/0454-Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/0457-Clean-up-duplicated-GameProfile-Properties.patch similarity index 100% rename from patches/server/0454-Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/0457-Clean-up-duplicated-GameProfile-Properties.patch diff --git a/patches/server/0455-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0458-Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/server/0455-Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/0458-Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/server/0456-Remove-some-streams-from-structures.patch b/patches/server/0459-Remove-some-streams-from-structures.patch similarity index 100% rename from patches/server/0456-Remove-some-streams-from-structures.patch rename to patches/server/0459-Remove-some-streams-from-structures.patch diff --git a/patches/server/0457-Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/0460-Remove-streams-from-classes-related-villager-gossip.patch similarity index 97% rename from patches/server/0457-Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/0460-Remove-streams-from-classes-related-villager-gossip.patch index c2d659c67..23c4519a7 100644 --- a/patches/server/0457-Remove-streams-from-classes-related-villager-gossip.patch +++ b/patches/server/0460-Remove-streams-from-classes-related-villager-gossip.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove streams from classes related villager gossip diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -index 5498ec7049318dc2d10bb2ef7fbfefcf1e6e1e72..d45d14394320e87513f70a9e821fb7d179450cd9 100644 +index 971ef3d98057ede1316e07cc1e9dcb2742a42187..616e0b8e7a9846ad8ee0874c5dc3bce06de7156f 100644 --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java @@ -8,6 +8,7 @@ import com.mojang.serialization.Dynamic; diff --git a/patches/server/0458-Optimize-NibbleArray-to-use-pooled-buffers.patch b/patches/server/0461-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from patches/server/0458-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to patches/server/0461-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/patches/server/0459-Support-components-in-ItemMeta.patch b/patches/server/0462-Support-components-in-ItemMeta.patch similarity index 100% rename from patches/server/0459-Support-components-in-ItemMeta.patch rename to patches/server/0462-Support-components-in-ItemMeta.patch diff --git a/patches/server/0460-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/patches/server/0463-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch similarity index 100% rename from patches/server/0460-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch rename to patches/server/0463-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch diff --git a/patches/server/0461-Add-entity-liquid-API.patch b/patches/server/0464-Add-entity-liquid-API.patch similarity index 92% rename from patches/server/0461-Add-entity-liquid-API.patch rename to patches/server/0464-Add-entity-liquid-API.patch index 12ad8db74..bf3caa4be 100644 --- a/patches/server/0461-Add-entity-liquid-API.patch +++ b/patches/server/0464-Add-entity-liquid-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7b6f23136330e14e977dd4fe24b18339ca25be6e..b61f728c83e006197fdb158e83d04b5498133cc3 100644 +index 8f634603a871567ea7f7e237856e844caf867dc0..fb2d5c768b7dc5255db7dc7199ed750809a8fb94 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1314,7 +1314,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1348,7 +1348,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i return this.isInWater() || this.isInRain(); } diff --git a/patches/server/0462-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0465-Update-itemstack-legacy-name-and-lore.patch similarity index 100% rename from patches/server/0462-Update-itemstack-legacy-name-and-lore.patch rename to patches/server/0465-Update-itemstack-legacy-name-and-lore.patch diff --git a/patches/server/0463-Spawn-player-in-correct-world-on-login.patch b/patches/server/0466-Spawn-player-in-correct-world-on-login.patch similarity index 100% rename from patches/server/0463-Spawn-player-in-correct-world-on-login.patch rename to patches/server/0466-Spawn-player-in-correct-world-on-login.patch diff --git a/patches/server/0464-Add-PrepareResultEvent.patch b/patches/server/0467-Add-PrepareResultEvent.patch similarity index 100% rename from patches/server/0464-Add-PrepareResultEvent.patch rename to patches/server/0467-Add-PrepareResultEvent.patch diff --git a/patches/server/0465-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0468-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 90% rename from patches/server/0465-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0468-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch index 7da33864a..22a49a5fd 100644 --- a/patches/server/0465-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch +++ b/patches/server/0468-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6c4fd054a06830947dbb4728e62dc320a51f43f0..2e02fc6d9c54bd246602b8535553dd04c4e26679 100644 +index d23b82e5b6168ea618922f46a0e1ee7f46fad8f9..8fa36430da31346caa0fb1fc0b376d62bd6e247a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3362,7 +3362,7 @@ public abstract class LivingEntity extends Entity { diff --git a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0469-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 95% rename from patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to patches/server/0469-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 32bf2d4d0..1184b39dc 100644 --- a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/0469-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -80,7 +80,7 @@ index 2fe519d4059fac06781c30e140895b604e13104f..35949e9c15eb998aa89842d34d0999cd chunkData.addProperty("queued-for-unload", chunkMap.toDrop.contains(playerChunk.pos.longKey)); chunkData.addProperty("status", status == null ? "unloaded" : status.toString()); diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b8aee5eaa 100644 +index 347cf5d00d986ae8ad60af7f6eabde9fbfd78561..64fa9affc32057f09268a6f92dbc88c9decd6ed8 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -57,7 +57,7 @@ public class ChunkHolder { @@ -100,7 +100,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b boolean isUpdateQueued = false; // Paper private final ChunkMap chunkMap; // Paper -@@ -394,12 +395,18 @@ public class ChunkHolder { +@@ -407,12 +408,18 @@ public class ChunkHolder { }); } @@ -119,7 +119,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b ChunkStatus chunkstatus = ChunkHolder.getStatus(this.oldTicketLevel); ChunkStatus chunkstatus1 = ChunkHolder.getStatus(this.ticketLevel); boolean flag = this.oldTicketLevel <= ChunkMap.MAX_CHUNK_DISTANCE; -@@ -410,9 +417,22 @@ public class ChunkHolder { +@@ -423,9 +430,22 @@ public class ChunkHolder { // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins. if (playerchunk_state.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && !playerchunk_state1.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) { this.getFutureIfPresentUnchecked(ChunkStatus.FULL).thenAccept((either) -> { @@ -143,7 +143,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b // Minecraft will apply the chunks tick lists to the world once the chunk got loaded, and then store the tick // lists again inside the chunk once the chunk becomes inaccessible and set the chunk's needsSaving flag. // These actions may however happen deferred, so we manually set the needsSaving flag already here. -@@ -457,12 +477,14 @@ public class ChunkHolder { +@@ -470,12 +490,14 @@ public class ChunkHolder { this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, ChunkHolder.FullChunkStatus.BORDER); // Paper start - cache ticking ready status this.fullChunkFuture.thenAccept(either -> { @@ -158,7 +158,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b } }); this.updateChunkToSave(this.fullChunkFuture, "full"); -@@ -483,6 +505,7 @@ public class ChunkHolder { +@@ -496,6 +518,7 @@ public class ChunkHolder { this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, ChunkHolder.FullChunkStatus.TICKING); // Paper start - cache ticking ready status this.tickingChunkFuture.thenAccept(either -> { @@ -166,7 +166,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b either.ifLeft(chunk -> { // note: Here is a very good place to add callbacks to logic waiting on this. ChunkHolder.this.isTickingReady = true; -@@ -518,6 +541,7 @@ public class ChunkHolder { +@@ -531,6 +554,7 @@ public class ChunkHolder { this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, ChunkHolder.FullChunkStatus.ENTITY_TICKING); // Paper start - cache ticking ready status this.entityTickingChunkFuture.thenAccept(either -> { @@ -174,7 +174,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b either.ifLeft(chunk -> { ChunkHolder.this.isEntityTickingReady = true; // Paper start - entity ticking chunk set -@@ -544,16 +568,45 @@ public class ChunkHolder { +@@ -557,16 +581,45 @@ public class ChunkHolder { this.demoteFullChunk(chunkStorage, playerchunk_state1); } @@ -223,7 +223,7 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b }); } }).exceptionally((throwable) -> { -@@ -644,7 +697,134 @@ public class ChunkHolder { +@@ -657,7 +710,134 @@ public class ChunkHolder { }; } @@ -360,10 +360,10 @@ index 51175994b37e966af8983df1f15a0fc5a638a0b5..675c13c629e77ba50ecdad8cae43cc6b return this.isEntityTickingReady; } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a63bd921b 100644 +index 0bd55c5a43bfed7d5c80f6859b2827b7da3d0804..373ac9909666302fd6b9c6891866a9baf3977316 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -125,6 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -126,6 +126,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final ServerLevel level; private final ThreadedLevelLightEngine lightEngine; private final BlockableEventLoop mainThreadExecutor; @@ -371,7 +371,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a public ChunkGenerator generator; public final Supplier overworldDataStorage; private final PoiManager poiManager; -@@ -242,6 +243,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -300,6 +301,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level = world; this.generator = chunkGenerator; this.mainThreadExecutor = mainThreadExecutor; @@ -387,7 +387,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a ProcessorMailbox threadedmailbox = ProcessorMailbox.create(executor, "worldgen"); Objects.requireNonNull(mainThreadExecutor); -@@ -282,6 +292,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -411,6 +421,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } @@ -425,7 +425,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a // Paper start public void updatePlayerMobTypeMap(Entity entity) { if (!this.level.paperConfig.perPlayerMobSpawns) { -@@ -423,6 +464,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -552,6 +593,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider List>> list = Lists.newArrayList(); int j = centerChunk.x; int k = centerChunk.z; @@ -433,7 +433,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a for (int l = -margin; l <= margin; ++l) { for (int i1 = -margin; i1 <= margin; ++i1) { -@@ -441,6 +483,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -570,6 +612,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(j1); CompletableFuture> completablefuture = playerchunk.getOrScheduleFuture(chunkstatus, this); @@ -448,7 +448,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a list.add(completablefuture); } -@@ -712,11 +762,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -842,11 +892,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (requiredStatus == ChunkStatus.EMPTY) { return this.scheduleChunkLoad(chunkcoordintpair); } else { @@ -469,7 +469,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a if (optional.isPresent() && ((ChunkAccess) optional.get()).getStatus().isOrAfter(requiredStatus)) { CompletableFuture> completablefuture = requiredStatus.load(this.level, this.structureManager, this.lightEngine, (ichunkaccess) -> { -@@ -728,6 +786,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -858,6 +916,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { return this.scheduleChunkGeneration(holder, requiredStatus); } @@ -477,7 +477,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a } } -@@ -784,14 +843,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -914,14 +973,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; CompletableFuture chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z); @@ -507,7 +507,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a return ret; // Paper end } -@@ -843,7 +912,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -973,7 +1042,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.releaseLightTicket(chunkcoordintpair); return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); @@ -519,7 +519,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a } protected void releaseLightTicket(ChunkPos pos) { -@@ -927,7 +999,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1057,7 +1129,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider long i = chunkHolder.getPos().toLong(); Objects.requireNonNull(chunkHolder); @@ -529,7 +529,7 @@ index 7f4b68199b0cd8adb09ef09539b43e62885e19c5..896bca9ac8017ace5bc95d4ab1c2f96a } diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java -index 8868ffcda194e8c2300181a2cdda9337dbde6284..4ec7fc8081c2c3d2e2d2cfcce336e5b0a35aabda 100644 +index 95f195980e28bb59f43e5ca1d5e79ebe8c3ddaea..bf18dbe5dc137dc40f67aa9ae4cb35e7c8358f0d 100644 --- a/src/main/java/net/minecraft/server/level/DistanceManager.java +++ b/src/main/java/net/minecraft/server/level/DistanceManager.java @@ -113,6 +113,7 @@ public abstract class DistanceManager { @@ -542,7 +542,7 @@ index 8868ffcda194e8c2300181a2cdda9337dbde6284..4ec7fc8081c2c3d2e2d2cfcce336e5b0 @@ -127,6 +128,7 @@ public abstract class DistanceManager { public boolean runAllUpdates(ChunkMap chunkStorage) { - this.naturalSpawnChunkCounter.runAllUpdates(); + //this.f.a(); // Paper - no longer used this.tickingTicketsTracker.runAllUpdates(); + org.spigotmc.AsyncCatcher.catchOp("DistanceManagerTick"); // Paper this.playerTicketManager.runAllUpdates(); @@ -711,7 +711,7 @@ index 8868ffcda194e8c2300181a2cdda9337dbde6284..4ec7fc8081c2c3d2e2d2cfcce336e5b0 Ticket ticket = new Ticket<>(TicketType.FORCED, 31, pos); long i = pos.toLong(); diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index a66d9d6df1fc0ad68f51ea96d4e1a2d725c73b05..add33f9f0c568bbae2eb32a1b87fa8c20aaf1415 100644 +index 00305a06885b2457615b6bd35bb1a84721ca1d77..93b8c5c21a6a6c2475f4589014852a5178dfc13f 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -601,6 +601,26 @@ public class ServerChunkCache extends ChunkSource { @@ -796,7 +796,7 @@ index a66d9d6df1fc0ad68f51ea96d4e1a2d725c73b05..add33f9f0c568bbae2eb32a1b87fa8c2 boolean flag1 = this.chunkMap.promoteChunkMap(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index beebb7a0e6b8b1fa4e7d2f9fdf1962357cc2ebc3..42d0e3bce81b1f0ea6cb65191a87fed4054cadb4 100644 +index 2f13055a39c26fe12d2c1094103186635e536166..84f78e2b3bf51eae1d486852464df032861c5a0b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -185,6 +185,7 @@ public class ServerPlayer extends Player { @@ -807,7 +807,7 @@ index beebb7a0e6b8b1fa4e7d2f9fdf1962357cc2ebc3..42d0e3bce81b1f0ea6cb65191a87fed4 private float lastSentHealth = -1.0E8F; private int lastSentFood = -99999999; private boolean lastFoodSaturationZero = true; -@@ -327,6 +328,21 @@ public class ServerPlayer extends Player { +@@ -328,6 +329,21 @@ public class ServerPlayer extends Player { this.maxHealthCache = this.getMaxHealth(); this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } @@ -1127,19 +1127,6 @@ index 78fbb4c3e52e900956ae0811aaf934c81ee5ea48..23d13600d6925f6746dfde08e17ba578 private final String name; private final Comparator comparator; -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0bcafeb8008bd2556bcdc556b17d00ff936d7aa9..f9733ec478fe5aa0fa678a5f4482ab6e7045c033 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1550,7 +1550,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - // CraftBukkit end - - this.awaitingTeleportTime = this.tickCount; -- this.player.absMoveTo(d0, d1, d2, f, f1); -+ this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper setPositionRotation for teleportation - this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag)); - } - diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java index 4710c9d12feb12b75c497373c172ce0d4f4ab96e..338e89a2951f6f79d4dd7abf0b378b6e2ddf1f58 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1164,10 +1151,10 @@ index 4710c9d12feb12b75c497373c172ce0d4f4ab96e..338e89a2951f6f79d4dd7abf0b378b6e if (updatingChunk != null) { return updatingChunk.getEntityTickingChunkFuture(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b61f728c83e006197fdb158e83d04b5498133cc3..a6e732274018cf4864a0a3e3258bf0381f3a0c79 100644 +index fb2d5c768b7dc5255db7dc7199ed750809a8fb94..9b254d00eb0cf0c4d4fe73e7a955b0b6493a5892 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -222,7 +222,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -223,7 +223,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i private BlockPos blockPosition; private ChunkPos chunkPosition; private Vec3 deltaMovement; diff --git a/patches/server/0467-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0470-Optimize-NetworkManager-Exception-Handling.patch similarity index 100% rename from patches/server/0467-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0470-Optimize-NetworkManager-Exception-Handling.patch diff --git a/patches/server/0468-Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/server/0471-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/server/0468-Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/server/0471-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/server/0469-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0472-Fix-arrows-never-despawning-MC-125757.patch similarity index 100% rename from patches/server/0469-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0472-Fix-arrows-never-despawning-MC-125757.patch diff --git a/patches/server/0470-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0473-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/server/0470-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0473-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/server/0471-Move-range-check-for-block-placing-up.patch b/patches/server/0474-Move-range-check-for-block-placing-up.patch similarity index 97% rename from patches/server/0471-Move-range-check-for-block-placing-up.patch rename to patches/server/0474-Move-range-check-for-block-placing-up.patch index e8ef2a7ab..f7c7d2dd7 100644 --- a/patches/server/0471-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0474-Move-range-check-for-block-placing-up.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f9733ec478fe5aa0fa678a5f4482ab6e7045c033..851bbe0bab26f39f19aa85cb2779fb06c77f7e46 100644 +index 0bcafeb8008bd2556bcdc556b17d00ff936d7aa9..26bd27d3dd6e99488fd0a77257866b1eb1b191b8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1666,6 +1666,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser diff --git a/patches/server/0472-Fix-SPIGOT-5989.patch b/patches/server/0475-Fix-SPIGOT-5989.patch similarity index 100% rename from patches/server/0472-Fix-SPIGOT-5989.patch rename to patches/server/0475-Fix-SPIGOT-5989.patch diff --git a/patches/server/0473-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0476-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from patches/server/0473-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0476-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/patches/server/0474-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0477-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from patches/server/0474-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0477-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/patches/server/0475-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0478-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from patches/server/0475-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/0478-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/patches/server/0476-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/0479-Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 100% rename from patches/server/0476-Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to patches/server/0479-Add-missing-strikeLighting-call-to-World-spigot-stri.patch diff --git a/patches/server/0477-Fix-some-rails-connecting-improperly.patch b/patches/server/0480-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/server/0477-Fix-some-rails-connecting-improperly.patch rename to patches/server/0480-Fix-some-rails-connecting-improperly.patch diff --git a/patches/server/0478-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0481-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/server/0478-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0481-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/server/0479-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0482-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 100% rename from patches/server/0479-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0482-Do-not-let-the-server-load-chunks-from-newer-version.patch diff --git a/patches/server/0480-Brand-support.patch b/patches/server/0483-Brand-support.patch similarity index 97% rename from patches/server/0480-Brand-support.patch rename to patches/server/0483-Brand-support.patch index 2b5a62182..03b69330c 100644 --- a/patches/server/0480-Brand-support.patch +++ b/patches/server/0483-Brand-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 851bbe0bab26f39f19aa85cb2779fb06c77f7e46..77c98907372faa4b9dc0cfb11ceed82e03d7b6eb 100644 +index 26bd27d3dd6e99488fd0a77257866b1eb1b191b8..c5fc4a2470093202f38472df84355ba0404645c5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -4,6 +4,7 @@ import com.google.common.collect.Lists; diff --git a/patches/server/0481-Add-setMaxPlayers-API.patch b/patches/server/0484-Add-setMaxPlayers-API.patch similarity index 100% rename from patches/server/0481-Add-setMaxPlayers-API.patch rename to patches/server/0484-Add-setMaxPlayers-API.patch diff --git a/patches/server/0482-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0485-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/server/0482-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0485-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/server/0483-Don-t-require-FACING-data.patch b/patches/server/0486-Don-t-require-FACING-data.patch similarity index 100% rename from patches/server/0483-Don-t-require-FACING-data.patch rename to patches/server/0486-Don-t-require-FACING-data.patch diff --git a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0487-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 96% rename from patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0487-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 6274515c9..2e27feae7 100644 --- a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0487-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index cda574e825164587bd126029d5b556c049c18015..01b4bd2176b751f895e39002f105a171a32d65af 100644 +index a5f0fe87bd5d75bf9a12ef284b0d635d8f6dd3a1..64f5901049258c327e3fef8723da58756ce05cc6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1689,6 +1689,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0485-Add-moon-phase-API.patch b/patches/server/0488-Add-moon-phase-API.patch similarity index 100% rename from patches/server/0485-Add-moon-phase-API.patch rename to patches/server/0488-Add-moon-phase-API.patch diff --git a/patches/server/0486-Prevent-headless-pistons-from-being-created.patch b/patches/server/0489-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from patches/server/0486-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0489-Prevent-headless-pistons-from-being-created.patch diff --git a/patches/server/0487-Add-BellRingEvent.patch b/patches/server/0490-Add-BellRingEvent.patch similarity index 100% rename from patches/server/0487-Add-BellRingEvent.patch rename to patches/server/0490-Add-BellRingEvent.patch diff --git a/patches/server/0488-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0491-Add-zombie-targets-turtle-egg-config.patch similarity index 100% rename from patches/server/0488-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0491-Add-zombie-targets-turtle-egg-config.patch diff --git a/patches/server/0489-Buffer-joins-to-world.patch b/patches/server/0492-Buffer-joins-to-world.patch similarity index 100% rename from patches/server/0489-Buffer-joins-to-world.patch rename to patches/server/0492-Buffer-joins-to-world.patch diff --git a/patches/server/0490-Optimize-redstone-algorithm.patch b/patches/server/0493-Optimize-redstone-algorithm.patch similarity index 100% rename from patches/server/0490-Optimize-redstone-algorithm.patch rename to patches/server/0493-Optimize-redstone-algorithm.patch diff --git a/patches/server/0491-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0494-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 100% rename from patches/server/0491-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0494-Fix-hex-colors-not-working-in-some-kick-messages.patch diff --git a/patches/server/0492-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0495-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 100% rename from patches/server/0492-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0495-PortalCreateEvent-needs-to-know-its-entity.patch diff --git a/patches/server/0493-Fix-CraftTeam-null-check.patch b/patches/server/0496-Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/server/0493-Fix-CraftTeam-null-check.patch rename to patches/server/0496-Fix-CraftTeam-null-check.patch diff --git a/patches/server/0494-Add-more-Evoker-API.patch b/patches/server/0497-Add-more-Evoker-API.patch similarity index 100% rename from patches/server/0494-Add-more-Evoker-API.patch rename to patches/server/0497-Add-more-Evoker-API.patch diff --git a/patches/server/0495-Add-methods-to-get-translation-keys.patch b/patches/server/0498-Add-methods-to-get-translation-keys.patch similarity index 100% rename from patches/server/0495-Add-methods-to-get-translation-keys.patch rename to patches/server/0498-Add-methods-to-get-translation-keys.patch diff --git a/patches/server/0496-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0499-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/server/0496-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0499-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/server/0497-Cache-block-data-strings.patch b/patches/server/0500-Cache-block-data-strings.patch similarity index 100% rename from patches/server/0497-Cache-block-data-strings.patch rename to patches/server/0500-Cache-block-data-strings.patch diff --git a/patches/server/0498-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0501-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 85% rename from patches/server/0498-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0501-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index 4c8f952d4..36ac154bc 100644 --- a/patches/server/0498-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0501-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,7 +9,7 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 77c98907372faa4b9dc0cfb11ceed82e03d7b6eb..2074760beee6fdc2e94bb0f5dcfbae7b5813e8c9 100644 +index c5fc4a2470093202f38472df84355ba0404645c5..2074760beee6fdc2e94bb0f5dcfbae7b5813e8c9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -680,7 +680,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -21,11 +21,20 @@ index 77c98907372faa4b9dc0cfb11ceed82e03d7b6eb..2074760beee6fdc2e94bb0f5dcfbae7b this.lastGoodX = this.awaitingPositionFromClient.x; this.lastGoodY = this.awaitingPositionFromClient.y; this.lastGoodZ = this.awaitingPositionFromClient.z; +@@ -1554,7 +1554,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + // CraftBukkit end + + this.awaitingTeleportTime = this.tickCount; +- this.player.absMoveTo(d0, d1, d2, f, f1); ++ this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper setPositionRotation for teleportation + this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag)); + } + diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a6e732274018cf4864a0a3e3258bf0381f3a0c79..dc34a9140811858ac6fc6d03b7c63aac81e67ab9 100644 +index 9b254d00eb0cf0c4d4fe73e7a955b0b6493a5892..d5455fda54047ad3723772a352d35a371727f0cd 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -150,6 +150,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -151,6 +151,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i // CraftBukkit start private static final int CURRENT_LEVEL = 2; @@ -33,7 +42,7 @@ index a6e732274018cf4864a0a3e3258bf0381f3a0c79..dc34a9140811858ac6fc6d03b7c63aac static boolean isLevelAtLeast(CompoundTag tag, int level) { return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -1517,6 +1518,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1551,6 +1552,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public void moveTo(double x, double y, double z, float yaw, float pitch) { diff --git a/patches/server/0499-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0502-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/server/0499-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0502-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/server/0500-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0503-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/server/0500-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0503-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/server/0501-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0504-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 96% rename from patches/server/0501-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0504-Extend-block-drop-capture-to-capture-all-items-added.patch index 351e53142..f6c5ab16a 100644 --- a/patches/server/0501-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0504-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 01b4bd2176b751f895e39002f105a171a32d65af..5c236b0330b298bcae61112409a4a6c7f51d0530 100644 +index 64f5901049258c327e3fef8723da58756ce05cc6..22e8a349254bcf6ba39fcede60bc59d5b7190cf2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1226,6 +1226,13 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0502-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/patches/server/0505-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 84% rename from patches/server/0502-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to patches/server/0505-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index f9dd2a696..35c3a8207 100644 --- a/patches/server/0502-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/patches/server/0505-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index d03aeed657fc7e427d847e0b8e2d58c59e6851fa..3d38a5cd7db0436b4d3fe6b3476025b30d5186dc 100644 +index 64fa9affc32057f09268a6f92dbc88c9decd6ed8..04fe3432216c9a1e4d3dbfa159faf2332de422fb 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -207,6 +207,7 @@ public class ChunkHolder { +@@ -220,6 +220,7 @@ public class ChunkHolder { } public void blockChanged(BlockPos pos) { diff --git a/patches/server/0503-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0506-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 90% rename from patches/server/0503-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0506-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 5cf36c467..a57ddd84c 100644 --- a/patches/server/0503-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0506-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dc34a9140811858ac6fc6d03b7c63aac81e67ab9..f8c268fc2986eb5de7b4ffed39cbde0eb1c2ca5d 100644 +index d5455fda54047ad3723772a352d35a371727f0cd..f5198f23e6147adb69aa95d5da816eaef971f259 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3927,4 +3927,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3961,4 +3961,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i void accept(Entity entity, double x, double y, double z); } diff --git a/patches/server/0504-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0507-Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/server/0504-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0507-Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/server/0505-Entity-isTicking.patch b/patches/server/0508-Entity-isTicking.patch similarity index 85% rename from patches/server/0505-Entity-isTicking.patch rename to patches/server/0508-Entity-isTicking.patch index 76d39361a..f542ca13d 100644 --- a/patches/server/0505-Entity-isTicking.patch +++ b/patches/server/0508-Entity-isTicking.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f8c268fc2986eb5de7b4ffed39cbde0eb1c2ca5d..8e3c69e53af1e79da5fd96d722fe08e49923113f 100644 +index f5198f23e6147adb69aa95d5da816eaef971f259..8dec785700303d9206ca77ff19dc9e3628b581e5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -52,6 +52,7 @@ import net.minecraft.network.syncher.SynchedEntityData; - import net.minecraft.resources.ResourceKey; +@@ -53,6 +53,7 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; + import net.minecraft.server.MCUtil; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.TicketType; -@@ -3932,5 +3933,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3966,5 +3967,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } diff --git a/patches/server/0506-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0509-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from patches/server/0506-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0509-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/patches/server/0507-Fix-Concurrency-issue-in-WeightedList.patch b/patches/server/0510-Fix-Concurrency-issue-in-WeightedList.patch similarity index 100% rename from patches/server/0507-Fix-Concurrency-issue-in-WeightedList.patch rename to patches/server/0510-Fix-Concurrency-issue-in-WeightedList.patch diff --git a/patches/server/0508-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0511-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 100% rename from patches/server/0508-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0511-Reset-Ender-Crystals-on-Dragon-Spawn.patch diff --git a/patches/server/0509-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0512-Fix-for-large-move-vectors-crashing-server.patch similarity index 100% rename from patches/server/0509-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0512-Fix-for-large-move-vectors-crashing-server.patch diff --git a/patches/server/0510-Optimise-getType-calls.patch b/patches/server/0513-Optimise-getType-calls.patch similarity index 100% rename from patches/server/0510-Optimise-getType-calls.patch rename to patches/server/0513-Optimise-getType-calls.patch diff --git a/patches/server/0511-Villager-resetOffers.patch b/patches/server/0514-Villager-resetOffers.patch similarity index 100% rename from patches/server/0511-Villager-resetOffers.patch rename to patches/server/0514-Villager-resetOffers.patch diff --git a/patches/server/0512-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/server/0515-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 100% rename from patches/server/0512-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to patches/server/0515-Improve-inlinig-for-some-hot-IBlockData-methods.patch diff --git a/patches/server/0513-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0516-Retain-block-place-order-when-capturing-blockstates.patch similarity index 100% rename from patches/server/0513-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0516-Retain-block-place-order-when-capturing-blockstates.patch diff --git a/patches/server/0514-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0517-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from patches/server/0514-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0517-Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/patches/server/0515-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0518-Fix-item-locations-dropped-from-campfires.patch similarity index 100% rename from patches/server/0515-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0518-Fix-item-locations-dropped-from-campfires.patch diff --git a/patches/server/0516-Player-elytra-boost-API.patch b/patches/server/0519-Player-elytra-boost-API.patch similarity index 100% rename from patches/server/0516-Player-elytra-boost-API.patch rename to patches/server/0519-Player-elytra-boost-API.patch diff --git a/patches/server/0517-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0520-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/server/0517-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0520-Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/server/0518-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0521-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from patches/server/0518-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0521-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/patches/server/0519-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0522-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from patches/server/0519-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0522-Add-getOfflinePlayerIfCached-String.patch diff --git a/patches/server/0520-Add-ignore-discounts-API.patch b/patches/server/0523-Add-ignore-discounts-API.patch similarity index 100% rename from patches/server/0520-Add-ignore-discounts-API.patch rename to patches/server/0523-Add-ignore-discounts-API.patch diff --git a/patches/server/0521-Toggle-for-removing-existing-dragon.patch b/patches/server/0524-Toggle-for-removing-existing-dragon.patch similarity index 100% rename from patches/server/0521-Toggle-for-removing-existing-dragon.patch rename to patches/server/0524-Toggle-for-removing-existing-dragon.patch diff --git a/patches/server/0522-Fix-client-lag-on-advancement-loading.patch b/patches/server/0525-Fix-client-lag-on-advancement-loading.patch similarity index 100% rename from patches/server/0522-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0525-Fix-client-lag-on-advancement-loading.patch diff --git a/patches/server/0523-Item-no-age-no-player-pickup.patch b/patches/server/0526-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/server/0523-Item-no-age-no-player-pickup.patch rename to patches/server/0526-Item-no-age-no-player-pickup.patch diff --git a/patches/server/0524-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0527-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/server/0524-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0527-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/server/0525-Beacon-API-custom-effect-ranges.patch b/patches/server/0528-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from patches/server/0525-Beacon-API-custom-effect-ranges.patch rename to patches/server/0528-Beacon-API-custom-effect-ranges.patch diff --git a/patches/server/0526-Add-API-for-quit-reason.patch b/patches/server/0529-Add-API-for-quit-reason.patch similarity index 94% rename from patches/server/0526-Add-API-for-quit-reason.patch rename to patches/server/0529-Add-API-for-quit-reason.patch index 3c598188f..24c66ced6 100644 --- a/patches/server/0526-Add-API-for-quit-reason.patch +++ b/patches/server/0529-Add-API-for-quit-reason.patch @@ -25,12 +25,12 @@ index d30bc3f1da336b421d9a42070184e07169dd14e4..a6eadf71957b37e2acc5d09f0ce4ee96 Connection.LOGGER.debug("Failed to sent packet", throwable); ConnectionProtocol enumprotocol = this.getCurrentProtocol(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 42d0e3bce81b1f0ea6cb65191a87fed4054cadb4..8932fb6ab89e4de71661c0eec8397350ea4ce6f6 100644 +index 84f78e2b3bf51eae1d486852464df032861c5a0b..a32551253f12bd6f4a9008dd5d99fece6464effe 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -255,6 +255,7 @@ public class ServerPlayer extends Player { - public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper +@@ -256,6 +256,7 @@ public class ServerPlayer extends Player { + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event diff --git a/patches/server/0527-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0530-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 100% rename from patches/server/0527-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0530-Add-Wandering-Trader-spawn-rate-config-options.patch diff --git a/patches/server/0528-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0531-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/server/0528-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0531-Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/server/0529-Expose-world-spawn-angle.patch b/patches/server/0532-Expose-world-spawn-angle.patch similarity index 100% rename from patches/server/0529-Expose-world-spawn-angle.patch rename to patches/server/0532-Expose-world-spawn-angle.patch diff --git a/patches/server/0530-Add-Destroy-Speed-API.patch b/patches/server/0533-Add-Destroy-Speed-API.patch similarity index 100% rename from patches/server/0530-Add-Destroy-Speed-API.patch rename to patches/server/0533-Add-Destroy-Speed-API.patch diff --git a/patches/server/0531-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0534-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 100% rename from patches/server/0531-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0534-Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/patches/server/0532-Add-LivingEntity-clearActiveItem.patch b/patches/server/0535-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/server/0532-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0535-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/server/0533-Add-PlayerItemCooldownEvent.patch b/patches/server/0536-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/server/0533-Add-PlayerItemCooldownEvent.patch rename to patches/server/0536-Add-PlayerItemCooldownEvent.patch diff --git a/patches/server/0534-More-lightning-API.patch b/patches/server/0537-More-lightning-API.patch similarity index 100% rename from patches/server/0534-More-lightning-API.patch rename to patches/server/0537-More-lightning-API.patch diff --git a/patches/server/0535-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0538-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 98% rename from patches/server/0535-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0538-Climbing-should-not-bypass-cramming-gamerule.patch index 3156cd416..dfd3db4bc 100644 --- a/patches/server/0535-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0538-Climbing-should-not-bypass-cramming-gamerule.patch @@ -21,10 +21,10 @@ index 5c22b8993385c1e6c72fe1fbd5f14c76253eec74..0759b9dbd37ca640b7fe410e0ecb6519 private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8e3c69e53af1e79da5fd96d722fe08e49923113f..3a3f756ad620763ac63490e76200635b88df24df 100644 +index 8dec785700303d9206ca77ff19dc9e3628b581e5..1692c4992b0d037756368cc199aec387c475aec4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1698,6 +1698,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1732,6 +1732,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public boolean isPushable() { diff --git a/patches/server/0536-Added-missing-default-perms-for-commands.patch b/patches/server/0539-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/server/0536-Added-missing-default-perms-for-commands.patch rename to patches/server/0539-Added-missing-default-perms-for-commands.patch diff --git a/patches/server/0537-Add-PlayerShearBlockEvent.patch b/patches/server/0540-Add-PlayerShearBlockEvent.patch similarity index 100% rename from patches/server/0537-Add-PlayerShearBlockEvent.patch rename to patches/server/0540-Add-PlayerShearBlockEvent.patch diff --git a/patches/server/0538-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0541-Fix-curing-zombie-villager-discount-exploit.patch similarity index 100% rename from patches/server/0538-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0541-Fix-curing-zombie-villager-discount-exploit.patch diff --git a/patches/server/0539-Limit-recipe-packets.patch b/patches/server/0542-Limit-recipe-packets.patch similarity index 100% rename from patches/server/0539-Limit-recipe-packets.patch rename to patches/server/0542-Limit-recipe-packets.patch diff --git a/patches/server/0540-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0543-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/server/0540-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0543-Fix-CraftSound-backwards-compatibility.patch diff --git a/patches/server/0541-MC-4-Fix-item-position-desync.patch b/patches/server/0544-MC-4-Fix-item-position-desync.patch similarity index 95% rename from patches/server/0541-MC-4-Fix-item-position-desync.patch rename to patches/server/0544-MC-4-Fix-item-position-desync.patch index d8ce6d2d2..14f7a8807 100644 --- a/patches/server/0541-MC-4-Fix-item-position-desync.patch +++ b/patches/server/0544-MC-4-Fix-item-position-desync.patch @@ -43,10 +43,10 @@ index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f9 public Vec3 updateEntityPosition(Vec3 orig) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3a3f756ad620763ac63490e76200635b88df24df..4fb76a37e73f8186341629a77ad0bbf12bec133d 100644 +index 1692c4992b0d037756368cc199aec387c475aec4..dd99c2cff98ee6815444127701de181a84f0e4be 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3746,6 +3746,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3780,6 +3780,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) { // Paper end diff --git a/patches/server/0542-Player-Chunk-Load-Unload-Events.patch b/patches/server/0545-Player-Chunk-Load-Unload-Events.patch similarity index 90% rename from patches/server/0542-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0545-Player-Chunk-Load-Unload-Events.patch index a5d6b0bd8..03f3c00bd 100644 --- a/patches/server/0542-Player-Chunk-Load-Unload-Events.patch +++ b/patches/server/0545-Player-Chunk-Load-Unload-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player Chunk Load/Unload Events diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8932fb6ab89e4de71661c0eec8397350ea4ce6f6..820e634abadca014baf11387865118e834859f7a 100644 +index a32551253f12bd6f4a9008dd5d99fece6464effe..3b34329e2a3808e7241fe013084ea1d7ce1a7ea9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2107,11 +2107,21 @@ public class ServerPlayer extends Player { +@@ -2108,11 +2108,21 @@ public class ServerPlayer extends Player { public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { this.connection.send(chunkDataPacket); diff --git a/patches/server/0543-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0546-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/server/0543-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0546-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/server/0544-Expose-LivingEntity-hurt-direction.patch b/patches/server/0547-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/server/0544-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0547-Expose-LivingEntity-hurt-direction.patch diff --git a/patches/server/0545-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0548-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from patches/server/0545-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0548-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/patches/server/0546-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/0549-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from patches/server/0546-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/0549-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/patches/server/0547-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0550-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0547-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0550-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0548-Implement-TargetHitEvent.patch b/patches/server/0551-Implement-TargetHitEvent.patch similarity index 100% rename from patches/server/0548-Implement-TargetHitEvent.patch rename to patches/server/0551-Implement-TargetHitEvent.patch diff --git a/patches/server/0549-Additional-Block-Material-API-s.patch b/patches/server/0552-Additional-Block-Material-API-s.patch similarity index 100% rename from patches/server/0549-Additional-Block-Material-API-s.patch rename to patches/server/0552-Additional-Block-Material-API-s.patch diff --git a/patches/server/0550-Fix-harming-potion-dupe.patch b/patches/server/0553-Fix-harming-potion-dupe.patch similarity index 100% rename from patches/server/0550-Fix-harming-potion-dupe.patch rename to patches/server/0553-Fix-harming-potion-dupe.patch diff --git a/patches/server/0551-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/0554-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from patches/server/0551-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/0554-Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/patches/server/0552-Cache-burn-durations.patch b/patches/server/0555-Cache-burn-durations.patch similarity index 100% rename from patches/server/0552-Cache-burn-durations.patch rename to patches/server/0555-Cache-burn-durations.patch diff --git a/patches/server/0553-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0556-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from patches/server/0553-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0556-Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/patches/server/0554-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/0557-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 100% rename from patches/server/0554-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/0557-Fix-Not-a-string-Map-Conversion-spam.patch diff --git a/patches/server/0555-Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/0558-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/server/0555-Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0558-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/server/0556-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0559-Fix-interact-event-not-being-called-in-adventure.patch similarity index 100% rename from patches/server/0556-Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/0559-Fix-interact-event-not-being-called-in-adventure.patch diff --git a/patches/server/0557-Zombie-API-breaking-doors.patch b/patches/server/0560-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/server/0557-Zombie-API-breaking-doors.patch rename to patches/server/0560-Zombie-API-breaking-doors.patch diff --git a/patches/server/0558-Fix-nerfed-slime-when-splitting.patch b/patches/server/0561-Fix-nerfed-slime-when-splitting.patch similarity index 100% rename from patches/server/0558-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0561-Fix-nerfed-slime-when-splitting.patch diff --git a/patches/server/0559-Add-EntityLoadCrossbowEvent.patch b/patches/server/0562-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from patches/server/0559-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0562-Add-EntityLoadCrossbowEvent.patch diff --git a/patches/server/0560-Guardian-beam-workaround.patch b/patches/server/0563-Guardian-beam-workaround.patch similarity index 100% rename from patches/server/0560-Guardian-beam-workaround.patch rename to patches/server/0563-Guardian-beam-workaround.patch diff --git a/patches/server/0561-Added-WorldGameRuleChangeEvent.patch b/patches/server/0564-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from patches/server/0561-Added-WorldGameRuleChangeEvent.patch rename to patches/server/0564-Added-WorldGameRuleChangeEvent.patch diff --git a/patches/server/0562-Added-ServerResourcesReloadedEvent.patch b/patches/server/0565-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from patches/server/0562-Added-ServerResourcesReloadedEvent.patch rename to patches/server/0565-Added-ServerResourcesReloadedEvent.patch diff --git a/patches/server/0563-Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/0566-Added-world-settings-for-mobs-picking-up-loot.patch similarity index 100% rename from patches/server/0563-Added-world-settings-for-mobs-picking-up-loot.patch rename to patches/server/0566-Added-world-settings-for-mobs-picking-up-loot.patch diff --git a/patches/server/0564-Implemented-BlockFailedDispenseEvent.patch b/patches/server/0567-Implemented-BlockFailedDispenseEvent.patch similarity index 100% rename from patches/server/0564-Implemented-BlockFailedDispenseEvent.patch rename to patches/server/0567-Implemented-BlockFailedDispenseEvent.patch diff --git a/patches/server/0565-Added-PlayerLecternPageChangeEvent.patch b/patches/server/0568-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from patches/server/0565-Added-PlayerLecternPageChangeEvent.patch rename to patches/server/0568-Added-PlayerLecternPageChangeEvent.patch diff --git a/patches/server/0566-Added-PlayerLoomPatternSelectEvent.patch b/patches/server/0569-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from patches/server/0566-Added-PlayerLoomPatternSelectEvent.patch rename to patches/server/0569-Added-PlayerLoomPatternSelectEvent.patch diff --git a/patches/server/0567-Configurable-door-breaking-difficulty.patch b/patches/server/0570-Configurable-door-breaking-difficulty.patch similarity index 100% rename from patches/server/0567-Configurable-door-breaking-difficulty.patch rename to patches/server/0570-Configurable-door-breaking-difficulty.patch diff --git a/patches/server/0568-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0571-Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from patches/server/0568-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0571-Empty-commands-shall-not-be-dispatched.patch diff --git a/patches/server/0569-Implement-API-to-expose-exact-interaction-point.patch b/patches/server/0572-Implement-API-to-expose-exact-interaction-point.patch similarity index 100% rename from patches/server/0569-Implement-API-to-expose-exact-interaction-point.patch rename to patches/server/0572-Implement-API-to-expose-exact-interaction-point.patch diff --git a/patches/server/0570-Remove-stale-POIs.patch b/patches/server/0573-Remove-stale-POIs.patch similarity index 92% rename from patches/server/0570-Remove-stale-POIs.patch rename to patches/server/0573-Remove-stale-POIs.patch index 139dc0fe0..fbe61a418 100644 --- a/patches/server/0570-Remove-stale-POIs.patch +++ b/patches/server/0573-Remove-stale-POIs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5c236b0330b298bcae61112409a4a6c7f51d0530..aecd2e432be6c9843fd6b96131392fe4c0c28767 100644 +index 22e8a349254bcf6ba39fcede60bc59d5b7190cf2..e50d5850f02a8217c3ff56b3ff1627ade8546980 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1769,6 +1769,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0571-Fix-villager-boat-exploit.patch b/patches/server/0574-Fix-villager-boat-exploit.patch similarity index 100% rename from patches/server/0571-Fix-villager-boat-exploit.patch rename to patches/server/0574-Fix-villager-boat-exploit.patch diff --git a/patches/server/0572-Add-sendOpLevel-API.patch b/patches/server/0575-Add-sendOpLevel-API.patch similarity index 100% rename from patches/server/0572-Add-sendOpLevel-API.patch rename to patches/server/0575-Add-sendOpLevel-API.patch diff --git a/patches/server/0573-Add-StructureLocateEvent.patch b/patches/server/0576-Add-StructureLocateEvent.patch similarity index 100% rename from patches/server/0573-Add-StructureLocateEvent.patch rename to patches/server/0576-Add-StructureLocateEvent.patch diff --git a/patches/server/0574-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0577-Collision-option-for-requiring-a-player-participant.patch similarity index 96% rename from patches/server/0574-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0577-Collision-option-for-requiring-a-player-participant.patch index 51b74e2d7..528fcafb0 100644 --- a/patches/server/0574-Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/0577-Collision-option-for-requiring-a-player-participant.patch @@ -28,10 +28,10 @@ index 4d723f5327a64cd8257bab502ae59a35b4a35cc1..e8f5ad4925b4d02bf79f9f56d0dac3f0 public int wanderingTraderSpawnDayTicks = 24000; public int wanderingTraderSpawnChanceFailureIncrement = 25; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4fb76a37e73f8186341629a77ad0bbf12bec133d..c8ae1d96b22cd01127169cc7b39a31caaff406a9 100644 +index dd99c2cff98ee6815444127701de181a84f0e4be..2299f0724a23bec984b51b54a7b029fb7a61caef 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1581,6 +1581,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1615,6 +1615,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public void push(Entity entity) { if (!this.isPassengerOfSameVehicle(entity)) { if (!entity.noPhysics && !this.noPhysics) { diff --git a/patches/server/0575-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0578-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 100% rename from patches/server/0575-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/0578-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch diff --git a/patches/server/0576-Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/0579-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from patches/server/0576-Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/0579-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/patches/server/0577-Make-schedule-command-per-world.patch b/patches/server/0580-Make-schedule-command-per-world.patch similarity index 100% rename from patches/server/0577-Make-schedule-command-per-world.patch rename to patches/server/0580-Make-schedule-command-per-world.patch diff --git a/patches/server/0578-Configurable-max-leash-distance.patch b/patches/server/0581-Configurable-max-leash-distance.patch similarity index 100% rename from patches/server/0578-Configurable-max-leash-distance.patch rename to patches/server/0581-Configurable-max-leash-distance.patch diff --git a/patches/server/0579-Implement-BlockPreDispenseEvent.patch b/patches/server/0582-Implement-BlockPreDispenseEvent.patch similarity index 100% rename from patches/server/0579-Implement-BlockPreDispenseEvent.patch rename to patches/server/0582-Implement-BlockPreDispenseEvent.patch diff --git a/patches/server/0580-added-Wither-API.patch b/patches/server/0583-added-Wither-API.patch similarity index 100% rename from patches/server/0580-added-Wither-API.patch rename to patches/server/0583-added-Wither-API.patch diff --git a/patches/server/0581-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0584-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from patches/server/0581-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0584-Added-firing-of-PlayerChangeBeaconEffectEvent.patch diff --git a/patches/server/0582-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0585-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 100% rename from patches/server/0582-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0585-Add-toggle-for-always-placing-the-dragon-egg.patch diff --git a/patches/server/0583-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0586-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/server/0583-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0586-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/server/0584-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0587-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/server/0584-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/0587-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/server/0585-Skip-distance-map-update-when-spawning-disabled.patch b/patches/server/0588-Skip-distance-map-update-when-spawning-disabled.patch similarity index 92% rename from patches/server/0585-Skip-distance-map-update-when-spawning-disabled.patch rename to patches/server/0588-Skip-distance-map-update-when-spawning-disabled.patch index 5009b1758..93b41705a 100644 --- a/patches/server/0585-Skip-distance-map-update-when-spawning-disabled.patch +++ b/patches/server/0588-Skip-distance-map-update-when-spawning-disabled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Skip distance map update when spawning disabled. diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index add33f9f0c568bbae2eb32a1b87fa8c20aaf1415..b8090bbd6e38772a937d31b4523b27e88e6d0727 100644 +index 93b8c5c21a6a6c2475f4589014852a5178dfc13f..6f4c2d4eb5f42cd661ec6dd6c354060811e59dad 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -926,7 +926,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0586-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0589-Reset-shield-blocking-on-dimension-change.patch similarity index 83% rename from patches/server/0586-Reset-shield-blocking-on-dimension-change.patch rename to patches/server/0589-Reset-shield-blocking-on-dimension-change.patch index f49f87d1a..eed3dd0e2 100644 --- a/patches/server/0586-Reset-shield-blocking-on-dimension-change.patch +++ b/patches/server/0589-Reset-shield-blocking-on-dimension-change.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 820e634abadca014baf11387865118e834859f7a..d7bcab2d3830ccd807b0d021d71db2e2fae0c6d0 100644 +index 3b34329e2a3808e7241fe013084ea1d7ce1a7ea9..b1b90f30d19d4db44419e367aa7ffe2fe37f7c73 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1167,6 +1167,11 @@ public class ServerPlayer extends Player { +@@ -1168,6 +1168,11 @@ public class ServerPlayer extends Player { this.level.getCraftServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end } diff --git a/patches/server/0587-add-DragonEggFormEvent.patch b/patches/server/0590-add-DragonEggFormEvent.patch similarity index 100% rename from patches/server/0587-add-DragonEggFormEvent.patch rename to patches/server/0590-add-DragonEggFormEvent.patch diff --git a/patches/server/0588-EntityMoveEvent.patch b/patches/server/0591-EntityMoveEvent.patch similarity index 97% rename from patches/server/0588-EntityMoveEvent.patch rename to patches/server/0591-EntityMoveEvent.patch index ff244de79..111946f7c 100644 --- a/patches/server/0588-EntityMoveEvent.patch +++ b/patches/server/0591-EntityMoveEvent.patch @@ -17,7 +17,7 @@ index 36e59108d8939ea0c4dfbe5a24ff72b42a7f7216..07b04d6fec9bd7615129ba6bd4fd465c this.profiler.push(() -> { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index aecd2e432be6c9843fd6b96131392fe4c0c28767..cc644dc53f23ac300270dd513c277e7db3bf1898 100644 +index e50d5850f02a8217c3ff56b3ff1627ade8546980..bfedc4aab1a991d0cffca8e7a816c87c81c6f8d9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -205,6 +205,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0592-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 95% rename from patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/0592-added-option-to-disable-pathfinding-updates-on-block.patch index 7cdc8c89d..3efa57328 100644 --- a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0592-added-option-to-disable-pathfinding-updates-on-block.patch @@ -21,7 +21,7 @@ index 1eaea3659dbd99767a045e0f66143bebb604c047..3c5dd72a4c98703602c41f2a04f1c793 public boolean phantomOnlyAttackInsomniacs = true; private void phantomSettings() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index cc644dc53f23ac300270dd513c277e7db3bf1898..e72a6417409a272692fe351cda088b7477dda4af 100644 +index bfedc4aab1a991d0cffca8e7a816c87c81c6f8d9..3a776dc937d5ea08f5f7343799b00a67af197d2f 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1360,6 +1360,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0590-Inline-shift-direction-fields.patch b/patches/server/0593-Inline-shift-direction-fields.patch similarity index 100% rename from patches/server/0590-Inline-shift-direction-fields.patch rename to patches/server/0593-Inline-shift-direction-fields.patch diff --git a/patches/server/0591-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0594-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from patches/server/0591-Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/0594-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/patches/server/0592-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0595-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/server/0592-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/0595-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/server/0593-living-entity-allow-attribute-registration.patch b/patches/server/0596-living-entity-allow-attribute-registration.patch similarity index 100% rename from patches/server/0593-living-entity-allow-attribute-registration.patch rename to patches/server/0596-living-entity-allow-attribute-registration.patch diff --git a/patches/server/0594-fix-dead-slime-setSize-invincibility.patch b/patches/server/0597-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/server/0594-fix-dead-slime-setSize-invincibility.patch rename to patches/server/0597-fix-dead-slime-setSize-invincibility.patch diff --git a/patches/server/0595-Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/0598-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/server/0595-Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/0598-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0599-Add-support-for-hex-color-codes-in-console.patch similarity index 100% rename from patches/server/0596-Add-support-for-hex-color-codes-in-console.patch rename to patches/server/0599-Add-support-for-hex-color-codes-in-console.patch diff --git a/patches/server/0597-Expose-Tracked-Players.patch b/patches/server/0600-Expose-Tracked-Players.patch similarity index 100% rename from patches/server/0597-Expose-Tracked-Players.patch rename to patches/server/0600-Expose-Tracked-Players.patch diff --git a/patches/server/0598-Remove-streams-from-SensorNearest.patch b/patches/server/0601-Remove-streams-from-SensorNearest.patch similarity index 100% rename from patches/server/0598-Remove-streams-from-SensorNearest.patch rename to patches/server/0601-Remove-streams-from-SensorNearest.patch diff --git a/patches/server/0599-Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/0602-Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/server/0599-Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/0602-Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/server/0600-Improve-ServerGUI.patch b/patches/server/0603-Improve-ServerGUI.patch similarity index 100% rename from patches/server/0600-Improve-ServerGUI.patch rename to patches/server/0603-Improve-ServerGUI.patch diff --git a/patches/server/0601-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch b/patches/server/0604-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch similarity index 100% rename from patches/server/0601-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch rename to patches/server/0604-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch diff --git a/patches/server/0602-fix-converting-txt-to-json-file.patch b/patches/server/0605-fix-converting-txt-to-json-file.patch similarity index 100% rename from patches/server/0602-fix-converting-txt-to-json-file.patch rename to patches/server/0605-fix-converting-txt-to-json-file.patch diff --git a/patches/server/0603-Add-worldborder-events.patch b/patches/server/0606-Add-worldborder-events.patch similarity index 100% rename from patches/server/0603-Add-worldborder-events.patch rename to patches/server/0606-Add-worldborder-events.patch diff --git a/patches/server/0604-added-PlayerNameEntityEvent.patch b/patches/server/0607-added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/server/0604-added-PlayerNameEntityEvent.patch rename to patches/server/0607-added-PlayerNameEntityEvent.patch diff --git a/patches/server/0605-Prevent-grindstones-from-overstacking-items.patch b/patches/server/0608-Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/server/0605-Prevent-grindstones-from-overstacking-items.patch rename to patches/server/0608-Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/server/0606-Add-recipe-to-cook-events.patch b/patches/server/0609-Add-recipe-to-cook-events.patch similarity index 100% rename from patches/server/0606-Add-recipe-to-cook-events.patch rename to patches/server/0609-Add-recipe-to-cook-events.patch diff --git a/patches/server/0607-Add-Block-isValidTool.patch b/patches/server/0610-Add-Block-isValidTool.patch similarity index 100% rename from patches/server/0607-Add-Block-isValidTool.patch rename to patches/server/0610-Add-Block-isValidTool.patch diff --git a/patches/server/0608-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0611-Allow-using-signs-inside-spawn-protection.patch similarity index 100% rename from patches/server/0608-Allow-using-signs-inside-spawn-protection.patch rename to patches/server/0611-Allow-using-signs-inside-spawn-protection.patch diff --git a/patches/server/0609-Implement-Keyed-on-World.patch b/patches/server/0612-Implement-Keyed-on-World.patch similarity index 100% rename from patches/server/0609-Implement-Keyed-on-World.patch rename to patches/server/0612-Implement-Keyed-on-World.patch diff --git a/patches/server/0610-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0613-Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/server/0610-Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/0613-Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/server/0611-Item-Rarity-API.patch b/patches/server/0614-Item-Rarity-API.patch similarity index 100% rename from patches/server/0611-Item-Rarity-API.patch rename to patches/server/0614-Item-Rarity-API.patch diff --git a/patches/server/0612-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0615-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0612-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0615-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0613-copy-TESign-isEditable-from-snapshots.patch b/patches/server/0616-copy-TESign-isEditable-from-snapshots.patch similarity index 100% rename from patches/server/0613-copy-TESign-isEditable-from-snapshots.patch rename to patches/server/0616-copy-TESign-isEditable-from-snapshots.patch diff --git a/patches/server/0614-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0617-Drop-carried-item-when-player-has-disconnected.patch similarity index 100% rename from patches/server/0614-Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/0617-Drop-carried-item-when-player-has-disconnected.patch diff --git a/patches/server/0615-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0618-forced-whitelist-use-configurable-kick-message.patch similarity index 100% rename from patches/server/0615-forced-whitelist-use-configurable-kick-message.patch rename to patches/server/0618-forced-whitelist-use-configurable-kick-message.patch diff --git a/patches/server/0616-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0619-Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 100% rename from patches/server/0616-Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/0619-Don-t-ignore-result-of-PlayerEditBookEvent.patch diff --git a/patches/server/0617-Entity-load-save-limit-per-chunk.patch b/patches/server/0620-Entity-load-save-limit-per-chunk.patch similarity index 100% rename from patches/server/0617-Entity-load-save-limit-per-chunk.patch rename to patches/server/0620-Entity-load-save-limit-per-chunk.patch diff --git a/patches/server/0618-fix-cancelling-block-falling-causing-client-desync.patch b/patches/server/0621-fix-cancelling-block-falling-causing-client-desync.patch similarity index 100% rename from patches/server/0618-fix-cancelling-block-falling-causing-client-desync.patch rename to patches/server/0621-fix-cancelling-block-falling-causing-client-desync.patch diff --git a/patches/server/0619-Expose-protocol-version.patch b/patches/server/0622-Expose-protocol-version.patch similarity index 100% rename from patches/server/0619-Expose-protocol-version.patch rename to patches/server/0622-Expose-protocol-version.patch diff --git a/patches/server/0620-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch b/patches/server/0623-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch similarity index 100% rename from patches/server/0620-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch rename to patches/server/0623-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch diff --git a/patches/server/0621-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0624-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 100% rename from patches/server/0621-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0624-Enhance-console-tab-completions-for-brigadier-comman.patch diff --git a/patches/server/0622-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0625-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/server/0622-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0625-Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/server/0623-Add-bypass-host-check.patch b/patches/server/0626-Add-bypass-host-check.patch similarity index 100% rename from patches/server/0623-Add-bypass-host-check.patch rename to patches/server/0626-Add-bypass-host-check.patch diff --git a/patches/server/0624-Set-area-affect-cloud-rotation.patch b/patches/server/0627-Set-area-affect-cloud-rotation.patch similarity index 100% rename from patches/server/0624-Set-area-affect-cloud-rotation.patch rename to patches/server/0627-Set-area-affect-cloud-rotation.patch diff --git a/patches/server/0625-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0628-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/server/0625-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0628-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/server/0626-Fix-duplicating-give-items-on-item-drop-cancel.patch b/patches/server/0629-Fix-duplicating-give-items-on-item-drop-cancel.patch similarity index 100% rename from patches/server/0626-Fix-duplicating-give-items-on-item-drop-cancel.patch rename to patches/server/0629-Fix-duplicating-give-items-on-item-drop-cancel.patch diff --git a/patches/server/0627-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0630-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0627-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0630-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0628-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0631-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0628-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0631-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0629-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0632-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0629-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0632-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0630-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0633-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/server/0630-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0633-Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/server/0631-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0634-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0631-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0634-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0632-Added-PlayerDeepSleepEvent.patch b/patches/server/0635-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/server/0632-Added-PlayerDeepSleepEvent.patch rename to patches/server/0635-Added-PlayerDeepSleepEvent.patch diff --git a/patches/server/0633-More-World-API.patch b/patches/server/0636-More-World-API.patch similarity index 100% rename from patches/server/0633-More-World-API.patch rename to patches/server/0636-More-World-API.patch diff --git a/patches/server/0634-Added-PlayerBedFailEnterEvent.patch b/patches/server/0637-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0634-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0637-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0635-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0638-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0635-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0638-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0636-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0639-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/server/0636-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0639-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/server/0637-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0640-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0637-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0640-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0638-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0641-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/server/0638-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0641-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/server/0639-Add-Channel-initialization-listeners.patch b/patches/server/0642-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/server/0639-Add-Channel-initialization-listeners.patch rename to patches/server/0642-Add-Channel-initialization-listeners.patch diff --git a/patches/server/0640-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0643-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0640-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0643-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0641-Add-more-WanderingTrader-API.patch b/patches/server/0644-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0641-Add-more-WanderingTrader-API.patch rename to patches/server/0644-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0642-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0645-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0642-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0645-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/server/0643-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0646-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0643-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0646-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0644-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0647-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/server/0644-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0647-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/server/0645-Inventory-close.patch b/patches/server/0648-Inventory-close.patch similarity index 100% rename from patches/server/0645-Inventory-close.patch rename to patches/server/0648-Inventory-close.patch diff --git a/patches/server/0646-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0649-call-PortalCreateEvent-players-and-end-platform.patch similarity index 91% rename from patches/server/0646-call-PortalCreateEvent-players-and-end-platform.patch rename to patches/server/0649-call-PortalCreateEvent-players-and-end-platform.patch index 3b93eb8fb..fc1223686 100644 --- a/patches/server/0646-call-PortalCreateEvent-players-and-end-platform.patch +++ b/patches/server/0649-call-PortalCreateEvent-players-and-end-platform.patch @@ -5,10 +5,10 @@ Subject: [PATCH] call PortalCreateEvent players and end platform diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d7bcab2d3830ccd807b0d021d71db2e2fae0c6d0..8141c7b4102195ce7d11011a51228f8715c94ac1 100644 +index b1b90f30d19d4db44419e367aa7ffe2fe37f7c73..d0bb0c098f5a7fd9d0468cddc75d2fbca2880a8a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1194,15 +1194,21 @@ public class ServerPlayer extends Player { +@@ -1195,15 +1195,21 @@ public class ServerPlayer extends Player { private void createEndPlatform(ServerLevel world, BlockPos centerPos) { BlockPos.MutableBlockPos blockposition_mutableblockposition = centerPos.mutable(); diff --git a/patches/server/0647-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0650-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/server/0647-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0650-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/server/0648-Fix-CraftPotionBrewer-cache.patch b/patches/server/0651-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0648-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0651-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0649-Add-basic-Datapack-API.patch b/patches/server/0652-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0649-Add-basic-Datapack-API.patch rename to patches/server/0652-Add-basic-Datapack-API.patch diff --git a/patches/server/0650-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0653-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0650-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0653-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0651-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0654-additions-to-PlayerGameModeChangeEvent.patch similarity index 96% rename from patches/server/0651-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0654-additions-to-PlayerGameModeChangeEvent.patch index 8d00694c0..144f2f1b3 100644 --- a/patches/server/0651-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0654-additions-to-PlayerGameModeChangeEvent.patch @@ -45,10 +45,10 @@ index d75f78d2e3fb1376e8f6a8668c98a04a693c99e1..79f6089b934124c3309c6bee2e48b36b } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8141c7b4102195ce7d11011a51228f8715c94ac1..0407973474ce463a4dae91dd518e67d38def94bb 100644 +index d0bb0c098f5a7fd9d0468cddc75d2fbca2880a8a..447575a3753f92d6d4414672a1ac3dc512112a4a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1803,8 +1803,15 @@ public class ServerPlayer extends Player { +@@ -1804,8 +1804,15 @@ public class ServerPlayer extends Player { } public boolean setGameMode(GameType gameMode) { @@ -66,7 +66,7 @@ index 8141c7b4102195ce7d11011a51228f8715c94ac1..0407973474ce463a4dae91dd518e67d3 } else { this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId())); if (gameMode == GameType.SPECTATOR) { -@@ -1816,7 +1823,7 @@ public class ServerPlayer extends Player { +@@ -1817,7 +1824,7 @@ public class ServerPlayer extends Player { this.onUpdateAbilities(); this.updateEffectVisibility(); @@ -75,7 +75,7 @@ index 8141c7b4102195ce7d11011a51228f8715c94ac1..0407973474ce463a4dae91dd518e67d3 } } -@@ -2198,6 +2205,16 @@ public class ServerPlayer extends Player { +@@ -2199,6 +2206,16 @@ public class ServerPlayer extends Player { } public void loadGameTypes(@Nullable CompoundTag nbt) { diff --git a/patches/server/0652-ItemStack-repair-check-API.patch b/patches/server/0655-ItemStack-repair-check-API.patch similarity index 100% rename from patches/server/0652-ItemStack-repair-check-API.patch rename to patches/server/0655-ItemStack-repair-check-API.patch diff --git a/patches/server/0653-More-Enchantment-API.patch b/patches/server/0656-More-Enchantment-API.patch similarity index 100% rename from patches/server/0653-More-Enchantment-API.patch rename to patches/server/0656-More-Enchantment-API.patch diff --git a/patches/server/0654-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0657-Fix-and-optimise-world-force-upgrading.patch similarity index 100% rename from patches/server/0654-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0657-Fix-and-optimise-world-force-upgrading.patch diff --git a/patches/server/0655-Add-Mob-lookAt-API.patch b/patches/server/0658-Add-Mob-lookAt-API.patch similarity index 100% rename from patches/server/0655-Add-Mob-lookAt-API.patch rename to patches/server/0658-Add-Mob-lookAt-API.patch diff --git a/patches/server/0656-Add-Unix-domain-socket-support.patch b/patches/server/0659-Add-Unix-domain-socket-support.patch similarity index 100% rename from patches/server/0656-Add-Unix-domain-socket-support.patch rename to patches/server/0659-Add-Unix-domain-socket-support.patch diff --git a/patches/server/0657-Add-EntityInsideBlockEvent.patch b/patches/server/0660-Add-EntityInsideBlockEvent.patch similarity index 100% rename from patches/server/0657-Add-EntityInsideBlockEvent.patch rename to patches/server/0660-Add-EntityInsideBlockEvent.patch diff --git a/patches/server/0658-Attributes-API-for-item-defaults.patch b/patches/server/0661-Attributes-API-for-item-defaults.patch similarity index 100% rename from patches/server/0658-Attributes-API-for-item-defaults.patch rename to patches/server/0661-Attributes-API-for-item-defaults.patch diff --git a/patches/server/0659-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0662-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 98% rename from patches/server/0659-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/0662-Add-cause-to-Weather-ThunderChangeEvents.patch index f4bf22c05..9c5f4e8d0 100644 --- a/patches/server/0659-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0662-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e72a6417409a272692fe351cda088b7477dda4af..095a1850fbc0f86ed73d9e321b09e059715dd1e0 100644 +index 3a776dc937d5ea08f5f7343799b00a67af197d2f..9c4d8cb6353bb673946e9fa9402cb61e090ab8c0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -468,8 +468,8 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0660-More-Lidded-Block-API.patch b/patches/server/0663-More-Lidded-Block-API.patch similarity index 100% rename from patches/server/0660-More-Lidded-Block-API.patch rename to patches/server/0663-More-Lidded-Block-API.patch diff --git a/patches/server/0661-Limit-item-frame-cursors-on-maps.patch b/patches/server/0664-Limit-item-frame-cursors-on-maps.patch similarity index 100% rename from patches/server/0661-Limit-item-frame-cursors-on-maps.patch rename to patches/server/0664-Limit-item-frame-cursors-on-maps.patch diff --git a/patches/server/0662-Add-PlayerKickEvent-causes.patch b/patches/server/0665-Add-PlayerKickEvent-causes.patch similarity index 100% rename from patches/server/0662-Add-PlayerKickEvent-causes.patch rename to patches/server/0665-Add-PlayerKickEvent-causes.patch diff --git a/patches/server/0663-Add-PufferFishStateChangeEvent.patch b/patches/server/0666-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/server/0663-Add-PufferFishStateChangeEvent.patch rename to patches/server/0666-Add-PufferFishStateChangeEvent.patch diff --git a/patches/server/0664-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0667-Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/server/0664-Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/0667-Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/server/0665-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch b/patches/server/0668-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch similarity index 100% rename from patches/server/0665-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch rename to patches/server/0668-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch diff --git a/patches/server/0666-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0669-Add-option-to-fix-items-merging-through-walls.patch similarity index 100% rename from patches/server/0666-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0669-Add-option-to-fix-items-merging-through-walls.patch diff --git a/patches/server/0667-Add-BellRevealRaiderEvent.patch b/patches/server/0670-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/server/0667-Add-BellRevealRaiderEvent.patch rename to patches/server/0670-Add-BellRevealRaiderEvent.patch diff --git a/patches/server/0668-Fix-invulnerable-end-crystals.patch b/patches/server/0671-Fix-invulnerable-end-crystals.patch similarity index 100% rename from patches/server/0668-Fix-invulnerable-end-crystals.patch rename to patches/server/0671-Fix-invulnerable-end-crystals.patch diff --git a/patches/server/0669-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0672-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/server/0669-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0672-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/server/0670-Fix-dangerous-end-portal-logic.patch b/patches/server/0673-Fix-dangerous-end-portal-logic.patch similarity index 90% rename from patches/server/0670-Fix-dangerous-end-portal-logic.patch rename to patches/server/0673-Fix-dangerous-end-portal-logic.patch index 0930996aa..5674a127d 100644 --- a/patches/server/0670-Fix-dangerous-end-portal-logic.patch +++ b/patches/server/0673-Fix-dangerous-end-portal-logic.patch @@ -11,13 +11,13 @@ Move the tick logic into the post tick, where portaling was designed to happen in the first place. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c8ae1d96b22cd01127169cc7b39a31caaff406a9..1028f116eca1f2139b977f5a90ea6ab61171b81f 100644 +index 2299f0724a23bec984b51b54a7b029fb7a61caef..6c086e2ae3fb27058a9f6f7ad4b5d238df136b88 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -355,6 +355,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -388,6 +388,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i + return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this)); } - // Paper end - + // Paper end - optimise entity tracking + // Paper start - make end portalling safe + public BlockPos portalBlock; + public ServerLevel portalWorld; @@ -48,11 +48,10 @@ index c8ae1d96b22cd01127169cc7b39a31caaff406a9..1028f116eca1f2139b977f5a90ea6ab6 + this.teleportTo(worldserver, null); + } + // Paper end - make end portalling safe -+ + public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); - this.passengers = ImmutableList.of(); -@@ -2492,6 +2523,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -2526,6 +2556,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } this.processPortalCooldown(); diff --git a/patches/server/0671-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0674-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/server/0671-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0674-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/server/0672-Make-item-validations-configurable.patch b/patches/server/0675-Make-item-validations-configurable.patch similarity index 100% rename from patches/server/0672-Make-item-validations-configurable.patch rename to patches/server/0675-Make-item-validations-configurable.patch diff --git a/patches/server/0673-Line-Of-Sight-Changes.patch b/patches/server/0676-Line-Of-Sight-Changes.patch similarity index 100% rename from patches/server/0673-Line-Of-Sight-Changes.patch rename to patches/server/0676-Line-Of-Sight-Changes.patch diff --git a/patches/server/0674-add-per-world-spawn-limits.patch b/patches/server/0677-add-per-world-spawn-limits.patch similarity index 100% rename from patches/server/0674-add-per-world-spawn-limits.patch rename to patches/server/0677-add-per-world-spawn-limits.patch diff --git a/patches/server/0675-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0678-Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 100% rename from patches/server/0675-Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/0678-Fix-PotionSplashEvent-for-water-splash-potions.patch diff --git a/patches/server/0676-Add-more-LimitedRegion-API.patch b/patches/server/0679-Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/server/0676-Add-more-LimitedRegion-API.patch rename to patches/server/0679-Add-more-LimitedRegion-API.patch diff --git a/patches/server/0677-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0680-Fix-PlayerDropItemEvent-using-wrong-item.patch similarity index 91% rename from patches/server/0677-Fix-PlayerDropItemEvent-using-wrong-item.patch rename to patches/server/0680-Fix-PlayerDropItemEvent-using-wrong-item.patch index 606991e8a..3219fb457 100644 --- a/patches/server/0677-Fix-PlayerDropItemEvent-using-wrong-item.patch +++ b/patches/server/0680-Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0407973474ce463a4dae91dd518e67d38def94bb..254c02b88bf0025d0c4af44aa95cf29c6303345c 100644 +index 447575a3753f92d6d4414672a1ac3dc512112a4a..7255e4baae551177d7536555986aaa0f8333f626 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2174,7 +2174,7 @@ public class ServerPlayer extends Player { +@@ -2175,7 +2175,7 @@ public class ServerPlayer extends Player { if (retainOwnership) { if (!itemstack1.isEmpty()) { diff --git a/patches/server/0678-Missing-Entity-Behavior-API.patch b/patches/server/0681-Missing-Entity-Behavior-API.patch similarity index 100% rename from patches/server/0678-Missing-Entity-Behavior-API.patch rename to patches/server/0681-Missing-Entity-Behavior-API.patch diff --git a/patches/server/0679-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0682-Ensure-disconnect-for-book-edit-is-called-on-main.patch similarity index 100% rename from patches/server/0679-Ensure-disconnect-for-book-edit-is-called-on-main.patch rename to patches/server/0682-Ensure-disconnect-for-book-edit-is-called-on-main.patch diff --git a/patches/server/0680-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0683-Fix-return-value-of-Block-applyBoneMeal-always-being.patch similarity index 100% rename from patches/server/0680-Fix-return-value-of-Block-applyBoneMeal-always-being.patch rename to patches/server/0683-Fix-return-value-of-Block-applyBoneMeal-always-being.patch diff --git a/patches/server/0681-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0684-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 97% rename from patches/server/0681-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/0684-Use-getChunkIfLoadedImmediately-in-places.patch index 9c89fa136..b9acf802f 100644 --- a/patches/server/0681-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0684-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 095a1850fbc0f86ed73d9e321b09e059715dd1e0..27f03389f905e8e051eb4148016de7868c385819 100644 +index 9c4d8cb6353bb673946e9fa9402cb61e090ab8c0..709f562c5a7c907b129b30e991bb86e25634a867 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -211,7 +211,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0682-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0685-Fix-commands-from-signs-not-firing-command-events.patch similarity index 100% rename from patches/server/0682-Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/0685-Fix-commands-from-signs-not-firing-command-events.patch diff --git a/patches/server/0683-Adds-PlayerArmSwingEvent.patch b/patches/server/0686-Adds-PlayerArmSwingEvent.patch similarity index 100% rename from patches/server/0683-Adds-PlayerArmSwingEvent.patch rename to patches/server/0686-Adds-PlayerArmSwingEvent.patch diff --git a/patches/server/0684-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0687-Fixes-kick-event-leave-message-not-being-sent.patch similarity index 100% rename from patches/server/0684-Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/0687-Fixes-kick-event-leave-message-not-being-sent.patch diff --git a/patches/server/0685-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0688-Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/server/0685-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/0688-Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/server/0686-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0689-Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/server/0686-Fix-incorrect-message-for-outdated-client.patch rename to patches/server/0689-Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/server/0687-Fix-MerchantOffer-BuyB-Only-AssertionError.patch b/patches/server/0690-Fix-MerchantOffer-BuyB-Only-AssertionError.patch similarity index 100% rename from patches/server/0687-Fix-MerchantOffer-BuyB-Only-AssertionError.patch rename to patches/server/0690-Fix-MerchantOffer-BuyB-Only-AssertionError.patch diff --git a/patches/server/0688-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0691-Don-t-apply-cramming-damage-to-players.patch similarity index 93% rename from patches/server/0688-Don-t-apply-cramming-damage-to-players.patch rename to patches/server/0691-Don-t-apply-cramming-damage-to-players.patch index 65e6beca1..7c048e54a 100644 --- a/patches/server/0688-Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/0691-Don-t-apply-cramming-damage-to-players.patch @@ -25,10 +25,10 @@ index c58b18cd75eca14ce61d59c6beffa34337917ddd..f21bd06d7f0531e8ae0412377757a147 + } } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 254c02b88bf0025d0c4af44aa95cf29c6303345c..73e7df6e847a4efd4557b676f96c6af54840ea73 100644 +index 7255e4baae551177d7536555986aaa0f8333f626..6d920390ae8ac5d4388c1825c099b2461684eb9e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1433,7 +1433,7 @@ public class ServerPlayer extends Player { +@@ -1434,7 +1434,7 @@ public class ServerPlayer extends Player { @Override public boolean isInvulnerableTo(DamageSource damageSource) { diff --git a/patches/server/0689-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0692-Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 100% rename from patches/server/0689-Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/0692-Rate-options-and-timings-for-sensors-and-behaviors.patch diff --git a/patches/server/0690-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/server/0690-Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/server/0691-Stinger-API.patch b/patches/server/0694-Stinger-API.patch similarity index 100% rename from patches/server/0691-Stinger-API.patch rename to patches/server/0694-Stinger-API.patch diff --git a/patches/server/0692-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0695-Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/server/0692-Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/0695-Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/server/0693-Add-System.out-err-catcher.patch b/patches/server/0696-Add-System.out-err-catcher.patch similarity index 100% rename from patches/server/0693-Add-System.out-err-catcher.patch rename to patches/server/0696-Add-System.out-err-catcher.patch diff --git a/patches/server/0694-Fix-test-not-bootstrapping.patch b/patches/server/0697-Fix-test-not-bootstrapping.patch similarity index 100% rename from patches/server/0694-Fix-test-not-bootstrapping.patch rename to patches/server/0697-Fix-test-not-bootstrapping.patch diff --git a/patches/server/0695-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0698-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/server/0695-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/0698-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/server/0696-Improve-boat-collision-performance.patch b/patches/server/0699-Improve-boat-collision-performance.patch similarity index 100% rename from patches/server/0696-Improve-boat-collision-performance.patch rename to patches/server/0699-Improve-boat-collision-performance.patch diff --git a/patches/server/0697-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0700-Prevent-AFK-kick-while-watching-end-credits.patch similarity index 100% rename from patches/server/0697-Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/0700-Prevent-AFK-kick-while-watching-end-credits.patch diff --git a/patches/server/0698-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0701-Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/server/0698-Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/0701-Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/server/0699-Add-PlayerSetSpawnEvent.patch b/patches/server/0702-Add-PlayerSetSpawnEvent.patch similarity index 97% rename from patches/server/0699-Add-PlayerSetSpawnEvent.patch rename to patches/server/0702-Add-PlayerSetSpawnEvent.patch index 80548a1f3..48e4f24d1 100644 --- a/patches/server/0699-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0702-Add-PlayerSetSpawnEvent.patch @@ -18,10 +18,10 @@ index e95f2222814e104bf9194a96385737dffe2cb2b5..249ab7357aa19d87179fa4c3ae89d9d3 String string = resourceKey.location().toString(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 73e7df6e847a4efd4557b676f96c6af54840ea73..8c0eefb3829e3d32122efb5231c5dd1ddc302efc 100644 +index 6d920390ae8ac5d4388c1825c099b2461684eb9e..e5025e37fe13495c5ecd84af20294857f49bd2e3 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1274,7 +1274,7 @@ public class ServerPlayer extends Player { +@@ -1275,7 +1275,7 @@ public class ServerPlayer extends Player { } else if (this.bedBlocked(blockposition, enumdirection)) { return Either.left(Player.BedSleepingProblem.OBSTRUCTED); } else { @@ -30,7 +30,7 @@ index 73e7df6e847a4efd4557b676f96c6af54840ea73..8c0eefb3829e3d32122efb5231c5dd1d if (this.level.isDay()) { return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW); } else { -@@ -2102,12 +2102,33 @@ public class ServerPlayer extends Player { +@@ -2103,12 +2103,33 @@ public class ServerPlayer extends Player { return this.respawnForced; } diff --git a/patches/server/0700-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0703-Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/server/0700-Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/0703-Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/server/0701-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0704-Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/server/0701-Optimize-entity-tracker-passenger-checks.patch rename to patches/server/0704-Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/server/0702-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0705-Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/server/0702-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0705-Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/server/0703-Added-EntityDamageItemEvent.patch b/patches/server/0706-Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/server/0703-Added-EntityDamageItemEvent.patch rename to patches/server/0706-Added-EntityDamageItemEvent.patch diff --git a/patches/server/0704-Optimize-indirect-passenger-iteration.patch b/patches/server/0707-Optimize-indirect-passenger-iteration.patch similarity index 93% rename from patches/server/0704-Optimize-indirect-passenger-iteration.patch rename to patches/server/0707-Optimize-indirect-passenger-iteration.patch index 787c857b4..9f79ca0e7 100644 --- a/patches/server/0704-Optimize-indirect-passenger-iteration.patch +++ b/patches/server/0707-Optimize-indirect-passenger-iteration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1028f116eca1f2139b977f5a90ea6ab61171b81f..db7016ce7c0067bd4849298a9fc0797894e6a498 100644 +index 6c086e2ae3fb27058a9f6f7ad4b5d238df136b88..8674836b4be5e7235d7caa5c1081c500a63ffdac 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3458,26 +3458,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3491,26 +3491,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } private Stream getIndirectPassengersStream() { diff --git a/patches/server/0705-Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/0708-Fix-block-drops-position-losing-precision-millions-o.patch similarity index 100% rename from patches/server/0705-Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/0708-Fix-block-drops-position-losing-precision-millions-o.patch diff --git a/patches/server/0706-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0709-Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/server/0706-Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/0709-Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/server/0707-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0710-Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/server/0707-Make-EntityUnleashEvent-cancellable.patch rename to patches/server/0710-Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/server/0708-Clear-bucket-NBT-after-dispense.patch b/patches/server/0711-Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/server/0708-Clear-bucket-NBT-after-dispense.patch rename to patches/server/0711-Clear-bucket-NBT-after-dispense.patch diff --git a/patches/server/0709-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch b/patches/server/0712-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch similarity index 100% rename from patches/server/0709-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch rename to patches/server/0712-Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch diff --git a/patches/server/0710-Respect-despawn-rate-in-item-merge-check.patch b/patches/server/0713-Respect-despawn-rate-in-item-merge-check.patch similarity index 100% rename from patches/server/0710-Respect-despawn-rate-in-item-merge-check.patch rename to patches/server/0713-Respect-despawn-rate-in-item-merge-check.patch diff --git a/patches/server/0711-Move-BlockPistonRetractEvent-to-fix-duplication.patch b/patches/server/0714-Move-BlockPistonRetractEvent-to-fix-duplication.patch similarity index 100% rename from patches/server/0711-Move-BlockPistonRetractEvent-to-fix-duplication.patch rename to patches/server/0714-Move-BlockPistonRetractEvent-to-fix-duplication.patch diff --git a/patches/server/0712-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0715-Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/server/0712-Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/0715-Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/server/0713-Add-BlockBreakBlockEvent.patch b/patches/server/0716-Add-BlockBreakBlockEvent.patch similarity index 100% rename from patches/server/0713-Add-BlockBreakBlockEvent.patch rename to patches/server/0716-Add-BlockBreakBlockEvent.patch diff --git a/patches/server/0714-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0717-Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/server/0714-Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/0717-Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/server/0715-More-CommandBlock-API.patch b/patches/server/0718-More-CommandBlock-API.patch similarity index 100% rename from patches/server/0715-More-CommandBlock-API.patch rename to patches/server/0718-More-CommandBlock-API.patch diff --git a/patches/server/0716-Add-missing-team-sidebar-display-slots.patch b/patches/server/0719-Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/server/0716-Add-missing-team-sidebar-display-slots.patch rename to patches/server/0719-Add-missing-team-sidebar-display-slots.patch diff --git a/patches/server/0717-Add-back-EntityPortalExitEvent.patch b/patches/server/0720-Add-back-EntityPortalExitEvent.patch similarity index 92% rename from patches/server/0717-Add-back-EntityPortalExitEvent.patch rename to patches/server/0720-Add-back-EntityPortalExitEvent.patch index e4647969f..8a092218a 100644 --- a/patches/server/0717-Add-back-EntityPortalExitEvent.patch +++ b/patches/server/0720-Add-back-EntityPortalExitEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index db7016ce7c0067bd4849298a9fc0797894e6a498..e11926aa43c532aeee8c530e04b916491c126c06 100644 +index 8674836b4be5e7235d7caa5c1081c500a63ffdac..5647e8ef3daa6a1c24dd9c3b8052c5de27d0d896 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2970,6 +2970,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3003,6 +3003,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } else { // CraftBukkit start worldserver = shapedetectorshape.world; @@ -34,7 +34,7 @@ index db7016ce7c0067bd4849298a9fc0797894e6a498..e11926aa43c532aeee8c530e04b91649 this.unRide(); // CraftBukkit end -@@ -2983,8 +3002,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3016,8 +3035,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i if (entity != null) { entity.restoreFrom(this); diff --git a/patches/server/0718-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0721-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 96% rename from patches/server/0718-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/0721-Add-methods-to-find-targets-for-lightning-strikes.patch index f8134af39..50a462f34 100644 --- a/patches/server/0718-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0721-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add methods to find targets for lightning strikes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 27f03389f905e8e051eb4148016de7868c385819..b8e7f70f4ee1b28635537e04f7bd0d0cd6afb4b3 100644 +index 709f562c5a7c907b129b30e991bb86e25634a867..5fd96595d44a47b43c5787c9dd1f4f5cfe6943fa 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -748,6 +748,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0719-Get-entity-default-attributes.patch b/patches/server/0722-Get-entity-default-attributes.patch similarity index 100% rename from patches/server/0719-Get-entity-default-attributes.patch rename to patches/server/0722-Get-entity-default-attributes.patch diff --git a/patches/server/0720-Left-handed-API.patch b/patches/server/0723-Left-handed-API.patch similarity index 100% rename from patches/server/0720-Left-handed-API.patch rename to patches/server/0723-Left-handed-API.patch diff --git a/patches/server/0721-Add-advancement-display-API.patch b/patches/server/0724-Add-advancement-display-API.patch similarity index 100% rename from patches/server/0721-Add-advancement-display-API.patch rename to patches/server/0724-Add-advancement-display-API.patch diff --git a/patches/server/0722-Add-ItemFactory-getMonsterEgg-API.patch b/patches/server/0725-Add-ItemFactory-getMonsterEgg-API.patch similarity index 100% rename from patches/server/0722-Add-ItemFactory-getMonsterEgg-API.patch rename to patches/server/0725-Add-ItemFactory-getMonsterEgg-API.patch diff --git a/patches/server/0723-Add-critical-damage-API.patch b/patches/server/0726-Add-critical-damage-API.patch similarity index 83% rename from patches/server/0723-Add-critical-damage-API.patch rename to patches/server/0726-Add-critical-damage-API.patch index 1751c5333..f94c86c98 100644 --- a/patches/server/0723-Add-critical-damage-API.patch +++ b/patches/server/0726-Add-critical-damage-API.patch @@ -28,39 +28,6 @@ index 80d19af2ad423bd3de0e039c5bb8f97af536aaa9..a828cad27fcd39f8bfbaefa97052a2a3 public static DamageSource sting(LivingEntity attacker) { return new EntityDamageSource("sting", attacker); -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3f9e3415db6cfee317da695793d295660ef29b18..beebd31d7a82a4edae0e2e7c5890cd13fbb6c4df 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2570,15 +2570,27 @@ public abstract class LivingEntity extends Entity { - return this.hasEffect(MobEffects.JUMP) ? (double) (0.1F * (float) (this.getEffect(MobEffects.JUMP).getAmplifier() + 1)) : 0.0D; - } - -+ protected long lastJumpTime = 0L; // Paper - add critical damage API - protected void jumpFromGround() { - double d0 = (double) this.getJumpPower() + this.getJumpBoostPower(); - Vec3 vec3d = this.getDeltaMovement(); -+ // Paper start - add critical damage API -+ long time = System.nanoTime(); -+ boolean canCrit = true; -+ if (this instanceof net.minecraft.world.entity.player.Player) { -+ canCrit = false; -+ if (time - this.lastJumpTime > (long)(0.250e9)) { -+ this.lastJumpTime = time; -+ canCrit = true; -+ } -+ } -+ // Paper end - add critical damage API - - this.setDeltaMovement(vec3d.x, d0, vec3d.z); - if (this.isSprinting()) { - float f = this.getYRot() * 0.017453292F; - -- this.setDeltaMovement(this.getDeltaMovement().add((double) (-Mth.sin(f) * 0.2F), 0.0D, (double) (Mth.cos(f) * 0.2F))); -+ if (canCrit) this.setDeltaMovement(this.getDeltaMovement().add((double) (-Mth.sin(f) * 0.2F), 0.0D, (double) (Mth.cos(f) * 0.2F))); // Paper - add critical damage API - } - - this.hasImpulse = true; diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java index 44c2820a33ed40b4ef2ebd20708347d3cc2437ae..b6f8e94df86c174569ccbc69cfd031cc08271dd3 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/patches/server/0724-Fix-issues-with-mob-conversion.patch b/patches/server/0727-Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/server/0724-Fix-issues-with-mob-conversion.patch rename to patches/server/0727-Fix-issues-with-mob-conversion.patch diff --git a/patches/server/0725-Add-isCollidable-methods-to-various-places.patch b/patches/server/0728-Add-isCollidable-methods-to-various-places.patch similarity index 100% rename from patches/server/0725-Add-isCollidable-methods-to-various-places.patch rename to patches/server/0728-Add-isCollidable-methods-to-various-places.patch diff --git a/patches/server/0726-Goat-ram-API.patch b/patches/server/0729-Goat-ram-API.patch similarity index 100% rename from patches/server/0726-Goat-ram-API.patch rename to patches/server/0729-Goat-ram-API.patch diff --git a/patches/server/0727-Add-API-for-resetting-a-single-score.patch b/patches/server/0730-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/server/0727-Add-API-for-resetting-a-single-score.patch rename to patches/server/0730-Add-API-for-resetting-a-single-score.patch diff --git a/patches/server/0728-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0731-Add-Raw-Byte-Entity-Serialization.patch similarity index 96% rename from patches/server/0728-Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/0731-Add-Raw-Byte-Entity-Serialization.patch index cd07ac057..981d88e29 100644 --- a/patches/server/0728-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0731-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e11926aa43c532aeee8c530e04b916491c126c06..4a763c6321abed6955a8adfb6dfd4f9f4593bc2f 100644 +index 5647e8ef3daa6a1c24dd9c3b8052c5de27d0d896..c71e0753e2d9974e56733f6ca46e1e9b76206965 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1788,6 +1788,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1821,6 +1821,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } } diff --git a/patches/server/0729-Vanilla-command-permission-fixes.patch b/patches/server/0732-Vanilla-command-permission-fixes.patch similarity index 100% rename from patches/server/0729-Vanilla-command-permission-fixes.patch rename to patches/server/0732-Vanilla-command-permission-fixes.patch diff --git a/patches/server/0730-Make-CallbackExecutor-strict-again.patch b/patches/server/0733-Make-CallbackExecutor-strict-again.patch similarity index 93% rename from patches/server/0730-Make-CallbackExecutor-strict-again.patch rename to patches/server/0733-Make-CallbackExecutor-strict-again.patch index aaf497413..867395d7e 100644 --- a/patches/server/0730-Make-CallbackExecutor-strict-again.patch +++ b/patches/server/0733-Make-CallbackExecutor-strict-again.patch @@ -10,10 +10,10 @@ schedules. Effectively, use the callback executor as a tool of finding issues rather than hiding these issues. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index a9a8bf399871f88ef71a803c60e29ea082030d87..241568886a146501c1f49d7997660fbadb2d1e4b 100644 +index 373ac9909666302fd6b9c6891866a9baf3977316..5eeabc64d5067361c27b68e4268de3596c29787e 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -157,17 +157,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -158,17 +158,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/patches/server/0731-Do-not-allow-the-server-to-unload-chunks-at-request-.patch b/patches/server/0734-Do-not-allow-the-server-to-unload-chunks-at-request-.patch similarity index 92% rename from patches/server/0731-Do-not-allow-the-server-to-unload-chunks-at-request-.patch rename to patches/server/0734-Do-not-allow-the-server-to-unload-chunks-at-request-.patch index 48ed131af..ceb37b600 100644 --- a/patches/server/0731-Do-not-allow-the-server-to-unload-chunks-at-request-.patch +++ b/patches/server/0734-Do-not-allow-the-server-to-unload-chunks-at-request-.patch @@ -10,7 +10,7 @@ to be unloaded will simply be unloaded next tick, rather than immediately. diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index b8090bbd6e38772a937d31b4523b27e88e6d0727..d5fad1d1b586ce9d405f986b34a8a935f9d3490a 100644 +index 6f4c2d4eb5f42cd661ec6dd6c354060811e59dad..ccf5caeca8d3a0b045296d550fbd0e447fd34309 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -875,6 +875,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0732-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0735-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 93% rename from patches/server/0732-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/0735-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 09bf2797d..8fa350193 100644 --- a/patches/server/0732-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0735-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b8e7f70f4ee1b28635537e04f7bd0d0cd6afb4b3..82ae5094025c7d86ba6fdbf4334b2575e7b6afa1 100644 +index 5fd96595d44a47b43c5787c9dd1f4f5cfe6943fa..5d57431a369207a2f207f89682f0861027906370 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1272,9 +1272,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -28,10 +28,10 @@ index b8e7f70f4ee1b28635537e04f7bd0d0cd6afb4b3..82ae5094025c7d86ba6fdbf4334b2575 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8c0eefb3829e3d32122efb5231c5dd1ddc302efc..03400c55ff5929e88161f1915a2df140b3830dff 100644 +index e5025e37fe13495c5ecd84af20294857f49bd2e3..9897435b97459fa3a9376fbdc93cba68d7f6f46d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1575,6 +1575,18 @@ public class ServerPlayer extends Player { +@@ -1576,6 +1576,18 @@ public class ServerPlayer extends Player { this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); this.doCloseContainer(); } diff --git a/patches/server/0733-Correctly-handle-recursion-for-chunkholder-updates.patch b/patches/server/0736-Correctly-handle-recursion-for-chunkholder-updates.patch similarity index 90% rename from patches/server/0733-Correctly-handle-recursion-for-chunkholder-updates.patch rename to patches/server/0736-Correctly-handle-recursion-for-chunkholder-updates.patch index 576a603a7..f10caff2f 100644 --- a/patches/server/0733-Correctly-handle-recursion-for-chunkholder-updates.patch +++ b/patches/server/0736-Correctly-handle-recursion-for-chunkholder-updates.patch @@ -8,10 +8,10 @@ cause a recursive call which would handle the increase but then the caller would think the chunk would be unloaded. diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 3d38a5cd7db0436b4d3fe6b3476025b30d5186dc..bad5b629b0c15432a723db0c2275a5abdeda3ea0 100644 +index 04fe3432216c9a1e4d3dbfa159faf2332de422fb..870c601c5ab839d7ee3cbdf8885bb665c89a441d 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -406,8 +406,10 @@ public class ChunkHolder { +@@ -419,8 +419,10 @@ public class ChunkHolder { playerchunkmap.onFullChunkStatusChange(this.pos, playerchunk_state); } @@ -22,7 +22,7 @@ index 3d38a5cd7db0436b4d3fe6b3476025b30d5186dc..bad5b629b0c15432a723db0c2275a5ab ChunkStatus chunkstatus = ChunkHolder.getStatus(this.oldTicketLevel); ChunkStatus chunkstatus1 = ChunkHolder.getStatus(this.ticketLevel); boolean flag = this.oldTicketLevel <= ChunkMap.MAX_CHUNK_DISTANCE; -@@ -449,6 +451,12 @@ public class ChunkHolder { +@@ -462,6 +464,12 @@ public class ChunkHolder { // Run callback right away if the future was already done chunkStorage.callbackExecutor.run(); diff --git a/patches/server/0734-Separate-lookup-locking-from-state-access-in-UserCac.patch b/patches/server/0737-Separate-lookup-locking-from-state-access-in-UserCac.patch similarity index 100% rename from patches/server/0734-Separate-lookup-locking-from-state-access-in-UserCac.patch rename to patches/server/0737-Separate-lookup-locking-from-state-access-in-UserCac.patch diff --git a/patches/server/0735-Fix-chunks-refusing-to-unload-at-low-TPS.patch b/patches/server/0738-Fix-chunks-refusing-to-unload-at-low-TPS.patch similarity index 88% rename from patches/server/0735-Fix-chunks-refusing-to-unload-at-low-TPS.patch rename to patches/server/0738-Fix-chunks-refusing-to-unload-at-low-TPS.patch index ab5306271..babcd3b26 100644 --- a/patches/server/0735-Fix-chunks-refusing-to-unload-at-low-TPS.patch +++ b/patches/server/0738-Fix-chunks-refusing-to-unload-at-low-TPS.patch @@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate executor to get this effect, rather than the main mailbox. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 241568886a146501c1f49d7997660fbadb2d1e4b..8ca03064b9a1fb66f8b77a121124176707b9b1b9 100644 +index 5eeabc64d5067361c27b68e4268de3596c29787e..66dd1759bb38ebcba49e5858121bfa2bad1ae2f3 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1090,9 +1090,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1220,9 +1220,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return chunk; }); diff --git a/patches/server/0736-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/server/0739-Do-not-allow-ticket-level-changes-while-unloading-pl.patch similarity index 89% rename from patches/server/0736-Do-not-allow-ticket-level-changes-while-unloading-pl.patch rename to patches/server/0739-Do-not-allow-ticket-level-changes-while-unloading-pl.patch index d692c0e55..4399fcb3e 100644 --- a/patches/server/0736-Do-not-allow-ticket-level-changes-while-unloading-pl.patch +++ b/patches/server/0739-Do-not-allow-ticket-level-changes-while-unloading-pl.patch @@ -8,10 +8,10 @@ Sync loading the chunk at this stage would cause it to load older data, as well as screwing our region state. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 8ca03064b9a1fb66f8b77a121124176707b9b1b9..32b101b85cce51e35905357a3f80b46f340add1a 100644 +index 66dd1759bb38ebcba49e5858121bfa2bad1ae2f3..f7ea3b293dd042127a2a674feee6777dfb6619c3 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -236,6 +236,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -294,6 +294,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } // Paper end @@ -19,7 +19,7 @@ index 8ca03064b9a1fb66f8b77a121124176707b9b1b9..32b101b85cce51e35905357a3f80b46f public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); this.visibleChunkMap = this.updatingChunkMap.clone(); -@@ -549,6 +550,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -678,6 +679,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Nullable ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k) { @@ -27,7 +27,7 @@ index 8ca03064b9a1fb66f8b77a121124176707b9b1b9..32b101b85cce51e35905357a3f80b46f if (k > ChunkMap.MAX_CHUNK_DISTANCE && level > ChunkMap.MAX_CHUNK_DISTANCE) { return holder; } else { -@@ -708,6 +710,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -838,6 +840,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (completablefuture1 != completablefuture) { this.scheduleUnload(pos, holder); } else { @@ -40,7 +40,7 @@ index 8ca03064b9a1fb66f8b77a121124176707b9b1b9..32b101b85cce51e35905357a3f80b46f // Paper start boolean removed; if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) { -@@ -743,6 +751,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -873,6 +881,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } } // Paper end @@ -49,7 +49,7 @@ index 8ca03064b9a1fb66f8b77a121124176707b9b1b9..32b101b85cce51e35905357a3f80b46f } }; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index d5fad1d1b586ce9d405f986b34a8a935f9d3490a..fd419bf8780e148fb8235f3c11cfde36eb621f5e 100644 +index ccf5caeca8d3a0b045296d550fbd0e447fd34309..64ea7ec9fdb5a90a7806574280a343d0a608f3b3 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -820,6 +820,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0737-Do-not-allow-ticket-level-changes-when-updating-chun.patch b/patches/server/0740-Do-not-allow-ticket-level-changes-when-updating-chun.patch similarity index 91% rename from patches/server/0737-Do-not-allow-ticket-level-changes-when-updating-chun.patch rename to patches/server/0740-Do-not-allow-ticket-level-changes-when-updating-chun.patch index 66d4b5f21..7658c9344 100644 --- a/patches/server/0737-Do-not-allow-ticket-level-changes-when-updating-chun.patch +++ b/patches/server/0740-Do-not-allow-ticket-level-changes-when-updating-chun.patch @@ -8,10 +8,10 @@ This WILL cause state corruption if it happens. So, don't allow it. diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index bad5b629b0c15432a723db0c2275a5abdeda3ea0..663fe2ddad1a65862c6bd4fe15f047e270bcd3ba 100644 +index 870c601c5ab839d7ee3cbdf8885bb665c89a441d..4e3d4195db3660edd2b9ee850b774be91455fb84 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -386,7 +386,13 @@ public class ChunkHolder { +@@ -399,7 +399,13 @@ public class ChunkHolder { CompletableFuture completablefuture1 = new CompletableFuture(); completablefuture1.thenRunAsync(() -> { @@ -25,7 +25,7 @@ index bad5b629b0c15432a723db0c2275a5abdeda3ea0..663fe2ddad1a65862c6bd4fe15f047e2 }, executor); this.pendingFullStateConfirmation = completablefuture1; completablefuture.thenAccept((either) -> { -@@ -403,7 +409,12 @@ public class ChunkHolder { +@@ -416,7 +422,12 @@ public class ChunkHolder { private void demoteFullChunk(ChunkMap playerchunkmap, ChunkHolder.FullChunkStatus playerchunk_state) { this.pendingFullStateConfirmation.cancel(false); diff --git a/patches/server/0738-Do-not-submit-profile-lookups-to-worldgen-threads.patch b/patches/server/0741-Do-not-submit-profile-lookups-to-worldgen-threads.patch similarity index 100% rename from patches/server/0738-Do-not-submit-profile-lookups-to-worldgen-threads.patch rename to patches/server/0741-Do-not-submit-profile-lookups-to-worldgen-threads.patch diff --git a/patches/server/0739-Log-when-the-async-catcher-is-tripped.patch b/patches/server/0742-Log-when-the-async-catcher-is-tripped.patch similarity index 100% rename from patches/server/0739-Log-when-the-async-catcher-is-tripped.patch rename to patches/server/0742-Log-when-the-async-catcher-is-tripped.patch diff --git a/patches/server/0740-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0743-Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/server/0740-Sanitize-ResourceLocation-error-logging.patch rename to patches/server/0743-Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/server/0741-Optimise-general-POI-access.patch b/patches/server/0744-Optimise-general-POI-access.patch similarity index 100% rename from patches/server/0741-Optimise-general-POI-access.patch rename to patches/server/0744-Optimise-general-POI-access.patch diff --git a/patches/server/0742-Allow-controlled-flushing-for-network-manager.patch b/patches/server/0745-Allow-controlled-flushing-for-network-manager.patch similarity index 100% rename from patches/server/0742-Allow-controlled-flushing-for-network-manager.patch rename to patches/server/0745-Allow-controlled-flushing-for-network-manager.patch diff --git a/patches/server/0743-Add-more-async-catchers.patch b/patches/server/0746-Add-more-async-catchers.patch similarity index 96% rename from patches/server/0743-Add-more-async-catchers.patch rename to patches/server/0746-Add-more-async-catchers.patch index ad4afa296..9eca07f14 100644 --- a/patches/server/0743-Add-more-async-catchers.patch +++ b/patches/server/0746-Add-more-async-catchers.patch @@ -31,7 +31,7 @@ index f01182a0ac8a14bcd5b1deb778306e7bf1bf70ed..b27c8db914cca3ff0ea8a24acddb9cb9 throw new UnsupportedOperationException("Only one concurrent iteration supported"); } else { diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java -index e19f5b2c8f485d596a64d5d96e75fa1f4a8255b5..14487f7b1f684ae17fd77aa0632fc61829ee691b 100644 +index ccafd28e3dc9a03f310eb5bdde85fcb277ef5116..aa3217425a64fdd691f255dcc5529a29b8c2c86b 100644 --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java @@ -166,6 +166,7 @@ public class PersistentEntitySectionManager implements A diff --git a/patches/server/0744-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0747-Rewrite-entity-bounding-box-lookup-calls.patch similarity index 99% rename from patches/server/0744-Rewrite-entity-bounding-box-lookup-calls.patch rename to patches/server/0747-Rewrite-entity-bounding-box-lookup-calls.patch index 98fc42cb0..9485ebacf 100644 --- a/patches/server/0744-Rewrite-entity-bounding-box-lookup-calls.patch +++ b/patches/server/0747-Rewrite-entity-bounding-box-lookup-calls.patch @@ -914,7 +914,7 @@ index 0000000000000000000000000000000000000000..3ba094e640d7fe7803e2bbdab8ff3beb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 82ae5094025c7d86ba6fdbf4334b2575e7b6afa1..0ffd53590c883c0090c913356665058b6c5d3f3f 100644 +index 5d57431a369207a2f207f89682f0861027906370..7ae0065139e19c900812c0332cd69a516aa0e36c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -425,7 +425,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -953,10 +953,10 @@ index 5d189257f494eb12b5fd98b12da6dd09ca14f972..913b56361dece6c699ed7fad7e580d40 + // Paper end } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4a763c6321abed6955a8adfb6dfd4f9f4593bc2f..3acb5defa7cb1290820425016599ddbbe885d5ed 100644 +index c71e0753e2d9974e56733f6ca46e1e9b76206965..6b76b939bee0875641813f7ca3c530fc5c4e34b4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -386,6 +386,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -419,6 +419,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } // Paper end - make end portalling safe @@ -1013,7 +1013,7 @@ index 4a763c6321abed6955a8adfb6dfd4f9f4593bc2f..3acb5defa7cb1290820425016599ddbb public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.passengers = ImmutableList.of(); -@@ -2242,11 +2292,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -2275,11 +2325,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i return InteractionResult.PASS; } @@ -1183,7 +1183,7 @@ index e5cb991543c695bc90256ef250a1d695ac5bc17d..4484c455f4be73763f5aa1112be5969e } diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java -index 14487f7b1f684ae17fd77aa0632fc61829ee691b..1d61807768dd883cb82bda5d529055bc50e4d1a9 100644 +index aa3217425a64fdd691f255dcc5529a29b8c2c86b..a0c66689c954823e7c20664594557dc26afbd246 100644 --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java @@ -49,8 +49,10 @@ public class PersistentEntitySectionManager implements A @@ -1214,7 +1214,7 @@ index 14487f7b1f684ae17fd77aa0632fc61829ee691b..1d61807768dd883cb82bda5d529055bc this.updateChunkStatus(chunkPos, visibility); } -@@ -450,6 +454,7 @@ public class PersistentEntitySectionManager implements A +@@ -455,6 +459,7 @@ public class PersistentEntitySectionManager implements A long i = SectionPos.asLong(blockposition); if (i != this.currentSectionKey) { @@ -1222,7 +1222,7 @@ index 14487f7b1f684ae17fd77aa0632fc61829ee691b..1d61807768dd883cb82bda5d529055bc Visibility visibility = this.currentSection.getStatus(); if (!this.currentSection.remove(this.entity)) { -@@ -498,6 +503,7 @@ public class PersistentEntitySectionManager implements A +@@ -503,6 +508,7 @@ public class PersistentEntitySectionManager implements A if (!this.currentSection.remove(this.entity)) { PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", this.entity, SectionPos.of(this.currentSectionKey), reason); } diff --git a/patches/server/0745-Execute-chunk-tasks-mid-tick.patch b/patches/server/0748-Execute-chunk-tasks-mid-tick.patch similarity index 98% rename from patches/server/0745-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0748-Execute-chunk-tasks-mid-tick.patch index efa65242d..9d7c6b59d 100644 --- a/patches/server/0745-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0748-Execute-chunk-tasks-mid-tick.patch @@ -108,7 +108,7 @@ index 983bc6b8600489696899b5aaa09e7f7b674d2e42..86b57776a42261053237d62f3b666793 } else { if (this.haveTime()) { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0ffd53590c883c0090c913356665058b6c5d3f3f..5d4f20a31ad99b4e808bb9a7aaa2153666af493f 100644 +index 7ae0065139e19c900812c0332cd69a516aa0e36c..cd2e3de1709d9c5c278b5cb616462daad2167f77 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -198,7 +198,9 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0746-Do-not-copy-visible-chunks.patch b/patches/server/0749-Do-not-copy-visible-chunks.patch similarity index 93% rename from patches/server/0746-Do-not-copy-visible-chunks.patch rename to patches/server/0749-Do-not-copy-visible-chunks.patch index 37327a78f..cf62d1bd3 100644 --- a/patches/server/0746-Do-not-copy-visible-chunks.patch +++ b/patches/server/0749-Do-not-copy-visible-chunks.patch @@ -35,10 +35,10 @@ index 35949e9c15eb998aa89842d34d0999cd973590e0..15f0c85ba9f4f9666e94e67dde43eb2e List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400ab2c181f 100644 +index f7ea3b293dd042127a2a674feee6777dfb6619c3..050ea3d2b52e6b2ee8158f71fe500e1684a1c9a6 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -117,9 +117,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -118,9 +118,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private static final int MIN_VIEW_DISTANCE = 3; public static final int MAX_VIEW_DISTANCE = 33; public static final int MAX_CHUNK_DISTANCE = 33 + ChunkStatus.maxDistance(); @@ -52,7 +52,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 private final Long2ObjectLinkedOpenHashMap pendingUnloads; public final LongSet entitiesInLevel; public final ServerLevel level; -@@ -239,7 +241,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -297,7 +299,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); @@ -61,7 +61,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 this.pendingUnloads = new Long2ObjectLinkedOpenHashMap(); this.entitiesInLevel = new LongOpenHashSet(); this.toDrop = new LongOpenHashSet(); -@@ -423,12 +425,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -552,12 +554,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Nullable public ChunkHolder getUpdatingChunkIfPresent(long pos) { @@ -81,7 +81,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 } protected IntSupplier getChunkQueueLevel(long pos) { -@@ -579,7 +586,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -709,7 +716,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end } @@ -90,7 +90,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 this.modified = true; } -@@ -601,7 +608,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -731,7 +738,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider protected void saveAllChunks(boolean flush) { if (flush) { @@ -99,7 +99,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -632,7 +639,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -762,7 +769,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider //this.flushWorker(); // Paper - nuke IOWorker this.level.asyncChunkTaskManager.flush(); // Paper - flush to preserve behavior compat with pre-async behaviour } else { @@ -108,7 +108,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 } } -@@ -666,7 +673,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -796,7 +803,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (longiterator.hasNext()) { // Spigot long j = longiterator.nextLong(); longiterator.remove(); // Spigot @@ -117,7 +117,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 if (playerchunk != null) { this.pendingUnloads.put(j, playerchunk); -@@ -692,7 +699,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -822,7 +829,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } int l = 0; @@ -126,7 +126,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) { if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) { -@@ -770,7 +777,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -900,7 +907,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!this.modified) { return false; } else { @@ -140,7 +140,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 this.modified = false; return true; } -@@ -1246,7 +1258,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1376,7 +1388,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.viewDistance = j; this.distanceManager.updatePlayerTickets(this.viewDistance); @@ -149,7 +149,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 while (objectiterator.hasNext()) { ChunkHolder playerchunk = (ChunkHolder) objectiterator.next(); -@@ -1288,7 +1300,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1418,7 +1430,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public int size() { @@ -158,7 +158,7 @@ index 32b101b85cce51e35905357a3f80b46f340add1a..7bf89ff76809e1d85b4656c8d9964400 } public DistanceManager getDistanceManager() { -@@ -1296,13 +1308,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1426,13 +1438,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected Iterable getChunks() { diff --git a/patches/server/0747-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0750-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/server/0747-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0750-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/server/0748-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0751-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/0748-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0751-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/0749-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0752-Detail-more-information-in-watchdog-dumps.patch similarity index 97% rename from patches/server/0749-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0752-Detail-more-information-in-watchdog-dumps.patch index c20c1b887..fc77f2892 100644 --- a/patches/server/0749-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0752-Detail-more-information-in-watchdog-dumps.patch @@ -77,7 +77,7 @@ index bcf53ec07b8eeec7a88fb67e6fb908362e6f51b0..acc12307f61e1e055896b68fe16654c9 }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5d4f20a31ad99b4e808bb9a7aaa2153666af493f..928ac2d5b93b93aa7494374f4f3446557ebebd6d 100644 +index cd2e3de1709d9c5c278b5cb616462daad2167f77..dc9cfa468b92bacfa25437d969b4e4a0f59daade 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -973,7 +973,26 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -123,10 +123,10 @@ index 5d4f20a31ad99b4e808bb9a7aaa2153666af493f..928ac2d5b93b93aa7494374f4f344655 private void tickPassenger(Entity vehicle, Entity passenger) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3acb5defa7cb1290820425016599ddbbe885d5ed..cb89d7973dabd42fb8c19d71bdb5917a363d545c 100644 +index 6b76b939bee0875641813f7ca3c530fc5c4e34b4..04937d1c0167a0961afbab7ba029d49882acf700 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -860,7 +860,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -893,7 +893,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i return this.onGround; } @@ -169,7 +169,7 @@ index 3acb5defa7cb1290820425016599ddbbe885d5ed..cb89d7973dabd42fb8c19d71bdb5917a if (this.noPhysics) { this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { -@@ -1022,6 +1057,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1055,6 +1090,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i this.level.getProfiler().pop(); } } @@ -183,7 +183,7 @@ index 3acb5defa7cb1290820425016599ddbbe885d5ed..cb89d7973dabd42fb8c19d71bdb5917a } protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) { -@@ -3807,7 +3849,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3840,7 +3882,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public void setDeltaMovement(Vec3 velocity) { @@ -193,7 +193,7 @@ index 3acb5defa7cb1290820425016599ddbbe885d5ed..cb89d7973dabd42fb8c19d71bdb5917a } public void setDeltaMovement(double x, double y, double z) { -@@ -3883,7 +3927,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -3916,7 +3960,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } // Paper end - fix MC-4 if (this.position.x != x || this.position.y != y || this.position.z != z) { diff --git a/patches/server/0750-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0753-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/server/0750-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0753-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/server/0751-Distance-manager-tick-timings.patch b/patches/server/0754-Distance-manager-tick-timings.patch similarity index 96% rename from patches/server/0751-Distance-manager-tick-timings.patch rename to patches/server/0754-Distance-manager-tick-timings.patch index b154b2fda..65d0a79bc 100644 --- a/patches/server/0751-Distance-manager-tick-timings.patch +++ b/patches/server/0754-Distance-manager-tick-timings.patch @@ -19,7 +19,7 @@ index eada966d7f108a6081be7a848f5c1dfcb1eed676..a977f7483f37df473096b2234dc1308b public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks"); diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index fd419bf8780e148fb8235f3c11cfde36eb621f5e..4548d53d65887d9646cd021c56882439f2b62778 100644 +index 64ea7ec9fdb5a90a7806574280a343d0a608f3b3..7e9a5499bec4eb33c25f610465c6bbfb4ccd18df 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -821,6 +821,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0752-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0755-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/server/0752-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0755-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/server/0753-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0756-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/server/0753-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0756-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/server/0754-Add-packet-limiter-config.patch b/patches/server/0757-Add-packet-limiter-config.patch similarity index 100% rename from patches/server/0754-Add-packet-limiter-config.patch rename to patches/server/0757-Add-packet-limiter-config.patch diff --git a/patches/server/0755-Lag-compensate-block-breaking.patch b/patches/server/0758-Lag-compensate-block-breaking.patch similarity index 100% rename from patches/server/0755-Lag-compensate-block-breaking.patch rename to patches/server/0758-Lag-compensate-block-breaking.patch diff --git a/patches/server/0756-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0759-Use-correct-LevelStem-registry-when-loading-default-.patch similarity index 100% rename from patches/server/0756-Use-correct-LevelStem-registry-when-loading-default-.patch rename to patches/server/0759-Use-correct-LevelStem-registry-when-loading-default-.patch diff --git a/patches/server/0757-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0760-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 100% rename from patches/server/0757-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0760-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch diff --git a/patches/server/0758-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0761-Consolidate-flush-calls-for-entity-tracker-packets.patch similarity index 93% rename from patches/server/0758-Consolidate-flush-calls-for-entity-tracker-packets.patch rename to patches/server/0761-Consolidate-flush-calls-for-entity-tracker-packets.patch index 2315d8277..211dd4d79 100644 --- a/patches/server/0758-Consolidate-flush-calls-for-entity-tracker-packets.patch +++ b/patches/server/0761-Consolidate-flush-calls-for-entity-tracker-packets.patch @@ -22,10 +22,10 @@ With this change I could get all 200 on at 0ms ping. So in general this patch should reduce Netty I/O thread load. diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 4548d53d65887d9646cd021c56882439f2b62778..5068903204529864d2748efae3de525d06331305 100644 +index 7e9a5499bec4eb33c25f610465c6bbfb4ccd18df..6efac4257ea167b73e68b491d050b777f0f71b35 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -1008,7 +1008,24 @@ public class ServerChunkCache extends ChunkSource { +@@ -1000,7 +1000,24 @@ public class ServerChunkCache extends ChunkSource { }); gameprofilerfiller.pop(); gameprofilerfiller.pop(); diff --git a/patches/server/0759-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0762-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/server/0759-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0762-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/server/0760-Time-scoreboard-search.patch b/patches/server/0763-Time-scoreboard-search.patch similarity index 100% rename from patches/server/0760-Time-scoreboard-search.patch rename to patches/server/0763-Time-scoreboard-search.patch diff --git a/patches/server/0761-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0764-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/0761-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0764-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/0762-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0765-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/server/0762-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0765-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/server/0763-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0766-Oprimise-map-impl-for-tracked-players.patch similarity index 85% rename from patches/server/0763-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0766-Oprimise-map-impl-for-tracked-players.patch index a025d7244..c9c132932 100644 --- a/patches/server/0763-Oprimise-map-impl-for-tracked-players.patch +++ b/patches/server/0766-Oprimise-map-impl-for-tracked-players.patch @@ -7,10 +7,10 @@ Reference2BooleanOpenHashMap is going to have better lookups than HashMap. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 7bf89ff76809e1d85b4656c8d9964400ab2c181f..0e2dc7d748125691ec85b4d79a8dc4f6244374d1 100644 +index 050ea3d2b52e6b2ee8158f71fe500e1684a1c9a6..1a2687056c3264b74d992a554ab610ea744192c5 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -105,6 +105,7 @@ import org.apache.logging.log4j.LogManager; +@@ -106,6 +106,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.bukkit.entity.Player; // CraftBukkit end @@ -18,7 +18,7 @@ index 7bf89ff76809e1d85b4656c8d9964400ab2c181f..0e2dc7d748125691ec85b4d79a8dc4f6 public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider { -@@ -1900,7 +1901,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -2063,7 +2064,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final Entity entity; private final int range; SectionPos lastSectionPos; diff --git a/patches/server/0764-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0767-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/server/0764-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0767-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/server/0765-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0768-Allow-removal-addition-of-entities-to-entity-ticklis.patch similarity index 100% rename from patches/server/0765-Allow-removal-addition-of-entities-to-entity-ticklis.patch rename to patches/server/0768-Allow-removal-addition-of-entities-to-entity-ticklis.patch diff --git a/patches/server/0766-Optimise-random-block-ticking.patch b/patches/server/0769-Optimise-random-block-ticking.patch similarity index 99% rename from patches/server/0766-Optimise-random-block-ticking.patch rename to patches/server/0769-Optimise-random-block-ticking.patch index 5146c13bf..9ba04cbaf 100644 --- a/patches/server/0766-Optimise-random-block-ticking.patch +++ b/patches/server/0769-Optimise-random-block-ticking.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..e8b4053babe46999980b926431254050 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 928ac2d5b93b93aa7494374f4f3446557ebebd6d..5935c442a6534ad51d191a72bc8d2043fa25e2ac 100644 +index dc9cfa468b92bacfa25437d969b4e4a0f59daade..1c92416c3dc07d2348f092eee663e0226d43c8ba 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -639,6 +639,10 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0767-Optimise-non-flush-packet-sending.patch b/patches/server/0770-Optimise-non-flush-packet-sending.patch similarity index 100% rename from patches/server/0767-Optimise-non-flush-packet-sending.patch rename to patches/server/0770-Optimise-non-flush-packet-sending.patch diff --git a/patches/server/0768-Optimise-nearby-player-lookups.patch b/patches/server/0771-Optimise-nearby-player-lookups.patch similarity index 89% rename from patches/server/0768-Optimise-nearby-player-lookups.patch rename to patches/server/0771-Optimise-nearby-player-lookups.patch index 4f1e4b927..d828f86be 100644 --- a/patches/server/0768-Optimise-nearby-player-lookups.patch +++ b/patches/server/0771-Optimise-nearby-player-lookups.patch @@ -9,13 +9,13 @@ since the penalty of a map lookup could outweigh the benefits of searching less players (as it basically did in the outside range patch). diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 663fe2ddad1a65862c6bd4fe15f047e270bcd3ba..ed3c947d5d951932a8329e196715bd2d403475d4 100644 +index 4e3d4195db3660edd2b9ee850b774be91455fb84..4e3d14ed8a9651a327c8a5fbb53e69e67903e113 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -95,6 +95,12 @@ public class ChunkHolder { - this.setTicketLevel(level); - this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()]; - this.chunkMap = (ChunkMap)playersWatchingChunkProvider; // Paper +@@ -83,6 +83,12 @@ public class ChunkHolder { + long key = net.minecraft.server.MCUtil.getCoordinateKey(this.pos); + this.playersInMobSpawnRange = this.chunkMap.playerMobSpawnMap.getObjectsInRange(key); + this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key); + // Paper start - optimise checkDespawn + LevelChunk chunk = this.getFullChunkUnchecked(); + if (chunk != null) { @@ -23,53 +23,57 @@ index 663fe2ddad1a65862c6bd4fe15f047e270bcd3ba..ed3c947d5d951932a8329e196715bd2d + } + // Paper end - optimise checkDespawn } + // Paper end - optimise isOutsideOfRange - // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 0e2dc7d748125691ec85b4d79a8dc4f6244374d1..dac0cf30f7868c465471f8e41058ff7e55d4786d 100644 +index 1a2687056c3264b74d992a554ab610ea744192c5..aa2671323c776a943d2e0c8a89d872933779703f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -191,21 +191,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - final CallbackExecutor chunkLoadConversionCallbackExecutor = new CallbackExecutor(); // Paper - // Paper start - distance maps - private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); +@@ -157,6 +157,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + int viewDistance; + public final com.destroystokyo.paper.util.PlayerMobDistanceMap playerMobDistanceMap; // Paper + + // Paper start - optimise checkDespawn + public static final int GENERAL_AREA_MAP_SQUARE_RADIUS = 40; + public static final double GENERAL_AREA_MAP_ACCEPTABLE_SEARCH_RANGE = 16.0 * (GENERAL_AREA_MAP_SQUARE_RADIUS - 1); + public static final double GENERAL_AREA_MAP_ACCEPTABLE_SEARCH_RANGE_SQUARED = GENERAL_AREA_MAP_ACCEPTABLE_SEARCH_RANGE * GENERAL_AREA_MAP_ACCEPTABLE_SEARCH_RANGE; + public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerGeneralAreaMap; + // Paper end - optimise checkDespawn - - void addPlayerToDistanceMaps(ServerPlayer player) { - int chunkX = MCUtil.getChunkCoordinate(player.getX()); - int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); - // Note: players need to be explicitly added to distance maps before they can be updated -+ // Paper start - optimise checkDespawn -+ this.playerGeneralAreaMap.add(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); -+ // Paper end - optimise checkDespawn ++ + // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() + public final CallbackExecutor callbackExecutor = new CallbackExecutor(); + public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { +@@ -237,6 +244,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); + this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); + // Paper end - optimise PlayerChunkMap#isOutsideRange ++ this.playerGeneralAreaMap.add(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); // Paper - optimise checkDespawn } void removePlayerFromDistanceMaps(ServerPlayer player) { - -+ // Paper start - optimise checkDespawn -+ this.playerGeneralAreaMap.remove(player); -+ // Paper end - optimise checkDespawn +@@ -249,6 +257,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + this.playerMobSpawnMap.remove(player); + this.playerChunkTickRangeMap.remove(player); + // Paper end - optimise PlayerChunkMap#isOutsideRange ++ this.playerGeneralAreaMap.remove(player); // Paper - optimise checkDespawns } void updateMaps(ServerPlayer player) { - int chunkX = MCUtil.getChunkCoordinate(player.getX()); - int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); - // Note: players need to be explicitly added to distance maps before they can be updated -+ // Paper start - optimise checkDespawn -+ this.playerGeneralAreaMap.update(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); -+ // Paper end - optimise checkDespawn +@@ -262,8 +271,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + + trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); + } +- // Paper end - use distance map to optimise entity tracker ++ // Paper end - use distance map to optimise entity trackerD + this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise PlayerChunkMap#isOutsideRange ++ this.playerGeneralAreaMap.update(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); // Paper - optimise checkDespawn } // Paper end // Paper start -@@ -290,6 +305,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - this.regionManagers.add(this.dataRegionManager); - // Paper end - this.playerMobDistanceMap = this.level.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper +@@ -419,6 +429,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + } + }); + // Paper end - optimise PlayerChunkMap#isOutsideRange + // Paper start - optimise checkDespawn + this.playerGeneralAreaMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, + (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, @@ -91,7 +95,7 @@ index 0e2dc7d748125691ec85b4d79a8dc4f6244374d1..dac0cf30f7868c465471f8e41058ff7e protected ChunkGenerator generator() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5935c442a6534ad51d191a72bc8d2043fa25e2ac..8a219ecabe49d8f2564a365968891b214a090f6d 100644 +index 1c92416c3dc07d2348f092eee663e0226d43c8ba..dec294b771966ac42fd89fe5788af503c1f2ba8b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -396,6 +396,83 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0769-Optimise-WorldServer-notify.patch b/patches/server/0772-Optimise-WorldServer-notify.patch similarity index 96% rename from patches/server/0769-Optimise-WorldServer-notify.patch rename to patches/server/0772-Optimise-WorldServer-notify.patch index ad82ff483..c921af20c 100644 --- a/patches/server/0769-Optimise-WorldServer-notify.patch +++ b/patches/server/0772-Optimise-WorldServer-notify.patch @@ -8,10 +8,10 @@ Instead, only iterate over navigators in the current region that are eligible for repathing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index dac0cf30f7868c465471f8e41058ff7e55d4786d..6b9752e74ebef0be5c3c7a9534602fb6d05d1a29 100644 +index aa2671323c776a943d2e0c8a89d872933779703f..ddb70bc085e120cc0775b6fae865864b99610718 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -228,15 +228,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -281,15 +281,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final io.papermc.paper.chunk.SingleThreadChunkRegionManager dataRegionManager; public static final class DataRegionData implements io.papermc.paper.chunk.SingleThreadChunkRegionManager.RegionData { @@ -93,7 +93,7 @@ index dac0cf30f7868c465471f8e41058ff7e55d4786d..6b9752e74ebef0be5c3c7a9534602fb6 } @Override -@@ -246,6 +312,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -299,6 +365,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final DataRegionSectionData sectionData = (DataRegionSectionData)section.sectionData; final DataRegionData oldRegionData = oldRegion == null ? null : (DataRegionData)oldRegion.regionData; final DataRegionData newRegionData = (DataRegionData)newRegion.regionData; @@ -110,7 +110,7 @@ index dac0cf30f7868c465471f8e41058ff7e55d4786d..6b9752e74ebef0be5c3c7a9534602fb6 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8a219ecabe49d8f2564a365968891b214a090f6d..8837c9793eb25ad88bdb4b0f6198dc7ae353b9b2 100644 +index dec294b771966ac42fd89fe5788af503c1f2ba8b..ac7fe0d08b1d44303d6578bb45c83a9cb7925b6e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1090,6 +1090,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -155,7 +155,7 @@ index 8a219ecabe49d8f2564a365968891b214a090f6d..8837c9793eb25ad88bdb4b0f6198dc7a } } // Paper -@@ -2317,10 +2333,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2320,10 +2336,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingStart(Entity entity) { ServerLevel.this.entityTickList.add(entity); @@ -214,7 +214,7 @@ index 5884fb42f0880585dee843b98a6ea470a1508e46..4651c2e78089ed28220e767654261c73 Vec3 vec3 = new Vec3(((double)node.x + this.mob.getX()) / 2.0D, ((double)node.y + this.mob.getY()) / 2.0D, ((double)node.z + this.mob.getZ()) / 2.0D); if (pos.closerThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex()))) { diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java -index 1d61807768dd883cb82bda5d529055bc50e4d1a9..d963243431e1a75f95e673e1268faa7c2320c6b6 100644 +index a0c66689c954823e7c20664594557dc26afbd246..21f3c8a2fe91ff47486b4c63f2b3f1d54f83fdb6 100644 --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java @@ -71,6 +71,65 @@ public class PersistentEntitySectionManager implements A @@ -283,7 +283,7 @@ index 1d61807768dd883cb82bda5d529055bc50e4d1a9..d963243431e1a75f95e673e1268faa7c void removeSectionIfEmpty(long sectionPos, EntitySection section) { if (section.isEmpty()) { this.sectionStorage.remove(sectionPos); -@@ -451,11 +510,25 @@ public class PersistentEntitySectionManager implements A +@@ -456,11 +515,25 @@ public class PersistentEntitySectionManager implements A @Override public void onMove() { BlockPos blockposition = this.entity.blockPosition(); @@ -311,7 +311,7 @@ index 1d61807768dd883cb82bda5d529055bc50e4d1a9..d963243431e1a75f95e673e1268faa7c if (!this.currentSection.remove(this.entity)) { PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (moving to {})", this.entity, SectionPos.of(this.currentSectionKey), i); -@@ -467,6 +540,11 @@ public class PersistentEntitySectionManager implements A +@@ -472,6 +545,11 @@ public class PersistentEntitySectionManager implements A entitysection.add(this.entity); this.currentSection = entitysection; this.currentSectionKey = i; diff --git a/patches/server/0770-Remove-streams-for-villager-AI.patch b/patches/server/0773-Remove-streams-for-villager-AI.patch similarity index 100% rename from patches/server/0770-Remove-streams-for-villager-AI.patch rename to patches/server/0773-Remove-streams-for-villager-AI.patch diff --git a/patches/server/0771-Rewrite-dataconverter-system.patch b/patches/server/0774-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/server/0771-Rewrite-dataconverter-system.patch rename to patches/server/0774-Rewrite-dataconverter-system.patch diff --git a/patches/server/0772-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0775-Use-Velocity-compression-and-cipher-natives.patch similarity index 100% rename from patches/server/0772-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0775-Use-Velocity-compression-and-cipher-natives.patch diff --git a/patches/server/0773-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0776-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 100% rename from patches/server/0773-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0776-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch diff --git a/patches/server/0774-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0777-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch similarity index 100% rename from patches/server/0774-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch rename to patches/server/0777-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch diff --git a/patches/server/0775-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0778-Async-catch-modifications-to-critical-entity-state.patch similarity index 96% rename from patches/server/0775-Async-catch-modifications-to-critical-entity-state.patch rename to patches/server/0778-Async-catch-modifications-to-critical-entity-state.patch index cc9ccd741..7b91e7da2 100644 --- a/patches/server/0775-Async-catch-modifications-to-critical-entity-state.patch +++ b/patches/server/0778-Async-catch-modifications-to-critical-entity-state.patch @@ -8,7 +8,7 @@ Now in 1.17, this state is _even more_ critical than it was before, so these must exist to catch stupid plugins. diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java -index d963243431e1a75f95e673e1268faa7c2320c6b6..114569250b8bb99ebf5714f334b7a23dc3d3ca37 100644 +index 21f3c8a2fe91ff47486b4c63f2b3f1d54f83fdb6..bd7967680d7a75caff98a827895c795f2d101f99 100644 --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java @@ -138,6 +138,7 @@ public class PersistentEntitySectionManager implements A @@ -115,7 +115,7 @@ index d963243431e1a75f95e673e1268faa7c2320c6b6..114569250b8bb99ebf5714f334b7a23d LongSet longset = this.getAllChunksToSave(); while (!longset.isEmpty()) { -@@ -513,6 +527,7 @@ public class PersistentEntitySectionManager implements A +@@ -518,6 +532,7 @@ public class PersistentEntitySectionManager implements A long i = SectionPos.asLong(blockposition); final long newSectionPos = i; // Paper - diff on change, new position section if (i != this.currentSectionKey) { @@ -123,7 +123,7 @@ index d963243431e1a75f95e673e1268faa7c2320c6b6..114569250b8bb99ebf5714f334b7a23d PersistentEntitySectionManager.this.entitySliceManager.moveEntity((Entity)this.entity); // Paper Visibility visibility = this.currentSection.getStatus(); final Visibility oldVisibility = visibility; // Paper - diff on change - this should be OLD section visibility // Paper start -@@ -578,6 +593,7 @@ public class PersistentEntitySectionManager implements A +@@ -583,6 +598,7 @@ public class PersistentEntitySectionManager implements A @Override public void onRemove(Entity.RemovalReason reason) { diff --git a/patches/server/0776-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0779-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/server/0776-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0779-Fix-Bukkit-NamespacedKey-shenanigans.patch diff --git a/patches/server/0777-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0780-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 89% rename from patches/server/0777-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0780-Fix-merchant-inventory-not-closing-on-entity-removal.patch index bf3e8390c..40cbedda5 100644 --- a/patches/server/0777-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0780-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8837c9793eb25ad88bdb4b0f6198dc7ae353b9b2..e84969a7b4ed92727a9917b266e5fbe3c9dac1f9 100644 +index ac7fe0d08b1d44303d6578bb45c83a9cb7925b6e..1cf809480d9ad7dd24c697d79621106544d32146 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2406,6 +2406,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2409,6 +2409,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { diff --git a/patches/server/0778-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0781-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/server/0778-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0781-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/server/0779-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0782-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 100% rename from patches/server/0779-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0782-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch diff --git a/patches/server/0780-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0783-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/server/0780-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0783-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/server/0781-Ensure-valid-vehicle-status.patch b/patches/server/0784-Ensure-valid-vehicle-status.patch similarity index 84% rename from patches/server/0781-Ensure-valid-vehicle-status.patch rename to patches/server/0784-Ensure-valid-vehicle-status.patch index 964eaf4b0..150d222ef 100644 --- a/patches/server/0781-Ensure-valid-vehicle-status.patch +++ b/patches/server/0784-Ensure-valid-vehicle-status.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure valid vehicle status diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 03400c55ff5929e88161f1915a2df140b3830dff..7756344556c1c5be0385100212a0155c53f61dc4 100644 +index 9897435b97459fa3a9376fbdc93cba68d7f6f46d..aaf92e01b5079a4474ff6102ce008ccddf60844a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -503,7 +503,7 @@ public class ServerPlayer extends Player { +@@ -504,7 +504,7 @@ public class ServerPlayer extends Player { } } diff --git a/patches/server/0782-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0785-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/server/0782-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0785-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/server/0783-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0786-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/server/0783-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0786-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/server/0784-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0787-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/server/0784-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0787-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/server/0785-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0788-Mark-fish-and-axolotls-from-buckets-as-persistent.patch similarity index 100% rename from patches/server/0785-Mark-fish-and-axolotls-from-buckets-as-persistent.patch rename to patches/server/0788-Mark-fish-and-axolotls-from-buckets-as-persistent.patch diff --git a/patches/server/0786-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0789-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/server/0786-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0789-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/server/0787-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0790-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch similarity index 90% rename from patches/server/0787-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch rename to patches/server/0790-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch index e12e74adb..c00fbadd2 100644 --- a/patches/server/0787-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch +++ b/patches/server/0790-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch @@ -12,10 +12,10 @@ time to save, as flush saving performs a full flush at the end anyways. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 6b9752e74ebef0be5c3c7a9534602fb6d05d1a29..81a9fbf33e486d0a3c337eaadfe330fa79f6fd9d 100644 +index ddb70bc085e120cc0775b6fae865864b99610718..13f84b52708cd8334e4e8ea9496c7c805a2e75fe 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -715,6 +715,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -840,6 +840,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected void saveAllChunks(boolean flush) { @@ -32,7 +32,7 @@ index 6b9752e74ebef0be5c3c7a9534602fb6d05d1a29..81a9fbf33e486d0a3c337eaadfe330fa if (flush) { List list = (List) this.updatingChunks.getVisibleValuesCopy().stream().filter(ChunkHolder::wasAccessibleSinceLastSave).peek(ChunkHolder::refreshAccessibility).collect(Collectors.toList()); // Paper MutableBoolean mutableboolean = new MutableBoolean(); -@@ -737,6 +747,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -862,6 +872,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }).filter((ichunkaccess) -> { return ichunkaccess instanceof ImposterProtoChunk || ichunkaccess instanceof LevelChunk; }).filter(this::save).forEach((ichunkaccess) -> { diff --git a/patches/server/0788-Preserve-overstacked-loot.patch b/patches/server/0791-Preserve-overstacked-loot.patch similarity index 100% rename from patches/server/0788-Preserve-overstacked-loot.patch rename to patches/server/0791-Preserve-overstacked-loot.patch diff --git a/patches/server/0789-Update-head-rotation-in-missing-places.patch b/patches/server/0792-Update-head-rotation-in-missing-places.patch similarity index 84% rename from patches/server/0789-Update-head-rotation-in-missing-places.patch rename to patches/server/0792-Update-head-rotation-in-missing-places.patch index 055d4a44c..45c4e3710 100644 --- a/patches/server/0789-Update-head-rotation-in-missing-places.patch +++ b/patches/server/0792-Update-head-rotation-in-missing-places.patch @@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw. This issue only applies to players. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cb89d7973dabd42fb8c19d71bdb5917a363d545c..cefb5a3fc5778870c8992c65c22e387d147ab5e9 100644 +index 04937d1c0167a0961afbab7ba029d49882acf700..cd18e0eff4814e106b48118c8c6c43ccd66ac79d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1616,6 +1616,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1649,6 +1649,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F); this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -19,7 +19,7 @@ index cb89d7973dabd42fb8c19d71bdb5917a363d545c..cefb5a3fc5778870c8992c65c22e387d } public void absMoveTo(double x, double y, double z) { -@@ -1654,6 +1655,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -1687,6 +1688,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i this.setXRot(pitch); this.setOldPosAndRot(); this.reapplyPosition(); diff --git a/patches/server/0790-prevent-unintended-light-block-manipulation.patch b/patches/server/0793-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/server/0790-prevent-unintended-light-block-manipulation.patch rename to patches/server/0793-prevent-unintended-light-block-manipulation.patch diff --git a/patches/server/0791-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0794-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch similarity index 100% rename from patches/server/0791-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch rename to patches/server/0794-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch diff --git a/patches/server/0792-Fix-CraftCriteria-defaults-map.patch b/patches/server/0795-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/server/0792-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0795-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/server/0793-Fix-upstreams-block-state-factories.patch b/patches/server/0796-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/server/0793-Fix-upstreams-block-state-factories.patch rename to patches/server/0796-Fix-upstreams-block-state-factories.patch diff --git a/patches/server/0794-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0797-Add-config-option-for-logging-player-ip-addresses.patch similarity index 100% rename from patches/server/0794-Add-config-option-for-logging-player-ip-addresses.patch rename to patches/server/0797-Add-config-option-for-logging-player-ip-addresses.patch diff --git a/patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0798-VanillaCommandWrapper-didnt-account-for-entity-sende.patch similarity index 100% rename from patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch rename to patches/server/0798-VanillaCommandWrapper-didnt-account-for-entity-sende.patch diff --git a/patches/server/0796-Add-root-admin-user-detection.patch b/patches/server/0799-Add-root-admin-user-detection.patch similarity index 100% rename from patches/server/0796-Add-root-admin-user-detection.patch rename to patches/server/0799-Add-root-admin-user-detection.patch diff --git a/patches/server/0797-Always-allow-item-changing-in-Fireball.patch b/patches/server/0800-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/server/0797-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0800-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0801-don-t-attempt-to-teleport-dead-entities.patch similarity index 85% rename from patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0801-don-t-attempt-to-teleport-dead-entities.patch index b1f59581d..a828511ee 100644 --- a/patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch +++ b/patches/server/0801-don-t-attempt-to-teleport-dead-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cefb5a3fc5778870c8992c65c22e387d147ab5e9..7ab0e73fa156c83c940079c0955a3947f5b93562 100644 +index cd18e0eff4814e106b48118c8c6c43ccd66ac79d..3febcc7e88b74d4bdb45e633fdaa9d3313a6ae0b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -673,7 +673,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i +@@ -706,7 +706,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i // CraftBukkit start public void postTick() { // No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle diff --git a/patches/server/0799-Call-onRemove-logic-for-breakNaturally.patch b/patches/server/0802-Call-onRemove-logic-for-breakNaturally.patch similarity index 100% rename from patches/server/0799-Call-onRemove-logic-for-breakNaturally.patch rename to patches/server/0802-Call-onRemove-logic-for-breakNaturally.patch diff --git a/patches/server/0800-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0803-Fix-anvil-prepare-event-not-working-with-zero-xp.patch similarity index 100% rename from patches/server/0800-Fix-anvil-prepare-event-not-working-with-zero-xp.patch rename to patches/server/0803-Fix-anvil-prepare-event-not-working-with-zero-xp.patch diff --git a/patches/server/0804-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0804-Prevent-excessive-velocity-through-repeated-crits.patch new file mode 100644 index 000000000..862abaa91 --- /dev/null +++ b/patches/server/0804-Prevent-excessive-velocity-through-repeated-crits.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Thu, 25 Nov 2021 10:25:09 +0100 +Subject: [PATCH] Prevent excessive velocity through repeated crits + + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 3f9e3415db6cfee317da695793d295660ef29b18..62daf918d4ab00963041ca869ae718f14f2e3337 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -2570,14 +2570,27 @@ public abstract class LivingEntity extends Entity { + return this.hasEffect(MobEffects.JUMP) ? (double) (0.1F * (float) (this.getEffect(MobEffects.JUMP).getAmplifier() + 1)) : 0.0D; + } + ++ protected long lastJumpTime = 0L; // Paper + protected void jumpFromGround() { + double d0 = (double) this.getJumpPower() + this.getJumpBoostPower(); + Vec3 vec3d = this.getDeltaMovement(); ++ // Paper start ++ long time = System.nanoTime(); ++ boolean canCrit = true; ++ if (this instanceof net.minecraft.world.entity.player.Player) { ++ canCrit = false; ++ if (time - this.lastJumpTime > (long)(0.250e9)) { ++ this.lastJumpTime = time; ++ canCrit = true; ++ } ++ } ++ // Paper end + + this.setDeltaMovement(vec3d.x, d0, vec3d.z); + if (this.isSprinting()) { + float f = this.getYRot() * 0.017453292F; + ++ if (canCrit) // Paper + this.setDeltaMovement(this.getDeltaMovement().add((double) (-Mth.sin(f) * 0.2F), 0.0D, (double) (Mth.cos(f) * 0.2F))); + } +