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 com.mojang.serialization.Codec<GossipContainer> static final intprivate final Map<UUID, GossipContainer.EntityGossips> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateGossipContainer(List<GossipContainer.GossipEntry> pEntries) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(UUID pIdentifier, GossipType pGossipType, int pGossipValue) voidclear()copy()voiddecay()longgetCountForType(GossipType pGossipType, DoublePredicate pGossipPredicate) Map<UUID, it.unimi.dsi.fastutil.objects.Object2IntMap<GossipType>> private GossipContainer.EntityGossipsgetOrCreate(UUID pIdentifier) intgetReputation(UUID pIdentifier, Predicate<GossipType> pGossip) private intmergeValuesForAddition(GossipType pGossipType, int pExisting, int pAdditive) private static intmergeValuesForTransfer(int pValue1, int pValue2) Returns the greater of two int valuesvoidputAll(GossipContainer pOther) voidremove(UUID pIdentifier, GossipType pGossipType) voidremove(UUID pIdentifier, GossipType pGossipType, int pGossipValue) voidremove(GossipType pGossipType) private Collection<GossipContainer.GossipEntry> selectGossipsForTransfer(RandomSource pRandom, int pAmount) voidtransferFrom(GossipContainer pContainer, RandomSource pRandomSource, int pAmount) private Stream<GossipContainer.GossipEntry> unpack()
-
Field Details
-
CODEC
-
DISCARD_THRESHOLD
public static final int DISCARD_THRESHOLD- See Also:
-
gossips
-
-
Constructor Details
-
GossipContainer
public GossipContainer() -
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
-
clear
public void clear() -
putAll
-
mergeValuesForTransfer
private static int mergeValuesForTransfer(int pValue1, int pValue2) Returns the greater of two int values -
mergeValuesForAddition
-
copy
-