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

The following are Jave code examples for showing how to use parseIntWithDefaultAndMax() 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: DecompiledMinecraft   File: MapGenStronghold.java   Source Code and License 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: StructureOceanMonument.java   Source Code and License Vote up 6 votes
public StructureOceanMonument(Map<String, String> p_i45608_1_)
{
    this();

    for (Entry<String, String> entry : p_i45608_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("spacing"))
        {
            this.field_175800_f = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175800_f, 1);
        }
        else if (((String)entry.getKey()).equals("separation"))
        {
            this.field_175801_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175801_g, 1);
        }
    }
}
 
Example 3
Project: DecompiledMinecraft   File: MapGenVillage.java   Source Code and License Vote up 6 votes
public MapGenVillage(Map<String, String> p_i2093_1_)
{
    this();

    for (Entry<String, String> entry : p_i2093_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("size"))
        {
            this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0);
        }
        else if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1);
        }
    }
}
 
Example 4
Project: DecompiledMinecraft   File: MapGenStronghold.java   Source Code and License 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: StructureOceanMonument.java   Source Code and License Vote up 6 votes
public StructureOceanMonument(Map<String, String> p_i45608_1_)
{
    this();

    for (Entry<String, String> entry : p_i45608_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("spacing"))
        {
            this.field_175800_f = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175800_f, 1);
        }
        else if (((String)entry.getKey()).equals("separation"))
        {
            this.field_175801_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175801_g, 1);
        }
    }
}
 
Example 6
Project: DecompiledMinecraft   File: MapGenVillage.java   Source Code and License Vote up 6 votes
public MapGenVillage(Map<String, String> p_i2093_1_)
{
    this();

    for (Entry<String, String> entry : p_i2093_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("size"))
        {
            this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0);
        }
        else if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1);
        }
    }
}
 
Example 7
Project: BaseClient   File: MapGenStronghold.java   Source Code and License 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 8
Project: BaseClient   File: StructureOceanMonument.java   Source Code and License Vote up 6 votes
public StructureOceanMonument(Map<String, String> p_i45608_1_)
{
    this();

    for (Entry<String, String> entry : p_i45608_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("spacing"))
        {
            this.field_175800_f = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175800_f, 1);
        }
        else if (((String)entry.getKey()).equals("separation"))
        {
            this.field_175801_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175801_g, 1);
        }
    }
}
 
Example 9
Project: BaseClient   File: MapGenVillage.java   Source Code and License Vote up 6 votes
public MapGenVillage(Map<String, String> p_i2093_1_)
{
    this();

    for (Entry<String, String> entry : p_i2093_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("size"))
        {
            this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0);
        }
        else if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1);
        }
    }
}
 
Example 10
Project: BaseClient   File: MapGenStronghold.java   Source Code and License 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 11
Project: BaseClient   File: StructureOceanMonument.java   Source Code and License Vote up 6 votes
public StructureOceanMonument(Map<String, String> p_i45608_1_)
{
    this();

    for (Entry<String, String> entry : p_i45608_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("spacing"))
        {
            this.field_175800_f = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175800_f, 1);
        }
        else if (((String)entry.getKey()).equals("separation"))
        {
            this.field_175801_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_175801_g, 1);
        }
    }
}
 
Example 12
Project: BaseClient   File: MapGenVillage.java   Source Code and License Vote up 6 votes
public MapGenVillage(Map<String, String> p_i2093_1_)
{
    this();

    for (Entry<String, String> entry : p_i2093_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("size"))
        {
            this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0);
        }
        else if (((String)entry.getKey()).equals("distance"))
        {
            this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1);
        }
    }
}
 
Example 13
Project: DecompiledMinecraft   File: MapGenScatteredFeature.java   Source Code and License Vote up 5 votes
public MapGenScatteredFeature(Map<String, String> p_i2061_1_)
{
    this();

    for (Entry<String, String> entry : p_i2061_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.maxDistanceBetweenScatteredFeatures = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.maxDistanceBetweenScatteredFeatures, this.minDistanceBetweenScatteredFeatures + 1);
        }
    }
}
 
Example 14
Project: DecompiledMinecraft   File: MapGenScatteredFeature.java   Source Code and License Vote up 5 votes
public MapGenScatteredFeature(Map<String, String> p_i2061_1_)
{
    this();

    for (Entry<String, String> entry : p_i2061_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.maxDistanceBetweenScatteredFeatures = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.maxDistanceBetweenScatteredFeatures, this.minDistanceBetweenScatteredFeatures + 1);
        }
    }
}
 
Example 15
Project: BaseClient   File: MapGenScatteredFeature.java   Source Code and License Vote up 5 votes
public MapGenScatteredFeature(Map<String, String> p_i2061_1_)
{
    this();

    for (Entry<String, String> entry : p_i2061_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.maxDistanceBetweenScatteredFeatures = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.maxDistanceBetweenScatteredFeatures, this.minDistanceBetweenScatteredFeatures + 1);
        }
    }
}
 
Example 16
Project: BaseClient   File: MapGenScatteredFeature.java   Source Code and License Vote up 5 votes
public MapGenScatteredFeature(Map<String, String> p_i2061_1_)
{
    this();

    for (Entry<String, String> entry : p_i2061_1_.entrySet())
    {
        if (((String)entry.getKey()).equals("distance"))
        {
            this.maxDistanceBetweenScatteredFeatures = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.maxDistanceBetweenScatteredFeatures, this.minDistanceBetweenScatteredFeatures + 1);
        }
    }
}
 
Example 17
Project: DecompiledMinecraft   File: RealmsMth.java   Source Code and License Vote up 4 votes
public static int getInt(String p_getInt_0_, int p_getInt_1_, int p_getInt_2_)
{
    return MathHelper.parseIntWithDefaultAndMax(p_getInt_0_, p_getInt_1_, p_getInt_2_);
}
 
Example 18
Project: BaseClient   File: RealmsMth.java   Source Code and License Vote up 4 votes
public static int getInt(String p_getInt_0_, int p_getInt_1_, int p_getInt_2_)
{
    return MathHelper.parseIntWithDefaultAndMax(p_getInt_0_, p_getInt_1_, p_getInt_2_);
}
 
Example 19
Project: BaseClient   File: RealmsMth.java   Source Code and License Vote up 4 votes
public static int getInt(String p_getInt_0_, int p_getInt_1_, int p_getInt_2_)
{
    return MathHelper.parseIntWithDefaultAndMax(p_getInt_0_, p_getInt_1_, p_getInt_2_);
}