File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/com/klikli_dev/occultism/common/entity/familiar Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 30
30
import com .klikli_dev .occultism .util .FamiliarUtil ;
31
31
import net .minecraft .core .BlockPos ;
32
32
import net .minecraft .core .particles .DustParticleOptions ;
33
- import net .minecraft .nbt .CompoundTag ;
34
33
import net .minecraft .sounds .SoundEvents ;
35
34
import net .minecraft .sounds .SoundSource ;
36
35
import net .minecraft .util .Mth ;
@@ -266,7 +265,7 @@ public void shootRay(List<Integer> targetIds) {
266
265
267
266
private static class RayGoal extends Goal {
268
267
269
- private static final int MAX_COOLDOWN = 20 * 1 ;
268
+ private static final int MAX_COOLDOWN = 20 ;
270
269
271
270
protected final BeholderFamiliarEntity entity ;
272
271
private int cooldown = MAX_COOLDOWN ;
@@ -323,8 +322,13 @@ protected void attack() {
323
322
if (this .entity .hasEffect (MobEffects .DAMAGE_BOOST ))
324
323
damage *= this .entity .getEffect (MobEffects .DAMAGE_BOOST ).getAmplifier () + 2 ;
325
324
326
- if (e != null && owner instanceof Player player ) {
325
+ if (e == null )
326
+ continue ;
327
+
328
+ if (owner instanceof Player player ) {
327
329
e .hurt (this .entity .damageSources ().playerAttack (player ), damage );
330
+ } else {
331
+ e .hurt (this .entity .damageSources ().mobAttack (this .entity ), damage );
328
332
}
329
333
}
330
334
}
You can’t perform that action at this time.
0 commit comments