接口 MushroomCow

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

public interface MushroomCow extends AbstractCow
代表哞菇( AbstractCow ).
  • 方法详细资料

    • hasEffectsForNextStew

      boolean hasEffectsForNextStew()
      检查是否设置了自定义药水效果,这些效果将应用于下次从此 MushroomCow 挤奶获得的可疑炖菜。

      原文:Checks for the presence of custom potion effects to be applied to the next suspicious stew received from milking this MushroomCow.

      返回:
      如果自定义药水效果应用于炖菜则返回 true
    • getEffectsForNextStew

      @NotNull @NotNull List<PotionEffect> getEffectsForNextStew()
      获取包含所有自定义药水效果的不可变列表,这些效果将应用于下次从此 MushroomCow 挤奶获得的可疑炖菜。

      插件在调用此方法前应检查 hasCustomEffects() 是否返回 true。

      原文:Gets an immutable list containing all custom potion effects applied to the next suspicious stew received from milking this MushroomCow. Plugins should check that hasCustomEffects() returns true before calling this method.

      返回:
      包含自定义药水效果的不可变列表
    • addEffectToNextStew

      boolean addEffectToNextStew(@NotNull @NotNull PotionEffect effect, boolean overwrite)
      添加一个自定义药水效果,该效果将应用于下次从此 MushroomCow 挤奶获得的可疑炖菜。

      原文:Adds a custom potion effect to be applied to the next suspicious stew received from milking this MushroomCow.

      参数:
      effect - 要添加的药水效果
      overwrite - 如果为 true,则覆盖任何已存在的相同类型效果
      返回:
      如果应用于可疑炖菜的效果因此次调用而改变则返回 true
    • removeEffectFromNextStew

      boolean removeEffectFromNextStew(@NotNull @NotNull PotionEffectType type)
      移除一个自定义药水效果,使其不再应用于下次从此 MushroomCow 挤奶获得的可疑炖菜。

      原文:Removes a custom potion effect from being applied to the next suspicious stew received from milking this MushroomCow.

      参数:
      type - 要移除的药水效果类型
      返回:
      如果应用于可疑炖菜的效果因此次调用而改变则返回 true
    • hasEffectForNextStew

      boolean hasEffectForNextStew(@NotNull @NotNull PotionEffectType type)
      检查是否有特定的自定义药水效果类型将应用于下次从此 MushroomCow 挤奶获得的可疑炖菜。

      原文:Checks for a specific custom potion effect type to be applied to the next suspicious stew received from milking this MushroomCow.

      参数:
      type - 要检查的药水效果类型
      返回:
      如果要生成的可疑炖菜包含此效果则返回 true
    • clearEffectsForNextStew

      void clearEffectsForNextStew()
      移除所有将应用于下次从此 MushroomCow 挤奶获得的可疑炖菜的自定义药水效果。

      原文:Removes all custom potion effects to be applied to the next suspicious stew received from milking this MushroomCow.

    • getVariant

      获取此牛的变种。

      原文:Get the variant of this cow.

      返回:
      牛的变种
    • setVariant

      void setVariant(@NotNull @NotNull MushroomCow.Variant variant)
      设置此牛的变种。

      原文:Set the variant of this cow.

      参数:
      variant - 牛的变种