Class JumpInBedTask
public class JumpInBedTask extends Task<MobEntity>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status -
Field Summary
Fields Modifier and Type Field Description private BlockPosbedPosprivate intjumpsRemainingprivate intticksOutOfBedUntilStoppedprivate intticksToNextJumpprivate floatwalkSpeedFields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates -
Constructor Summary
Constructors Constructor Description JumpInBedTask(float walkSpeed) -
Method Summary
Modifier and Type Method Description protected voidfinishRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)private Optional<BlockPos>getNearestBed(MobEntity mob)private booleanisAboveBed(ServerWorld world, MobEntity mob)private booleanisBedAt(ServerWorld world, BlockPos pos)private booleanisBedGoneTooLong(ServerWorld world, MobEntity mob)private booleanisDoneJumping(ServerWorld world, MobEntity mob)private booleanisOnBed(ServerWorld world, MobEntity mob)protected booleanisTimeLimitExceeded(long time)protected voidkeepRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)protected voidrun(ServerWorld serverWorld, MobEntity mobEntity, long long2)private voidsetWalkTarget(MobEntity mob, BlockPos pos)protected booleanshouldKeepRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)protected booleanshouldRun(ServerWorld serverWorld, MobEntity mobEntity)private booleanshouldStartJumping(ServerWorld world, MobEntity mob)
-
Field Details
-
walkSpeed
private final float walkSpeed -
bedPos
-
ticksOutOfBedUntilStopped
private int ticksOutOfBedUntilStopped -
jumpsRemaining
private int jumpsRemaining -
ticksToNextJump
private int ticksToNextJump
-
-
Constructor Details
-
JumpInBedTask
public JumpInBedTask(float walkSpeed)
-
-
Method Details
-
shouldRun
-
run
-
finishRunning
- Overrides:
finishRunningin classTask<MobEntity>
-
shouldKeepRunning
- Overrides:
shouldKeepRunningin classTask<MobEntity>
-
isTimeLimitExceeded
protected boolean isTimeLimitExceeded(long time)- Overrides:
isTimeLimitExceededin classTask<MobEntity>
-
keepRunning
- Overrides:
keepRunningin classTask<MobEntity>
-
setWalkTarget
-
shouldStartJumping
-
isAboveBed
-
isOnBed
-
isBedAt
-
getNearestBed
-
isBedGoneTooLong
-
isDoneJumping
-