Enum Class GossipType

java.lang.Object
java.lang.Enum<GossipType>
me.gamercoder215.mobchip.ai.gossip.GossipType
All Implemented Interfaces:
Serializable, Comparable<GossipType>, Constable, Keyed

public enum GossipType extends Enum<GossipType> implements Keyed
Represents a Gossip Type that influences an Entity's popularity
  • Enum Constant Details

    • MAJOR_NEGATIVE

      public static final GossipType MAJOR_NEGATIVE
      Represents the most influential gossip type, a major negative. This will decay daily the most.
    • MINOR_NEGATIVE

      public static final GossipType MINOR_NEGATIVE
      Represents a minor negative gossip type.
    • MINOR_POSITIVE

      public static final GossipType MINOR_POSITIVE
      Represents a minor positive gossip type.
    • MAJOR_POSITIVE

      public static final GossipType MAJOR_POSITIVE
      Represents the least influential gossip type, a major positive. This will not decay daily.
    • TRADING

      public static final GossipType TRADING
      Represents a Gossip Type when trading with a villager.
  • Method Details

    • values

      public static GossipType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GossipType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getPriority

      public int getPriority()
      Fetches the priority of this GossipType. Those with a lower priority will override those with a higher priority (i.e. Major Negative over Minor Positive)
      Returns:
      Numerical Priority of this GossipType
    • getDefaultMaxDecay

      public int getDefaultMaxDecay()
      Fetches the maximum amount of decay that can be applied to this GossipType

      When the gossip is applied, a number is set to how long it will stay there, and it will increase daily by getDailyDecay() until it reaches 0, when the gossip type will be removed.
      Returns:
      Maximum Decay of this GossipType
    • getDailyDecay

      public int getDailyDecay()
      Fetches the amount of decay that will be removed from the current amount every minecraft day.
      Returns:
      Daily Decay of this GossipType
      See Also:
    • getTransferDecay

      public int getTransferDecay()
      Fetches the amount of decay that will be removed when trading with this Villager.
      Returns:
      Transfer Decay of this GossipType
      See Also:
    • getKey

      public NamespacedKey getKey()
      Fetches the unique key of this GossipType.
      Specified by:
      getKey in interface Keyed
      Returns:
      unique NamespacedKey for this GossipType
    • getByKey

      Fetches a Gossip Type by its unique Namespaced Key.
      Parameters:
      key - Namespaced Key to lookup
      Returns:
      found Gossip Type or null if not found