Tweaked climate mapping

This commit is contained in:
Forstride 2019-05-04 14:34:57 -04:00
parent 2733f1aba9
commit 9c8e64dacb
5 changed files with 30 additions and 32 deletions

View file

@ -84,8 +84,8 @@ public enum BOPClimates
BOPClimates.BOREAL.addBiome(7, Biomes.GIANT_TREE_TAIGA).addBiome(5, Biomes.MOUNTAINS).addBiome(15, Biomes.TAIGA);
BOPClimates.COLD_SWAMP.addBiome(10, Biomes.SWAMP);
BOPClimates.WET_TEMPERATE.addBiome(3, Biomes.DARK_FOREST).addBiome(7, Biomes.FOREST);
BOPClimates.DRY_TEMPERATE.addBiome(5, Biomes.PLAINS);
BOPClimates.COOL_TEMPERATE.addBiome(7, Biomes.DARK_FOREST).addBiome(7, Biomes.FOREST).addBiome(10, Biomes.BIRCH_FOREST);
BOPClimates.DRY_TEMPERATE.addBiome(3, Biomes.PLAINS);
BOPClimates.COOL_TEMPERATE.addBiome(5, Biomes.DARK_FOREST).addBiome(7, Biomes.FOREST).addBiome(10, Biomes.BIRCH_FOREST);
BOPClimates.WARM_TEMPERATE.addBiome(7, Biomes.PLAINS);
BOPClimates.SUBTROPICAL.addBiome(5, Biomes.LUKEWARM_OCEAN);
BOPClimates.TROPICAL.addBiome(15, Biomes.JUNGLE);
@ -108,12 +108,12 @@ public enum BOPClimates
TUNDRA, TUNDRA, TUNDRA, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, COLD_DESERT, // 0
BOREAL, BOREAL, BOREAL, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, // 1
COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, // 2
COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 3
WET_TEMPERATE, WET_TEMPERATE, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 4
SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, SAVANNA, SAVANNA, // 5
COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 3
WET_TEMPERATE, WET_TEMPERATE, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 4
SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, MEDITERRANEAN, SAVANNA, SAVANNA, // 5
TROPICAL, SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, MEDITERRANEAN, SAVANNA, SAVANNA, HOT_DESERT, // 6
TROPICAL, TROPICAL, SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, HOT_DESERT, // 7
TROPICAL, TROPICAL, TROPICAL, SUBTROPICAL, WET_TEMPERATE, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, WASTELAND, WASTELAND // 8
TROPICAL, TROPICAL, SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, SAVANNA, HOT_DESERT, HOT_DESERT, // 7
TROPICAL, TROPICAL, TROPICAL, SUBTROPICAL, WET_TEMPERATE, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, WASTELAND // 8
};
public static int[] getClimateMappingInts()

View file

@ -51,7 +51,7 @@ public class BogBiome extends BiomeBOP
{
public BogBiome()
{
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(BOPBiomeFeatures.BOG_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.SWAMP).depth(-0.1F).scale(0.05F).temperature(0.55F).downfall(0.9F).waterColor(0x354762).waterFogColor(0x040511).parent((String)null));
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(BOPBiomeFeatures.PODZOL_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.SWAMP).depth(-0.1F).scale(0.05F).temperature(0.55F).downfall(0.9F).waterColor(0x354762).waterFogColor(0x040511).parent((String)null));
// Mineshafts and Strongholds
this.addStructure(Feature.SWAMP_HUT, new SwampHutConfig());
@ -87,11 +87,11 @@ public class BogBiome extends BiomeBOP
// Vegetation
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DARK_OAK_TWIGLET_TREE, BOPBiomeFeatures.TALL_TWIGLET_TREE, BOPBiomeFeatures.DEAD_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.8F, 0.4F, 0.1F}, BOPBiomeFeatures.DYING_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(4, 0.2F, 1)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BIG_BROWN_MUSHROOM, IFeatureConfig.NO_FEATURE_CONFIG, AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.75F, 0.1F, 1)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(5)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BIG_BROWN_MUSHROOM, IFeatureConfig.NO_FEATURE_CONFIG, AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.8F, 0.1F, 1)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(8)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(15)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(8)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.toadstool), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(4)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.toadstool), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(5)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.REED, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.PUMPKIN, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(32)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.SEA_GRASS, new SeaGrassConfig(64, 0.6D), TOP_SOLID_ONCE, IPlacementConfig.NO_PLACEMENT_CONFIG));

View file

@ -84,7 +84,7 @@ public class BOPBiomeFeatures
public static final AbstractFlowersFeature WETLAND_FLOWERS = new WetlandFlowersFeature();
public static final AbstractFlowersFeature XERIC_SHRUBLAND_FLOWERS = new XericShrublandFlowersFeature();
public static final ISurfaceBuilder<SurfaceBuilderConfig> BOG_SURFACE_BUILDER = new BogSurfaceBuilder();
public static final ISurfaceBuilder<SurfaceBuilderConfig> PODZOL_SURFACE_BUILDER = new PodzolSurfaceBuilder();
public static final SurfaceBuilderConfig RED_SAND_SURFACE = new SurfaceBuilderConfig(Blocks.RED_SAND.getDefaultState(), Blocks.RED_SAND.getDefaultState(), Blocks.RED_SAND.getDefaultState());
public static final SurfaceBuilderConfig SNOW_SNOW_GRAVEL_SURFACE = new SurfaceBuilderConfig(Blocks.SNOW_BLOCK.getDefaultState(), Blocks.SNOW_BLOCK.getDefaultState(), Blocks.GRAVEL.getDefaultState());

View file

@ -27,10 +27,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import net.minecraft.world.gen.surfacebuilders.ISurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
public class BogSurfaceBuilder implements ISurfaceBuilder<SurfaceBuilderConfig> {
public class PodzolSurfaceBuilder implements ISurfaceBuilder<SurfaceBuilderConfig> {
public void buildSurface(Random random, IChunk chunkIn, Biome biomeIn, int x, int z, int startHeight, double noise, IBlockState defaultBlock, IBlockState defaultFluid, int seaLevel, long seed, SurfaceBuilderConfig config) {
if (noise > 1.9D) {
Biome.DEFAULT_SURFACE_BUILDER.buildSurface(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, Biome.COARSE_DIRT_DIRT_GRAVEL_SURFACE);
Biome.DEFAULT_SURFACE_BUILDER.buildSurface(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, Biome.PODZOL_DIRT_GRAVEL_SURFACE);
} else {
Biome.DEFAULT_SURFACE_BUILDER.buildSurface(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, Biome.GRASS_DIRT_GRAVEL_SURFACE);
}

View file

@ -46,25 +46,23 @@ public enum GenLayerBiomeBOP implements IAreaTransformer2, IDimOffset0Transforme
throw new RuntimeException(msg,e);
}
// Don't allow oceans to generate in extreme climates or the biomes immediately surrounding them
if (climate.ordinal() > BOPClimates.TUNDRA.ordinal() && climate.ordinal() < BOPClimates.HOT_DESERT.ordinal())
// At this point, oceans and land have been assigned, and so have mushroom islands
if (landSeaVal == DEEP_OCEAN)
{
// At this point, oceans and land have been assigned, and so have mushroom islands
if (landSeaVal == DEEP_OCEAN)
{
return IRegistry.BIOME.getId(climate.getRandomOceanBiome(context, true));
}
else if ((landSeaVal == MUSHROOM_FIELDS /*|| ModBiomes.islandBiomesMap.containsKey(landSeaVal)*/) && climate.biomeType != BiomeManager.BiomeType.ICY) // TODO
{
// keep islands, unless it's in an icy climate in which case, replace
return landSeaVal;
}
else if (landSeaVal == 0)
{
return IRegistry.BIOME.getId(climate.getRandomOceanBiome(context, false));
}
return IRegistry.BIOME.getId(climate.getRandomOceanBiome(context, true));
}
else if ((landSeaVal == MUSHROOM_FIELDS /*|| ModBiomes.islandBiomesMap.containsKey(landSeaVal)*/) && climate.biomeType != BiomeManager.BiomeType.ICY) // TODO
{
// keep islands, unless it's in an icy climate in which case, replace
return landSeaVal;
}
else if (landSeaVal == 0)
{
return IRegistry.BIOME.getId(climate.getRandomOceanBiome(context, false));
}
else
{
return IRegistry.BIOME.getId(climate.getRandomBiome(context));
}
return IRegistry.BIOME.getId(climate.getRandomBiome(context));
}
}