mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 00:15:35 +00:00
remove ChunkGenerator#getPack
This commit is contained in:
parent
fc073325fb
commit
fab02d4d16
@ -1,7 +1,6 @@
|
||||
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;
|
||||
@ -26,11 +25,6 @@ public class LayeredChunkGenerator implements ChunkGenerator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigPack getConfigPack() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GenerationStage> getGenerationStages() {
|
||||
return null;
|
||||
|
@ -103,11 +103,6 @@ public class NoiseChunkGenerator3D implements ChunkGenerator {
|
||||
return new Sampler3D(chunkX, chunkZ, provider, world, elevationSmooth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigPack getConfigPack() {
|
||||
return configPack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GenerationStage> getGenerationStages() {
|
||||
return generationStages;
|
||||
|
@ -7,22 +7,18 @@
|
||||
|
||||
package com.dfsek.terra.api.world.chunk.generation;
|
||||
|
||||
import com.dfsek.terra.api.util.vector.integer.Vector3Int;
|
||||
|
||||
import com.dfsek.terra.api.world.ServerWorld;
|
||||
import com.dfsek.terra.api.world.WritableWorld;
|
||||
import com.dfsek.terra.api.world.chunk.generation.stage.GenerationStage;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.api.Platform;
|
||||
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.util.vector.Vector3;
|
||||
import com.dfsek.terra.api.util.vector.integer.Vector3Int;
|
||||
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.stage.GenerationStage;
|
||||
|
||||
|
||||
public interface ChunkGenerator {
|
||||
@ -30,8 +26,6 @@ public interface ChunkGenerator {
|
||||
int chunkZ, int chunkX);
|
||||
Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, ServerWorld world, int elevationSmooth);
|
||||
|
||||
ConfigPack getConfigPack();
|
||||
|
||||
List<GenerationStage> getGenerationStages();
|
||||
|
||||
BlockState getBlock(ServerWorld world, int x, int y, int z);
|
||||
|
@ -60,7 +60,7 @@ public class BukkitChunkGeneratorWrapper extends org.bukkit.generator.ChunkGener
|
||||
@Override
|
||||
public void generateNoise(@NotNull WorldInfo worldInfo, @NotNull Random random, int x, int z, @NotNull ChunkData chunkData) {
|
||||
if(this.worldConfig == null) {
|
||||
this.worldConfig = delegate.getConfigPack().toWorldConfig(BukkitAdapter.adapt(Bukkit.getWorld(worldInfo.getUID())));
|
||||
this.worldConfig = pack.toWorldConfig(BukkitAdapter.adapt(Bukkit.getWorld(worldInfo.getUID())));
|
||||
}
|
||||
delegate.generateChunkData(new BukkitProtoChunk(chunkData), worldConfig.getWorld(), z, x);
|
||||
}
|
||||
@ -77,22 +77,22 @@ public class BukkitChunkGeneratorWrapper extends org.bukkit.generator.ChunkGener
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateCaves() {
|
||||
return delegate.getConfigPack().vanillaCaves();
|
||||
return pack.vanillaCaves();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateDecorations() {
|
||||
return delegate.getConfigPack().vanillaFlora();
|
||||
return pack.vanillaFlora();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateMobs() {
|
||||
return delegate.getConfigPack().vanillaMobs();
|
||||
return pack.vanillaMobs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateStructures() {
|
||||
return delegate.getConfigPack().vanillaStructures();
|
||||
return pack.vanillaStructures();
|
||||
}
|
||||
|
||||
public WorldConfig getWorldConfig() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user