From 905cf0b6bef5ccc3f2a79b976442978d02f97d05 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 6 Oct 2023 19:33:13 -0700 Subject: [PATCH] Fix crash when generating swamp structure Need to implement structureManager on CB's DelegatedGeneratorAccess, as that is now used during population. --- patches/server/0003-Threaded-Regions.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/patches/server/0003-Threaded-Regions.patch b/patches/server/0003-Threaded-Regions.patch index 8e02ec3..50b687b 100644 --- a/patches/server/0003-Threaded-Regions.patch +++ b/patches/server/0003-Threaded-Regions.patch @@ -22583,6 +22583,24 @@ index 96f6e0554baf5915dd1f5b93f3bcfe7a13393c29..17c5ef57bed41fca97b845f1f6d1752a if (pdf.getAPIVersion() != null) { int pluginIndex = CraftMagicNumbers.SUPPORTED_API.indexOf(pdf.getAPIVersion()); +diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +index cbedb6f002bc01daa16d349421c4ef04d4bcbcb2..2d708bb11f841bb265d12a025dbaa657b0b4d08a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +@@ -69,6 +69,13 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel { + this.handle = worldAccess; + } + ++ // Folia start - region threading ++ @Override ++ public net.minecraft.world.level.StructureManager structureManager() { ++ return this.handle.structureManager(); ++ } ++ // Folia end - region threading ++ + public WorldGenLevel getHandle() { + return this.handle; + } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java index 2f9e5a1adf9d67ffe18d95f2822ca3d2288fb27a..23ec7dd6fe49f33e9cac78fd084dc660fc5a2b2e 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java