本文整理匯總了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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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_);
}