You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
7.3 KiB

CLASS net/minecraft/class_4095 net/minecraft/entity/ai/brain/Brain
COMMENT A brain is associated with each living entity.
COMMENT
COMMENT <p>A brain has {@linkplain #memories memories}, {@linkplain #sensors sensors},
COMMENT and {@linkplain #tasks tasks}. In general, the brain can use sensors to refresh
COMMENT the memories over time, and the memories can be shared by different tasks,
COMMENT which can reduce duplicate calculation. For instance, instead of having each
COMMENT task scan for the player, the memories can hold information about nearby player,
COMMENT and the task can choose to run or not accordingly.
COMMENT
COMMENT <p>To construct a brain, you need to specify the memory (module) types and
COMMENT sensors present in a brain, and then you can add individual tasks.
COMMENT
COMMENT @see LivingEntity#brain
FIELD field_18322 memories Ljava/util/Map;
FIELD field_18323 sensors Ljava/util/Map;
FIELD field_18324 tasks Ljava/util/Map;
FIELD field_18325 schedule Lnet/minecraft/class_4170;
FIELD field_18326 requiredActivityMemories Ljava/util/Map;
FIELD field_18327 coreActivities Ljava/util/Set;
FIELD field_18328 possibleActivities Ljava/util/Set;
FIELD field_18329 defaultActivity Lnet/minecraft/class_4168;
FIELD field_18853 activityStartTime J
FIELD field_22282 forgettingActivityMemories Ljava/util/Map;
COMMENT The map from activities to the memories to forget after the activity is
COMMENT completed.
FIELD field_24656 LOGGER Lorg/apache/logging/log4j/Logger;
FIELD field_24657 codecSupplier Ljava/util/function/Supplier;
FIELD field_30096 ACTIVITY_REFRESH_COOLDOWN I
METHOD <init> (Ljava/util/Collection;Ljava/util/Collection;Lcom/google/common/collect/ImmutableList;Ljava/util/function/Supplier;)V
ARG 1 memories
ARG 2 sensors
ARG 3 memoryEntries
ARG 4 codecSupplier
METHOD method_18871 refreshActivities (JJ)V
ARG 1 timeOfDay
ARG 3 time
METHOD method_18874 canDoActivity (Lnet/minecraft/class_4168;)Z
ARG 1 activity
METHOD method_18875 forget (Lnet/minecraft/class_4140;)V
ARG 1 type
METHOD method_18876 isMemoryInState (Lnet/minecraft/class_4140;Lnet/minecraft/class_4141;)Z
ARG 1 type
ARG 2 state
METHOD method_18878 remember (Lnet/minecraft/class_4140;Ljava/lang/Object;)V
ARG 1 type
ARG 2 value
METHOD method_18879 remember (Lnet/minecraft/class_4140;Ljava/util/Optional;)V
ARG 1 type
ARG 2 value
METHOD method_18880 resetPossibleActivities (Lnet/minecraft/class_4168;)V
ARG 1 except
METHOD method_18881 setTaskList (Lnet/minecraft/class_4168;Lcom/google/common/collect/ImmutableList;)V
ARG 1 activity
ARG 2 indexedTasks
METHOD method_18882 setTaskList (Lnet/minecraft/class_4168;ILcom/google/common/collect/ImmutableList;)V
ARG 1 activity
ARG 2 begin
ARG 3 list
METHOD method_18884 setSchedule (Lnet/minecraft/class_4170;)V
ARG 1 schedule
METHOD method_18890 setCoreActivities (Ljava/util/Set;)V
ARG 1 coreActivities
METHOD method_18891 startTasks (Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
ARG 1 world
ARG 2 entity
METHOD method_18894 getSchedule ()Lnet/minecraft/class_4170;
METHOD method_18896 hasMemoryModule (Lnet/minecraft/class_4140;)Z
ARG 1 type
METHOD method_18897 setDefaultActivity (Lnet/minecraft/class_4168;)V
ARG 1 activity
METHOD method_18900 stopAllTasks (Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
ARG 1 world
ARG 2 entity
METHOD method_18904 getOptionalMemory (Lnet/minecraft/class_4140;)Ljava/util/Optional;
ARG 1 type
METHOD method_18906 hasActivity (Lnet/minecraft/class_4168;)Z
ARG 1 activity
METHOD method_18911 copy ()Lnet/minecraft/class_4095;
METHOD method_19542 tick (Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
ARG 1 world
ARG 2 entity
METHOD method_19545 updateTasks (Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
ARG 1 world
ARG 2 entity
METHOD method_19948 isEmptyCollection (Ljava/lang/Object;)Z
ARG 1 value
METHOD method_24524 indexTaskList (ILcom/google/common/collect/ImmutableList;)Lcom/google/common/collect/ImmutableList;
ARG 1 begin
COMMENT the beginning of the index of tasks, exclusive
ARG 2 tasks
METHOD method_24525 remember (Lnet/minecraft/class_4140;Ljava/lang/Object;J)V
ARG 1 type
ARG 2 value
ARG 3 startTime
METHOD method_24526 doExclusively (Lnet/minecraft/class_4168;)V
ARG 1 activity
METHOD method_24527 setTaskList (Lnet/minecraft/class_4168;ILcom/google/common/collect/ImmutableList;Lnet/minecraft/class_4140;)V
ARG 1 activity
ARG 2 begin
ARG 3 tasks
ARG 4 memoryType
METHOD method_24529 setTaskList (Lnet/minecraft/class_4168;Lcom/google/common/collect/ImmutableList;Ljava/util/Set;)V
ARG 1 activity
ARG 2 indexedTasks
ARG 3 requiredMemories
METHOD method_24530 setTaskList (Lnet/minecraft/class_4168;Lcom/google/common/collect/ImmutableList;Ljava/util/Set;Ljava/util/Set;)V
ARG 1 activity
ARG 2 indexedTasks
ARG 3 requiredMemories
ARG 4 forgettingMemories
METHOD method_24531 resetPossibleActivities (Ljava/util/List;)V
ARG 1 activities
METHOD method_24535 setMemory (Lnet/minecraft/class_4140;Ljava/util/Optional;)V
ARG 1 type
ARG 2 memory
METHOD method_24536 resetPossibleActivities ()V
METHOD method_24537 forgetIrrelevantMemories (Lnet/minecraft/class_4168;)V
ARG 1 except
METHOD method_24538 getFirstPossibleNonCoreActivity ()Ljava/util/Optional;
METHOD method_27073 tickSensors (Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
ARG 1 world
ARG 2 entity
METHOD method_27074 getRunningTasks ()Ljava/util/List;
METHOD method_27075 tickMemories ()V
METHOD method_28310 encode (Lcom/mojang/serialization/DynamicOps;)Lcom/mojang/serialization/DataResult;
ARG 1 ops
METHOD method_28311 createProfile (Ljava/util/Collection;Ljava/util/Collection;)Lnet/minecraft/class_4095$class_5303;
ARG 0 memoryModules
ARG 1 sensors
METHOD method_28313 createBrainCodec (Ljava/util/Collection;Ljava/util/Collection;)Lcom/mojang/serialization/Codec;
ARG 0 memoryModules
ARG 1 sensors
METHOD method_28315 streamMemories ()Ljava/util/stream/Stream;
METHOD method_29519 hasMemoryModuleWithValue (Lnet/minecraft/class_4140;Ljava/lang/Object;)Z
ARG 1 type
ARG 2 value
METHOD method_35058 getMemories ()Ljava/util/Map;
METHOD method_35059 getPossibleActivities ()Ljava/util/Set;
METHOD method_35060 clear ()V
METHOD method_36978 getMemory (Lnet/minecraft/class_4140;)J
ARG 1 type
CLASS class_5302 MemoryEntry
FIELD field_24661 type Lnet/minecraft/class_4140;
FIELD field_24662 data Ljava/util/Optional;
METHOD <init> (Lnet/minecraft/class_4140;Ljava/util/Optional;)V
ARG 1 type
ARG 2 data
METHOD method_28328 apply (Lnet/minecraft/class_4095;)V
ARG 1 brain
METHOD method_28330 serialize (Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/RecordBuilder;)V
ARG 1 ops
ARG 2 builder
METHOD method_28333 of (Lnet/minecraft/class_4140;Ljava/util/Optional;)Lnet/minecraft/class_4095$class_5302;
ARG 0 type
ARG 1 data
CLASS class_5303 Profile
COMMENT A simple profile of a brain. Indicates what types of memory modules and
COMMENT sensors a brain can have.
FIELD field_24663 memoryModules Ljava/util/Collection;
FIELD field_24664 sensors Ljava/util/Collection;
FIELD field_24665 codec Lcom/mojang/serialization/Codec;
METHOD <init> (Ljava/util/Collection;Ljava/util/Collection;)V
ARG 1 memoryModules
ARG 2 sensors
METHOD method_28335 deserialize (Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/class_4095;
ARG 1 data