Interface ExplosiveMinecart

All Superinterfaces:
Audience, CommandSender, Entity, Explosive, Frictional, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Minecart, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ServerOperator, Sound.Emitter, Vehicle

public interface ExplosiveMinecart extends Minecart, Explosive
Represents a Minecart with TNT inside it that can explode when triggered.
  • Method Details

    • setFuseTicks

      void setFuseTicks(int ticks)
      Set the fuse ticks of this minecart. If the fuse ticks are set to a non-zero value, this will ignite the explosive.
      Parameters:
      ticks - the ticks
    • getFuseTicks

      int getFuseTicks()
      Get the fuse ticks of this minecart. If the fuse ticks reach 0, the minecart will explode.
      Returns:
      the fuse ticks, or -1 if this minecart's fuse has not yet been ignited
    • getExplosionSpeedFactor

      float getExplosionSpeedFactor()
      Gets the factor by which explosion yield increases based on Minecart speed.
      Returns:
      increase factor
    • setExplosionSpeedFactor

      void setExplosionSpeedFactor(float factor)
      Sets the factor by which explosion yield increases based on Minecart speed.
      Parameters:
      factor - new factor
    • ignite

      void ignite()
      Ignite this minecart's fuse naturally.
    • isIgnited

      boolean isIgnited()
      Check whether or not this minecart's fuse has been ignited.
      Returns:
      true if ignited, false otherwise
    • explode

      void explode()
      Immediately explode this minecart with the power assumed by its current movement.
    • explode

      void explode(double power)
      Immediately explode this minecart with the given power.
      Parameters:
      power - the power to use. Must be positive and cannot exceed 5.0