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 byaintermediary net/minecraft/class_1366named 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
FieldsModifier and TypeFieldDescriptionprivate final intprivate intprivate longprivate static final longprotected final PathAwareEntityprivate Pathprivate final booleanprivate final doubleprivate doubleprivate doubleprivate doubleprivate int -
Constructor Summary
ConstructorsConstructorDescriptionMeleeAttackGoal(PathAwareEntity mob, double speed, boolean pauseWhenMobIdle) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattack(LivingEntity target) protected booleancanAttack(LivingEntity target) booleancanStart()protected intprotected intprotected booleanprotected voidbooleanbooleanReturns if the goal should run every tick or not.voidstart()voidstop()voidtick()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 lLbya;l:Jintermediary field_30218Lnet/minecraft/class_1366;field_30218:Jnamed MAX_ATTACK_TIMELnet/minecraft/entity/ai/goal/MeleeAttackGoal;MAX_ATTACK_TIME:J
-
mob
- Mappings:
Namespace Name Mixin selector official aLbya;a:Lbrb;intermediary field_6503Lnet/minecraft/class_1366;field_6503:Lnet/minecraft/class_1314;named mobLnet/minecraft/entity/ai/goal/MeleeAttackGoal;mob:Lnet/minecraft/entity/mob/PathAwareEntity;
-
speed
private final double speed- Mappings:
Namespace Name Mixin selector official bLbya;b:Dintermediary field_6500Lnet/minecraft/class_1366;field_6500:Dnamed speedLnet/minecraft/entity/ai/goal/MeleeAttackGoal;speed:D
-
pauseWhenMobIdle
private final boolean pauseWhenMobIdle- Mappings:
Namespace Name Mixin selector official cLbya;c:Zintermediary field_6502Lnet/minecraft/class_1366;field_6502:Znamed pauseWhenMobIdleLnet/minecraft/entity/ai/goal/MeleeAttackGoal;pauseWhenMobIdle:Z
-
path
- Mappings:
Namespace Name Mixin selector official dLbya;d:Lelp;intermediary field_6509Lnet/minecraft/class_1366;field_6509:Lnet/minecraft/class_11;named pathLnet/minecraft/entity/ai/goal/MeleeAttackGoal;path:Lnet/minecraft/entity/ai/pathing/Path;
-
targetX
private double targetX- Mappings:
Namespace Name Mixin selector official eLbya;e:Dintermediary field_6508Lnet/minecraft/class_1366;field_6508:Dnamed targetXLnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetX:D
-
targetY
private double targetY- Mappings:
Namespace Name Mixin selector official fLbya;f:Dintermediary field_6507Lnet/minecraft/class_1366;field_6507:Dnamed targetYLnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetY:D
-
targetZ
private double targetZ- Mappings:
Namespace Name Mixin selector official gLbya;g:Dintermediary field_6506Lnet/minecraft/class_1366;field_6506:Dnamed targetZLnet/minecraft/entity/ai/goal/MeleeAttackGoal;targetZ:D
-
updateCountdownTicks
private int updateCountdownTicks- Mappings:
Namespace Name Mixin selector official hLbya;h:Iintermediary field_6501Lnet/minecraft/class_1366;field_6501:Inamed updateCountdownTicksLnet/minecraft/entity/ai/goal/MeleeAttackGoal;updateCountdownTicks:I
-
cooldown
private int cooldown- Mappings:
Namespace Name Mixin selector official iLbya;i:Iintermediary field_24667Lnet/minecraft/class_1366;field_24667:Inamed cooldownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;cooldown:I
-
attackIntervalTicks
private final int attackIntervalTicks- See Also:
- Mappings:
Namespace Name Mixin selector official jLbya;j:Iintermediary field_6504Lnet/minecraft/class_1366;field_6504:Inamed attackIntervalTicksLnet/minecraft/entity/ai/goal/MeleeAttackGoal;attackIntervalTicks:I
-
lastUpdateTime
private long lastUpdateTime- Mappings:
Namespace Name Mixin selector official kLbya;k:Jintermediary field_19200Lnet/minecraft/class_1366;field_19200:Jnamed lastUpdateTimeLnet/minecraft/entity/ai/goal/MeleeAttackGoal;lastUpdateTime:J
-
-
Constructor Details
-
MeleeAttackGoal
- Mappings:
Namespace Name Mixin selector official <init>Lbya;<init>(Lbrb;DZ)Vintermediary <init>Lnet/minecraft/class_1366;<init>(Lnet/minecraft/class_1314;DZ)Vnamed <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:
shouldContinuein classGoal- Mappings:
Namespace Name Mixin selector official bLbxq;b()Zintermediary method_6266Lnet/minecraft/class_1352;method_6266()Znamed shouldContinueLnet/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
falseby default. If this returns false, the goal will tick once after the entity is spawned, and will tick every other tick.- Overrides:
shouldRunEveryTickin classGoal- Returns:
- if the goal should run every tick or not
- See Also:
- Mappings:
Namespace Name Mixin selector official R_Lbxq;R_()Zintermediary method_38846Lnet/minecraft/class_1352;method_38846()Znamed shouldRunEveryTickLnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
-
tick
public void tick() -
attack
- Mappings:
Namespace Name Mixin selector official aLbya;a(Lbqt;)Vintermediary method_6288Lnet/minecraft/class_1366;method_6288(Lnet/minecraft/class_1309;)Vnamed attackLnet/minecraft/entity/ai/goal/MeleeAttackGoal;attack(Lnet/minecraft/entity/LivingEntity;)V
-
resetCooldown
protected void resetCooldown()- Mappings:
Namespace Name Mixin selector official hLbya;h()Vintermediary method_28346Lnet/minecraft/class_1366;method_28346()Vnamed resetCooldownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;resetCooldown()V
-
isCooledDown
protected boolean isCooledDown()- Mappings:
Namespace Name Mixin selector official iLbya;i()Zintermediary method_28347Lnet/minecraft/class_1366;method_28347()Znamed isCooledDownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;isCooledDown()Z
-
canAttack
- Mappings:
Namespace Name Mixin selector official bLbya;b(Lbqt;)Zintermediary method_53715Lnet/minecraft/class_1366;method_53715(Lnet/minecraft/class_1309;)Znamed canAttackLnet/minecraft/entity/ai/goal/MeleeAttackGoal;canAttack(Lnet/minecraft/entity/LivingEntity;)Z
-
getCooldown
protected int getCooldown()- Mappings:
Namespace Name Mixin selector official kLbya;k()Iintermediary method_28348Lnet/minecraft/class_1366;method_28348()Inamed getCooldownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;getCooldown()I
-
getMaxCooldown
protected int getMaxCooldown()- Mappings:
Namespace Name Mixin selector official lLbya;l()Iintermediary method_28349Lnet/minecraft/class_1366;method_28349()Inamed getMaxCooldownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;getMaxCooldown()I
-