Java Code Examples for net.minecraft.util.MathHelper.floor_double_long()

The following are Jave code examples for showing how to use floor_double_long() of the net.minecraft.util.MathHelper class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: NoiseGeneratorOctaves.java   Source Code and License Vote up 5 votes
/**
 * pars:(par2,3,4=noiseOffset ; so that adjacent noise segments connect) (pars5,6,7=x,y,zArraySize),(pars8,10,12 =
 * x,y,z noiseScale)
 */
public double[] generateNoiseOctaves(double[] p_76304_1_, int p_76304_2_, int p_76304_3_, int p_76304_4_, int p_76304_5_, int p_76304_6_, int p_76304_7_, double p_76304_8_, double p_76304_10_, double p_76304_12_)
{
    if (p_76304_1_ == null)
    {
        p_76304_1_ = new double[p_76304_5_ * p_76304_6_ * p_76304_7_];
    }
    else
    {
        for (int i = 0; i < p_76304_1_.length; ++i)
        {
            p_76304_1_[i] = 0.0D;
        }
    }

    double d3 = 1.0D;

    for (int j = 0; j < this.octaves; ++j)
    {
        double d0 = (double)p_76304_2_ * d3 * p_76304_8_;
        double d1 = (double)p_76304_3_ * d3 * p_76304_10_;
        double d2 = (double)p_76304_4_ * d3 * p_76304_12_;
        long k = MathHelper.floor_double_long(d0);
        long l = MathHelper.floor_double_long(d2);
        d0 = d0 - (double)k;
        d2 = d2 - (double)l;
        k = k % 16777216L;
        l = l % 16777216L;
        d0 = d0 + (double)k;
        d2 = d2 + (double)l;
        this.generatorCollection[j].populateNoiseArray(p_76304_1_, d0, d1, d2, p_76304_5_, p_76304_6_, p_76304_7_, p_76304_8_ * d3, p_76304_10_ * d3, p_76304_12_ * d3, d3);
        d3 /= 2.0D;
    }

    return p_76304_1_;
}
 
Example 2
Project: BaseClient   File: NoiseGeneratorOctaves.java   Source Code and License Vote up 5 votes
/**
 * pars:(par2,3,4=noiseOffset ; so that adjacent noise segments connect) (pars5,6,7=x,y,zArraySize),(pars8,10,12 =
 * x,y,z noiseScale)
 */
public double[] generateNoiseOctaves(double[] p_76304_1_, int p_76304_2_, int p_76304_3_, int p_76304_4_, int p_76304_5_, int p_76304_6_, int p_76304_7_, double p_76304_8_, double p_76304_10_, double p_76304_12_)
{
    if (p_76304_1_ == null)
    {
        p_76304_1_ = new double[p_76304_5_ * p_76304_6_ * p_76304_7_];
    }
    else
    {
        for (int i = 0; i < p_76304_1_.length; ++i)
        {
            p_76304_1_[i] = 0.0D;
        }
    }

    double d3 = 1.0D;

    for (int j = 0; j < this.octaves; ++j)
    {
        double d0 = (double)p_76304_2_ * d3 * p_76304_8_;
        double d1 = (double)p_76304_3_ * d3 * p_76304_10_;
        double d2 = (double)p_76304_4_ * d3 * p_76304_12_;
        long k = MathHelper.floor_double_long(d0);
        long l = MathHelper.floor_double_long(d2);
        d0 = d0 - (double)k;
        d2 = d2 - (double)l;
        k = k % 16777216L;
        l = l % 16777216L;
        d0 = d0 + (double)k;
        d2 = d2 + (double)l;
        this.generatorCollection[j].populateNoiseArray(p_76304_1_, d0, d1, d2, p_76304_5_, p_76304_6_, p_76304_7_, p_76304_8_ * d3, p_76304_10_ * d3, p_76304_12_ * d3, d3);
        d3 /= 2.0D;
    }

    return p_76304_1_;
}
 
Example 3
Project: BaseClient   File: RealmsMth.java   Source Code and License Vote up 4 votes
public static long lfloor(double p_lfloor_0_)
{
    return MathHelper.floor_double_long(p_lfloor_0_);
}
 
Example 4
Project: BaseClient   File: RealmsMth.java   Source Code and License Vote up 4 votes
public static long lfloor(double p_lfloor_0_)
{
    return MathHelper.floor_double_long(p_lfloor_0_);
}