diff --git a/patches/server/Add-Unix-domain-socket-support.patch b/patches/server/Add-Unix-domain-socket-support.patch index 8242494a91..5d355b6e3f 100644 --- a/patches/server/Add-Unix-domain-socket-support.patch +++ b/patches/server/Add-Unix-domain-socket-support.patch @@ -38,12 +38,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + java.net.SocketAddress bindAddress; + if (this.getLocalIp().startsWith("unix:")) { + if (!io.netty.channel.epoll.Epoll.isAvailable()) { -+ DedicatedServer.LOGGER.fatal("**** INVALID CONFIGURATION!"); -+ DedicatedServer.LOGGER.fatal("You are trying to use a Unix domain socket but you're not on a supported OS."); ++ DedicatedServer.LOGGER.error("**** INVALID CONFIGURATION!"); ++ DedicatedServer.LOGGER.error("You are trying to use a Unix domain socket but you're not on a supported OS."); + return false; + } else if (!com.destroystokyo.paper.PaperConfig.velocitySupport && !org.spigotmc.SpigotConfig.bungee) { -+ DedicatedServer.LOGGER.fatal("**** INVALID CONFIGURATION!"); -+ DedicatedServer.LOGGER.fatal("Unix domain sockets require IPs to be forwarded from a proxy."); ++ DedicatedServer.LOGGER.error("**** INVALID CONFIGURATION!"); ++ DedicatedServer.LOGGER.error("Unix domain sockets require IPs to be forwarded from a proxy."); + return false; + } + bindAddress = new io.netty.channel.unix.DomainSocketAddress(this.getLocalIp().substring("unix:".length())); diff --git a/patches/server/Add-velocity-warnings.patch b/patches/server/Add-velocity-warnings.patch index 622fe906c8..f7fa993bbd 100644 --- a/patches/server/Add-velocity-warnings.patch +++ b/patches/server/Add-velocity-warnings.patch @@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); + // Paper start - Warn server owners when plugins try to set super high velocities -+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) { ++ if (!(this instanceof org.bukkit.entity.Projectile || this instanceof org.bukkit.entity.Minecart) && isUnsafeVelocity(velocity)) { + CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ")."); + } + // Paper end diff --git a/patches/server/Added-ServerResourcesReloadedEvent.patch b/patches/server/Added-ServerResourcesReloadedEvent.patch index 73f74c5b9b..78f6dbd2a0 100644 --- a/patches/server/Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/Added-ServerResourcesReloadedEvent.patch @@ -15,14 +15,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - add cause + @Deprecated public CompletableFuture reloadResources(Collection dataPacks) { -- RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess(); + return this.reloadResources(dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN); + } + public CompletableFuture reloadResources(Collection dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause) { + // Paper end + RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess(); CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error - PackRepository resourcepackrepository = this.packRepository; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null; Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); -+<<<<<<< HEAD - 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)); + Codec> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes -+>>>>>>> Anti-Xray for (int i = 0; i < cs.length; i++) { CompoundTag data = new CompoundTag(); @@ -1593,12 +1590,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 empty[i] = true; if (biome != null) { -+<<<<<<< HEAD - biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); -+======= -+ Registry iregistry = world.getHandle().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); -+ biome[i] = new PalettedContainer<>(iregistry, iregistry.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes -+>>>>>>> Anti-Xray +- biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES); ++ biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes } } diff --git a/patches/server/Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch index 341009953d..115fc64b50 100644 --- a/patches/server/Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch +++ b/patches/server/Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch @@ -13,16 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 boolean[] sectionEmpty = new boolean[cs.length]; PalettedContainer>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null; -+<<<<<<< HEAD - Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); - <<<<<<< HEAD - Codec>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS)); - ======= - Codec> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes - >>>>>>> Anti-Xray -+======= -+>>>>>>> Fix ChunkSnapshot#isSectionEmpty(int) and optimize PalettedContainer copying by not using codecs - +- Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); +- Codec> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes +- for (int i = 0; i < cs.length; i++) { - CompoundTag data = new CompoundTag(); diff --git a/patches/server/Fix-and-optimise-world-force-upgrading.patch b/patches/server/Fix-and-optimise-world-force-upgrading.patch index 29f9fcdeeb..79cdbcaa29 100644 --- a/patches/server/Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/Fix-and-optimise-world-force-upgrading.patch @@ -297,7 +297,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - fix and optimise world upgrading + if (options.has("forceUpgrade")) { + net.minecraft.server.Main.convertWorldButItWorks( -+ dimensionKey, Level.getDimensionKey(dimensionmanager), worldSession, DataFixers.getDataFixer(), chunkgenerator.getTypeNameForDataFixer(), options.has("eraseCache") ++ dimensionKey, Level.getDimensionKey(holder.value()), worldSession, DataFixers.getDataFixer(), chunkgenerator.getTypeNameForDataFixer(), options.has("eraseCache") + ); + } + // Paper end - fix and optimise world upgrading diff --git a/patches/server/Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 4dd397fe5e..54cde8c1ad 100644 --- a/patches/server/Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -964,8 +964,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + @Override -+ public boolean canStandOnFluid(final FluidState state, final FlowingFluid fluid) { -+ return this.getDelegate().canStandOnFluid(state, fluid); ++ public boolean canStandOnFluid(final FluidState state, final FluidState fluidState) { ++ return this.getDelegate().canStandOnFluid(state, fluidState); + } + } + diff --git a/patches/server/Not-implemeneted.patch b/patches/server/Not-implemeneted.patch index 9eeaaa3c3b..bf42d659fd 100644 --- a/patches/server/Not-implemeneted.patch +++ b/patches/server/Not-implemeneted.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public static void ensureTickThread(final String reason) { + if (!Bukkit.isPrimaryThread()) { -+ MinecraftServer.LOGGER.fatal("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); ++ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + }