mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
cleanup biomegrids
This commit is contained in:
@@ -12,8 +12,8 @@ import com.dfsek.terra.debug.Debug;
|
||||
public abstract class TerraBiomeGrid extends BiomeGrid {
|
||||
protected final BiomeZone zone;
|
||||
|
||||
public TerraBiomeGrid(long seed, double freq1, double freq2, int sizeX, int sizeZ, BiomeZone zone) {
|
||||
super(seed, freq1, freq2, sizeX, sizeZ);
|
||||
public TerraBiomeGrid(long seed, int sizeX, int sizeZ, BiomeZone zone) {
|
||||
super(seed, 0, 0, sizeX, sizeZ);
|
||||
this.zone = zone;
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ public abstract class TerraBiomeGrid extends BiomeGrid {
|
||||
|
||||
if(template.getGridType().equals(TerraBiomeGrid.Type.RADIAL)) {
|
||||
BiomeGrid internal = config.getBiomeGrid(template.getRadialInternalGrid()).build(seed, config);
|
||||
return new TerraRadialBiomeGrid(seed, template.getGridFreqX(), template.getGridFreqZ(), zone, config, template.getRadialGridRadius(), internal);
|
||||
} else return new TerraStandardBiomeGrid(seed, template.getGridFreqX(), template.getGridFreqZ(), zone, config);
|
||||
return new TerraRadialBiomeGrid(seed, zone, config, template.getRadialGridRadius(), internal);
|
||||
} else return new TerraStandardBiomeGrid(seed, zone, config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ public class TerraRadialBiomeGrid extends TerraBiomeGrid {
|
||||
private CoordinatePerturb perturb;
|
||||
private ErosionNoise erode;
|
||||
|
||||
public TerraRadialBiomeGrid(long seed, double freq1, double freq2, BiomeZone zone, ConfigPack c, double radius, BiomeGrid internal) {
|
||||
super(seed, freq1, freq2, 0, 0, zone);
|
||||
public TerraRadialBiomeGrid(long seed, BiomeZone zone, ConfigPack c, double radius, BiomeGrid internal) {
|
||||
super(seed, 0, 0, zone);
|
||||
ConfigPackTemplate t = c.getTemplate();
|
||||
if(c.getTemplate().isBlend()) {
|
||||
perturb = new CoordinatePerturb(t.getBlendFreq(), t.getBlendAmp(), seed);
|
||||
|
||||
@@ -16,8 +16,8 @@ public class TerraStandardBiomeGrid extends TerraBiomeGrid {
|
||||
private CoordinatePerturb perturb;
|
||||
private ErosionNoise erode;
|
||||
|
||||
public TerraStandardBiomeGrid(long seed, double freq1, double freq2, BiomeZone zone, ConfigPack c) {
|
||||
super(seed, freq1, freq2, 0, 0, zone);
|
||||
public TerraStandardBiomeGrid(long seed, BiomeZone zone, ConfigPack c) {
|
||||
super(seed, 0, 0, zone);
|
||||
ConfigPackTemplate t = c.getTemplate();
|
||||
if(c.getTemplate().isBlend()) {
|
||||
perturb = new CoordinatePerturb(t.getBlendFreq(), t.getBlendAmp(), seed);
|
||||
|
||||
@@ -29,14 +29,6 @@ public class ConfigPackTemplate implements ValidatedConfigTemplate {
|
||||
@Value("grids")
|
||||
private List<String> grids;
|
||||
|
||||
@Value("frequencies.grid-x")
|
||||
@Default
|
||||
private int gridFreqX = 4096;
|
||||
|
||||
@Value("frequencies.grid-z")
|
||||
@Default
|
||||
private int gridFreqZ = 4096;
|
||||
|
||||
@Value("frequencies.zone")
|
||||
@Default
|
||||
private int zoneFreq = 2048;
|
||||
@@ -185,14 +177,6 @@ public class ConfigPackTemplate implements ValidatedConfigTemplate {
|
||||
return grids;
|
||||
}
|
||||
|
||||
public int getGridFreqX() {
|
||||
return gridFreqX;
|
||||
}
|
||||
|
||||
public int getGridFreqZ() {
|
||||
return gridFreqZ;
|
||||
}
|
||||
|
||||
public int getZoneFreq() {
|
||||
return zoneFreq;
|
||||
}
|
||||
|
||||
@@ -8,18 +8,26 @@ import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class BiomeGridTemplate extends AbstractableTemplate {
|
||||
@Value("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* A 2D array of {@link Biome} IDs that make up this grid.
|
||||
*/
|
||||
@Value("grid")
|
||||
@Abstractable
|
||||
private List<List<Biome>> grid;
|
||||
|
||||
@Value("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* X frequency of noise function
|
||||
*/
|
||||
@Value("frequency.x")
|
||||
@Abstractable
|
||||
private double xFreq;
|
||||
|
||||
/**
|
||||
* Z frequency of noise function
|
||||
*/
|
||||
@Value("frequency.z")
|
||||
@Abstractable
|
||||
private double zFreq;
|
||||
|
||||
@@ -33,7 +33,6 @@ public class BiomeTemplate extends AbstractableTemplate implements ValidatedConf
|
||||
|
||||
private final ConfigPack pack;
|
||||
|
||||
|
||||
@Value("id")
|
||||
private String id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user