Interface SulfurCube

All Superinterfaces:
AbstractCubeMob, Ageable, Attributable, Audience, Bucketable, CommandSender, Creature, Damageable, DataComponentView, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ProjectileSource, ServerOperator, Shearable, Sound.Emitter

@NullMarked public interface SulfurCube extends AbstractCubeMob, Shearable, Bucketable, Ageable
Represents a Sulfur Cube.
  • Method Details

    • getFuseTicks

      int getFuseTicks()
      Gets the amount of ticks until this sulfur cube explode.
      Returns:
      the fuse ticks or -1 if not exploding
    • setFuseTicks

      void setFuseTicks(int ticks)
      Sets the amount of ticks until this sulfur cube explode.
      Parameters:
      ticks - the new fuse ticks
    • canExplode

      boolean canExplode()
      Determines whether this sulfur cube is capable of exploding.
      Returns:
      true if the sulfur cube can explode, false otherwise
    • ignite

      boolean ignite(boolean imminent)
      Ignites this sulfur cube, beginning its fuse if canExplode() is true.

      The amount of time the sulfur cube takes to explode is defined in the SulfurCube.Archetype of the entity and further controlled by the imminent parameter.

      This action can be cancelled using EntityIgniteEvent. The resulting explosion can also be cancelled by an ExplosionPrimeEvent and obeys the mob griefing gamerule.

      Parameters:
      imminent - if true the fuse time is shortened but still depends on the SulfurCube.Archetype
      Returns:
      whether the sulfur cube got ignited
      See Also:
    • ignite

      default boolean ignite()
      Ignites this sulfur cube, beginning its fuse if canExplode() is true.

      The amount of time the sulfur cube takes to explode is defined in the SulfurCube.Archetype of the entity.

      This action can be cancelled using EntityIgniteEvent. The resulting explosion can also be cancelled by an ExplosionPrimeEvent and obeys the mob griefing gamerule.

      Returns:
      whether the sulfur cube got ignited
      See Also: