Skip to content

Commit

Permalink
Fix infinite loop when applying biome decoration using the bukkit chu…
Browse files Browse the repository at this point in the history
…nk generator, fixes #238
  • Loading branch information
JustRed23 committed May 12, 2024
1 parent fbcb335 commit 1627e7e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ public void applyBiomeDecoration(WorldGenLevel generatoraccessseed, ChunkAccess
int z = ichunkaccess.getPos().z;

random.setSeed(Mth.getSeed(x, "should-decoration".hashCode(), z) ^ generatoraccessseed.getSeed());
super.applyBiomeDecoration(generatoraccessseed, ichunkaccess, structuremanager, generator.shouldGenerateDecorations(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z));
//Ketting start - fix infinite loop
super.ketting$vanilla.getAndSet(generator.shouldGenerateDecorations(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z));
super.applyBiomeDecoration(generatoraccessseed, ichunkaccess, structuremanager);
//Ketting end
}

@Override
Expand Down

0 comments on commit 1627e7e

Please sign in to comment.