diff --git a/patches/unapplied/server/Add-effect-to-block-break-naturally.patch b/patches/server/Add-effect-to-block-break-naturally.patch similarity index 100% rename from patches/unapplied/server/Add-effect-to-block-break-naturally.patch rename to patches/server/Add-effect-to-block-break-naturally.patch diff --git a/patches/unapplied/server/Add-option-to-disable-pillager-patrols.patch b/patches/server/Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/unapplied/server/Add-option-to-disable-pillager-patrols.patch rename to patches/server/Add-option-to-disable-pillager-patrols.patch diff --git a/patches/unapplied/server/Anti-Xray.patch b/patches/server/Anti-Xray.patch similarity index 91% rename from patches/unapplied/server/Anti-Xray.patch rename to patches/server/Anti-Xray.patch index 7eba3f21c..c0db4db1b 100644 --- a/patches/unapplied/server/Anti-Xray.patch +++ b/patches/server/Anti-Xray.patch @@ -1190,14 +1190,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { - // Add env and gen to constructor, WorldData -> WorldDataServer - public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey resourcekey, Holder holder, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { + public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { + // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error -- super(iworlddataserver, resourcekey, holder, minecraftserver::getProfiler, false, flag, i, gen, biomeProvider, env); -+ super(iworlddataserver, resourcekey, holder, minecraftserver::getProfiler, false, flag, i, gen, biomeProvider, env, executor); // Paper - Async-Anti-Xray - Pass executor +- super(iworlddataserver, resourcekey, worlddimension.typeHolder(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env); ++ super(iworlddataserver, resourcekey, worlddimension.typeHolder(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, executor); // Paper - Async-Anti-Xray - Pass executor this.pvpMode = minecraftserver.isPvpAllowed(); this.convertable = convertable_conversionsession; - this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelPath.toFile()); + this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -1219,7 +1219,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.level.chunkPacketBlockController.onPlayerLeftClickBlock(this, pos, action, direction, worldHeight); // Paper - Anti-Xray } - public void destroyAndAck(BlockPos pos, ServerboundPlayerActionPacket.Action action, String reason) { + public void destroyAndAck(BlockPos pos, int sequence, 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Level.java @@ -1236,8 +1236,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public abstract ResourceKey getTypeKey(); -- protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) { -+ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor +- protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) { ++ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor 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.generator = gen; @@ -1305,7 +1305,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public static int getBottomBlockY(int chunkPos) { @@ -0,0 +0,0 @@ public class LevelChunkSection { - this.biomes.read(buf); + this.biomes = datapaletteblock; } - public void write(FriendlyByteBuf buf) { @@ -1325,7 +1325,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer return 0; }; public final IdMap registry; @@ -1333,22 +1333,46 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private volatile PalettedContainer.Data data; private final PalettedContainer.Strategy strategy; private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer this.threadingDetector.checkAndUnlock(); } -- public static Codec> codec(IdMap idList, Codec entryCodec, PalettedContainer.Strategy provider, T object) { -+ // Paper start - Anti-Xray - Add preset values -+ @Deprecated public static Codec> codec(IdMap idList, Codec entryCodec, PalettedContainer.Strategy provider, T object) { return PalettedContainer.codec(idList, entryCodec, provider, object, null); } // Notice for updates: Please make sure this function isn't used anywhere -+ public static Codec> codec(IdMap idList, Codec entryCodec, PalettedContainer.Strategy provider, T object, T @org.jetbrains.annotations.Nullable [] presetValues) { - return RecordCodecBuilder.>create((instance) -> { // Paper - decompile fix - return instance.group(entryCodec.mapResult(ExtraCodecs.orElsePartial(object)).listOf().fieldOf("palette").forGetter(PalettedContainer.DiscData::paletteEntries), Codec.LONG_STREAM.optionalFieldOf("data").forGetter(PalettedContainer.DiscData::storage)).apply(instance, PalettedContainer.DiscData::new); - }).comapFlatMap((serialized) -> { -- return read(idList, provider, serialized); -+ return read(idList, provider, serialized, object, presetValues); -+ // Paper end - }, (container) -> { - return container.write(idList, provider); +- public static Codec> codecRW(IdMap idMap, Codec codec, PalettedContainer.Strategy strategy, T object) { +- PalettedContainerRO.Unpacker> unpacker = PalettedContainer::unpack; +- return codec(idMap, codec, strategy, object, unpacker); ++ // Paper start ++ public interface UnpackerPaper> { ++ DataResult read(IdMap idMap, PalettedContainer.Strategy strategy, PalettedContainerRO.PackedData packedData, T defaultValue, T @org.jetbrains.annotations.Nullable [] presetValues); + } ++ // Paper end + +- public static Codec> codecRO(IdMap idMap, Codec codec, PalettedContainer.Strategy strategy, T object) { +- PalettedContainerRO.Unpacker> unpacker = (idMapx, strategyx, packedData) -> { +- return unpack(idMapx, strategyx, packedData).map((palettedContainer) -> { ++ public static Codec> codecRW(IdMap idMap, Codec codec, PalettedContainer.Strategy strategy, T object, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - add preset values, paper unpacker ++ UnpackerPaper> unpacker = PalettedContainer::unpack; // Paper - add preset values, paper unpacker ++ return codec(idMap, codec, strategy, object, unpacker, presetValues); // Paper - add preset values, paper unpacker ++ } ++ ++ public static Codec> codecRO(IdMap idMap, Codec codec, PalettedContainer.Strategy strategy, T object) { // Paper - add preset values, paper unpacker ++ UnpackerPaper> unpacker = (idMapx, strategyx, packedData, object2, presetvalues) -> { // Paper - add preset values, paper unpacker ++ return unpack(idMapx, strategyx, packedData, object, presetvalues).map((palettedContainer) -> { // Paper - add preset values, paper unpacker + return palettedContainer; + }); + }; +- return codec(idMap, codec, strategy, object, unpacker); ++ return codec(idMap, codec, strategy, object, unpacker, null); // Paper - add preset values, paper unpacker + } + +- private static > Codec codec(IdMap idMap, Codec entryCodec, PalettedContainer.Strategy provider, T object, PalettedContainerRO.Unpacker unpacker) { ++ private static > Codec codec(IdMap idMap, Codec entryCodec, PalettedContainer.Strategy provider, T object, UnpackerPaper unpacker, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - add preset values, paper unpacker + return RecordCodecBuilder.>create((instance) -> { // Paper - decompile fix + return instance.group(entryCodec.mapResult(ExtraCodecs.orElsePartial(object)).listOf().fieldOf("palette").forGetter(PalettedContainerRO.PackedData::paletteEntries), Codec.LONG_STREAM.optionalFieldOf("data").forGetter(PalettedContainerRO.PackedData::storage)).apply(instance, PalettedContainerRO.PackedData::new); + }).comapFlatMap((packedData) -> { +- return unpacker.read(idMap, provider, packedData); ++ return unpacker.read(idMap, provider, packedData, object ,presetValues); // Paper - add preset values + }, (palettedContainerRO) -> { + return palettedContainerRO.pack(idMap, provider); }); } @@ -1404,7 +1428,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.strategy = paletteProvider; this.registry = idList; this.data = this.createOrReuseData((PalettedContainer.Data)null, 0); -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @Override public int onResize(int newBits, T object) { PalettedContainer.Data data = this.data; @@ -1439,7 +1463,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public T getAndSet(int x, int y, int z, T value) { this.acquire(); -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer data.palette.read(buf); buf.readLongArray(data.storage.getRaw()); this.data = data; @@ -1450,9 +1474,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } +- @Override - public void write(FriendlyByteBuf buf) { + // Paper start - Anti-Xray - Add chunk packet info -+ @Deprecated public void write(FriendlyByteBuf buf) { this.write(buf, null, 0); } // Notice for updates: Please make sure this method isn't used anywhere ++ @Override @Deprecated public void write(FriendlyByteBuf buf) { this.write(buf, null, 0); } // Notice for updates: Please make sure this method isn't used anywhere + public void write(FriendlyByteBuf buf, @Nullable com.destroystokyo.paper.antixray.ChunkPacketInfo chunkPacketInfo, int bottomBlockY) { this.acquire(); @@ -1472,30 +1497,30 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } -- private static DataResult> read(IdMap idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData serialized) { -+ private static DataResult> read(IdMap idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData serialized, T defaultValue, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - Anti-Xray - Add preset values - List list = serialized.paletteEntries(); - int i = provider.size(); - int j = provider.calculateBitsForSerialization(idList, list.size()); -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { +- private static DataResult> unpack(IdMap idMap, PalettedContainer.Strategy strategy, PalettedContainerRO.PackedData packedData) { ++ private static DataResult> unpack(IdMap idMap, PalettedContainer.Strategy strategy, PalettedContainerRO.PackedData packedData, T defaultValue, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - Anti-Xray - Add preset values) { + List list = packedData.paletteEntries(); + int i = strategy.size(); + int j = strategy.calculateBitsForSerialization(idMap, list.size()); +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } } -- return DataResult.success(new PalettedContainer<>(idList, provider, configuration, bitStorage, list)); -+ return DataResult.success(new PalettedContainer<>(idList, provider, configuration, bitStorage, list, defaultValue, presetValues)); // Paper - Anti-Xray - Add preset values +- return DataResult.success(new PalettedContainer<>(idMap, strategy, configuration, bitStorage, list)); ++ return DataResult.success(new PalettedContainer<>(idMap, strategy, configuration, bitStorage, list, defaultValue, presetValues)); // Paper - Anti-Xray - Add preset values } - private PalettedContainer.DiscData write(IdMap idList, PalettedContainer.Strategy provider) { -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { + @Override +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } public PalettedContainer copy() { -- return new PalettedContainer<>(this.registry, this.strategy, new PalettedContainer.Data<>(this.data.configuration(), this.data.storage().copy(), this.data.palette().copy())); -+ return new PalettedContainer<>(this.registry, this.strategy, new PalettedContainer.Data<>(this.data.configuration(), this.data.storage().copy(), this.data.palette().copy()), this.presetValues); // Paper - Anti-Xray - Add preset values +- return new PalettedContainer<>(this.registry, this.strategy, this.data.copy()); ++ return new PalettedContainer<>(this.registry, this.strategy, this.data.copy(), this.presetValues); // Paper - Anti-Xray - Add preset values } - public void count(PalettedContainer.CountConsumer counter) { -@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize { + @Override +@@ -0,0 +0,0 @@ public class PalettedContainer implements PaletteResize, PalettedContainer return 1 + this.palette.getSerializedSize() + FriendlyByteBuf.getVarIntSize(this.storage.getSize()) + this.storage.getRaw().length * 8; } @@ -1516,7 +1541,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + buf.writeLongArray(this.storage.getRaw()); } - } + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -1525,8 +1550,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public class ChunkSerializer { -- public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); -+ public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null); // Paper - Anti-Xray - Add preset block states +- public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); ++ public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null); // Paper - Anti-Xray - Add preset block states private static final Logger LOGGER = LogUtils.getLogger(); private static final String TAG_UPGRADE_DATA = "UpgradeData"; private static final String BLOCK_TICKS_TAG = "block_ticks"; @@ -1539,7 +1564,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (nbttagcompound1.contains("block_states", 10)) { - dataresult = ChunkSerializer.BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, nbttagcompound1.getCompound("block_states")).promotePartial((s) -> { -+ Codec> blockStateCodec = presetBlockStates == null ? ChunkSerializer.BLOCK_STATE_CODEC : PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), presetBlockStates); ++ Codec> blockStateCodec = presetBlockStates == null ? ChunkSerializer.BLOCK_STATE_CODEC : PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), presetBlockStates); + dataresult = blockStateCodec.parse(NbtOps.INSTANCE, nbttagcompound1.getCompound("block_states")).promotePartial((s) -> { ChunkSerializer.logErrors(chunkPos, b0, s); }); @@ -1552,25 +1577,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end } - PalettedContainer datapaletteblock1; + PalettedContainer object; // CraftBukkit - read/write @@ -0,0 +0,0 @@ public class ChunkSerializer { Objects.requireNonNull(logger); - datapaletteblock1 = (PalettedContainer) ((DataResult>>) dataresult).getOrThrow(false, logger::error); // CraftBukkit - decompile error + object = ((DataResult>>) dataresult).getOrThrow(false, logger::error); // CraftBukkit - decompile error } else { -- datapaletteblock1 = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); -+ datapaletteblock1 = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes); +- object = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); ++ object = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes } - LevelChunkSection chunksection = new LevelChunkSection(b0, datapaletteblock, datapaletteblock1); + LevelChunkSection chunksection = new LevelChunkSection(b0, datapaletteblock, (PalettedContainer) object); // CraftBukkit - read/write @@ -0,0 +0,0 @@ public class ChunkSerializer { - } - private static Codec>> makeBiomeCodec(Registry biomeRegistry) { -- return PalettedContainer.codec(biomeRegistry.asHolderIdMap(), biomeRegistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomeRegistry.getHolderOrThrow(Biomes.PLAINS)); -+ return PalettedContainer.codec(biomeRegistry.asHolderIdMap(), biomeRegistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomeRegistry.getHolderOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes + // CraftBukkit start - read/write + private static Codec>> makeBiomeCodecRW(Registry iregistry) { +- return PalettedContainer.codecRW(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS)); ++ return PalettedContainer.codecRW(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes } + // CraftBukkit end - public static CompoundTag write(ServerLevel world, ChunkAccess chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -1584,15 +1609,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private static final byte[] emptyLight = new byte[2048]; public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { -@@ -0,0 +0,0 @@ public class CraftChunk implements Chunk { - PalettedContainer>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null; - - Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); -- Codec>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS)); -+ Codec>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes - - for (int i = 0; i < cs.length; i++) { - CompoundTag data = new CompoundTag(); @@ -0,0 +0,0 @@ public class CraftChunk implements Chunk { empty[i] = true; diff --git a/patches/unapplied/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/Dont-send-unnecessary-sign-update.patch b/patches/server/Dont-send-unnecessary-sign-update.patch similarity index 100% rename from patches/unapplied/server/Dont-send-unnecessary-sign-update.patch rename to patches/server/Dont-send-unnecessary-sign-update.patch diff --git a/patches/unapplied/server/Duplicate-UUID-Resolve-Option.patch b/patches/server/Duplicate-UUID-Resolve-Option.patch similarity index 100% rename from patches/unapplied/server/Duplicate-UUID-Resolve-Option.patch rename to patches/server/Duplicate-UUID-Resolve-Option.patch diff --git a/patches/unapplied/server/Entity-Activation-Range-2.0.patch b/patches/server/Entity-Activation-Range-2.0.patch similarity index 100% rename from patches/unapplied/server/Entity-Activation-Range-2.0.patch rename to patches/server/Entity-Activation-Range-2.0.patch diff --git a/patches/unapplied/server/Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/patches/server/Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 100% rename from patches/unapplied/server/Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to patches/server/Fix-AssertionError-when-player-hand-set-to-empty-typ.patch diff --git a/patches/unapplied/server/Fix-Light-Command.patch b/patches/server/Fix-Light-Command.patch similarity index 100% rename from patches/unapplied/server/Fix-Light-Command.patch rename to patches/server/Fix-Light-Command.patch diff --git a/patches/unapplied/server/Fix-MC-158900.patch b/patches/server/Fix-MC-158900.patch similarity index 91% rename from patches/unapplied/server/Fix-MC-158900.patch rename to patches/server/Fix-MC-158900.patch index 20f82d117..f6d0c55b4 100644 --- a/patches/unapplied/server/Fix-MC-158900.patch +++ b/patches/server/Fix-MC-158900.patch @@ -21,5 +21,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (getBans().isBanned(gameprofile) && (gameprofilebanentry = getBans().get(gameprofile)) != null) { + // Paper end - chatmessage = new TranslatableComponent("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()}); + ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason()); if (gameprofilebanentry.getExpires() != null) { diff --git a/patches/unapplied/server/Fix-items-not-falling-correctly.patch b/patches/server/Fix-items-not-falling-correctly.patch similarity index 100% rename from patches/unapplied/server/Fix-items-not-falling-correctly.patch rename to patches/server/Fix-items-not-falling-correctly.patch diff --git a/patches/unapplied/server/Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/server/Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from patches/unapplied/server/Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to patches/server/Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/patches/unapplied/server/Flat-bedrock-generator-settings.patch b/patches/server/Flat-bedrock-generator-settings.patch similarity index 77% rename from patches/unapplied/server/Flat-bedrock-generator-settings.patch rename to patches/server/Flat-bedrock-generator-settings.patch index 3ffcc6045..27a35cbf0 100644 --- a/patches/unapplied/server/Flat-bedrock-generator-settings.patch +++ b/patches/server/Flat-bedrock-generator-settings.patch @@ -33,21 +33,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // isRoof = true if roof, false if floor + public record PaperBedrockConditionSource(net.minecraft.resources.ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove, boolean isRoof) implements SurfaceRules.ConditionSource { + -+ public static final com.mojang.serialization.Codec CODEC = com.mojang.serialization.codecs.RecordCodecBuilder.create((instance) -> { ++ public static final net.minecraft.util.KeyDispatchDataCodec CODEC = net.minecraft.util.KeyDispatchDataCodec.of(com.mojang.serialization.codecs.RecordCodecBuilder.mapCodec((instance) -> { + return instance.group( + net.minecraft.resources.ResourceLocation.CODEC.fieldOf("random_name").forGetter(PaperBedrockConditionSource::randomName), + VerticalAnchor.CODEC.fieldOf("true_at_and_below").forGetter(PaperBedrockConditionSource::trueAtAndBelow), + VerticalAnchor.CODEC.fieldOf("false_at_and_above").forGetter(PaperBedrockConditionSource::falseAtAndAbove), + com.mojang.serialization.Codec.BOOL.fieldOf("roof").forGetter(PaperBedrockConditionSource::isRoof) + ).apply(instance, PaperBedrockConditionSource::new); -+ }); ++ })); + + public PaperBedrockConditionSource(String randomName, net.minecraft.world.level.levelgen.VerticalAnchor trueAtAndBelow, net.minecraft.world.level.levelgen.VerticalAnchor falseAtAndAbove, boolean invert) { + this(new net.minecraft.resources.ResourceLocation(randomName), trueAtAndBelow, falseAtAndAbove, invert); + } + + @Override -+ public com.mojang.serialization.Codec codec() { ++ public net.minecraft.util.KeyDispatchDataCodeccodec() { + return CODEC; + } + @@ -60,7 +60,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int y = isRoof ? Math.max(falseAtY, trueAtY) - 1 : Math.min(falseAtY, trueAtY) ; + final int i = hasFlatBedrock ? y : trueAtY; + final int j = hasFlatBedrock ? y : falseAtY; -+ final net.minecraft.world.level.levelgen.PositionalRandomFactory positionalRandomFactory = context.system.getOrCreateRandomFactory(this.randomName()); ++ // TODO access transformer for randomState ++ final net.minecraft.world.level.levelgen.PositionalRandomFactory positionalRandomFactory = context.randomState.getOrCreateRandomFactory(this.randomName()); + + class VerticalGradientCondition extends SurfaceRules.LazyYCondition { + VerticalGradientCondition(SurfaceRules.Context context) { @@ -76,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return false; + } else { + double d = net.minecraft.util.Mth.map((double) y, (double) i, (double) j, 1.0D, 0.0D); -+ net.minecraft.world.level.levelgen.RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, i, this.context.blockZ); ++ net.minecraft.util.RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, i, this.context.blockZ); + return (double) randomSource.nextFloat() < d; + } + } @@ -91,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 SurfaceRules.ConditionSource conditionSource = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(97), 2); SurfaceRules.ConditionSource conditionSource2 = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(256), 0); @@ -0,0 +0,0 @@ public class SurfaceRuleData { - SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource6), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, TERRACOTTA), SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource10), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource8, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource9, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource13, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3))); + SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource18, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource7), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.MANGROVE_SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource7), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.ifTrue(conditionSource18, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource8, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource11), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource10, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource7, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource10, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource8, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource12, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource9, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource12, SurfaceRules.ifTrue(conditionSource11, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource15, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3))); ImmutableList.Builder builder = ImmutableList.builder(); if (bedrockRoof) { - builder.add(SurfaceRules.ifTrue(SurfaceRules.not(SurfaceRules.verticalGradient("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top())), BEDROCK)); @@ -118,9 +119,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/Bootstrap.java +++ b/src/main/java/net/minecraft/server/Bootstrap.java @@ -0,0 +0,0 @@ public class Bootstrap { + EntitySelectorOptions.bootStrap(); DispenseItemBehavior.bootStrap(); CauldronInteraction.bootStrap(); - ArgumentTypes.bootStrap(); + Registry.register(net.minecraft.core.Registry.CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC); // Paper - register custom flat bedrock thing. TODO is this the best place to do this? Registry.freezeBuiltins(); Bootstrap.wrapStreams(); @@ -131,20 +132,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java @@ -0,0 +0,0 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { @Override - public void buildSurface(WorldGenRegion region, StructureFeatureManager structures, ChunkAccess chunk) { + public void buildSurface(WorldGenRegion region, StructureManager structures, RandomState noiseConfig, ChunkAccess chunk) { if (!SharedConstants.debugVoidTerrain(chunk.getPos())) { - WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region); + WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region, region.getMinecraftWorld()); // Paper - NoiseGeneratorSettings generatorsettingbase = (NoiseGeneratorSettings) this.settings.value(); - NoiseChunk noisechunk = chunk.getOrCreateNoiseChunk(this.router, () -> { - return new Beardifier(structures, chunk); + + this.buildSurface(chunk, worldgenerationcontext, noiseConfig, structures, region.getBiomeManager(), region.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), Blender.of(region)); + } @@ -0,0 +0,0 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { - return new Beardifier(structureAccessor, chunk); - }, (NoiseGeneratorSettings) this.settings.value(), this.globalFluidPicker, Blender.of(chunkRegion)); + return this.createNoiseChunk(ichunkaccess1, structureAccessor, Blender.of(chunkRegion), noiseConfig); + }); Aquifer aquifer = noisechunk.aquifer(); -- CarvingContext carvingcontext = new CarvingContext(this, chunkRegion.registryAccess(), chunk.getHeightAccessorForGeneration(), noisechunk); -+ CarvingContext carvingcontext = new CarvingContext(this, chunkRegion.registryAccess(), chunk.getHeightAccessorForGeneration(), noisechunk, chunkRegion.getMinecraftWorld()); // Paper - CarvingMask carvingmask = ((ProtoChunk) chunk).getOrCreateCarvingMask(generationStep); +- CarvingContext carvingcontext = new CarvingContext(this, chunkRegion.registryAccess(), chunk.getHeightAccessorForGeneration(), noisechunk, noiseConfig, ((NoiseGeneratorSettings) this.settings.value()).surfaceRule()); ++ CarvingContext carvingcontext = new CarvingContext(this, chunkRegion.registryAccess(), chunk.getHeightAccessorForGeneration(), noisechunk, noiseConfig, ((NoiseGeneratorSettings) this.settings.value()).surfaceRule(), chunkRegion.getMinecraftWorld()); // Paper + CarvingMask carvingmask = ((ProtoChunk) chunk).getOrCreateCarvingMask(carverStep); for (int j = -8; j <= 8; ++j) { diff --git a/src/main/java/net/minecraft/world/level/levelgen/WorldGenerationContext.java b/src/main/java/net/minecraft/world/level/levelgen/WorldGenerationContext.java @@ -185,16 +186,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/levelgen/carver/CarvingContext.java +++ b/src/main/java/net/minecraft/world/level/levelgen/carver/CarvingContext.java @@ -0,0 +0,0 @@ public class CarvingContext extends WorldGenerationContext { - private final RegistryAccess registryAccess; - private final NoiseChunk noiseChunk; + private final RandomState randomState; + private final SurfaceRules.RuleSource surfaceRule; -- public CarvingContext(NoiseBasedChunkGenerator chunkGenerator, RegistryAccess registryManager, LevelHeightAccessor heightLimitView, NoiseChunk chunkNoiseSampler) { -- super(chunkGenerator, heightLimitView); -+ public CarvingContext(NoiseBasedChunkGenerator chunkGenerator, RegistryAccess registryManager, LevelHeightAccessor heightLimitView, NoiseChunk chunkNoiseSampler, @org.jetbrains.annotations.Nullable net.minecraft.world.level.Level level) { // Paper -+ super(chunkGenerator, heightLimitView, level); // Paper - this.generator = chunkGenerator; +- public CarvingContext(NoiseBasedChunkGenerator noiseChunkGenerator, RegistryAccess registryManager, LevelHeightAccessor heightLimitView, NoiseChunk chunkNoiseSampler, RandomState noiseConfig, SurfaceRules.RuleSource materialRule) { +- super(noiseChunkGenerator, heightLimitView); ++ public CarvingContext(NoiseBasedChunkGenerator noiseChunkGenerator, RegistryAccess registryManager, LevelHeightAccessor heightLimitView, NoiseChunk chunkNoiseSampler, RandomState noiseConfig, SurfaceRules.RuleSource materialRule, @javax.annotation.Nullable net.minecraft.world.level.Level level) { // Paper ++ super(noiseChunkGenerator, heightLimitView, level); // Paper this.registryAccess = registryManager; this.noiseChunk = chunkNoiseSampler; + this.randomState = noiseConfig; diff --git a/src/main/java/net/minecraft/world/level/levelgen/placement/PlacementContext.java b/src/main/java/net/minecraft/world/level/levelgen/placement/PlacementContext.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/placement/PlacementContext.java diff --git a/patches/unapplied/server/Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from patches/unapplied/server/Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/patches/unapplied/server/Increase-Light-Queue-Size.patch b/patches/server/Increase-Light-Queue-Size.patch similarity index 100% rename from patches/unapplied/server/Increase-Light-Queue-Size.patch rename to patches/server/Increase-Light-Queue-Size.patch diff --git a/patches/unapplied/server/Lag-compensate-eating.patch b/patches/server/Lag-compensate-eating.patch similarity index 100% rename from patches/unapplied/server/Lag-compensate-eating.patch rename to patches/server/Lag-compensate-eating.patch diff --git a/patches/unapplied/server/MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/Optimise-IEntityAccess-getPlayerByUUID.patch b/patches/server/Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 69% rename from patches/unapplied/server/Optimise-IEntityAccess-getPlayerByUUID.patch rename to patches/server/Optimise-IEntityAccess-getPlayerByUUID.patch index 09794d2f8..c012410f7 100644 --- a/patches/unapplied/server/Optimise-IEntityAccess-getPlayerByUUID.patch +++ b/patches/server/Optimise-IEntityAccess-getPlayerByUUID.patch @@ -21,6 +21,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end + - // Add env and gen to constructor, WorldData -> WorldDataServer - public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey resourcekey, Holder holder, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { - // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error + // Add env and gen to constructor, IWorldDataServer -> WorldDataServer + public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { + // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error diff --git a/patches/unapplied/server/Optimize-Hoppers.patch b/patches/server/Optimize-Hoppers.patch similarity index 100% rename from patches/unapplied/server/Optimize-Hoppers.patch rename to patches/server/Optimize-Hoppers.patch diff --git a/patches/unapplied/server/Optimize-call-to-getFluid-for-explosions.patch b/patches/server/Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from patches/unapplied/server/Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/Optimize-call-to-getFluid-for-explosions.patch diff --git a/patches/unapplied/server/PlayerDeathEvent-shouldDropExperience.patch b/patches/server/PlayerDeathEvent-shouldDropExperience.patch similarity index 100% rename from patches/unapplied/server/PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/PlayerDeathEvent-shouldDropExperience.patch diff --git a/patches/unapplied/server/Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from patches/unapplied/server/Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/patches/unapplied/server/Prevent-consuming-the-wrong-itemstack.patch b/patches/server/Prevent-consuming-the-wrong-itemstack.patch similarity index 100% rename from patches/unapplied/server/Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/Prevent-consuming-the-wrong-itemstack.patch diff --git a/patches/unapplied/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/unapplied/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/unapplied/server/offset-item-frame-ticking.patch b/patches/server/offset-item-frame-ticking.patch similarity index 100% rename from patches/unapplied/server/offset-item-frame-ticking.patch rename to patches/server/offset-item-frame-ticking.patch