mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 09:27:58 +01:00
Prevent implicit cast from int to double
This commit is contained in:
parent
e4f7a66046
commit
ebbfe7868b
@ -20,27 +20,27 @@ public class MeleeAttackGoal extends GoalSelector {
|
|||||||
private final Cooldown cooldown = new Cooldown(new UpdateOption(5, TimeUnit.TICK));
|
private final Cooldown cooldown = new Cooldown(new UpdateOption(5, TimeUnit.TICK));
|
||||||
|
|
||||||
private long lastHit;
|
private long lastHit;
|
||||||
|
private final double range;
|
||||||
private final int delay;
|
private final int delay;
|
||||||
private final TimeUnit timeUnit;
|
private final TimeUnit timeUnit;
|
||||||
private final int range;
|
|
||||||
|
|
||||||
private boolean stop;
|
private boolean stop;
|
||||||
private Entity cachedTarget;
|
private Entity cachedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param entityCreature the entity to add the goal to
|
* @param entityCreature the entity to add the goal to
|
||||||
* @param delay the delay between each attacks
|
|
||||||
* @param range the allowed range the entity can attack others.
|
* @param range the allowed range the entity can attack others.
|
||||||
|
* @param delay the delay between each attacks
|
||||||
* @param timeUnit the unit of the delay
|
* @param timeUnit the unit of the delay
|
||||||
*/
|
*/
|
||||||
public MeleeAttackGoal(@NotNull EntityCreature entityCreature, int delay, int range, @NotNull TimeUnit timeUnit) {
|
public MeleeAttackGoal(@NotNull EntityCreature entityCreature, double range, int delay, @NotNull TimeUnit timeUnit) {
|
||||||
super(entityCreature);
|
super(entityCreature);
|
||||||
this.delay = delay;
|
|
||||||
this.range = range;
|
this.range = range;
|
||||||
|
this.delay = delay;
|
||||||
this.timeUnit = timeUnit;
|
this.timeUnit = timeUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cooldown getCooldown() {
|
public @NotNull Cooldown getCooldown() {
|
||||||
return this.cooldown;
|
return this.cooldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user