當前位置: 首頁>>代碼示例>>Java>>正文


Java MathHelper.parseIntWithDefaultAndMax方法代碼示例

本文整理匯總了Java中net.minecraft.util.MathHelper.parseIntWithDefaultAndMax方法的典型用法代碼示例。如果您正苦於以下問題:Java MathHelper.parseIntWithDefaultAndMax方法的具體用法?Java MathHelper.parseIntWithDefaultAndMax怎麽用?Java MathHelper.parseIntWithDefaultAndMax使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.MathHelper的用法示例。


在下文中一共展示了MathHelper.parseIntWithDefaultAndMax方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MapGenStronghold

import net.minecraft.util.MathHelper; //導入方法依賴的package包/類
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);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:21,代碼來源:MapGenStronghold.java

示例2: StructureOceanMonument

import net.minecraft.util.MathHelper; //導入方法依賴的package包/類
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);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:17,代碼來源:StructureOceanMonument.java

示例3: MapGenVillage

import net.minecraft.util.MathHelper; //導入方法依賴的package包/類
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);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:17,代碼來源:MapGenVillage.java

示例4: MapGenScatteredFeature

import net.minecraft.util.MathHelper; //導入方法依賴的package包/類
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);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:13,代碼來源:MapGenScatteredFeature.java

示例5: getInt

import net.minecraft.util.MathHelper; //導入方法依賴的package包/類
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_);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:RealmsMth.java


注:本文中的net.minecraft.util.MathHelper.parseIntWithDefaultAndMax方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。