Package noppes.npcs.api.entity
Interface IEnergyAbility<T extends net.minecraft.entity.Entity>
-
- All Superinterfaces:
IEntity<T>
- All Known Subinterfaces:
IEnergyBarrier<T>,IEnergyBeam<T>,IEnergyDisc<T>,IEnergyDome<T>,IEnergyExplosion<T>,IEnergyLaser<T>,IEnergyOrb<T>,IEnergyPanel<T>,IEnergyProjectile<T>,IEnergySlicer<T>,IEnergySweeper<T>
public interface IEnergyAbility<T extends net.minecraft.entity.Entity> extends IEntity<T>
Base interface for all energy ability entities (Projectiles, Barriers). Contains shared display, lightning, owner, and charging properties.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetChargeProgress()INbtgetDamageData()Get the custom damage data attached to this energy entity.floatgetInnerAlpha()intgetInnerColor()floatgetLightningDensity()intgetLightningFadeTime()floatgetLightningRadius()IMagicDatagetMagicData()Get this entity's magic data.intgetOuterColor()floatgetOuterColorAlpha()floatgetOuterColorWidth()IEntitygetOwner()intgetOwnerEntityId()booleanhasLightningEffect()booleanisCharging()booleanisIgnoreIFrames()booleanisOuterColorEnabled()voidsetDamageData(INbt data)Set custom damage data on this energy entity.voidsetIgnoreIFrames(boolean ignore)voidsetInnerAlpha(float alpha)voidsetInnerColor(int color)voidsetLightningDensity(float density)voidsetLightningEffect(boolean enabled)voidsetLightningFadeTime(int ticks)voidsetLightningRadius(float radius)voidsetMagicData(IMagicData data)Set magic data on this energy entity.voidsetOuterColor(int color)voidsetOuterColorAlpha(float alpha)voidsetOuterColorEnabled(boolean enabled)voidsetOuterColorWidth(float width)-
Methods inherited from interface noppes.npcs.api.entity.IEntity
capturesDrops, clearStoredData, clearTempData, despawn, dropItem, extinguish, getAge, getAllNbt, getBlockX, getBlockY, getBlockZ, getCapturedDrops, getCollidingEntities, getDimension, getEntityId, getHeight, getMCEntity, getMotion, getMotionX, getMotionY, getMotionZ, getMount, getNbt, getNbtOptional, getPitch, getPosition, getRider, getRotation, getStoredData, getStoredDataKeys, getSurroundingEntities, getSurroundingEntities, getTempData, getTempDataKeys, getType, getTypeName, getUniqueID, getWidth, getWorld, getX, getY, getYOffset, getZ, hasCollided, hasCollidedHorizontally, hasCollidedVertically, hasStoredData, hasTempData, inFire, inLava, inWater, isAirborne, isAlive, isBurning, isSneaking, isSprinting, knockback, knockback, knockback, removeStoredData, removeTempData, setBurning, setCapturedDrops, setCapturesDrops, setDimension, setImmune, setInvisible, setMotion, setMotion, setMotionX, setMotionY, setMotionZ, setMount, setNbt, setPitch, setPosition, setPosition, setRider, setRotation, setRotation, setSneaking, setSprinting, setStoredData, setTempData, setX, setY, setZ, spawnParticle, storeAsClone, typeOf, updateEntity
-
-
-
-
Method Detail
-
getOwnerEntityId
int getOwnerEntityId()
- Returns:
- Entity ID of the caster who spawned this energy ability.
-
getOwner
IEntity getOwner()
- Returns:
- The caster entity who spawned this energy ability, or null if not found.
-
getInnerColor
int getInnerColor()
- Returns:
- Inner (core) color as a packed RGB integer.
-
setInnerColor
void setInnerColor(int color)
- Parameters:
color- Inner color as a packed RGB integer.
-
getInnerAlpha
float getInnerAlpha()
- Returns:
- Alpha (opacity) of the inner color layer (0.0-1.0).
-
setInnerAlpha
void setInnerAlpha(float alpha)
- Parameters:
alpha- Inner color opacity (0.0-1.0).
-
getOuterColor
int getOuterColor()
- Returns:
- Outer (glow) color as a packed RGB integer.
-
setOuterColor
void setOuterColor(int color)
- Parameters:
color- Outer color as a packed RGB integer.
-
isOuterColorEnabled
boolean isOuterColorEnabled()
- Returns:
- Whether the outer color layer is rendered.
-
setOuterColorEnabled
void setOuterColorEnabled(boolean enabled)
- Parameters:
enabled- Whether to render the outer color layer.
-
getOuterColorWidth
float getOuterColorWidth()
- Returns:
- Width of the outer color layer relative to the entity size.
-
setOuterColorWidth
void setOuterColorWidth(float width)
- Parameters:
width- Outer color layer width.
-
getOuterColorAlpha
float getOuterColorAlpha()
- Returns:
- Alpha (opacity) of the outer color layer (0.0-1.0).
-
setOuterColorAlpha
void setOuterColorAlpha(float alpha)
- Parameters:
alpha- Outer color opacity (0.0-1.0).
-
hasLightningEffect
boolean hasLightningEffect()
- Returns:
- Whether the lightning visual effect is enabled.
-
setLightningEffect
void setLightningEffect(boolean enabled)
- Parameters:
enabled- Whether to render the lightning effect.
-
getLightningDensity
float getLightningDensity()
- Returns:
- Density of lightning arcs (higher = more arcs).
-
setLightningDensity
void setLightningDensity(float density)
- Parameters:
density- Lightning arc density.
-
getLightningRadius
float getLightningRadius()
- Returns:
- Radius of the lightning effect around the entity, in blocks.
-
setLightningRadius
void setLightningRadius(float radius)
- Parameters:
radius- Lightning effect radius in blocks.
-
getLightningFadeTime
int getLightningFadeTime()
- Returns:
- Fade-out time for lightning arcs in ticks.
-
setLightningFadeTime
void setLightningFadeTime(int ticks)
- Parameters:
ticks- Lightning fade-out time in ticks.
-
isCharging
boolean isCharging()
- Returns:
- Whether this energy ability is currently in its charging phase.
-
getChargeProgress
float getChargeProgress()
- Returns:
- Charge progress as a fraction (0.0-1.0).
-
isIgnoreIFrames
boolean isIgnoreIFrames()
- Returns:
- Whether this entity ignores target invulnerability frames when dealing damage.
-
setIgnoreIFrames
void setIgnoreIFrames(boolean ignore)
- Parameters:
ignore- Whether this entity should ignore target invulnerability frames when dealing damage.
-
getDamageData
INbt getDamageData()
Get the custom damage data attached to this energy entity. Used by addon handlers (e.g. DBC Addon) to carry damage configuration directly on the entity, enabling DBC damage scaling without a sourceAbility.- Returns:
- Custom damage data as INbt, or null if none set.
-
setDamageData
void setDamageData(INbt data)
Set custom damage data on this energy entity.- Parameters:
data- Custom damage data as INbt. Pass null to clear.
-
getMagicData
IMagicData getMagicData()
Get this entity's magic data. Defines magic types for outgoing damage splits or barrier defense interactions. Inherited from the source ability on spawn.- Returns:
- the entity's magic data
-
setMagicData
void setMagicData(IMagicData data)
Set magic data on this energy entity. Overrides any inherited ability magic.- Parameters:
data- Magic data to set.
-
-