mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 16:55:15 +00:00
Add energy projectile types and events: implement IEnergyOrb, IEnergyBeam, IEnergyDisc, and IEnergyLaser interfaces, along with their respective script handlers and event hooks
This commit is contained in:
1 parent
66fff09d20
commit
efa8721d36
10 files changed
+402
-5
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package noppes.npcs.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.IDamageSource;
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
import noppes.npcs.api.entity.IEntityLivingBase;
|
||||
|
||||
@@ -20,9 +21,75 @@ public interface IPlayerAbilityEvent extends IPlayerEvent {
|
||||
*/
|
||||
IEntityLivingBase getTarget();
|
||||
|
||||
/**
|
||||
* Fired when a player's ability starts executing (enters WINDUP phase).
|
||||
* Canceling prevents the ability from starting.
|
||||
*
|
||||
* @hookName abilityStart
|
||||
*/
|
||||
@Cancelable
|
||||
interface StartEvent extends IPlayerAbilityEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a player's ability enters the ACTIVE phase and performs its effect.
|
||||
* Canceling prevents the ability effect from occurring.
|
||||
*
|
||||
* @hookName abilityExecute
|
||||
*/
|
||||
@Cancelable
|
||||
interface ExecuteEvent extends IPlayerAbilityEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a player's ability is interrupted by damage.
|
||||
*
|
||||
* @hookName abilityInterrupt
|
||||
*/
|
||||
interface InterruptEvent extends IPlayerAbilityEvent {
|
||||
/**
|
||||
* Get the damage source that caused the interruption, or null if not damage-triggered.
|
||||
*/
|
||||
IDamageSource getDamageSource();
|
||||
|
||||
/**
|
||||
* Get the amount of damage that caused the interruption.
|
||||
*/
|
||||
float getDamage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a player's ability completes its full execution cycle.
|
||||
*
|
||||
* @hookName abilityComplete
|
||||
*/
|
||||
interface CompleteEvent extends IPlayerAbilityEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired every tick while a player's ability is executing.
|
||||
* Provides the current phase and tick count.
|
||||
*
|
||||
* @hookName abilityTick
|
||||
*/
|
||||
interface TickEvent extends IPlayerAbilityEvent {
|
||||
/**
|
||||
* Get the current phase of the ability.
|
||||
* 0 = IDLE, 1 = WINDUP, 2 = ACTIVE, 3 = RECOVERY
|
||||
*/
|
||||
int getAbilityPhase();
|
||||
|
||||
/**
|
||||
* Get the current tick count within the phase.
|
||||
*/
|
||||
int getTick();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a player's ability hits an entity with damage.
|
||||
* Canceling this event prevents the damage from being applied.
|
||||
*
|
||||
* @hookName abilityHit
|
||||
*/
|
||||
@Cancelable
|
||||
interface HitEvent extends IPlayerAbilityEvent {
|
||||
|
||||
Reference in new issue
Block a user