Ejemplo n.º 1
0
        public override float GetMiningSpeed(IItemStack itemstack, Block block, IPlayer forPlayer)
        {
            ItemStack partstack = ModularItemHelper.GetToolheadStack(itemstack);
            ToolPart  part      = null;

            if (partstack != null)
            {
                partstack.ResolveBlockOrItem(api.World);
                part = (ToolPart)partstack.Item;
            }

            if (part != null)
            {
                return(part.GetMiningSpeed(itemstack, block, forPlayer));
            }

            return(base.GetMiningSpeed(itemstack, block, forPlayer));
        }
Ejemplo n.º 2
0
 public ItemStack GetToolheadStack(IItemStack stack)
 {
     return(ModularItemHelper.GetToolheadStack(stack));
 }