當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。