Class CrossbowAttack<E extends Mob & CrossbowAttackMob,T extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.CrossbowAttack<E,T>
- All Implemented Interfaces:
BehaviorControl<E>
public class CrossbowAttack<E extends Mob & CrossbowAttackMob,T extends LivingEntity>
extends Behavior<E>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private CrossbowAttack.CrossbowState
private static final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, E pEntity, long pGameTime) protected boolean
checkExtraStartConditions
(ServerLevel pLevel, E pOwner) private void
crossbowAttack
(E pShooter, LivingEntity pTarget) private static LivingEntity
getAttackTarget
(LivingEntity pShooter) private void
lookAtTarget
(Mob pShooter, LivingEntity pTarget) protected void
stop
(ServerLevel pLevel, E pEntity, long pGameTime) protected void
tick
(ServerLevel pLevel, E pOwner, long pGameTime) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, start, tickOrStop, timedOut, tryStart
-
Field Details
-
TIMEOUT
private static final int TIMEOUT- See Also:
-
attackDelay
private int attackDelay -
crossbowState
-
-
Constructor Details
-
CrossbowAttack
public CrossbowAttack()
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends Mob & CrossbowAttackMob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends Mob & CrossbowAttackMob>
-
tick
- Overrides:
tick
in classBehavior<E extends Mob & CrossbowAttackMob>
-
stop
- Overrides:
stop
in classBehavior<E extends Mob & CrossbowAttackMob>
-
crossbowAttack
-
lookAtTarget
-
getAttackTarget
-