public void setCanAttack(final boolean canAttack) {
23
this.canAttack = canAttack;
24
}
25
26
@Override
27
public boolean canUse() {
28
return this.canAttack && super.canUse();
29
}
30
}
31
Decompiled Minecraft 26.3 source of NearestAttackableWitchTargetGoal (net/minecraft/world/entity/ai/goal/target/NearestAttackableWitchTargetGoal.java) with Mojang official mappings, stored verbatim on the site.