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

The following are Jave code examples for showing how to use parseDoubleWithDefaultAndMax() 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.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: MapGenStronghold.java   View Source Code Vote up 6 votes
public MapGenStronghold(Map<String, String> p_i2068_1_)
{
    this();

    for (Entry<String, String> entry : p_i2068_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82671_h = MathHelper.parseDoubleWithDefaultAndMax((String)entry.getValue(), this.field_82671_h, 1.0D);
        }
        else if (((String)entry.getKey()).equals("count"))
        {
            this.structureCoords = new ChunkCoordIntPair[MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.structureCoords.length, 1)];
        }
        else if (((String)entry.getKey()).equals("spread"))
        {
            this.field_82672_i = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82672_i, 1);
        }
    }
}
 
Example 2
Project: DecompiledMinecraft   File: MapGenStronghold.java   View Source Code Vote up 6 votes
public MapGenStronghold(Map<String, String> p_i2068_1_)
{
    this();

    for (Entry<String, String> entry : p_i2068_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82671_h = MathHelper.parseDoubleWithDefaultAndMax((String)entry.getValue(), this.field_82671_h, 1.0D);
        }
        else if (((String)entry.getKey()).equals("count"))
        {
            this.structureCoords = new ChunkCoordIntPair[MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.structureCoords.length, 1)];
        }
        else if (((String)entry.getKey()).equals("spread"))
        {
            this.field_82672_i = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82672_i, 1);
        }
    }
}
 
Example 3
Project: BaseClient   File: MapGenStronghold.java   View Source Code Vote up 6 votes
public MapGenStronghold(Map<String, String> p_i2068_1_)
{
    this();

    for (Entry<String, String> entry : p_i2068_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82671_h = MathHelper.parseDoubleWithDefaultAndMax((String)entry.getValue(), this.field_82671_h, 1.0D);
        }
        else if (((String)entry.getKey()).equals("count"))
        {
            this.structureCoords = new ChunkCoordIntPair[MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.structureCoords.length, 1)];
        }
        else if (((String)entry.getKey()).equals("spread"))
        {
            this.field_82672_i = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82672_i, 1);
        }
    }
}
 
Example 4
Project: BaseClient   File: MapGenStronghold.java   View Source Code Vote up 6 votes
public MapGenStronghold(Map<String, String> p_i2068_1_)
{
    this();

    for (Entry<String, String> entry : p_i2068_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82671_h = MathHelper.parseDoubleWithDefaultAndMax((String)entry.getValue(), this.field_82671_h, 1.0D);
        }
        else if (((String)entry.getKey()).equals("count"))
        {
            this.structureCoords = new ChunkCoordIntPair[MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.structureCoords.length, 1)];
        }
        else if (((String)entry.getKey()).equals("spread"))
        {
            this.field_82672_i = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82672_i, 1);
        }
    }
}
 
Example 5
Project: DecompiledMinecraft   File: RealmsMth.java   View Source Code Vote up 4 votes
public static double getDouble(String p_getDouble_0_, double p_getDouble_1_, double p_getDouble_3_)
{
    return MathHelper.parseDoubleWithDefaultAndMax(p_getDouble_0_, p_getDouble_1_, p_getDouble_3_);
}
 
Example 6
Project: BaseClient   File: RealmsMth.java   View Source Code Vote up 4 votes
public static double getDouble(String p_getDouble_0_, double p_getDouble_1_, double p_getDouble_3_)
{
    return MathHelper.parseDoubleWithDefaultAndMax(p_getDouble_0_, p_getDouble_1_, p_getDouble_3_);
}
 
Example 7
Project: BaseClient   File: RealmsMth.java   View Source Code Vote up 4 votes
public static double getDouble(String p_getDouble_0_, double p_getDouble_1_, double p_getDouble_3_)
{
    return MathHelper.parseDoubleWithDefaultAndMax(p_getDouble_0_, p_getDouble_1_, p_getDouble_3_);
}