- fix structure settings not saving to worldinfo

- optionally ignore erosion/smoothing while allowing steepness/beach detection
- add transition point render mode for map
- revert transition points to defaults if user has mis-configured them in a breaking way
- allow biome modification on river banks
This commit is contained in:
dags- 2020-06-28 14:53:35 +01:00
parent a79b6ff213
commit 6fc16103f1
60 changed files with 196 additions and 340 deletions

2
Engine

@ -1 +1 @@
Subproject commit e151e3ccf02d305378c269e3086863069fdf4a12
Subproject commit ad79d9cb059d512a955e99bdd9a4340e07ae34e8

View File

@ -14,31 +14,6 @@
"biome.terraforged.stone_forest": "Stone Forest",
"biome.terraforged.taiga_scrub": "Taiga Scrub",
"biome.terraforged.warm_beach": "Warm Beach",
"display.terraforged.climate": "Climate",
"display.terraforged.climate.biome_edge_shape": "Biome Edge Shape",
"display.terraforged.climate.biome_edge_shape.gain": "Gain",
"display.terraforged.climate.biome_edge_shape.lacunarity": "Lacunarity",
"display.terraforged.climate.biome_edge_shape.octaves": "Octaves",
"display.terraforged.climate.biome_edge_shape.scale": "Scale",
"display.terraforged.climate.biome_edge_shape.strength": "Strength",
"display.terraforged.climate.biome_edge_shape.type": "Type",
"display.terraforged.climate.biome_shape": "Biome Shape",
"display.terraforged.climate.biome_shape.biome_size": "Biome Size",
"display.terraforged.climate.biome_shape.biome_warp_scale": "Biome Warp Scale",
"display.terraforged.climate.biome_shape.biome_warp_strength": "Biome Warp Strength",
"display.terraforged.climate.biome_shape.macro_noise_size": "Macro Noise Size",
"display.terraforged.climate.moisture": "Moisture",
"display.terraforged.climate.moisture.bias": "Bias",
"display.terraforged.climate.moisture.falloff": "Falloff",
"display.terraforged.climate.moisture.max": "Max",
"display.terraforged.climate.moisture.min": "Min",
"display.terraforged.climate.moisture.scale": "Scale",
"display.terraforged.climate.temperature": "Temperature",
"display.terraforged.climate.temperature.bias": "Bias",
"display.terraforged.climate.temperature.falloff": "Falloff",
"display.terraforged.climate.temperature.max": "Max",
"display.terraforged.climate.temperature.min": "Min",
"display.terraforged.climate.temperature.scale": "Scale",
"display.terraforged.climate.title": "Climate Settings",
"display.terraforged.dimensions": "Dimensions",
"display.terraforged.dimensions.bedrock_layer": "Bedrock Layer",
@ -48,18 +23,6 @@
"display.terraforged.dimensions.dimensions": "Dimensions",
"display.terraforged.dimensions.dimensions.end": "End",
"display.terraforged.dimensions.dimensions.nether": "Nether",
"display.terraforged.filters": "Filters",
"display.terraforged.filters.erosion": "Erosion",
"display.terraforged.filters.erosion.deposite_rate": "Deposite Rate",
"display.terraforged.filters.erosion.droplet_lifetime": "Droplet Lifetime",
"display.terraforged.filters.erosion.droplet_velocity": "Droplet Velocity",
"display.terraforged.filters.erosion.droplet_volume": "Droplet Volume",
"display.terraforged.filters.erosion.erosion_rate": "Erosion Rate",
"display.terraforged.filters.erosion.iterations": "Iterations",
"display.terraforged.filters.smoothing": "Smoothing",
"display.terraforged.filters.smoothing.iterations": "Iterations",
"display.terraforged.filters.smoothing.smoothing_radius": "Smoothing Radius",
"display.terraforged.filters.smoothing.smoothing_rate": "Smoothing Rate",
"display.terraforged.filters.title": "Filter Settings",
"display.terraforged.general.cancel": "Cancel",
"display.terraforged.general.done": "Done",
@ -87,29 +50,6 @@
"display.terraforged.preview.terrain": "Terrain: ",
"display.terraforged.preview.zoom": "Zoom",
"display.terraforged.river.title": "River Settings",
"display.terraforged.rivers": "Rivers",
"display.terraforged.rivers.primary_rivers": "Primary Rivers",
"display.terraforged.rivers.primary_rivers.bank_width": "Bank Width",
"display.terraforged.rivers.primary_rivers.bed_depth": "Bed Depth",
"display.terraforged.rivers.primary_rivers.bed_width": "Bed Width",
"display.terraforged.rivers.primary_rivers.fade": "Fade",
"display.terraforged.rivers.primary_rivers.max_bank_height": "Max Bank Height",
"display.terraforged.rivers.primary_rivers.min_bank_height": "Min Bank Height",
"display.terraforged.rivers.river_count": "River Count",
"display.terraforged.rivers.secondary_river": "Secondary River",
"display.terraforged.rivers.secondary_river.bank_width": "Bank Width",
"display.terraforged.rivers.secondary_river.bed_depth": "Bed Depth",
"display.terraforged.rivers.secondary_river.bed_width": "Bed Width",
"display.terraforged.rivers.secondary_river.fade": "Fade",
"display.terraforged.rivers.secondary_river.max_bank_height": "Max Bank Height",
"display.terraforged.rivers.secondary_river.min_bank_height": "Min Bank Height",
"display.terraforged.rivers.tertiary_rivers": "Tertiary Rivers",
"display.terraforged.rivers.tertiary_rivers.bank_width": "Bank Width",
"display.terraforged.rivers.tertiary_rivers.bed_depth": "Bed Depth",
"display.terraforged.rivers.tertiary_rivers.bed_width": "Bed Width",
"display.terraforged.rivers.tertiary_rivers.fade": "Fade",
"display.terraforged.rivers.tertiary_rivers.max_bank_height": "Max Bank Height",
"display.terraforged.rivers.tertiary_rivers.min_bank_height": "Min Bank Height",
"display.terraforged.structures": "Structures",
"display.terraforged.structures.mansions": "Mansions",
"display.terraforged.structures.mansions.distance": "Distance",
@ -133,110 +73,15 @@
"display.terraforged.structures.villages": "Villages",
"display.terraforged.structures.villages.distance": "Distance",
"display.terraforged.structures.villages.separation": "Separation",
"display.terraforged.terrain": "Terrain",
"display.terraforged.terrain.badlands": "Badlands",
"display.terraforged.terrain.badlands.base_scale": "Base Scale",
"display.terraforged.terrain.badlands.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.badlands.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.badlands.weight": "Weight",
"display.terraforged.terrain.dales": "Dales",
"display.terraforged.terrain.dales.base_scale": "Base Scale",
"display.terraforged.terrain.dales.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.dales.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.dales.weight": "Weight",
"display.terraforged.terrain.general": "General",
"display.terraforged.terrain.general.global_horizontal_scale": "Global Horizontal Scale",
"display.terraforged.terrain.general.global_vertical_scale": "Global Vertical Scale",
"display.terraforged.terrain.general.terrain_region_size": "Terrain Region Size",
"display.terraforged.terrain.hills": "Hills",
"display.terraforged.terrain.hills.base_scale": "Base Scale",
"display.terraforged.terrain.hills.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.hills.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.hills.weight": "Weight",
"display.terraforged.terrain.mountains": "Mountains",
"display.terraforged.terrain.mountains.base_scale": "Base Scale",
"display.terraforged.terrain.mountains.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.mountains.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.mountains.weight": "Weight",
"display.terraforged.terrain.plains": "Plains",
"display.terraforged.terrain.plains.base_scale": "Base Scale",
"display.terraforged.terrain.plains.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.plains.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.plains.weight": "Weight",
"display.terraforged.terrain.plateau": "Plateau",
"display.terraforged.terrain.plateau.base_scale": "Base Scale",
"display.terraforged.terrain.plateau.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.plateau.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.plateau.weight": "Weight",
"display.terraforged.terrain.steppe": "Steppe",
"display.terraforged.terrain.steppe.base_scale": "Base Scale",
"display.terraforged.terrain.steppe.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.steppe.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.steppe.weight": "Weight",
"display.terraforged.terrain.title": "Terrain Settings",
"display.terraforged.terrain.torridonian": "Torridonian",
"display.terraforged.terrain.torridonian.base_scale": "Base Scale",
"display.terraforged.terrain.torridonian.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.torridonian.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.torridonian.weight": "Weight",
"display.terraforged.terrain.volcano": "Volcano",
"display.terraforged.terrain.volcano.base_scale": "Base Scale",
"display.terraforged.terrain.volcano.horizontal_scale": "Horizontal Scale",
"display.terraforged.terrain.volcano.vertical_scale": "Vertical Scale",
"display.terraforged.terrain.volcano.weight": "Weight",
"display.terraforged.world": "World",
"display.terraforged.world.continent": "Continent",
"display.terraforged.world.continent.continent_mode": "Continent Mode",
"display.terraforged.world.continent.continent_scale": "Continent Scale",
"display.terraforged.world.continent.continent_shape": "Continent Shape",
"display.terraforged.world.continent.ocean_scale": "Ocean Scale",
"display.terraforged.world.properties": "Properties",
"display.terraforged.world.properties.sea_level": "Sea Level",
"display.terraforged.world.properties.spawn_type": "Spawn Type",
"display.terraforged.world.properties.world_height": "World Height",
"display.terraforged.world.title": "World Settings",
"display.terraforged.world.transition_points": "Transition Points",
"display.terraforged.world.transition_points.beach": "Beach",
"display.terraforged.world.transition_points.coast": "Coast",
"display.terraforged.world.transition_points.deep_ocean": "Deep Ocean",
"display.terraforged.world.transition_points.inland": "Inland",
"display.terraforged.world.transition_points.shallow_ocean": "Shallow Ocean",
"generator.terraforged": "TerraForged",
"generator.terratest": "TerraTest",
"tooltip.terraforged.climate.biome_edge_shape.gain": "Controls the gain subsequent noise octaves",
"tooltip.terraforged.climate.biome_edge_shape.lacunarity": "Controls the lacunarity of subsequent noise octaves",
"tooltip.terraforged.climate.biome_edge_shape.octaves": "Controls the number of noise octaves",
"tooltip.terraforged.climate.biome_edge_shape.scale": "Controls the scale of the noise",
"tooltip.terraforged.climate.biome_edge_shape.strength": "Controls the strength of the noise",
"tooltip.terraforged.climate.biome_edge_shape.type": "The noise type",
"tooltip.terraforged.climate.biome_shape.biome_size": "Controls the size of individual biomes",
"tooltip.terraforged.climate.biome_shape.biome_warp_scale": "Controls the scale of shape distortion for biomes",
"tooltip.terraforged.climate.biome_shape.biome_warp_strength": "Controls the strength of shape distortion for biomes",
"tooltip.terraforged.climate.biome_shape.macro_noise_size": "Macro noise is used to group large areas of biomes into a single type (such as deserts)",
"tooltip.terraforged.climate.moisture.bias": "The bias towards either end of the range",
"tooltip.terraforged.climate.moisture.falloff": "How quickly values transition from an extremity",
"tooltip.terraforged.climate.moisture.max": "The upper limit of the range",
"tooltip.terraforged.climate.moisture.min": "The lower limit of the range",
"tooltip.terraforged.climate.moisture.scale": "The horizontal scale",
"tooltip.terraforged.climate.temperature.bias": "The bias towards either end of the range",
"tooltip.terraforged.climate.temperature.falloff": "How quickly values transition from an extremity",
"tooltip.terraforged.climate.temperature.max": "The upper limit of the range",
"tooltip.terraforged.climate.temperature.min": "The lower limit of the range",
"tooltip.terraforged.climate.temperature.scale": "The horizontal scale",
"tooltip.terraforged.dimensions.bedrock_layer.material": "Controls the material that should be used in the world's base layer",
"tooltip.terraforged.dimensions.bedrock_layer.min_depth": "Controls the minimum height of the world's base layer",
"tooltip.terraforged.dimensions.bedrock_layer.variance": "Controls the amount of height randomness of the world's base layer",
"tooltip.terraforged.dimensions.dimensions.end": "Select the end generator",
"tooltip.terraforged.dimensions.dimensions.nether": "Select the nether generator",
"tooltip.terraforged.filters.erosion.deposite_rate": "Controls how quickly material is deposited (during erosion)",
"tooltip.terraforged.filters.erosion.droplet_lifetime": "Controls the number of iterations that a single water droplet is simulated for",
"tooltip.terraforged.filters.erosion.droplet_velocity": "Controls the starting velocity of the simulated water droplet",
"tooltip.terraforged.filters.erosion.droplet_volume": "Controls the starting volume of water that a simulated water droplet carries",
"tooltip.terraforged.filters.erosion.erosion_rate": "Controls how quickly material dissolves (during erosion)",
"tooltip.terraforged.filters.erosion.iterations": "Controls the number of erosion iterations",
"tooltip.terraforged.filters.smoothing.iterations": "Controls the number of smoothing iterations",
"tooltip.terraforged.filters.smoothing.smoothing_radius": "Controls the smoothing radius",
"tooltip.terraforged.filters.smoothing.smoothing_rate": "Controls how strongly smoothing is applied",
"tooltip.terraforged.miscellaneous.custom_biome_features": "Use custom biome features in place of vanilla ones (such as trees)",
"tooltip.terraforged.miscellaneous.erosion_decorator": "Replace surface materials where erosion has occurred",
"tooltip.terraforged.miscellaneous.mountain_biome_usage": "The probability that mountainous terrain will be set to a mountain biome type.\nThis may help improve compatibility with mods that rely exclusively on mountain biomes.",
@ -244,88 +89,18 @@
"tooltip.terraforged.miscellaneous.smooth_layer_decorator": "Modifies layer block levels (ie snow) to fit the terrain",
"tooltip.terraforged.miscellaneous.strata_decorator": "Generates strata (rock layers) instead of just stone",
"tooltip.terraforged.miscellaneous.vanilla_water_features": "Controls whether vanilla lakes & springs should generate",
"tooltip.terraforged.rivers.primary_rivers.bank_width": "Controls the river-banks width",
"tooltip.terraforged.rivers.primary_rivers.bed_depth": "Controls the depth of the river",
"tooltip.terraforged.rivers.primary_rivers.bed_width": "Controls the river-bed width",
"tooltip.terraforged.rivers.primary_rivers.fade": "Controls how much rivers taper",
"tooltip.terraforged.rivers.primary_rivers.max_bank_height": "Controls the height of river banks",
"tooltip.terraforged.rivers.primary_rivers.min_bank_height": "Controls the height of river banks",
"tooltip.terraforged.rivers.river_count": "Controls the number of major rivers per continent",
"tooltip.terraforged.rivers.secondary_river.bank_width": "Controls the river-banks width",
"tooltip.terraforged.rivers.secondary_river.bed_depth": "Controls the depth of the river",
"tooltip.terraforged.rivers.secondary_river.bed_width": "Controls the river-bed width",
"tooltip.terraforged.rivers.secondary_river.fade": "Controls how much rivers taper",
"tooltip.terraforged.rivers.secondary_river.max_bank_height": "Controls the height of river banks",
"tooltip.terraforged.rivers.secondary_river.min_bank_height": "Controls the height of river banks",
"tooltip.terraforged.rivers.tertiary_rivers.bank_width": "Controls the river-banks width",
"tooltip.terraforged.rivers.tertiary_rivers.bed_depth": "Controls the depth of the river",
"tooltip.terraforged.rivers.tertiary_rivers.bed_width": "Controls the river-bed width",
"tooltip.terraforged.rivers.tertiary_rivers.fade": "Controls how much rivers taper",
"tooltip.terraforged.rivers.tertiary_rivers.max_bank_height": "Controls the height of river banks",
"tooltip.terraforged.rivers.tertiary_rivers.min_bank_height": "Controls the height of river banks",
"tooltip.terraforged.structures.mansions.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.mansions.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.ocean_monuments.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.ocean_monuments.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.ocean_ruins.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.ocean_ruins.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.other_structures.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.other_structures.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.shipwrecks.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.shipwrecks.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.strongholds.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.strongholds.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.structures.villages.distance": "The distance (in chunks) between placements of this feature",
"tooltip.terraforged.structures.villages.separation": "The separation (in chunks) between placements of this feature",
"tooltip.terraforged.terrain.badlands.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.badlands.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.badlands.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.badlands.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.dales.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.dales.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.dales.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.dales.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.general.global_horizontal_scale": "Globally controls the horizontal scaling of terrain",
"tooltip.terraforged.terrain.general.global_vertical_scale": "Globally controls the vertical scaling of terrain",
"tooltip.terraforged.terrain.general.terrain_region_size": "Controls the size of terrain regions",
"tooltip.terraforged.terrain.hills.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.hills.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.hills.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.hills.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.mountains.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.mountains.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.mountains.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.mountains.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.plains.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.plains.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.plains.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.plains.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.plateau.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.plateau.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.plateau.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.plateau.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.steppe.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.steppe.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.steppe.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.steppe.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.torridonian.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.torridonian.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.torridonian.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.torridonian.weight": "Controls how common this terrain type is",
"tooltip.terraforged.terrain.volcano.base_scale": "Controls the base height of this terrain",
"tooltip.terraforged.terrain.volcano.horizontal_scale": "Stretches or compresses the terrain horizontally",
"tooltip.terraforged.terrain.volcano.vertical_scale": "Stretches or compresses the terrain vertically",
"tooltip.terraforged.terrain.volcano.weight": "Controls how common this terrain type is",
"tooltip.terraforged.world.continent.continent_mode": "Controls the continent generator type",
"tooltip.terraforged.world.continent.continent_scale": "Controls the size of continents",
"tooltip.terraforged.world.continent.continent_shape": "Controls how continent shapes are calculated",
"tooltip.terraforged.world.continent.ocean_scale": "Controls the amount of ocean between continents",
"tooltip.terraforged.world.properties.sea_level": "Controls the sea level",
"tooltip.terraforged.world.properties.spawn_type": "Set whether spawn should be close to x=0,z=0 or the centre of the nearest continent",
"tooltip.terraforged.world.properties.world_height": "Controls the world height",
"tooltip.terraforged.world.transition_points.beach": "The beach transition point",
"tooltip.terraforged.world.transition_points.coast": "The coast transition point",
"tooltip.terraforged.world.transition_points.deep_ocean": "The deep ocean transition point",
"tooltip.terraforged.world.transition_points.inland": "The inland transition point",
"tooltip.terraforged.world.transition_points.shallow_ocean": "The shallow ocean transition point"
"tooltip.terraforged.structures.mansions.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.mansions.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.ocean_monuments.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.ocean_monuments.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.ocean_ruins.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.ocean_ruins.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.other_structures.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.other_structures.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.shipwrecks.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.shipwrecks.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.strongholds.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.strongholds.separation": "The minimum distance in chunks between structure spawns",
"tooltip.terraforged.structures.villages.distance": "The maximum distance in chunks between attempts to spawn a structure",
"tooltip.terraforged.structures.villages.separation": "The minimum distance in chunks between structure spawns"
}

View File

@ -1,4 +1,4 @@
mod_version=0.1.0-BETA-2
mod_version=0.1.0-BETA-3
mc_version=1.15.2
forge_version=31.2.27
mcp_channel=snapshot

View File

@ -35,9 +35,7 @@ public abstract class BiomeVariant extends Biome {
}
// override to register a custom biome weight with Forge's BiomeManager (default is 10)
public void registerWeights() {
}
public void registerWeights() {}
@Override
public int getGrassColor(double x, double z) {

View File

@ -26,8 +26,8 @@
package com.terraforged.api.event;
import com.terraforged.api.biome.modifier.ModifierManager;
import com.terraforged.api.chunk.column.DecoratorManager;
import com.terraforged.api.biome.surface.SurfaceManager;
import com.terraforged.api.chunk.column.DecoratorManager;
import com.terraforged.api.material.geology.GeologyManager;
import com.terraforged.api.material.layer.LayerManager;
import com.terraforged.fm.modifier.FeatureModifiers;

View File

@ -2,12 +2,12 @@ package com.terraforged.mod.biome.map;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.defaults.DefaultBiomes;
import com.terraforged.mod.biome.map.set.BiomeSet;
import com.terraforged.mod.biome.map.set.BiomeTypeSet;
import com.terraforged.mod.biome.map.set.RiverSet;
import com.terraforged.mod.biome.map.set.TemperatureSet;
import com.terraforged.core.cell.Cell;
import com.terraforged.n2d.util.NoiseUtil;
import com.terraforged.world.biome.BiomeType;
import com.terraforged.world.heightmap.Levels;

View File

@ -1,11 +1,11 @@
package com.terraforged.mod.biome.map.set;
import com.google.gson.JsonElement;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.mod.biome.provider.BiomeHelper;
import com.terraforged.core.cell.Cell;
import com.terraforged.n2d.util.NoiseUtil;
import com.terraforged.mod.util.ListUtils;
import com.terraforged.n2d.util.NoiseUtil;
import net.minecraft.world.biome.Biome;
import java.util.Collections;

View File

@ -3,8 +3,8 @@ package com.terraforged.mod.biome.map.set;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.world.biome.BiomeType;
import net.minecraft.world.biome.Biome;

View File

@ -1,9 +1,9 @@
package com.terraforged.mod.biome.map.set;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.mod.biome.map.defaults.DefaultBiomes;
import com.terraforged.core.cell.Cell;
import net.minecraft.world.biome.Biome;
import java.util.List;

View File

@ -3,9 +3,9 @@ package com.terraforged.mod.biome.map.set;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.defaults.BiomeTemps;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.core.cell.Cell;
import net.minecraft.world.biome.Biome;
import java.util.List;

View File

@ -1,8 +1,8 @@
package com.terraforged.mod.biome.modifier;
import com.terraforged.api.biome.modifier.BiomeModifier;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.n2d.Module;
import com.terraforged.n2d.Source;
import com.terraforged.world.GeneratorContext;

View File

@ -27,12 +27,12 @@ package com.terraforged.mod.biome.modifier;
import com.terraforged.api.biome.modifier.BiomeModifier;
import com.terraforged.api.biome.modifier.ModifierManager;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.biome.provider.DesertBiomes;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import com.terraforged.world.biome.BiomeType;
import com.terraforged.world.terrain.ITerrain;
import com.terraforged.world.heightmap.Levels;
import net.minecraft.world.biome.Biome;
import java.util.ArrayList;
@ -55,8 +55,8 @@ public class BiomeModifierManager implements BiomeModifier, ModifierManager {
this.biomeModifiers = modifiers;
}
public boolean hasModifiers(ITerrain type) {
return type.isOverground();
public boolean hasModifiers(Cell cell, Levels levels) {
return cell.terrain.isOverground() || (cell.terrain.isSubmerged() && cell.value > levels.water);
}
public DesertBiomes getDesertBiomes() {

View File

@ -26,9 +26,9 @@
package com.terraforged.mod.biome.modifier;
import com.terraforged.api.biome.modifier.BiomeModifier;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import com.terraforged.world.terrain.Terrains;
import net.minecraft.world.biome.Biome;

View File

@ -26,8 +26,8 @@
package com.terraforged.mod.biome.modifier;
import com.terraforged.api.biome.modifier.BiomeModifier;
import com.terraforged.mod.biome.provider.DesertBiomes;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.provider.DesertBiomes;
import net.minecraft.world.biome.Biome;
public class DesertColorModifier implements BiomeModifier {

View File

@ -1,10 +1,10 @@
package com.terraforged.mod.biome.modifier;
import com.terraforged.api.biome.modifier.BiomeModifier;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.biome.map.defaults.DefaultBiome;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import net.minecraft.world.biome.Biome;
public class MountainModifier implements BiomeModifier {

View File

@ -9,9 +9,11 @@ import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
public class BiomeWeights {
@ -58,6 +60,21 @@ public class BiomeWeights {
return standardWeight;
}
public void forEachEntry(BiConsumer<ResourceLocation, Integer> consumer) {
biomes.entrySet().stream()
.sorted(Comparator.comparing(e -> e.getKey().toString()))
.forEach(e -> consumer.accept(e.getKey(), e.getValue()));
}
public void forEachUnregistered(BiConsumer<ResourceLocation, Integer> consumer) {
for (Biome biome : ForgeRegistries.BIOMES) {
if (!biomes.containsKey(biome.getRegistryName())) {
int weight = getWeight(biome);
consumer.accept(biome.getRegistryName(), weight);
}
}
}
private void readWeights() {
CommentedConfig config = ConfigManager.BIOME_WEIGHTS.get();
@ -69,11 +86,12 @@ public class BiomeWeights {
ResourceLocation name = new ResourceLocation(key);
if (!ForgeRegistries.BIOMES.containsKey(name)) {
Log.err("Invalid biome defined: {}", name);
continue;
}
biomes.put(name, weight);
Log.debug("Loaded custom biome weight: %s=%s", name, weight);
Log.debug("Loaded custom biome weight: {}={}", name, weight);
}
}
}

View File

@ -26,11 +26,11 @@
package com.terraforged.mod.biome.provider;
import com.google.common.collect.Sets;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.concurrent.Resource;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.biome.modifier.BiomeModifierManager;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.concurrent.Resource;
import com.terraforged.mod.util.setup.SetupHooks;
import com.terraforged.world.heightmap.WorldLookup;
import com.terraforged.world.terrain.decorator.Decorator;
@ -152,7 +152,7 @@ public class TerraBiomeProvider extends BiomeProvider {
public Biome getBiome(Cell cell, int x, int z) {
Biome biome = biomeMap.provideBiome(cell, context.levels);
if (modifierManager.hasModifiers(cell.terrain)) {
if (modifierManager.hasModifiers(cell, context.levels)) {
return modifierManager.modify(biome, cell, x, z);
}
return biome;

View File

@ -1,9 +1,9 @@
package com.terraforged.mod.biome.spawn;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.Log;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.server.command.search.Search;
import com.terraforged.core.cell.Cell;
import net.minecraft.util.math.BlockPos;
public class SpawnSearch extends Search {

View File

@ -29,10 +29,10 @@ import com.terraforged.api.biome.surface.MaskedSurface;
import com.terraforged.api.biome.surface.Surface;
import com.terraforged.api.biome.surface.SurfaceContext;
import com.terraforged.api.material.layer.LayerMaterial;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.provider.DesertBiomes;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import com.terraforged.n2d.Module;
import com.terraforged.n2d.Source;
import com.terraforged.n2d.func.CellFunc;

View File

@ -28,8 +28,8 @@ package com.terraforged.mod.biome.surface;
import com.terraforged.api.biome.surface.MaskedSurface;
import com.terraforged.api.biome.surface.SurfaceContext;
import com.terraforged.api.material.state.States;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.n2d.Module;
import com.terraforged.n2d.Source;
import com.terraforged.n2d.util.NoiseUtil;

View File

@ -25,8 +25,8 @@
package com.terraforged.mod.biome.tag;
import com.terraforged.mod.Log;
import com.terraforged.api.biome.BiomeTags;
import com.terraforged.mod.Log;
import net.minecraft.profiler.IProfiler;
import net.minecraft.resources.IFutureReloadListener;
import net.minecraft.resources.IResourceManager;

View File

@ -25,9 +25,17 @@
package com.terraforged.mod.chunk;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.biome.surface.SurfaceManager;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.material.layer.LayerManager;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.tile.Size;
import com.terraforged.core.tile.Tile;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.core.tile.gen.TileCache;
import com.terraforged.fm.FeatureManager;
import com.terraforged.fm.data.DataManager;
import com.terraforged.fm.structure.StructureManager;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.chunk.generator.BiomeGenerator;
import com.terraforged.mod.chunk.generator.FeatureGenerator;
@ -37,15 +45,7 @@ import com.terraforged.mod.chunk.generator.StructureGenerator;
import com.terraforged.mod.chunk.generator.SurfaceGenerator;
import com.terraforged.mod.chunk.generator.TerrainCarver;
import com.terraforged.mod.chunk.generator.TerrainGenerator;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.tile.Size;
import com.terraforged.core.tile.Tile;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.core.tile.gen.TileCache;
import com.terraforged.mod.feature.BlockDataManager;
import com.terraforged.fm.FeatureManager;
import com.terraforged.fm.data.DataManager;
import com.terraforged.fm.structure.StructureManager;
import com.terraforged.mod.material.Materials;
import com.terraforged.mod.material.geology.GeoManager;
import com.terraforged.mod.util.setup.SetupHooks;
@ -140,7 +140,7 @@ public class TerraChunkGenerator extends ChunkGenerator<GenerationSettings> {
@Override
public final void generateSurface(WorldGenRegion world, IChunk chunk) {
surfaceGenerator.generateSurface(world, chunk);
// surfaceGenerator.generateSurface(world, chunk);
}
@Override

View File

@ -26,14 +26,14 @@
package com.terraforged.mod.chunk;
import com.electronwill.nightconfig.core.CommentedConfig;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.api.biome.surface.ChunkSurfaceBuffer;
import com.terraforged.api.biome.surface.SurfaceContext;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.mod.config.PerfDefaults;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.core.concurrent.thread.ThreadPools;
import com.terraforged.core.tile.gen.TileCache;
import com.terraforged.core.tile.gen.TileGenerator;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.mod.config.PerfDefaults;
import com.terraforged.mod.material.Materials;
import com.terraforged.world.GeneratorContext;
import com.terraforged.world.WorldGeneratorFactory;

View File

@ -1,23 +1,7 @@
package com.terraforged.mod.chunk;
import com.terraforged.mod.Log;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.biome.surface.SurfaceManager;
import com.terraforged.mod.biome.ModBiomes;
import com.terraforged.mod.biome.surface.BriceSurface;
import com.terraforged.mod.biome.surface.DesertSurface;
import com.terraforged.mod.biome.surface.StoneForestSurface;
import com.terraforged.mod.biome.surface.ForestSurface;
import com.terraforged.mod.biome.surface.IcebergsSurface;
import com.terraforged.mod.biome.surface.SwampSurface;
import com.terraforged.mod.chunk.column.BedrockDecorator;
import com.terraforged.mod.chunk.column.ErosionDecorator;
import com.terraforged.mod.chunk.column.GeologyDecorator;
import com.terraforged.mod.chunk.column.post.LayerDecorator;
import com.terraforged.mod.chunk.column.post.SnowEroder;
import com.terraforged.mod.feature.BlockDataManager;
import com.terraforged.mod.feature.Matchers;
import com.terraforged.mod.feature.feature.FreezeLayer;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.fm.FeatureManager;
import com.terraforged.fm.data.DataManager;
import com.terraforged.fm.matcher.biome.BiomeMatcher;
@ -28,6 +12,22 @@ import com.terraforged.fm.predicate.FeaturePredicate;
import com.terraforged.fm.predicate.MinHeight;
import com.terraforged.fm.structure.StructureManager;
import com.terraforged.fm.transformer.FeatureTransformer;
import com.terraforged.mod.Log;
import com.terraforged.mod.biome.ModBiomes;
import com.terraforged.mod.biome.surface.BriceSurface;
import com.terraforged.mod.biome.surface.DesertSurface;
import com.terraforged.mod.biome.surface.ForestSurface;
import com.terraforged.mod.biome.surface.IcebergsSurface;
import com.terraforged.mod.biome.surface.StoneForestSurface;
import com.terraforged.mod.biome.surface.SwampSurface;
import com.terraforged.mod.chunk.column.BedrockDecorator;
import com.terraforged.mod.chunk.column.ErosionDecorator;
import com.terraforged.mod.chunk.column.GeologyDecorator;
import com.terraforged.mod.chunk.column.post.LayerDecorator;
import com.terraforged.mod.chunk.column.post.SnowEroder;
import com.terraforged.mod.feature.BlockDataManager;
import com.terraforged.mod.feature.Matchers;
import com.terraforged.mod.feature.feature.FreezeLayer;
import com.terraforged.mod.material.geology.GeoManager;
import com.terraforged.mod.util.setup.SetupHooks;
import net.minecraft.world.biome.Biome;

View File

@ -28,8 +28,8 @@ package com.terraforged.mod.chunk.column;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.api.material.state.States;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.util.VariablePredicate;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.world.terrain.Terrains;
import net.minecraft.block.BlockState;
import net.minecraft.world.chunk.IChunk;

View File

@ -25,9 +25,9 @@
package com.terraforged.mod.chunk.column;
import com.terraforged.api.biome.surface.ChunkSurfaceBuffer;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.api.biome.surface.ChunkSurfaceBuffer;
import com.terraforged.mod.material.geology.GeoManager;
import net.minecraft.world.chunk.IChunk;

View File

@ -1,9 +1,9 @@
package com.terraforged.mod.chunk.generator;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.util.TerraContainer;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.world.terrain.decorator.Decorator;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.biome.Biome;

View File

@ -2,10 +2,10 @@ package com.terraforged.mod.chunk.generator;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.fix.RegionFix;
import com.terraforged.mod.chunk.util.TerraContainer;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.util.Environment;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;

View File

@ -1,7 +1,7 @@
package com.terraforged.mod.chunk.generator;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.fm.predicate.FeaturePredicate;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.util.SharedSeedRandom;
import net.minecraft.util.math.BlockPos;

View File

@ -1,12 +1,12 @@
package com.terraforged.mod.chunk.generator;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.biome.surface.ChunkSurfaceBuffer;
import com.terraforged.api.biome.surface.SurfaceContext;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.util.FastChunk;
import com.terraforged.mod.chunk.util.TerraContainer;
import com.terraforged.core.tile.chunk.ChunkReader;
import net.minecraft.util.SharedSeedRandom;
import net.minecraft.world.chunk.IChunk;
import net.minecraft.world.gen.Heightmap;

View File

@ -1,8 +1,8 @@
package com.terraforged.mod.chunk.generator;
import com.terraforged.fm.template.StructureUtils;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.fix.ChunkCarverFix;
import com.terraforged.fm.template.StructureUtils;
import net.minecraft.util.SharedSeedRandom;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.biome.Biome;

View File

@ -1,11 +1,11 @@
package com.terraforged.mod.chunk.generator;
import com.terraforged.api.chunk.column.DecoratorContext;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.column.BaseDecorator;
import com.terraforged.mod.chunk.util.FastChunk;
import com.terraforged.mod.chunk.util.TerraContainer;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.feature.TerrainHelper;
import com.terraforged.world.climate.Climate;
import com.terraforged.world.heightmap.Levels;

View File

@ -1,9 +1,9 @@
package com.terraforged.mod.chunk.settings;
import com.terraforged.mod.TerraWorld;
import com.terraforged.core.serialization.annotation.Comment;
import com.terraforged.core.serialization.annotation.Range;
import com.terraforged.core.serialization.annotation.Serializable;
import com.terraforged.mod.TerraWorld;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.StringNBT;
import net.minecraft.world.WorldType;

View File

@ -25,10 +25,10 @@
package com.terraforged.mod.chunk.settings;
import com.terraforged.mod.biome.modifier.MountainModifier;
import com.terraforged.core.serialization.annotation.Comment;
import com.terraforged.core.serialization.annotation.Range;
import com.terraforged.core.serialization.annotation.Serializable;
import com.terraforged.mod.biome.modifier.MountainModifier;
@Serializable
public class Miscellaneous {

View File

@ -53,11 +53,11 @@ public class StructureSettings {
public static class Structure {
@Range(min = 1, max = 200)
@Comment("The distance (in chunks) between placements of this feature")
@Comment("The maximum distance in chunks between attempts to spawn a structure")
public int distance;
@Range(min = 1, max = 50)
@Comment("The separation (in chunks) between placements of this feature")
@Comment("The minimum distance in chunks between structure spawns")
public int separation;
public Structure() {

View File

@ -25,9 +25,9 @@
package com.terraforged.mod.chunk.test;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.cell.Cell;
import net.minecraft.world.biome.Biome;
public class TestBiomeProvider extends TerraBiomeProvider {

View File

@ -13,7 +13,6 @@ public class TestHeightMap extends Heightmap {
public TestHeightMap(GeneratorContext context) {
super(context);
terrains = context.terrain;
System.out.println("TESTETETEST");
}
@Override

View File

@ -112,7 +112,7 @@ public class SettingsScreen extends OverlayScreen {
for (Page page : pages) {
page.save();
}
parent.chunkProviderSettingsJson = NBTHelper.serializeCompact(instance.settings);
parent.chunkProviderSettingsJson = NBTHelper.stripMetadata(instance.settingsData);
SettingsScreen.setSeed(parent, preview.getSeed());
onClose();
}));

View File

@ -34,6 +34,7 @@ import java.util.List;
public class TerraToggle extends TerraButton {
private final boolean noname;
private final String prefix;
private final String name;
private final CompoundNBT value;
@ -50,6 +51,7 @@ public class TerraToggle extends TerraButton {
this.prefix = Element.getDisplayName(name, value) + ": ";
this.tooltip = Element.getToolTip(name, value);
CompoundNBT meta = value.getCompound("#" + name);
this.noname = meta.contains("noname");
this.options = meta.getList("options", Constants.NBT.TAG_STRING);
for (int i = 0; i < options.size(); i++) {
String s = options.getString(i);
@ -58,8 +60,13 @@ public class TerraToggle extends TerraButton {
break;
}
}
if (noname) {
setMessage(value.getString(name));
} else {
setMessage(prefix + value.getString(name));
}
}
public TerraToggle callback(Runnable runnable) {
this.callback = runnable;
@ -92,7 +99,11 @@ public class TerraToggle extends TerraButton {
}
String option = options.getString(index);
value.putString(name, option);
if (noname) {
setMessage(option);
} else {
setMessage(prefix + option);
}
callback.run();
}
}

View File

@ -36,8 +36,8 @@ import com.terraforged.core.tile.Size;
import com.terraforged.core.tile.Tile;
import com.terraforged.core.tile.gen.TileGenerator;
import com.terraforged.mod.client.gui.GuiKeys;
import com.terraforged.n2d.util.NoiseUtil;
import com.terraforged.mod.util.nbt.NBTHelper;
import com.terraforged.n2d.util.NoiseUtil;
import com.terraforged.world.GeneratorContext;
import com.terraforged.world.continent.MutableVeci;
import com.terraforged.world.heightmap.Levels;
@ -290,12 +290,12 @@ public class Preview extends Button {
String terrain = cell.terrain.getName().toLowerCase();
if (terrain.contains("ocean")) {
if (cell.temperature < 0.3) {
return "cold_ocean";
return "cold_" + terrain;
}
if (cell.temperature > 0.6) {
return "warm_ocean";
return "warm_" + terrain;
}
return "ocean";
return terrain;
}
if (terrain.contains("river")) {
return "river";

View File

@ -74,6 +74,7 @@ public class PreviewPage extends UpdatablePage {
preview.setHeight(Preview.HEIGHT);
addElements(right.left, right.top, right, previewerSettings, right.scrollPane::addButton, this::update);
right.scrollPane.addButton(new TerraButton(GuiKeys.PREVIEW_SEED.get()) {
@Override
public void onPress() {

View File

@ -26,6 +26,7 @@
package com.terraforged.mod.client.gui.preview;
import com.terraforged.core.serialization.annotation.Comment;
import com.terraforged.core.serialization.annotation.NoName;
import com.terraforged.core.serialization.annotation.Range;
import com.terraforged.core.serialization.annotation.Serializable;
@ -36,6 +37,7 @@ public class PreviewSettings {
@Comment("Controls the zoom level of the preview map")
public int zoom = 100 - 32;
@NoName
@Comment("Controls the rendering mode on the preview map")
public RenderMode display = RenderMode.BIOME_TYPE;
}

View File

@ -80,13 +80,35 @@ public enum RenderMode {
return rgba(cell.region, saturation, brightness);
}
},
TRANSITION_POINTS {
@Override
public int getColor(Cell cell, float scale, float bias) {
switch (cell.terrain.getType()) {
case DEEP_OCEAN:
return rgba(0.65F, 0.7F, 0.7F);
case SHALLOW_OCEAN:
return rgba(0.6F, 0.6F, 0.8F);
case BEACH:
return rgba(0.2F, 0.4F, 0.75F);
case COAST:
return rgba(0.35F, 0.75F, 0.65F);
default:
if (cell.terrain.isRiver() || cell.terrain.isWetland()) {
return rgba(0.6F, 0.6F, 0.8F);
}
return rgba(0.3F, 0.7F, 0.5F);
}
}
}
;
public int getColor(Cell cell, Levels levels) {
float baseHeight = levels.water;
if (this != TRANSITION_POINTS) {
if (cell.value < baseHeight) {
return rgba(40, 140, 200);
}
}
float bands = 10F;
float alpha = 0.2F;
float elevation = (cell.value - baseHeight) / (1F - baseHeight);

View File

@ -1,13 +1,13 @@
package com.terraforged.mod.client.gui.preview2;
import com.mojang.blaze3d.systems.RenderSystem;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.core.concurrent.thread.ThreadPool;
import com.terraforged.core.concurrent.thread.ThreadPools;
import com.terraforged.core.render.RenderAPI;
import com.terraforged.core.render.RenderSettings;
import com.terraforged.core.render.RenderWorld;
import com.terraforged.core.tile.gen.TileGenerator;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.world.GeneratorContext;
import com.terraforged.world.continent.MutableVeci;
import com.terraforged.world.continent.SpawnType;

View File

@ -1,6 +1,7 @@
package com.terraforged.mod.client.gui.preview2;
import com.terraforged.core.render.RenderMode;
import com.terraforged.core.serialization.annotation.NoName;
import com.terraforged.core.serialization.annotation.Range;
import com.terraforged.core.serialization.annotation.Serializable;
@ -10,6 +11,7 @@ public class PreviewSettings {
@Range(min = 1, max = 100)
public float zoom = 90F;
@NoName
public RenderMode display = RenderMode.BIOME_TYPE;
public float getZoom(float scale) {

View File

@ -1,8 +1,8 @@
package com.terraforged.mod.config;
import com.electronwill.nightconfig.core.CommentedConfig;
import com.terraforged.mod.Log;
import com.terraforged.core.concurrent.thread.ThreadPools;
import com.terraforged.mod.Log;
public class PerfDefaults {

View File

@ -40,6 +40,7 @@ public class DataGen {
public static void dumpData() {
File dataDir = new File("data");
WorldGenBiomes.genBiomeMap(dataDir);
WorldGenBiomes.genBiomeWeights(dataDir);
WorldGenBlocks.genBlockTags(dataDir);
WorldGenFeatures.genBiomeFeatures(dataDir);
}

View File

@ -1,7 +1,7 @@
package com.terraforged.mod.data;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.core.util.NameUtil;
import com.terraforged.mod.chunk.settings.TerraSettings;
import com.terraforged.mod.client.gui.GuiKeys;
import com.terraforged.mod.client.gui.preview2.PreviewSettings;
import com.terraforged.mod.util.TranslationKey;

View File

@ -28,6 +28,7 @@ package com.terraforged.mod.data;
import com.google.gson.GsonBuilder;
import com.terraforged.mod.biome.map.BiomeMap;
import com.terraforged.mod.biome.provider.BiomeHelper;
import com.terraforged.mod.biome.provider.BiomeWeights;
import com.terraforged.world.biome.BiomeType;
import net.minecraft.util.ResourceLocation;
@ -48,6 +49,32 @@ public class WorldGenBiomes extends DataGen {
}
}
public static void genBiomeWeights(File dataDir) {
BiomeWeights weights = new BiomeWeights();
try (BufferedWriter writer = new BufferedWriter(new FileWriter(new File(dataDir, "biome_weights.txt")))) {
writer.write("# REGISTERED BIOME WEIGHTS\n");
weights.forEachEntry((name, weight) -> {
try {
writer.write(name + "=" + weight + "\n");
} catch (IOException e) {
e.printStackTrace();
}
});
writer.write("\n");
writer.write("# UNREGISTERED BIOME WEIGHTS\n");
weights.forEachUnregistered((name, weight) -> {
try {
writer.write(name + "=" + weight + "\n");
} catch (IOException e) {
e.printStackTrace();
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
private static ResourceLocation getName(BiomeType type) {
return new ResourceLocation("terraforged", type.name().toLowerCase());
}

View File

@ -1,9 +1,9 @@
package com.terraforged.mod.feature;
import com.google.common.collect.ImmutableMap;
import com.terraforged.mod.feature.sapling.SaplingConfig;
import com.terraforged.fm.data.DataManager;
import com.terraforged.fm.util.Json;
import com.terraforged.mod.feature.sapling.SaplingConfig;
import net.minecraft.block.Block;
import java.util.HashMap;

View File

@ -25,10 +25,10 @@
package com.terraforged.mod.feature;
import com.terraforged.mod.feature.feature.DiskFeature;
import com.terraforged.fm.matcher.BiomeFeatureMatcher;
import com.terraforged.fm.matcher.biome.BiomeMatcher;
import com.terraforged.fm.matcher.feature.FeatureMatcher;
import com.terraforged.mod.feature.feature.DiskFeature;
import net.minecraft.block.Blocks;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.Feature;

View File

@ -1,12 +1,12 @@
package com.terraforged.mod.feature.context;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.fix.RegionDelegate;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.concurrent.Resource;
import com.terraforged.core.concurrent.cache.SafeCloseable;
import com.terraforged.core.concurrent.pool.ObjectPool;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.fix.RegionDelegate;
import com.terraforged.world.heightmap.Levels;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;

View File

@ -1,8 +1,8 @@
package com.terraforged.mod.feature.decorator.poisson;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.tile.chunk.ChunkReader;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.n2d.Module;
import com.terraforged.n2d.Source;
import com.terraforged.n2d.util.NoiseUtil;

View File

@ -2,10 +2,10 @@ package com.terraforged.mod.feature.sapling;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.terraforged.mod.feature.BlockDataConfig;
import com.terraforged.fm.template.TemplateManager;
import com.terraforged.fm.template.feature.TemplateFeatureConfig;
import com.terraforged.fm.util.Json;
import com.terraforged.mod.feature.BlockDataConfig;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.util.ResourceLocation;

View File

@ -25,13 +25,13 @@
package com.terraforged.mod.feature.sapling;
import com.terraforged.fm.template.Template;
import com.terraforged.fm.template.feature.TemplateFeature;
import com.terraforged.fm.template.feature.TemplateFeatureConfig;
import com.terraforged.mod.TerraWorld;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.mod.feature.BlockDataManager;
import com.terraforged.fm.template.Template;
import com.terraforged.fm.template.feature.TemplateFeature;
import com.terraforged.fm.template.feature.TemplateFeatureConfig;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.Mirror;

View File

@ -27,8 +27,8 @@ package com.terraforged.mod.material.geology;
import com.terraforged.api.material.geology.GeologyManager;
import com.terraforged.api.material.geology.StrataConfig;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.core.Seed;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.mod.material.Materials;
import com.terraforged.n2d.Module;
import com.terraforged.n2d.Source;

View File

@ -31,20 +31,20 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.concurrent.Resource;
import com.terraforged.mod.Log;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.mod.chunk.TerraChunkGenerator;
import com.terraforged.mod.chunk.TerraContext;
import com.terraforged.mod.chunk.settings.SettingsHelper;
import com.terraforged.mod.data.DataGen;
import com.terraforged.mod.server.command.arg.BiomeArgType;
import com.terraforged.mod.server.command.arg.TerrainArgType;
import com.terraforged.mod.server.command.search.BiomeSearchTask;
import com.terraforged.mod.server.command.search.BothSearchTask;
import com.terraforged.mod.server.command.search.Search;
import com.terraforged.mod.server.command.search.TerrainSearchTask;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.concurrent.Resource;
import com.terraforged.mod.data.DataGen;
import com.terraforged.world.WorldGenerator;
import com.terraforged.world.terrain.Terrain;
import com.terraforged.world.terrain.Terrains;

View File

@ -1,7 +1,7 @@
package com.terraforged.mod.server.command.search;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import com.terraforged.core.cell.Cell;
import com.terraforged.mod.biome.provider.TerraBiomeProvider;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.ChunkGenerator;

View File

@ -25,9 +25,9 @@
package com.terraforged.mod.util.setup;
import com.terraforged.mod.Log;
import com.terraforged.api.event.SetupEvent;
import com.terraforged.core.Seed;
import com.terraforged.mod.Log;
import com.terraforged.n2d.Source;
import com.terraforged.n2d.source.Builder;
import com.terraforged.world.geology.Strata;

View File

@ -26,9 +26,9 @@
package com.terraforged.mod.util.setup;
import com.terraforged.api.biome.modifier.ModifierManager;
import com.terraforged.api.biome.surface.SurfaceManager;
import com.terraforged.api.chunk.column.ColumnDecorator;
import com.terraforged.api.chunk.column.DecoratorManager;
import com.terraforged.api.biome.surface.SurfaceManager;
import com.terraforged.api.event.SetupEvent;
import com.terraforged.api.material.geology.GeologyManager;
import com.terraforged.api.material.layer.LayerManager;