Search in sources :

Example 11 with EnumMaterialGrade

use of net.silentchaos512.gems.api.lib.EnumMaterialGrade in project SilentGems by SilentChaos512.

the class ToolPartTip method getStatModifier.

@Override
public ItemStatModifier getStatModifier(ItemStat stat, EnumMaterialGrade grade) {
    float val = stats.getStat(stat);
    Operation op = ItemStatModifier.Operation.ADD;
    if (stat == CommonItemStats.ATTACK_SPEED)
        val -= 1f;
    else if (stat == CommonItemStats.HARVEST_LEVEL)
        op = ItemStatModifier.Operation.MAX;
    return new ItemStatModifier(getUnlocalizedName(), val, op);
}
Also used : ItemStatModifier(net.silentchaos512.gems.api.stats.ItemStatModifier) Operation(net.silentchaos512.gems.api.stats.ItemStatModifier.Operation)

Aggregations

EnumMaterialGrade (net.silentchaos512.gems.api.lib.EnumMaterialGrade)10 ToolPart (net.silentchaos512.gems.api.tool.part.ToolPart)8 EnumMaterialTier (net.silentchaos512.gems.api.lib.EnumMaterialTier)5 ITool (net.silentchaos512.gems.api.ITool)4 ItemStack (net.minecraft.item.ItemStack)3 TextFormatting (net.minecraft.util.text.TextFormatting)3 ToolSoul (net.silentchaos512.gems.lib.soul.ToolSoul)3 UUID (java.util.UUID)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 ItemStatModifier (net.silentchaos512.gems.api.stats.ItemStatModifier)2 ToolStats (net.silentchaos512.gems.api.tool.ToolStats)2 ToolPartMain (net.silentchaos512.gems.api.tool.part.ToolPartMain)2 ToolPartTip (net.silentchaos512.gems.api.tool.part.ToolPartTip)2 LocalizationHelper (net.silentchaos512.lib.util.LocalizationHelper)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 Item (net.minecraft.item.Item)1 ItemTool (net.minecraft.item.ItemTool)1