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 bizintermediary 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 lLbiz;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 aLbiz;a:Lbcl;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 bLbiz;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 cLbiz;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 dLbiz;d:Ldql;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 eLbiz;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 fLbiz;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 gLbiz;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 hLbiz;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 iLbiz;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 jLbiz;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 kLbiz;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>Lbiz;<init>(Lbcl;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 bLbip;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 E_Lbip;E_()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 aLbiz;a(Lbcc;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 hLbiz;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 iLbiz;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 kLbiz;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 lLbiz;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 aLbiz;a(Lbcc;)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
-