Class GossipContainer
java.lang.Object
net.minecraft.world.entity.ai.gossip.GossipContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private final Map
<UUID, GossipContainer.EntityGossips> private static final org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(UUID pIdentifier, GossipType pGossipType, int pGossipValue) void
decay()
long
getCountForType
(GossipType pGossipType, DoublePredicate pGossipPredicate) Map
<UUID, it.unimi.dsi.fastutil.objects.Object2IntMap<GossipType>> private GossipContainer.EntityGossips
getOrCreate
(UUID pIdentifier) int
getReputation
(UUID pIdentifier, Predicate<GossipType> pGossip) private int
mergeValuesForAddition
(GossipType pGossipType, int pExisting, int pAdditive) private static int
mergeValuesForTransfer
(int p_26159_, int p_26160_) Returns the greater of two int valuesvoid
remove
(UUID pIdentifier, GossipType pGossipType) void
remove
(UUID pIdentifier, GossipType pGossipType, int pGossipValue) void
remove
(GossipType pGossipType) private Collection
<GossipContainer.GossipEntry> selectGossipsForTransfer
(RandomSource pRandom, int pAmount) <T> T
store
(com.mojang.serialization.DynamicOps<T> p_262915_) void
transferFrom
(GossipContainer pContainer, RandomSource pRandomSource, int pAmount) private Stream
<GossipContainer.GossipEntry> unpack()
void
update
(com.mojang.serialization.Dynamic<?> p_26178_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DISCARD_THRESHOLD
public static final int DISCARD_THRESHOLD- See Also:
-
gossips
-
-
Constructor Details
-
GossipContainer
public GossipContainer()
-
-
Method Details
-
getGossipEntries
-
decay
public void decay() -
unpack
-
selectGossipsForTransfer
private Collection<GossipContainer.GossipEntry> selectGossipsForTransfer(RandomSource pRandom, int pAmount) -
getOrCreate
-
transferFrom
-
getReputation
-
getCountForType
-
add
-
remove
-
remove
-
remove
-
store
public <T> T store(com.mojang.serialization.DynamicOps<T> p_262915_) -
update
public void update(com.mojang.serialization.Dynamic<?> p_26178_) -
mergeValuesForTransfer
private static int mergeValuesForTransfer(int p_26159_, int p_26160_) Returns the greater of two int values -
mergeValuesForAddition
-