當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockFalling.field_149832_M方法代碼示例

本文整理匯總了Java中net.minecraft.block.BlockFalling.field_149832_M方法的典型用法代碼示例。如果您正苦於以下問題:Java BlockFalling.field_149832_M方法的具體用法?Java BlockFalling.field_149832_M怎麽用?Java BlockFalling.field_149832_M使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.BlockFalling的用法示例。


在下文中一共展示了BlockFalling.field_149832_M方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populate

import net.minecraft.block.BlockFalling; //導入方法依賴的package包/類
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockFalling.field_149832_M = true;
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = this.endWorld.getBiomeGenForCoords(var4 + 16, var5 + 16);
    var6.decorate(this.endWorld, this.endWorld.rand, var4, var5);
    BlockFalling.field_149832_M = false;
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:13,代碼來源:ChunkProviderEnd.java

示例2: populate

import net.minecraft.block.BlockFalling; //導入方法依賴的package包/類
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockFalling.field_149832_M = true;
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = 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((long)par2 * var7 + (long)par3 * var9 ^ this.worldObj.getSeed());
    boolean var11 = false;

    if (this.mapFeaturesEnabled)
    {
        this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        var11 = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int var12;
    int var13;
    int var14;

    if (var6 != BiomeGenBase.desert && var6 != BiomeGenBase.desertHills && !var11 && this.rand.nextInt(4) == 0)
    {
        var12 = var4 + this.rand.nextInt(16) + 8;
        var13 = this.rand.nextInt(256);
        var14 = var5 + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, var12, var13, var14);
    }

    if (!var11 && this.rand.nextInt(8) == 0)
    {
        var12 = var4 + this.rand.nextInt(16) + 8;
        var13 = this.rand.nextInt(this.rand.nextInt(248) + 8);
        var14 = var5 + this.rand.nextInt(16) + 8;

        if (var13 < 63 || this.rand.nextInt(10) == 0)
        {
            (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, var12, var13, var14);
        }
    }

    for (var12 = 0; var12 < 8; ++var12)
    {
        var13 = var4 + this.rand.nextInt(16) + 8;
        var14 = this.rand.nextInt(256);
        int var15 = var5 + this.rand.nextInt(16) + 8;
        (new WorldGenDungeons()).generate(this.worldObj, this.rand, var13, var14, var15);
    }

    var6.decorate(this.worldObj, this.rand, var4, var5);
    SpawnerAnimals.performWorldGenSpawning(this.worldObj, var6, var4 + 8, var5 + 8, 16, 16, this.rand);
    var4 += 8;
    var5 += 8;

    for (var12 = 0; var12 < 16; ++var12)
    {
        for (var13 = 0; var13 < 16; ++var13)
        {
            var14 = this.worldObj.getPrecipitationHeight(var4 + var12, var5 + var13);

            if (this.worldObj.isBlockFreezable(var12 + var4, var14 - 1, var13 + var5))
            {
                this.worldObj.setBlock(var12 + var4, var14 - 1, var13 + var5, Blocks.ice, 0, 2);
            }

            if (this.worldObj.func_147478_e(var12 + var4, var14, var13 + var5, true))
            {
                this.worldObj.setBlock(var12 + var4, var14, var13 + var5, Blocks.snow_layer, 0, 2);
            }
        }
    }

    BlockFalling.field_149832_M = false;
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:81,代碼來源:ChunkProviderGenerate.java


注:本文中的net.minecraft.block.BlockFalling.field_149832_M方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。