接口 EnderSignal

所有超级接口:
CommandSender, Entity, Metadatable, Nameable, Permissible, ServerOperator

public interface EnderSignal extends Entity
Represents an EnderSignal, which is created upon throwing an ender eye.
  • 方法详细资料

    • getTargetLocation

      Location getTargetLocation()
      Get the location this EnderSignal is moving towards.
      返回:
      the Location this EnderSignal is moving towards.
    • setTargetLocation

      void setTargetLocation(Location location)
      Set the Location this EnderSignal is moving towards.
      When setting a new target location, the getDropItem() resets to a random value and the despawn timer gets set back to 0.
      参数:
      location - the new target location
    • getDropItem

      boolean getDropItem()
      Gets if the EnderSignal should drop an item on death.
      If true, it will drop an item. If false, it will shatter.
      返回:
      true if the EnderSignal will drop an item on death, or false if it will shatter
    • setDropItem

      void setDropItem(boolean drop)
      Sets if the EnderSignal should drop an item on death; or if it should shatter.
      参数:
      drop - true if the EnderSignal should drop an item on death, or false if it should shatter.
    • getDespawnTimer

      int getDespawnTimer()
      Gets the amount of time this entity has been alive (in ticks).
      When this number is greater than 80, it will despawn on the next tick.
      返回:
      the number of ticks this EnderSignal has been alive.
    • setDespawnTimer

      void setDespawnTimer(int timer)
      Set how long this entity has been alive (in ticks).
      When this number is greater than 80, it will despawn on the next tick.
      参数:
      timer - how long (in ticks) this EnderSignal has been alive.