/// <summary> /// Called continously when a custom attack action is playing. Return false to stop the action. /// </summary> /// <param name="secondsPassed"></param> /// <param name="slot"></param> /// <param name="byEntity"></param> /// <param name="blockSelection"></param> /// <param name="entitySel"></param> /// <param name="handling"></param> /// <returns></returns> public virtual bool OnHeldAttackStep(float secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel, ref EnumHandHandling handling) { handling = EnumHandHandling.NotHandled; return(false); }
/// <summary> /// When the player has begun using this item for attacking (left mouse click). Return true to play a custom action. /// </summary> /// <param name="slot"></param> /// <param name="byEntity"></param> /// <param name="blockSel"></param> /// <param name="entitySel"></param> /// <param name="handHandling"></param> /// <param name="handling"></param> /// <returns></returns> public virtual void OnHeldAttackStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandHandling handHandling, ref EnumHandHandling handling) { handHandling = EnumHandHandling.NotHandled; }
/// <summary> /// Called when the player right clicks while holding this block/item in his hands /// </summary> /// <param name="slot"></param> /// <param name="byEntity"></param> /// <param name="blockSel"></param> /// <param name="entitySel"></param> /// <param name="handHandling"></param> /// <param name="handling"></param> /// <returns></returns> public virtual void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, bool firstEvent, ref EnumHandHandling handHandling, ref EnumHandling handling) { handling = EnumHandling.PassThrough; }
/// <summary> /// Called when the player successfully completed the using action, not called when successfully cancelled /// </summary> /// <param name="secondsUsed"></param> /// <param name="slot"></param> /// <param name="byEntity"></param> /// <param name="blockSel"></param> /// <param name="entitySel"></param> /// <param name="handling"></param> public virtual void OnHeldInteractStop(float secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandling handling) { handling = EnumHandling.PassThrough; return; }
/// <summary> /// Called when a custom attack action is finished /// </summary> /// <param name="secondsPassed"></param> /// <param name="slot"></param> /// <param name="byEntity"></param> /// <param name="blockSelection"></param> /// <param name="entitySel"></param> /// <param name="handling"></param> public virtual void OnHeldAttackStop(float secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel, ref EnumHandHandling handling) { handling = EnumHandHandling.NotHandled; }