Class JumpOnBedTask
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<MobEntity>
-
- net.minecraft.entity.ai.brain.task.JumpOnBedTask
-
-
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 int
remainingCooldownUntilNextJump
private int
remainingJumps
private int
remainingTimeToReachBed
private float
speedModifier
private BlockPos
targetBed
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description JumpOnBedTask(float p_i50362_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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_)
private java.util.Optional<BlockPos>
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 Detail
-
speedModifier
private final float speedModifier
-
targetBed
@Nullable private BlockPos targetBed
-
remainingTimeToReachBed
private int remainingTimeToReachBed
-
remainingJumps
private int remainingJumps
-
remainingCooldownUntilNextJump
private int remainingCooldownUntilNextJump
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, MobEntity p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<MobEntity>
-
start
protected void start(ServerWorld p_212831_1_, MobEntity p_212831_2_, long p_212831_3_)
-
stop
protected void stop(ServerWorld p_212835_1_, MobEntity p_212835_2_, long p_212835_3_)
-
canStillUse
protected boolean canStillUse(ServerWorld p_212834_1_, MobEntity p_212834_2_, long p_212834_3_)
- Overrides:
canStillUse
in classTask<MobEntity>
-
tick
protected void tick(ServerWorld p_212833_1_, MobEntity p_212833_2_, long p_212833_3_)
-
startWalkingTowardsBed
private void startWalkingTowardsBed(MobEntity p_220467_1_, BlockPos p_220467_2_)
-
nearBed
private boolean nearBed(ServerWorld p_220469_1_, MobEntity p_220469_2_)
-
onOrOverBed
private boolean onOrOverBed(ServerWorld p_220468_1_, MobEntity p_220468_2_)
-
onBedSurface
private boolean onBedSurface(ServerWorld p_220465_1_, MobEntity p_220465_2_)
-
isBed
private boolean isBed(ServerWorld p_220466_1_, BlockPos p_220466_2_)
-
tiredOfWalking
private boolean tiredOfWalking(ServerWorld p_220464_1_, MobEntity p_220464_2_)
-
tiredOfJumping
private boolean tiredOfJumping(ServerWorld p_220462_1_, MobEntity p_220462_2_)
-
-