diff --git a/patches/removed/1.17/0364-Anti-Xray.patch b/patches/server/0364-Anti-Xray.patch similarity index 70% rename from patches/removed/1.17/0364-Anti-Xray.patch rename to patches/server/0364-Anti-Xray.patch index 250195a551..982e71aa3f 100644 --- a/patches/removed/1.17/0364-Anti-Xray.patch +++ b/patches/server/0364-Anti-Xray.patch @@ -2,12 +2,16 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + stonar96 — Today at 15:49 I'm just here to watch you suffer :smile: You can skip it if you want and I can do it later. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1278d09f70c1e97607ef20d87a178dc252c7f723..c45493e88bf7e8811be2759ff9ac19e3fe9d938a 100644 +index e29566cad2647da4d9288e912188b57f00e8dd0c..51691d3dedf113d58f340b74d448c5e5375b5bed 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -20,9 +24,9 @@ index 1278d09f70c1e97607ef20d87a178dc252c7f723..c45493e88bf7e8811be2759ff9ac19e3 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -461,4 +463,38 @@ public class PaperWorldConfig { - private void maxAutoSaveChunksPerTick() { - maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); +@@ -445,5 +447,39 @@ public class PaperWorldConfig { + private void lightQueueSize() { + lightQueueSize = getInt("light-queue-size", lightQueueSize); } + + public boolean antiXray; @@ -59,9 +63,10 @@ index 1278d09f70c1e97607ef20d87a178dc252c7f723..c45493e88bf7e8811be2759ff9ac19e3 + } + } } + diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java new file mode 100644 -index 0000000000000000000000000000000000000000..8fb63441fbf9afb6f11e1185a9f29528e1950546 +index 0000000000000000000000000000000000000000..fe1a91a3a281dd91e5989bf2282240b03684b500 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java @@ -0,0 +1,45 @@ @@ -90,11 +95,11 @@ index 0000000000000000000000000000000000000000..8fb63441fbf9afb6f11e1185a9f29528 + return null; + } + -+ public boolean shouldModify(ServerPlayer entityPlayer, LevelChunk chunk, int chunkSectionSelector) { ++ public boolean shouldModify(ServerPlayer entityPlayer, LevelChunk chunk) { + return false; + } + -+ public ChunkPacketInfo getChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk, int chunkSectionSelector) { ++ public ChunkPacketInfo getChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk) { + return null; + } + @@ -112,7 +117,7 @@ index 0000000000000000000000000000000000000000..8fb63441fbf9afb6f11e1185a9f29528 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java new file mode 100644 -index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4c56dea46 +index 0000000000000000000000000000000000000000..e1bc1093a03b931ff2c3870ea1601cd420f71192 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -0,0 +1,649 @@ @@ -200,7 +205,7 @@ index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4 + for (String id : paperWorldConfig.hiddenBlocks) { + Block block = Registry.BLOCK.getOptional(new ResourceLocation(id)).orElse(null); + -+ if (block != null && !block.isEntityBlock()) { ++ if (block != null && !(block instanceof net.minecraft.world.level.block.EntityBlock)) { + toObfuscate.add(id); + predefinedBlockDataList.add(block.defaultBlockState()); + } @@ -284,15 +289,15 @@ index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4 + } + + @Override -+ public boolean shouldModify(ServerPlayer entityPlayer, LevelChunk chunk, int chunkSectionSelector) { ++ public boolean shouldModify(ServerPlayer entityPlayer, LevelChunk chunk) { + return !usePermission || !entityPlayer.getBukkitEntity().hasPermission("paper.antixray.bypass"); + } + + @Override -+ public ChunkPacketInfoAntiXray getChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk, int chunkSectionSelector) { ++ public ChunkPacketInfoAntiXray getChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk) { + // Return a new instance to collect data and objects in the right state while creating the chunk packet for thread safe access later + // Note: As of 1.14 this has to be moved later due to the chunk system. -+ ChunkPacketInfoAntiXray chunkPacketInfoAntiXray = new ChunkPacketInfoAntiXray(packetPlayOutMapChunk, chunk, chunkSectionSelector, this); ++ ChunkPacketInfoAntiXray chunkPacketInfoAntiXray = new ChunkPacketInfoAntiXray(packetPlayOutMapChunk, chunk, this); + return chunkPacketInfoAntiXray; + } + @@ -314,7 +319,7 @@ index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4 + LevelChunk chunk = chunkPacketInfo.getChunk(); + int x = chunk.getPos().x; + int z = chunk.getPos().z; -+ ServerLevel world = (ServerLevel)chunk.world; ++ ServerLevel world = (ServerLevel)chunk.level; + ((ChunkPacketInfoAntiXray) chunkPacketInfo).setNearbyChunks( + (LevelChunk) world.getChunkIfLoadedImmediately(x - 1, z), + (LevelChunk) world.getChunkIfLoadedImmediately(x + 1, z), @@ -374,7 +379,7 @@ index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4 + int[] predefinedBlockDataBitsTemp; + + if (chunkPacketInfoAntiXray.getDataPalette(chunkSectionIndex) == LevelChunkSection.GLOBAL_BLOCKSTATE_PALETTE) { -+ predefinedBlockDataBitsTemp = engineMode == EngineMode.HIDE ? chunkPacketInfoAntiXray.getChunk().world.getWorld().getEnvironment() == Environment.NETHER ? predefinedBlockDataBitsNetherrackGlobal : chunkPacketInfoAntiXray.getChunk().world.getWorld().getEnvironment() == Environment.THE_END ? predefinedBlockDataBitsEndStoneGlobal : predefinedBlockDataBitsStoneGlobal : predefinedBlockDataBitsGlobal; ++ predefinedBlockDataBitsTemp = engineMode == EngineMode.HIDE ? chunkPacketInfoAntiXray.getChunk().level.getWorld().getEnvironment() == Environment.NETHER ? predefinedBlockDataBitsNetherrackGlobal : chunkPacketInfoAntiXray.getChunk().level.getWorld().getEnvironment() == Environment.THE_END ? predefinedBlockDataBitsEndStoneGlobal : predefinedBlockDataBitsStoneGlobal : predefinedBlockDataBitsGlobal; + } else { + // If it's this.predefinedBlockData, use this.predefinedBlockDataFull instead + BlockState[] predefinedBlockDataFull = chunkPacketInfoAntiXray.getPredefinedObjects(chunkSectionIndex) == predefinedBlockData ? this.predefinedBlockDataFull : chunkPacketInfoAntiXray.getPredefinedObjects(chunkSectionIndex); @@ -767,10 +772,10 @@ index 0000000000000000000000000000000000000000..6d41628444e880dea5c96ad5caf557f4 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java new file mode 100644 -index 0000000000000000000000000000000000000000..dc04ffc76e11ab63cd98a84cf95c58dc5cd1efdb +index 0000000000000000000000000000000000000000..4d06356d4c183605fdaa9157da02c66990f0fb70 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java -@@ -0,0 +1,81 @@ +@@ -0,0 +1,75 @@ +package com.destroystokyo.paper.antixray; + +import net.minecraft.network.protocol.game.ClientboundLevelChunkPacket; @@ -781,17 +786,15 @@ index 0000000000000000000000000000000000000000..dc04ffc76e11ab63cd98a84cf95c58dc + + private final ClientboundLevelChunkPacket packetPlayOutMapChunk; + private final LevelChunk chunk; -+ private final int chunkSectionSelector; + private byte[] data; + private final int[] bitsPerObject = new int[16]; + private final Object[] dataPalettes = new Object[16]; + private final int[] dataBitsIndexes = new int[16]; + private final Object[][] predefinedObjects = new Object[16][]; + -+ public ChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk, int chunkSectionSelector) { ++ public ChunkPacketInfo(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk) { + this.packetPlayOutMapChunk = packetPlayOutMapChunk; + this.chunk = chunk; -+ this.chunkSectionSelector = chunkSectionSelector; + } + + public ClientboundLevelChunkPacket getPacketPlayOutMapChunk() { @@ -802,10 +805,6 @@ index 0000000000000000000000000000000000000000..dc04ffc76e11ab63cd98a84cf95c58dc + return chunk; + } + -+ public int getChunkSectionSelector() { -+ return chunkSectionSelector; -+ } -+ + public byte[] getData() { + return data; + } @@ -854,7 +853,7 @@ index 0000000000000000000000000000000000000000..dc04ffc76e11ab63cd98a84cf95c58dc +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java new file mode 100644 -index 0000000000000000000000000000000000000000..7345f1dc7c5c05f2e1ee09b94f4ebf56dd59bc55 +index 0000000000000000000000000000000000000000..2339aa92ecaf3af9c7481ec6c21981c39319c76f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java @@ -0,0 +1,30 @@ @@ -869,9 +868,9 @@ index 0000000000000000000000000000000000000000..7345f1dc7c5c05f2e1ee09b94f4ebf56 + private LevelChunk[] nearbyChunks; + private final ChunkPacketBlockControllerAntiXray chunkPacketBlockControllerAntiXray; + -+ public ChunkPacketInfoAntiXray(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk, int chunkSectionSelector, ++ public ChunkPacketInfoAntiXray(ClientboundLevelChunkPacket packetPlayOutMapChunk, LevelChunk chunk, + ChunkPacketBlockControllerAntiXray chunkPacketBlockControllerAntiXray) { -+ super(packetPlayOutMapChunk, chunk, chunkSectionSelector); ++ super(packetPlayOutMapChunk, chunk); + this.chunkPacketBlockControllerAntiXray = chunkPacketBlockControllerAntiXray; + } + @@ -1031,90 +1030,73 @@ index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d266 + } +} diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -index b587f774c8f88f2a1c3ea489f7e4fe0bbdeb5a41..10dd582b0fff4df27f1113e41c8ee3e274c6fb65 100644 +index c28879f32b004f36ff746ea2274f91ddd9501e71..7762d8ff94f856d613a6f50311006b698f2aa2b0 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -@@ -1,5 +1,6 @@ - package net.minecraft.network.protocol.game; - -+import com.destroystokyo.paper.antixray.ChunkPacketInfo; // Paper - Anti-Xray - Add chunk packet info - import com.google.common.collect.Lists; - import io.netty.buffer.ByteBuf; - import io.netty.buffer.Unpooled; -@@ -16,6 +17,7 @@ import net.minecraft.network.protocol.Packet; - import net.minecraft.world.level.ChunkPos; - import net.minecraft.world.level.block.entity.BlockEntity; - import net.minecraft.world.level.block.entity.SkullBlockEntity; -+import net.minecraft.world.level.block.state.BlockState; - import net.minecraft.world.level.chunk.ChunkBiomeContainer; - import net.minecraft.world.level.chunk.LevelChunk; - import net.minecraft.world.level.chunk.LevelChunkSection; -@@ -33,7 +35,13 @@ public class ClientboundLevelChunkPacket implements Packet blockEntitiesTags; - private boolean fullChunk; - -- public ClientboundLevelChunkPacket() {} -+ // Paper start - Async-Anti-Xray - Set the ready flag to true -+ private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager -+ public ClientboundLevelChunkPacket() { -+ this.ready = true; -+ } -+ // Paper end -+ - // Paper start - private final java.util.List extraPackets = new java.util.ArrayList<>(); - private static final int TE_LIMIT = Integer.getInteger("Paper.excessiveTELimit", 750); -@@ -43,12 +51,16 @@ public class ClientboundLevelChunkPacket implements Packet chunkPacketInfo = modifyBlocks ? chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i) : null; + +- public ClientboundLevelChunkPacket(LevelChunk chunk) { ++ private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager ++ ++ // Paper start ++ @Deprecated public ClientboundLevelChunkPacket(LevelChunk chunk) { this(chunk, true); } // Notice for updates: Please make sure this constructor isn't used anywhere ++ public ClientboundLevelChunkPacket(LevelChunk chunk, boolean modifyBlocks) { ++ com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo = modifyBlocks ? chunk.level.chunkPacketBlockController.getChunkPacketInfo(this, chunk) : null; + // Paper end - ChunkPos chunkcoordintpair = chunk.getPos(); + ChunkPos chunkPos = chunk.getPos(); + this.x = chunkPos.x; + this.z = chunkPos.z; +@@ -51,7 +57,12 @@ public class ClientboundLevelChunkPacket implements Packet> 4; -- if (this.isFullChunk() || (includedSectionsMask & 1 << j) != 0) { -+ if (this.isFullChunk() || (i & 1 << j) != 0) { - // Paper start - improve oversized chunk data packet handling - if (++totalTileEntities > TE_LIMIT) { - ClientboundBlockEntityDataPacket updatePacket = tileentity.getUpdatePacket(); -@@ -93,8 +110,19 @@ public class ClientboundLevelChunkPacket implements Packet chunkPacketInfo) { ++ // Paper end + BitSet bitSet = new BitSet(); + LevelChunkSection[] levelChunkSections = chunk.getSections(); + int i = 0; +@@ -129,7 +143,7 @@ public class ClientboundLevelChunkPacket implements Packet chunkPacketInfo) { return this.a(packetDataSerializer, chunk, chunkSectionSelector, chunkPacketInfo); } // OBFHELPER -+ public int a(FriendlyByteBuf packetdataserializer, LevelChunk chunk, int i, ChunkPacketInfo chunkPacketInfo) { -+ // Paper end - int j = 0; - LevelChunkSection[] achunksection = chunk.getSections(); - int k = 0; -@@ -169,9 +201,9 @@ public class ClientboundLevelChunkPacket implements Packet[] apacket, LevelChunk chunk) { this.playerLoadedChunk(entityplayer, apacket, chunk); } // Paper - OBFHELPER private void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { if (packets[0] == null) { -- packets[0] = new ClientboundLevelChunkPacket(chunk, 65535); -+ packets[0] = new ClientboundLevelChunkPacket(chunk, 65535, chunk.world.chunkPacketBlockController.shouldModify(player, chunk, 65535)); // Paper - Anti-Xray - Bypass - packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, true); +- packets[0] = new ClientboundLevelChunkPacket(chunk); ++ packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass + packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, (BitSet) null, (BitSet) null, true); } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index fd7ee4badb383ffb4347d62c00ea2dfa3d76fd12..7a09bc921827958f58290bd3d6f19984bb34a8f6 100644 +index e6ef6d9b6e9a674db1180cae6263537e57b843d3..c5070975be1ceeab20ad0b3bab790426adb5e5fa 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -204,7 +204,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl - +@@ -292,7 +292,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl // Add env and gen to constructor, WorldData -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey resourcekey, DimensionType dimensionmanager, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { + // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error - super(iworlddataserver, resourcekey, dimensionmanager, minecraftserver::getProfiler, false, flag, i, gen, env); -+ super(iworlddataserver, resourcekey, dimensionmanager, minecraftserver::getProfiler, false, flag, i, gen, env, executor); // Paper pass executor ++ super(iworlddataserver, resourcekey, dimensionmanager, minecraftserver::getProfiler, false, flag, i, gen, env, executor); // Paper - pass executor this.pvpMode = minecraftserver.isPvpAllowed(); - convertable = convertable_conversionsession; - uuid = WorldUUID.getUUID(convertable_conversionsession.levelPath.toFile()); + this.convertable = convertable_conversionsession; + this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelPath.toFile()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index d97607f2ded4977b253d3afa3bafcbe6d7f98837..af048ab682612233c01f7087d7b8afbf7e58945b 100644 +index f4a056185990181e486f452960159a5287947382..a695e5a0c2e8846333ccb9aea499b5656af35163 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -308,6 +308,8 @@ public class ServerPlayerGameMode { +@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent; + public class ServerPlayerGameMode { + + private static final Logger LOGGER = LogManager.getLogger(); +- protected ServerLevel level; ++ public ServerLevel level; // Paper - protected->public + protected final ServerPlayer player; + private GameType gameModeForPlayer; + @Nullable +@@ -314,6 +314,8 @@ public class ServerPlayerGameMode { } } @@ -1207,39 +1157,32 @@ index d97607f2ded4977b253d3afa3bafcbe6d7f98837..af048ab682612233c01f7087d7b8afbf public void destroyAndAck(BlockPos pos, ServerboundPlayerActionPacket.Action action, String reason) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index eb88d830fb45a6b8c990e8bdc1943d80f63c8b93..1377465e3dc062f34be25cac10aa018776fb22e7 100644 +index aa198e9f2755734eac591bd3f94679518e9d7270..687e3652d0f36a358a2348df845801ad82d8460c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -2,6 +2,8 @@ package net.minecraft.world.level; - - import co.aikar.timings.Timing; - import co.aikar.timings.Timings; -+import com.destroystokyo.paper.antixray.ChunkPacketBlockController; // Paper - Anti-Xray -+import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray; // Paper - Anti-Xray - import com.destroystokyo.paper.event.server.ServerExceptionEvent; - import com.destroystokyo.paper.exception.ServerInternalException; - import com.google.common.base.MoreObjects; -@@ -144,6 +146,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -164,6 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper -+ public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray ++ public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot -@@ -165,9 +168,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - return typeKey; +@@ -185,9 +186,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + return this.typeKey; } - protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, final DimensionType dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { + protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, final DimensionType dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper -+ this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray ++ this.chunkPacketBlockController = this.paperConfig.antiXray ? ++ new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) ++ : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.generator = gen; this.world = new CraftWorld((ServerLevel) this, gen, env); this.ticksPerAnimalSpawns = this.getCraftServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -433,6 +437,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -448,6 +452,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit end BlockState iblockdata1 = chunk.setType(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1247,131 +1190,98 @@ index eb88d830fb45a6b8c990e8bdc1943d80f63c8b93..1377465e3dc062f34be25cac10aa0187 if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed (or the same) +diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +index c0075d226331f32e470dae5bf1ce8d79e8b263dc..91f5106cfe7914389b52a1ed001117b13e4f9768 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java ++++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +@@ -75,6 +75,7 @@ public interface ChunkAccess extends BlockGetter, FeatureAccess { + default LevelChunkSection getOrCreateSection(int yIndex) { + LevelChunkSection[] levelChunkSections = this.getSections(); + if (levelChunkSections[yIndex] == LevelChunk.EMPTY_SECTION) { ++ // Paper - diff on change in ProtoChunk + levelChunkSections[yIndex] = new LevelChunkSection(this.getSectionYFromSectionIndex(yIndex)); + } + diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java -index e369730ac6909ff5343468bd685c9ea2b6b3cfed..2c19d147710a3bbe2e980114161f1cdf81760947 100644 +index 69c2454533e6f21c70792b555ec02c6bc6d169b3..2607c7ba5cf1aca5f3e5c22be2e4e8b3007427d4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java -@@ -8,6 +8,7 @@ import net.minecraft.Util; - import net.minecraft.core.BlockPos; - import net.minecraft.core.Registry; - import net.minecraft.data.worldgen.biome.Biomes; -+import net.minecraft.server.MinecraftServer; - import net.minecraft.server.level.ChunkHolder; - import net.minecraft.world.entity.Entity; - import net.minecraft.world.level.ChunkPos; -@@ -28,7 +29,7 @@ public class EmptyLevelChunk extends LevelChunk { - }); +@@ -86,7 +86,7 @@ public class EmptyLevelChunk extends LevelChunk { + private static final Biome[] EMPTY_BIOMES = new Biome[0]; - public EmptyLevelChunk(Level world, ChunkPos pos) { -- super(world, pos, new ChunkBiomeContainer(world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), EmptyLevelChunk.BIOMES)); -+ super(world, pos, new ChunkBiomeContainer(MinecraftServer.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), EmptyLevelChunk.BIOMES)); // Paper - world isnt ready yet for anti xray use here, use server singleton for registry - } - - // Paper start -diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -index 17fa8b23d1000ae53f2b4f1a6e8817c1005c1c81..56ab660e29a0dc7d22eeaa41cc8f50e8a96717ef 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -@@ -27,7 +27,7 @@ public class ImposterProtoChunk extends ProtoChunk { - private final LevelChunk wrapped; - - public ImposterProtoChunk(LevelChunk wrapped) { -- super(wrapped.getPos(), UpgradeData.EMPTY); -+ super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.world); // Paper - Anti-Xray - Add parameter - this.wrapped = wrapped; - } + public EmptyChunkBiomeContainer(Level world) { +- super(world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), world, EMPTY_BIOMES); ++ super(net.minecraft.server.MinecraftServer.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), world, EMPTY_BIOMES); // Paper - world isnt ready yet for anti xray use here, use server singleton for registry + } + @Override diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 419b4bf0549d798d52d73fbbd9de59313fc05eb1..85861545ec4620a6cfd06876dad091637bd29b0b 100644 +index 521f199e495f3bec232cc9ca36e51e0392afe737..d4e11b552988f0ef28059f9aa2ca1f1897653171 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -464,7 +464,7 @@ public class LevelChunk implements ChunkAccess { +@@ -456,7 +456,7 @@ public class LevelChunk implements ChunkAccess { return null; } -- chunksection = new LevelChunkSection(j >> 4 << 4); -+ chunksection = new LevelChunkSection(j >> 4 << 4, this, this.world, true); // Paper - Anti-Xray - Add parameters - this.sections[j >> 4] = chunksection; +- chunksection = new LevelChunkSection(SectionPos.blockToSectionCoord(i)); ++ chunksection = new LevelChunkSection(SectionPos.blockToSectionCoord(i), this, this.level, true); // Paper - Anti-Xray - Add parameters + this.sections[j] = chunksection; } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index f5db97fb0dac78e1d9aa68d0417aa13f39914f52..38c7c5f18fc84d4a1de2da1ddc6d3ac37c25f341 100644 +index 5fd66020a937b641e2a060cf38df731a43f3bf55..b10beabccf5a29098a796e5615eb4632fae95f99 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -1,9 +1,11 @@ - package net.minecraft.world.level.chunk; - - import java.util.function.Predicate; -+import com.destroystokyo.paper.antixray.ChunkPacketInfo; // Paper - Anti-Xray - Add chunk packet info - import javax.annotation.Nullable; - import net.minecraft.nbt.NbtUtils; - import net.minecraft.network.FriendlyByteBuf; -+import net.minecraft.world.level.Level; - import net.minecraft.world.level.block.Block; - import net.minecraft.world.level.block.Blocks; - import net.minecraft.world.level.block.state.BlockState; -@@ -18,16 +20,22 @@ public class LevelChunkSection { +@@ -20,16 +20,25 @@ public class LevelChunkSection { private short tickingFluidCount; final PalettedContainer states; // Paper - package-private - public LevelChunkSection(int yOffset) { -- this(yOffset, (short) 0, (short) 0, (short) 0); +- this(yOffset, (short)0, (short)0, (short)0); + // Paper start - Anti-Xray - Add parameters + @Deprecated public LevelChunkSection(int yOffset) { this(yOffset, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere -+ public LevelChunkSection(int i, ChunkAccess chunk, Level world, boolean initializeBlocks) { -+ this(i, (short) 0, (short) 0, (short) 0, chunk, world, initializeBlocks); ++ public LevelChunkSection(int yOffset, ChunkAccess chunk, net.minecraft.server.level.ServerLevel world, boolean initializeBlocks) { + // Paper end ++ this(yOffset, (short) 0, (short) 0, (short) 0, chunk, world, initializeBlocks); } - public LevelChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount) { -- this.bottomBlockY = yOffset; -- this.nonEmptyBlockCount = nonEmptyBlockCount; -- this.tickingBlockCount = randomTickableBlockCount; -- this.tickingFluidCount = nonEmptyFluidCount; -- this.states = new PalettedContainer<>(LevelChunkSection.GLOBAL_BLOCKSTATE_PALETTE, Block.BLOCK_STATE_REGISTRY, NbtUtils::readBlockState, NbtUtils::writeBlockState, Blocks.AIR.defaultBlockState()); + // Paper start - Anti-Xray - Add parameters -+ @Deprecated public LevelChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount) { this(yOffset, nonEmptyBlockCount, randomTickableBlockCount, nonEmptyFluidCount, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere -+ public LevelChunkSection(int i, short short0, short short1, short short2, ChunkAccess chunk, Level world, boolean initializeBlocks) { ++ @Deprecated public LevelChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount) { // Notice for updates: Please make sure this constructor isn't used anywhere ++ this(yOffset, nonEmptyBlockCount, randomTickableBlockCount, nonEmptyFluidCount, null, null, true); ++ } ++ public LevelChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount, ChunkAccess chunk, net.minecraft.server.level.ServerLevel world, boolean initializeBlocks) { + // Paper end -+ this.bottomBlockY = i; -+ this.nonEmptyBlockCount = short0; -+ this.tickingBlockCount = short1; -+ this.tickingFluidCount = short2; -+ this.states = new PalettedContainer<>(LevelChunkSection.GLOBAL_BLOCKSTATE_PALETTE, Block.BLOCK_STATE_REGISTRY, NbtUtils::readBlockState, NbtUtils::writeBlockState, Blocks.AIR.defaultBlockState(), world == null ? null : world.chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, initializeBlocks), initializeBlocks); // Paper - Anti-Xray - Add predefined block data + this.bottomBlockY = getBottomBlockY(yOffset); + this.nonEmptyBlockCount = nonEmptyBlockCount; + this.tickingBlockCount = randomTickableBlockCount; + this.tickingFluidCount = nonEmptyFluidCount; +- this.states = new PalettedContainer<>(GLOBAL_BLOCKSTATE_PALETTE, Block.BLOCK_STATE_REGISTRY, NbtUtils::readBlockState, NbtUtils::writeBlockState, Blocks.AIR.defaultBlockState()); ++ this.states = new PalettedContainer<>(GLOBAL_BLOCKSTATE_PALETTE, Block.BLOCK_STATE_REGISTRY, NbtUtils::readBlockState, NbtUtils::writeBlockState, Blocks.AIR.defaultBlockState(), ++ world == null ? null : world.chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, initializeBlocks), initializeBlocks); // Paper - Anti-Xray - Add predefined block data } - public final BlockState getBlockState(int x, int y, int z) { // Paper -@@ -139,10 +147,14 @@ public class LevelChunkSection { - return this.states; + public static int getBottomBlockY(int chunkPos) { +@@ -147,9 +156,12 @@ public class LevelChunkSection { + this.states.read(buf); } -- public void writeChunkSection(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER -- public void write(FriendlyByteBuf packetdataserializer) { -+ // Paper start - Anti-Xray - Add chunk packet info -+ @Deprecated public final void writeChunkSection(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // OBFHELPER // Notice for updates: Please make sure this method isn't used anywhere -+ @Deprecated public final void write(FriendlyByteBuf packetdataserializer) { this.writeChunkSection(packetdataserializer, null); } // Notice for updates: Please make sure this method isn't used anywhere -+ public final void writeChunkSection(FriendlyByteBuf packetDataSerializer, ChunkPacketInfo chunkPacketInfo) { this.b(packetDataSerializer, chunkPacketInfo); } // OBFHELPER -+ public void b(FriendlyByteBuf packetdataserializer, ChunkPacketInfo chunkPacketInfo) { +- public void write(FriendlyByteBuf buf) { ++ // Paper start ++ @Deprecated public void write(FriendlyByteBuf buf) { write(buf, null); } // Notice for updates: Please make sure this method isn't used anywhere ++ public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo) { + // Paper end - packetdataserializer.writeShort(this.nonEmptyBlockCount); -- this.states.write(packetdataserializer); -+ this.states.writeDataPaletteBlock(packetdataserializer, chunkPacketInfo, this.bottomBlockY >> 4); // Paper - Anti-Xray - Add chunk packet info + buf.writeShort(this.nonEmptyBlockCount); +- this.states.write(buf); ++ this.states.write(buf, chunkPacketInfo, this.bottomBlockY >> 4); // Paper - Anti-Xray - Add chunk packet info } public int getSerializedSize() { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 917b0a64083ebbe24321089b784b91f3af4918b9..dd252372e1e380674b1191e9ea265cbb10de437b 100644 +index 5ea60bbb56450502f1ceb41959239ab579458ac2..efe4d45b431890e4821f977b8f9fafdab7de3be2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -1,6 +1,7 @@ - package net.minecraft.world.level.chunk; - - import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; -+import com.destroystokyo.paper.antixray.ChunkPacketInfo; // Paper - Anti-Xray - Add chunk packet info - import java.util.Arrays; - import java.util.Objects; - import java.util.concurrent.locks.ReentrantLock; -@@ -26,6 +27,7 @@ public class PalettedContainer implements PaletteResize { +@@ -28,6 +28,7 @@ public class PalettedContainer implements PaletteResize { private final Function reader; private final Function writer; private final T defaultValue; @@ -1379,26 +1289,23 @@ index 917b0a64083ebbe24321089b784b91f3af4918b9..dd252372e1e380674b1191e9ea265cbb protected BitStorage storage; public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER private Palette palette; private Palette getDataPalette() { return this.palette; } // Paper - OBFHELPER private int bits; private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER -@@ -50,14 +52,47 @@ public class PalettedContainer implements PaletteResize { - //this.j.unlock(); // Paper - disable this +@@ -48,15 +49,51 @@ public class PalettedContainer implements PaletteResize { + this.lock.release(); } - public PalettedContainer(Palette fallbackPalette, IdMapper idList, Function elementDeserializer, Function elementSerializer, T defaultElement) { -- this.globalPalette = fallbackPalette; -- this.registry = idList; -- this.reader = elementDeserializer; -- this.writer = elementSerializer; -- this.defaultValue = defaultElement; -- this.setBits(4); + // Paper start - Anti-Xray - Add predefined objects -+ @Deprecated public PalettedContainer(Palette fallbackPalette, IdMapper idList, Function elementDeserializer, Function elementSerializer, T defaultElement) { this(fallbackPalette, idList, elementDeserializer, elementSerializer, defaultElement, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere -+ public PalettedContainer(Palette datapalette, IdMapper registryblockid, Function function, Function function1, T t0, T[] predefinedObjects, boolean initialize) { ++ @Deprecated public PalettedContainer(Palette fallbackPalette, IdMapper idList, Function elementDeserializer, Function elementSerializer, T defaultElement) { // Notice for updates: Please make sure this constructor isn't used anywhere ++ this(fallbackPalette, idList, elementDeserializer, elementSerializer, defaultElement, null, true); ++ } ++ public PalettedContainer(Palette fallbackPalette, IdMapper idList, Function elementDeserializer, Function elementSerializer, T defaultElement, T[] predefinedObjects, boolean initialize) { + // Paper end -+ this.globalPalette = datapalette; -+ this.registry = registryblockid; -+ this.reader = function; -+ this.writer = function1; -+ this.defaultValue = t0; + this.globalPalette = fallbackPalette; + this.registry = idList; + this.reader = elementDeserializer; + this.writer = elementSerializer; + this.defaultValue = defaultElement; + this.setBits(4); + // Paper start - Anti-Xray - Add predefined objects + this.predefinedObjects = predefinedObjects; + @@ -1420,168 +1327,119 @@ index 917b0a64083ebbe24321089b784b91f3af4918b9..dd252372e1e380674b1191e9ea265cbb + } + } + // Paper end -+ } -+ + } + + // Paper start - Anti-Xray - Add predefined objects + private void addPredefinedObjects() { -+ if (this.predefinedObjects != null && this.getDataPalette() != this.getDataPaletteGlobal()) { -+ for (int i = 0; i < this.predefinedObjects.length; i++) { -+ this.getDataPalette().getOrCreateIdFor(this.predefinedObjects[i]); ++ if (this.predefinedObjects != null && this.palette != this.globalPalette) { ++ for (T predefinedObject : this.predefinedObjects) { ++ this.palette.getOrCreateIdFor(predefinedObject); + } + } - } ++ } + // Paper end - ++ private static int getIndex(int x, int y, int z) { return y << 8 | z << 4 | x; -@@ -92,6 +127,7 @@ public class PalettedContainer implements PaletteResize { - - int j; + } +@@ -86,6 +123,7 @@ public class PalettedContainer implements PaletteResize { + Palette palette = this.palette; + this.setBits(newSize); + this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects - for (j = 0; j < databits.getSize(); ++j) { - T t1 = datapalette.valueFor(databits.get(j)); - -@@ -141,24 +177,38 @@ public class PalettedContainer implements PaletteResize { - return t0 == null ? this.defaultValue : t0; + for(int i = 0; i < bitStorage.getSize(); ++i) { + T object = palette.valueFor(bitStorage.get(i)); + if (object != null) { +@@ -161,11 +199,24 @@ public class PalettedContainer implements PaletteResize { } -- public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER -- public synchronized void write(FriendlyByteBuf buf) { // Paper - synchronize + public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER +- public void write(FriendlyByteBuf buf) { + // Paper start - Anti-Xray - Add chunk packet info -+ @Deprecated public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // OBFHELPER // Notice for updates: Please make sure this method isn't used anywhere -+ @Deprecated public void write(FriendlyByteBuf buf) { this.writeDataPaletteBlock(buf, null, 0); } // Notice for updates: Please make sure this method isn't used anywhere -+ public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer, ChunkPacketInfo chunkPacketInfo, int chunkSectionIndex) { this.b(packetDataSerializer, chunkPacketInfo, chunkSectionIndex); } // OBFHELPER -+ public synchronized void b(FriendlyByteBuf packetdataserializer, ChunkPacketInfo chunkPacketInfo, int chunkSectionIndex) { // Paper - synchronize ++ @Deprecated public void write(FriendlyByteBuf buf) { ++ write(buf, null, 0); ++ } ++ public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo, int chunkSectionIndex) { + // Paper end - this.acquire(); -- buf.writeByte(this.bits); -- this.palette.write(buf); -- buf.writeLongArray(this.storage.getRaw()); -+ packetdataserializer.writeByte(this.bits); -+ this.palette.write(packetdataserializer); -+ // Paper start - Anti-Xray - Add chunk packet info -+ if (chunkPacketInfo != null) { -+ chunkPacketInfo.setBitsPerObject(chunkSectionIndex, this.getBitsPerObject()); -+ chunkPacketInfo.setDataPalette(chunkSectionIndex, this.getDataPalette()); -+ chunkPacketInfo.setDataBitsIndex(chunkSectionIndex, packetdataserializer.writerIndex() + FriendlyByteBuf.countBytes(this.getDataBits().getDataBits().length)); -+ chunkPacketInfo.setPredefinedObjects(chunkSectionIndex, this.predefinedObjects); -+ } -+ // Paper end -+ packetdataserializer.writeLongArray(this.storage.getRaw()); - this.release(); - } + try { + this.acquire(); + buf.writeByte(this.bits); + this.palette.write(buf); ++ // Paper start - Anti-Xray - Add chunk packet info ++ if (chunkPacketInfo != null) { ++ chunkPacketInfo.setBitsPerObject(chunkSectionIndex, this.bits); ++ chunkPacketInfo.setDataPalette(chunkSectionIndex, this.palette); ++ chunkPacketInfo.setDataBitsIndex(chunkSectionIndex, buf.writerIndex() + FriendlyByteBuf.getVarIntSize(this.storage.getDataBits().length)); ++ chunkPacketInfo.setPredefinedObjects(chunkSectionIndex, this.predefinedObjects); ++ } ++ // Paper end + buf.writeLongArray(this.storage.getRaw()); + } finally { + this.release(); +@@ -176,12 +227,14 @@ public class PalettedContainer implements PaletteResize { + public void read(ListTag paletteNbt, long[] data) { + try { + this.acquire(); +- int i = Math.max(4, Mth.ceillog2(paletteNbt.size())); +- if (i != this.bits) { ++ // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? ++ int i = Math.max(4, Mth.ceillog2(paletteNbt.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects ++ if (true || i != this.bits) { // Paper - Anti-Xray - Not initialized yet + this.setBits(i); + } - public synchronized void read(ListTag paletteTag, long[] data) { // Paper - synchronize - this.acquire(); -- int i = Math.max(4, Mth.ceillog2(paletteTag.size())); -+ // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? -+ int i = Math.max(4, Mth.ceillog2(paletteTag.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects - -- if (i != this.bits) { -+ if (true || i != this.bits) { // Paper - Anti-Xray - Not initialized yet - this.setBits(i); - } - - this.palette.read(paletteTag); -+ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects - int j = data.length * 64 / 4096; - - if (this.palette == this.globalPalette) { + this.palette.read(paletteNbt); ++ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects + int j = data.length * 64 / 4096; + if (this.palette == this.globalPalette) { + Palette palette = new HashMapPalette<>(this.registry, i, this.dummyPaletteResize, this.reader, this.writer); diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -index d8b7b210484079c9ca2c34831c84102cba6692f5..87fd585141ad9818fca0b697cb4c87248fe7ce11 100644 +index 245998e2cea32cf15ee2659639c647f449704ec0..cd41b9ee682248a9abde1bf046e54c7e6e485470 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -@@ -64,16 +64,24 @@ public class ProtoChunk implements ChunkAccess { +@@ -63,7 +63,7 @@ public class ProtoChunk implements ChunkAccess { private long inhabitedTime; - private final Map carvingMasks; + private final Map carvingMasks = new Object2ObjectArrayMap<>(); private volatile boolean isLightCorrect; -+ private final Level world; // Paper - Anti-Xray - Add world +- final net.minecraft.world.level.Level level; // Paper - Add level ++ final net.minecraft.server.level.ServerLevel level; // Paper - Add level -- public ProtoChunk(ChunkPos pos, UpgradeData upgradeData) { -- this(pos, upgradeData, (LevelChunkSection[]) null, new ProtoTickList<>((block) -> { -+ // Paper start - Anti-Xray - Add world -+ @Deprecated public ProtoChunk(ChunkPos pos, UpgradeData upgradeData) { this(pos, upgradeData, null); } // Notice for updates: Please make sure this constructor isn't used anywhere -+ public ProtoChunk(ChunkPos chunkcoordintpair, UpgradeData chunkconverter, Level world) { -+ // Paper end -+ this(chunkcoordintpair, chunkconverter, (LevelChunkSection[]) null, new ProtoTickList<>((block) -> { - return block == null || block.defaultBlockState().isAir(); -- }, pos), new ProtoTickList<>((fluidtype) -> { -+ }, chunkcoordintpair), new ProtoTickList<>((fluidtype) -> { - return fluidtype == null || fluidtype == Fluids.EMPTY; -- }, pos)); -+ }, chunkcoordintpair), world); // Paper - Anti-Xray - Add world + // Paper start - add level + @Deprecated public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor world) { this(pos, upgradeData, world, null); } +@@ -506,4 +506,15 @@ public class ProtoChunk implements ChunkAccess { + public int getHeight() { + return this.levelHeightAccessor.getHeight(); } - -- public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, @Nullable LevelChunkSection[] sections, ProtoTickList blockTickScheduler, ProtoTickList fluidTickScheduler) { -+ // Paper start - Anti-Xray - Add world -+ @Deprecated public ProtoChunk(ChunkPos pos, UpgradeData upgradeData, @Nullable LevelChunkSection[] sections, ProtoTickList blockTickScheduler, ProtoTickList fluidTickScheduler) { this(pos, upgradeData, sections, blockTickScheduler, fluidTickScheduler, null); } // Notice for updates: Please make sure this constructor isn't used anywhere -+ public ProtoChunk(ChunkPos chunkcoordintpair, UpgradeData chunkconverter, @Nullable LevelChunkSection[] achunksection, ProtoTickList protochunkticklist, ProtoTickList protochunkticklist1, Level world) { -+ this.world = world; -+ // Paper end - this.heightmaps = Maps.newEnumMap(Heightmap.Types.class); - this.status = ChunkStatus.EMPTY; - this.blockEntities = Maps.newHashMap(); -@@ -85,15 +93,15 @@ public class ProtoChunk implements ChunkAccess { - this.structureStarts = Maps.newHashMap(); - this.structuresRefences = Maps.newHashMap(); - this.carvingMasks = new Object2ObjectArrayMap(); -- this.chunkPos = pos; -- this.upgradeData = upgradeData; -- this.blockTicks = blockTickScheduler; -- this.liquidTicks = fluidTickScheduler; -- if (sections != null) { -- if (this.sections.length == sections.length) { -- System.arraycopy(sections, 0, this.sections, 0, this.sections.length); -+ this.chunkPos = chunkcoordintpair; -+ this.upgradeData = chunkconverter; -+ this.blockTicks = protochunkticklist; -+ this.liquidTicks = protochunkticklist1; -+ if (achunksection != null) { -+ if (this.sections.length == achunksection.length) { -+ System.arraycopy(achunksection, 0, this.sections, 0, this.sections.length); - } else { -- ProtoChunk.LOGGER.warn("Could not set level chunk sections, array length is {} instead of {}", sections.length, this.sections.length); -+ ProtoChunk.LOGGER.warn("Could not set level chunk sections, array length is {} instead of {}", achunksection.length, this.sections.length); - } - } - -@@ -228,7 +236,7 @@ public class ProtoChunk implements ChunkAccess { - - public LevelChunkSection getOrCreateSection(int y) { - if (this.sections[y] == LevelChunk.EMPTY_SECTION) { -- this.sections[y] = new LevelChunkSection(y << 4); -+ this.sections[y] = new LevelChunkSection(y << 4, this, this.world, true); // Paper - Anti-Xray - Add parameters - } - - return this.sections[y]; ++ ++ @Override ++ public net.minecraft.world.level.chunk.LevelChunkSection getOrCreateSection(final int yIndex) { ++ LevelChunkSection[] levelChunkSections = this.getSections(); ++ if (levelChunkSections[yIndex] == LevelChunk.EMPTY_SECTION) { ++ // Paper - diff on change in ProtoChunk ++ levelChunkSections[yIndex] = new LevelChunkSection(this.getSectionYFromSectionIndex(yIndex), this, this.level, true); // Paper - Anti-Xray - Add parameters ++ } ++ ++ return levelChunkSections[yIndex]; ++ } + } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 969130442b529eaac6f708107ff129f89cc0af90..8dbd1dc2de400ad0c6c2be49ba09dfc03216ffd2 100644 +index 7c04aef3eac54981ca1e34cb87d97104c3c9685b..097d38f12ef324dbb529a833383e2da949377f9c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -101,7 +101,7 @@ public class ChunkSerializer { +@@ -136,7 +136,7 @@ public class ChunkSerializer { byte b0 = nbttagcompound2.getByte("Y"); if (nbttagcompound2.contains("Palette", 9) && nbttagcompound2.contains("BlockStates", 12)) { -- LevelChunkSection chunksection = new LevelChunkSection(b0 << 4); -+ LevelChunkSection chunksection = new LevelChunkSection(b0 << 4, null, world, false); // Paper - Anti-Xray - Add parameters +- LevelChunkSection chunksection = new LevelChunkSection(b0); ++ LevelChunkSection chunksection = new LevelChunkSection(b0, null, world, false); // Paper - Anti-Xray - Add parameters chunksection.getStates().read(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates")); chunksection.recalcBlockCounts(); -@@ -165,7 +165,7 @@ public class ChunkSerializer { - // CraftBukkit end - }); - } else { -- ProtoChunk protochunk = new ProtoChunk(pos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1); -+ ProtoChunk protochunk = new ProtoChunk(pos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, world); // Paper - Anti-Xray - Add parameter - - protochunk.setBiomes(biomestorage); - object = protochunk; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 423594177fe78600755d913f169f28dd1bfa2b37..74bad15034d9d55fb70931f38868f812160c6305 100644 +index 245d764d3dcc549fa8acbd7c9024a3c88d2d2a74..4dd7cea1eec5ec55a3700ce9786da8a513e72a28 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -43,7 +43,7 @@ public class CraftChunk implements Chunk { +@@ -46,7 +46,7 @@ public class CraftChunk implements Chunk { private final ServerLevel worldServer; private final int x; private final int z; @@ -1590,7 +1448,7 @@ index 423594177fe78600755d913f169f28dd1bfa2b37..74bad15034d9d55fb70931f38868f812 private static final byte[] emptyLight = new byte[2048]; public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { -@@ -287,7 +287,7 @@ public class CraftChunk implements Chunk { +@@ -275,7 +275,7 @@ public class CraftChunk implements Chunk { CompoundTag data = new CompoundTag(); cs[i].getStates().write(data, "Palette", "BlockStates"); @@ -1600,27 +1458,27 @@ index 423594177fe78600755d913f169f28dd1bfa2b37..74bad15034d9d55fb70931f38868f812 sectionBlockIDs[i] = blockids; diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index a94c65f4d63a06be099fd67b0b7756c5b45b84a0..8d72cd6a44cf462cfe3adac9bf99a16883a587df 100644 +index 3d905c98704da64cefd009b2c796b24e729396a5..fe7851476636dfed02339d4d9f93824b96086769 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -@@ -21,9 +21,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { +@@ -22,9 +22,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { private final int maxHeight; private final LevelChunkSection[] sections; private Set tiles; + private World world; // Paper - Anti-Xray - Add world public CraftChunkData(World world) { - this(world.getMaxHeight()); + this(world.getMinHeight(), world.getMaxHeight()); + this.world = world; // Paper - Anti-Xray - Add world } - /* pp for tests */ CraftChunkData(int maxHeight) { -@@ -157,7 +159,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { - private LevelChunkSection getChunkSection(int y, boolean create) { - LevelChunkSection section = sections[y >> 4]; + /* pp for tests */ CraftChunkData(int minHeight, int maxHeight) { +@@ -162,7 +164,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { + int offset = (y - this.minHeight) >> 4; + LevelChunkSection section = this.sections[offset]; if (create && section == null) { -- sections[y >> 4] = section = new LevelChunkSection(y >> 4 << 4); -+ sections[y >> 4] = section = new LevelChunkSection(y >> 4 << 4, null, world instanceof org.bukkit.craftbukkit.CraftWorld ? ((org.bukkit.craftbukkit.CraftWorld) world).getHandle() : null, true); // Paper - Anti-Xray - Add parameters +- this.sections[offset] = section = new LevelChunkSection(offset + (this.minHeight >> 4)); ++ this.sections[offset] = section = new LevelChunkSection(offset + (this.minHeight >> 4), null, world instanceof org.bukkit.craftbukkit.CraftWorld ? ((org.bukkit.craftbukkit.CraftWorld) world).getHandle() : null, true); // Paper - Anti-Xray - Add parameters } return section; } diff --git a/patches/server/0364-No-Tick-view-distance-implementation.patch b/patches/server/0365-No-Tick-view-distance-implementation.patch similarity index 98% rename from patches/server/0364-No-Tick-view-distance-implementation.patch rename to patches/server/0365-No-Tick-view-distance-implementation.patch index 96b59e1789..ef60b4aa37 100644 --- a/patches/server/0364-No-Tick-view-distance-implementation.patch +++ b/patches/server/0365-No-Tick-view-distance-implementation.patch @@ -23,20 +23,21 @@ index f27fadc15cb7f5c782e45885ec6a5a69963beade..2ff4d4921e2076abf415bd3c8f5173ec })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e29566cad2647da4d9288e912188b57f00e8dd0c..3cd8895adecd345c3bdfb8b5e3e9fdf0ef9097db 100644 +index 51691d3dedf113d58f340b74d448c5e5375b5bed..b2f0102c2a15eb4324367f52e03e534bff883f9b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -445,5 +445,10 @@ public class PaperWorldConfig { - private void lightQueueSize() { +@@ -448,6 +448,11 @@ public class PaperWorldConfig { lightQueueSize = getInt("light-queue-size", lightQueueSize); } -+ + + public int noTickViewDistance; + private void viewDistance() { + this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); + } - } - ++ + public boolean antiXray; + public EngineMode engineMode; + public int maxChunkSectionIndex; diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java index bb0a07a280c7d4885165e9d6488e7741aaa7b47c..9c88426ab1275ee5fb6e28be8b213533dc4ab859 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java @@ -144,7 +145,7 @@ index 3653ec6f93d627092e63cede51f4db2e12b10613..995d7977233f0d7683c00a75c3833f9a public CompletableFuture> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 480c361c919bbfbebacf9ac94418eac5ed38e233..fdf5d8ede4b01e399272ddebfbd49258b166f00b 100644 +index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33e2d15579 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -122,7 +122,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -486,7 +487,7 @@ index 480c361c919bbfbebacf9ac94418eac5ed38e233..fdf5d8ede4b01e399272ddebfbd49258 + + public void playerLoadedChunk(ServerPlayer player, Packet[] packets, LevelChunk chunk) { // Paper - private -> public if (packets[0] == null) { - packets[0] = new ClientboundLevelChunkPacket(chunk); + packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, (BitSet) null, (BitSet) null, true); diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218cdfe1d456 100644 @@ -556,10 +557,10 @@ index bcc946d2747443c34ee8ac2485a5ab41773c93af..2730923bd0bf3b0f928765b9e09e2299 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index aa198e9f2755734eac591bd3f94679518e9d7270..507a70521a97c463d6fd22b788c39e9f458971c3 100644 +index 687e3652d0f36a358a2348df845801ad82d8460c..4eee8156d193f59b7e28499f492f81247c4b1591 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -522,8 +522,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -527,8 +527,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.setBlocksDirty(blockposition, iblockdata1, iblockdata2); } @@ -575,7 +576,7 @@ index aa198e9f2755734eac591bd3f94679518e9d7270..507a70521a97c463d6fd22b788c39e9f if ((i & 1) != 0) { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 521f199e495f3bec232cc9ca36e51e0392afe737..922026da8c234427e0322443004d3c32993adfce 100644 +index d4e11b552988f0ef28059f9aa2ca1f1897653171..f6b591f045ae992180806fd6aba309c0d04e722b 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -33,7 +33,10 @@ import net.minecraft.core.Registry; diff --git a/patches/server/0365-Implement-alternative-item-despawn-rate.patch b/patches/server/0366-Implement-alternative-item-despawn-rate.patch similarity index 76% rename from patches/server/0365-Implement-alternative-item-despawn-rate.patch rename to patches/server/0366-Implement-alternative-item-despawn-rate.patch index 5db80421d3..889c22011c 100644 --- a/patches/server/0365-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0366-Implement-alternative-item-despawn-rate.patch @@ -5,44 +5,29 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3cd8895adecd345c3bdfb8b5e3e9fdf0ef9097db..be4a36df28d4f16727daad1270d5c3a84ae94613 100644 +index b2f0102c2a15eb4324367f52e03e534bff883f9b..3f4a9ce31981f77b1c451a5d9ba91d6c9ab67587 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -1,8 +1,13 @@ - package com.destroystokyo.paper; - -+import java.util.EnumMap; -+import java.util.HashMap; - import java.util.List; -+import java.util.Map; - - import org.bukkit.Bukkit; -+import org.bukkit.Material; -+import org.bukkit.configuration.ConfigurationSection; - import org.bukkit.configuration.file.YamlConfiguration; - import org.spigotmc.SpigotWorldConfig; - -@@ -450,5 +455,53 @@ public class PaperWorldConfig { - private void viewDistance() { +@@ -453,6 +453,54 @@ public class PaperWorldConfig { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } -+ + + public boolean altItemDespawnRateEnabled; -+ public Map altItemDespawnRateMap; ++ public java.util.Map altItemDespawnRateMap; + private void altItemDespawnRate() { + String path = "alt-item-despawn-rate"; + + altItemDespawnRateEnabled = getBoolean(path + ".enabled", false); + -+ Map altItemDespawnRateMapDefault = new EnumMap<>(Material.class); -+ altItemDespawnRateMapDefault.put(Material.COBBLESTONE, 300); -+ for (Material key : altItemDespawnRateMapDefault.keySet()) { ++ java.util.Map altItemDespawnRateMapDefault = new java.util.EnumMap<>(org.bukkit.Material.class); ++ altItemDespawnRateMapDefault.put(org.bukkit.Material.COBBLESTONE, 300); ++ for (org.bukkit.Material key : altItemDespawnRateMapDefault.keySet()) { + config.addDefault("world-settings.default." + path + ".items." + key, altItemDespawnRateMapDefault.get(key)); + } + -+ Map rawMap = new HashMap<>(); ++ java.util.Map rawMap = new java.util.HashMap<>(); + try { -+ ConfigurationSection mapSection = config.getConfigurationSection("world-settings." + worldName + "." + path + ".items"); ++ org.bukkit.configuration.ConfigurationSection mapSection = config.getConfigurationSection("world-settings." + worldName + "." + path + ".items"); + if (mapSection == null) { + mapSection = config.getConfigurationSection("world-settings.default." + path + ".items"); + } @@ -56,26 +41,28 @@ index 3cd8895adecd345c3bdfb8b5e3e9fdf0ef9097db..be4a36df28d4f16727daad1270d5c3a8 + altItemDespawnRateEnabled = false; + } + -+ altItemDespawnRateMap = new EnumMap<>(Material.class); ++ altItemDespawnRateMap = new java.util.EnumMap<>(org.bukkit.Material.class); + if (!altItemDespawnRateEnabled) { + return; + } + + for(String key : rawMap.keySet()) { + try { -+ altItemDespawnRateMap.put(Material.valueOf(key), rawMap.get(key)); ++ altItemDespawnRateMap.put(org.bukkit.Material.valueOf(key), rawMap.get(key)); + } catch (Exception e) { + logError("Could not add item " + key + " to altItemDespawnRateMap: " + e.getMessage()); + } + } + if(altItemDespawnRateEnabled) { -+ for(Material key : altItemDespawnRateMap.keySet()) { ++ for(org.bukkit.Material key : altItemDespawnRateMap.keySet()) { + log("Alternative item despawn rate of " + key + ": " + altItemDespawnRateMap.get(key)); + } + } + } - } - ++ + public boolean antiXray; + public EngineMode engineMode; + public int maxChunkSectionIndex; diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java index 9ee1dc89dd4c6b9453e1f6f92208d454877d23c9..e0c13a112c95eed9867d4608e18dc797b0c9c9cf 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/patches/server/0366-Tracking-Range-Improvements.patch b/patches/server/0367-Tracking-Range-Improvements.patch similarity index 97% rename from patches/server/0366-Tracking-Range-Improvements.patch rename to patches/server/0367-Tracking-Range-Improvements.patch index b4d6875ed4..a8cc0ab069 100644 --- a/patches/server/0366-Tracking-Range-Improvements.patch +++ b/patches/server/0367-Tracking-Range-Improvements.patch @@ -8,7 +8,7 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index fdf5d8ede4b01e399272ddebfbd49258b166f00b..273cd2e0fc38801a5ecb26579e4d0e9ee017bb3c 100644 +index b0cf6e186d7030b1aa9296671683bd33e2d15579..280bd301b7005d16fec293311f11485b94ded550 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1791,6 +1791,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially diff --git a/patches/server/0367-Fix-items-vanishing-through-end-portal.patch b/patches/server/0368-Fix-items-vanishing-through-end-portal.patch similarity index 100% rename from patches/server/0367-Fix-items-vanishing-through-end-portal.patch rename to patches/server/0368-Fix-items-vanishing-through-end-portal.patch diff --git a/patches/server/0368-implement-optional-per-player-mob-spawns.patch b/patches/server/0369-implement-optional-per-player-mob-spawns.patch similarity index 97% rename from patches/server/0368-implement-optional-per-player-mob-spawns.patch rename to patches/server/0369-implement-optional-per-player-mob-spawns.patch index 27117d65e3..0ddeaece3a 100644 --- a/patches/server/0368-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0369-implement-optional-per-player-mob-spawns.patch @@ -25,11 +25,11 @@ index fe79c0add4f7cb18d487c5bb9415c40c5b551ea2..8d9ddad1879e7616d980ca70de8aecac poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index be4a36df28d4f16727daad1270d5c3a84ae94613..16f013ffe992a934e9d0b32e764a14a8fd204449 100644 +index 3f4a9ce31981f77b1c451a5d9ba91d6c9ab67587..a69efd1a21a667c5eee539f6c761755479375527 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -503,5 +503,10 @@ public class PaperWorldConfig { - } +@@ -534,5 +534,10 @@ public class PaperWorldConfig { + Bukkit.getLogger().warning("You have enabled permission-based Anti-Xray checking - depending on your permission plugin, this may cause performance issues"); } } + @@ -545,18 +545,10 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 273cd2e0fc38801a5ecb26579e4d0e9ee017bb3c..e1498a5a8e664b922c77a8524ed2ea38c91834ce 100644 +index 280bd301b7005d16fec293311f11485b94ded550..d3f835a0c76ce559fb5f3c39714a3312c7e865d1 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -69,6 +69,7 @@ import net.minecraft.util.thread.ProcessorMailbox; - import net.minecraft.world.entity.Entity; - import net.minecraft.world.entity.EntityType; - import net.minecraft.world.entity.Mob; -+import net.minecraft.world.entity.MobCategory; - import net.minecraft.world.entity.ai.village.poi.PoiManager; - import net.minecraft.world.entity.boss.EnderDragonPart; - import net.minecraft.world.level.ChunkPos; -@@ -140,6 +141,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -140,6 +140,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Long2ByteMap chunkTypeCache; private final Queue unloadQueue; int viewDistance; @@ -564,7 +556,7 @@ index 273cd2e0fc38801a5ecb26579e4d0e9ee017bb3c..e1498a5a8e664b922c77a8524ed2ea38 // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); -@@ -263,6 +265,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -263,6 +264,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.overworldDataStorage = persistentStateManagerFactory; this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); @@ -572,7 +564,7 @@ index 273cd2e0fc38801a5ecb26579e4d0e9ee017bb3c..e1498a5a8e664b922c77a8524ed2ea38 // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -304,6 +307,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -304,6 +306,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - no-tick view distance } @@ -590,7 +582,7 @@ index 273cd2e0fc38801a5ecb26579e4d0e9ee017bb3c..e1498a5a8e664b922c77a8524ed2ea38 + } + } + -+ public int getMobCountNear(ServerPlayer entityPlayer, MobCategory enumCreatureType) { ++ public int getMobCountNear(ServerPlayer entityPlayer, net.minecraft.world.entity.MobCategory enumCreatureType) { + return entityPlayer.mobCounts[enumCreatureType.ordinal()]; + } + // Paper end diff --git a/patches/server/0369-Avoid-hopper-searches-if-there-are-no-items.patch b/patches/server/0370-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 97% rename from patches/server/0369-Avoid-hopper-searches-if-there-are-no-items.patch rename to patches/server/0370-Avoid-hopper-searches-if-there-are-no-items.patch index f2b4f51f8e..d0bab4c136 100644 --- a/patches/server/0369-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/patches/server/0370-Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,10 +14,10 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 507a70521a97c463d6fd22b788c39e9f458971c3..1dc1f7a5319e067b5f56c2fdadf04547ae1bc9ea 100644 +index 4eee8156d193f59b7e28499f492f81247c4b1591..641f022c4c716e0441a098f4540fd008059a4b51 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -984,7 +984,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -989,7 +989,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } } diff --git a/patches/server/0370-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0371-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from patches/server/0370-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0371-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/patches/server/0371-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0372-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 100% rename from patches/server/0371-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0372-Optimise-getChunkAt-calls-for-loaded-chunks.patch diff --git a/patches/server/0372-Allow-overriding-the-java-version-check.patch b/patches/server/0373-Allow-overriding-the-java-version-check.patch similarity index 100% rename from patches/server/0372-Allow-overriding-the-java-version-check.patch rename to patches/server/0373-Allow-overriding-the-java-version-check.patch diff --git a/patches/server/0373-Add-ThrownEggHatchEvent.patch b/patches/server/0374-Add-ThrownEggHatchEvent.patch similarity index 100% rename from patches/server/0373-Add-ThrownEggHatchEvent.patch rename to patches/server/0374-Add-ThrownEggHatchEvent.patch diff --git a/patches/server/0374-Optimise-random-block-ticking.patch b/patches/server/0375-Optimise-random-block-ticking.patch similarity index 95% rename from patches/server/0374-Optimise-random-block-ticking.patch rename to patches/server/0375-Optimise-random-block-ticking.patch index f5938a4275..99d7609598 100644 --- a/patches/server/0374-Optimise-random-block-ticking.patch +++ b/patches/server/0375-Optimise-random-block-ticking.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..3edc8e52e06a62ce9f8cc734fd7458b3 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8d72e68fe8f7d0a770264f54c539ea11f5e1d8da..50efe1bd6a62b71007bf3274f323704be1477ce7 100644 +index c5070975be1ceeab20ad0b3bab790426adb5e5fa..86ee1b535a6e586fd4e9e3c37f439d81b4508939 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -667,7 +667,12 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -266,10 +266,10 @@ index e638d982b4bd1d261a7282cad6dab98ad0b55213..e305173fd1652a8b88ae8a9b94d0fae0 public BlockPos getHomePos() { // Paper - public diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1dc1f7a5319e067b5f56c2fdadf04547ae1bc9ea..9d5dcaabe43ee36259b24063b4c74daddc7df773 100644 +index 641f022c4c716e0441a098f4540fd008059a4b51..944b28b55a38352dfb49aeecca3f196502cb04e8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1300,10 +1300,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1305,10 +1305,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract TagContainer getTagManager(); public BlockPos getBlockRandomPos(int x, int y, int z, int l) { @@ -290,7 +290,7 @@ index 1dc1f7a5319e067b5f56c2fdadf04547ae1bc9ea..9d5dcaabe43ee36259b24063b4c74dad public boolean noSave() { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 922026da8c234427e0322443004d3c32993adfce..88b053d8181d2a5abdb2c5527529a81855e1de7c 100644 +index f6b591f045ae992180806fd6aba309c0d04e722b..338e93a1855cf0e535e8a9897cffaff1d2e87279 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -568,6 +568,7 @@ public class LevelChunk implements ChunkAccess { @@ -302,7 +302,7 @@ index 922026da8c234427e0322443004d3c32993adfce..88b053d8181d2a5abdb2c5527529a818 public int getHeight(Heightmap.Types type, int x, int z) { return ((Heightmap) this.heightmaps.get(type)).getFirstAvailable(x & 15, z & 15) - 1; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index 5fd66020a937b641e2a060cf38df731a43f3bf55..b5497272bc03a290298b5a829bdf653ac986866b 100644 +index b10beabccf5a29098a796e5615eb4632fae95f99..79fda9a003ca4088404d3f0490c0c6a12afa1711 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -14,11 +14,12 @@ public class LevelChunkSection { @@ -318,9 +318,9 @@ index 5fd66020a937b641e2a060cf38df731a43f3bf55..b5497272bc03a290298b5a829bdf653a final PalettedContainer states; // Paper - package-private + public final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper - public LevelChunkSection(int yOffset) { - this(yOffset, (short)0, (short)0, (short)0); -@@ -70,6 +71,9 @@ public class LevelChunkSection { + // Paper start - Anti-Xray - Add parameters + @Deprecated public LevelChunkSection(int yOffset) { this(yOffset, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere +@@ -79,6 +80,9 @@ public class LevelChunkSection { --this.nonEmptyBlockCount; if (blockState.isRandomlyTicking()) { --this.tickingBlockCount; @@ -330,7 +330,7 @@ index 5fd66020a937b641e2a060cf38df731a43f3bf55..b5497272bc03a290298b5a829bdf653a } } -@@ -81,6 +85,9 @@ public class LevelChunkSection { +@@ -90,6 +94,9 @@ public class LevelChunkSection { ++this.nonEmptyBlockCount; if (state.isRandomlyTicking()) { ++this.tickingBlockCount; @@ -340,7 +340,7 @@ index 5fd66020a937b641e2a060cf38df731a43f3bf55..b5497272bc03a290298b5a829bdf653a } } -@@ -116,22 +123,28 @@ public class LevelChunkSection { +@@ -125,22 +132,28 @@ public class LevelChunkSection { } public void recalcBlockCounts() { @@ -375,10 +375,10 @@ index 5fd66020a937b641e2a060cf38df731a43f3bf55..b5497272bc03a290298b5a829bdf653a } diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 5ea60bbb56450502f1ceb41959239ab579458ac2..5ac948b5b82f3144cdf402af440251cb8c7369d7 100644 +index efe4d45b431890e4821f977b8f9fafdab7de3be2..82a4b7969e36940cb694bd999b8c03f9c66a71dc 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -259,6 +259,14 @@ public class PalettedContainer implements PaletteResize { +@@ -312,6 +312,14 @@ public class PalettedContainer implements PaletteResize { }); } diff --git a/patches/server/0375-Entity-Jump-API.patch b/patches/server/0376-Entity-Jump-API.patch similarity index 100% rename from patches/server/0375-Entity-Jump-API.patch rename to patches/server/0376-Entity-Jump-API.patch diff --git a/patches/server/0376-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0377-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from patches/server/0376-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0377-Add-option-to-nerf-pigmen-from-nether-portals.patch index 683ab55aea..276ef35f7c 100644 --- a/patches/server/0376-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0377-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16f013ffe992a934e9d0b32e764a14a8fd204449..6c7e90f9939d42fdf8d40dd7ec0a6a86d5437451 100644 +index a69efd1a21a667c5eee539f6c761755479375527..8b460378d8c2dd1942404f332d4012acb5687773 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -446,6 +446,11 @@ public class PaperWorldConfig { +@@ -443,6 +443,11 @@ public class PaperWorldConfig { log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/patches/server/0377-Make-the-GUI-graph-fancier.patch b/patches/server/0378-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/server/0377-Make-the-GUI-graph-fancier.patch rename to patches/server/0378-Make-the-GUI-graph-fancier.patch diff --git a/patches/server/0378-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0379-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from patches/server/0378-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0379-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/patches/server/0379-Prevent-teleporting-dead-entities.patch b/patches/server/0380-Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/server/0379-Prevent-teleporting-dead-entities.patch rename to patches/server/0380-Prevent-teleporting-dead-entities.patch diff --git a/patches/server/0380-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0381-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from patches/server/0380-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0381-Validate-tripwire-hook-placement-before-update.patch diff --git a/patches/server/0381-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0382-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 92% rename from patches/server/0381-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0382-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 3f7ba7afc5..89293c2bda 100644 --- a/patches/server/0381-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0382-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6c7e90f9939d42fdf8d40dd7ec0a6a86d5437451..3ac4fe247dd12e039396da5276b83709957823c7 100644 +index 8b460378d8c2dd1942404f332d4012acb5687773..a2b1e2c3c4bd958b6ec7b7de5561747d3a2075d2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -385,6 +385,11 @@ public class PaperWorldConfig { +@@ -382,6 +382,11 @@ public class PaperWorldConfig { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } diff --git a/patches/server/0382-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0383-Configurable-chance-of-villager-zombie-infection.patch similarity index 94% rename from patches/server/0382-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0383-Configurable-chance-of-villager-zombie-infection.patch index 2e4e196e34..bf91ca7a1e 100644 --- a/patches/server/0382-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0383-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3ac4fe247dd12e039396da5276b83709957823c7..0863bdab8322b80a3df52c238b55c14401bafe6d 100644 +index a2b1e2c3c4bd958b6ec7b7de5561747d3a2075d2..c3f2cdedf7b9c2ff9e33b823cb20890cba0ded8a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -456,6 +456,11 @@ public class PaperWorldConfig { +@@ -453,6 +453,11 @@ public class PaperWorldConfig { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } diff --git a/patches/server/0383-Optimise-Chunk-getFluid.patch b/patches/server/0384-Optimise-Chunk-getFluid.patch similarity index 92% rename from patches/server/0383-Optimise-Chunk-getFluid.patch rename to patches/server/0384-Optimise-Chunk-getFluid.patch index 13d8263759..07dd478b16 100644 --- a/patches/server/0383-Optimise-Chunk-getFluid.patch +++ b/patches/server/0384-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 88b053d8181d2a5abdb2c5527529a81855e1de7c..59a77541bbda880ae8f84e3535a2b6112caa78fb 100644 +index 338e93a1855cf0e535e8a9897cffaff1d2e87279..a4398502dd0cbbceb00cffc68702d34bf8ed7e8f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -461,18 +461,20 @@ public class LevelChunk implements ChunkAccess { @@ -49,10 +49,10 @@ index 88b053d8181d2a5abdb2c5527529a81855e1de7c..59a77541bbda880ae8f84e3535a2b611 // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index b5497272bc03a290298b5a829bdf653ac986866b..fa350db3f4ada07a385d9f57b46aa799effb6039 100644 +index 79fda9a003ca4088404d3f0490c0c6a12afa1711..9ca27907c6e1d4d5cc79e954136c63a59d3be2b8 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -42,7 +42,7 @@ public class LevelChunkSection { +@@ -51,7 +51,7 @@ public class LevelChunkSection { } public FluidState getFluidState(int x, int y, int z) { diff --git a/patches/server/0384-Optimise-TickListServer-by-rewriting-it.patch b/patches/server/0385-Optimise-TickListServer-by-rewriting-it.patch similarity index 99% rename from patches/server/0384-Optimise-TickListServer-by-rewriting-it.patch rename to patches/server/0385-Optimise-TickListServer-by-rewriting-it.patch index 40dbc4fec4..16152bd344 100644 --- a/patches/server/0384-Optimise-TickListServer-by-rewriting-it.patch +++ b/patches/server/0385-Optimise-TickListServer-by-rewriting-it.patch @@ -941,7 +941,7 @@ index 56aa640eb0096e5c5f1a34d6f11a4dd9ac8770df..a81c773cc281ba390d3ce44c52c43710 public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, boolean flag, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier supplier) { this.level = world; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 50efe1bd6a62b71007bf3274f323704be1477ce7..a43839ddd468d7b61d5609f22fb1e9fcd873590a 100644 +index 86ee1b535a6e586fd4e9e3c37f439d81b4508939..d037b14b34658e2f13d7e77f06576c406abc8a60 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -289,6 +289,15 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0385-Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/0386-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 97% rename from patches/server/0385-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to patches/server/0386-Pillager-patrol-spawn-settings-and-per-player-option.patch index b2bc5ab21f..2a6264e464 100644 --- a/patches/server/0385-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/0386-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0863bdab8322b80a3df52c238b55c14401bafe6d..4a2b52b5f5c0453c204765ec77e35524ee7e77c1 100644 +index c3f2cdedf7b9c2ff9e33b823cb20890cba0ded8a..8f1dcdb3b1beddb5698f596c048869d99e1f4437 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -433,10 +433,21 @@ public class PaperWorldConfig { +@@ -430,10 +430,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; diff --git a/patches/server/0386-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/0387-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from patches/server/0386-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to patches/server/0387-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/patches/server/0387-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/patches/server/0388-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from patches/server/0387-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to patches/server/0388-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/patches/server/0388-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0389-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 91% rename from patches/server/0388-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to patches/server/0389-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 09f26df53f..1a65d627cd 100644 --- a/patches/server/0388-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0389-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index e1498a5a8e664b922c77a8524ed2ea38c91834ce..71d5c298e14869d9d44226aeb6ffe3f051827d1a 100644 +index d3f835a0c76ce559fb5f3c39714a3312c7e865d1..002561c87ddd03e8bc31864ddd9dee7bc2ff0931 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1467,6 +1467,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1466,6 +1466,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider protected void addEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot @@ -26,7 +26,7 @@ index e1498a5a8e664b922c77a8524ed2ea38c91834ce..71d5c298e14869d9d44226aeb6ffe3f0 EntityType entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 03939f43ade3859a53ccf90e7fc221555ce6e97f..7340a25e49af30ecbb4b212365b9941e24e221d2 100644 +index d037b14b34658e2f13d7e77f06576c406abc8a60..9cdfd1c8bce3adb5d3ad6d970c6f46ca75f3a952 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2120,7 +2120,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0389-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0390-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from patches/server/0389-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0390-Optimize-Collision-to-not-load-chunks.patch diff --git a/patches/server/0390-Don-t-tick-dead-players.patch b/patches/server/0391-Don-t-tick-dead-players.patch similarity index 100% rename from patches/server/0390-Don-t-tick-dead-players.patch rename to patches/server/0391-Don-t-tick-dead-players.patch diff --git a/patches/server/0391-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0392-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from patches/server/0391-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0392-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/patches/server/0392-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/patches/server/0393-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 96% rename from patches/server/0392-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to patches/server/0393-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 66741a4086..2eaf2e2ef7 100644 --- a/patches/server/0392-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/patches/server/0393-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -70,10 +70,10 @@ index 9c88426ab1275ee5fb6e28be8b213533dc4ab859..87c9a5c1b43f6010898d72136b5eb997 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 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d8fc25f07 100644 +index 002561c87ddd03e8bc31864ddd9dee7bc2ff0931..a80c4517cd0d2c5e7b71b4f86b6a8d441a9eb64e 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -108,9 +108,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -107,9 +107,36 @@ 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(); @@ -112,7 +112,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d private final Long2ObjectLinkedOpenHashMap pendingUnloads; public final LongSet entitiesInLevel; // Paper - private -> public public final ServerLevel level; -@@ -233,7 +260,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -232,7 +259,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider 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(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync); @@ -121,7 +121,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d this.pendingUnloads = new Long2ObjectLinkedOpenHashMap(); this.entitiesInLevel = new LongOpenHashSet(); this.toDrop = new LongOpenHashSet(); -@@ -372,9 +399,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -371,9 +398,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return (ChunkHolder) this.updatingChunkMap.get(pos); } @@ -175,7 +175,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d } protected IntSupplier getChunkQueueLevel(long pos) { -@@ -531,8 +601,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -530,8 +600,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected void saveAllChunks(boolean flush) { @@ -186,7 +186,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -563,7 +634,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -562,7 +633,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // this.i(); // Paper - nuke IOWorker ChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.storageFolder.getName()); } else { @@ -195,7 +195,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d ChunkAccess ichunkaccess = (ChunkAccess) playerchunk.getChunkToSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ImposterProtoChunk || ichunkaccess instanceof LevelChunk) { -@@ -723,7 +794,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -722,7 +793,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!this.modified) { return false; } else { @@ -217,7 +217,7 @@ index 71d5c298e14869d9d44226aeb6ffe3f051827d1a..a75de538835522f92e889452fddd5a3d this.modified = false; return true; } -@@ -1132,12 +1216,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1131,12 +1215,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected Iterable getChunks() { diff --git a/patches/server/0393-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/patches/server/0394-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 99% rename from patches/server/0393-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to patches/server/0394-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index 7f241bc382..f70626a470 100644 --- a/patches/server/0393-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/patches/server/0394-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -226,7 +226,7 @@ index 34183527a23650706a9249ffac0182cb77b18086..90decfade57b2f17cdcc9188962c2d21 // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task public boolean pollTask() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index da85bfe5de9dcd6d51605ce9b023265b5a5f2936..f10fad84e4f36f9158383b327170593f273cecd9 100644 +index 9cdfd1c8bce3adb5d3ad6d970c6f46ca75f3a952..70106dda486d685dffafc0d4b3ae95b4861c6342 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -581,6 +581,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0394-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0395-Don-t-move-existing-players-to-world-spawn.patch similarity index 100% rename from patches/server/0394-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0395-Don-t-move-existing-players-to-world-spawn.patch diff --git a/patches/server/0395-Add-tick-times-API-and-mspt-command.patch b/patches/server/0396-Add-tick-times-API-and-mspt-command.patch similarity index 100% rename from patches/server/0395-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0396-Add-tick-times-API-and-mspt-command.patch diff --git a/patches/server/0396-Expose-MinecraftServer-isRunning.patch b/patches/server/0397-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from patches/server/0396-Expose-MinecraftServer-isRunning.patch rename to patches/server/0397-Expose-MinecraftServer-isRunning.patch diff --git a/patches/server/0397-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0398-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from patches/server/0397-Add-Raw-Byte-ItemStack-Serialization.patch rename to patches/server/0398-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/patches/server/0398-Remove-streams-from-Mob-AI-System.patch b/patches/server/0399-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from patches/server/0398-Remove-streams-from-Mob-AI-System.patch rename to patches/server/0399-Remove-streams-from-Mob-AI-System.patch diff --git a/patches/server/0399-Async-command-map-building.patch b/patches/server/0400-Async-command-map-building.patch similarity index 100% rename from patches/server/0399-Async-command-map-building.patch rename to patches/server/0400-Async-command-map-building.patch diff --git a/patches/server/0400-Improved-Watchdog-Support.patch b/patches/server/0401-Improved-Watchdog-Support.patch similarity index 98% rename from patches/server/0400-Improved-Watchdog-Support.patch rename to patches/server/0401-Improved-Watchdog-Support.patch index 17dd04331c..b979bd4e07 100644 --- a/patches/server/0400-Improved-Watchdog-Support.patch +++ b/patches/server/0401-Improved-Watchdog-Support.patch @@ -262,10 +262,10 @@ index 0511f1921193b78cbf4d8426136bf1f79746f955..e5f7f043cbdb28d85b8aa0eea7cbaeb5 @Override diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index a75de538835522f92e889452fddd5a3d8fc25f07..ccf50500b53f7336db1d3d287ec6f2a0da3d4183 100644 +index a80c4517cd0d2c5e7b71b4f86b6a8d441a9eb64e..3994cefe74481efd5d779f22c752aadc22b4749b 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -607,6 +607,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -606,6 +606,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider MutableBoolean mutableboolean = new MutableBoolean(); do { @@ -299,10 +299,10 @@ index 0ef3c4982df88a7991a56d983ac733daa8adc507..cdd797c6fc7507a0e6376f7d9c521be8 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 9d5dcaabe43ee36259b24063b4c74daddc7df773..06f2f76636804cd5f997bbe1558a104bc24aa84a 100644 +index 944b28b55a38352dfb49aeecca3f196502cb04e8..54fcdcef2a6b68e4b4f4c6a090e84919fe76b073 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -837,6 +837,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -842,6 +842,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); } catch (Throwable throwable) { @@ -311,7 +311,7 @@ index 9d5dcaabe43ee36259b24063b4c74daddc7df773..06f2f76636804cd5f997bbe1558a104b String msg = "Entity threw exception at " + entity.level.getWorld().getName() + ":" + entity.getX() + "," + entity.getY() + "," + entity.getZ(); System.err.println(msg); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 59a77541bbda880ae8f84e3535a2b6112caa78fb..a63dc77db41dab79f03ef7384da55c1cdeca5d98 100644 +index a4398502dd0cbbceb00cffc68702d34bf8ed7e8f..bde00ca058f32eb55e940614f0fbc361fe3a501d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -1320,6 +1320,7 @@ public class LevelChunk implements ChunkAccess { diff --git a/patches/server/0401-Optimize-Pathfinding.patch b/patches/server/0402-Optimize-Pathfinding.patch similarity index 100% rename from patches/server/0401-Optimize-Pathfinding.patch rename to patches/server/0402-Optimize-Pathfinding.patch diff --git a/patches/server/0402-Reduce-Either-Optional-allocation.patch b/patches/server/0403-Reduce-Either-Optional-allocation.patch similarity index 100% rename from patches/server/0402-Reduce-Either-Optional-allocation.patch rename to patches/server/0403-Reduce-Either-Optional-allocation.patch diff --git a/patches/server/0403-Remove-streams-from-PairedQueue.patch b/patches/server/0404-Remove-streams-from-PairedQueue.patch similarity index 100% rename from patches/server/0403-Remove-streams-from-PairedQueue.patch rename to patches/server/0404-Remove-streams-from-PairedQueue.patch diff --git a/patches/server/0404-Reduce-memory-footprint-of-NBTTagCompound.patch b/patches/server/0405-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from patches/server/0404-Reduce-memory-footprint-of-NBTTagCompound.patch rename to patches/server/0405-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/patches/server/0405-Prevent-opening-inventories-when-frozen.patch b/patches/server/0406-Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from patches/server/0405-Prevent-opening-inventories-when-frozen.patch rename to patches/server/0406-Prevent-opening-inventories-when-frozen.patch diff --git a/patches/server/0406-Optimise-ArraySetSorted-removeIf.patch b/patches/server/0407-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from patches/server/0406-Optimise-ArraySetSorted-removeIf.patch rename to patches/server/0407-Optimise-ArraySetSorted-removeIf.patch diff --git a/patches/server/0407-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0408-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 100% rename from patches/server/0407-Don-t-run-entity-collision-code-if-not-needed.patch rename to patches/server/0408-Don-t-run-entity-collision-code-if-not-needed.patch diff --git a/patches/server/0408-Restrict-vanilla-teleport-command-to-valid-locations.patch b/patches/server/0409-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from patches/server/0408-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to patches/server/0409-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/patches/server/0409-Implement-Player-Client-Options-API.patch b/patches/server/0410-Implement-Player-Client-Options-API.patch similarity index 100% rename from patches/server/0409-Implement-Player-Client-Options-API.patch rename to patches/server/0410-Implement-Player-Client-Options-API.patch diff --git a/patches/server/0410-Fix-Chunk-Post-Processing-deadlock-risk.patch b/patches/server/0411-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 93% rename from patches/server/0410-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to patches/server/0411-Fix-Chunk-Post-Processing-deadlock-risk.patch index 0818f079c0..e7af5f978e 100644 --- a/patches/server/0410-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/patches/server/0411-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash for heightmaps. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ccf50500b53f7336db1d3d287ec6f2a0da3d4183..f651b7d2bbc2fc883bc73ef892de62624d1285e7 100644 +index 3994cefe74481efd5d779f22c752aadc22b4749b..dede8863193423858f6d60cc942919e52f28b607 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -191,6 +191,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -190,6 +190,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; // CraftBukkit end @@ -36,7 +36,7 @@ index ccf50500b53f7336db1d3d287ec6f2a0da3d4183..f651b7d2bbc2fc883bc73ef892de6262 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); // Paper start - no-tick view distance -@@ -1050,7 +1051,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1049,7 +1050,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return Either.left(chunk); }); }, (runnable) -> { diff --git a/patches/server/0411-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0412-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/server/0411-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0412-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/server/0412-Broadcast-join-message-to-console.patch b/patches/server/0413-Broadcast-join-message-to-console.patch similarity index 100% rename from patches/server/0412-Broadcast-join-message-to-console.patch rename to patches/server/0413-Broadcast-join-message-to-console.patch diff --git a/patches/server/0413-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0414-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 96% rename from patches/server/0413-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/0414-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index fe9800e326..d9ef680f7d 100644 --- a/patches/server/0413-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0414-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f651b7d2bbc2fc883bc73ef892de62624d1285e7..6c763b5407425b764839b921f4dc9e18d76442cd 100644 +index dede8863193423858f6d60cc942919e52f28b607..4fe5b75661de64474698495776ebb8232fd252aa 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1551,7 +1551,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1550,7 +1550,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - per player view distance } @@ -40,7 +40,7 @@ index f651b7d2bbc2fc883bc73ef892de62624d1285e7..6c763b5407425b764839b921f4dc9e18 org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot // Paper start - ignore and warn about illegal addEntity calls instead of crashing server if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) { -@@ -1560,6 +1560,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1559,6 +1559,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider .printStackTrace(); return; } diff --git a/patches/server/0414-Load-Chunks-for-Login-Asynchronously.patch b/patches/server/0415-Load-Chunks-for-Login-Asynchronously.patch similarity index 100% rename from patches/server/0414-Load-Chunks-for-Login-Asynchronously.patch rename to patches/server/0415-Load-Chunks-for-Login-Asynchronously.patch diff --git a/patches/server/0415-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0416-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 100% rename from patches/server/0415-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/0416-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch diff --git a/patches/server/0416-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0417-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from patches/server/0416-Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/0417-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/patches/server/0417-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/patches/server/0418-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 93% rename from patches/server/0417-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to patches/server/0418-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index 9ced634f50..e74eba1280 100644 --- a/patches/server/0417-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/patches/server/0418-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 6c763b5407425b764839b921f4dc9e18d76442cd..f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c 100644 +index 4fe5b75661de64474698495776ebb8232fd252aa..3e45ddc39d1283661cbfc1057aa0548d940a444a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -174,17 +174,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -173,17 +173,29 @@ 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/0418-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0419-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from patches/server/0418-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/0419-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/patches/server/0419-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0420-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from patches/server/0419-Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/0420-Add-phantom-creative-and-insomniac-controls.patch index ae7582ec64..91912af6f4 100644 --- a/patches/server/0419-Add-phantom-creative-and-insomniac-controls.patch +++ b/patches/server/0420-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4a2b52b5f5c0453c204765ec77e35524ee7e77c1..16cf7d116e3ffd44ffc4f060b4014b52389cff77 100644 +index 8f1dcdb3b1beddb5698f596c048869d99e1f4437..98416de3dfc9d16d17124902e19cbd9b916077d2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -477,6 +477,13 @@ public class PaperWorldConfig { +@@ -474,6 +474,13 @@ public class PaperWorldConfig { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/patches/server/0420-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0421-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from patches/server/0420-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/0421-Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/patches/server/0421-Implement-Brigadier-Mojang-API.patch b/patches/server/0422-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from patches/server/0421-Implement-Brigadier-Mojang-API.patch rename to patches/server/0422-Implement-Brigadier-Mojang-API.patch diff --git a/patches/server/0422-Villager-Restocks-API.patch b/patches/server/0423-Villager-Restocks-API.patch similarity index 100% rename from patches/server/0422-Villager-Restocks-API.patch rename to patches/server/0423-Villager-Restocks-API.patch diff --git a/patches/server/0423-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0424-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from patches/server/0423-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/0424-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/patches/server/0424-Expose-game-version.patch b/patches/server/0425-Expose-game-version.patch similarity index 89% rename from patches/server/0424-Expose-game-version.patch rename to patches/server/0425-Expose-game-version.patch index 9c79c20af1..3fc2583240 100644 --- a/patches/server/0424-Expose-game-version.patch +++ b/patches/server/0425-Expose-game-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4c0b94a56fab161fca92b594f55e1c846524d5e8..479b4eb8efeeca432bcb21925db18d5c0750f001 100644 +index e31a05dfe7e934692ac89c7cedcab736bcd9ca4f..130ab05393a7136020e06ec199256a031ba66091 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -517,6 +517,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0425-Optimize-Voxel-Shape-Merging.patch b/patches/server/0426-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/server/0425-Optimize-Voxel-Shape-Merging.patch rename to patches/server/0426-Optimize-Voxel-Shape-Merging.patch diff --git a/patches/server/0426-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0427-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/server/0426-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/0427-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/server/0427-Implement-Mob-Goal-API.patch b/patches/server/0428-Implement-Mob-Goal-API.patch similarity index 100% rename from patches/server/0427-Implement-Mob-Goal-API.patch rename to patches/server/0428-Implement-Mob-Goal-API.patch diff --git a/patches/server/0428-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch similarity index 96% rename from patches/server/0428-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch index 1fac56559b..3df5bd58bb 100644 --- a/patches/server/0428-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch @@ -18,7 +18,7 @@ index 11fd6d24ed0612e4df1a0493907178fb9c455d1c..d7023cb0974f6c28a0fb8a0a6e5a6600 return initialDistance; } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a808c9736 100644 +index 3e45ddc39d1283661cbfc1057aa0548d940a444a..f4a31d340ea9629dea70eec4e339cfd869a73ed9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -58,6 +58,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; @@ -29,7 +29,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.util.CsvOutput; -@@ -222,11 +223,33 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -221,11 +222,33 @@ 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 @@ -63,7 +63,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -243,7 +266,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -242,7 +265,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } void removePlayerFromDistanceMaps(ServerPlayer player) { @@ -76,7 +76,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a // Paper start - no-tick view distance this.playerViewDistanceBroadcastMap.remove(player); this.playerViewDistanceTickMap.remove(player); -@@ -255,6 +282,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -254,6 +281,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 @@ -91,7 +91,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -306,6 +341,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -305,6 +340,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); this.playerMobDistanceMap = this.level.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper @@ -137,7 +137,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -1424,17 +1498,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1423,17 +1497,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void move(ServerPlayer player) { @@ -156,7 +156,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a int i = SectionPos.blockToSectionCoord(player.getBlockX()); int j = SectionPos.blockToSectionCoord(player.getBlockZ()); -@@ -1589,7 +1653,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1588,7 +1652,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); @@ -165,7 +165,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -1633,7 +1697,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1632,7 +1696,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = null; // Paper - We're no longer tracked } @@ -203,7 +203,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a List list = Lists.newArrayList(); List list1 = this.level.players(); -@@ -1742,23 +1836,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1741,23 +1835,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -247,7 +247,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a Iterator iterator; Entity entity1; -@@ -1837,6 +1939,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1836,6 +1938,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially this.lastSectionPos = SectionPos.of(entity); } @@ -290,7 +290,7 @@ index f9fcf99ec7151b4f00ef2c40b0cbc2fd3a8e002c..f7032e1d64afa6707756bb5a2af9d43a public boolean equals(Object object) { return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false; } -@@ -1922,7 +2060,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -1921,7 +2059,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially int j = entity.getType().clientTrackingRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/patches/server/0429-Optimize-isOutsideRange-to-use-distance-maps.patch b/patches/server/0430-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 97% rename from patches/server/0429-Optimize-isOutsideRange-to-use-distance-maps.patch rename to patches/server/0430-Optimize-isOutsideRange-to-use-distance-maps.patch index 3db66834ee..71825c2d60 100644 --- a/patches/server/0429-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/patches/server/0430-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -37,10 +37,10 @@ index 58369d70bcd8b2c25609b6f101d9cbe2031df352..969b0c9cf6d7eb2055d3b804f25a3cbc // 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 f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835bcc28bbe6 100644 +index f4a31d340ea9629dea70eec4e339cfd869a73ed9..450ab55859304ecda6f752b0e4a04279f4104af1 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -237,6 +237,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -236,6 +236,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); } // Paper end - use distance map to optimise tracker @@ -58,7 +58,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b void addPlayerToDistanceMaps(ServerPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.getX()); -@@ -250,6 +261,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -249,6 +260,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 @@ -71,7 +71,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b // Paper start - no-tick view distance int effectiveTickViewDistance = this.getEffectiveViewDistance(); int effectiveNoTickViewDistance = Math.max(this.getEffectiveNoTickViewDistance(), effectiveTickViewDistance); -@@ -271,6 +288,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -270,6 +287,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -82,7 +82,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b // Paper start - no-tick view distance this.playerViewDistanceBroadcastMap.remove(player); this.playerViewDistanceTickMap.remove(player); -@@ -290,6 +311,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -289,6 +310,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 @@ -92,7 +92,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b // 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 +@@ -335,7 +359,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)); @@ -101,7 +101,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b this.overworldDataStorage = persistentStateManagerFactory; this.poiManager = new PoiManager(new File(this.storageFolder, "poi"), dataFixer, dsync, world); this.setViewDistance(viewDistance); -@@ -380,6 +404,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -379,6 +403,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 @@ -140,7 +140,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b // Paper start - no-tick view distance this.setNoTickViewDistance(this.level.paperConfig.noTickViewDistance); this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, -@@ -649,6 +705,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -648,6 +704,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { if (holder != null) { holder.setTicketLevel(level); @@ -148,7 +148,7 @@ index f7032e1d64afa6707756bb5a2af9d43a808c9736..18335e2c5c9e50a8ed31a3d2b585835b } if (holder != null) { -@@ -1434,29 +1491,50 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1433,29 +1490,50 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.isOutsideOfRange(chunkPos, false); } diff --git a/patches/server/0430-Add-villager-reputation-API.patch b/patches/server/0431-Add-villager-reputation-API.patch similarity index 100% rename from patches/server/0430-Add-villager-reputation-API.patch rename to patches/server/0431-Add-villager-reputation-API.patch diff --git a/patches/server/0431-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0432-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 95% rename from patches/server/0431-Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/0432-Option-for-maximum-exp-value-when-merging-orbs.patch index c08ccc6865..6b5ce39eda 100644 --- a/patches/server/0431-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0432-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16cf7d116e3ffd44ffc4f060b4014b52389cff77..3bc6329d3ea48966cb99e792f9b35e2d2d71a34b 100644 +index 98416de3dfc9d16d17124902e19cbd9b916077d2..b10de4e99913030bae7451b3242067312e94df7e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -359,6 +359,12 @@ public class PaperWorldConfig { +@@ -356,6 +356,12 @@ public class PaperWorldConfig { log("Creeper lingering effect: " + disableCreeperLingeringEffect); } diff --git a/patches/server/0432-ExperienceOrbMergeEvent.patch b/patches/server/0433-ExperienceOrbMergeEvent.patch similarity index 100% rename from patches/server/0432-ExperienceOrbMergeEvent.patch rename to patches/server/0433-ExperienceOrbMergeEvent.patch diff --git a/patches/server/0433-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0434-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/server/0433-Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/0434-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/server/0434-Optimize-brigadier-child-sorting-performance.patch b/patches/server/0435-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/server/0434-Optimize-brigadier-child-sorting-performance.patch rename to patches/server/0435-Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/server/0435-Potential-bed-API.patch b/patches/server/0436-Potential-bed-API.patch similarity index 100% rename from patches/server/0435-Potential-bed-API.patch rename to patches/server/0436-Potential-bed-API.patch diff --git a/patches/server/0436-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0437-Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/server/0436-Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/0437-Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/server/0437-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/0438-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from patches/server/0437-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to patches/server/0438-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/patches/server/0438-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 98% rename from patches/server/0438-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 6fa1cd4c6d..18f52c03fd 100644 --- a/patches/server/0438-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -56,10 +56,10 @@ index cdf214fca3b0055efa56702470d9d2f890a8aead..a12af10e28f2d023ba6f916b5e7a5353 this.level.getProfiler().push("explosion_blocks"); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 06f2f76636804cd5f997bbe1558a104bc24aa84a..b92d930448757968cd6a178f4bcafae72c93044c 100644 +index 54fcdcef2a6b68e4b4f4c6a090e84919fe76b073..f004f5012ce157f9b0fb9c5890b5f3de957418f8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -420,6 +420,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -424,6 +424,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/patches/server/0439-Reduce-MutableInt-allocations-from-light-engine.patch b/patches/server/0440-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from patches/server/0439-Reduce-MutableInt-allocations-from-light-engine.patch rename to patches/server/0440-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/server/0440-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0441-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from patches/server/0440-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0441-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index b91add5e6e..b595c247f0 100644 --- a/patches/server/0440-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/0441-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 18335e2c5c9e50a8ed31a3d2b585835bcc28bbe6..d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7 100644 +index 450ab55859304ecda6f752b0e4a04279f4104af1..f722d9e77fa074847a2bdc6a117816d176eb6dca 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -2102,9 +2102,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2101,9 +2101,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially public void updatePlayer(ServerPlayer player) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (player != this.entity) { diff --git a/patches/server/0441-Ensure-safe-gateway-teleport.patch b/patches/server/0442-Ensure-safe-gateway-teleport.patch similarity index 100% rename from patches/server/0441-Ensure-safe-gateway-teleport.patch rename to patches/server/0442-Ensure-safe-gateway-teleport.patch diff --git a/patches/server/0442-Add-option-for-console-having-all-permissions.patch b/patches/server/0443-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/server/0442-Add-option-for-console-having-all-permissions.patch rename to patches/server/0443-Add-option-for-console-having-all-permissions.patch diff --git a/patches/server/0443-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/patches/server/0444-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 98% rename from patches/server/0443-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to patches/server/0444-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch index 9a51437a68..7b2d1c7f8f 100644 --- a/patches/server/0443-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch +++ b/patches/server/0444-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch @@ -16,7 +16,7 @@ We further improve it by making a copy of the nbt tag with only the memory it needs, so that we dont have to hold a copy to the entire compound. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 7c04aef3eac54981ca1e34cb87d97104c3c9685b..b4246524dd11ad1e1dc94c56eee966c5a54d9ecc 100644 +index 097d38f12ef324dbb529a833383e2da949377f9c..1f95ac18990822a64f0bb2af947693c4b88cdf73 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -27,6 +27,7 @@ import net.minecraft.nbt.CompoundTag; diff --git a/patches/server/0444-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/patches/server/0445-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 100% rename from patches/server/0444-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to patches/server/0445-Optimize-sending-packets-to-nearby-locations-sounds-.patch diff --git a/patches/server/0445-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0446-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/server/0445-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0446-Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/server/0446-Maps-shouldn-t-load-chunks.patch b/patches/server/0447-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from patches/server/0446-Maps-shouldn-t-load-chunks.patch rename to patches/server/0447-Maps-shouldn-t-load-chunks.patch diff --git a/patches/server/0447-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0448-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/server/0447-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0448-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/server/0448-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/patches/server/0449-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 96% rename from patches/server/0448-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to patches/server/0449-Delay-Chunk-Unloads-based-on-Player-Movement.patch index a7a809be4c..38b1b71ec6 100644 --- a/patches/server/0448-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/patches/server/0449-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3bc6329d3ea48966cb99e792f9b35e2d2d71a34b..1f4d0d3493e748f52eb3b679c0a8a1306c0cc8b4 100644 +index b10de4e99913030bae7451b3242067312e94df7e..d2b1ef727004906d184995a840657e22ea127f71 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -495,6 +495,15 @@ public class PaperWorldConfig { +@@ -492,6 +492,15 @@ public class PaperWorldConfig { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } @@ -34,7 +34,7 @@ index 3bc6329d3ea48966cb99e792f9b35e2d2d71a34b..1f4d0d3493e748f52eb3b679c0a8a130 + } + public boolean altItemDespawnRateEnabled; - public Map altItemDespawnRateMap; + public java.util.Map altItemDespawnRateMap; private void altItemDespawnRate() { diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java index 577b391dcba1db712c1e2c83296e1c87b3e34ab2..d94241bcca4f2fd5e464a860bd356af504dc68b7 100644 diff --git a/patches/server/0449-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0450-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/server/0449-Optimize-Bit-Operations-by-inlining.patch rename to patches/server/0450-Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/server/0450-incremental-chunk-saving.patch b/patches/server/0451-incremental-chunk-saving.patch similarity index 94% rename from patches/server/0450-incremental-chunk-saving.patch rename to patches/server/0451-incremental-chunk-saving.patch index ece4224cd0..ad4e15eae2 100644 --- a/patches/server/0450-incremental-chunk-saving.patch +++ b/patches/server/0451-incremental-chunk-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1f4d0d3493e748f52eb3b679c0a8a1306c0cc8b4..91917b11163c0740d5e5effc5e93d494e2b2d73e 100644 +index d2b1ef727004906d184995a840657e22ea127f71..040956f5d714ac014f9a153981d444db299fd826 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -47,6 +47,21 @@ public class PaperWorldConfig { +@@ -44,6 +44,21 @@ public class PaperWorldConfig { log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } @@ -139,10 +139,10 @@ index 969b0c9cf6d7eb2055d3b804f25a3cbc161ceaea..1f67c9c5f7161ea687983e7ae0ec7d25 for (int i = 0; i < this.futures.length(); ++i) { CompletableFuture> completablefuture = (CompletableFuture) this.futures.get(i); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7..5a5e9188f55405c8a2646891c348d544d33eb940 100644 +index f722d9e77fa074847a2bdc6a117816d176eb6dca..8982823efd8fd21d403c6c6fb158d57a9da67707 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -93,6 +93,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana +@@ -92,6 +92,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana import net.minecraft.world.level.storage.DimensionDataStorage; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.phys.Vec3; @@ -150,7 +150,7 @@ index d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7..5a5e9188f55405c8a2646891c348d544 import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -744,6 +745,64 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -743,6 +744,64 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } @@ -215,7 +215,7 @@ index d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7..5a5e9188f55405c8a2646891c348d544 protected void saveAllChunks(boolean flush) { Long2ObjectLinkedOpenHashMap visibleChunks = this.getVisibleChunks(); // Paper remove clone of visible Chunks unless saving off main thread (watchdog kill) if (flush) { -@@ -883,6 +942,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -882,6 +941,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider asyncSaveData, chunk); chunk.setUnsaved(false); @@ -223,7 +223,7 @@ index d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7..5a5e9188f55405c8a2646891c348d544 } // Paper end -@@ -905,6 +965,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -904,6 +964,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level.unload(chunk); } @@ -231,7 +231,7 @@ index d8f99f7f5ca0e1dbbb9b760af3a4b4f9c52ef6c7..5a5e9188f55405c8a2646891c348d544 // Paper start - async chunk saving try { -@@ -1231,6 +1292,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1230,6 +1291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!chunk.isUnsaved()) { return false; } else { @@ -260,7 +260,7 @@ index 3faa808f41f057a9956c697ec1323330f5920b86..7ab28e9bd3f785838b7fa4ac5811c0e7 public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f10fad84e4f36f9158383b327170593f273cecd9..bdabcdb60dbfb803ead13c42c8dd5e100b37dc00 100644 +index 70106dda486d685dffafc0d4b3ae95b4861c6342..74753639ed095eab305c2facd0f00264a6253cef 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1017,6 +1017,38 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -303,7 +303,7 @@ index f10fad84e4f36f9158383b327170593f273cecd9..bdabcdb60dbfb803ead13c42c8dd5e10 ServerChunkCache chunkproviderserver = this.getChunkSource(); diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -index c0075d226331f32e470dae5bf1ce8d79e8b263dc..8ba782511b0a6c7859cbcf910ad742cbb9f599e5 100644 +index 91f5106cfe7914389b52a1ed001117b13e4f9768..31ea618547e0e452f9a495796a4197e718abbfa6 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java @@ -29,6 +29,7 @@ public interface ChunkAccess extends BlockGetter, FeatureAccess { @@ -315,7 +315,7 @@ index c0075d226331f32e470dae5bf1ce8d79e8b263dc..8ba782511b0a6c7859cbcf910ad742cb default boolean generateFlatBedrock() { if (this instanceof ProtoChunk) { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index a63dc77db41dab79f03ef7384da55c1cdeca5d98..efb9c6fef915b43c9dd4468ead52aa36ea9e7ef3 100644 +index bde00ca058f32eb55e940614f0fbc361fe3a501d..fe46fdb828d630f9dc9b212128608203f6c6f4bb 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -108,6 +108,13 @@ public class LevelChunk implements ChunkAccess { diff --git a/patches/server/0451-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0452-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 98% rename from patches/server/0451-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/0452-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index ab4ec662b0..10203095da 100644 --- a/patches/server/0451-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0452-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 94670ec4de01341822f6affe0fa1c9774dd6131b..6bc5ba51c90723c7138b1b5d2381cb215f1e5271 100644 +index e3338717bffe5f5e4a00fe1ebe3ba7cf74555b36..f7d542b828904fb51a30dfb7a50e01e4e2df0f3e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -346,7 +346,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0452-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0453-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/server/0452-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0453-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/server/0453-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0454-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/server/0453-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0454-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/server/0454-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0455-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/server/0454-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0455-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/server/0455-Fix-sand-duping.patch b/patches/server/0456-Fix-sand-duping.patch similarity index 100% rename from patches/server/0455-Fix-sand-duping.patch rename to patches/server/0456-Fix-sand-duping.patch diff --git a/patches/server/0456-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0457-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from patches/server/0456-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0457-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/patches/server/0457-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0458-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from patches/server/0457-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0458-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/patches/server/0458-Expose-Arrow-getItemStack.patch b/patches/server/0459-Expose-Arrow-getItemStack.patch similarity index 100% rename from patches/server/0458-Expose-Arrow-getItemStack.patch rename to patches/server/0459-Expose-Arrow-getItemStack.patch diff --git a/patches/server/0459-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0460-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/server/0459-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0460-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/patches/server/0460-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0461-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/server/0460-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0461-Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/server/0461-Add-permission-for-command-blocks.patch b/patches/server/0462-Add-permission-for-command-blocks.patch similarity index 97% rename from patches/server/0461-Add-permission-for-command-blocks.patch rename to patches/server/0462-Add-permission-for-command-blocks.patch index da4472b2e1..e1dcbcf07f 100644 --- a/patches/server/0461-Add-permission-for-command-blocks.patch +++ b/patches/server/0462-Add-permission-for-command-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for command blocks diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index f4a056185990181e486f452960159a5287947382..6c55bd8b876d1d694e05ad6de6a9fd29a4d4d053 100644 +index a695e5a0c2e8846333ccb9aea499b5656af35163..c21c5134308a2a83fb50bfe37f05d19c8e96ca7c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -389,7 +389,7 @@ public class ServerPlayerGameMode { +@@ -391,7 +391,7 @@ public class ServerPlayerGameMode { BlockEntity tileentity = this.level.getBlockEntity(pos); Block block = iblockdata.getBlock(); diff --git a/patches/server/0462-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0463-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 100% rename from patches/server/0462-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0463-Ensure-Entity-AABB-s-are-never-invalid.patch diff --git a/patches/server/0463-Optimize-WorldBorder-collision-checks-and-air.patch b/patches/server/0464-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 100% rename from patches/server/0463-Optimize-WorldBorder-collision-checks-and-air.patch rename to patches/server/0464-Optimize-WorldBorder-collision-checks-and-air.patch diff --git a/patches/server/0464-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0465-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 100% rename from patches/server/0464-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0465-Fix-Per-World-Difficulty-Remembering-Difficulty.patch diff --git a/patches/server/0465-Paper-dumpitem-command.patch b/patches/server/0466-Paper-dumpitem-command.patch similarity index 100% rename from patches/server/0465-Paper-dumpitem-command.patch rename to patches/server/0466-Paper-dumpitem-command.patch diff --git a/patches/server/0466-Don-t-allow-null-UUID-s-for-chat.patch b/patches/server/0467-Don-t-allow-null-UUID-s-for-chat.patch similarity index 100% rename from patches/server/0466-Don-t-allow-null-UUID-s-for-chat.patch rename to patches/server/0467-Don-t-allow-null-UUID-s-for-chat.patch diff --git a/patches/server/0467-Improve-Legacy-Component-serialization-size.patch b/patches/server/0468-Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/server/0467-Improve-Legacy-Component-serialization-size.patch rename to patches/server/0468-Improve-Legacy-Component-serialization-size.patch diff --git a/patches/server/0468-Support-old-UUID-format-for-NBT.patch b/patches/server/0469-Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/server/0468-Support-old-UUID-format-for-NBT.patch rename to patches/server/0469-Support-old-UUID-format-for-NBT.patch diff --git a/patches/server/0469-Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/0470-Clean-up-duplicated-GameProfile-Properties.patch similarity index 100% rename from patches/server/0469-Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/0470-Clean-up-duplicated-GameProfile-Properties.patch diff --git a/patches/server/0470-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0471-Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/server/0470-Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/0471-Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/server/0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0472-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 98% rename from patches/server/0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to patches/server/0472-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index ed51f630f3..f96921a0f0 100644 --- a/patches/server/0471-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/0472-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -327,10 +327,10 @@ index 1f67c9c5f7161ea687983e7ae0ec7d259da9acd3..6a1c000d693031f0c537112963cfa52e } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de03a597b29 100644 +index 8982823efd8fd21d403c6c6fb158d57a9da67707..943c187efab8fdbcc38c313a498f876983a98412 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -145,6 +145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -144,6 +144,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final ServerLevel level; private final ThreadedLevelLightEngine lightEngine; private final BlockableEventLoop mainThreadExecutor; @@ -338,7 +338,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 public final ChunkGenerator generator; private final Supplier overworldDataStorage; public final Supplier getWorldPersistentDataSupplier() { return this.overworldDataStorage; } // Paper - OBFHELPER private final PoiManager poiManager; -@@ -183,6 +184,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -182,6 +183,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Override public void execute(Runnable runnable) { @@ -346,7 +346,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 if (this.queue == null) { this.queue = new java.util.ArrayDeque<>(); } -@@ -191,6 +193,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -190,6 +192,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Override public void run() { @@ -354,7 +354,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 if (this.queue == null) { return; } -@@ -347,6 +350,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -346,6 +349,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.level = world; this.generator = chunkGenerator; this.mainThreadExecutor = mainThreadExecutor; @@ -370,7 +370,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 ProcessorMailbox threadedmailbox = ProcessorMailbox.create(executor, "worldgen"); Objects.requireNonNull(mainThreadExecutor); -@@ -442,6 +454,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -441,6 +453,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -378,7 +378,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 if (newState.size() != 1) { return; } -@@ -460,7 +473,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -459,7 +472,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } ChunkPos chunkPos = new ChunkPos(rangeX, rangeZ); ChunkMap.this.level.getChunkSource().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -391,7 +391,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -477,8 +494,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -476,8 +493,116 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); // Paper end - no-tick view distance } @@ -508,7 +508,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 public void updatePlayerMobTypeMap(Entity entity) { if (!this.level.paperConfig.perPlayerMobSpawns) { return; -@@ -636,6 +761,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -635,6 +760,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider List>> list = Lists.newArrayList(); int j = centerChunk.x; int k = centerChunk.z; @@ -516,7 +516,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 for (int l = -margin; l <= margin; ++l) { for (int i1 = -margin; i1 <= margin; ++i1) { -@@ -654,6 +780,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -653,6 +779,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(j1); CompletableFuture> completablefuture = playerchunk.getOrScheduleFuture(chunkstatus, this); @@ -531,7 +531,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 list.add(completablefuture); } -@@ -1100,14 +1234,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1099,14 +1233,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; CompletableFuture chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z); @@ -559,7 +559,7 @@ index 5a5e9188f55405c8a2646891c348d544d33eb940..b86ff17cdfa613a03bd75eeaab194de0 return ret; // Paper end } -@@ -1238,7 +1380,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1237,7 +1379,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider long i = playerchunk.getPos().toLong(); Objects.requireNonNull(playerchunk); diff --git a/patches/server/0472-Remove-some-streams-from-structures.patch b/patches/server/0473-Remove-some-streams-from-structures.patch similarity index 100% rename from patches/server/0472-Remove-some-streams-from-structures.patch rename to patches/server/0473-Remove-some-streams-from-structures.patch diff --git a/patches/server/0473-Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/0474-Remove-streams-from-classes-related-villager-gossip.patch similarity index 100% rename from patches/server/0473-Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/0474-Remove-streams-from-classes-related-villager-gossip.patch diff --git a/patches/server/0474-Support-components-in-ItemMeta.patch b/patches/server/0475-Support-components-in-ItemMeta.patch similarity index 100% rename from patches/server/0474-Support-components-in-ItemMeta.patch rename to patches/server/0475-Support-components-in-ItemMeta.patch diff --git a/patches/server/0475-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/patches/server/0476-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch similarity index 100% rename from patches/server/0475-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch rename to patches/server/0476-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch diff --git a/patches/server/0476-Add-entity-liquid-API.patch b/patches/server/0477-Add-entity-liquid-API.patch similarity index 100% rename from patches/server/0476-Add-entity-liquid-API.patch rename to patches/server/0477-Add-entity-liquid-API.patch diff --git a/patches/server/0477-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0478-Update-itemstack-legacy-name-and-lore.patch similarity index 100% rename from patches/server/0477-Update-itemstack-legacy-name-and-lore.patch rename to patches/server/0478-Update-itemstack-legacy-name-and-lore.patch diff --git a/patches/server/0478-Spawn-player-in-correct-world-on-login.patch b/patches/server/0479-Spawn-player-in-correct-world-on-login.patch similarity index 100% rename from patches/server/0478-Spawn-player-in-correct-world-on-login.patch rename to patches/server/0479-Spawn-player-in-correct-world-on-login.patch diff --git a/patches/server/0479-Add-PrepareResultEvent.patch b/patches/server/0480-Add-PrepareResultEvent.patch similarity index 100% rename from patches/server/0479-Add-PrepareResultEvent.patch rename to patches/server/0480-Add-PrepareResultEvent.patch diff --git a/patches/server/0480-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0481-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 95% rename from patches/server/0480-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0481-Allow-delegation-to-vanilla-chunk-gen.patch index ef0cf459b5..eb2bc9a627 100644 --- a/patches/server/0480-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0481-Allow-delegation-to-vanilla-chunk-gen.patch @@ -42,7 +42,7 @@ index f7d542b828904fb51a30dfb7a50e01e4e2df0f3e..407a91f64e040745dea17544d6b7c6d1 public BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag... flags) { return new CraftBossBar(title, color, style, flags); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index 3d905c98704da64cefd009b2c796b24e729396a5..6e8018241664d2cc2a6a8d52d87946740ac8bb97 100644 +index fe7851476636dfed02339d4d9f93824b96086769..24a2e88d083f90375c46cf948c7c89dccc6e4aa0 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java @@ -20,7 +20,7 @@ import org.bukkit.material.MaterialData; @@ -52,9 +52,9 @@ index 3d905c98704da64cefd009b2c796b24e729396a5..6e8018241664d2cc2a6a8d52d8794674 - private final LevelChunkSection[] sections; + private LevelChunkSection[] sections; // Paper - remove final private Set tiles; + private World world; // Paper - Anti-Xray - Add world - public CraftChunkData(World world) { -@@ -171,6 +171,12 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { +@@ -173,6 +173,12 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { return this.sections; } diff --git a/patches/server/0481-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0482-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 100% rename from patches/server/0481-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0482-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch diff --git a/patches/server/0482-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0483-Optimize-NetworkManager-Exception-Handling.patch similarity index 100% rename from patches/server/0482-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0483-Optimize-NetworkManager-Exception-Handling.patch diff --git a/patches/server/0483-Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/server/0484-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/server/0483-Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/server/0484-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/server/0484-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0485-Fix-arrows-never-despawning-MC-125757.patch similarity index 100% rename from patches/server/0484-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0485-Fix-arrows-never-despawning-MC-125757.patch diff --git a/patches/server/0485-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0486-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/server/0485-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0486-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/server/0486-Move-range-check-for-block-placing-up.patch b/patches/server/0487-Move-range-check-for-block-placing-up.patch similarity index 100% rename from patches/server/0486-Move-range-check-for-block-placing-up.patch rename to patches/server/0487-Move-range-check-for-block-placing-up.patch diff --git a/patches/server/0487-Fix-SPIGOT-5989.patch b/patches/server/0488-Fix-SPIGOT-5989.patch similarity index 100% rename from patches/server/0487-Fix-SPIGOT-5989.patch rename to patches/server/0488-Fix-SPIGOT-5989.patch diff --git a/patches/server/0488-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0489-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from patches/server/0488-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0489-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/patches/server/0489-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0490-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from patches/server/0489-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0490-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/patches/server/0490-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0491-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from patches/server/0490-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/0491-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/patches/server/0491-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/0492-Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 100% rename from patches/server/0491-Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to patches/server/0492-Add-missing-strikeLighting-call-to-World-spigot-stri.patch diff --git a/patches/server/0492-Fix-some-rails-connecting-improperly.patch b/patches/server/0493-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/server/0492-Fix-some-rails-connecting-improperly.patch rename to patches/server/0493-Fix-some-rails-connecting-improperly.patch diff --git a/patches/server/0493-Incremental-player-saving.patch b/patches/server/0494-Incremental-player-saving.patch similarity index 100% rename from patches/server/0493-Incremental-player-saving.patch rename to patches/server/0494-Incremental-player-saving.patch diff --git a/patches/server/0494-Fix-MC-187716-Use-configured-height.patch b/patches/server/0495-Fix-MC-187716-Use-configured-height.patch similarity index 100% rename from patches/server/0494-Fix-MC-187716-Use-configured-height.patch rename to patches/server/0495-Fix-MC-187716-Use-configured-height.patch diff --git a/patches/server/0495-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0496-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/server/0495-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0496-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/server/0496-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0497-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 96% rename from patches/server/0496-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0497-Do-not-let-the-server-load-chunks-from-newer-version.patch index f0ecafa556..5ddcf459d1 100644 --- a/patches/server/0496-Do-not-let-the-server-load-chunks-from-newer-version.patch +++ b/patches/server/0497-Do-not-let-the-server-load-chunks-from-newer-version.patch @@ -9,7 +9,7 @@ the game, immediately stop the server to prevent data corruption. You can override this functionality at your own peril. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index b4246524dd11ad1e1dc94c56eee966c5a54d9ecc..fad795c67829f89b21d78e822c7b15f2ea560184 100644 +index 1f95ac18990822a64f0bb2af947693c4b88cdf73..6b7d3433c6e26888b3c718cfe13237342ad9b2b4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -98,10 +98,25 @@ public class ChunkSerializer { diff --git a/patches/server/0497-Brand-support.patch b/patches/server/0498-Brand-support.patch similarity index 100% rename from patches/server/0497-Brand-support.patch rename to patches/server/0498-Brand-support.patch diff --git a/patches/server/0498-Add-setMaxPlayers-API.patch b/patches/server/0499-Add-setMaxPlayers-API.patch similarity index 94% rename from patches/server/0498-Add-setMaxPlayers-API.patch rename to patches/server/0499-Add-setMaxPlayers-API.patch index 1249b8a981..f7d28abb3b 100644 --- a/patches/server/0498-Add-setMaxPlayers-API.patch +++ b/patches/server/0499-Add-setMaxPlayers-API.patch @@ -18,7 +18,7 @@ index 554da65376a1513af64fee6a958ceaa63c88b552..c61a4e8e03996487ed3f7f39187d96a8 private boolean allowCheatsForAllPlayers; private static final boolean ALLOW_LOGOUTIVATOR = false; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index beb8b7d06ef47c80ede95c884598fedcc7126d67..7795735e5acc3b7b6b71b4e61bdc4bdcb722a7b3 100644 +index 407a91f64e040745dea17544d6b7c6d125866c62..c4d7ac8abd7d86e8a4e2d8a3340d04f8710e925c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -616,6 +616,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0499-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0500-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/server/0499-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0500-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/server/0500-Don-t-require-FACING-data.patch b/patches/server/0501-Don-t-require-FACING-data.patch similarity index 100% rename from patches/server/0500-Don-t-require-FACING-data.patch rename to patches/server/0501-Don-t-require-FACING-data.patch diff --git a/patches/server/0501-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0502-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 96% rename from patches/server/0501-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0502-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 69caf29aee..8750c499d9 100644 --- a/patches/server/0501-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0502-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 23f9bb0f3202b418bf4fb59a46c624477f4dfae3..8d3d76ff942baf129f9845b945bd1537a058833a 100644 +index 74753639ed095eab305c2facd0f00264a6253cef..93d31c6f4d05625c2fab1bd7166922323dac4b47 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1675,12 +1675,14 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0502-Add-moon-phase-API.patch b/patches/server/0503-Add-moon-phase-API.patch similarity index 100% rename from patches/server/0502-Add-moon-phase-API.patch rename to patches/server/0503-Add-moon-phase-API.patch diff --git a/patches/server/0503-Prevent-headless-pistons-from-being-created.patch b/patches/server/0504-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from patches/server/0503-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0504-Prevent-headless-pistons-from-being-created.patch diff --git a/patches/server/0504-Add-BellRingEvent.patch b/patches/server/0505-Add-BellRingEvent.patch similarity index 100% rename from patches/server/0504-Add-BellRingEvent.patch rename to patches/server/0505-Add-BellRingEvent.patch diff --git a/patches/server/0505-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0506-Add-zombie-targets-turtle-egg-config.patch similarity index 92% rename from patches/server/0505-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0506-Add-zombie-targets-turtle-egg-config.patch index 7704727c56..2f5c2120c0 100644 --- a/patches/server/0505-Add-zombie-targets-turtle-egg-config.patch +++ b/patches/server/0506-Add-zombie-targets-turtle-egg-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 91917b11163c0740d5e5effc5e93d494e2b2d73e..caac3c9936c764e411799cb6a702b590f49d9955 100644 +index 040956f5d714ac014f9a153981d444db299fd826..83a4a3bbea1c076788cb7746adcee61e128b90fe 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -41,6 +41,11 @@ public class PaperWorldConfig { +@@ -38,6 +38,11 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0506-Buffer-joins-to-world.patch b/patches/server/0507-Buffer-joins-to-world.patch similarity index 100% rename from patches/server/0506-Buffer-joins-to-world.patch rename to patches/server/0507-Buffer-joins-to-world.patch diff --git a/patches/server/0507-Optimize-redstone-algorithm.patch b/patches/server/0508-Optimize-redstone-algorithm.patch similarity index 99% rename from patches/server/0507-Optimize-redstone-algorithm.patch rename to patches/server/0508-Optimize-redstone-algorithm.patch index 1c103119e7..4ed4d3c38a 100644 --- a/patches/server/0507-Optimize-redstone-algorithm.patch +++ b/patches/server/0508-Optimize-redstone-algorithm.patch @@ -19,10 +19,10 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index caac3c9936c764e411799cb6a702b590f49d9955..a88ef43adcf4ba36964f02e3fd363d3e018147cd 100644 +index 83a4a3bbea1c076788cb7746adcee61e128b90fe..acbaa00167d60ca6c6019b2dcd0947ef1d0557ee 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -46,6 +46,16 @@ public class PaperWorldConfig { +@@ -43,6 +43,16 @@ public class PaperWorldConfig { zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); } diff --git a/patches/server/0508-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0509-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 100% rename from patches/server/0508-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0509-Fix-hex-colors-not-working-in-some-kick-messages.patch diff --git a/patches/server/0509-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0510-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 100% rename from patches/server/0509-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0510-PortalCreateEvent-needs-to-know-its-entity.patch diff --git a/patches/server/0510-Fix-CraftTeam-null-check.patch b/patches/server/0511-Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/server/0510-Fix-CraftTeam-null-check.patch rename to patches/server/0511-Fix-CraftTeam-null-check.patch diff --git a/patches/server/0511-Add-more-Evoker-API.patch b/patches/server/0512-Add-more-Evoker-API.patch similarity index 100% rename from patches/server/0511-Add-more-Evoker-API.patch rename to patches/server/0512-Add-more-Evoker-API.patch diff --git a/patches/server/0512-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/patches/server/0513-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch similarity index 100% rename from patches/server/0512-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch rename to patches/server/0513-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch diff --git a/patches/server/0513-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0514-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/server/0513-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0514-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/server/0514-Cache-block-data-strings.patch b/patches/server/0515-Cache-block-data-strings.patch similarity index 100% rename from patches/server/0514-Cache-block-data-strings.patch rename to patches/server/0515-Cache-block-data-strings.patch diff --git a/patches/server/0515-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0516-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 100% rename from patches/server/0515-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0516-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch diff --git a/patches/server/0516-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0517-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/server/0516-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0517-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/server/0517-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0518-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/server/0517-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0518-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/server/0518-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0519-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 92% rename from patches/server/0518-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0519-Extend-block-drop-capture-to-capture-all-items-added.patch index e32d13d264..07fde0b288 100644 --- a/patches/server/0518-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0519-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 4ae56444d258cdf44a02256315d6aae84e2f53be..f1c02ae301da2a3b582d2ec1215c1a981e26ac47 100644 +index 93d31c6f4d05625c2fab1bd7166922323dac4b47..fd797376447e121c56a557ea6af277654e3a1831 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1220,6 +1220,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -24,7 +24,7 @@ index 4ae56444d258cdf44a02256315d6aae84e2f53be..f1c02ae301da2a3b582d2ec1215c1a98 return false; } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 6c55bd8b876d1d694e05ad6de6a9fd29a4d4d053..de4fdd46f23b2b17da752a8afc0faecc1ad8344f 100644 +index c21c5134308a2a83fb50bfe37f05d19c8e96ca7c..c3cdc5a7ae90b7d2dd5676d66086e1f0c5b23d0d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -7,6 +7,7 @@ import net.minecraft.world.InteractionResult; @@ -35,7 +35,7 @@ index 6c55bd8b876d1d694e05ad6de6a9fd29a4d4d053..de4fdd46f23b2b17da752a8afc0faecc import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.DoubleHighBlockItem; import net.minecraft.world.item.ItemStack; -@@ -421,10 +422,12 @@ public class ServerPlayerGameMode { +@@ -423,10 +424,12 @@ public class ServerPlayerGameMode { // return true; // CraftBukkit } // CraftBukkit start diff --git a/patches/server/0519-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/patches/server/0520-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 100% rename from patches/server/0519-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to patches/server/0520-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch diff --git a/patches/server/0520-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0521-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from patches/server/0520-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0521-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/patches/server/0521-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0522-Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/server/0521-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0522-Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/server/0522-Entity-isTicking.patch b/patches/server/0523-Entity-isTicking.patch similarity index 100% rename from patches/server/0522-Entity-isTicking.patch rename to patches/server/0523-Entity-isTicking.patch diff --git a/patches/server/0523-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0524-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from patches/server/0523-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0524-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/patches/server/0524-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch b/patches/server/0525-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch similarity index 100% rename from patches/server/0524-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch rename to patches/server/0525-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch diff --git a/patches/server/0525-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0526-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 100% rename from patches/server/0525-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0526-Reset-Ender-Crystals-on-Dragon-Spawn.patch diff --git a/patches/server/0526-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0527-Fix-for-large-move-vectors-crashing-server.patch similarity index 100% rename from patches/server/0526-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0527-Fix-for-large-move-vectors-crashing-server.patch diff --git a/patches/server/0527-Optimise-getType-calls.patch b/patches/server/0528-Optimise-getType-calls.patch similarity index 96% rename from patches/server/0527-Optimise-getType-calls.patch rename to patches/server/0528-Optimise-getType-calls.patch index e67e76e8d0..29bd54a4d7 100644 --- a/patches/server/0527-Optimise-getType-calls.patch +++ b/patches/server/0528-Optimise-getType-calls.patch @@ -80,10 +80,10 @@ index 6dc8f9f269db6971b8b46819e017357899ccd118..7f49c7c7048b5778f20ddce1d844d4b3 public BlockState getState() { diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index 6e8018241664d2cc2a6a8d52d87946740ac8bb97..8038fe792533617023e9667fa2763ce98975318c 100644 +index 24a2e88d083f90375c46cf948c7c89dccc6e4aa0..53a0edfff9b8a5417461aa253ee6df4f592fd5d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -@@ -75,7 +75,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { +@@ -77,7 +77,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { @Override public Material getType(int x, int y, int z) { diff --git a/patches/server/0528-Villager-resetOffers.patch b/patches/server/0529-Villager-resetOffers.patch similarity index 100% rename from patches/server/0528-Villager-resetOffers.patch rename to patches/server/0529-Villager-resetOffers.patch diff --git a/patches/server/0529-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/server/0530-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 100% rename from patches/server/0529-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to patches/server/0530-Improve-inlinig-for-some-hot-IBlockData-methods.patch diff --git a/patches/server/0530-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0531-Retain-block-place-order-when-capturing-blockstates.patch similarity index 93% rename from patches/server/0530-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0531-Retain-block-place-order-when-capturing-blockstates.patch index 86eaf1f7dc..c81368ec8e 100644 --- a/patches/server/0530-Retain-block-place-order-when-capturing-blockstates.patch +++ b/patches/server/0531-Retain-block-place-order-when-capturing-blockstates.patch @@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling cases where a captured entry is overriden) - but for now this will do. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index b92d930448757968cd6a178f4bcafae72c93044c..0c1774ecf236d7616738a170930abe58c5d12ece 100644 +index f004f5012ce157f9b0fb9c5890b5f3de957418f8..febc4fececb4bf527a69e47a06d782ec81616c1e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -147,7 +147,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0531-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0532-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from patches/server/0531-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0532-Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/patches/server/0532-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0533-Fix-item-locations-dropped-from-campfires.patch similarity index 100% rename from patches/server/0532-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0533-Fix-item-locations-dropped-from-campfires.patch diff --git a/patches/server/0533-Player-elytra-boost-API.patch b/patches/server/0534-Player-elytra-boost-API.patch similarity index 100% rename from patches/server/0533-Player-elytra-boost-API.patch rename to patches/server/0534-Player-elytra-boost-API.patch diff --git a/patches/server/0534-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0535-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/server/0534-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0535-Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/server/0535-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0536-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from patches/server/0535-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0536-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/patches/server/0536-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0537-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from patches/server/0536-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0537-Add-getOfflinePlayerIfCached-String.patch diff --git a/patches/server/0537-Add-ignore-discounts-API.patch b/patches/server/0538-Add-ignore-discounts-API.patch similarity index 100% rename from patches/server/0537-Add-ignore-discounts-API.patch rename to patches/server/0538-Add-ignore-discounts-API.patch diff --git a/patches/server/0538-Toggle-for-removing-existing-dragon.patch b/patches/server/0539-Toggle-for-removing-existing-dragon.patch similarity index 92% rename from patches/server/0538-Toggle-for-removing-existing-dragon.patch rename to patches/server/0539-Toggle-for-removing-existing-dragon.patch index 3bb55320e8..c7654f7d44 100644 --- a/patches/server/0538-Toggle-for-removing-existing-dragon.patch +++ b/patches/server/0539-Toggle-for-removing-existing-dragon.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for removing existing dragon diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a88ef43adcf4ba36964f02e3fd363d3e018147cd..1a2f62fae9ccf31764d8e10642ef38bdb955dc41 100644 +index acbaa00167d60ca6c6019b2dcd0947ef1d0557ee..b3e9149dbbc1cd6a6d01bb9f7109136b995afb0a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -56,6 +56,14 @@ public class PaperWorldConfig { +@@ -53,6 +53,14 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0539-Fix-client-lag-on-advancement-loading.patch b/patches/server/0540-Fix-client-lag-on-advancement-loading.patch similarity index 100% rename from patches/server/0539-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0540-Fix-client-lag-on-advancement-loading.patch diff --git a/patches/server/0540-Item-no-age-no-player-pickup.patch b/patches/server/0541-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/server/0540-Item-no-age-no-player-pickup.patch rename to patches/server/0541-Item-no-age-no-player-pickup.patch diff --git a/patches/server/0541-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0542-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/server/0541-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0542-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/server/0542-Beacon-API-custom-effect-ranges.patch b/patches/server/0543-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from patches/server/0542-Beacon-API-custom-effect-ranges.patch rename to patches/server/0543-Beacon-API-custom-effect-ranges.patch diff --git a/patches/server/0543-Add-API-for-quit-reason.patch b/patches/server/0544-Add-API-for-quit-reason.patch similarity index 100% rename from patches/server/0543-Add-API-for-quit-reason.patch rename to patches/server/0544-Add-API-for-quit-reason.patch diff --git a/patches/server/0544-Seed-based-feature-search.patch b/patches/server/0545-Seed-based-feature-search.patch similarity index 96% rename from patches/server/0544-Seed-based-feature-search.patch rename to patches/server/0545-Seed-based-feature-search.patch index 05c05fa386..46be6bfd43 100644 --- a/patches/server/0544-Seed-based-feature-search.patch +++ b/patches/server/0545-Seed-based-feature-search.patch @@ -21,10 +21,10 @@ changes but this should usually not happen. A config option to disable this completely is added though in case that should ever be necessary. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1a2f62fae9ccf31764d8e10642ef38bdb955dc41..2097c579bda12c2d1d19d67a023ca94051509b51 100644 +index b3e9149dbbc1cd6a6d01bb9f7109136b995afb0a..2523aabf499ef3807af02f7e61a3b13dbca08ee3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -379,6 +379,14 @@ public class PaperWorldConfig { +@@ -376,6 +376,14 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0545-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0546-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 97% rename from patches/server/0545-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0546-Add-Wandering-Trader-spawn-rate-config-options.patch index d5e31e5fbb..22e1ab6f8c 100644 --- a/patches/server/0545-Add-Wandering-Trader-spawn-rate-config-options.patch +++ b/patches/server/0546-Add-Wandering-Trader-spawn-rate-config-options.patch @@ -11,10 +11,10 @@ in IWorldServerData are removed as they were only used in certain places, with h values used in other places. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2097c579bda12c2d1d19d67a023ca94051509b51..afc637476380da272e61c10663dc77b30901c03a 100644 +index 2523aabf499ef3807af02f7e61a3b13dbca08ee3..d76b292cdfa2ae4d84a449da7f66faba494f6b03 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -64,6 +64,19 @@ public class PaperWorldConfig { +@@ -61,6 +61,19 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0546-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0547-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/server/0546-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0547-Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/server/0547-Expose-world-spawn-angle.patch b/patches/server/0548-Expose-world-spawn-angle.patch similarity index 100% rename from patches/server/0547-Expose-world-spawn-angle.patch rename to patches/server/0548-Expose-world-spawn-angle.patch diff --git a/patches/server/0548-Add-Destroy-Speed-API.patch b/patches/server/0549-Add-Destroy-Speed-API.patch similarity index 100% rename from patches/server/0548-Add-Destroy-Speed-API.patch rename to patches/server/0549-Add-Destroy-Speed-API.patch diff --git a/patches/server/0549-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0550-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 100% rename from patches/server/0549-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0550-Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/patches/server/0550-Add-LivingEntity-clearActiveItem.patch b/patches/server/0551-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/server/0550-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0551-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/server/0551-Add-PlayerItemCooldownEvent.patch b/patches/server/0552-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/server/0551-Add-PlayerItemCooldownEvent.patch rename to patches/server/0552-Add-PlayerItemCooldownEvent.patch diff --git a/patches/server/0552-More-lightning-API.patch b/patches/server/0553-More-lightning-API.patch similarity index 100% rename from patches/server/0552-More-lightning-API.patch rename to patches/server/0553-More-lightning-API.patch diff --git a/patches/server/0553-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0554-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 98% rename from patches/server/0553-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0554-Climbing-should-not-bypass-cramming-gamerule.patch index 5364432181..af8c479a90 100644 --- a/patches/server/0553-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0554-Climbing-should-not-bypass-cramming-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index afc637476380da272e61c10663dc77b30901c03a..247b30b2b2edbb1043b6385039ba830dea877c55 100644 +index d76b292cdfa2ae4d84a449da7f66faba494f6b03..0ec093e5d8865e909d0d105e27b81b31bdb5c192 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -77,6 +77,11 @@ public class PaperWorldConfig { +@@ -74,6 +74,11 @@ public class PaperWorldConfig { wanderingTraderSpawnChanceMax = getInt("wandering-trader.spawn-chance-max", wanderingTraderSpawnChanceMax); } diff --git a/patches/server/0554-Added-missing-default-perms-for-commands.patch b/patches/server/0555-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/server/0554-Added-missing-default-perms-for-commands.patch rename to patches/server/0555-Added-missing-default-perms-for-commands.patch diff --git a/patches/server/0555-Add-PlayerShearBlockEvent.patch b/patches/server/0556-Add-PlayerShearBlockEvent.patch similarity index 100% rename from patches/server/0555-Add-PlayerShearBlockEvent.patch rename to patches/server/0556-Add-PlayerShearBlockEvent.patch diff --git a/patches/server/0556-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0557-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/server/0556-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0557-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/server/0557-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0558-Fix-curing-zombie-villager-discount-exploit.patch similarity index 94% rename from patches/server/0557-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0558-Fix-curing-zombie-villager-discount-exploit.patch index 015e81c616..b6a6b16e0f 100644 --- a/patches/server/0557-Fix-curing-zombie-villager-discount-exploit.patch +++ b/patches/server/0558-Fix-curing-zombie-villager-discount-exploit.patch @@ -8,10 +8,10 @@ and curing a villager on repeat by simply resetting the relevant part of the reputation when it is cured. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 247b30b2b2edbb1043b6385039ba830dea877c55..618f47567ca9d4704f4686d7ca789286866f080a 100644 +index 0ec093e5d8865e909d0d105e27b81b31bdb5c192..1a8e7a495c38f617932825185378b2e494158175 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -82,6 +82,11 @@ public class PaperWorldConfig { +@@ -79,6 +79,11 @@ public class PaperWorldConfig { fixClimbingBypassingCrammingRule = getBoolean("fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule); } diff --git a/patches/server/0558-Limit-recipe-packets.patch b/patches/server/0559-Limit-recipe-packets.patch similarity index 100% rename from patches/server/0558-Limit-recipe-packets.patch rename to patches/server/0559-Limit-recipe-packets.patch diff --git a/patches/server/0559-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0560-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/server/0559-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0560-Fix-CraftSound-backwards-compatibility.patch diff --git a/patches/server/0560-MC-4-Fix-item-position-desync.patch b/patches/server/0561-MC-4-Fix-item-position-desync.patch similarity index 100% rename from patches/server/0560-MC-4-Fix-item-position-desync.patch rename to patches/server/0561-MC-4-Fix-item-position-desync.patch diff --git a/patches/server/0561-Player-Chunk-Load-Unload-Events.patch b/patches/server/0562-Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from patches/server/0561-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0562-Player-Chunk-Load-Unload-Events.patch diff --git a/patches/server/0562-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0563-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/server/0562-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0563-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/server/0563-Expose-LivingEntity-hurt-direction.patch b/patches/server/0564-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/server/0563-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0564-Expose-LivingEntity-hurt-direction.patch diff --git a/patches/server/0564-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0565-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from patches/server/0564-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0565-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/patches/server/0565-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/0566-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from patches/server/0565-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/0566-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/patches/server/0566-added-PlayerTradeEvent.patch b/patches/server/0567-added-PlayerTradeEvent.patch similarity index 100% rename from patches/server/0566-added-PlayerTradeEvent.patch rename to patches/server/0567-added-PlayerTradeEvent.patch diff --git a/patches/server/0567-Implement-TargetHitEvent.patch b/patches/server/0568-Implement-TargetHitEvent.patch similarity index 100% rename from patches/server/0567-Implement-TargetHitEvent.patch rename to patches/server/0568-Implement-TargetHitEvent.patch diff --git a/patches/server/0568-Additional-Block-Material-API-s.patch b/patches/server/0569-Additional-Block-Material-API-s.patch similarity index 100% rename from patches/server/0568-Additional-Block-Material-API-s.patch rename to patches/server/0569-Additional-Block-Material-API-s.patch diff --git a/patches/server/0569-Fix-harming-potion-dupe.patch b/patches/server/0570-Fix-harming-potion-dupe.patch similarity index 100% rename from patches/server/0569-Fix-harming-potion-dupe.patch rename to patches/server/0570-Fix-harming-potion-dupe.patch diff --git a/patches/server/0570-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/0571-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from patches/server/0570-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/0571-Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/patches/server/0571-Cache-burn-durations.patch b/patches/server/0572-Cache-burn-durations.patch similarity index 100% rename from patches/server/0571-Cache-burn-durations.patch rename to patches/server/0572-Cache-burn-durations.patch diff --git a/patches/server/0572-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0573-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 93% rename from patches/server/0572-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0573-Allow-disabling-mob-spawner-spawn-egg-transformation.patch index 25231c3e9e..df86b299c0 100644 --- a/patches/server/0572-Allow-disabling-mob-spawner-spawn-egg-transformation.patch +++ b/patches/server/0573-Allow-disabling-mob-spawner-spawn-egg-transformation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling mob spawner spawn egg transformation diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 618f47567ca9d4704f4686d7ca789286866f080a..bedadfc8835fa0c834494eb10cef13fa1cdc5cf5 100644 +index 1a8e7a495c38f617932825185378b2e494158175..3c9bc0684f25d511b05b724d4d52aaa82e965397 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -87,6 +87,11 @@ public class PaperWorldConfig { +@@ -84,6 +84,11 @@ public class PaperWorldConfig { fixCuringZombieVillagerDiscountExploit = getBoolean("game-mechanics.fix-curing-zombie-villager-discount-exploit", fixCuringZombieVillagerDiscountExploit); } diff --git a/patches/server/0573-Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/0574-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/server/0573-Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0574-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/server/0574-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0575-Fix-interact-event-not-being-called-in-adventure.patch similarity index 100% rename from patches/server/0574-Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/0575-Fix-interact-event-not-being-called-in-adventure.patch diff --git a/patches/server/0575-Zombie-API-breaking-doors.patch b/patches/server/0576-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/server/0575-Zombie-API-breaking-doors.patch rename to patches/server/0576-Zombie-API-breaking-doors.patch diff --git a/patches/server/0576-Fix-nerfed-slime-when-splitting.patch b/patches/server/0577-Fix-nerfed-slime-when-splitting.patch similarity index 100% rename from patches/server/0576-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0577-Fix-nerfed-slime-when-splitting.patch diff --git a/patches/server/0577-Add-EntityLoadCrossbowEvent.patch b/patches/server/0578-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from patches/server/0577-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0578-Add-EntityLoadCrossbowEvent.patch diff --git a/patches/server/0578-Guardian-beam-workaround.patch b/patches/server/0579-Guardian-beam-workaround.patch similarity index 100% rename from patches/server/0578-Guardian-beam-workaround.patch rename to patches/server/0579-Guardian-beam-workaround.patch diff --git a/patches/server/0579-Added-WorldGameRuleChangeEvent.patch b/patches/server/0580-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from patches/server/0579-Added-WorldGameRuleChangeEvent.patch rename to patches/server/0580-Added-WorldGameRuleChangeEvent.patch diff --git a/patches/server/0580-Added-ServerResourcesReloadedEvent.patch b/patches/server/0581-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from patches/server/0580-Added-ServerResourcesReloadedEvent.patch rename to patches/server/0581-Added-ServerResourcesReloadedEvent.patch diff --git a/patches/server/0581-Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/0582-Added-world-settings-for-mobs-picking-up-loot.patch similarity index 95% rename from patches/server/0581-Added-world-settings-for-mobs-picking-up-loot.patch rename to patches/server/0582-Added-world-settings-for-mobs-picking-up-loot.patch index 78f99e2245..84060c5b85 100644 --- a/patches/server/0581-Added-world-settings-for-mobs-picking-up-loot.patch +++ b/patches/server/0582-Added-world-settings-for-mobs-picking-up-loot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added world settings for mobs picking up loot diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bedadfc8835fa0c834494eb10cef13fa1cdc5cf5..b0b414a31192a2b0e5c69d00b982f883b66e77fd 100644 +index 3c9bc0684f25d511b05b724d4d52aaa82e965397..4a9fedb40acc72bec29fe71634406b06ce6b53cd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -433,6 +433,14 @@ public class PaperWorldConfig { +@@ -430,6 +430,14 @@ public class PaperWorldConfig { log("Creeper lingering effect: " + disableCreeperLingeringEffect); } diff --git a/patches/server/0582-Implemented-BlockFailedDispenseEvent.patch b/patches/server/0583-Implemented-BlockFailedDispenseEvent.patch similarity index 100% rename from patches/server/0582-Implemented-BlockFailedDispenseEvent.patch rename to patches/server/0583-Implemented-BlockFailedDispenseEvent.patch diff --git a/patches/server/0583-Added-PlayerLecternPageChangeEvent.patch b/patches/server/0584-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from patches/server/0583-Added-PlayerLecternPageChangeEvent.patch rename to patches/server/0584-Added-PlayerLecternPageChangeEvent.patch diff --git a/patches/server/0584-Added-PlayerLoomPatternSelectEvent.patch b/patches/server/0585-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from patches/server/0584-Added-PlayerLoomPatternSelectEvent.patch rename to patches/server/0585-Added-PlayerLoomPatternSelectEvent.patch diff --git a/patches/server/0585-Configurable-door-breaking-difficulty.patch b/patches/server/0586-Configurable-door-breaking-difficulty.patch similarity index 92% rename from patches/server/0585-Configurable-door-breaking-difficulty.patch rename to patches/server/0586-Configurable-door-breaking-difficulty.patch index 8b84a411c3..a2bac6f78b 100644 --- a/patches/server/0585-Configurable-door-breaking-difficulty.patch +++ b/patches/server/0586-Configurable-door-breaking-difficulty.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Configurable door breaking difficulty diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b0b414a31192a2b0e5c69d00b982f883b66e77fd..dd5c092a035a30c477fe828b58bc918fc48daa03 100644 +index 4a9fedb40acc72bec29fe71634406b06ce6b53cd..48e0f9b8dbb94d56200b0b46c2a50d9bfa44b398 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -4,7 +4,10 @@ import java.util.EnumMap; - import java.util.HashMap; +@@ -2,7 +2,10 @@ package com.destroystokyo.paper; + + import java.util.Arrays; import java.util.List; - import java.util.Map; - +import java.util.stream.Collectors; +import net.minecraft.world.Difficulty; +import net.minecraft.world.entity.monster.Vindicator; +import net.minecraft.world.entity.monster.Zombie; + import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; import org.bukkit.Bukkit; - import org.bukkit.Material; - import org.bukkit.configuration.ConfigurationSection; -@@ -92,6 +95,25 @@ public class PaperWorldConfig { + import org.bukkit.configuration.file.YamlConfiguration; +@@ -89,6 +92,25 @@ public class PaperWorldConfig { disableMobSpawnerSpawnEggTransformation = getBoolean("game-mechanics.disable-mob-spawner-spawn-egg-transformation", disableMobSpawnerSpawnEggTransformation); } @@ -46,7 +46,7 @@ index b0b414a31192a2b0e5c69d00b982f883b66e77fd..dd5c092a035a30c477fe828b58bc918f public short keepLoadedRange; private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); -@@ -143,6 +165,11 @@ public class PaperWorldConfig { +@@ -140,6 +162,11 @@ public class PaperWorldConfig { return config.getString("world-settings." + worldName + "." + path, config.getString("world-settings.default." + path)); } diff --git a/patches/server/0586-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0587-Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from patches/server/0586-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0587-Empty-commands-shall-not-be-dispatched.patch diff --git a/patches/server/0587-Implement-API-to-expose-exact-interaction-point.patch b/patches/server/0588-Implement-API-to-expose-exact-interaction-point.patch similarity index 96% rename from patches/server/0587-Implement-API-to-expose-exact-interaction-point.patch rename to patches/server/0588-Implement-API-to-expose-exact-interaction-point.patch index 410f64669f..7d021dd589 100644 --- a/patches/server/0587-Implement-API-to-expose-exact-interaction-point.patch +++ b/patches/server/0588-Implement-API-to-expose-exact-interaction-point.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement API to expose exact interaction point diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index de4fdd46f23b2b17da752a8afc0faecc1ad8344f..2a0f313365a25c1780027f1536dbb88ccdab61e2 100644 +index c3cdc5a7ae90b7d2dd5676d66086e1f0c5b23d0d..b096384cdc7596166e010e06272534b8001693c9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -498,7 +498,7 @@ public class ServerPlayerGameMode { +@@ -500,7 +500,7 @@ public class ServerPlayerGameMode { cancelledBlock = true; } diff --git a/patches/server/0588-Remove-stale-POIs.patch b/patches/server/0589-Remove-stale-POIs.patch similarity index 92% rename from patches/server/0588-Remove-stale-POIs.patch rename to patches/server/0589-Remove-stale-POIs.patch index 712638228b..89164a2d29 100644 --- a/patches/server/0588-Remove-stale-POIs.patch +++ b/patches/server/0589-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 908708900a9160d95dea3a392d96a40a17489280..a883677719b408edf0b81cdc885e65759a03936e 100644 +index fd797376447e121c56a557ea6af277654e3a1831..d5cfcba5e9a496deafa32f162b6ef634eae06214 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1764,6 +1764,11 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0589-Fix-villager-boat-exploit.patch b/patches/server/0590-Fix-villager-boat-exploit.patch similarity index 100% rename from patches/server/0589-Fix-villager-boat-exploit.patch rename to patches/server/0590-Fix-villager-boat-exploit.patch diff --git a/patches/server/0590-Add-sendOpLevel-API.patch b/patches/server/0591-Add-sendOpLevel-API.patch similarity index 100% rename from patches/server/0590-Add-sendOpLevel-API.patch rename to patches/server/0591-Add-sendOpLevel-API.patch diff --git a/patches/server/0591-Add-StructureLocateEvent.patch b/patches/server/0592-Add-StructureLocateEvent.patch similarity index 100% rename from patches/server/0591-Add-StructureLocateEvent.patch rename to patches/server/0592-Add-StructureLocateEvent.patch diff --git a/patches/server/0592-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0593-Collision-option-for-requiring-a-player-participant.patch similarity index 97% rename from patches/server/0592-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0593-Collision-option-for-requiring-a-player-participant.patch index a27b7eae79..ab0cf7aa4c 100644 --- a/patches/server/0592-Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/0593-Collision-option-for-requiring-a-player-participant.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dd5c092a035a30c477fe828b58bc918fc48daa03..16b80fe4c55c51d3afaefba7eef97d1e3e4a3248 100644 +index 48e0f9b8dbb94d56200b0b46c2a50d9bfa44b398..bc39e5fe8c9f5d1e5b5c4ea7bd80193af8574211 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -67,6 +67,18 @@ public class PaperWorldConfig { +@@ -64,6 +64,18 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0593-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0594-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 100% rename from patches/server/0593-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/0594-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch diff --git a/patches/server/0594-Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/0595-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from patches/server/0594-Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/0595-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/patches/server/0595-Make-schedule-command-per-world.patch b/patches/server/0596-Make-schedule-command-per-world.patch similarity index 100% rename from patches/server/0595-Make-schedule-command-per-world.patch rename to patches/server/0596-Make-schedule-command-per-world.patch diff --git a/patches/server/0596-Configurable-max-leash-distance.patch b/patches/server/0597-Configurable-max-leash-distance.patch similarity index 94% rename from patches/server/0596-Configurable-max-leash-distance.patch rename to patches/server/0597-Configurable-max-leash-distance.patch index de244acf73..39b2c1b3a2 100644 --- a/patches/server/0596-Configurable-max-leash-distance.patch +++ b/patches/server/0597-Configurable-max-leash-distance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable max leash distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16b80fe4c55c51d3afaefba7eef97d1e3e4a3248..4ceb6b048889c62edb69c88422abddd1aee0bcf7 100644 +index bc39e5fe8c9f5d1e5b5c4ea7bd80193af8574211..214b7ab71c4717faa3c949e18f268bef3e066305 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -266,6 +266,12 @@ public class PaperWorldConfig { +@@ -263,6 +263,12 @@ public class PaperWorldConfig { } } diff --git a/patches/server/0597-Implement-BlockPreDispenseEvent.patch b/patches/server/0598-Implement-BlockPreDispenseEvent.patch similarity index 100% rename from patches/server/0597-Implement-BlockPreDispenseEvent.patch rename to patches/server/0598-Implement-BlockPreDispenseEvent.patch diff --git a/patches/server/0598-Added-Vanilla-Entity-Tags.patch b/patches/server/0599-Added-Vanilla-Entity-Tags.patch similarity index 100% rename from patches/server/0598-Added-Vanilla-Entity-Tags.patch rename to patches/server/0599-Added-Vanilla-Entity-Tags.patch diff --git a/patches/server/0599-added-Wither-API.patch b/patches/server/0600-added-Wither-API.patch similarity index 100% rename from patches/server/0599-added-Wither-API.patch rename to patches/server/0600-added-Wither-API.patch diff --git a/patches/server/0600-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0601-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from patches/server/0600-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0601-Added-firing-of-PlayerChangeBeaconEffectEvent.patch diff --git a/patches/server/0601-Fix-console-spam-when-removing-chests-in-water.patch b/patches/server/0602-Fix-console-spam-when-removing-chests-in-water.patch similarity index 100% rename from patches/server/0601-Fix-console-spam-when-removing-chests-in-water.patch rename to patches/server/0602-Fix-console-spam-when-removing-chests-in-water.patch diff --git a/patches/server/0602-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0603-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 92% rename from patches/server/0602-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0603-Add-toggle-for-always-placing-the-dragon-egg.patch index 1ca09dd0b5..421a188e0f 100644 --- a/patches/server/0602-Add-toggle-for-always-placing-the-dragon-egg.patch +++ b/patches/server/0603-Add-toggle-for-always-placing-the-dragon-egg.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add toggle for always placing the dragon egg diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4ceb6b048889c62edb69c88422abddd1aee0bcf7..7738b5959f347cb369646852e7174aa580546400 100644 +index 214b7ab71c4717faa3c949e18f268bef3e066305..70fdd29f0dd6dfac94b2c20090348678a956c333 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -683,5 +683,10 @@ public class PaperWorldConfig { +@@ -714,5 +714,10 @@ public class PaperWorldConfig { private void perPlayerMobSpawns() { perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); } diff --git a/patches/server/0603-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0604-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/server/0603-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0604-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/server/0604-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0605-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/server/0604-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/0605-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/server/0605-Skip-distance-map-update-when-spawning-disabled.patch b/patches/server/0606-Skip-distance-map-update-when-spawning-disabled.patch similarity index 100% rename from patches/server/0605-Skip-distance-map-update-when-spawning-disabled.patch rename to patches/server/0606-Skip-distance-map-update-when-spawning-disabled.patch diff --git a/patches/server/0606-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0607-Reset-shield-blocking-on-dimension-change.patch similarity index 100% rename from patches/server/0606-Reset-shield-blocking-on-dimension-change.patch rename to patches/server/0607-Reset-shield-blocking-on-dimension-change.patch diff --git a/patches/server/0607-add-DragonEggFormEvent.patch b/patches/server/0608-add-DragonEggFormEvent.patch similarity index 100% rename from patches/server/0607-add-DragonEggFormEvent.patch rename to patches/server/0608-add-DragonEggFormEvent.patch diff --git a/patches/server/0608-EntityMoveEvent.patch b/patches/server/0609-EntityMoveEvent.patch similarity index 97% rename from patches/server/0608-EntityMoveEvent.patch rename to patches/server/0609-EntityMoveEvent.patch index b6b9cba0ed..95012893ed 100644 --- a/patches/server/0608-EntityMoveEvent.patch +++ b/patches/server/0609-EntityMoveEvent.patch @@ -17,7 +17,7 @@ index 51bbb11ff8d3da95fa6d9890be3135a34b3eafac..c8213692e658f6eb82d3bd843b9525ff 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 0e14946284738b751790b2763bfe197c0148a54a..5cd1fe3506b1009de9fce64c3f4f44a29f13c359 100644 +index d5cfcba5e9a496deafa32f162b6ef634eae06214..103d32b360095c179e681bd354d0b9316b050339 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -200,6 +200,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0609-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0610-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 88% rename from patches/server/0609-added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/0610-added-option-to-disable-pathfinding-updates-on-block.patch index 176d82a83b..ca55ee348e 100644 --- a/patches/server/0609-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0610-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7738b5959f347cb369646852e7174aa580546400..c6cbc656f2cf6b253c3dfc87b8367f11102c7e41 100644 +index 70fdd29f0dd6dfac94b2c20090348678a956c333..bc33cf47e6f67179656f9ac0c378408985d9a88e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -688,5 +688,10 @@ public class PaperWorldConfig { +@@ -719,5 +719,10 @@ public class PaperWorldConfig { private void enderDragonsDeathAlwaysPlacesDragonEgg() { enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg); } @@ -20,7 +20,7 @@ index 7738b5959f347cb369646852e7174aa580546400..c6cbc656f2cf6b253c3dfc87b8367f11 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5cd1fe3506b1009de9fce64c3f4f44a29f13c359..a2d9e093bf7b5ee947f1d7c3b94397cd93eedef7 100644 +index 103d32b360095c179e681bd354d0b9316b050339..1f1b1a62ea9b37bc671e4df60a00c16c1027d3f6 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 net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0610-Inline-shift-direction-fields.patch b/patches/server/0611-Inline-shift-direction-fields.patch similarity index 100% rename from patches/server/0610-Inline-shift-direction-fields.patch rename to patches/server/0611-Inline-shift-direction-fields.patch diff --git a/patches/server/0611-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0612-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from patches/server/0611-Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/0612-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/patches/server/0612-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0613-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/server/0612-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/0613-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/server/0613-living-entity-allow-attribute-registration.patch b/patches/server/0614-living-entity-allow-attribute-registration.patch similarity index 100% rename from patches/server/0613-living-entity-allow-attribute-registration.patch rename to patches/server/0614-living-entity-allow-attribute-registration.patch diff --git a/patches/server/0614-fix-dead-slime-setSize-invincibility.patch b/patches/server/0615-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/server/0614-fix-dead-slime-setSize-invincibility.patch rename to patches/server/0615-fix-dead-slime-setSize-invincibility.patch diff --git a/patches/server/0615-Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/0616-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/server/0615-Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/0616-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/server/0616-misc-debugging-dumps.patch b/patches/server/0617-misc-debugging-dumps.patch similarity index 100% rename from patches/server/0616-misc-debugging-dumps.patch rename to patches/server/0617-misc-debugging-dumps.patch diff --git a/patches/server/0617-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0618-Add-support-for-hex-color-codes-in-console.patch similarity index 100% rename from patches/server/0617-Add-support-for-hex-color-codes-in-console.patch rename to patches/server/0618-Add-support-for-hex-color-codes-in-console.patch diff --git a/patches/server/0618-Expose-Tracked-Players.patch b/patches/server/0619-Expose-Tracked-Players.patch similarity index 100% rename from patches/server/0618-Expose-Tracked-Players.patch rename to patches/server/0619-Expose-Tracked-Players.patch diff --git a/patches/server/0619-Remove-streams-from-SensorNearest.patch b/patches/server/0620-Remove-streams-from-SensorNearest.patch similarity index 100% rename from patches/server/0619-Remove-streams-from-SensorNearest.patch rename to patches/server/0620-Remove-streams-from-SensorNearest.patch diff --git a/patches/server/0620-MC-29274-Fix-Wither-hostility-towards-players.patch b/patches/server/0621-MC-29274-Fix-Wither-hostility-towards-players.patch similarity index 93% rename from patches/server/0620-MC-29274-Fix-Wither-hostility-towards-players.patch rename to patches/server/0621-MC-29274-Fix-Wither-hostility-towards-players.patch index 019deb51e8..519adeaa4d 100644 --- a/patches/server/0620-MC-29274-Fix-Wither-hostility-towards-players.patch +++ b/patches/server/0621-MC-29274-Fix-Wither-hostility-towards-players.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-29274: Fix Wither hostility towards players diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c6cbc656f2cf6b253c3dfc87b8367f11102c7e41..caa15973d78e21725b5dd9e5fc91cede4cc0dac4 100644 +index bc33cf47e6f67179656f9ac0c378408985d9a88e..f97795330cff2df87c91a0946b80d156d1df9389 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -693,5 +693,11 @@ public class PaperWorldConfig { +@@ -724,5 +724,11 @@ public class PaperWorldConfig { private void setUpdatePathfindingOnBlockUpdate() { updatePathfindingOnBlockUpdate = getBoolean("update-pathfinding-on-block-update", this.updatePathfindingOnBlockUpdate); } diff --git a/patches/server/0621-Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/0622-Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/server/0621-Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/0622-Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/server/0622-Improve-ServerGUI.patch b/patches/server/0623-Improve-ServerGUI.patch similarity index 100% rename from patches/server/0622-Improve-ServerGUI.patch rename to patches/server/0623-Improve-ServerGUI.patch diff --git a/patches/server/0623-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch b/patches/server/0624-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch similarity index 100% rename from patches/server/0623-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch rename to patches/server/0624-stop-firing-pressure-plate-EntityInteractEvent-for-i.patch diff --git a/patches/server/0624-fix-converting-txt-to-json-file.patch b/patches/server/0625-fix-converting-txt-to-json-file.patch similarity index 100% rename from patches/server/0624-fix-converting-txt-to-json-file.patch rename to patches/server/0625-fix-converting-txt-to-json-file.patch diff --git a/patches/server/0625-Add-worldborder-events.patch b/patches/server/0626-Add-worldborder-events.patch similarity index 100% rename from patches/server/0625-Add-worldborder-events.patch rename to patches/server/0626-Add-worldborder-events.patch diff --git a/patches/server/0626-added-PlayerNameEntityEvent.patch b/patches/server/0627-added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/server/0626-added-PlayerNameEntityEvent.patch rename to patches/server/0627-added-PlayerNameEntityEvent.patch diff --git a/patches/server/0627-Prevent-grindstones-from-overstacking-items.patch b/patches/server/0628-Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/server/0627-Prevent-grindstones-from-overstacking-items.patch rename to patches/server/0628-Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/server/0628-Add-recipe-to-cook-events.patch b/patches/server/0629-Add-recipe-to-cook-events.patch similarity index 100% rename from patches/server/0628-Add-recipe-to-cook-events.patch rename to patches/server/0629-Add-recipe-to-cook-events.patch diff --git a/patches/server/0629-Add-Block-isValidTool.patch b/patches/server/0630-Add-Block-isValidTool.patch similarity index 100% rename from patches/server/0629-Add-Block-isValidTool.patch rename to patches/server/0630-Add-Block-isValidTool.patch diff --git a/patches/server/0630-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0631-Allow-using-signs-inside-spawn-protection.patch similarity index 94% rename from patches/server/0630-Allow-using-signs-inside-spawn-protection.patch rename to patches/server/0631-Allow-using-signs-inside-spawn-protection.patch index 300b353455..b353cb3548 100644 --- a/patches/server/0630-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0631-Allow-using-signs-inside-spawn-protection.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index caa15973d78e21725b5dd9e5fc91cede4cc0dac4..46601a98d9f06c6cfadc8120bcffab081ca7f557 100644 +index f97795330cff2df87c91a0946b80d156d1df9389..19a0b2a73ab1d066501148108d6cd9998d281853 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -699,5 +699,10 @@ public class PaperWorldConfig { +@@ -730,5 +730,10 @@ public class PaperWorldConfig { fixWitherTargetingBug = getBoolean("fix-wither-targeting-bug", false); log("Withers properly target players: " + fixWitherTargetingBug); } diff --git a/patches/server/0631-Implement-Keyed-on-World.patch b/patches/server/0632-Implement-Keyed-on-World.patch similarity index 100% rename from patches/server/0631-Implement-Keyed-on-World.patch rename to patches/server/0632-Implement-Keyed-on-World.patch diff --git a/patches/server/0632-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0633-Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/server/0632-Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/0633-Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/server/0633-Item-Rarity-API.patch b/patches/server/0634-Item-Rarity-API.patch similarity index 100% rename from patches/server/0633-Item-Rarity-API.patch rename to patches/server/0634-Item-Rarity-API.patch diff --git a/patches/server/0634-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0635-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0634-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0635-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0635-copy-TESign-isEditable-from-snapshots.patch b/patches/server/0636-copy-TESign-isEditable-from-snapshots.patch similarity index 100% rename from patches/server/0635-copy-TESign-isEditable-from-snapshots.patch rename to patches/server/0636-copy-TESign-isEditable-from-snapshots.patch diff --git a/patches/server/0636-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0637-Drop-carried-item-when-player-has-disconnected.patch similarity index 100% rename from patches/server/0636-Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/0637-Drop-carried-item-when-player-has-disconnected.patch diff --git a/patches/server/0637-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0638-forced-whitelist-use-configurable-kick-message.patch similarity index 100% rename from patches/server/0637-forced-whitelist-use-configurable-kick-message.patch rename to patches/server/0638-forced-whitelist-use-configurable-kick-message.patch diff --git a/patches/server/0638-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0639-Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 100% rename from patches/server/0638-Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/0639-Don-t-ignore-result-of-PlayerEditBookEvent.patch diff --git a/patches/server/0639-fix-cancelling-block-falling-causing-client-desync.patch b/patches/server/0640-fix-cancelling-block-falling-causing-client-desync.patch similarity index 100% rename from patches/server/0639-fix-cancelling-block-falling-causing-client-desync.patch rename to patches/server/0640-fix-cancelling-block-falling-causing-client-desync.patch diff --git a/patches/server/0640-Expose-protocol-version.patch b/patches/server/0641-Expose-protocol-version.patch similarity index 100% rename from patches/server/0640-Expose-protocol-version.patch rename to patches/server/0641-Expose-protocol-version.patch diff --git a/patches/server/0641-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch b/patches/server/0642-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch similarity index 100% rename from patches/server/0641-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch rename to patches/server/0642-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch diff --git a/patches/server/0642-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0643-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 100% rename from patches/server/0642-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0643-Enhance-console-tab-completions-for-brigadier-comman.patch diff --git a/patches/server/0643-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0644-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/server/0643-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0644-Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/server/0644-Add-bypass-host-check.patch b/patches/server/0645-Add-bypass-host-check.patch similarity index 100% rename from patches/server/0644-Add-bypass-host-check.patch rename to patches/server/0645-Add-bypass-host-check.patch diff --git a/patches/server/0645-Set-area-affect-cloud-rotation.patch b/patches/server/0646-Set-area-affect-cloud-rotation.patch similarity index 100% rename from patches/server/0645-Set-area-affect-cloud-rotation.patch rename to patches/server/0646-Set-area-affect-cloud-rotation.patch diff --git a/patches/server/0646-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0647-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/server/0646-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0647-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/server/0647-Fix-duplicating-give-items-on-item-drop-cancel.patch b/patches/server/0648-Fix-duplicating-give-items-on-item-drop-cancel.patch similarity index 100% rename from patches/server/0647-Fix-duplicating-give-items-on-item-drop-cancel.patch rename to patches/server/0648-Fix-duplicating-give-items-on-item-drop-cancel.patch diff --git a/patches/server/0648-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0649-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0648-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0649-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0649-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0650-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0649-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0650-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0650-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0651-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0650-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0651-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0651-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0652-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/server/0651-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0652-Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/server/0652-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0653-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0652-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0653-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0653-Added-PlayerDeepSleepEvent.patch b/patches/server/0654-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/server/0653-Added-PlayerDeepSleepEvent.patch rename to patches/server/0654-Added-PlayerDeepSleepEvent.patch diff --git a/patches/server/0654-More-World-API.patch b/patches/server/0655-More-World-API.patch similarity index 100% rename from patches/server/0654-More-World-API.patch rename to patches/server/0655-More-World-API.patch diff --git a/patches/server/0655-Added-PlayerBedFailEnterEvent.patch b/patches/server/0656-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0655-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0656-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0656-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0657-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0656-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0657-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0657-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0658-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/server/0657-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0658-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/server/0658-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0659-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0658-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0659-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0659-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0660-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/server/0659-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0660-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/server/0660-Add-Channel-initialization-listeners.patch b/patches/server/0661-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/server/0660-Add-Channel-initialization-listeners.patch rename to patches/server/0661-Add-Channel-initialization-listeners.patch diff --git a/patches/server/0661-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0662-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0661-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0662-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0662-Add-more-WanderingTrader-API.patch b/patches/server/0663-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0662-Add-more-WanderingTrader-API.patch rename to patches/server/0663-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0663-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0664-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0663-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0664-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/server/0664-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0665-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0664-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0665-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0665-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0666-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/server/0665-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0666-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/server/0666-Inventory-close.patch b/patches/server/0667-Inventory-close.patch similarity index 100% rename from patches/server/0666-Inventory-close.patch rename to patches/server/0667-Inventory-close.patch diff --git a/patches/server/0667-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0668-call-PortalCreateEvent-players-and-end-platform.patch similarity index 100% rename from patches/server/0667-call-PortalCreateEvent-players-and-end-platform.patch rename to patches/server/0668-call-PortalCreateEvent-players-and-end-platform.patch diff --git a/patches/server/0668-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0669-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/server/0668-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0669-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/server/0669-Fix-CraftPotionBrewer-cache.patch b/patches/server/0670-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0669-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0670-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0670-Add-basic-Datapack-API.patch b/patches/server/0671-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0670-Add-basic-Datapack-API.patch rename to patches/server/0671-Add-basic-Datapack-API.patch diff --git a/patches/server/0671-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0672-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0671-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0672-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0672-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0673-additions-to-PlayerGameModeChangeEvent.patch similarity index 98% rename from patches/server/0672-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0673-additions-to-PlayerGameModeChangeEvent.patch index dda1537e31..673eefae1e 100644 --- a/patches/server/0672-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0673-additions-to-PlayerGameModeChangeEvent.patch @@ -91,7 +91,7 @@ index 753ad5a12bc523eddfffa336a20ab3e3284e6f7c..9f218a4b253fe2ab0e70e871eeee05bb } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 2a0f313365a25c1780027f1536dbb88ccdab61e2..013ed10b8eca812309a2c9a10acd668ad51aac8e 100644 +index b096384cdc7596166e010e06272534b8001693c9..4b756c0a4b607faa03b00ab81761335be63c39eb 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -74,18 +74,24 @@ public class ServerPlayerGameMode { diff --git a/patches/server/0673-ItemStack-repair-check-API.patch b/patches/server/0674-ItemStack-repair-check-API.patch similarity index 100% rename from patches/server/0673-ItemStack-repair-check-API.patch rename to patches/server/0674-ItemStack-repair-check-API.patch diff --git a/patches/server/0674-More-Enchantment-API.patch b/patches/server/0675-More-Enchantment-API.patch similarity index 100% rename from patches/server/0674-More-Enchantment-API.patch rename to patches/server/0675-More-Enchantment-API.patch diff --git a/patches/server/0675-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0676-Add-command-line-option-to-load-extra-plugin-jars-no.patch similarity index 96% rename from patches/server/0675-Add-command-line-option-to-load-extra-plugin-jars-no.patch rename to patches/server/0676-Add-command-line-option-to-load-extra-plugin-jars-no.patch index 2299c257c0..ff5753ab51 100644 --- a/patches/server/0675-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/server/0676-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2f914ebd18764fbfd3834c0a94cedb2184f8dbb0..59c352f9666ff9b828450a62f590ab637b4329b5 100644 +index b7db2d68deeee0a213ee26e31475f05ba16d073e..ca28dda0f9819e8d75fbaa48cf5ff5643910999a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -386,8 +386,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0676-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0677-Fix-and-optimise-world-force-upgrading.patch similarity index 95% rename from patches/server/0676-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0677-Fix-and-optimise-world-force-upgrading.patch index 83bea4ae22..8b74933f38 100644 --- a/patches/server/0676-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0677-Fix-and-optimise-world-force-upgrading.patch @@ -297,12 +297,12 @@ index 73ac55de9059a1d0f1da5bec0688dcd4bf5c8973..db2d6e7b2dc82c60d524dd2a018d28c2 if (dimensionKey == LevelStem.OVERWORLD) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 0c1774ecf236d7616738a170930abe58c5d12ece..667aecc27e0c886f15a0418020d046e0a9791a0e 100644 +index febc4fececb4bf527a69e47a06d782ec81616c1e..ccf6c79293ca046174b94a61a28aea3fa9c2a37f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -185,6 +185,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - return this.typeKey; - } +@@ -174,6 +174,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions + public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here + // Paper start - fix and optimise world upgrading + // copied from below @@ -312,9 +312,10 @@ index 0c1774ecf236d7616738a170930abe58c5d12ece..667aecc27e0c886f15a0418020d046e0 + }); + } + // Paper end - fix and optimise world upgrading - protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, final DimensionType dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot - this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper ++ + public CraftWorld getWorld() { + return this.world; + } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java index 1bee455235ece8aa299a2baeede027d251e6ff57..60ae9395591c81aebaa4be1541380a8fe921ce68 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/patches/server/0677-Add-Mob-lookAt-API.patch b/patches/server/0678-Add-Mob-lookAt-API.patch similarity index 100% rename from patches/server/0677-Add-Mob-lookAt-API.patch rename to patches/server/0678-Add-Mob-lookAt-API.patch diff --git a/patches/server/0678-Add-Unix-domain-socket-support.patch b/patches/server/0679-Add-Unix-domain-socket-support.patch similarity index 100% rename from patches/server/0678-Add-Unix-domain-socket-support.patch rename to patches/server/0679-Add-Unix-domain-socket-support.patch diff --git a/patches/server/0679-Add-EntityInsideBlockEvent.patch b/patches/server/0680-Add-EntityInsideBlockEvent.patch similarity index 100% rename from patches/server/0679-Add-EntityInsideBlockEvent.patch rename to patches/server/0680-Add-EntityInsideBlockEvent.patch diff --git a/patches/server/0680-Attributes-API-for-item-defaults.patch b/patches/server/0681-Attributes-API-for-item-defaults.patch similarity index 100% rename from patches/server/0680-Attributes-API-for-item-defaults.patch rename to patches/server/0681-Attributes-API-for-item-defaults.patch diff --git a/patches/server/0681-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch b/patches/server/0682-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0681-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch rename to patches/server/0682-Have-CraftMerchantCustom-emit-PlayerPurchaseEvent.patch diff --git a/patches/server/0682-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0683-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 98% rename from patches/server/0682-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/0683-Add-cause-to-Weather-ThunderChangeEvents.patch index b94ca80e31..501e76c033 100644 --- a/patches/server/0682-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0683-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 a2d9e093bf7b5ee947f1d7c3b94397cd93eedef7..985b8b9da26aba43b84e9fe363507627c625e6d3 100644 +index 1f1b1a62ea9b37bc671e4df60a00c16c1027d3f6..6c8d18c4ea8a332a6973c3bb257cb443fe844d17 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -419,8 +419,8 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl diff --git a/patches/server/0683-More-Lidded-Block-API.patch b/patches/server/0684-More-Lidded-Block-API.patch similarity index 100% rename from patches/server/0683-More-Lidded-Block-API.patch rename to patches/server/0684-More-Lidded-Block-API.patch diff --git a/patches/server/0684-Limit-item-frame-cursors-on-maps.patch b/patches/server/0685-Limit-item-frame-cursors-on-maps.patch similarity index 93% rename from patches/server/0684-Limit-item-frame-cursors-on-maps.patch rename to patches/server/0685-Limit-item-frame-cursors-on-maps.patch index 5717cf12a3..0f1eee2ed7 100644 --- a/patches/server/0684-Limit-item-frame-cursors-on-maps.patch +++ b/patches/server/0685-Limit-item-frame-cursors-on-maps.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit item frame cursors on maps diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 46601a98d9f06c6cfadc8120bcffab081ca7f557..b7b160ef6feded6b84faf9958599c761828fcf59 100644 +index 19a0b2a73ab1d066501148108d6cd9998d281853..0fef75148df251d76a029e86a345adad039fcdd0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -704,5 +704,10 @@ public class PaperWorldConfig { +@@ -735,5 +735,10 @@ public class PaperWorldConfig { private void allowUsingSignsInsideSpawnProtection() { allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection); } diff --git a/patches/server/0685-Add-PufferFishStateChangeEvent.patch b/patches/server/0686-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/server/0685-Add-PufferFishStateChangeEvent.patch rename to patches/server/0686-Add-PufferFishStateChangeEvent.patch diff --git a/patches/server/0686-Add-PlayerKickEvent-causes.patch b/patches/server/0687-Add-PlayerKickEvent-causes.patch similarity index 100% rename from patches/server/0686-Add-PlayerKickEvent-causes.patch rename to patches/server/0687-Add-PlayerKickEvent-causes.patch diff --git a/patches/server/0687-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0688-Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/server/0687-Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/0688-Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/server/0688-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch b/patches/server/0689-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch similarity index 71% rename from patches/server/0688-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch rename to patches/server/0689-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch index 598b0de366..fd18c13168 100644 --- a/patches/server/0688-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch +++ b/patches/server/0689-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch @@ -13,10 +13,10 @@ contention situations. And this is extremely a low contention situation. diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83ce21f2444 100644 +index 82a4b7969e36940cb694bd999b8c03f9c66a71dc..05d5a77c439b177dc12b8b1ebd4181a5446c0f31 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -36,16 +36,18 @@ public class PalettedContainer implements PaletteResize { +@@ -37,16 +37,18 @@ public class PalettedContainer implements PaletteResize { private final DebugBuffer> traces = null; public void acquire() { @@ -35,8 +35,8 @@ index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83c + //this.lock.release(); // Paper - disable this } - public PalettedContainer(Palette fallbackPalette, IdMapper idList, Function elementDeserializer, Function elementSerializer, T defaultElement) { -@@ -96,7 +98,7 @@ public class PalettedContainer implements PaletteResize { + // Paper start - Anti-Xray - Add predefined objects +@@ -134,7 +136,7 @@ public class PalettedContainer implements PaletteResize { return this.palette.idFor(objectAdded); } @@ -45,7 +45,7 @@ index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83c Object var6; try { this.acquire(); -@@ -120,7 +122,7 @@ public class PalettedContainer implements PaletteResize { +@@ -158,7 +160,7 @@ public class PalettedContainer implements PaletteResize { return (T)(object == null ? this.defaultValue : object); } @@ -54,7 +54,7 @@ index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83c try { this.acquire(); this.set(getIndex(i, j, k), object); -@@ -144,7 +146,7 @@ public class PalettedContainer implements PaletteResize { +@@ -182,7 +184,7 @@ public class PalettedContainer implements PaletteResize { return (T)(object == null ? this.defaultValue : object); } @@ -63,16 +63,16 @@ index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83c try { this.acquire(); int i = buf.readByte(); -@@ -161,7 +163,7 @@ public class PalettedContainer implements PaletteResize { +@@ -203,7 +205,7 @@ public class PalettedContainer implements PaletteResize { + @Deprecated public void write(FriendlyByteBuf buf) { + write(buf, null, 0); } - - public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER -- public void write(FriendlyByteBuf buf) { -+ public synchronized void write(FriendlyByteBuf buf) { // Paper - synchronize +- public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo, int chunkSectionIndex) { ++ public synchronized void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo, int chunkSectionIndex) { // Paper - synchronize + // Paper end try { this.acquire(); - buf.writeByte(this.bits); -@@ -173,7 +175,7 @@ public class PalettedContainer implements PaletteResize { +@@ -224,7 +226,7 @@ public class PalettedContainer implements PaletteResize { } @@ -80,8 +80,8 @@ index 5ac948b5b82f3144cdf402af440251cb8c7369d7..d8b7a7d9aa3ef47aa4e222c6ca85e83c + public synchronized void read(ListTag paletteNbt, long[] data) { // Paper - synchronize try { this.acquire(); - int i = Math.max(4, Mth.ceillog2(paletteNbt.size())); -@@ -206,7 +208,7 @@ public class PalettedContainer implements PaletteResize { + // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)? +@@ -259,7 +261,7 @@ public class PalettedContainer implements PaletteResize { } diff --git a/patches/server/0689-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0690-Add-option-to-fix-items-merging-through-walls.patch similarity index 93% rename from patches/server/0689-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0690-Add-option-to-fix-items-merging-through-walls.patch index 3e34d24f12..b0a39319bf 100644 --- a/patches/server/0689-Add-option-to-fix-items-merging-through-walls.patch +++ b/patches/server/0690-Add-option-to-fix-items-merging-through-walls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b7b160ef6feded6b84faf9958599c761828fcf59..75a02252f398b3d16f8588693e71f779d7fa062a 100644 +index 0fef75148df251d76a029e86a345adad039fcdd0..57929ffa8e992874089ee30d8a96eeb03d754816 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -709,5 +709,10 @@ public class PaperWorldConfig { +@@ -740,5 +740,10 @@ public class PaperWorldConfig { private void mapItemFrameCursorLimit() { mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit); } diff --git a/patches/server/0690-Add-BellRevealRaiderEvent.patch b/patches/server/0691-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/server/0690-Add-BellRevealRaiderEvent.patch rename to patches/server/0691-Add-BellRevealRaiderEvent.patch diff --git a/patches/server/0691-Fix-invulnerable-end-crystals.patch b/patches/server/0692-Fix-invulnerable-end-crystals.patch similarity index 96% rename from patches/server/0691-Fix-invulnerable-end-crystals.patch rename to patches/server/0692-Fix-invulnerable-end-crystals.patch index 6da3abadd1..7c436c60d4 100644 --- a/patches/server/0691-Fix-invulnerable-end-crystals.patch +++ b/patches/server/0692-Fix-invulnerable-end-crystals.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals MC-108513 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 75a02252f398b3d16f8588693e71f779d7fa062a..f2981aa82c26d7bdac08f45818813025b240b77e 100644 +index 57929ffa8e992874089ee30d8a96eeb03d754816..31be320d7d4cf8659d2d4281186b3f0d424a99e1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -714,5 +714,10 @@ public class PaperWorldConfig { +@@ -745,5 +745,10 @@ public class PaperWorldConfig { private void fixItemsMergingThroughWalls() { fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls); } diff --git a/patches/server/0692-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0693-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/server/0692-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0693-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/server/0693-Reset-villager-inventory-on-cancelled-pickup-event.patch b/patches/server/0694-Reset-villager-inventory-on-cancelled-pickup-event.patch similarity index 100% rename from patches/server/0693-Reset-villager-inventory-on-cancelled-pickup-event.patch rename to patches/server/0694-Reset-villager-inventory-on-cancelled-pickup-event.patch diff --git a/patches/server/0694-Fix-dangerous-end-portal-logic.patch b/patches/server/0695-Fix-dangerous-end-portal-logic.patch similarity index 100% rename from patches/server/0694-Fix-dangerous-end-portal-logic.patch rename to patches/server/0695-Fix-dangerous-end-portal-logic.patch diff --git a/patches/server/0695-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0696-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/server/0695-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0696-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/server/0696-Make-item-validations-configurable.patch b/patches/server/0697-Make-item-validations-configurable.patch similarity index 100% rename from patches/server/0696-Make-item-validations-configurable.patch rename to patches/server/0697-Make-item-validations-configurable.patch diff --git a/patches/server/0697-Add-more-line-of-sight-methods.patch b/patches/server/0698-Add-more-line-of-sight-methods.patch similarity index 100% rename from patches/server/0697-Add-more-line-of-sight-methods.patch rename to patches/server/0698-Add-more-line-of-sight-methods.patch diff --git a/patches/server/0698-add-per-world-spawn-limits.patch b/patches/server/0699-add-per-world-spawn-limits.patch similarity index 94% rename from patches/server/0698-add-per-world-spawn-limits.patch rename to patches/server/0699-add-per-world-spawn-limits.patch index a828305722..4bfb3570ac 100644 --- a/patches/server/0698-add-per-world-spawn-limits.patch +++ b/patches/server/0699-add-per-world-spawn-limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits Taken from #2982. Credit to Chasewhip8 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f2981aa82c26d7bdac08f45818813025b240b77e..974fba89648399919802dc4c11846601d2923712 100644 +index 31be320d7d4cf8659d2d4281186b3f0d424a99e1..cc2d40ba72a904baf2c39cd011cf7e1c746b2ca9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -605,6 +605,19 @@ public class PaperWorldConfig { +@@ -602,6 +602,19 @@ public class PaperWorldConfig { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } diff --git a/patches/server/0699-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0700-Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 100% rename from patches/server/0699-Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/0700-Fix-PotionSplashEvent-for-water-splash-potions.patch diff --git a/patches/server/0700-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch b/patches/server/0701-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch similarity index 100% rename from patches/server/0700-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch rename to patches/server/0701-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch