Interface EntityGossipContainer
public interface EntityGossipContainer
Represents a Gossip Container Manager for a Villager
-
Method Summary
Modifier and TypeMethodDescriptionvoiddecay()Forcefully decays all the gossip types by their daily decay rate.@NotNull VillagerFetches this Gossip Container's Villager.intgetReputation(@NotNull Entity en, @Nullable GossipType... types) Gets the reputation of this entity.default voidput(@NotNull Entity en, @NotNull GossipType type) Puts this Entity to a GossipType.voidput(@NotNull Entity en, @NotNull GossipType type, int maxCap) Puts this Entity to a GossipType with a custom decay max.voidremove(@NotNull Entity en, @NotNull GossipType type) Removes this Entity from a GossipType.voidremoveAll(@NotNull GossipType type) Removes all Entities with this Gossip Type from this Gossip Container.default voidRemoves this Entity from all GossipTypes.
-
Method Details
-
getEntity
-
decay
void decay()Forcefully decays all the gossip types by their daily decay rate. -
getReputation
int getReputation(@NotNull @NotNull Entity en, @Nullable @Nullable GossipType... types) throws IllegalArgumentException Gets the reputation of this entity.
The reputation is evaluated by filtering theGossipTypearray passed, and then adding all of theirGossipType.getPriority()methods together (negatives have negative priority, positives have positive priority).- Parameters:
en- Entity to get the reputation oftypes- Gossip types to filter by, null for all gossip types- Returns:
- Reputation of the entity
- Throws:
IllegalArgumentException- if entity is null
-
put
default void put(@NotNull @NotNull Entity en, @NotNull @NotNull GossipType type) throws IllegalArgumentException Puts this Entity to a GossipType.- Parameters:
en- Entity to put to the GossipTypetype- GossipType to put to- Throws:
IllegalArgumentException- if entity or gossip type is null
-
put
void put(@NotNull @NotNull Entity en, @NotNull @NotNull GossipType type, int maxCap) throws IllegalArgumentException Puts this Entity to a GossipType with a custom decay max.- Parameters:
en- Entity to put to the GossipTypetype- GossipType to put tomaxCap- Maximum decay of this GossipType- Throws:
IllegalArgumentException- if entity or gossip type is null
-
remove
void remove(@NotNull @NotNull Entity en, @NotNull @NotNull GossipType type) throws IllegalArgumentException Removes this Entity from a GossipType. If the entity does not have this gossip type, it will do nothing.- Parameters:
en- Entity to removetype- Gossip Type to remove from- Throws:
IllegalArgumentException- if entity or gossip type is null
-
removeAll
Removes this Entity from all GossipTypes. If the entity has no gossip type, it will do nothing.- Parameters:
en- Entity to remove- Throws:
IllegalArgumentException- if entity is null
-
removeAll
Removes all Entities with this Gossip Type from this Gossip Container.- Parameters:
type- Gossip Type to remove- Throws:
IllegalArgumentException- if gossip type is null
-