use of net.minecraft.world.biome.Biome in project MinecraftForge by MinecraftForge.
the class EntityRegistry method addSpawn.
/**
* Add a spawn entry for the supplied entity in the supplied {@link Biome} list
* @param entityClass Entity class added
* @param weightedProb Probability
* @param min Min spawn count
* @param max Max spawn count
* @param typeOfCreature Type of spawn
* @param biomes List of biomes
*/
public static void addSpawn(Class<? extends EntityLiving> entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes) {
for (Biome biome : biomes) {
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
boolean found = false;
for (SpawnListEntry entry : spawns) {
//Adjusting an existing spawn entry
if (entry.entityClass == entityClass) {
entry.itemWeight = weightedProb;
entry.minGroupCount = min;
entry.maxGroupCount = max;
found = true;
break;
}
}
if (!found)
spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
}
}
use of net.minecraft.world.biome.Biome in project Realistic-Terrain-Generation by Team-RTG.
the class RealisticBiomeBYGBase method addBiomes.
public static void addBiomes() {
if (Loader.isModLoaded("BiomesYouGo")) {
for (Biome biome : Biome.REGISTRY) {
if (biome.getBiomeName().isEmpty()) {
Logger.warn("Biome ID %d has no name.", Biome.getIdForBiome(biome));
continue;
}
String biomeName = biome.getBiomeName();
String biomeClass = biome.getBiomeClass().getName();
if (biomeName.equals("autumnForest") && biomeClass.equals("mod.mcreator.mcreator_autumnForest$BiomeGenautumnForest")) {
bygAutumnForest = new RealisticBiomeBYGAutumnForest(biome);
} else if (biomeName.equals("birchPlains") && biomeClass.equals("mod.mcreator.mcreator_birchPlains$BiomeGenbirchPlains")) {
bygLushForest = new RealisticBiomeBYGLushForest(biome);
} else if (biomeName.equals("redRockMoutains") && biomeClass.equals("mod.mcreator.mcreator_redRockMoutains$BiomeGenredRockMoutains")) {
bygRedRockMountains = new RealisticBiomeBYGRedRockMountains(biome);
} else if (biomeName.equals("redDesert") && biomeClass.equals("mod.mcreator.mcreator_redDesert$BiomeGenredDesert")) {
bygRedDesert = new RealisticBiomeBYGRedDesert(biome);
} else if (biomeName.equals("willowSwamps") && biomeClass.equals("mod.mcreator.mcreator_willowSwamps$BiomeGenwillowSwamps")) {
bygWillowSwamps = new RealisticBiomeBYGWillowSwamps(biome);
} else if (biomeName.equals("birchPlains1") && biomeClass.equals("mod.mcreator.mcreator_birchPlains1$BiomeGenbirchPlains1")) {
bygBirchPlains = new RealisticBiomeBYGBirchPlains(biome);
} else if (biomeName.equals("tundra") && biomeClass.equals("mod.mcreator.mcreator_tundra$BiomeGentundra")) {
bygFrozenTundra = new RealisticBiomeBYGFrozenTundra(biome);
} else if (biomeName.equals("athuraForest") && biomeClass.equals("mod.mcreator.mcreator_athuraForest$BiomeGenathuraForest")) {
bygFrozenTundra = new RealisticBiomeBYGAthuraForest(biome);
} else if (biomeName.equals("mushroomMoutains") && biomeClass.equals("mod.mcreator.mcreator_mushroomMoutains$BiomeGenmushroomMoutains")) {
bygFrozenTundra = new RealisticBiomeBYGMushroomMountains(biome);
} else if (biomeName.equals("shrubs") && biomeClass.equals("mod.mcreator.mcreator_shrubs$BiomeGenshrubs")) {
bygFrozenTundra = new RealisticBiomeBYGShrubs(biome);
}
}
}
}
use of net.minecraft.world.biome.Biome in project Realistic-Terrain-Generation by Team-RTG.
the class RealisticBiomeJIKBase method addBiomes.
public static void addBiomes() {
if (Loader.isModLoaded("Jikou")) {
for (Biome biome : Biome.REGISTRY) {
if (biome.getBiomeName().isEmpty()) {
Logger.warn("Biome ID %d has no name.", Biome.getIdForBiome(biome));
continue;
}
String biomeName = biome.getBiomeName();
String biomeClass = biome.getBiomeClass().getName();
if (biomeName.equals("jikou") && biomeClass.equals("mod.mcreator.mcreator_jikou$BiomeGenjikou")) {
jikJikou = new RealisticBiomeJIKJikou(biome);
} else if (biomeName.equals("cherry") && biomeClass.equals("mod.mcreator.mcreator_cherry$BiomeGencherry")) {
jikCherry = new RealisticBiomeJIKCherry(biome);
}
}
}
}
use of net.minecraft.world.biome.Biome in project Realistic-Terrain-Generation by Team-RTG.
the class RealisticBiomeIAFBase method addBiomes.
public static void addBiomes() {
if (Loader.isModLoaded("iceandfire")) {
for (Biome biome : Biome.REGISTRY) {
if (biome.getBiomeName().isEmpty()) {
Logger.warn("Biome ID %d has no name.", Biome.getIdForBiome(biome));
continue;
}
String biomeName = biome.getBiomeName();
String biomeClass = biome.getBiomeClass().getName();
if (biomeName.equals("Glacier") && biomeClass.equals("com.github.alexthe666.iceandfire.world.BiomeGlacier")) {
iafGlacier = new RealisticBiomeIAFGlacier(biome);
}
}
}
}
use of net.minecraft.world.biome.Biome in project Realistic-Terrain-Generation by Team-RTG.
the class BiomeAnalyzer method determineOceanBiomes.
private void determineOceanBiomes() {
oceanBiome = new boolean[256];
for (int i = 0; i < oceanBiome.length; i++) {
Biome biome = Biome.getBiome(i);
if (biome == null)
continue;
if (biome.getBiomeName().toLowerCase().contains("ocean"))
oceanBiome[i] = true;
if (biome.getBiomeName().toLowerCase().contains("kelp"))
oceanBiome[i] = true;
if (biome.getBiomeName().toLowerCase().contains("coral"))
oceanBiome[i] = true;
if (biome.getBiomeName().toLowerCase().contains("reef"))
oceanBiome[i] = true;
}
// not getting set?
oceanBiome[Biome.getIdForBiome(Biomes.DEEP_OCEAN)] = true;
}
Aggregations