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,RabbitEntity.RabbitAttackGoal,RavagerEntity.AttackGoal,SpiderEntity.AttackGoal,VindicatorEntity.AttackGoal,ZombieAttackGoal
- Mappings:
Namespace Name official bndintermediary 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, double squaredDistance) booleancanStart()protected intprotected intprotected doubleprotected 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 lLbnd;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 aLbnd;a:Lbgg;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 bLbnd;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 cLbnd;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 dLbnd;d:Ldxq;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 eLbnd;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 fLbnd;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 gLbnd;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 hLbnd;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 iLbnd;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 jLbnd;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 kLbnd;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>Lbnd;<init>(Lbgg;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 bLbmt;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 J_Lbmt;J_()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 aLbnd;a(Lbfx;D)Vintermediary method_6288Lnet/minecraft/class_1366;method_6288(Lnet/minecraft/class_1309;D)Vnamed attackLnet/minecraft/entity/ai/goal/MeleeAttackGoal;attack(Lnet/minecraft/entity/LivingEntity;D)V
-
resetCooldown
protected void resetCooldown()- Mappings:
Namespace Name Mixin selector official hLbnd;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 iLbnd;i()Zintermediary method_28347Lnet/minecraft/class_1366;method_28347()Znamed isCooledDownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;isCooledDown()Z
-
getCooldown
protected int getCooldown()- Mappings:
Namespace Name Mixin selector official kLbnd;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 lLbnd;l()Iintermediary method_28349Lnet/minecraft/class_1366;method_28349()Inamed getMaxCooldownLnet/minecraft/entity/ai/goal/MeleeAttackGoal;getMaxCooldown()I
-
getSquaredMaxAttackDistance
- Mappings:
Namespace Name Mixin selector official aLbnd;a(Lbfx;)Dintermediary method_6289Lnet/minecraft/class_1366;method_6289(Lnet/minecraft/class_1309;)Dnamed getSquaredMaxAttackDistanceLnet/minecraft/entity/ai/goal/MeleeAttackGoal;getSquaredMaxAttackDistance(Lnet/minecraft/entity/LivingEntity;)D
-