本文整理汇总了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_);
}