本文整理汇总了Java中net.minecraftforge.common.BiomeManager.BiomeEntry类的典型用法代码示例。如果您正苦于以下问题:Java BiomeEntry类的具体用法?Java BiomeEntry怎么用?Java BiomeEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BiomeEntry类属于net.minecraftforge.common.BiomeManager包,在下文中一共展示了BiomeEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preInit
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public static void preInit() {
int biomeID = 10;
while (BiomeDictionary.isBiomeRegistered(biomeID))
biomeID++;
// Create Town Forest
biomeTownForest = new BiomeTownForest(biomeID).setBiomeName(BiomeTownForest.name);
// Allow villages in this biome
BiomeManager.addVillageBiome(biomeTownForest, true);
BiomeDictionary.registerBiomeType(biomeTownForest, Type.MAGICAL);
int weight = Configs.VILLAGE.town_weight;
LogHelper.info("ModBiomes: Town Forest created with weight: " + weight);
biomeEntryTownForest = new BiomeEntry(biomeTownForest, weight);
BiomeManager.addBiome(BiomeType.WARM, biomeEntryTownForest);
// Create City Forest
biomeID++;
biomeCityPlains = new BiomeCityPlains(biomeID).setBiomeName(BiomeCityPlains.name);
// Allow villages in this biome
BiomeManager.addVillageBiome(biomeCityPlains, true);
BiomeDictionary.registerBiomeType(biomeCityPlains, Type.MAGICAL);
weight = Configs.VILLAGE.city_weight;
LogHelper.info("ModBiomes: City Plains created with weight: " + weight);
biomeEntryCityPlains = new BiomeEntry(biomeCityPlains, weight);
BiomeManager.addBiome(BiomeType.WARM, biomeEntryCityPlains);
}
示例2: GenLayerBiomeMod
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public GenLayerBiomeMod(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkGeneratorSettings p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
this.biomes.add(new BiomeEntry(ExPBiomes.plains, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.mountains, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.dense_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.swampland, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.rare_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.hills, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.cold_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.dense_cold_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.cold_plains, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.savanna, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.warm_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.warm_plains, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.dense_warm_forest, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.jungle, 10));
this.biomes.add(new BiomeEntry(ExPBiomes.desert, 10));
this.settings = p_i45560_5_;
}
示例3: GenLayerBiomeEpic
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public GenLayerBiomeEpic(long p_i2122_1_, GenLayer p_i2122_3_, WorldType p_i2122_4_)
{
super(p_i2122_1_);
this.parent = p_i2122_3_;
this.desertBiomes.removeAll(BiomeManager.desertBiomes);
this.warmBiomes.removeAll(BiomeManager.warmBiomes);
this.coolBiomes.removeAll(BiomeManager.coolBiomes);
this.icyBiomes.removeAll(BiomeManager.icyBiomes);
if (p_i2122_4_ == WorldType.DEFAULT_1_1)
{
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
else
{
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
}
示例4: DimensionProperties
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public DimensionProperties(int id) {
name = "Temp";
resetProperties();
planetId = id;
parentPlanet = -1;
childPlanets = new HashSet<Integer>();
orbitalPhi = 0;
allowedBiomes = new LinkedList<BiomeManager.BiomeEntry>();
terraformedBiomes = new LinkedList<BiomeManager.BiomeEntry>();
satallites = new HashMap<>();
tickingSatallites = new HashMap<Long,SatelliteBase>();
isNativeDimension = true;
isGasGiant = false;
}
示例5: addBiomeType
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
/**
* Adds all biomes of this type to the list of biomes allowed to generate
* @param type
*/
public void addBiomeType(BiomeDictionary.Type type) {
ArrayList<BiomeGenBase> entryList = new ArrayList<BiomeGenBase>();
entryList.addAll(Arrays.asList(BiomeDictionary.getBiomesForType(type)));
//Neither are acceptable on planets
entryList.remove(BiomeGenBase.hell);
entryList.remove(BiomeGenBase.sky);
//Make sure we dont add double entries
Iterator<BiomeGenBase> iter = entryList.iterator();
while(iter.hasNext()) {
BiomeGenBase nextbiome = iter.next();
for(BiomeEntry entry : allowedBiomes) {
if(BiomeDictionary.areBiomesEquivalent(entry.biome, nextbiome))
iter.remove();
}
}
allowedBiomes.addAll(getBiomesEntries(entryList));
}
示例6: removeBiomeType
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
/**
* Removes all biomes of this type from the list of biomes allowed to generate
* @param type
*/
public void removeBiomeType(BiomeDictionary.Type type) {
ArrayList<BiomeGenBase> entryList = new ArrayList<BiomeGenBase>();
entryList.addAll(Arrays.asList(BiomeDictionary.getBiomesForType(type)));
for(BiomeGenBase biome : entryList) {
Iterator<BiomeEntry> iterator = allowedBiomes.iterator();
while(iterator.hasNext()) {
if(BiomeDictionary.areBiomesEquivalent(iterator.next().biome, biome))
iterator.remove();
}
}
}
示例7: BiomeGenSpooky
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public BiomeGenSpooky(int id)
{
super(id);
this.spawnableCreatureList.clear();
this.theBiomeDecorator.treesPerChunk = 10;
this.theBiomeDecorator.grassPerChunk = 2;
this.theBiomeDecorator.mushroomsPerChunk = 1;
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 10, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityFrankenstein.class, 90, 4, 4));
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeEntry(this, Config.spookyWeight));
BiomeManager.addStrongholdBiome(this);
BiomeDictionary.registerBiomeType(this, Type.SPOOKY, Type.MAGICAL, Type.FOREST);
setBiomeName("Spooky Forest");
setTemperatureRainfall(0.25F, 0.5F);
setColor(0xF2A100);
this.waterColorMultiplier = 0x970E0E;
}
示例8: main
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public void main() {
//Ores
GameRegistry.registerWorldGenerator(new WorldGenDerpyOres(), 42);
//Biome
BiomeGenBase magicBiome = new MagicBiomeGen(Main.idMagicBiome);
BiomeDictionary.registerBiomeType(magicBiome, BiomeDictionary.Type.MAGICAL);
BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(magicBiome, 10));
BiomeManager.addSpawnBiome(magicBiome);
//Trees
GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenMagicTree(false),magicBiome,9,1),42);
GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenEbonyTree(false),magicBiome,10,1),42);
BiomeGenBase[] forests = BiomeDictionary.getBiomesForType(Type.FOREST);
for (int i=0;i<forests.length;i++) {
BiomeGenBase b = forests[i];
GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenEbonyTree(false),b,2,3),1);
}
}
示例9: init
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public static void init(){
float height = ((float)68 - 65.0F) / 17.0F;
float heightVar = Math.abs((((float)10 - 7.0F) / (20.0F * 4.0F) + ((float)5 - 4.0F) / 20.0F) / 2.0F);
Biome.BiomeProperties bambooProperties = new Biome.BiomeProperties("Bamboo Forest").setBaseHeight(height).setHeightVariation(heightVar).setTemperature(0.8F).setRainfall(0.4F);
BAMBOO_FOREST = (BiomeBambooForest) new BiomeBambooForest(bambooProperties).setRegistryName(CrystalMod.resourceL("bambooforest"));
GameRegistry.register(BAMBOO_FOREST);
BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(BAMBOO_FOREST, 10));
BiomeDictionary.addTypes(BAMBOO_FOREST, BiomeDictionary.Type.FOREST, BiomeDictionary.Type.WET);
BiomeManager.addSpawnBiome(BAMBOO_FOREST);
ModLogger.info("Added "+BAMBOO_FOREST.getBiomeName()+" id = "+Biome.getIdForBiome(BAMBOO_FOREST));
}
示例10: JenGenLayerBiome
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public JenGenLayerBiome(long p_i2122_1_, GenLayer p_i2122_3_, WorldType p_i2122_4_)
{
super(p_i2122_1_);
this.parent = p_i2122_3_;
this.desertBiomes.addAll(BiomeManager.desertBiomes);
this.warmBiomes.addAll(BiomeManager.warmBiomes);
this.coolBiomes.addAll(BiomeManager.coolBiomes);
this.icyBiomes.addAll(BiomeManager.icyBiomes);
if (p_i2122_4_ == WorldType.DEFAULT_1_1)
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.forest, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.extremeHills, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.swampland, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.taiga, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
else
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 30));
desertBiomes.add(new BiomeEntry(BiomeGenBase.savanna, 20));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
}
示例11: PatGenLayerBiome
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public PatGenLayerBiome(long p_i2122_1_, GenLayer p_i2122_3_, WorldType p_i2122_4_)
{
super(p_i2122_1_);
this.parent = p_i2122_3_;
this.desertBiomes.addAll(BiomeManager.desertBiomes);
this.warmBiomes.addAll(BiomeManager.warmBiomes);
this.coolBiomes.addAll(BiomeManager.coolBiomes);
this.icyBiomes.addAll(BiomeManager.icyBiomes);
if (p_i2122_4_ == WorldType.DEFAULT_1_1)
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.forest, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.extremeHills, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.swampland, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.taiga, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
}
else
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 30));
desertBiomes.add(new BiomeEntry(BiomeGenBase.savanna, 20));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
}
}
示例12: GenLayerBiome
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public GenLayerBiome(long p_i2122_1_, GenLayer p_i2122_3_, WorldType p_i2122_4_)
{
super(p_i2122_1_);
this.parent = p_i2122_3_;
this.desertBiomes.addAll(BiomeManager.desertBiomes);
this.warmBiomes.addAll(BiomeManager.warmBiomes);
this.coolBiomes.addAll(BiomeManager.coolBiomes);
this.icyBiomes.addAll(BiomeManager.icyBiomes);
if (p_i2122_4_ == WorldType.DEFAULT_1_1)
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.forest, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.extremeHills, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.swampland, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeGenBase.taiga, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
else
{
desertBiomes.add(new BiomeEntry(BiomeGenBase.desert, 30));
desertBiomes.add(new BiomeEntry(BiomeGenBase.savanna, 20));
desertBiomes.add(new BiomeEntry(BiomeGenBase.plains, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomePat, 10));
desertBiomes.add(new BiomeEntry(BiomeRegistry.biomeJen, 10));
}
}
示例13: registerBiomes
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
private static void registerBiomes(BiomeGenBase biome, BiomeType type, Type forgeType, int id, boolean canSpawnIn)
{
BiomeDictionary.registerBiomeType(biome, forgeType);
BiomeManager.addBiome(type, new BiomeEntry(biome, id));
if (canSpawnIn)
{
BiomeManager.addSpawnBiome(biome);
}
}
示例14: getWeightedBiomeEntry
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
protected BiomeEntry getWeightedBiomeEntry()
{
if(biomeEntries == null || biomeEntries.isEmpty())
return new BiomeEntry(BiomeGenBase.ocean, 100);
List<BiomeEntry> biomeList = biomeEntries;
int totalWeight = WeightedRandom.getTotalWeight(biomeList);
int weight = nextInt(Math.max(totalWeight / 10,1)) * 10;
return (BiomeEntry)WeightedRandom.getItem(biomeList, weight);
}
示例15: BiomeGenTime
import net.minecraftforge.common.BiomeManager.BiomeEntry; //导入依赖的package包/类
public BiomeGenTime(int id)
{
super(id);
/*this.spawnableCreatureList.clear();
this.theBiomeDecorator.treesPerChunk = 10;
this.theBiomeDecorator.grassPerChunk = 2;
this.theBiomeDecorator.mushroomsPerChunk = 1;
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 10, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityFrankenstein.class, 90, 4, 4));*/
this.spawnableMonsterList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityOldEnderman.class, 10, 1, 4));
this.setHeight(height_LowPlains);
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.flowersPerChunk = -1;
this.theBiomeDecorator.grassPerChunk = 5;
this.flowers.clear();
this.flowers.add(new FlowerEntry(Blocks.yellow_flower, 0, 10));
this.flowers.add(new FlowerEntry(RidiculousBlocks.flower, 0, 10));
this.flowers.add(new FlowerEntry(RidiculousBlocks.flower, 1, 1));
this.flowers.add(new FlowerEntry(RidiculousBlocks.flower, 2, 1));
BiomeManager.addSpawnBiome(this);
BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeEntry(this, Config.timeWeight));
BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeEntry(this, Config.timeWeight));
//BiomeManager.addStrongholdBiome(this);
BiomeDictionary.registerBiomeType(this, Type.PLAINS, Type.MAGICAL);
setBiomeName("Timeslip Fields");
setTemperatureRainfall(0.25F, 0.5F);
setColor(0x7FBBFF);
//this.waterColorMultiplier = 0x970E0E;
}