Beginnings of an API - Biomes done
This commit is contained in:
parent
fe26d931a1
commit
794b53ae55
7 changed files with 706 additions and 582 deletions
89
src/minecraft/tdwp_ftw/biomesop/api/Biomes.java
Normal file
89
src/minecraft/tdwp_ftw/biomesop/api/Biomes.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
package tdwp_ftw.biomesop.api;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class Biomes
|
||||
{
|
||||
public static Optional<? extends BiomeGenBase> alps = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> arctic = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> badlands = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> bambooForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> bayou = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> birchForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> bog = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> borealForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> canyon = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> chaparral = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> cherryBlossomGrove = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> coniferousForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> crag = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> deadForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> deadSwamp = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> deadlands = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> deciduousForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> drylands = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> dunes = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> fen = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> field = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> frostForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> fungiForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> garden = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> glacier = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> grassland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> grove = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> heathland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> highland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> iceSheet = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> icyHills = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> jadeCliffs = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> lushDesert = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> lushSwamp = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> mangrove = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> mapleWoods = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> marsh = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> meadow = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> mesa = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> moor = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> mountain = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> mysticGrove = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> oasis = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> ominousWoods = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> orchard = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> originValley = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> outback = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> pasture = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> prairie = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> promisedLand = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> quagmire = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> rainforest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> redwoodForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> sacredSprings = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> savanna = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> scrubland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> seasonalForest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> shield = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> shore = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> shrubland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> snowyWoods = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> spruceWoods = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> steppe = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> swampwoods = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> temperateRainforest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> thicket = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> tropicalRainforest = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> tropics = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> tundra = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> volcano = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> wasteland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> wetland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> woodland = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> plainsNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> desertNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> extremeHillsNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> forestNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> taigaNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> swamplandNew = Optional.absent();
|
||||
public static Optional<? extends BiomeGenBase> jungleNew = Optional.absent();
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,31 +1,26 @@
|
|||
package tdwp_ftw.biomesop.helpers;
|
||||
|
||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBiomes;
|
||||
import tdwp_ftw.biomesop.helpers.BiomeCachePromised;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.WorldChunkManager;
|
||||
import net.minecraft.world.gen.layer.GenLayer;
|
||||
import net.minecraft.world.gen.layer.IntCache;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeCache;
|
||||
import net.minecraft.world.biome.WorldChunkManager;
|
||||
|
||||
import net.minecraftforge.common.*;
|
||||
import net.minecraftforge.event.terraingen.*;
|
||||
import static net.minecraft.world.biome.BiomeGenBase.*;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.terraingen.WorldTypeEvent;
|
||||
import tdwp_ftw.biomesop.api.Biomes;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WorldChunkManagerPromised extends WorldChunkManager
|
||||
{
|
||||
public static ArrayList<BiomeGenBase> allowedBiomes = new ArrayList<BiomeGenBase>(Arrays.asList(BOPBiomes.promisedLand));
|
||||
public static ArrayList<BiomeGenBase> allowedBiomes = new ArrayList<BiomeGenBase>(Arrays.asList(Biomes.promisedLand.get()));
|
||||
private GenLayer genBiomes;
|
||||
|
||||
/** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
|
||||
|
|
|
@ -1,29 +1,25 @@
|
|||
package tdwp_ftw.biomesop.helpers;
|
||||
|
||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBiomes;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBlocks;
|
||||
import tdwp_ftw.biomesop.declarations.BOPConfiguration;
|
||||
//import tdwp_ftw.biomesop.helpers.WorldChunkManagerPromised;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.gen.ChunkProviderHell;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.WorldChunkManagerHell;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.biome.WorldChunkManagerHell;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import tdwp_ftw.biomesop.api.Biomes;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBlocks;
|
||||
import tdwp_ftw.biomesop.declarations.BOPConfiguration;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
//import tdwp_ftw.biomesop.helpers.WorldChunkManagerPromised;
|
||||
|
||||
public class WorldProviderPromised extends WorldProvider
|
||||
{
|
||||
public void registerWorldChunkManager()
|
||||
{
|
||||
this.worldChunkMgr = new WorldChunkManagerHell(BOPBiomes.promisedLand, 0.8F, 0.1F);
|
||||
if (Biomes.promisedLand.isPresent())
|
||||
this.worldChunkMgr = new WorldChunkManagerHell(Biomes.promisedLand.get(), 0.8F, 0.1F);
|
||||
//this.worldChunkMgr = new WorldChunkManagerPromised(worldObj);
|
||||
this.dimensionId = BOPConfiguration.promisedLandDimID;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraftforge.common.AchievementPage;
|
|||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import tdwp_ftw.biomesop.api.Biomes;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBiomes;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBlocks;
|
||||
import tdwp_ftw.biomesop.declarations.BOPConfiguration;
|
||||
|
@ -162,12 +163,14 @@ public class mod_BiomesOPlenty
|
|||
|
||||
EntityRegistry.registerModEntity(EntityJungleSpider.class, "JungleSpider", BOPConfiguration.jungleSpiderID, this, 80, 3, true);
|
||||
LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.JungleSpider.name", "en_US", "Jungle Spider");
|
||||
EntityRegistry.addSpawn(EntityJungleSpider.class, 8, 1, 3, EnumCreatureType.monster, BOPBiomes.jungleNew, BOPBiomes.tropicalRainforest, BOPBiomes.oasis, BOPBiomes.tropics);
|
||||
if (Biomes.jungleNew.isPresent() && Biomes.tropicalRainforest.isPresent() && Biomes.oasis.isPresent() && Biomes.tropics.isPresent())
|
||||
EntityRegistry.addSpawn(EntityJungleSpider.class, 8, 1, 3, EnumCreatureType.monster, Biomes.jungleNew.get(), Biomes.tropicalRainforest.get(), Biomes.oasis.get(), Biomes.tropics.get());
|
||||
registerEntityEgg(EntityJungleSpider.class, 5147192, 11013646);
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRosester.class, "Rosester", BOPConfiguration.rosesterID, this, 80, 3, true);
|
||||
LanguageRegistry.instance().addStringLocalization("entity.BiomesOPlenty.Rosester.name", "en_US", "Rosester");
|
||||
EntityRegistry.addSpawn(EntityRosester.class, 10, 2, 4, EnumCreatureType.creature, BOPBiomes.garden);
|
||||
if (Biomes.garden.isPresent())
|
||||
EntityRegistry.addSpawn(EntityRosester.class, 10, 2, 4, EnumCreatureType.creature, Biomes.garden.get());
|
||||
registerEntityEgg(EntityRosester.class, 14831439, 16756224);
|
||||
|
||||
EntityRegistry.registerModEntity(EntityMudball.class, "MudBall", EntityRegistry.findGlobalUniqueEntityId(), this, 80, 3, true);
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package tdwp_ftw.biomesop.worldtype;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||
import tdwp_ftw.biomesop.declarations.BOPBiomes;
|
||||
import tdwp_ftw.biomesop.api.Biomes;
|
||||
import tdwp_ftw.biomesop.declarations.BOPConfiguration;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class WTBiomesOP extends WorldTypeBase
|
||||
{
|
||||
public WTBiomesOP() {
|
||||
|
@ -20,167 +21,167 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
|
||||
if (BOPConfiguration.alpsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.alps);
|
||||
addNewBiome(Biomes.alps);
|
||||
}
|
||||
if (BOPConfiguration.arcticGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.arctic);
|
||||
addNewBiome(Biomes.arctic);
|
||||
}
|
||||
if (BOPConfiguration.badlandsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.badlands);
|
||||
addNewBiome(Biomes.badlands);
|
||||
}
|
||||
if (BOPConfiguration.bambooForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.bambooForest);
|
||||
addNewBiome(Biomes.bambooForest);
|
||||
}
|
||||
if (BOPConfiguration.bayouGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.bayou);
|
||||
addNewBiome(Biomes.bayou);
|
||||
}
|
||||
if (BOPConfiguration.birchForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.birchForest);
|
||||
addNewBiome(Biomes.birchForest);
|
||||
}
|
||||
if (BOPConfiguration.bogGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.bog);
|
||||
addNewBiome(Biomes.bog);
|
||||
}
|
||||
if (BOPConfiguration.borealForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.borealForest);
|
||||
addNewBiome(Biomes.borealForest);
|
||||
}
|
||||
if (BOPConfiguration.canyonGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.canyon);
|
||||
addNewBiome(Biomes.canyon);
|
||||
}
|
||||
if (BOPConfiguration.chaparralGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.chaparral);
|
||||
addNewBiome(Biomes.chaparral);
|
||||
}
|
||||
if (BOPConfiguration.cherryBlossomGroveGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.cherryBlossomGrove);
|
||||
addNewBiome(Biomes.cherryBlossomGrove);
|
||||
}
|
||||
if (BOPConfiguration.coniferousForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.coniferousForest);
|
||||
addNewBiome(Biomes.coniferousForest);
|
||||
}
|
||||
if (BOPConfiguration.cragGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.crag);
|
||||
addNewBiome(Biomes.crag);
|
||||
}
|
||||
if (BOPConfiguration.deadForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.deadForest);
|
||||
addNewBiome(Biomes.deadForest);
|
||||
}
|
||||
if (BOPConfiguration.deadSwampGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.deadSwamp);
|
||||
addNewBiome(Biomes.deadSwamp);
|
||||
}
|
||||
if (BOPConfiguration.deadlandsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.deadlands);
|
||||
addNewBiome(Biomes.deadlands);
|
||||
}
|
||||
if (BOPConfiguration.deciduousForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.deciduousForest);
|
||||
addNewBiome(Biomes.deciduousForest);
|
||||
}
|
||||
if (BOPConfiguration.drylandsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.drylands);
|
||||
addNewBiome(Biomes.drylands);
|
||||
}
|
||||
if (BOPConfiguration.dunesGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.dunes);
|
||||
addNewBiome(Biomes.dunes);
|
||||
}
|
||||
if (BOPConfiguration.fenGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.fen);
|
||||
addNewBiome(Biomes.fen);
|
||||
}
|
||||
if (BOPConfiguration.fieldGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.field);
|
||||
addNewBiome(Biomes.field);
|
||||
}
|
||||
if (BOPConfiguration.frostForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.frostForest);
|
||||
addNewBiome(Biomes.frostForest);
|
||||
}
|
||||
if (BOPConfiguration.fungiForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.fungiForest);
|
||||
addNewBiome(Biomes.fungiForest);
|
||||
}
|
||||
if (BOPConfiguration.gardenGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.garden);
|
||||
addNewBiome(Biomes.garden);
|
||||
}
|
||||
if (BOPConfiguration.glacierGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.glacier);
|
||||
addNewBiome(Biomes.glacier);
|
||||
}
|
||||
if (BOPConfiguration.grasslandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.grassland);
|
||||
addNewBiome(Biomes.grassland);
|
||||
}
|
||||
if (BOPConfiguration.groveGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.grove);
|
||||
addNewBiome(Biomes.grove);
|
||||
}
|
||||
if (BOPConfiguration.heathlandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.heathland);
|
||||
addNewBiome(Biomes.heathland);
|
||||
}
|
||||
if (BOPConfiguration.highlandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.highland);
|
||||
addNewBiome(Biomes.highland);
|
||||
}
|
||||
if (BOPConfiguration.iceSheetGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.iceSheet);
|
||||
addNewBiome(Biomes.iceSheet);
|
||||
}
|
||||
if (BOPConfiguration.icyHillsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.icyHills);
|
||||
addNewBiome(Biomes.icyHills);
|
||||
}
|
||||
if (BOPConfiguration.jadeCliffsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.jadeCliffs);
|
||||
addNewBiome(Biomes.jadeCliffs);
|
||||
}
|
||||
if (BOPConfiguration.lushDesertGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.lushDesert);
|
||||
addNewBiome(Biomes.lushDesert);
|
||||
}
|
||||
if (BOPConfiguration.lushSwampGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.lushSwamp);
|
||||
addNewBiome(Biomes.lushSwamp);
|
||||
}
|
||||
if (BOPConfiguration.mangroveGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.mangrove);
|
||||
addNewBiome(Biomes.mangrove);
|
||||
}
|
||||
if (BOPConfiguration.mapleWoodsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.mapleWoods);
|
||||
addNewBiome(Biomes.mapleWoods);
|
||||
}
|
||||
if (BOPConfiguration.marshGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.marsh);
|
||||
addNewBiome(Biomes.marsh);
|
||||
}
|
||||
if (BOPConfiguration.meadowGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.meadow);
|
||||
addNewBiome(Biomes.meadow);
|
||||
}
|
||||
if (BOPConfiguration.mesaGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.mesa);
|
||||
addNewBiome(Biomes.mesa);
|
||||
}
|
||||
if (BOPConfiguration.moorGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.moor);
|
||||
addNewBiome(Biomes.moor);
|
||||
}
|
||||
if (BOPConfiguration.mountainGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.mountain);
|
||||
addNewBiome(Biomes.mountain);
|
||||
}
|
||||
if (BOPConfiguration.mushroomIslandGen == true)
|
||||
{
|
||||
|
@ -188,123 +189,123 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
}
|
||||
if (BOPConfiguration.mysticGroveGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.mysticGrove);
|
||||
addNewBiome(Biomes.mysticGrove);
|
||||
}
|
||||
if (BOPConfiguration.oasisGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.oasis);
|
||||
addNewBiome(Biomes.oasis);
|
||||
}
|
||||
if (BOPConfiguration.ominousWoodsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.ominousWoods);
|
||||
addNewBiome(Biomes.ominousWoods);
|
||||
}
|
||||
if (BOPConfiguration.orchardGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.orchard);
|
||||
addNewBiome(Biomes.orchard);
|
||||
}
|
||||
if (BOPConfiguration.originValleyGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.originValley);
|
||||
addNewBiome(Biomes.originValley);
|
||||
}
|
||||
if (BOPConfiguration.outbackGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.outback);
|
||||
addNewBiome(Biomes.outback);
|
||||
}
|
||||
if (BOPConfiguration.pastureGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.pasture);
|
||||
addNewBiome(Biomes.pasture);
|
||||
}
|
||||
if (BOPConfiguration.prairieGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.prairie);
|
||||
addNewBiome(Biomes.prairie);
|
||||
}
|
||||
if (BOPConfiguration.quagmireGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.quagmire);
|
||||
addNewBiome(Biomes.quagmire);
|
||||
}
|
||||
if (BOPConfiguration.rainforestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.rainforest);
|
||||
addNewBiome(Biomes.rainforest);
|
||||
}
|
||||
if (BOPConfiguration.redwoodForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.redwoodForest);
|
||||
addNewBiome(Biomes.redwoodForest);
|
||||
}
|
||||
if (BOPConfiguration.sacredSpringsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.sacredSprings);
|
||||
addNewBiome(Biomes.sacredSprings);
|
||||
}
|
||||
if (BOPConfiguration.savannaGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.savanna);
|
||||
addNewBiome(Biomes.savanna);
|
||||
}
|
||||
if (BOPConfiguration.scrublandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.scrubland);
|
||||
addNewBiome(Biomes.scrubland);
|
||||
}
|
||||
if (BOPConfiguration.seasonalForestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.seasonalForest);
|
||||
addNewBiome(Biomes.seasonalForest);
|
||||
}
|
||||
if (BOPConfiguration.shieldGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.shield);
|
||||
addNewBiome(Biomes.shield);
|
||||
}
|
||||
if (BOPConfiguration.shrublandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.shrubland);
|
||||
addNewBiome(Biomes.shrubland);
|
||||
}
|
||||
if (BOPConfiguration.snowyWoodsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.snowyWoods);
|
||||
addNewBiome(Biomes.snowyWoods);
|
||||
}
|
||||
if (BOPConfiguration.spruceWoodsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.spruceWoods);
|
||||
addNewBiome(Biomes.spruceWoods);
|
||||
}
|
||||
if (BOPConfiguration.steppeGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.steppe);
|
||||
addNewBiome(Biomes.steppe);
|
||||
}
|
||||
if (BOPConfiguration.swampwoodsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.swampwoods);
|
||||
addNewBiome(Biomes.swampwoods);
|
||||
}
|
||||
if (BOPConfiguration.temperateRainforestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.temperateRainforest);
|
||||
addNewBiome(Biomes.temperateRainforest);
|
||||
}
|
||||
if (BOPConfiguration.thicketGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.thicket);
|
||||
addNewBiome(Biomes.thicket);
|
||||
}
|
||||
if (BOPConfiguration.tropicalRainforestGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.tropicalRainforest);
|
||||
addNewBiome(Biomes.tropicalRainforest);
|
||||
}
|
||||
if (BOPConfiguration.tropicsGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.tropics);
|
||||
addNewBiome(Biomes.tropics);
|
||||
}
|
||||
if (BOPConfiguration.tundraGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.tundra);
|
||||
addNewBiome(Biomes.tundra);
|
||||
}
|
||||
if (BOPConfiguration.volcanoGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.volcano);
|
||||
addNewBiome(Biomes.volcano);
|
||||
}
|
||||
if (BOPConfiguration.wastelandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.wasteland);
|
||||
addNewBiome(Biomes.wasteland);
|
||||
}
|
||||
if (BOPConfiguration.wetlandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.wetland);
|
||||
addNewBiome(Biomes.wetland);
|
||||
}
|
||||
if (BOPConfiguration.woodlandGen == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.woodland);
|
||||
addNewBiome(Biomes.woodland);
|
||||
}
|
||||
|
||||
|
||||
|
@ -312,7 +313,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.plainsNew);
|
||||
addNewBiome(Biomes.plainsNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -323,7 +324,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.desertNew);
|
||||
addNewBiome(Biomes.desertNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -334,7 +335,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.extremeHillsNew);
|
||||
addNewBiome(Biomes.extremeHillsNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -345,7 +346,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.forestNew);
|
||||
addNewBiome(Biomes.forestNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -356,7 +357,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.taigaNew);
|
||||
addNewBiome(Biomes.taigaNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -367,7 +368,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.swamplandNew);
|
||||
addNewBiome(Biomes.swamplandNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -378,7 +379,7 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
{
|
||||
if (BOPConfiguration.vanillaEnhanced == true)
|
||||
{
|
||||
this.addNewBiome(BOPBiomes.jungleNew);
|
||||
addNewBiome(Biomes.jungleNew);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -386,4 +387,10 @@ public class WTBiomesOP extends WorldTypeBase
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addNewBiome(Optional<? extends BiomeGenBase> biome)
|
||||
{
|
||||
if (biome.isPresent())
|
||||
this.addNewBiome(biome.get());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import tdwp_ftw.biomesop.declarations.BOPBiomes;
|
||||
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldType;
|
||||
|
@ -14,6 +12,9 @@ import net.minecraft.world.biome.BiomeGenBase;
|
|||
import net.minecraft.world.biome.WorldChunkManager;
|
||||
import net.minecraft.world.gen.layer.GenLayer;
|
||||
import net.minecraft.world.gen.layer.IntCache;
|
||||
import tdwp_ftw.biomesop.api.Biomes;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class WorldChunkManagerBOP extends WorldChunkManager
|
||||
{
|
||||
|
@ -26,12 +27,12 @@ public class WorldChunkManagerBOP extends WorldChunkManager
|
|||
private BiomeCache biomeCache;
|
||||
|
||||
/** A list of biomes that the player can spawn in. */
|
||||
private List biomesToSpawnIn;
|
||||
private List<BiomeGenBase> biomesToSpawnIn;
|
||||
|
||||
protected WorldChunkManagerBOP()
|
||||
{
|
||||
this.biomeCache = new BiomeCache(this);
|
||||
this.biomesToSpawnIn = new ArrayList();
|
||||
this.biomesToSpawnIn = new ArrayList<BiomeGenBase>();
|
||||
this.biomesToSpawnIn.add(BiomeGenBase.forest);
|
||||
this.biomesToSpawnIn.add(BiomeGenBase.plains);
|
||||
this.biomesToSpawnIn.add(BiomeGenBase.taiga);
|
||||
|
@ -40,60 +41,60 @@ public class WorldChunkManagerBOP extends WorldChunkManager
|
|||
this.biomesToSpawnIn.add(BiomeGenBase.jungle);
|
||||
this.biomesToSpawnIn.add(BiomeGenBase.jungleHills);
|
||||
|
||||
this.biomesToSpawnIn.add(BOPBiomes.alps);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.arctic);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.badlands);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.bambooForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.bayou);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.birchForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.bog);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.borealForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.chaparral);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.cherryBlossomGrove);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.coniferousForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.crag);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.deadForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.deciduousForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.drylands);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.dunes);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.frostForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.glacier);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.grassland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.grove);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.heathland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.highland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.lushDesert);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.lushSwamp);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.mangrove);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.mapleWoods);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.marsh);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.meadow);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.mesa);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.mountain);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.oasis);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.orchard);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.pasture);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.prairie);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.quagmire);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.rainforest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.redwoodForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.savanna);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.scrubland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.seasonalForest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.shrubland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.steppe);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.temperateRainforest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.tropicalRainforest);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.tropics);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.tundra);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.volcano);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.wetland);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.woodland);
|
||||
addSpawnBiomes(Biomes.alps);
|
||||
addSpawnBiomes(Biomes.arctic);
|
||||
addSpawnBiomes(Biomes.badlands);
|
||||
addSpawnBiomes(Biomes.bambooForest);
|
||||
addSpawnBiomes(Biomes.bayou);
|
||||
addSpawnBiomes(Biomes.birchForest);
|
||||
addSpawnBiomes(Biomes.bog);
|
||||
addSpawnBiomes(Biomes.borealForest);
|
||||
addSpawnBiomes(Biomes.chaparral);
|
||||
addSpawnBiomes(Biomes.cherryBlossomGrove);
|
||||
addSpawnBiomes(Biomes.coniferousForest);
|
||||
addSpawnBiomes(Biomes.crag);
|
||||
addSpawnBiomes(Biomes.deadForest);
|
||||
addSpawnBiomes(Biomes.deciduousForest);
|
||||
addSpawnBiomes(Biomes.drylands);
|
||||
addSpawnBiomes(Biomes.dunes);
|
||||
addSpawnBiomes(Biomes.frostForest);
|
||||
addSpawnBiomes(Biomes.glacier);
|
||||
addSpawnBiomes(Biomes.grassland);
|
||||
addSpawnBiomes(Biomes.grove);
|
||||
addSpawnBiomes(Biomes.heathland);
|
||||
addSpawnBiomes(Biomes.highland);
|
||||
addSpawnBiomes(Biomes.lushDesert);
|
||||
addSpawnBiomes(Biomes.lushSwamp);
|
||||
addSpawnBiomes(Biomes.mangrove);
|
||||
addSpawnBiomes(Biomes.mapleWoods);
|
||||
addSpawnBiomes(Biomes.marsh);
|
||||
addSpawnBiomes(Biomes.meadow);
|
||||
addSpawnBiomes(Biomes.mesa);
|
||||
addSpawnBiomes(Biomes.mountain);
|
||||
addSpawnBiomes(Biomes.oasis);
|
||||
addSpawnBiomes(Biomes.orchard);
|
||||
addSpawnBiomes(Biomes.pasture);
|
||||
addSpawnBiomes(Biomes.prairie);
|
||||
addSpawnBiomes(Biomes.quagmire);
|
||||
addSpawnBiomes(Biomes.rainforest);
|
||||
addSpawnBiomes(Biomes.redwoodForest);
|
||||
addSpawnBiomes(Biomes.savanna);
|
||||
addSpawnBiomes(Biomes.scrubland);
|
||||
addSpawnBiomes(Biomes.seasonalForest);
|
||||
addSpawnBiomes(Biomes.shrubland);
|
||||
addSpawnBiomes(Biomes.steppe);
|
||||
addSpawnBiomes(Biomes.temperateRainforest);
|
||||
addSpawnBiomes(Biomes.tropicalRainforest);
|
||||
addSpawnBiomes(Biomes.tropics);
|
||||
addSpawnBiomes(Biomes.tundra);
|
||||
addSpawnBiomes(Biomes.volcano);
|
||||
addSpawnBiomes(Biomes.wetland);
|
||||
addSpawnBiomes(Biomes.woodland);
|
||||
|
||||
this.biomesToSpawnIn.add(BOPBiomes.forestNew);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.plainsNew);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.taigaNew);
|
||||
this.biomesToSpawnIn.add(BOPBiomes.jungleNew);
|
||||
addSpawnBiomes(Biomes.forestNew);
|
||||
addSpawnBiomes(Biomes.plainsNew);
|
||||
addSpawnBiomes(Biomes.taigaNew);
|
||||
addSpawnBiomes(Biomes.jungleNew);
|
||||
}
|
||||
|
||||
public WorldChunkManagerBOP(long par1, WorldType par3WorldType)
|
||||
|
@ -112,7 +113,7 @@ public class WorldChunkManagerBOP extends WorldChunkManager
|
|||
/**
|
||||
* Gets the list of valid biomes for the player to spawn in.
|
||||
*/
|
||||
public List getBiomesToSpawnIn()
|
||||
public List<BiomeGenBase> getBiomesToSpawnIn()
|
||||
{
|
||||
return this.biomesToSpawnIn;
|
||||
}
|
||||
|
@ -321,4 +322,10 @@ public class WorldChunkManagerBOP extends WorldChunkManager
|
|||
{
|
||||
this.biomeCache.cleanupCache();
|
||||
}
|
||||
|
||||
private void addSpawnBiomes(Optional<? extends BiomeGenBase> biome)
|
||||
{
|
||||
if (biome.isPresent())
|
||||
this.biomesToSpawnIn.add(biome.get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue