net.minecraft.world.entity.ai

public class Brain<E extends LivingEntity>

apr
net.minecraft.world.entity.ai.Brain
net.minecraft.class_4095
net.minecraft.entity.ai.brain.Brain
net.minecraft.entity.ai.brain.Brain
net.minecraft.server.v1_16_R1.BehaviorController

Field summary

Modifier and TypeField
private static final org.apache.logging.log4j.Logger
a
LOGGER
field_24656
LOGGER
field_233688_a_
private final Supplier<com.mojang.serialization.Codec<Brain<E>>>
b
codec
field_24657
codecSupplier
field_233689_b_
private final Map<MemoryModuleType<?>, Optional<? extends ExpirableValue<?>>>
c
memories
field_18322
memories
field_218230_a
memories
private final Map<SensorType<? extends Sensor<? super E>>, Sensor<? super E>>
d
sensors
field_18323
sensors
field_218231_b
sensors
private final Map<Integer, Map<Activity, Set<Behavior<? super E>>>>
e
availableBehaviorsByPriority
field_18324
tasks
field_218232_c
private Schedule
f
schedule
field_18325
schedule
field_218233_d
schedule
private final Map<Activity, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>>>
g
activityRequirements
field_18326
requiredActivityMemories
field_218234_e
private final Map<Activity, Set<MemoryModuleType<?>>>
h
activityMemoriesToEraseWhenStopped
field_22282
forgettingActivityMemories
field_233691_h_
private Set<Activity>
i
coreActivities
field_18327
coreActivities
field_218235_f
private final Set<Activity>
j
activeActivities
field_18328
possibleActivities
field_218236_g
private Activity
k
defaultActivity
field_18329
defaultActivity
field_218237_h
private long
l
lastScheduleUpdate
field_18853
activityStartTime
field_218238_i

Constructor summary

ModifierConstructor
public (Collection<? extends MemoryModuleType<?>> memories, Collection<? extends SensorType<? extends Sensor<? super E>>> sensors, com.google.common.collect.ImmutableList<Brain$MemoryValue<?>> memoryEntries, Supplier<com.mojang.serialization.Codec<Brain<E>>> codecSupplier)

Method summary

