Record Class ActivityData<E extends LivingEntity>
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.ActivityData<E>
public record ActivityData<E extends LivingEntity>(Activity activityType, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E extends LivingEntity>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions, Set<MemoryModuleType<?>> memoriesToEraseWhenStopped)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActivityThe field for theactivityTyperecord component.private final ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> The field for thebehaviorPriorityPairsrecord component.private final Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> The field for theconditionsrecord component.private final Set<MemoryModuleType<?>> The field for thememoriesToEraseWhenStoppedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionActivityData(Activity activityType, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions, Set<MemoryModuleType<?>> memoriesToEraseWhenStopped) Creates an instance of aActivityDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivityTyperecord component.ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> Returns the value of thebehaviorPriorityPairsrecord component.Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> Returns the value of theconditionsrecord component.static <E extends LivingEntity>
ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList) static <E extends LivingEntity>
ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions) static <E extends LivingEntity>
ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList, MemoryModuleType<?> memoryThatMustHaveValueAndWillBeErasedAfter) static <E extends LivingEntity>
ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs) static <E extends LivingEntity>
ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions) static <E extends LivingEntity>
ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions, Set<MemoryModuleType<?>> memoriesToEraseWhenStopped) static <E extends LivingEntity>
ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> createPriorityPairs(int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<MemoryModuleType<?>> Returns the value of thememoriesToEraseWhenStoppedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
activityType
The field for theactivityTyperecord component. -
behaviorPriorityPairs
private final ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E extends LivingEntity>>> behaviorPriorityPairsThe field for thebehaviorPriorityPairsrecord component. -
conditions
The field for theconditionsrecord component. -
memoriesToEraseWhenStopped
The field for thememoriesToEraseWhenStoppedrecord component.
-
-
Constructor Details
-
ActivityData
public ActivityData(Activity activityType, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions, Set<MemoryModuleType<?>> memoriesToEraseWhenStopped) Creates an instance of aActivityDatarecord class.- Parameters:
activityType- the value for theactivityTyperecord componentbehaviorPriorityPairs- the value for thebehaviorPriorityPairsrecord componentconditions- the value for theconditionsrecord componentmemoriesToEraseWhenStopped- the value for thememoriesToEraseWhenStoppedrecord component
-
-
Method Details
-
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList) -
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList, MemoryModuleType<?> memoryThatMustHaveValueAndWillBeErasedAfter) -
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs) -
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions) -
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions) -
create
public static <E extends LivingEntity> ActivityData<E> create(Activity activity, ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs, Set<com.mojang.datafixers.util.Pair<MemoryModuleType<?>, MemoryStatus>> conditions, Set<MemoryModuleType<?>> memoriesToEraseWhenStopped) -
createPriorityPairs
public static <E extends LivingEntity> ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> createPriorityPairs(int priorityOfFirstBehavior, ImmutableList<? extends BehaviorControl<? super E>> behaviorList) -
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
activityType
Returns the value of theactivityTyperecord component.- Returns:
- the value of the
activityTyperecord component
-
behaviorPriorityPairs
public ImmutableList<? extends com.mojang.datafixers.util.Pair<Integer, ? extends BehaviorControl<? super E>>> behaviorPriorityPairs()Returns the value of thebehaviorPriorityPairsrecord component.- Returns:
- the value of the
behaviorPriorityPairsrecord component
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-
memoriesToEraseWhenStopped
Returns the value of thememoriesToEraseWhenStoppedrecord component.- Returns:
- the value of the
memoriesToEraseWhenStoppedrecord component
-