Task.Status
Modifier and Type | Field and Description |
---|---|
private BlockPos |
bedPos |
private int |
jumpsRemaining |
private int |
ticksOutOfBedUntilStopped |
private int |
ticksToNextJump |
private float |
walkSpeed |
requiredMemoryStates
Constructor and Description |
---|
JumpInBedTask(float walkSpeed) |
Modifier and Type | Method and Description |
---|---|
protected void |
finishRunning(ServerWorld serverWorld,
MobEntity mobEntity,
long long2) |
private Optional<BlockPos> |
getNearestBed(MobEntity mob) |
private boolean |
isAboveBed(ServerWorld world,
MobEntity mob) |
private boolean |
isBedAt(ServerWorld world,
BlockPos pos) |
private boolean |
isBedGoneTooLong(ServerWorld world,
MobEntity mob) |
private boolean |
isDoneJumping(ServerWorld world,
MobEntity mob) |
private boolean |
isOnBed(ServerWorld world,
MobEntity mob) |
protected boolean |
isTimeLimitExceeded(long time) |
protected void |
keepRunning(ServerWorld serverWorld,
MobEntity mobEntity,
long long2) |
protected void |
run(ServerWorld serverWorld,
MobEntity mobEntity,
long long2) |
private void |
setWalkTarget(MobEntity mob,
BlockPos pos) |
protected boolean |
shouldKeepRunning(ServerWorld serverWorld,
MobEntity mobEntity,
long long2) |
protected boolean |
shouldRun(ServerWorld serverWorld,
MobEntity mobEntity) |
private boolean |
shouldStartJumping(ServerWorld world,
MobEntity mob) |
private final float walkSpeed
private int ticksOutOfBedUntilStopped
private int jumpsRemaining
private int ticksToNextJump
protected boolean shouldRun(ServerWorld serverWorld, MobEntity mobEntity)
protected void run(ServerWorld serverWorld, MobEntity mobEntity, long long2)
protected void finishRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)
finishRunning
in class Task<MobEntity>
protected boolean shouldKeepRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)
shouldKeepRunning
in class Task<MobEntity>
protected boolean isTimeLimitExceeded(long time)
isTimeLimitExceeded
in class Task<MobEntity>
protected void keepRunning(ServerWorld serverWorld, MobEntity mobEntity, long long2)
keepRunning
in class Task<MobEntity>
private boolean shouldStartJumping(ServerWorld world, MobEntity mob)
private boolean isAboveBed(ServerWorld world, MobEntity mob)
private boolean isOnBed(ServerWorld world, MobEntity mob)
private boolean isBedAt(ServerWorld world, BlockPos pos)
private boolean isBedGoneTooLong(ServerWorld world, MobEntity mob)
private boolean isDoneJumping(ServerWorld world, MobEntity mob)