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


Java BlockFlower.EnumFlowerType方法代碼示例

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


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

示例1: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    if (this.field_150632_aF == 1)
    {
        double d0 = MathHelper.clamp_double((1.0D + GRASS_COLOR_NOISE.func_151601_a((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D);
        BlockFlower.EnumFlowerType blockflower$enumflowertype = BlockFlower.EnumFlowerType.values()[(int)(d0 * (double)BlockFlower.EnumFlowerType.values().length)];
        return blockflower$enumflowertype == BlockFlower.EnumFlowerType.BLUE_ORCHID ? BlockFlower.EnumFlowerType.POPPY : blockflower$enumflowertype;
    }
    else
    {
        return super.pickRandomFlower(rand, pos);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:14,代碼來源:BiomeGenForest.java

示例2: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    double d0 = GRASS_COLOR_NOISE.func_151601_a((double)pos.getX() / 200.0D, (double)pos.getZ() / 200.0D);

    if (d0 < -0.8D)
    {
        int j = rand.nextInt(4);

        switch (j)
        {
            case 0:
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;

            case 1:
                return BlockFlower.EnumFlowerType.RED_TULIP;

            case 2:
                return BlockFlower.EnumFlowerType.PINK_TULIP;

            case 3:
            default:
                return BlockFlower.EnumFlowerType.WHITE_TULIP;
        }
    }
    else if (rand.nextInt(3) > 0)
    {
        int i = rand.nextInt(3);
        return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY);
    }
    else
    {
        return BlockFlower.EnumFlowerType.DANDELION;
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:35,代碼來源:BiomeGenPlains.java

示例3: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    double d0 = GRASS_COLOR_NOISE.getValue((double)pos.getX() / 200.0D, (double)pos.getZ() / 200.0D);

    if (d0 < -0.8D)
    {
        int j = rand.nextInt(4);

        switch (j)
        {
            case 0:
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;
            case 1:
                return BlockFlower.EnumFlowerType.RED_TULIP;
            case 2:
                return BlockFlower.EnumFlowerType.PINK_TULIP;
            case 3:
            default:
                return BlockFlower.EnumFlowerType.WHITE_TULIP;
        }
    }
    else if (rand.nextInt(3) > 0)
    {
        int i = rand.nextInt(3);
        return i == 0 ? BlockFlower.EnumFlowerType.POPPY : (i == 1 ? BlockFlower.EnumFlowerType.HOUSTONIA : BlockFlower.EnumFlowerType.OXEYE_DAISY);
    }
    else
    {
        return BlockFlower.EnumFlowerType.DANDELION;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:32,代碼來源:BiomePlains.java

示例4: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    if (this.type == BiomeForest.Type.FLOWER)
    {
        double d0 = MathHelper.clamp_double((1.0D + GRASS_COLOR_NOISE.getValue((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D);
        BlockFlower.EnumFlowerType blockflower$enumflowertype = BlockFlower.EnumFlowerType.values()[(int)(d0 * (double)BlockFlower.EnumFlowerType.values().length)];
        return blockflower$enumflowertype == BlockFlower.EnumFlowerType.BLUE_ORCHID ? BlockFlower.EnumFlowerType.POPPY : blockflower$enumflowertype;
    }
    else
    {
        return super.pickRandomFlower(rand, pos);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:14,代碼來源:BiomeForest.java

示例5: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    if (this.type == BiomeForest.Type.FLOWER)
    {
        double d0 = MathHelper.clamp((1.0D + GRASS_COLOR_NOISE.getValue((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D);
        BlockFlower.EnumFlowerType blockflower$enumflowertype = BlockFlower.EnumFlowerType.values()[(int)(d0 * (double)BlockFlower.EnumFlowerType.values().length)];
        return blockflower$enumflowertype == BlockFlower.EnumFlowerType.BLUE_ORCHID ? BlockFlower.EnumFlowerType.POPPY : blockflower$enumflowertype;
    }
    else
    {
        return super.pickRandomFlower(rand, pos);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:14,代碼來源:BiomeForest.java

示例6: setGeneratedBlock

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public void setGeneratedBlock(BlockFlower p_175914_1_, BlockFlower.EnumFlowerType p_175914_2_)
{
    this.flower = p_175914_1_;
    this.field_175915_b = p_175914_1_.getDefaultState().withProperty(p_175914_1_.getTypeProperty(), p_175914_2_);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:6,代碼來源:WorldGenFlowers.java

示例7: setGeneratedBlock

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public void setGeneratedBlock(BlockFlower flowerIn, BlockFlower.EnumFlowerType typeIn)
{
    this.flower = flowerIn;
    this.state = flowerIn.getDefaultState().withProperty(flowerIn.getTypeProperty(), typeIn);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:6,代碼來源:WorldGenFlowers.java

示例8: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    return BlockFlower.EnumFlowerType.BLUE_ORCHID;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:5,代碼來源:BiomeGenSwamp.java

示例9: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    return rand.nextInt(3) > 0 ? BlockFlower.EnumFlowerType.DANDELION : BlockFlower.EnumFlowerType.POPPY;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:BiomeGenBase.java

示例10: WorldGenFlowers

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public WorldGenFlowers(BlockFlower p_i45632_1_, BlockFlower.EnumFlowerType p_i45632_2_)
{
    this.setGeneratedBlock(p_i45632_1_, p_i45632_2_);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:WorldGenFlowers.java

示例11: WorldGenFlowers

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public WorldGenFlowers(BlockFlower flowerIn, BlockFlower.EnumFlowerType type)
{
    this.setGeneratedBlock(flowerIn, type);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:WorldGenFlowers.java

示例12: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
@Override
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
    return super.pickRandomFlower(rand, pos);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:6,代碼來源:BiomeBambooForest.java

示例13: WorldGenRose

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public WorldGenRose(Block p_i45632_1_, BlockFlower.EnumFlowerType p_i45632_2_)
{
    this.setGeneratedBlock(p_i45632_1_, p_i45632_2_);
}
 
開發者ID:Stormister,項目名稱:Rediscovered-Mod-1.8,代碼行數:5,代碼來源:WorldGenRose.java

示例14: setGeneratedBlock

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public void setGeneratedBlock(Block p_175914_1_, BlockFlower.EnumFlowerType p_175914_2_)
{
    this.flower = p_175914_1_;
    this.field_175915_b = p_175914_1_.getDefaultState();
}
 
開發者ID:Stormister,項目名稱:Rediscovered-Mod-1.8,代碼行數:6,代碼來源:WorldGenRose.java

示例15: pickRandomFlower

import net.minecraft.block.BlockFlower; //導入方法依賴的package包/類
public BlockFlower.EnumFlowerType pickRandomFlower(Random p_180623_1_, BlockPos p_180623_2_)
{
    return BlockFlower.EnumFlowerType.BLUE_ORCHID;
}
 
開發者ID:NovaViper,項目名稱:ZeroQuest,代碼行數:5,代碼來源:BiomeGenNileSwamp.java


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