switch x and z ChunkGenerator params

This commit is contained in:
dfsek
2021-12-04 23:34:18 -07:00
parent 2fa8831c63
commit f46e285bc9
4 changed files with 4 additions and 6 deletions
@@ -57,8 +57,7 @@ public class NoiseChunkGenerator3D implements ChunkGenerator {
@Override @Override
@SuppressWarnings("try") @SuppressWarnings("try")
public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world, public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
int chunkZ, int chunkX, int chunkZ) {
int chunkX) {
try(ProfileFrame ignore = platform.getProfiler().profile("chunk_base_3d")) { try(ProfileFrame ignore = platform.getProfiler().profile("chunk_base_3d")) {
BiomeProvider grid = world.getBiomeProvider(); BiomeProvider grid = world.getBiomeProvider();
@@ -21,7 +21,7 @@ import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
public interface ChunkGenerator { public interface ChunkGenerator {
void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world, void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world,
int chunkZ, int chunkX); int chunkX, int chunkZ);
List<GenerationStage> getGenerationStages(); List<GenerationStage> getGenerationStages();
@@ -30,7 +30,6 @@ import java.util.List;
import java.util.Random; import java.util.Random;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.config.ConfigPack; import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.world.ServerWorld; import com.dfsek.terra.api.world.ServerWorld;
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator; import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
@@ -63,7 +62,7 @@ public class BukkitChunkGeneratorWrapper extends org.bukkit.generator.ChunkGener
this.world = Bukkit.getWorld(worldInfo.getUID()); this.world = Bukkit.getWorld(worldInfo.getUID());
this.terraWorld = new BukkitServerWorld(world); this.terraWorld = new BukkitServerWorld(world);
} }
delegate.generateChunkData(new BukkitProtoChunk(chunkData), terraWorld, z, x); delegate.generateChunkData(new BukkitProtoChunk(chunkData), terraWorld, x, z);
} }
@Override @Override
@@ -203,7 +203,7 @@ public class FabricChunkGeneratorWrapper extends net.minecraft.world.gen.chunk.C
public CompletableFuture<Chunk> populateNoise(Executor executor, Blender arg, StructureAccessor structureAccessor, Chunk chunk) { public CompletableFuture<Chunk> populateNoise(Executor executor, Blender arg, StructureAccessor structureAccessor, Chunk chunk) {
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {
ProtoWorld world = (ProtoWorld) ((StructureAccessorAccessor) structureAccessor).getWorld(); ProtoWorld world = (ProtoWorld) ((StructureAccessorAccessor) structureAccessor).getWorld();
delegate.generateChunkData((ProtoChunk) chunk, world, chunk.getPos().z, chunk.getPos().x); delegate.generateChunkData((ProtoChunk) chunk, world, chunk.getPos().x, chunk.getPos().z);
delegate.getGenerationStages().forEach(populator -> { delegate.getGenerationStages().forEach(populator -> {
if(populator instanceof Chunkified) { if(populator instanceof Chunkified) {
populator.populate(world); populator.populate(world);