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


Java BiomeGenBase.decorate方法代码示例

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


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

示例1: populate

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider chunk, int x, int z)
{
	BlockFalling.fallInstantly = true;
	int var4 = x * 16;
	int var5 = z * 16;
	BiomeGenBase biomeGen = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
	this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
	this.rand.setSeed(this.worldObj.getSeed());
	long var7 = this.rand.nextLong() / 2L * 2L + 1L;
	long var9 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed(x * var7 + z * var9 ^ this.worldObj.getSeed());
	biomeGen.decorate(this.worldObj, this.rand, var4, var5);
	this.decoratePlanet(this.worldObj, this.rand, var4, var5);
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomeGen, var4 + 8, var5 + 8, 16, 16, this.rand);
	this.onPopulate(chunk, x, z);
	BlockFalling.fallInstantly = false;
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:19,代码来源:ChunkProviderSpaceLakes.java

示例2: populate

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:55,代码来源:ChunkProviderFlat.java


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