Skip to content

Commit

Permalink
Fix crash when generating swamp structure
Browse files Browse the repository at this point in the history
Need to implement structureManager on CB's DelegatedGeneratorAccess,
as that is now used during population.
  • Loading branch information
Spottedleaf committed Oct 7, 2023
1 parent 8cde60d commit 905cf0b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions patches/server/0003-Threaded-Regions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 905cf0b

Please sign in to comment.