Package net.minecraft.entity.ai.goal
Class MeleeAttackGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MeleeAttackGoal
- Direct Known Subclasses:
BeeEntity.StingGoal
,FoxEntity.AttackGoal
,PandaEntity.AttackGoal
,PolarBearEntity.AttackGoal
,SpiderEntity.AttackGoal
,ZombieAttackGoal
- Mappings:
Namespace Name official bql
intermediary net/minecraft/class_1366
named net/minecraft/entity/ai/goal/MeleeAttackGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private int
private long
private static final long
protected final PathAwareEntity
private Path
private final boolean
private final double
private double
private double
private double
private int
-
Constructor Summary
ConstructorDescriptionMeleeAttackGoal
(PathAwareEntity mob, double speed, boolean pauseWhenMobIdle) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
attack
(LivingEntity target) protected boolean
canAttack
(LivingEntity target) boolean
canStart()
protected int
protected int
protected boolean
protected void
boolean
boolean
Returns if the goal should run every tick or not.void
start()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, getTickCount, setControls, toGoalTicks, toString
-
Field Details
-
MAX_ATTACK_TIME
private static final long MAX_ATTACK_TIME- See Also:
- Mappings:
Namespace Name Mixin selector official l
Lbql;l:J
intermediary field_30218
Lnet/minecraft/class_1366;field_30218:J
named MAX_ATTACK_TIME
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;MAX_ATTACK_TIME:J
-
mob
- Mappings:
Namespace Name Mixin selector official a
Lbql;a:Lbjp;
intermediary field_6503
Lnet/minecraft/class_1366;field_6503:Lnet/minecraft/class_1314;
named mob
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;mob:Lnet/minecraft/entity/mob/PathAwareEntity;
-
speed
private final double speed- Mappings:
Namespace Name Mixin selector official b
Lbql;b:D
intermediary field_6500
Lnet/minecraft/class_1366;field_6500:D
named speed
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;speed:D
-
pauseWhenMobIdle
private final boolean pauseWhenMobIdle- Mappings:
Namespace Name Mixin selector official c
Lbql;c:Z
intermediary field_6502
Lnet/minecraft/class_1366;field_6502:Z
named pauseWhenMobIdle
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;pauseWhenMobIdle:Z
-
path
- Mappings:
Namespace Name Mixin selector official d
Lbql;d:Lebb;
intermediary field_6509
Lnet/minecraft/class_1366;field_6509:Lnet/minecraft/class_11;
named path
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;path:Lnet/minecraft/entity/ai/pathing/Path;
-
targetX
private double targetX- Mappings:
Namespace Name Mixin selector official e
Lbql;e:D
intermediary field_6508
Lnet/minecraft/class_1366;field_6508:D
named targetX
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetX:D
-
targetY
private double targetY- Mappings:
Namespace Name Mixin selector official f
Lbql;f:D
intermediary field_6507
Lnet/minecraft/class_1366;field_6507:D
named targetY
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetY:D
-
targetZ
private double targetZ- Mappings:
Namespace Name Mixin selector official g
Lbql;g:D
intermediary field_6506
Lnet/minecraft/class_1366;field_6506:D
named targetZ
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetZ:D
-
updateCountdownTicks
private int updateCountdownTicks- Mappings:
Namespace Name Mixin selector official h
Lbql;h:I
intermediary field_6501
Lnet/minecraft/class_1366;field_6501:I
named updateCountdownTicks
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;updateCountdownTicks:I
-
cooldown
private int cooldown- Mappings:
Namespace Name Mixin selector official i
Lbql;i:I
intermediary field_24667
Lnet/minecraft/class_1366;field_24667:I
named cooldown
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;cooldown:I
-
attackIntervalTicks
private final int attackIntervalTicks- See Also:
- Mappings:
Namespace Name Mixin selector official j
Lbql;j:I
intermediary field_6504
Lnet/minecraft/class_1366;field_6504:I
named attackIntervalTicks
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;attackIntervalTicks:I
-
lastUpdateTime
private long lastUpdateTime- Mappings:
Namespace Name Mixin selector official k
Lbql;k:J
intermediary field_19200
Lnet/minecraft/class_1366;field_19200:J
named lastUpdateTime
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;lastUpdateTime:J
-
-
Constructor Details
-
MeleeAttackGoal
- Mappings:
Namespace Name Mixin selector official <init>
Lbql;<init>(Lbjp;DZ)V
intermediary <init>
Lnet/minecraft/class_1366;<init>(Lnet/minecraft/class_1314;DZ)V
named <init>
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DZ)V
-
-
Method Details
-
canStart
public boolean canStart() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
- Mappings:
Namespace Name Mixin selector official b
Lbqb;b()Z
intermediary method_6266
Lnet/minecraft/class_1352;method_6266()Z
named shouldContinue
Lnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
-
start
public void start() -
stop
public void stop() -
shouldRunEveryTick
public boolean shouldRunEveryTick()Returns if the goal should run every tick or not.This returns
false
by default. If this returns false, the goal will tick once after the entity is spawned, and will tick every other tick.- Overrides:
shouldRunEveryTick
in classGoal
- Returns:
- if the goal should run every tick or not
- See Also:
- Mappings:
Namespace Name Mixin selector official Q_
Lbqb;Q_()Z
intermediary method_38846
Lnet/minecraft/class_1352;method_38846()Z
named shouldRunEveryTick
Lnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
-
tick
public void tick() -
attack
- Mappings:
Namespace Name Mixin selector official a
Lbql;a(Lbjg;)V
intermediary method_6288
Lnet/minecraft/class_1366;method_6288(Lnet/minecraft/class_1309;)V
named attack
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;attack(Lnet/minecraft/entity/LivingEntity;)V
-
resetCooldown
protected void resetCooldown()- Mappings:
Namespace Name Mixin selector official h
Lbql;h()V
intermediary method_28346
Lnet/minecraft/class_1366;method_28346()V
named resetCooldown
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;resetCooldown()V
-
isCooledDown
protected boolean isCooledDown()- Mappings:
Namespace Name Mixin selector official i
Lbql;i()Z
intermediary method_28347
Lnet/minecraft/class_1366;method_28347()Z
named isCooledDown
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;isCooledDown()Z
-
canAttack
- Mappings:
Namespace Name Mixin selector official b
Lbql;b(Lbjg;)Z
intermediary method_53715
Lnet/minecraft/class_1366;method_53715(Lnet/minecraft/class_1309;)Z
named canAttack
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;canAttack(Lnet/minecraft/entity/LivingEntity;)Z
-
getCooldown
protected int getCooldown()- Mappings:
Namespace Name Mixin selector official k
Lbql;k()I
intermediary method_28348
Lnet/minecraft/class_1366;method_28348()I
named getCooldown
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;getCooldown()I
-
getMaxCooldown
protected int getMaxCooldown()- Mappings:
Namespace Name Mixin selector official l
Lbql;l()I
intermediary method_28349
Lnet/minecraft/class_1366;method_28349()I
named getMaxCooldown
Lnet/minecraft/entity/ai/goal/MeleeAttackGoal;getMaxCooldown()I
-