mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 00:29:51 +00:00
Refactor some biome stuff
This commit is contained in:
@@ -40,7 +40,7 @@ public class BiomeZone {
|
||||
* @param z Z coordinate
|
||||
* @return BiomeGrid at coordinates.
|
||||
*/
|
||||
protected BiomeGrid getGrid(int x, int z) {
|
||||
public BiomeGrid getGrid(int x, int z) {
|
||||
return grids[NormalizationUtil.normalize(useImage ? Objects.requireNonNull(imageLoader).getNoiseVal(x, z, channel) : noise.getNoise(x, z), grids.length, 4)];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.dfsek.terra.biome;
|
||||
package com.dfsek.terra.biome.grid;
|
||||
|
||||
import com.dfsek.terra.biome.BiomeZone;
|
||||
import com.dfsek.terra.biome.UserDefinedBiome;
|
||||
import com.dfsek.terra.biome.postprocessing.CoordinatePerturb;
|
||||
import com.dfsek.terra.biome.postprocessing.ErosionNoise;
|
||||
import com.dfsek.terra.config.base.ConfigPack;
|
||||
import com.dfsek.terra.config.base.ConfigUtil;
|
||||
import com.dfsek.terra.config.lang.LangUtil;
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.dfsek.terra.biome;
|
||||
package com.dfsek.terra.biome.grid;
|
||||
|
||||
import com.dfsek.terra.biome.UserDefinedBiome;
|
||||
import com.dfsek.terra.config.base.WorldConfig;
|
||||
import com.dfsek.terra.image.ImageLoader;
|
||||
import org.bukkit.Location;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.biome;
|
||||
package com.dfsek.terra.biome.postprocessing;
|
||||
|
||||
import com.dfsek.terra.procgen.math.Vector2;
|
||||
import org.polydev.gaea.math.FastNoiseLite;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.dfsek.terra.biome;
|
||||
package com.dfsek.terra.biome.postprocessing;
|
||||
|
||||
import org.polydev.gaea.math.FastNoiseLite;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ErosionNoise {
|
||||
* @param z Z coordinate
|
||||
* @return Whether location is eroded
|
||||
*/
|
||||
boolean isEroded(int x, int z) {
|
||||
public boolean isEroded(int x, int z) {
|
||||
double abs = Math.pow(noise.getNoise(x, z), 2);
|
||||
return abs < thresh;
|
||||
}
|
||||
Reference in New Issue
Block a user