Interface MushroomCow

All Superinterfaces:
Ageable, Animals, Attributable, Breedable, CommandSender, Cow, Creature, Damageable, Entity, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

public interface MushroomCow extends Cow
Represents a mushroom Cow
  • Method Details

    • hasEffectsForNextStew

      boolean hasEffectsForNextStew()
      Checks for the presence of custom potion effects to be applied to the next suspicious stew received from milking this MushroomCow.
      Returns:
      true if custom potion effects are applied to the stew
    • getEffectsForNextStew

      @NotNull List<PotionEffect> getEffectsForNextStew()
      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.

      Returns:
      an immutable list of custom potion effects
    • addEffectToNextStew

      boolean addEffectToNextStew(@NotNull PotionEffect effect, boolean overwrite)
      Adds a custom potion effect to be applied to the next suspicious stew received from milking this MushroomCow.
      Parameters:
      effect - the potion effect to add
      overwrite - true if any existing effect of the same type should be overwritten
      Returns:
      true if the effects to be applied to the suspicious stew changed as a result of this call
    • removeEffectFromNextStew

      boolean removeEffectFromNextStew(@NotNull PotionEffectType type)
      Removes a custom potion effect from being applied to the next suspicious stew received from milking this MushroomCow.
      Parameters:
      type - the potion effect type to remove
      Returns:
      true if the effects to be applied to the suspicious stew changed as a result of this call
    • hasEffectForNextStew

      boolean hasEffectForNextStew(@NotNull PotionEffectType type)
      Checks for a specific custom potion effect type to be applied to the next suspicious stew received from milking this MushroomCow.
      Parameters:
      type - the potion effect type to check for
      Returns:
      true if the suspicious stew to be generated has this effect
    • clearEffectsForNextStew

      void clearEffectsForNextStew()
      Removes all custom potion effects to be applied to the next suspicious stew received from milking this MushroomCow.
    • getVariant

      @NotNull MushroomCow.Variant getVariant()
      Get the variant of this cow.
      Returns:
      cow variant
    • setVariant

      void setVariant(@NotNull MushroomCow.Variant variant)
      Set the variant of this cow.
      Parameters:
      variant - cow variant