mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
switch x and z ChunkGenerator params
This commit is contained in:
+1
-2
@@ -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();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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();
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -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
|
||||||
|
|||||||
+1
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user