当前位置: 首页>>代码示例>>Java>>正文


Java BiomeGenBase类代码示例

本文整理汇总了Java中net.minecraft.world.biome.BiomeGenBase的典型用法代码示例。如果您正苦于以下问题:Java BiomeGenBase类的具体用法?Java BiomeGenBase怎么用?Java BiomeGenBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BiomeGenBase类属于net.minecraft.world.biome包,在下文中一共展示了BiomeGenBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerWorldChunkManager

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
/**
 * creates a new world chunk manager for WorldProvider
 */
protected void registerWorldChunkManager()
{
    WorldType worldtype = this.worldObj.getWorldInfo().getTerrainType();

    if (worldtype == WorldType.FLAT)
    {
        FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions());
        this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.getBiomeFromBiomeList(flatgeneratorinfo.getBiome(), BiomeGenBase.field_180279_ad), 0.5F);
    }
    else if (worldtype == WorldType.DEBUG_WORLD)
    {
        this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.plains, 0.0F);
    }
    else
    {
        this.worldChunkMgr = new WorldChunkManager(this.worldObj);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:WorldProvider.java

示例2: decorateChunk

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
@Override
public void decorateChunk(World world, Random rand, BiomeGenBase biome, int x, int z)
{
	if (this.currentWorld != null)
	{
		throw new RuntimeException("Already decorating!!");
	}
	else
	{
		this.currentWorld = world;
		this.randomGenerator = rand;
		this.chunk_X = x;
		this.chunk_Z = z;
		this.genDecorations(biome);
		this.currentWorld = null;
		this.randomGenerator = null;
	}
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:19,代码来源:TPBiomeDecorator.java

示例3: func_175354_a

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
private static void func_175354_a(String p_175354_0_, Item p_175354_1_, int p_175354_2_, BiomeGenBase p_175354_3_, List<String> p_175354_4_, FlatLayerInfo... p_175354_5_)
{
    FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();

    for (int i = p_175354_5_.length - 1; i >= 0; --i)
    {
        flatgeneratorinfo.getFlatLayers().add(p_175354_5_[i]);
    }

    flatgeneratorinfo.setBiome(p_175354_3_.biomeID);
    flatgeneratorinfo.func_82645_d();

    if (p_175354_4_ != null)
    {
        for (String s : p_175354_4_)
        {
            flatgeneratorinfo.getWorldFeatures().put(s, Maps.<String, String>newHashMap());
        }
    }

    FLAT_WORLD_PRESETS.add(new GuiFlatPresets.LayerItem(p_175354_1_, p_175354_2_, p_175354_0_, flatgeneratorinfo.toString()));
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:GuiFlatPresets.java

示例4: GenLayerBiome

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
    super(p_i45560_1_);
    this.parent = p_i45560_3_;

    if (p_i45560_4_ == WorldType.DEFAULT_1_1)
    {
        this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
        this.field_175973_g = null;
    }
    else if (p_i45560_4_ == WorldType.CUSTOMIZED)
    {
        this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
    }
    else
    {
        this.field_175973_g = null;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:GenLayerBiome.java

示例5: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public List<BiomeGenBase.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    if (creatureType == EnumCreatureType.MONSTER)
    {
        if (this.genNetherBridge.func_175795_b(pos))
        {
            return this.genNetherBridge.getSpawnList();
        }

        if (this.genNetherBridge.func_175796_a(this.worldObj, pos) && this.worldObj.getBlockState(pos.down()).getBlock() == Blocks.nether_brick)
        {
            return this.genNetherBridge.getSpawnList();
        }
    }

    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(pos);
    return biomegenbase.getSpawnableList(creatureType);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:ChunkProviderHell.java

示例6: Start

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public Start(World worldIn, Random p_i2060_2_, int p_i2060_3_, int p_i2060_4_)
{
    super(p_i2060_3_, p_i2060_4_);
    BiomeGenBase biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8));

    if (biomegenbase != BiomeGenBase.jungle && biomegenbase != BiomeGenBase.jungleHills)
    {
        if (biomegenbase == BiomeGenBase.swampland)
        {
            ComponentScatteredFeaturePieces.SwampHut componentscatteredfeaturepieces$swamphut = new ComponentScatteredFeaturePieces.SwampHut(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
            this.components.add(componentscatteredfeaturepieces$swamphut);
        }
        else if (biomegenbase == BiomeGenBase.desert || biomegenbase == BiomeGenBase.desertHills)
        {
            ComponentScatteredFeaturePieces.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new ComponentScatteredFeaturePieces.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
            this.components.add(componentscatteredfeaturepieces$desertpyramid);
        }
    }
    else
    {
        ComponentScatteredFeaturePieces.JunglePyramid componentscatteredfeaturepieces$junglepyramid = new ComponentScatteredFeaturePieces.JunglePyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16);
        this.components.add(componentscatteredfeaturepieces$junglepyramid);
    }

    this.updateBoundingBox();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:27,代码来源:MapGenScatteredFeature.java

示例7: biome

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public static boolean biome(BiomeGenBase p_biome_0_, BiomeGenBase[] p_biome_1_)
{
    if (p_biome_1_ == null)
    {
        return true;
    }
    else
    {
        for (int i = 0; i < p_biome_1_.length; ++i)
        {
            if (p_biome_1_[i] == p_biome_0_)
            {
                return true;
            }
        }

        return false;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:Matches.java

示例8: canLightningStrike

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public boolean canLightningStrike(BlockPos strikePosition)
{
    if (!this.isRaining())
    {
        return false;
    }
    else if (!this.canSeeSky(strikePosition))
    {
        return false;
    }
    else if (this.getPrecipitationHeight(strikePosition).getY() > strikePosition.getY())
    {
        return false;
    }
    else
    {
        BiomeGenBase biomegenbase = this.getBiomeGenForCoords(strikePosition);
        return biomegenbase.getEnableSnow() ? false : (this.canSnowAt(strikePosition, false) ? false : biomegenbase.canSpawnLightningBolt());
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:World.java

示例9: provideChunk

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    this.hellRNG.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.func_180515_a(x, z, chunkprimer);
    this.func_180516_b(x, z, chunkprimer);
    this.netherCaveGenerator.generate(this, this.worldObj, x, z, chunkprimer);

    if (this.field_177466_i)
    {
        this.genNetherBridge.generate(this, this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    BiomeGenBase[] abiomegenbase = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)abiomegenbase[i].biomeID;
    }

    chunk.resetRelightChecks();
    return chunk;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:30,代码来源:ChunkProviderHell.java

示例10: getBiome

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public BiomeGenBase getBiome(BlockPos pos, WorldChunkManager chunkManager)
{
    int i = pos.getX() & 15;
    int j = pos.getZ() & 15;
    int k = this.blockBiomeArray[j << 4 | i] & 255;

    if (k == 255)
    {
        BiomeGenBase biomegenbase = chunkManager.getBiomeGenerator(pos, BiomeGenBase.plains);
        k = biomegenbase.biomeID;
        this.blockBiomeArray[j << 4 | i] = (byte)(k & 255);
    }

    BiomeGenBase biomegenbase1 = BiomeGenBase.getBiome(k);
    return biomegenbase1 == null ? BiomeGenBase.plains : biomegenbase1;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:17,代码来源:Chunk.java

示例11: getPossibleCreatures

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public List<BiomeGenBase.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(pos);

    if (this.mapFeaturesEnabled)
    {
        if (creatureType == EnumCreatureType.MONSTER && this.scatteredFeatureGenerator.func_175798_a(pos))
        {
            return this.scatteredFeatureGenerator.getScatteredFeatureSpawnList();
        }

        if (creatureType == EnumCreatureType.MONSTER && this.settings.useMonuments && this.oceanMonumentGenerator.func_175796_a(this.worldObj, pos))
        {
            return this.oceanMonumentGenerator.func_175799_b();
        }
    }

    return biomegenbase.getSpawnableList(creatureType);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:ChunkProviderGenerate.java

示例12: matches

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public boolean matches(EntityLiving p_matches_1_)
{
    if (this.biomes != null)
    {
        BiomeGenBase biomegenbase = p_matches_1_.spawnBiome;
        boolean flag = false;

        for (int i = 0; i < this.biomes.length; ++i)
        {
            BiomeGenBase biomegenbase1 = this.biomes[i];

            if (biomegenbase1 == biomegenbase)
            {
                flag = true;
                break;
            }
        }

        if (!flag)
        {
            return false;
        }
    }

    return this.heights != null && p_matches_1_.spawnPosition != null ? this.heights.isInRange(p_matches_1_.spawnPosition.getY()) : true;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:27,代码来源:RandomMobsRule.java

示例13: biomeBaseToBiome

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
public static Biome biomeBaseToBiome(BiomeGenBase base) {
    if (base == null) {
        return null;
    }

    return BIOME_MAPPING[base.biomeID];
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:8,代码来源:CraftBlock.java

示例14: canSpawnStructureAtCoords

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
protected boolean canSpawnStructureAtCoords(int chunkX, int chunkZ)
{
    int i = chunkX;
    int j = chunkZ;

    if (chunkX < 0)
    {
        chunkX -= this.field_175800_f - 1;
    }

    if (chunkZ < 0)
    {
        chunkZ -= this.field_175800_f - 1;
    }

    int k = chunkX / this.field_175800_f;
    int l = chunkZ / this.field_175800_f;
    Random random = this.worldObj.setRandomSeed(k, l, 10387313);
    k = k * this.field_175800_f;
    l = l * this.field_175800_f;
    k = k + (random.nextInt(this.field_175800_f - this.field_175801_g) + random.nextInt(this.field_175800_f - this.field_175801_g)) / 2;
    l = l + (random.nextInt(this.field_175800_f - this.field_175801_g) + random.nextInt(this.field_175800_f - this.field_175801_g)) / 2;

    if (i == k && j == l)
    {
        if (this.worldObj.getWorldChunkManager().getBiomeGenerator(new BlockPos(i * 16 + 8, 64, j * 16 + 8), (BiomeGenBase)null) != BiomeGenBase.deepOcean)
        {
            return false;
        }

        boolean flag = this.worldObj.getWorldChunkManager().areBiomesViable(i * 16 + 8, j * 16 + 8, 29, field_175802_d);

        if (flag)
        {
            return true;
        }
    }

    return false;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:41,代码来源:StructureOceanMonument.java

示例15: getColorVanilla

import net.minecraft.world.biome.BiomeGenBase; //导入依赖的package包/类
private int getColorVanilla(BiomeGenBase p_getColorVanilla_1_, BlockPos p_getColorVanilla_2_)
{
    double d0 = (double)MathHelper.clamp_float(p_getColorVanilla_1_.getFloatTemperature(p_getColorVanilla_2_), 0.0F, 1.0F);
    double d1 = (double)MathHelper.clamp_float(p_getColorVanilla_1_.getFloatRainfall(), 0.0F, 1.0F);
    d1 = d1 * d0;
    int i = (int)((1.0D - d0) * (double)(this.width - 1));
    int j = (int)((1.0D - d1) * (double)(this.height - 1));
    return this.getColor(i, j);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:CustomColormap.java


注:本文中的net.minecraft.world.biome.BiomeGenBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。