Interface Creeper

All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider

public interface Creeper extends Mob
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 Details

    • DEFAULT_FUSE_TICKS

      static final int DEFAULT_FUSE_TICKS
      How 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_RADIUS
      How 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()
      Returns true if lightning charged this creeper.: its explosion is twice as big
      Returns:
      true if 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 - true to charge it
      Since:
      0.1.0
    • isIgnited

      boolean isIgnited()
      Returns true once this creeper was lit.: it then swells until it explodes, whatever happens around it
      Returns:
      true once 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 between 1 and 32767
      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 between 0 and 127
      Since:
      0.1.0
    • explode

      void explode()
      Makes this creeper explode at once, then vanish.
      Since:
      0.1.0