接口 Mannequin

所有超级接口:
Attributable, CommandSender, Damageable, Entity, Leashable, LivingEntity, Metadatable, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

public interface Mannequin extends LivingEntity
代表一个假人模型。
  • 方法详细资料

    • getMainHand

      @NotNull @NotNull MainHand getMainHand()
      获取假人的主手。

      原文:Gets the mannequin's main hand.

      返回:
      the mannequin's main hand
    • setMainHand

      void setMainHand(@NotNull @NotNull MainHand hand)
      设置假人的主手。

      原文:Gets the mannequin's main hand.

      参数:
      hand - the mannequin's main hand
    • isModelPartShown

      boolean isModelPartShown(@NotNull @NotNull PlayerModelPart part)
      获取假人模型的某一部分是否显示。

      原文:Gets whether a part of the mannequin model is shown.

      参数:
      part - model part
      返回:
      if it is shown
    • setModelPartShown

      void setModelPartShown(@NotNull @NotNull PlayerModelPart part, boolean shown)
      设置假人模型的某一部分是否显示。

      原文:Sets whether a part of the mannequin model is shown.

      参数:
      part - model part
      shown - whether it is shown
    • getPlayerProfile

      @Nullable @Nullable PlayerProfile getPlayerProfile()
      获取用于给假人添加纹理的玩家配置文件。

      原文:Gets the profile of the player used to texture the mannequin.

      返回:
      the profile of the owning player
    • setPlayerProfile

      void setPlayerProfile(@Nullable @Nullable PlayerProfile profile)
      设置用于给假人添加纹理的玩家配置文件。

      原文:Sets the profile of the player used to texture the mannequin.

      The profile must already contain a skin texture for it to be displayed.

      参数:
      profile - the profile of the player texture.
      抛出:
      IllegalArgumentException - if the profile does not contain the necessary information
    • setPose

      void setPose(@NotNull @NotNull Pose pose)
      设置假人姿势。

      原文:Set the mannequin pose.

      参数:
      pose - new pose
      抛出:
      IllegalArgumentException - if the pose is not valid for a mannequin
    • isImmovable

      boolean isImmovable()
      获取此假人是否可以被移动/推动。

      原文:Gets whether this mannequin can be moved/pushed.

      返回:
      whether immovable
    • setImmovable

      void setImmovable(boolean immovable)
      设置此假人是否可以被移动/推动。

      原文:Sets whether this mannequin can be moved/pushed.

      参数:
      immovable - new state
    • getDescripion

      @Nullable @Deprecated(since="1.21.11") @Nullable String getDescripion()
      已过时。
      获取显示为假人名称一部分的描述。

      原文:Gets the description which shows as part of the mannequin's name.

      返回:
      description the description text
    • getDescription

      @Nullable @Nullable String getDescription()
      Gets the description which shows as part of the mannequin's name.
      返回:
      description the description text
    • setDescription

      void setDescription(@Nullable @Nullable String description)
      设置显示为假人名称一部分的描述。

      原文:Sets the description which shows as part of the mannequin's name.

      参数:
      description - the description to show or null for default
    • isHideDescription

      boolean isHideDescription()
      获取假人描述是否隐藏。

      原文:Gets whether the mannequin description is hidden.

      返回:
      hide description status
    • setHideDescription

      void setHideDescription(boolean hide)
      设置假人描述是否隐藏。

      原文:Sets whether the mannequin description is hidden.

      参数:
      hide - whether to hide description