public void RecalculateAttributes(IItemStack stack) { ModularItemHelper.RecalculateAttributes(stack, api.World); ItemStack headstack = GetToolheadStack(stack); int tooltier = 0; if (headstack != null) { headstack.ResolveBlockOrItem(api.World); ToolPart part = (ToolPart)headstack.Item; if (part != null) { tooltier = part.TinkerProps.ToolTier; } } if (tooltier != 0) { stack.Attributes.SetInt("tooltier", tooltier); } else { stack.Attributes.RemoveAttribute("tooltier"); } }
public virtual void RecalculateAttributes(IItemStack stack) { ModularItemHelper.RecalculateAttributes(stack, api.World); }