mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-11 18:26:08 +00:00
start implementing LayeredChunkGeneratorAddon
This commit is contained in:
@@ -1,11 +0,0 @@
|
|||||||
package com.dfsek.terra.addons.chunkgenerator.layer;
|
|
||||||
|
|
||||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
|
||||||
|
|
||||||
|
|
||||||
public class LayerChunkGeneratorAddon implements AddonInitializer {
|
|
||||||
@Override
|
|
||||||
public void initialize() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.dfsek.terra.addons.chunkgenerator.layer;
|
||||||
|
|
||||||
|
import com.dfsek.terra.api.block.state.BlockState;
|
||||||
|
import com.dfsek.terra.api.config.ConfigPack;
|
||||||
|
import com.dfsek.terra.api.util.math.Sampler;
|
||||||
|
import com.dfsek.terra.api.world.ServerWorld;
|
||||||
|
import com.dfsek.terra.api.world.WritableWorld;
|
||||||
|
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||||
|
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||||
|
import com.dfsek.terra.api.world.chunk.generation.ProtoChunk;
|
||||||
|
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class LayeredChunkGenerator implements ChunkGenerator {
|
||||||
|
@Override
|
||||||
|
public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WritableWorld world, int chunkZ, int chunkX) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, ServerWorld world, int elevationSmooth) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigPack getConfigPack() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GenerationStage> getGenerationStages() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getBlock(ServerWorld world, int x, int y, int z) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.dfsek.terra.addons.chunkgenerator.layer;
|
||||||
|
|
||||||
|
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||||
|
import com.dfsek.terra.api.Platform;
|
||||||
|
import com.dfsek.terra.api.addon.BaseAddon;
|
||||||
|
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||||
|
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||||
|
import com.dfsek.terra.api.inject.annotations.Inject;
|
||||||
|
import com.dfsek.terra.api.world.chunk.generation.util.provider.ChunkGeneratorProvider;
|
||||||
|
|
||||||
|
|
||||||
|
public class LayeredChunkGeneratorAddon implements AddonInitializer {
|
||||||
|
@Inject
|
||||||
|
private Platform platform;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseAddon addon;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
platform.getEventManager()
|
||||||
|
.getHandler(FunctionalEventHandler.class)
|
||||||
|
.register(addon, ConfigPackPreLoadEvent.class)
|
||||||
|
.then(event -> {
|
||||||
|
event.getPack().getOrCreateRegistry(ChunkGeneratorProvider.class).register("NOISE_3D",
|
||||||
|
pack -> new LayeredChunkGenerator());
|
||||||
|
})
|
||||||
|
.failThrough();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ contributors:
|
|||||||
id: chunk-generator-layer
|
id: chunk-generator-layer
|
||||||
version: @VERSION@
|
version: @VERSION@
|
||||||
entrypoints:
|
entrypoints:
|
||||||
- "com.dfsek.terra.addons.chunkgenerator.layer.LayerChunkGeneratorAddon"
|
- "com.dfsek.terra.addons.chunkgenerator.layer.LayeredChunkGeneratorAddon"
|
||||||
website:
|
website:
|
||||||
issues: https://github.com/PolyhedralDev/Terra-chunk-generator-noise-3d/issues
|
issues: https://github.com/PolyhedralDev/Terra-chunk-generator-noise-3d/issues
|
||||||
source: https://github.com/PolyhedralDev/Terra-chunk-generator-noise-3d
|
source: https://github.com/PolyhedralDev/Terra-chunk-generator-noise-3d
|
||||||
|
|||||||
Reference in New Issue
Block a user