TF2Attribute.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:Mods 作者:
public static float addValue(float value, NBTTagCompound attributelist, String effect) {
    for(String name : attributelist.getKeySet()) {
        NBTBase tag = attributelist.getTag(name);
        if (tag instanceof NBTTagFloat) {
            TF2Attribute attribute = attributes[Integer.parseInt(name)];
            if (attribute != null && attribute.effect.equals(effect))
                if (attribute.typeOfValue == Type.ADDITIVE)
                    value += ((NBTTagFloat) tag).getFloat();
                else
                    value *= ((NBTTagFloat) tag).getFloat();
        }
    }
    return value;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号