Modifier and TypeMethod
public static <E extends LivingEntity> Brain$Provider<E>
a(Collection<? extends awp<?>> arg0, Collection<? extends axo<? extends axn<? super E>>> arg1)
provider(Collection<? extends MemoryModuleType<?>> arg0, Collection<? extends SensorType<? extends Sensor<? super E>>> arg1)
method_28311(Collection<? extends class_4140<?>> arg0, Collection<? extends class_4149<? extends class_4148<? super E>>> arg1)
createProfile(Collection<? extends MemoryModuleType<?>> memoryModules, Collection<? extends SensorType<? extends Sensor<? super E>>> sensors)
func_233705_a_(Collection<? extends MemoryModuleType<?>> arg0, Collection<? extends SensorType<? extends Sensor<? super E>>> arg1)
public static <E extends LivingEntity> com.mojang.serialization.Codec<Brain<E>>
b(Collection<? extends awp<?>> arg0, Collection<? extends axo<? extends axn<? super E>>> arg1)
codec(Collection<? extends MemoryModuleType<?>> arg0, Collection<? extends SensorType<? extends Sensor<? super E>>> arg1)
method_28313(Collection<? extends class_4140<?>> arg0, Collection<? extends class_4149<? extends class_4148<? super E>>> arg1)
createBrainCodec(Collection<? extends MemoryModuleType<?>> memoryModules, Collection<? extends SensorType<? extends Sensor<? super E>>> sensors)
func_233710_b_(Collection<? extends MemoryModuleType<?>> arg0, Collection<? extends SensorType<? extends Sensor<? super E>>> arg1)
public <T> com.mojang.serialization.DataResult<T>
a(com.mojang.serialization.DynamicOps<T> arg0)
serializeStart(com.mojang.serialization.DynamicOps<T> arg0)
method_28310(com.mojang.serialization.DynamicOps<T> arg0)
encode(com.mojang.serialization.DynamicOps<T> ops)
func_233702_a_(com.mojang.serialization.DynamicOps<T> arg0)
private Stream<Brain$MemoryValue<?>>
j()
memories()
method_28315()
streamMemories()
func_233720_j_()
public boolean
a(awp<?> arg0)
hasMemoryValue(MemoryModuleType<?> arg0)
method_18896(class_4140<?> arg0)
hasMemoryModule(MemoryModuleType<?> type)
func_218191_a(MemoryModuleType<?> arg0)
hasMemory(MemoryModuleType<?> arg0)
public <U> void
b(awp<U> arg0)
eraseMemory(MemoryModuleType<U> arg0)
method_18875(class_4140<U> arg0)
forget(MemoryModuleType<U> type)
func_218189_b(MemoryModuleType<U> arg0)
removeMemory(MemoryModuleType<U> arg0)
public <U> void
a(awp<U> arg0, U arg1)
setMemory(MemoryModuleType<U> arg0, U arg1)
method_18878(class_4140<U> arg0, U arg1)
remember(MemoryModuleType<U> type, U value)
func_218205_a(MemoryModuleType<U> arg0, U arg1)
setMemory(MemoryModuleType<U> arg0, U arg1)
public <U> void
a(awp<U> arg0, U arg1, long arg2)
setMemoryWithExpiry(MemoryModuleType<U> arg0, U arg1, long arg2)
method_24525(class_4140<U> arg0, U arg1, long arg2)
remember(MemoryModuleType<U> type, U value, long startTime)
func_233696_a_(MemoryModuleType<U> arg0, U arg1, long arg2)
public <U> void
a(awp<U> arg0, Optional<? extends U> arg1)
setMemory(MemoryModuleType<U> arg0, Optional<? extends U> arg1)
method_18879(class_4140<U> arg0, Optional<? extends U> arg1)
remember(MemoryModuleType<U> type, Optional<? extends U> value)
func_218226_a(MemoryModuleType<U> arg0, Optional<? extends U> arg1)
setMemory(MemoryModuleType<U> arg0, Optional<? extends U> arg1)
private <U> void
b(awp<U> arg0, Optional<? extends awo<?>> arg1)
setMemoryInternal(MemoryModuleType<U> arg0, Optional<? extends ExpirableValue<?>> arg1)
method_24535(class_4140<U> arg0, Optional<? extends class_4831<?>> arg1)
setMemory(MemoryModuleType<U> type, Optional<? extends Memory<?>> memory)
func_233709_b_(MemoryModuleType<U> arg0, Optional<? extends Memory<?>> arg1)
public <U> Optional<U>
c(awp<U> arg0)
getMemory(MemoryModuleType<U> arg0)
method_18904(class_4140<U> arg0)
getOptionalMemory(MemoryModuleType<U> type)
func_218207_c(MemoryModuleType<U> arg0)
getMemory(MemoryModuleType<U> arg0)
public <U> boolean
b(awp<U> arg0, U arg1)
isMemoryValue(MemoryModuleType<U> arg0, U arg1)
method_29519(class_4140<U> arg0, U arg1)
method_29519(MemoryModuleType<U> arg0, U arg1)
func_233708_b_(MemoryModuleType<U> arg0, U arg1)
public boolean
a(awp<?> arg0, awq arg1)
checkMemory(MemoryModuleType<?> arg0, MemoryStatus arg1)
method_18876(class_4140<?> arg0, class_4141 arg1)
isMemoryInState(MemoryModuleType<?> type, MemoryModuleState state)
func_218196_a(MemoryModuleType<?> arg0, MemoryModuleStatus arg1)
public Schedule
b()
getSchedule()
method_18894()
getSchedule()
func_218198_b()
getSchedule()
public void
a(bfn arg0)
setSchedule(Schedule arg0)
method_18884(class_4170 arg0)
setSchedule(Schedule schedule)
func_218203_a(Schedule arg0)
setSchedule(Schedule arg0)
public void
a(Set<bfl> arg0)
setCoreActivities(Set<Activity> arg0)
method_18890(Set<class_4168> arg0)
setCoreActivities(Set<Activity> coreActivities)
func_218199_a(Set<Activity> arg0)
public List<Behavior<? super E>>
d()
getRunningBehaviors()
method_27074()
getRunningTasks()
func_233712_d_()
public void
e()
useDefaultActivity()
method_24536()
resetPossibleActivities()
func_233714_e_()
public Optional<Activity>
f()
getActiveNonCoreActivity()
method_24538()
getFirstPossibleNonCoreActivity()
func_233716_f_()
public void
a(bfl arg0)
setActiveActivityIfPossible(Activity arg0)
method_24526(class_4168 arg0)
doExclusively(Activity activity)
func_218202_a(Activity arg0)
private void
d(bfl arg0)
setActiveActivity(Activity arg0)
method_18880(class_4168 arg0)
resetPossibleActivities(Activity except)
func_233713_d_(Activity arg0)
private void
e(bfl arg0)
eraseMemoriesForOtherActivitesThan(Activity arg0)
method_24537(class_4168 arg0)
forgetIrrelevantMemories(Activity except)
func_233715_e_(Activity arg0)
public void
a(long arg0, long arg1)
updateActivityFromSchedule(long arg0, long arg1)
method_18871(long arg0, long arg1)
refreshActivities(long timeOfDay, long time)
func_218211_a(long arg0, long arg1)
public void
a(List<bfl> arg0)
setActiveActivityToFirstValid(List<Activity> arg0)
method_24531(List<class_4168> arg0)
resetPossibleActivities(List<Activity> arg0)
func_233706_a_(List<Activity> arg0)
public void
b(bfl arg0)
setDefaultActivity(Activity arg0)
method_18897(class_4168 arg0)
setDefaultActivity(Activity activity)
func_218200_b(Activity arg0)
public void
a(bfl arg0, int arg1, com.google.common.collect.ImmutableList<? extends aqh<? super E>> arg2)
addActivity(Activity arg0, int arg1, com.google.common.collect.ImmutableList<? extends Behavior<? super E>> arg2)
method_18882(class_4168 arg0, int arg1, com.google.common.collect.ImmutableList<? extends class_4097<? super E>> arg2)
setTaskList(Activity activity, int begin, com.google.common.collect.ImmutableList<? extends Task<? super E>> list)
func_233698_a_(Activity arg0, int arg1, com.google.common.collect.ImmutableList<? extends Task<? super E>> arg2)
public void
a(bfl arg0, int arg1, com.google.common.collect.ImmutableList<? extends aqh<? super E>> arg2, awp<?> arg3)
addActivityAndRemoveMemoryWhenStopped(Activity arg0, int arg1, com.google.common.collect.ImmutableList<? extends Behavior<? super E>> arg2, MemoryModuleType<?> arg3)
method_24527(class_4168 arg0, int arg1, com.google.common.collect.ImmutableList<? extends class_4097<? super E>> arg2, class_4140<?> arg3)
setTaskList(Activity activity, int begin, com.google.common.collect.ImmutableList<? extends Task<? super E>> tasks, MemoryModuleType<?> memoryType)
func_233699_a_(Activity arg0, int arg1, com.google.common.collect.ImmutableList<? extends Task<? super E>> arg2, MemoryModuleType<?> arg3)
public void
a(bfl arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends aqh<? super E>>> arg1)
addActivity(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Behavior<? super E>>> arg1)
method_18881(class_4168 arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends class_4097<? super E>>> arg1)
setTaskList(Activity activity, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> indexedTasks)
func_218208_a(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> arg1)
public void
a(bfl arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends aqh<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<awp<?>, awq>> arg2)
addActivityWithConditions(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Behavior<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> arg2)
method_24529(class_4168 arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends class_4097<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<class_4140<?>, class_4141>> arg2)
setTaskList(Activity activity, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> indexedTasks, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryModuleState>> requiredMemories)
func_233700_a_(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryModuleStatus>> arg2)
private void
a(bfl arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends aqh<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<awp<?>, awq>> arg2, Set<awp<?>> arg3)
addActivityAndRemoveMemoriesWhenStopped(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Behavior<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> arg2, Set<MemoryModuleType<?>> arg3)
method_24530(class_4168 arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends class_4097<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<class_4140<?>, class_4141>> arg2, Set<class_4140<?>> arg3)
setTaskList(Activity activity, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> indexedTasks, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryModuleState>> requiredMemories, Set<MemoryModuleType<?>> forgettingMemories)
func_233701_a_(Activity arg0, com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Task<? super E>>> arg1, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryModuleStatus>> arg2, Set<MemoryModuleType<?>> arg3)
public boolean
c(bfl arg0)
isActive(Activity arg0)
method_18906(class_4168 arg0)
hasActivity(Activity activity)
func_218214_c(Activity arg0)
public Brain<E>
h()
copyWithoutBehaviors()
method_18911()
copy()
func_218185_f()
public void
a(zd arg0, E arg1)
tick(ServerLevel arg0, E arg1)
method_19542(class_3218 arg0, E arg1)
tick(ServerWorld world, E entity)
func_218210_a(ServerWorld arg0, E arg1)
private void
c(zd arg0, E arg1)
tickSensors(ServerLevel arg0, E arg1)
method_27073(class_3218 arg0, E arg1)
tickSensors(ServerWorld world, E entity)
func_233711_c_(ServerWorld arg0, E arg1)
private void
k()
forgetOutdatedMemories()
method_27075()
tickMemories()
func_233721_k_()
public void
b(zd arg0, E arg1)
stopAll(ServerLevel arg0, E arg1)
method_18900(class_3218 arg0, E arg1)
stopAllTasks(ServerWorld world, E entity)
func_218227_b(ServerWorld arg0, E arg1)
private void
d(zd arg0, E arg1)
startEachNonRunningBehavior(ServerLevel arg0, E arg1)
method_18891(class_3218 arg0, E arg1)
startTasks(ServerWorld world, E entity)
func_218218_d(ServerWorld arg0, E arg1)
private void
e(zd arg0, E arg1)
tickEachRunningBehavior(ServerLevel arg0, E arg1)
method_19545(class_3218 arg0, E arg1)
updateTasks(ServerWorld world, E entity)
func_218222_e(ServerWorld arg0, E arg1)
private boolean
f(bfl arg0)
activityRequirementsAreMet(Activity arg0)
method_18874(class_4168 arg0)
canDoActivity(Activity activity)
func_218217_d(Activity arg0)
private boolean
a(Object arg0)
isEmptyCollection(Object arg0)
method_19948(Object arg0)
isEmptyCollection(Object value)
func_218213_a(Object arg0)
com.google.common.collect.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends Behavior<? super E>>>
a(int arg0, com.google.common.collect.ImmutableList<? extends aqh<? super E>> arg1)
createPriorityPairs(int arg0, com.google.common.collect.ImmutableList<? extends Behavior<? super E>> arg1)
method_24524(int arg0, com.google.common.collect.ImmutableList<? extends class_4097<? super E>> arg1)
indexTaskList(int begin, com.google.common.collect.ImmutableList<? extends Task<? super E>> tasks)
func_233692_a_(int arg0, com.google.common.collect.ImmutableList<? extends Task<? super E>> arg1)