Added ATG Integration.

This commit is contained in:
Amnet 2013-10-21 20:05:20 +02:00
parent d1f970961c
commit e78f941deb
14 changed files with 818 additions and 0 deletions

View file

@ -0,0 +1,11 @@
package ttftcuts.atg.api;
import net.minecraft.world.World;
public class ATGAPI {
public static boolean WorldIsATG(World world) {
return world.provider.terrainType.getWorldTypeName() == "ATG";
}
}

View file

@ -0,0 +1,91 @@
package ttftcuts.atg.api;
import java.lang.reflect.Method;
import ttftcuts.atg.api.events.ATGBiomeEvent;
import ttftcuts.atg.api.events.ATGBiomeGroupAddEvent;
import ttftcuts.atg.api.events.ATGBiomeGroupEvent;
import ttftcuts.atg.api.events.ATGBiomeModEvent;
import ttftcuts.atg.api.events.ATGBiomeModEvent.EventType;
import ttftcuts.atg.api.events.ATGBiomeModRequestEvent;
import ttftcuts.atg.api.events.ATGBiomeRequestEvent;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.MinecraftForge;
import com.google.common.base.Optional;
public abstract class ATGBiomes {
public static enum BiomeType { LAND, COAST, SEA }
// Get ATG biomes
public static BiomeGenBase getBiome(String biomeName) {
final ATGBiomeRequestEvent event = new ATGBiomeRequestEvent(biomeName);
MinecraftForge.EVENT_BUS.post(event);
if ( !event.biome.isPresent() ) {
return null;
}
return event.biome.get();
}
// Add Biome Groups
public static void addBiomeGroup(BiomeType type, String name, double temp, double moisture, double height, double minHeight, double maxHeight, long salt) {
ATGBiomeGroupAddEvent event = new ATGBiomeGroupAddEvent(type, name, temp, moisture, height, minHeight, maxHeight, salt);
MinecraftForge.EVENT_BUS.post(event);
if ( event.response == ATGBiomeGroupAddEvent.ResponseType.FAILED ) {
// FAILED!
}
}
public static void addBiomeGroup(BiomeType type, String name, double temp, double moisture, double height, long salt) {
addBiomeGroup(type, name, temp, moisture, height, 0.0, 1.0, salt);
}
public static void addBiomeGroup(BiomeType type, String name, double temp, double moisture, double height) {
addBiomeGroup(type, name, temp, moisture, height, 0);
}
// Manipulate biome groups
public static void modGroupSuitability(BiomeType type, String name, double modifier) {
ATGBiomeGroupEvent event = new ATGBiomeGroupEvent( ATGBiomeGroupEvent.EventType.SUITABILITY, type, name, modifier );
MinecraftForge.EVENT_BUS.post(event);
if ( event.response == ATGBiomeGroupEvent.ResponseType.FAILED ) {
// FAILED!
}
}
// Registering Biomes
public static void addBiome(BiomeType type, String group, BiomeGenBase biome, double weight) {
ATGBiomeEvent event = new ATGBiomeEvent( type, group, biome, null, weight);
MinecraftForge.EVENT_BUS.post(event);
}
public static void replaceBiome(BiomeType type, String group, BiomeGenBase toReplace, BiomeGenBase replacement, double weight) {
ATGBiomeEvent event = new ATGBiomeEvent( type, group, replacement, toReplace, weight );
MinecraftForge.EVENT_BUS.post(event);
}
// Sub-biomes
public static void addSubBiome(BiomeGenBase biome, BiomeGenBase subBiome, double weight) {
ATGBiomeModEvent event = new ATGBiomeModEvent(ATGBiomeModEvent.EventType.SUBBIOME, biome, null, subBiome, weight);
MinecraftForge.EVENT_BUS.post(event);
}
// Gen Mods
public static void addGenMod(BiomeGenBase biome, IGenMod mod) {
ATGBiomeModEvent event = new ATGBiomeModEvent(ATGBiomeModEvent.EventType.GENMOD, biome, mod, null, 0);
MinecraftForge.EVENT_BUS.post(event);
}
public static Optional<IGenMod> getGenMod(BiomeGenBase biome) {
ATGBiomeModRequestEvent event = new ATGBiomeModRequestEvent(biome);
MinecraftForge.EVENT_BUS.post(event);
return event.mod;
}
}

