Enum Class GossipType
- All Implemented Interfaces:
Serializable
,Comparable<GossipType>
,Constable
,Keyed
Represents a Gossip Type that influences an Entity's popularity
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the most influential gossip type, a major negative.Represents the least influential gossip type, a major positive.Represents a minor negative gossip type.Represents a minor positive gossip type.Represents a Gossip Type when trading with a villager. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable GossipType
Fetches a Gossip Type by its unique Namespaced Key.int
Fetches the amount of decay that will be removed from the current amount every minecraft day.int
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 bygetDailyDecay()
until it reaches 0, when the gossip type will be removed.getKey()
Fetches the unique key of this GossipType.int
Fetches the priority of this GossipType.int
Fetches the amount of decay that will be removed when trading with this Villager.static GossipType
Returns the enum constant of this class with the specified name.static GossipType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAJOR_NEGATIVE
Represents the most influential gossip type, a major negative. This will decay daily the most. -
MINOR_NEGATIVE
Represents a minor negative gossip type. -
MINOR_POSITIVE
Represents a minor positive gossip type. -
MAJOR_POSITIVE
Represents the least influential gossip type, a major positive. This will not decay daily. -
TRADING
Represents a Gossip Type when trading with a villager.
-
-
Method Details
-
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
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 nameNullPointerException
- 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 bygetDailyDecay()
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
Fetches the unique key of 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
-