当前位置: 首页>>代码示例>>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;未经允许,请勿转载。