View file

@ -0,0 +1,9 @@
package ttftcuts.atg.api;
import java.util.Random;
public interface IGenMod {
public int modify( int height, Random random, double rawHeight );
public double noiseFactor();
}

View file

@ -0,0 +1,29 @@
package ttftcuts.atg.api.events;
import ttftcuts.atg.api.ATGBiomes.BiomeType;
import com.google.common.base.Optional;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.Event;
public class ATGBiomeEvent extends Event {
public static enum ResponseType { NONE, ADDED, REPLACED, BAD_GROUP, FAILED };
public BiomeType type;
public ResponseType response;
public String group;
public BiomeGenBase biome;
public BiomeGenBase replaced;
public double weight;
public ATGBiomeEvent(BiomeType type, String group, BiomeGenBase biome, BiomeGenBase replaced, double weight) {
this.type = type;
this.group = group;
this.biome = biome;
this.replaced = replaced;
this.weight = weight;
this.response = ResponseType.NONE;
}
}

View file

@ -0,0 +1,31 @@
package ttftcuts.atg.api.events;
import ttftcuts.atg.api.ATGBiomes.BiomeType;
import net.minecraftforge.event.Event;
public class ATGBiomeGroupAddEvent extends Event {
public static enum ResponseType { NONE, OK, FAILED };
public BiomeType type;
public ResponseType response;
public String name;
public double temp;
public double moisture;
public double height;
public double minHeight;
public double maxHeight;
public long salt;
public ATGBiomeGroupAddEvent( BiomeType type, String name, double temp, double moisture, double height, double minHeight, double maxHeight, long salt) {
this.type = type;
this.name = name;
this.temp = temp;
this.moisture = moisture;
this.height = height;
this.minHeight = minHeight;
this.maxHeight = maxHeight;
this.salt = salt;
this.response = ResponseType.NONE;
}
}

View file

@ -0,0 +1,24 @@
package ttftcuts.atg.api.events;
import ttftcuts.atg.api.ATGBiomes.BiomeType;
import net.minecraftforge.event.Event;
public class ATGBiomeGroupEvent extends Event {
public static enum EventType { SUITABILITY };
public static enum ResponseType { NONE, OK, FAILED };
public EventType type;
public BiomeType biomeType;
public ResponseType response;
public String name;
public double modifier;
public ATGBiomeGroupEvent( EventType type, BiomeType biomeType, String name, double modifier ) {
this.type = type;
this.biomeType = biomeType;
this.name = name;
this.modifier = modifier;
this.response = ResponseType.NONE;
}
}

View file

@ -0,0 +1,25 @@
package ttftcuts.atg.api.events;
import ttftcuts.atg.api.IGenMod;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.Event;
public class ATGBiomeModEvent extends Event {
public static enum EventType { GENMOD, SUBBIOME }
public EventType type;
public BiomeGenBase biome;
public IGenMod mod;
public BiomeGenBase subBiome;
public double weight;
public ATGBiomeModEvent( EventType type, BiomeGenBase biome, IGenMod mod, BiomeGenBase subBiome, double weight ) {
this.type = type;
this.biome = biome;
this.subBiome = subBiome;
this.mod = mod;
this.weight = weight;
}
}

View file

@ -0,0 +1,19 @@
package ttftcuts.atg.api.events;
import ttftcuts.atg.api.IGenMod;
import com.google.common.base.Optional;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.Event;
public class ATGBiomeModRequestEvent extends Event {
public BiomeGenBase biome;
public Optional<IGenMod> mod;
public ATGBiomeModRequestEvent(BiomeGenBase biome) {
this.biome = biome;
this.mod = Optional.absent();
}
}

