Package net.minecraft.util.debug
Record Class DebugBrainDump
java.lang.Object
java.lang.Record
net.minecraft.util.debug.DebugBrainDump
public record DebugBrainDump(String name, String profession, int xp, float health, float maxHealth, String inventory, boolean wantsGolem, int angerLevel, List<String> activities, List<String> behaviors, List<String> memories, List<String> gossips, Set<BlockPos> pois, Set<BlockPos> potentialPois)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theactivitiesrecord component.private final intThe field for theangerLevelrecord component.The field for thebehaviorsrecord component.The field for thegossipsrecord component.private final floatThe field for thehealthrecord component.private final StringThe field for theinventoryrecord component.private final floatThe field for themaxHealthrecord component.The field for thememoriesrecord component.private final StringThe field for thenamerecord component.The field for thepoisrecord component.The field for thepotentialPoisrecord component.private final StringThe field for theprofessionrecord component.static final StreamCodec<FriendlyByteBuf, DebugBrainDump> private final booleanThe field for thewantsGolemrecord component.private final intThe field for thexprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDebugBrainDump(String name, String profession, int xp, float health, float maxHealth, String inventory, boolean wantsGolem, int angerLevel, List<String> activities, List<String> behaviors, List<String> memories, List<String> gossips, Set<BlockPos> pois, Set<BlockPos> potentialPois) Creates an instance of aDebugBrainDumprecord class.DebugBrainDump(FriendlyByteBuf p_449299_) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivitiesrecord component.intReturns the value of theangerLevelrecord component.Returns the value of thebehaviorsrecord component.final booleanIndicates whether some other object is "equal to" this one.getKnownBlockPositions(Brain<?> pBrain, MemoryModuleType<GlobalPos>... pModuleTypes) private static StringgetMemoryDescription(ServerLevel pLevel, long pGameTime, MemoryModuleType<?> pModuleType, Optional<? extends ExpirableValue<?>> pValue) getMemoryDescriptions(ServerLevel pLevel, LivingEntity pEntity, long pGameTime) private static StringgetShortDescription(ServerLevel pLevel, Object pObject) getVillagerGossips(Villager pVillager) gossips()Returns the value of thegossipsrecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanhasPotentialPoi(BlockPos pPos) floathealth()Returns the value of thehealthrecord component.Returns the value of theinventoryrecord component.floatReturns the value of themaxHealthrecord component.memories()Returns the value of thememoriesrecord component.name()Returns the value of thenamerecord component.pois()Returns the value of thepoisrecord component.Returns the value of thepotentialPoisrecord component.Returns the value of theprofessionrecord component.static DebugBrainDumptakeBrainDump(ServerLevel pLevel, LivingEntity pEntity) final StringtoString()Returns a string representation of this record class.booleanReturns the value of thewantsGolemrecord component.voidwrite(FriendlyByteBuf pBuffer) intxp()Returns the value of thexprecord component.
-
Field Details
-
name
The field for thenamerecord component. -
profession
The field for theprofessionrecord component. -
xp
private final int xpThe field for thexprecord component. -
health
private final float healthThe field for thehealthrecord component. -
maxHealth
private final float maxHealthThe field for themaxHealthrecord component. -
inventory
The field for theinventoryrecord component. -
wantsGolem
private final boolean wantsGolemThe field for thewantsGolemrecord component. -
angerLevel
private final int angerLevelThe field for theangerLevelrecord component. -
activities
The field for theactivitiesrecord component. -
behaviors
The field for thebehaviorsrecord component. -
memories
The field for thememoriesrecord component. -
gossips
The field for thegossipsrecord component. -
pois
The field for thepoisrecord component. -
potentialPois
The field for thepotentialPoisrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
DebugBrainDump
-
DebugBrainDump
public DebugBrainDump(String name, String profession, int xp, float health, float maxHealth, String inventory, boolean wantsGolem, int angerLevel, List<String> activities, List<String> behaviors, List<String> memories, List<String> gossips, Set<BlockPos> pois, Set<BlockPos> potentialPois) Creates an instance of aDebugBrainDumprecord class.- Parameters:
name- the value for thenamerecord componentprofession- the value for theprofessionrecord componentxp- the value for thexprecord componenthealth- the value for thehealthrecord componentmaxHealth- the value for themaxHealthrecord componentinventory- the value for theinventoryrecord componentwantsGolem- the value for thewantsGolemrecord componentangerLevel- the value for theangerLevelrecord componentactivities- the value for theactivitiesrecord componentbehaviors- the value for thebehaviorsrecord componentmemories- the value for thememoriesrecord componentgossips- the value for thegossipsrecord componentpois- the value for thepoisrecord componentpotentialPois- the value for thepotentialPoisrecord component
-
-
Method Details
-
write
-
takeBrainDump
-
getKnownBlockPositions
@SafeVarargs private static Set<BlockPos> getKnownBlockPositions(Brain<?> pBrain, MemoryModuleType<GlobalPos>... pModuleTypes) -
getVillagerGossips
-
getMemoryDescriptions
private static Stream<String> getMemoryDescriptions(ServerLevel pLevel, LivingEntity pEntity, long pGameTime) -
getMemoryDescription
private static String getMemoryDescription(ServerLevel pLevel, long pGameTime, MemoryModuleType<?> pModuleType, Optional<? extends ExpirableValue<?>> pValue) -
getShortDescription
-
hasPoi
-
hasPotentialPoi
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
profession
Returns the value of theprofessionrecord component.- Returns:
- the value of the
professionrecord component
-
xp
public int xp()Returns the value of thexprecord component.- Returns:
- the value of the
xprecord component
-
health
public float health()Returns the value of thehealthrecord component.- Returns:
- the value of the
healthrecord component
-
maxHealth
public float maxHealth()Returns the value of themaxHealthrecord component.- Returns:
- the value of the
maxHealthrecord component
-
inventory
Returns the value of theinventoryrecord component.- Returns:
- the value of the
inventoryrecord component
-
wantsGolem
public boolean wantsGolem()Returns the value of thewantsGolemrecord component.- Returns:
- the value of the
wantsGolemrecord component
-
angerLevel
public int angerLevel()Returns the value of theangerLevelrecord component.- Returns:
- the value of the
angerLevelrecord component
-
activities
Returns the value of theactivitiesrecord component.- Returns:
- the value of the
activitiesrecord component
-
behaviors
Returns the value of thebehaviorsrecord component.- Returns:
- the value of the
behaviorsrecord component
-
memories
Returns the value of thememoriesrecord component.- Returns:
- the value of the
memoriesrecord component
-
gossips
Returns the value of thegossipsrecord component.- Returns:
- the value of the
gossipsrecord component
-
pois
Returns the value of thepoisrecord component.- Returns:
- the value of the
poisrecord component
-
potentialPois
Returns the value of thepotentialPoisrecord component.- Returns:
- the value of the
potentialPoisrecord component
-