Skip to content

Commit

Permalink
fix borders on the edge of chunks being cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixaurora committed Oct 11, 2023
1 parent f5b68d1 commit c847c00
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;

import com.google.common.cache.CacheBuilder;
Expand Down Expand Up @@ -122,7 +123,7 @@ public Codec<? extends ChunkGenerator> codec() {
public CompletableFuture<ChunkAccess> fillFromNoise(
Executor executor, Blender blender, RandomState randomState, StructureManager structureManager, ChunkAccess chunk
) {
GeneratorLookup generatorsForChunk = this.getGenerators(chunk).atBiomeScale();
GeneratorLookup generatorsForChunk = this.getGenerators(chunk);

if (generatorsForChunk.size() == 1) {
return generatorsForChunk.getDefault().fillFromNoise(executor, blender, randomState, structureManager, chunk);
Expand All @@ -131,7 +132,7 @@ public CompletableFuture<ChunkAccess> fillFromNoise(
CompletableFuture<ChunkAccess> placeholderFuture = new CompletableFuture<>();
CompletableFuture<ChunkAccess> future = placeholderFuture;

for(PlacementSelection selection : this.getGenerators(chunk).getAllSelections()) {
for(PlacementSelection selection : generatorsForChunk.getAllSelections()) {
future = future.thenCompose(
access -> selection.getUsedGenerator().fillFromNoise(
executor,
Expand Down

0 comments on commit c847c00

Please sign in to comment.