View file

@ -0,0 +1,17 @@
package ttftcuts.atg.api.events;
import com.google.common.base.Optional;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.Event;
public class ATGBiomeRequestEvent extends Event {
public String biomeName;
public Optional<BiomeGenBase> biome;
public ATGBiomeRequestEvent(String biomeName) {
this.biomeName = biomeName;
this.biome = Optional.absent();
}
}

View file

@ -0,0 +1,26 @@
package biomesoplenty.integration.ATG;
import java.util.Random;
import ttftcuts.atg.api.IGenMod;
public class GenModAbyss implements IGenMod {
private static final double smooth = 0.4; // how much double height vs how much int height
private static final int cutoff = 45; // top of the shelves
private static final double slopefactor = 0.12; // 1/slopefactor blocks of real height shifts from "height" to "abyss" level.
@Override
public int modify(int height, Random random, double rawHeight) {
double heightmix = height * (1-smooth) + ( rawHeight*256 ) * smooth;
double factor = Math.min(1,Math.max(0, (cutoff-heightmix)*slopefactor));
double abyss = rawHeight*rawHeight;
return Math.max(5, (int)Math.round( (factor * abyss + (1-factor) * rawHeight) *256 ) );
}
@Override
public double noiseFactor() {
return 150.0;
}
}

View file

@ -0,0 +1,21 @@
package biomesoplenty.integration.ATG;
import java.util.Random;
import ttftcuts.atg.api.IGenMod;
public class GenModCanyonRavine implements IGenMod {
private final static double cutoff = 0.45;
@Override
public int modify(int height, Random random, double rawHeight) {
return (int)Math.round(height * 0.6 + ((rawHeight - cutoff)*0.7+cutoff)*256*0.4);
}
@Override
public double noiseFactor() {
return 20.0;
}
}

View file

@ -0,0 +1,19 @@
package biomesoplenty.integration.ATG;
import java.util.Random;
import ttftcuts.atg.api.IGenMod;
public class GenModGlacier implements IGenMod {
@Override
public int modify(int height, Random random, double rawHeight) {
return height + 3;
}
@Override
public double noiseFactor() {
return 1.0;
}
}

View file

@ -0,0 +1,485 @@
package biomesoplenty.integration;
import biomesoplenty.api.Biomes;
import biomesoplenty.integration.ATG.*;
import net.minecraft.world.biome.BiomeGenBase;
import ttftcuts.atg.api.ATGBiomes;
import ttftcuts.atg.api.ATGBiomes.BiomeType;
import ttftcuts.atg.api.IGenMod;
public class ATGIntegration {
static double nb = 0.1; // Modifier used for biomes that have their own group
static double[] tiers = { 1.0, 0.5, 0.3, 0.2, 0.1, 0.04 };
static private BiomeType land = BiomeType.LAND;
static private BiomeType coast = BiomeType.COAST;
static private BiomeType sea = BiomeType.SEA;
protected static void init()
{
addSubBiomes();
addLandBiomesGroup();
addBeachBiomesGroup();
addOceanBiomesGroup();
}
private static void addSubBiomes()
{
// ########################
// sub-biomes
// ########################
ATGBiomes.addSubBiome(Biomes.meadow.get(), Biomes.meadowForest.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.canyon.get(), Biomes.canyonRavine.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.shrubland.get(), Biomes.shrublandForest.get(), 0.5);
ATGBiomes.addSubBiome(Biomes.ominousWoods.get(), Biomes.ominousWoodsThick.get(), 0.5);
ATGBiomes.addSubBiome(Biomes.pasture.get(), Biomes.pastureMeadow.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.pasture.get(), Biomes.pastureThin.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.timber.get(), Biomes.timberThin.get(), 0.5);
ATGBiomes.addSubBiome(Biomes.alps.get(), Biomes.alpsForest.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.alps.get(), Biomes.alpsBase.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.seasonalForest.get(), Biomes.seasonalSpruceForest.get(), 1.0);
ATGBiomes.addSubBiome(Biomes.field.get(), Biomes.fieldForest.get(), 1.0);
}
private static void addLandBiomesGroup()
{
addForestBiomesGroup();
addJungleBiomesGroup();
addPlainsBiomesGroup();
addIcePlainsBiomesGroup();
addTaigaBiomesGroup();
addDesertBiomesGroup();
addShrublandBiomesGroup();
addBorealForestBiomesGroup();
addTundraBiomesGroup();
addSteppeBiomesGroup();
addSavannahBiomesGroup();
addTropicalShrublandBiomesGroup();
addWoodlandBiomesGroup();
addMesaBiomesGroup();
addSwamplandBiomesGroup();
}
private static void addForestBiomesGroup()
{
// ########################
// forest
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Forest", BiomeGenBase.forest, Biomes.forestNew.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Forest", Biomes.birchForest.get(), tiers[1]);
ATGBiomes.addBiome(land, "Forest", Biomes.woodland.get(), tiers[1] * nb); // out of base group
ATGBiomes.addBiome(land, "Forest", Biomes.spruceWoods.get(), tiers[1] * nb); // out of base group
// tier 3
ATGBiomes.addBiome(land, "Forest", Biomes.coniferousForest.get(), tiers[2] * nb); // out of base group
ATGBiomes.addBiome(land, "Forest", Biomes.temperateRainforest.get(), tiers[2] );
ATGBiomes.addBiome(land, "Forest", Biomes.redwoodForest.get(), tiers[2]);
ATGBiomes.addBiome(land, "Forest", Biomes.mountain.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(land, "Forest", Biomes.mapleWoods.get(), tiers[3]);
ATGBiomes.addBiome(land, "Forest", Biomes.seasonalForest.get(), tiers[3]);
ATGBiomes.addBiome(land, "Forest", Biomes.borealForest.get(), tiers[3] * nb); // out of base group
ATGBiomes.addBiome(land, "Forest", Biomes.deciduousForest.get(), tiers[3]);
ATGBiomes.addBiome(land, "Forest", Biomes.highland.get(), tiers[3] * nb); // out of base group
// tier 5
ATGBiomes.addBiome(land, "Forest", Biomes.deadForest.get(), tiers[4]);
ATGBiomes.addBiome(land, "Forest", Biomes.grove.get(), tiers[4]);
ATGBiomes.addBiome(land, "Forest", Biomes.timber.get(), tiers[4]);
ATGBiomes.addBiome(land, "Forest", Biomes.thicket.get(), tiers[4]);
ATGBiomes.addBiome(land, "Forest", Biomes.shield.get(), tiers[4]);
// tier 6
ATGBiomes.addBiome(land, "Forest", Biomes.fungiForest.get(), tiers[5]);
ATGBiomes.addBiome(land, "Forest", Biomes.cherryBlossomGrove.get(), tiers[5]);
ATGBiomes.addBiome(land, "Forest", Biomes.mysticGrove.get(), tiers[5]);
ATGBiomes.addBiome(land, "Forest", Biomes.hotSprings.get(), tiers[5]);
ATGBiomes.addBiome(land, "Forest", Biomes.originValley.get(), tiers[5] * 0.5); // better at lowland?
}
private static void addJungleBiomesGroup()
{
// ########################
// Jungle
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Jungle", BiomeGenBase.jungle, Biomes.jungleNew.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Jungle", Biomes.tropicalRainforest.get(), tiers[1]);
ATGBiomes.addBiome(land, "Jungle", Biomes.rainforest.get(), tiers[1]);
// tier 3
ATGBiomes.addBiome(land, "Jungle", Biomes.tropics.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(land, "Jungle", Biomes.bambooForest.get(), tiers[3]);
ATGBiomes.addBiome(land, "Jungle", Biomes.jadeCliffs.get(), tiers[3]);
// tier 5
// tier 6
ATGBiomes.addBiome(land, "Jungle", Biomes.sacredSprings.get(), tiers[5]);
}
private static void addPlainsBiomesGroup()
{
// ########################
// Plains
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Plains", BiomeGenBase.plains, Biomes.plainsNew.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Plains", Biomes.shrubland.get(), tiers[1] * nb); // out of base group
ATGBiomes.addBiome(land, "Plains", Biomes.chaparral.get(), tiers[1]);
ATGBiomes.addBiome(land, "Plains", Biomes.prairie.get(), tiers[1]);
// tier 3
ATGBiomes.addBiome(land, "Plains", Biomes.field.get(), tiers[2]);
ATGBiomes.addBiome(land, "Plains", Biomes.grassland.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(land, "Plains", Biomes.pasture.get(), tiers[3]);
ATGBiomes.addBiome(land, "Plains", Biomes.meadow.get(), tiers[3]);
// tier 5
ATGBiomes.addBiome(land, "Plains", Biomes.orchard.get(), tiers[4]);
ATGBiomes.addBiome(land, "Plains", Biomes.overgrownGreens.get(), tiers[4]);
ATGBiomes.addBiome(land, "Plains", Biomes.lavenderFields.get(), tiers[4]);
// tier 6
ATGBiomes.addBiome(land, "Plains", Biomes.garden.get(), tiers[5]);
}
private static void addIcePlainsBiomesGroup()
{
// ########################
// Ice Plains
// ########################
// tier 1
ATGBiomes.addBiome(land, "Ice Plains", Biomes.alps.get(), tiers[0]);
// tier 2
// tier 3
ATGBiomes.addBiome(land, "Ice Plains", Biomes.polar.get(), tiers[2]);
ATGBiomes.addBiome(land, "Ice Plains", Biomes.glacier.get(), tiers[2]);
ATGBiomes.addGenMod(Biomes.glacier.get(), new GenModGlacier());
ATGBiomes.addBiome(land, "Ice Plains", Biomes.arctic.get(), tiers[2]);
// tier 4
// tier 5
// tier 6
ATGBiomes.addBiome(land, "Ice Plains", Biomes.icyHills.get(), tiers[5]);
}
private static void addTaigaBiomesGroup()
{
// ########################
// Taiga
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Taiga", BiomeGenBase.taiga, Biomes.taigaNew.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Taiga", Biomes.alpsForest.get(), tiers[1]);
ATGBiomes.addBiome(land, "Taiga", Biomes.coniferousForestSnow.get(), tiers[1]);
ATGBiomes.addBiome(land, "Taiga", Biomes.frostForest.get(), tiers[1]);
// tier 3
// tier 4
// tier 5
ATGBiomes.addBiome(land, "Taiga", Biomes.deadForestSnow.get(), tiers[4]);
// tier 6
ATGBiomes.addBiome(land, "Taiga", Biomes.icyHills.get(), tiers[5] * nb);
}
private static void addDesertBiomesGroup()
{
// ########################
// Desert
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Desert", BiomeGenBase.desert, Biomes.desertNew.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Desert", Biomes.dunes.get(), tiers[1]);
// tier 3
ATGBiomes.addBiome(land, "Desert", Biomes.outback.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(land, "Desert", Biomes.lushDesert.get(), tiers[3]);
// tier 5
// tier 6
ATGBiomes.addBiome(land, "Desert", Biomes.oasis.get(), tiers[5]);
}
private static void addShrublandBiomesGroup()
{
// ########################
// Shrubland
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Shrubland", ATGBiomes.getBiome("Shrubland"), Biomes.shrubland.get(), tiers[0]);
// tier 2
// tier 3
ATGBiomes.addBiome(land, "Shrubland", Biomes.heathland.get(), tiers[2]);
// tier 4
// tier 5
ATGBiomes.addBiome(land, "Shrubland", Biomes.thicket.get(), tiers[4]);
// tier 6
}
private static void addBorealForestBiomesGroup()
{
// ########################
// Boreal Forest
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Boreal Forest", ATGBiomes.getBiome("BorealForest"), Biomes.borealForest.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.coniferousForest.get(), tiers[1]);
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.spruceWoods.get(), tiers[1]);
// tier 3
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.forestNew.get(), tiers[2] * nb); // out of base group
// tier 4
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.shield.get(), tiers[3]);
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.timber.get(), tiers[3]);
// tier 5
ATGBiomes.addBiome(land, "Boreal Forest", Biomes.deadForest.get(), tiers[4]);
// tier 6
}
private static void addTundraBiomesGroup()
{
// ########################
// Tundra
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Tundra", ATGBiomes.getBiome("Tundra"), Biomes.tundra.get(), tiers[0]);
// tier 2
// tier 3
ATGBiomes.addBiome(land, "Tundra", BiomeGenBase.icePlains, tiers[2]);
// tier 4
// tier 5
ATGBiomes.addBiome(land, "Tundra", Biomes.borealForest.get(), tiers[4] * nb); // out of base group
// tier 6
ATGBiomes.addBiome(land, "Tundra", Biomes.steppe.get(), tiers[5]);
}
private static void addSteppeBiomesGroup()
{
// ########################
// Steppe
// ########################
// tier 1
// tier 2
// tier 3
ATGBiomes.addBiome(land, "Steppe", Biomes.crag.get(), tiers[2]);
// tier 4
// tier 5
ATGBiomes.addBiome(land, "Steppe", Biomes.mountain.get(), tiers[4]);
// tier 6
ATGBiomes.addBiome(land, "Steppe", Biomes.deadForest.get(), tiers[5]);
}
private static void addSavannahBiomesGroup()
{
// ########################
// Savannah
// ########################
// tier 1
ATGBiomes.replaceBiome(land, "Savanna", ATGBiomes.getBiome("Savanna"), Biomes.savanna.get(), 1.0);
// tier 2
// tier 3
ATGBiomes.addBiome(land, "Savanna", Biomes.scrubland.get(), tiers[2]);
ATGBiomes.addBiome(land, "Savanna", Biomes.outback.get(), tiers[2] * nb); // out of base group
ATGBiomes.addBiome(land, "Savanna", Biomes.steppe.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(land, "Savanna", Biomes.lushDesert.get(), tiers[3]);
// tier 5
ATGBiomes.addBiome(land, "Savanna", Biomes.brushland.get(), tiers[4]);
// tier 6
}
private static void addTropicalShrublandBiomesGroup()
{
// ########################
// Tropical Shrubland
// ########################
// tier 1
// tier 2
ATGBiomes.addBiome(land, "Tropical Shrubland", Biomes.tropics.get(), tiers[1]);
// tier 3
// tier 4
ATGBiomes.addBiome(land, "Tropical Shrubland", Biomes.bambooForest.get(), tiers[3]);
// tier 5
// tier 6
ATGBiomes.addBiome(land, "Tropical Shrubland", Biomes.sacredSprings.get(), tiers[5]);
}
private static void addWoodlandBiomesGroup()
{
// ########################
// Woodland
// ########################
// tier 1
// tier 2
ATGBiomes.addBiome(land, "Woodland", Biomes.woodland.get(), tiers[1]);
// tier 3
// tier 4
ATGBiomes.addBiome(land, "Woodland", Biomes.thicket.get(), tiers[3]);
// tier 5
// tier 6
ATGBiomes.addBiome(land, "Woodland", Biomes.birchForest.get(), tiers[5]);
}
private static void addMesaBiomesGroup()
{
// ########################
// Mesa
// ########################
ATGBiomes.addBiome(land, "Mesa", Biomes.badlands.get(), tiers[0]);
ATGBiomes.addBiome(land, "Mesa", Biomes.canyon.get(), tiers[0]);
ATGBiomes.addGenMod(Biomes.canyonRavine.get(), new GenModCanyonRavine());
}
private static void addSwamplandBiomesGroup()
{
// ########################
// Swampland
// ########################
// tier 1
ATGBiomes.addBiome(coast, "Swampland", Biomes.wetland.get(), tiers[0]);
// tier 2
ATGBiomes.addBiome(coast, "Swampland", Biomes.marsh.get(), tiers[1]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.lushSwamp.get(), tiers[1]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.bayou.get(), tiers[1]);
// tier 3
ATGBiomes.replaceBiome(coast, "Swampland", BiomeGenBase.swampland, Biomes.swamplandNew.get(), tiers[2]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.fen.get(), tiers[2]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.bog.get(), tiers[2]);
// tier 4
ATGBiomes.addBiome(coast, "Swampland", Biomes.moor.get(), tiers[3]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.deadSwamp.get(), tiers[3]);
// tier 5
ATGBiomes.addBiome(coast, "Swampland", Biomes.quagmire.get(), tiers[4]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.sludgepit.get(), tiers[4]);
// tier 6
ATGBiomes.addBiome(coast, "Swampland", Biomes.ominousWoods.get(), tiers[5]);
ATGBiomes.addBiome(coast, "Swampland", Biomes.silkglades.get(), tiers[5]);
// swamp modifiers
IGenMod swampmod = ATGBiomes.getGenMod(BiomeGenBase.swampland).get();
ATGBiomes.addGenMod(Biomes.wetland.get(), swampmod);
ATGBiomes.addGenMod(Biomes.lushSwamp.get(), swampmod);
ATGBiomes.addGenMod(Biomes.bayou.get(), swampmod);
ATGBiomes.addGenMod(Biomes.swamplandNew.get(), swampmod);
ATGBiomes.addGenMod(Biomes.fen.get(), swampmod);
ATGBiomes.addGenMod(Biomes.bog.get(), swampmod);
ATGBiomes.addGenMod(Biomes.moor.get(), swampmod);
ATGBiomes.addGenMod(Biomes.deadSwamp.get(), swampmod);
ATGBiomes.addGenMod(Biomes.quagmire.get(), swampmod);
ATGBiomes.addGenMod(Biomes.sludgepit.get(), swampmod);
ATGBiomes.addGenMod(Biomes.ominousWoods.get(), swampmod);
ATGBiomes.addGenMod(Biomes.silkglades.get(), swampmod);
}
private static void addBeachBiomesGroup()
{
// ########################
// Beaches
// ########################
ATGBiomes.addBiome(coast, "Beach", Biomes.beachOvergrown.get(), 0.2);
ATGBiomes.replaceBiome(coast, "Gravel Beach", ATGBiomes.getBiome("GravelBeach"), Biomes.beachGravel.get(), 1.0);
}
private static void addOceanBiomesGroup()
{
// ########################
// Oceans
// ########################
ATGBiomes.addBiome(sea, "Ocean", Biomes.oceanCoral.get(), 0.05);
ATGBiomes.addBiome(sea, "Ocean", Biomes.oceanKelp.get(), 0.1);
ATGBiomes.replaceBiome(sea, "Deep Ocean", BiomeGenBase.ocean, Biomes.oceanAbyss.get(), 1.0);
ATGBiomes.addGenMod(Biomes.oceanAbyss.get(), new GenModAbyss());
}
}

View file

@ -88,5 +88,16 @@ public class BOPCrossIntegration {
e.printStackTrace(System.err); e.printStackTrace(System.err);
} }
} }
if (Loader.isModLoaded("ATG"))
{
try {
ATGIntegration.init();
}
catch (Exception e) {
System.out.println("[BiomesOPlenty] There was an error while integrating Alternate Terrain Generation with Biomes O' Plenty!");
e.printStackTrace(System.err);
}
}
} }
} }