A lot of GOOD API DOCUMENTATION

This commit is contained in:
Kam committed 2026-03-09 16:20:07 -04:00
1 parent a6c55ca331
commit 319e774518
131 files changed
+3363 -175

No files matched your search

+11
View File
@@ -9,9 +9,20 @@ import net.minecraft.entity.projectile.EntityArrow;
*/
public interface IArrow<T extends EntityArrow> extends IEntity<T> {
/**
* Gets the entity that shot this arrow.
* @return the shooter entity, or null if none
*/
IEntity getShooter();
/**
* Gets the base damage of this arrow.
* @return the damage value
*/
double getDamage();
/**
* Removes this arrow from the world.
*/
void kill();
}
@@ -63,6 +63,7 @@ public interface IEnergyBarrier<T extends Entity> extends IEnergyAbility<T> {
/**
* Returns the barrier type: 0=Dome, 1=Panel
* @return the barrier type ordinal
*/
int getBarrierType();
+4 -1
View File
@@ -13,7 +13,10 @@ import net.minecraft.entity.Entity;
*/
public interface IEnergyBeam<T extends Entity> extends IEnergyProjectile<T> {
/** Width of the beam trail. */
/**
* Width of the beam trail.
* @return the beam width in blocks
*/
float getBeamWidth();
void setBeamWidth(float width);
+4 -1
View File
@@ -10,7 +10,10 @@ import net.minecraft.entity.Entity;
*/
public interface IEnergyDisc<T extends Entity> extends IEnergyProjectile<T> {
/** Radius of the disc. */
/**
* Radius of the disc.
* @return the disc radius in blocks
*/
float getDiscRadius();
void setDiscRadius(float radius);
@@ -7,7 +7,9 @@ import net.minecraft.entity.Entity;
*/
public interface IEnergyDome<T extends Entity> extends IEnergyBarrier<T> {
/** @return The radius of the dome in blocks. */
float getDomeRadius();
/** @param radius The radius of the dome in blocks. */
void setDomeRadius(float radius);
}
@@ -8,7 +8,7 @@ import noppes.npcs.api.INbt;
* Created via {@link noppes.npcs.api.IEnergyController#createExplosion}.
* Configure visual/damage properties, then call {@link #spawn()} to place in the world.
*
* When damage is set (> 0), the explosion will deal area damage on the first tick
* When damage is set (&gt; 0), the explosion will deal area damage on the first tick
* with distance-based falloff, routing through energy damage handlers for addon integration.
*/
public interface IEnergyExplosion<T extends Entity> extends IEnergyAbility<T> {
@@ -29,7 +29,7 @@ public interface IEnergyExplosion<T extends Entity> extends IEnergyAbility<T> {
/** @return Base damage dealt at the center. 0 means visual-only. */
float getDamage();
/** @param damage Base damage at the center. Setting > 0 enables damage. */
/** @param damage Base damage at the center. Setting &gt; 0 enables damage. */
void setDamage(float damage);
/** @return Base knockback strength. */
@@ -54,7 +54,7 @@ public interface IEnergyExplosion<T extends Entity> extends IEnergyAbility<T> {
/**
* Spawn this explosion entity into the world.
* Sends the visual to nearby clients and, if damage > 0, applies area damage on the first tick.
* Sends the visual to nearby clients and, if damage &gt; 0, applies area damage on the first tick.
*/
void spawn();
}
@@ -14,7 +14,10 @@ import net.minecraft.entity.Entity;
*/
public interface IEnergyLaser<T extends Entity> extends IEnergyProjectile<T> {
/** Width of the laser beam. */
/**
* Width of the laser beam.
* @return the laser width in blocks
*/
float getLaserWidth();
void setLaserWidth(float width);
@@ -21,6 +21,7 @@ public interface IEnergyPanel<T extends Entity> extends IEnergyBarrier<T> {
/**
* Panel mode: 0=PLACED, 1=HELD, 2=LAUNCHED
* @return the panel mode ordinal
*/
int getPanelMode();
@@ -23,7 +23,10 @@ public interface IEnergyProjectile<T extends Entity> extends IEnergyAbility<T> {
// ==================== OWNER & TARGET ====================
/** Sets the owner entity (used for homing return, damage attribution, etc.). */
/**
* Sets the owner entity (used for homing return, damage attribution, etc.).
* @param owner the entity that owns this projectile
*/
void setOwner(IEntity owner);
/** @return the entity ID of the current homing/tracking target, or -1 if none */
@@ -32,7 +35,10 @@ public interface IEnergyProjectile<T extends Entity> extends IEnergyAbility<T> {
/** @return the current homing/tracking target entity, or null if none */
IEntity getTarget();
/** Sets the homing/tracking target entity. Pass null to clear. */
/**
* Sets the homing/tracking target entity. Pass null to clear.
* @param target the entity to home towards
*/
void setTarget(IEntity target);
// ==================== SIZE ====================
@@ -40,7 +46,10 @@ public interface IEnergyProjectile<T extends Entity> extends IEnergyAbility<T> {
/** @return the projectile's visual and collision size */
float getSize();
/** Sets the projectile's visual and collision size. */
/**
* Sets the projectile's visual and collision size.
* @param size the projectile size
*/
void setSize(float size);
// ==================== DISPLAY (PROJECTILE-SPECIFIC) ====================
@@ -9,7 +9,10 @@ import net.minecraft.entity.Entity;
*/
public interface IEnergySlicer<T extends Entity> extends IEnergyProjectile<T> {
/** Width of the slicer blade. */
/**
* Width of the slicer blade.
* @return the width of each slice in blocks
*/
float getSliceWidth();
void setSliceWidth(float width);
@@ -11,35 +11,53 @@ public interface IEnergySweeper<T extends Entity> extends IEnergyAbility<T> {
// ==================== BEAM DIMENSIONS ====================
/** @return Length of the sweeping beam in blocks. */
float getBeamLength();
/** @param length Beam length in blocks. */
void setBeamLength(float length);
/** @return Width of the sweeping beam in blocks. */
float getBeamWidth();
/** @param width Beam width in blocks. */
void setBeamWidth(float width);
/** @return Height of the sweeping beam in blocks. */
float getBeamHeight();
/** @param height Beam height in blocks. */
void setBeamHeight(float height);
// ==================== ROTATION ====================
/** @return Rotation speed of the sweep in degrees per tick. */
float getSweepSpeed();
/** @param degreesPerTick Sweep rotation speed in degrees per tick. */
void setSweepSpeed(float degreesPerTick);
/** @return Number of full rotations the beam completes before stopping. */
int getNumberOfRotations();
/** @param rotations Number of full rotations. */
void setNumberOfRotations(int rotations);
/** @return Whether the beam pivot tracks the target instead of rotating freely. */
boolean isLockOnTarget();
/** @param lock Whether the beam locks on to the target. */
void setLockOnTarget(boolean lock);
// ==================== DAMAGE ====================
/** @return Damage dealt per hit to entities caught in the beam. */
float getDamage();
/** @param damage Damage per hit. */
void setDamage(float damage);
/** @return Interval in ticks between damage applications to the same target. */
int getDamageInterval();
/** @param ticks Damage interval in ticks. */
void setDamageInterval(int ticks);
/** @return Whether the beam can hit through multiple targets. */
boolean isPiercing();
/** @param piercing Whether the beam pierces through targets. */
void setPiercing(boolean piercing);
// ==================== SPAWNING ====================
+8 -2
View File
@@ -90,10 +90,16 @@ public interface IEnergyZone<T extends Entity> extends IEntity<T> {
// ==================== CUSTOM DAMAGE DATA ====================
/** Get custom damage data for addon handler routing (e.g. DBC damage stats). */
/**
* Get custom damage data for addon handler routing (e.g. DBC damage stats).
* @return the zone's damage configuration as NBT
*/
noppes.npcs.api.INbt getDamageData();
/** Set custom damage data for addon handler routing. */
/**
* Set custom damage data for addon handler routing.
* @param data the damage configuration NBT
*/
void setDamageData(noppes.npcs.api.INbt data);
// ==================== SPAWNING ====================
@@ -437,6 +437,11 @@ public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T
*/
float getAbsorptionAmount();
/**
* Sets the current hurt time (red flash duration) of the entity.
*
* @param time the hurt time in ticks.
*/
void setHurtTime(int time);
/**
@@ -9,7 +9,15 @@ import net.minecraft.entity.projectile.EntityFishHook;
*/
public interface IFishHook<T extends EntityFishHook> extends IEntity<T> {
/**
* Returns the player who cast this fish hook.
*
* @return the casting player, or null if none.
*/
IPlayer getCaster();
/**
* Removes this fish hook entity from the world.
*/
void kill();
}
+5
View File
@@ -684,6 +684,11 @@ public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T>,
IActionManager getActionManager();
/**
* Returns the members of the player's current party, excluding the player.
*
* @return an array of party members, or an empty array if the player is not in a party.
*/
IPlayer[] getPartyMembers();
// =========================================
@@ -9,7 +9,15 @@ import net.minecraft.entity.projectile.EntityThrowable;
*/
public interface IThrowable<T extends EntityThrowable> extends IEntity<T> {
/**
* Returns the entity that threw this throwable.
*
* @return the thrower, or null if unknown.
*/
IEntityLivingBase getThrower();
/**
* Removes this throwable entity from the world.
*/
void kill();
}