Class JumpOnBedTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private int
private int
private final float
private BlockPos
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerWorld p_212834_1_, MobEntity p_212834_2_, long p_212834_3_) protected boolean
checkExtraStartConditions
(ServerWorld p_212832_1_, MobEntity p_212832_2_) getNearestBed
(MobEntity p_220463_1_) private boolean
isBed
(ServerWorld p_220466_1_, BlockPos p_220466_2_) private boolean
nearBed
(ServerWorld p_220469_1_, MobEntity p_220469_2_) private boolean
onBedSurface
(ServerWorld p_220465_1_, MobEntity p_220465_2_) private boolean
onOrOverBed
(ServerWorld p_220468_1_, MobEntity p_220468_2_) protected void
start
(ServerWorld p_212831_1_, MobEntity p_212831_2_, long p_212831_3_) private void
startWalkingTowardsBed
(MobEntity p_220467_1_, BlockPos p_220467_2_) protected void
stop
(ServerWorld p_212835_1_, MobEntity p_212835_2_, long p_212835_3_) protected void
tick
(ServerWorld p_212833_1_, MobEntity p_212833_2_, long p_212833_3_) protected boolean
timedOut
(long p_220383_1_) private boolean
tiredOfJumping
(ServerWorld p_220462_1_, MobEntity p_220462_2_) private boolean
tiredOfWalking
(ServerWorld p_220464_1_, MobEntity p_220464_2_)
-
Field Details
-
speedModifier
private final float speedModifier -
targetBed
-
remainingTimeToReachBed
private int remainingTimeToReachBed -
remainingJumps
private int remainingJumps -
remainingCooldownUntilNextJump
private int remainingCooldownUntilNextJump
-
-
Constructor Details
-
JumpOnBedTask
public JumpOnBedTask(float p_i50362_1_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classTask<MobEntity>
-
start
-
stop
-
canStillUse
- Overrides:
canStillUse
in classTask<MobEntity>
-
timedOut
protected boolean timedOut(long p_220383_1_) -
tick
-
startWalkingTowardsBed
-
nearBed
-
onOrOverBed
-
onBedSurface
-
isBed
-
getNearestBed
-
tiredOfWalking
-
tiredOfJumping
-