接口 Creeper

所有超级接口:
Attributable, CommandSender, Creature, Damageable, Enemy, Entity, LivingEntity, Lootable, Metadatable, Mob, Monster, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

public interface Creeper extends Monster
代表苦力怕.
  • 方法详细资料

    • isPowered

      boolean isPowered()
      检查这个苦力怕是否为高压的(触电).

      原文: Checks if this Creeper is powered (Electrocuted)

      返回:
      true if 如果苦力怕是高压的则为true
    • setPowered

      void setPowered(boolean value)
      设置这个苦力怕的高压状态.

      原文: Sets the Powered status of this Creeper

      参数:
      value - 新的高压状态
    • setMaxFuseTicks

      void setMaxFuseTicks(int ticks)
      为苦力怕设置点燃tick值, 此tick值为苦力怕爆炸前点燃状态的维持时间.

      原文: Set the maximum fuse ticks for this Creeper, where the maximum ticks is the amount of time in which a creeper is allowed to be in the primed state before exploding.

      参数:
      ticks - 新的点燃状态的最大tick值
    • getMaxFuseTicks

      int getMaxFuseTicks()
      获得此苦力怕的点燃状态最大tick值, 此tick值为苦力怕爆炸前点燃状态的维持时间.

      原文: Get the maximum fuse ticks for this Creeper, where the maximum ticks is the amount of time in which a creeper is allowed to be in the primed state before exploding.

      返回:
      点燃状态的最大tick值
    • setFuseTicks

      void setFuseTicks(int ticks)
      设置苦力怕点燃状态的tick值,此tick值为苦力怕爆炸前点燃状态的维持时间.

      原文: Set the fuse ticks for this Creeper, where the ticks is the amount of time in which a creeper has been in the primed state.

      参数:
      ticks - 新的点燃状态的tick值
    • getFuseTicks

      int getFuseTicks()
      获得苦力怕点燃状态的tick值,此tick值为苦力怕爆炸前点燃状态的维持时间.

      原文: Get the maximum fuse ticks for this Creeper, where the ticks is the amount of time in which a creeper has been in the primed state.

      返回:
      点燃状态的tick值
    • setExplosionRadius

      void setExplosionRadius(int radius)
      设置苦力怕的爆炸半径.

      原文: Set the explosion radius in which this Creeper's explosion will affect.

      参数:
      radius - 新的爆炸半径
    • getExplosionRadius

      int getExplosionRadius()
      获得苦力怕的爆炸半径.

      原文: Get the explosion radius in which this Creeper's explosion will affect.

      返回:
      爆炸半径
    • explode

      void explode()
      使该苦力怕立刻爆炸.
      使用本方法引起的爆炸可被ExplosionPrimeEvent取消, 并且遵循其所处世界的mobGriefing游戏规则.

      原文:Makes this Creeper explode instantly.
      The resulting explosion can be cancelled by an ExplosionPrimeEvent and obeys the mob griefing gamerule.

    • ignite

      void ignite(@NotNull @NotNull Entity entity)
      点燃此苦力怕, 开始其爆炸计时.
      苦力怕从点燃到爆炸所需时间取决于setMaxFuseTicks(int)的设置,默认值为30. 使用本方法引起的爆炸可被ExplosionPrimeEvent取消, 并且遵循其所处世界的mobGriefing游戏规则.

      原文:Ignites this Creeper, beginning its fuse.
      The amount of time the Creeper takes to explode will depend on what setMaxFuseTicks(int) is set as.
      The resulting explosion can be cancelled by an ExplosionPrimeEvent and obeys the mob griefing gamerule.

      参数:
      entity - 点燃苦力怕的实体
    • ignite

      void ignite()
      点燃此苦力怕, 开始其爆炸计时.
      苦力怕从点燃到爆炸所需时间取决于setMaxFuseTicks(int)的设置,默认值为30. 使用本方法引起的爆炸可被ExplosionPrimeEvent取消, 并且遵循其所处世界的mobGriefing游戏规则.

      原文:Ignites this Creeper, beginning its fuse.
      The amount of time the Creeper takes to explode will depend on what setMaxFuseTicks(int) is set as. The resulting explosion can be cancelled by an ExplosionPrimeEvent and obeys the mob griefing gamerule.

    • getIgniter

      @Nullable @Nullable Entity getIgniter()
      获取点燃此苦力怕的实体(如存在).

      原文:Gets the entity which ignited the creeper, if available.

      返回:
      点燃此苦力怕的实体,不存在返回 null