fix fabric protoworld impl

This commit is contained in:
dfsek
2021-11-28 12:26:01 -07:00
parent 1e9e1dce75
commit a5947be122
2 changed files with 5 additions and 5 deletions
@@ -193,11 +193,11 @@ public class FabricChunkGeneratorWrapper extends net.minecraft.world.gen.chunk.C
@Override @Override
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(() -> {
World world = (World) ((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().z, chunk.getPos().x);
delegate.getGenerationStages().forEach(populator -> { delegate.getGenerationStages().forEach(populator -> {
if(populator instanceof Chunkified) { if(populator instanceof Chunkified) {
populator.populate((ProtoWorld) world); populator.populate(world);
} }
}); });
return chunk; return chunk;
@@ -138,15 +138,15 @@ public abstract class ChunkRegionMixin {
.getBiomeSource()).getProvider(); .getBiomeSource()).getProvider();
} }
public int terra$getCenterChunkX() { public int terraWorld$centerChunkX() {
return centerPos.getPos().x; return centerPos.getPos().x;
} }
public int terra$getCenterChunkZ() { public int terraWorld$centerChunkZ() {
return centerPos.getPos().z; return centerPos.getPos().z;
} }
public World terra$getWorld() { public World terraWorld$getWorld() {
return (World) world; return (World) world;
} }