mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 11:24:44 +00:00
Projectile Handling APIs
This commit is contained in:
1 parent
456bb2cbfa
commit
2b95d3ca47
6 files changed
+94
-177
No files matched your search
@@ -1,12 +1,10 @@
|
||||
package noppes.npcs.api.ability.type;
|
||||
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
|
||||
/**
|
||||
* API interface for Disc abilities.
|
||||
* Flat spinning disc projectile with optional boomerang.
|
||||
*/
|
||||
public interface IAbilityDisc extends IAbility {
|
||||
public interface IAbilityDisc extends IAbilityEnergyProjectile {
|
||||
|
||||
float getSpeed();
|
||||
void setSpeed(float speed);
|
||||
@@ -17,20 +15,14 @@ public interface IAbilityDisc extends IAbility {
|
||||
float getDiscThickness();
|
||||
void setDiscThickness(float thickness);
|
||||
|
||||
float getMaxDistance();
|
||||
void setMaxDistance(float distance);
|
||||
boolean isVertical();
|
||||
void setVertical(boolean vertical);
|
||||
|
||||
int getMaxLifetime();
|
||||
void setMaxLifetime(int ticks);
|
||||
boolean isBoomerang();
|
||||
void setBoomerang(boolean boomerang);
|
||||
|
||||
float getDamage();
|
||||
void setDamage(float damage);
|
||||
|
||||
float getKnockback();
|
||||
void setKnockback(float knockback);
|
||||
|
||||
float getKnockbackUp();
|
||||
void setKnockbackUp(float knockback);
|
||||
int getBoomerangDelay();
|
||||
void setBoomerangDelay(int ticks);
|
||||
|
||||
boolean isHoming();
|
||||
void setHoming(boolean homing);
|
||||
@@ -41,45 +33,21 @@ public interface IAbilityDisc extends IAbility {
|
||||
float getHomingRange();
|
||||
void setHomingRange(float range);
|
||||
|
||||
boolean isBoomerang();
|
||||
void setBoomerang(boolean boomerang);
|
||||
|
||||
int getBoomerangDelay();
|
||||
void setBoomerangDelay(int ticks);
|
||||
|
||||
boolean isExplosive();
|
||||
void setExplosive(boolean explosive);
|
||||
|
||||
float getExplosionRadius();
|
||||
void setExplosionRadius(float radius);
|
||||
|
||||
int getInnerColor();
|
||||
void setInnerColor(int color);
|
||||
|
||||
int getOuterColor();
|
||||
void setOuterColor(int color);
|
||||
|
||||
boolean isOuterColorEnabled();
|
||||
void setOuterColorEnabled(boolean enabled);
|
||||
|
||||
float getRotationSpeed();
|
||||
void setRotationSpeed(float speed);
|
||||
|
||||
boolean hasLightningEffect();
|
||||
void setLightningEffect(boolean enabled);
|
||||
|
||||
int getAnchorPoint();
|
||||
void setAnchorPoint(int point);
|
||||
|
||||
// Dual/Projectile count
|
||||
|
||||
int getProjectileCount();
|
||||
void setProjectileCount(int count);
|
||||
|
||||
int getFireDelay();
|
||||
void setFireDelay(int delay);
|
||||
|
||||
/** @deprecated Use {@link #getFireDelay()} */
|
||||
int getDualFireDelay();
|
||||
/** @deprecated Use {@link #setFireDelay(int)} */
|
||||
void setDualFireDelay(int delay);
|
||||
|
||||
// Indexed accessors (for dual mode)
|
||||
// Indexed accessors
|
||||
int getInnerColor(int projectileIndex);
|
||||
void setInnerColor(int projectileIndex, int color);
|
||||
|
||||
|
||||
@@ -1,37 +1,20 @@
|
||||
package noppes.npcs.api.ability.type;
|
||||
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
|
||||
/**
|
||||
* API interface for Energy Beam abilities.
|
||||
* Homing beam head with trailing path attached to origin.
|
||||
*/
|
||||
public interface IAbilityEnergyBeam extends IAbility {
|
||||
public interface IAbilityEnergyBeam extends IAbilityEnergyProjectile {
|
||||
|
||||
float getSpeed();
|
||||
void setSpeed(float speed);
|
||||
|
||||
float getMaxDistance();
|
||||
void setMaxDistance(float distance);
|
||||
|
||||
int getMaxLifetime();
|
||||
void setMaxLifetime(int ticks);
|
||||
|
||||
float getBeamWidth();
|
||||
void setBeamWidth(float width);
|
||||
|
||||
float getHeadSize();
|
||||
void setHeadSize(float size);
|
||||
|
||||
float getDamage();
|
||||
void setDamage(float damage);
|
||||
|
||||
float getKnockback();
|
||||
void setKnockback(float knockback);
|
||||
|
||||
float getKnockbackUp();
|
||||
void setKnockbackUp(float knockback);
|
||||
|
||||
boolean isHoming();
|
||||
void setHoming(boolean homing);
|
||||
|
||||
@@ -41,42 +24,21 @@ public interface IAbilityEnergyBeam extends IAbility {
|
||||
float getHomingRange();
|
||||
void setHomingRange(float range);
|
||||
|
||||
boolean isExplosive();
|
||||
void setExplosive(boolean explosive);
|
||||
|
||||
float getExplosionRadius();
|
||||
void setExplosionRadius(float radius);
|
||||
|
||||
int getInnerColor();
|
||||
void setInnerColor(int color);
|
||||
|
||||
int getOuterColor();
|
||||
void setOuterColor(int color);
|
||||
|
||||
boolean isOuterColorEnabled();
|
||||
void setOuterColorEnabled(boolean enabled);
|
||||
|
||||
float getRotationSpeed();
|
||||
void setRotationSpeed(float speed);
|
||||
|
||||
boolean hasLightningEffect();
|
||||
void setLightningEffect(boolean enabled);
|
||||
|
||||
/**
|
||||
* Get the anchor point for charging (0-7, see AnchorPoint enum).
|
||||
*/
|
||||
int getAnchorPoint();
|
||||
void setAnchorPoint(int point);
|
||||
|
||||
// Dual/Projectile count
|
||||
|
||||
int getProjectileCount();
|
||||
void setProjectileCount(int count);
|
||||
|
||||
int getFireDelay();
|
||||
void setFireDelay(int delay);
|
||||
|
||||
/** @deprecated Use {@link #getFireDelay()} */
|
||||
int getDualFireDelay();
|
||||
/** @deprecated Use {@link #setFireDelay(int)} */
|
||||
void setDualFireDelay(int delay);
|
||||
|
||||
// Indexed accessors (for dual mode)
|
||||
// Indexed accessors
|
||||
int getInnerColor(int projectileIndex);
|
||||
void setInnerColor(int projectileIndex, int color);
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package noppes.npcs.api.ability.type;
|
||||
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
|
||||
/**
|
||||
* Shared API interface for energy projectile abilities (Orb, Disc, Beam, LaserShot).
|
||||
* Contains methods common to all energy projectile types.
|
||||
*/
|
||||
public interface IAbilityEnergyProjectile extends IAbility {
|
||||
|
||||
// Combat
|
||||
float getDamage();
|
||||
void setDamage(float damage);
|
||||
|
||||
float getKnockback();
|
||||
void setKnockback(float knockback);
|
||||
|
||||
float getKnockbackUp();
|
||||
void setKnockbackUp(float knockback);
|
||||
|
||||
boolean isExplosive();
|
||||
void setExplosive(boolean explosive);
|
||||
|
||||
float getExplosionRadius();
|
||||
void setExplosionRadius(float radius);
|
||||
|
||||
float getExplosionDamageFalloff();
|
||||
void setExplosionDamageFalloff(float falloff);
|
||||
|
||||
// Lifespan
|
||||
float getMaxDistance();
|
||||
void setMaxDistance(float distance);
|
||||
|
||||
int getMaxLifetime();
|
||||
void setMaxLifetime(int ticks);
|
||||
|
||||
// Colors
|
||||
int getInnerColor();
|
||||
void setInnerColor(int color);
|
||||
|
||||
int getOuterColor();
|
||||
void setOuterColor(int color);
|
||||
|
||||
boolean isOuterColorEnabled();
|
||||
void setOuterColorEnabled(boolean enabled);
|
||||
|
||||
float getOuterColorWidth();
|
||||
void setOuterColorWidth(float width);
|
||||
|
||||
float getOuterColorAlpha();
|
||||
void setOuterColorAlpha(float alpha);
|
||||
|
||||
// Lightning
|
||||
boolean hasLightningEffect();
|
||||
void setLightningEffect(boolean enabled);
|
||||
|
||||
float getLightningDensity();
|
||||
void setLightningDensity(float density);
|
||||
|
||||
float getLightningRadius();
|
||||
void setLightningRadius(float radius);
|
||||
|
||||
// Anchor
|
||||
int getAnchorPoint();
|
||||
void setAnchorPoint(int point);
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
package noppes.npcs.api.ability.type;
|
||||
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
|
||||
/**
|
||||
* API interface for Laser Shot abilities.
|
||||
* Fast expanding thin line that pierces through targets.
|
||||
*/
|
||||
public interface IAbilityLaserShot extends IAbility {
|
||||
public interface IAbilityLaserShot extends IAbilityEnergyProjectile {
|
||||
|
||||
float getLaserWidth();
|
||||
void setLaserWidth(float width);
|
||||
@@ -16,37 +14,4 @@ public interface IAbilityLaserShot extends IAbility {
|
||||
|
||||
int getLingerTicks();
|
||||
void setLingerTicks(int ticks);
|
||||
|
||||
float getMaxDistance();
|
||||
void setMaxDistance(float distance);
|
||||
|
||||
int getMaxLifetime();
|
||||
void setMaxLifetime(int ticks);
|
||||
|
||||
float getDamage();
|
||||
void setDamage(float damage);
|
||||
|
||||
float getKnockback();
|
||||
void setKnockback(float knockback);
|
||||
|
||||
float getKnockbackUp();
|
||||
void setKnockbackUp(float knockback);
|
||||
|
||||
boolean isExplosive();
|
||||
void setExplosive(boolean explosive);
|
||||
|
||||
float getExplosionRadius();
|
||||
void setExplosionRadius(float radius);
|
||||
|
||||
int getInnerColor();
|
||||
void setInnerColor(int color);
|
||||
|
||||
int getOuterColor();
|
||||
void setOuterColor(int color);
|
||||
|
||||
boolean isOuterColorEnabled();
|
||||
void setOuterColorEnabled(boolean enabled);
|
||||
|
||||
boolean hasLightningEffect();
|
||||
void setLightningEffect(boolean enabled);
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
package noppes.npcs.api.ability.type;
|
||||
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
|
||||
/**
|
||||
* API interface for Orb abilities.
|
||||
* Homing projectile sphere.
|
||||
*/
|
||||
public interface IAbilityOrb extends IAbility {
|
||||
public interface IAbilityOrb extends IAbilityEnergyProjectile {
|
||||
|
||||
float getOrbSpeed();
|
||||
void setOrbSpeed(float speed);
|
||||
@@ -14,21 +12,6 @@ public interface IAbilityOrb extends IAbility {
|
||||
float getOrbSize();
|
||||
void setOrbSize(float size);
|
||||
|
||||
float getMaxDistance();
|
||||
void setMaxDistance(float distance);
|
||||
|
||||
int getMaxLifetime();
|
||||
void setMaxLifetime(int ticks);
|
||||
|
||||
float getDamage();
|
||||
void setDamage(float damage);
|
||||
|
||||
float getKnockback();
|
||||
void setKnockback(float knockback);
|
||||
|
||||
float getKnockbackUp();
|
||||
void setKnockbackUp(float knockback);
|
||||
|
||||
boolean isHoming();
|
||||
void setHoming(boolean homing);
|
||||
|
||||
@@ -38,42 +21,21 @@ public interface IAbilityOrb extends IAbility {
|
||||
float getHomingRange();
|
||||
void setHomingRange(float range);
|
||||
|
||||
boolean isExplosive();
|
||||
void setExplosive(boolean explosive);
|
||||
|
||||
float getExplosionRadius();
|
||||
void setExplosionRadius(float radius);
|
||||
|
||||
int getInnerColor();
|
||||
void setInnerColor(int color);
|
||||
|
||||
int getOuterColor();
|
||||
void setOuterColor(int color);
|
||||
|
||||
boolean isOuterColorEnabled();
|
||||
void setOuterColorEnabled(boolean enabled);
|
||||
|
||||
float getRotationSpeed();
|
||||
void setRotationSpeed(float speed);
|
||||
|
||||
boolean hasLightningEffect();
|
||||
void setLightningEffect(boolean enabled);
|
||||
|
||||
/**
|
||||
* Get the anchor point for charging (0-7, see AnchorPoint enum).
|
||||
*/
|
||||
int getAnchorPoint();
|
||||
void setAnchorPoint(int point);
|
||||
|
||||
// Dual/Projectile count
|
||||
|
||||
int getProjectileCount();
|
||||
void setProjectileCount(int count);
|
||||
|
||||
int getFireDelay();
|
||||
void setFireDelay(int delay);
|
||||
|
||||
/** @deprecated Use {@link #getFireDelay()} */
|
||||
int getDualFireDelay();
|
||||
/** @deprecated Use {@link #setFireDelay(int)} */
|
||||
void setDualFireDelay(int delay);
|
||||
|
||||
// Indexed accessors (for dual mode)
|
||||
// Indexed accessors
|
||||
int getInnerColor(int projectileIndex);
|
||||
void setInnerColor(int projectileIndex, int color);
|
||||
|
||||
|
||||
@@ -10,12 +10,6 @@ public interface IEnergyProjectile {
|
||||
|
||||
IEntity getTarget();
|
||||
|
||||
int getSiblingEntityId();
|
||||
|
||||
void setSiblingEntityId(int siblingEntityId);
|
||||
|
||||
IEnergyProjectile getSibling();
|
||||
|
||||
float getSize();
|
||||
|
||||
double getMotionX();
|
||||
|
||||
Reference in new issue
Block a user