Package noppes.npcs.api.ability.type
Interface IAbilityTrap
-
- All Superinterfaces:
IAbility,IAbilityAction,IAbilityZone
public interface IAbilityTrap extends IAbilityZone
API interface for Trap abilities. Proximity-triggered traps placed around the caster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetArmTime()floatgetDamage()floatgetDamageRadius()floatgetKnockback()intgetMaxTriggers()intgetTriggerCooldown()floatgetTriggerRadius()booleanisVisible()voidsetArmTime(int ticks)voidsetDamage(float damage)voidsetDamageRadius(float radius)voidsetKnockback(float knockback)voidsetMaxTriggers(int max)voidsetTriggerCooldown(int cooldown)voidsetTriggerRadius(float radius)voidsetVisible(boolean visible)-
Methods inherited from interface noppes.npcs.api.ability.IAbility
getAllowedByType, getBurstAmount, getBurstDelay, getCooldownTicks, getCurrentTick, getDazedTicks, getDisplayName, getId, getLockMovementType, getMagicData, getMaxRange, getMinRange, getName, getNbt, getPhaseInt, getRotationModeType, getRotationPhaseType, getToggleStateLabel, getToggleStates, getTrackSpeedValue, getTypeId, getWeight, getWindUpTicks, isBurstEnabled, isBurstOverlap, isBurstReplayAnimations, isEnabled, isExecuting, isIgnoreCooldown, isIgnoreIFrames, isInterruptible, isMovementLockedDuringActive, isMovementLockedDuringWindup, isPerAbilityCooldown, isRotationLockedDuringActive, isRotationLockedDuringWindup, isToggleable, setAllowedByType, setBurstAmount, setBurstDelay, setBurstEnabled, setBurstOverlap, setBurstReplayAnimations, setCooldownTicks, setDazedTicks, setDisplayName, setEnabled, setId, setIgnoreCooldown, setIgnoreIFrames, setInterruptible, setLockMovementType, setMaxRange, setMinRange, setName, setNbt, setPerAbilityCooldown, setRotationModeType, setRotationPhaseType, setToggleStates, setTrackSpeedValue, setWeight, setWindUpTicks
-
Methods inherited from interface noppes.npcs.api.ability.IAbilityAction
isChain
-
Methods inherited from interface noppes.npcs.api.ability.type.IAbilityZone
getAccentStyle, getAnimSpeed, getBorderSpeed, getDurationTicks, getGroundAlpha, getInnerColor, getLightningDensity, getOuterColor, getParticleDensity, getParticleDir, getParticleMotion, getParticleScale, getParticleSize, getRingCount, getSpawnRadius, getZoneCount, getZoneHeight, getZoneShapeOrdinal, isAccents, isBorder, isGroundFill, isLightning, isOuterColorEnabled, isParticleGlow, isParticles, isRings, setAccents, setAccentStyle, setAnimSpeed, setBorder, setBorderSpeed, setDurationTicks, setGroundAlpha, setGroundFill, setInnerColor, setLightning, setLightningDensity, setOuterColor, setOuterColorEnabled, setParticleDensity, setParticleDir, setParticleGlow, setParticleMotion, setParticles, setParticleScale, setParticleSize, setRingCount, setRings, setSpawnRadius, setZoneCount, setZoneHeight, setZoneShapeOrdinal
-
-
-
-
Method Detail
-
getTriggerRadius
float getTriggerRadius()
- Returns:
- Radius in blocks at which entities trigger the trap.
-
setTriggerRadius
void setTriggerRadius(float radius)
- Parameters:
radius- Trigger detection radius in blocks.
-
getArmTime
int getArmTime()
- Returns:
- Time in ticks before the trap becomes active after placement.
-
setArmTime
void setArmTime(int ticks)
- Parameters:
ticks- Arming time in ticks.
-
getMaxTriggers
int getMaxTriggers()
- Returns:
- Maximum number of times the trap can trigger before expiring.
-
setMaxTriggers
void setMaxTriggers(int max)
- Parameters:
max- Maximum trigger count.
-
getTriggerCooldown
int getTriggerCooldown()
- Returns:
- Cooldown in ticks between consecutive triggers.
-
setTriggerCooldown
void setTriggerCooldown(int cooldown)
- Parameters:
cooldown- Trigger cooldown in ticks.
-
getDamage
float getDamage()
- Returns:
- Damage dealt when the trap triggers.
-
setDamage
void setDamage(float damage)
- Parameters:
damage- Trigger damage amount.
-
getDamageRadius
float getDamageRadius()
- Returns:
- Radius of the damage area when triggered, in blocks.
-
setDamageRadius
void setDamageRadius(float radius)
- Parameters:
radius- Damage area radius in blocks.
-
getKnockback
float getKnockback()
- Returns:
- Knockback strength applied to entities caught in the trigger.
-
setKnockback
void setKnockback(float knockback)
- Parameters:
knockback- Knockback strength.
-
isVisible
boolean isVisible()
- Returns:
- Whether the trap is visible to entities.
-
setVisible
void setVisible(boolean visible)
- Parameters:
visible- Whether the trap is visible.
-
-