Skip to content

Commit

Permalink
Use Fantasy's TransientChunkGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Jun 23, 2024
1 parent ead412f commit a380326
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dependencies {

modApi include('xyz.nucleoid:server-translations-api:2.3.0+1.20.5-rc2')
modApi include('xyz.nucleoid:packet-tweaker:0.5.1+1.20.6')
modApi include('xyz.nucleoid:fantasy:0.6.0+1.20.6')
modApi include('xyz.nucleoid:fantasy:0.6.2+1.20.6')
modApi include('xyz.nucleoid:more-codecs:0.3.3+1.20.2')
modApi include('xyz.nucleoid:stimuli:0.4.11+1.20.6')
modApi include('xyz.nucleoid:map-templates:0.1.9+1.20.4')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package xyz.nucleoid.plasmid.game.world.generator;

import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryOps;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ChunkRegion;
Expand All @@ -20,20 +17,15 @@
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.StructureAccessor;
import net.minecraft.world.gen.chunk.Blender;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.chunk.VerticalBlockSample;
import net.minecraft.world.gen.noise.NoiseConfig;
import xyz.nucleoid.fantasy.util.VoidChunkGenerator;
import xyz.nucleoid.fantasy.util.TransientChunkGenerator;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;

public abstract class GameChunkGenerator extends ChunkGenerator {
public static final MapCodec<? extends ChunkGenerator> CODEC = RecordCodecBuilder.mapCodec(i -> i.group(
RegistryOps.getEntryCodec(BiomeKeys.THE_VOID)
).apply(i, VoidChunkGenerator::new));

public abstract class GameChunkGenerator extends TransientChunkGenerator {
public GameChunkGenerator(BiomeSource biomeSource) {
super(biomeSource);
}
Expand Down Expand Up @@ -97,11 +89,6 @@ public int getWorldHeight() {
return 0;
}

@Override
protected final MapCodec<? extends ChunkGenerator> getCodec() {
return CODEC;
}

@Override
public void carve(ChunkRegion chunkRegion, long seed, NoiseConfig noiseConfig, BiomeAccess world, StructureAccessor structureAccessor, Chunk chunk, GenerationStep.Carver carverStep) {
}
Expand Down

0 comments on commit a380326

Please sign in to comment.