接口 EnderSignal

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

public interface EnderSignal extends Entity
代表抛出的末影之眼.
  • 方法详细资料

    • getTargetLocation

      @NotNull @NotNull Location getTargetLocation()
      获取末影之眼移向的位置.

      原文:Get the location this EnderSignal is moving towards.

      返回:
      末影之眼移向的位置
    • setTargetLocation

      void setTargetLocation(@NotNull @NotNull Location location)
      设置末影之眼移向的位置.
      当设置了新的目标地点时, getDropItem()将被重置为一个随机值 , 其消失时间将重置为0.

      原文: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 - 新目标位置
    • getDropItem

      boolean getDropItem()
      获取末影之眼最终是否会掉落为物品.
      如果为true, 将为掉落为物品, 反之它会破碎并湮灭.

      原文:Gets if the EnderSignal should drop an item on death.
      If true, it will drop an item. If false, it will shatter.

      返回:
      末影之眼最终是否会掉落为物品
    • setDropItem

      void setDropItem(boolean drop)
      设置末影之眼最终是否会掉落为物品, 亦或是湮灭于空气中.

      原文:Sets if the EnderSignal should drop an item on death; or if it should shatter.

      参数:
      drop - 末影之眼最终是否会掉落为物品
    • getItem

      Get the ItemStack to be displayed while in the air and to be dropped on death.
      返回:
      the item stack
    • setItem

      void setItem(@Nullable @Nullable ItemStack item)
      Set the ItemStack to be displayed while in the air and to be dropped on death.
      参数:
      item - the item to set. If null, resets to the default eye of ender
    • getDespawnTimer

      int getDespawnTimer()
      获取末影之眼已在空气漂浮的时间 (单位为tick).
      当此值大于80时, 此实体会在下一tick消失, 是否掉落为物品取决于getDropItem().

      原文: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.

      返回:
      此末影之眼实体已存活时间
    • setDespawnTimer

      void setDespawnTimer(int timer)
      设置末影之眼已在空气漂浮的时间 (单位为tick).
      当此值大于80时, 此实体会在下一tick消失, 是否掉落为物品取决于getDropItem().

      原文: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 - 此末影之眼实体已存活时间