Java Code Examples for net.minecraftforge.common.BiomeManager#BiomeEntry

The following examples show how to use net.minecraftforge.common.BiomeManager#BiomeEntry . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DimensionProperties.java    From AdvancedRocketry with MIT License 6 votes vote down vote up
public DimensionProperties(int id) {
	name = "Temp";
	resetProperties();

	planetId = id;
	parentPlanet = -1;
	childPlanets = new HashSet<Integer>();
	orbitalPhi = 0;
	ringColor = new float[] {.4f, .4f, .7f};
	oceanBlock = null;
	fillerBlock = null;

	allowedBiomes = new LinkedList<BiomeManager.BiomeEntry>();
	terraformedBiomes = new LinkedList<BiomeManager.BiomeEntry>();
	satallites = new HashMap<>();
	requiredArtifacts = new LinkedList<ItemStack>();
	tickingSatallites = new HashMap<Long,SatelliteBase>();
	isNativeDimension = true;
	isGasGiant = false;
	hasRings = false;
	customIcon = "";
	harvestableAtmosphere = new LinkedList<Fluid>();
	beaconLocations = new HashSet<HashedBlockPosition>();
	sealevel = 63;
	generatorType = 0;
}
 
Example 2
Source File: TofuEntityRegister.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static void entitySpawn() {
    List<BiomeManager.BiomeEntry> biomeEntries = new ArrayList<BiomeManager.BiomeEntry>();
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.COOL));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.DESERT));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.ICY));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.WARM));
    List<Biome> biomes = new ArrayList<Biome>();
    for (BiomeManager.BiomeEntry b : biomeEntries) {
        biomes.add(b.biome);
    }
    biomes.addAll(BiomeManager.oceanBiomes);
    EntityRegistry.addSpawn(EntityTofuSlime.class, 105, 2, 3, EnumCreatureType.MONSTER, biomes.toArray(new Biome[biomes.size()]));
}
 
Example 3
Source File: TraverseWorld.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
public TraverseBiomeEntry(Biome biome, BiomeType type, int weight, boolean canSpawn, boolean hasVillages, Version versionAdded) {
    this.biome = biome;
    this.type = type;
    this.weight = weight;
    this.canSpawn = canSpawn;
    this.hasVillages = hasVillages;
    this.versionAdded = versionAdded;
    this.entry = new BiomeManager.BiomeEntry(biome, weight);
}
 
Example 4
Source File: TraverseWorld.java    From Traverse-Legacy-1-12-2 with MIT License 5 votes vote down vote up
public TraverseBiomeEntry(Biome biome, BiomeType type, int weight, boolean canSpawn, boolean hasVillages, Version versionAdded) {
	this.biome = biome;
	this.type = type;
	this.weight = weight;
	this.canSpawn = canSpawn;
	this.hasVillages = hasVillages;
	this.versionAdded = versionAdded;
	this.entry = new BiomeManager.BiomeEntry(biome, weight);
}
 
Example 5
Source File: TraverseWorld.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
public BiomeManager.BiomeEntry getEntry() {
    return entry;
}
 
Example 6
Source File: TraverseWorld.java    From Traverse-Legacy-1-12-2 with MIT License 4 votes vote down vote up
public BiomeManager.BiomeEntry getEntry() {
	return entry;
}
 
Example 7
Source File: DimensionProperties.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
/**
 * Gets a list of BiomeEntries allowed to spawn in this dimension
 * @param biomeIds
 * @return
 */
private ArrayList<BiomeEntry> getBiomesEntries(List<Biome> biomeIds) {

	ArrayList<BiomeEntry> biomeEntries = new ArrayList<BiomeManager.BiomeEntry>();

	Iterator<Biome> itr = biomeIds.iterator();
	while( itr.hasNext()) {
		Biome biomes = itr.next();

		/*if(biomes == Biome.desert) {
			biomeEntries.add(new BiomeEntry(BiomeGenBase.desert, 30));
			continue;
		}
		else if(biomes == BiomeGenBase.savanna) {
			biomeEntries.add(new BiomeEntry(BiomeGenBase.savanna, 20));
			continue;
		}
		else if(biomes == BiomeGenBase.plains) {
			biomeEntries.add(new BiomeEntry(BiomeGenBase.plains, 10));
			continue;
		}*/

		boolean notFound = true;

		label:

			for(BiomeManager.BiomeType types : BiomeManager.BiomeType.values()) {
				for(BiomeEntry entry : BiomeManager.getBiomes(types)) {
					if(biomes == null)
						AdvancedRocketry.logger.warn("Null biomes loaded for DIMID: " + this.getId());
					else if(entry.biome.equals(biomes)) {
						biomeEntries.add(entry);
						notFound = false;

						break label;
					}
				}
			}

		if(notFound && biomes != null) {
			biomeEntries.add(new BiomeEntry(biomes, 30));
		}
	}

	return biomeEntries;
}
 
Example 8
Source File: GenLayerBiomePlanet.java    From AdvancedRocketry with MIT License 3 votes vote down vote up
public GenLayerBiomePlanet(long p_i2122_1_, GenLayer p_i2122_3_, WorldType worldType)
{
	super(p_i2122_1_);

	this.parent = p_i2122_3_;

	biomeEntries = new ArrayList<BiomeManager.BiomeEntry>();

}