接口 ZombieVillager

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

public interface ZombieVillager extends Zombie
表示曾经是Villager的Zombie。
  • 方法详细资料

    • setVillagerProfession

      void setVillagerProfession(@Nullable Villager.Profession profession)
      设置此僵尸的村民职业。

      原文:Sets the villager profession of this zombie.

      指定者:
      setVillagerProfession 在接口中 Zombie
      参数:
      profession - profession
      另请参阅:
    • getVillagerProfession

      @Nullable Villager.Profession getVillagerProfession()
      返回此僵尸的村民职业。
      指定者:
      getVillagerProfession 在接口中 Zombie
      返回:
      职业或null

      原文:Returns the villager profession of this zombie.

      另请参阅:
    • getVillagerType

      @NotNull Villager.Type getVillagerType()
      获取此村民的当前类型。
      返回:
      当前类型。

      原文:Gets the current type of this villager.

    • setVillagerType

      void setVillagerType(@NotNull Villager.Type type)
      设置此村民的新类型。
      参数:
      type - 新类型。

      原文:Sets the new type of this villager.

      type - New type.
    • isConverting

      boolean isConverting()
      获取此实体是否正在因被治愈而转换为村民。
      指定者:
      isConverting 在接口中 Zombie
      返回:
      转换状态

      原文:Get if this entity is in the process of converting to a Villager as a result of being cured.

    • getConversionTime

      int getConversionTime()
      获取此实体因被治愈而转换为村民的剩余刻数。 当此值达到0时,实体将被转换。
      指定者:
      getConversionTime 在接口中 Zombie
      返回:
      转换时间
      抛出:
      IllegalStateException - 如果isConverting()为false。

      原文:Gets the amount of ticks until this entity will be converted to a Villager as a result of being cured. When this reaches 0, the entity will be converted.

      IllegalStateException - if isConverting() is false.
    • setConversionTime

      void setConversionTime(int time)
      设置此实体因被治愈而转换为村民的剩余刻数。 当此值达到0时,实体将被转换。小于0的值将停止当前转换过程,而不会转换当前实体。
      指定者:
      setConversionTime 在接口中 Zombie
      参数:
      time - 新转换时间

      原文:Sets the amount of ticks until this entity will be converted to a Villager as a result of being cured. When this reaches 0, the entity will be converted. A value of less than 0 will stop the current conversion process without converting the current entity.

      time - new conversion time
    • getConversionPlayer

      @Nullable @Nullable OfflinePlayer getConversionPlayer()
      获取发起转换的玩家。
      返回:
      玩家,如果玩家未知或实体当前未在转换则返回null

      原文:Gets the player who initiated the conversion.

    • setConversionPlayer

      void setConversionPlayer(@Nullable @Nullable OfflinePlayer conversionPlayer)
      设置发起转换的玩家。

      如果此实体当前未在转换,则此方法无效。

      参数:
      conversionPlayer - 玩家

      原文:Sets the player who initiated the conversion.

      This has no effect if this entity isn't converting currently.

      conversionPlayer - the player