本文整理汇总了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);
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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_);
}
示例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);
}
示例8: pickRandomFlower
import net.minecraft.block.BlockFlower; //导入方法依赖的package包/类
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
return BlockFlower.EnumFlowerType.BLUE_ORCHID;
}
示例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;
}
示例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_);
}
示例11: WorldGenFlowers
import net.minecraft.block.BlockFlower; //导入方法依赖的package包/类
public WorldGenFlowers(BlockFlower flowerIn, BlockFlower.EnumFlowerType type)
{
this.setGeneratedBlock(flowerIn, type);
}
示例12: pickRandomFlower
import net.minecraft.block.BlockFlower; //导入方法依赖的package包/类
@Override
public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
{
return super.pickRandomFlower(rand, pos);
}
示例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_);
}
示例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();
}
示例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;
}