Interface Creeper
- All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
A creeper (
minecraft:creeper): it walks up to a player and swells until it explodes,
twice as hard when lightning charged it.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow big the explosion of a creeper is, unless told otherwise; twice that for a charged one.static final intHow many ticks a creeper swells before it explodes, unless told otherwise. -
Method Summary
Modifier and TypeMethodDescriptionvoidexplode()Makes this creeper explode at once, then vanish.intReturns how big the explosion of this creeper is, before a charge doubles it.intReturns how many ticks this creeper swells before it explodes.voidignite()Lights this creeper, as flint and steel does.booleanReturnstrueonce this creeper was lit.booleanReturnstrueif lightning charged this creeper.voidsetExplosionRadius(int radius) Sets how big the explosion of this creeper is, before a charge doubles it.voidsetFuseTicks(int ticks) Sets how many ticks this creeper swells before it explodes.voidsetPowered(boolean powered) Charges this creeper, as lightning does, or takes its charge away.intswell()Returns how many ticks this creeper has swollen.Methods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface LivingEntity
absorptionAmount, activeEffects, addEffect, armor, armorToughness, clearEffects, damage, effect, equipment, fireTicks, hasEffect, headYaw, heal, health, isAlive, isDead, kill, knockbackResistance, maxHealth, removeEffect, setAbsorptionAmount, setFireTicks, setHeadYaw, setHealthMethods inherited from interface Mob
attackDamage, behaviour, behaviours, definition, distanceSqTo, followRange, goals, hasLineOfSightTo, height, lookAt, lookAt, movementSpeed, navigateTo, navigation, nearestPlayer, onGround, playSound, setFollowRange, setMoveSpeed, setTarget, setVelocity, target, velocityX, velocityY, velocityZ, widthMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Field Details
-
DEFAULT_FUSE_TICKS
static final int DEFAULT_FUSE_TICKSHow many ticks a creeper swells before it explodes, unless told otherwise.- Since:
- 0.1.0
- See Also:
-
DEFAULT_EXPLOSION_RADIUS
static final int DEFAULT_EXPLOSION_RADIUSHow big the explosion of a creeper is, unless told otherwise; twice that for a charged one.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
isPowered
boolean isPowered()Returnstrueif lightning charged this creeper.: its explosion is twice as big- Returns:
trueif lightning charged this creeper- Since:
- 0.1.0
-
setPowered
void setPowered(boolean powered) Charges this creeper, as lightning does, or takes its charge away.- Parameters:
powered-trueto charge it- Since:
- 0.1.0
-
isIgnited
boolean isIgnited()Returnstrueonce this creeper was lit.: it then swells until it explodes, whatever happens around it- Returns:
trueonce this creeper was lit- Since:
- 0.1.0
-
ignite
void ignite()Lights this creeper, as flint and steel does.- Since:
- 0.1.0
-
swell
int swell()Returns how many ticks this creeper has swollen.: it explodes once it reaches its fuse- Returns:
- how many ticks this creeper has swollen
- Since:
- 0.1.0
-
fuseTicks
int fuseTicks()Returns how many ticks this creeper swells before it explodes.- Returns:
- how many ticks this creeper swells before it explodes
- Since:
- 0.1.0
-
setFuseTicks
void setFuseTicks(int ticks) Sets how many ticks this creeper swells before it explodes.- Parameters:
ticks- the fuse, kept between1and32767- Since:
- 0.1.0
-
explosionRadius
int explosionRadius()Returns how big the explosion of this creeper is, before a charge doubles it.- Returns:
- how big the explosion of this creeper is, before a charge doubles it
- Since:
- 0.1.0
-
setExplosionRadius
void setExplosionRadius(int radius) Sets how big the explosion of this creeper is, before a charge doubles it.- Parameters:
radius- the radius, kept between0and127- Since:
- 0.1.0
-
explode
void explode()Makes this creeper explode at once, then vanish.- Since:
- 0.1.0
-