当前位置: 首页>>代码示例>>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;未经允许,请勿转载。