Class PrepareRamTask<E extends PathAwareEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.MultiTickTask<E>
net.minecraft.entity.ai.brain.task.PrepareRamTask<E>
- Type Parameters:
E
- the task owner, usually a goat
- All Implemented Interfaces:
Task<E>
The task where an entity finds a target, a place to start its ram, and wait to
start its ram.
- Mappings:
Namespace Name named net/minecraft/entity/ai/brain/task/PrepareRamTask
intermediary net/minecraft/class_6336
official bzn
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A ram chosen during the preparation.Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.MultiTickTask
MultiTickTask.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ToIntFunction
<E> private final int
private final int
private final int
private Optional
<PrepareRamTask.Ram> static final int
private final Function
<E, SoundEvent> private final float
private final TargetPredicate
Fields inherited from class net.minecraft.entity.ai.brain.task.MultiTickTask
DEFAULT_RUN_TIME, requiredMemoryStates
-
Constructor Summary
ConstructorDescriptionPrepareRamTask
(ToIntFunction<E> cooldownFactory, int minDistance, int maxDistance, float speed, TargetPredicate targetPredicate, int prepareTime, Function<E, SoundEvent> soundFactory) Creates a ram preparation task. -
Method Summary
Modifier and TypeMethodDescriptionprivate Vec3d
calculateRamTarget
(BlockPos start, BlockPos end) private boolean
canReach
(PathAwareEntity entity, BlockPos target) private void
findRam
(PathAwareEntity entity, LivingEntity target) findRamStart
(PathAwareEntity entity, LivingEntity target) protected void
finishRunning
(ServerWorld serverWorld, E e, long long2) protected void
keepRunning
(ServerWorld serverWorld, E e, long long2) protected void
run
(ServerWorld serverWorld, PathAwareEntity pathAwareEntity, long long2) protected boolean
shouldKeepRunning
(ServerWorld serverWorld, PathAwareEntity pathAwareEntity, long long2) Methods inherited from class net.minecraft.entity.ai.brain.task.MultiTickTask
getName, getStatus, hasRequiredMemoryState, isTimeLimitExceeded, shouldRun, stop, tick, tryStarting
-
Field Details
-
RUN_TIME
public static final int RUN_TIME- See Also:
- Mappings:
Namespace Name Mixin selector named RUN_TIME
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;RUN_TIME:I
intermediary field_33461
Lnet/minecraft/class_6336;field_33461:I
official c
Lbzn;c:I
-
cooldownFactory
- Mappings:
Namespace Name Mixin selector named cooldownFactory
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;cooldownFactory:Ljava/util/function/ToIntFunction;
intermediary field_33462
Lnet/minecraft/class_6336;field_33462:Ljava/util/function/ToIntFunction;
official d
Lbzn;d:Ljava/util/function/ToIntFunction;
-
minRamDistance
private final int minRamDistance- Mappings:
Namespace Name Mixin selector named minRamDistance
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;minRamDistance:I
intermediary field_33463
Lnet/minecraft/class_6336;field_33463:I
official e
Lbzn;e:I
-
maxRamDistance
private final int maxRamDistance- Mappings:
Namespace Name Mixin selector named maxRamDistance
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;maxRamDistance:I
intermediary field_33464
Lnet/minecraft/class_6336;field_33464:I
official f
Lbzn;f:I
-
speed
private final float speed- Mappings:
Namespace Name Mixin selector named speed
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;speed:F
intermediary field_33465
Lnet/minecraft/class_6336;field_33465:F
official g
Lbzn;g:F
-
targetPredicate
- Mappings:
Namespace Name Mixin selector named targetPredicate
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;targetPredicate:Lnet/minecraft/entity/ai/TargetPredicate;
intermediary field_33466
Lnet/minecraft/class_6336;field_33466:Lnet/minecraft/class_4051;
official h
Lbzn;h:Lcgw;
-
prepareTime
private final int prepareTime- Mappings:
Namespace Name Mixin selector named prepareTime
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;prepareTime:I
intermediary field_33467
Lnet/minecraft/class_6336;field_33467:I
official i
Lbzn;i:I
-
soundFactory
- Mappings:
Namespace Name Mixin selector named soundFactory
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;soundFactory:Ljava/util/function/Function;
intermediary field_33468
Lnet/minecraft/class_6336;field_33468:Ljava/util/function/Function;
official j
Lbzn;j:Ljava/util/function/Function;
-
prepareStartTime
- Mappings:
Namespace Name Mixin selector named prepareStartTime
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;prepareStartTime:Ljava/util/Optional;
intermediary field_33469
Lnet/minecraft/class_6336;field_33469:Ljava/util/Optional;
official k
Lbzn;k:Ljava/util/Optional;
-
ram
- Mappings:
Namespace Name Mixin selector named ram
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;ram:Ljava/util/Optional;
intermediary field_33470
Lnet/minecraft/class_6336;field_33470:Ljava/util/Optional;
official l
Lbzn;l:Ljava/util/Optional;
-
-
Constructor Details
-
PrepareRamTask
public PrepareRamTask(ToIntFunction<E> cooldownFactory, int minDistance, int maxDistance, float speed, TargetPredicate targetPredicate, int prepareTime, Function<E, SoundEvent> soundFactory) - Parameters:
cooldownFactory
- the factory for the cooldown, in ticks, of the ram task, given the entityminDistance
- the min manhattan distance from the ram starting location to the ram targetmaxDistance
- the max straight-line distance from the ram starting location to the ram targetspeed
- the speed the entity walks attargetPredicate
- the predicate for the ram targetprepareTime
- the prepare time, in ticks, the entity will stand between reaching the ram start position and the start of the ramsoundFactory
- the factory of the ram prepare sound given the entity- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;<init>(Ljava/util/function/ToIntFunction;IIFLnet/minecraft/entity/ai/TargetPredicate;ILjava/util/function/Function;)V
intermediary <init>
Lnet/minecraft/class_6336;<init>(Ljava/util/function/ToIntFunction;IIFLnet/minecraft/class_4051;ILjava/util/function/Function;)V
official <init>
Lbzn;<init>(Ljava/util/function/ToIntFunction;IIFLcgw;ILjava/util/function/Function;)V
-
-
Method Details
-
run
- Overrides:
run
in classMultiTickTask<E extends PathAwareEntity>
- Mappings:
Namespace Name Mixin selector named run
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/PathAwareEntity;J)V
intermediary method_36260
Lnet/minecraft/class_6336;method_36260(Lnet/minecraft/class_3218;Lnet/minecraft/class_1314;J)V
official a
Lbzn;a(Lash;Lbwn;J)V
-
finishRunning
- Overrides:
finishRunning
in classMultiTickTask<E extends PathAwareEntity>
- Mappings:
Namespace Name Mixin selector named finishRunning
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/PathAwareEntity;J)V
intermediary method_36267
Lnet/minecraft/class_6336;method_36267(Lnet/minecraft/class_3218;Lnet/minecraft/class_1314;J)V
official b
Lbzn;b(Lash;Lbwn;J)V
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, PathAwareEntity pathAwareEntity, long long2) - Overrides:
shouldKeepRunning
in classMultiTickTask<E extends PathAwareEntity>
- Mappings:
Namespace Name Mixin selector named shouldKeepRunning
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/PathAwareEntity;J)Z
intermediary method_36269
Lnet/minecraft/class_6336;method_36269(Lnet/minecraft/class_3218;Lnet/minecraft/class_1314;J)Z
official c
Lbzn;c(Lash;Lbwn;J)Z
-
keepRunning
- Overrides:
keepRunning
in classMultiTickTask<E extends PathAwareEntity>
- Mappings:
Namespace Name Mixin selector named keepRunning
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/PathAwareEntity;J)V
intermediary method_36271
Lnet/minecraft/class_6336;method_36271(Lnet/minecraft/class_3218;Lnet/minecraft/class_1314;J)V
official d
Lbzn;d(Lash;Lbwn;J)V
-
calculateRamTarget
- Mappings:
Namespace Name Mixin selector named calculateRamTarget
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;calculateRamTarget(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Vec3d;
intermediary method_36266
Lnet/minecraft/class_6336;method_36266(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_243;
official a
Lbzn;a(Ljh;Ljh;)Lfbx;
-
findRamStart
- Mappings:
Namespace Name Mixin selector named findRamStart
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;findRamStart(Lnet/minecraft/entity/mob/PathAwareEntity;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Optional;
intermediary method_36262
Lnet/minecraft/class_6336;method_36262(Lnet/minecraft/class_1314;Lnet/minecraft/class_1309;)Ljava/util/Optional;
official a
Lbzn;a(Lbwn;Lbwf;)Ljava/util/Optional;
-
canReach
- Mappings:
Namespace Name Mixin selector named canReach
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;canReach(Lnet/minecraft/entity/mob/PathAwareEntity;Lnet/minecraft/util/math/BlockPos;)Z
intermediary method_36263
Lnet/minecraft/class_6336;method_36263(Lnet/minecraft/class_1314;Lnet/minecraft/class_2338;)Z
official a
Lbzn;a(Lbwn;Ljh;)Z
-
findRam
- Mappings:
Namespace Name Mixin selector named findRam
Lnet/minecraft/entity/ai/brain/task/PrepareRamTask;findRam(Lnet/minecraft/entity/mob/PathAwareEntity;Lnet/minecraft/entity/LivingEntity;)V
intermediary method_36268
Lnet/minecraft/class_6336;method_36268(Lnet/minecraft/class_1314;Lnet/minecraft/class_1309;)V
official b
Lbzn;b(Lbwn;Lbwf;)V
-