本文整理匯總了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;
}