本文整理汇总了Java中net.minecraft.util.math.MathHelper.nextFloat方法的典型用法代码示例。如果您正苦于以下问题:Java MathHelper.nextFloat方法的具体用法?Java MathHelper.nextFloat怎么用?Java MathHelper.nextFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.math.MathHelper
的用法示例。
在下文中一共展示了MathHelper.nextFloat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ParticleDragonBreath
import net.minecraft.util.math.MathHelper; //导入方法依赖的package包/类
protected ParticleDragonBreath(World worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed)
{
super(worldIn, x, y, z, xSpeed, ySpeed, zSpeed);
this.motionX = xSpeed;
this.motionY = ySpeed;
this.motionZ = zSpeed;
this.particleRed = MathHelper.nextFloat(this.rand, 0.7176471F, 0.8745098F);
this.particleGreen = MathHelper.nextFloat(this.rand, 0.0F, 0.0F);
this.particleBlue = MathHelper.nextFloat(this.rand, 0.8235294F, 0.9764706F);
this.particleScale *= 0.75F;
this.oSize = this.particleScale;
this.particleMaxAge = (int)(20.0D / ((double)this.rand.nextFloat() * 0.8D + 0.2D));
this.hasHitGround = false;
}
示例2: generateFloat
import net.minecraft.util.math.MathHelper; //导入方法依赖的package包/类
public float generateFloat(Random rand)
{
return MathHelper.nextFloat(rand, this.min, this.max);
}
示例3: nextFloat
import net.minecraft.util.math.MathHelper; //导入方法依赖的package包/类
public static float nextFloat(Random p_nextFloat_0_, float p_nextFloat_1_, float p_nextFloat_2_)
{
return MathHelper.nextFloat(p_nextFloat_0_, p_nextFloat_1_, p_nextFloat_2_);
}