mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 11:38:03 +01:00
Fixed math
This commit is contained in:
parent
fd920ffdfe
commit
2141792fcf
@ -406,7 +406,8 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
|
||||
{
|
||||
this.effects.removeIf(timedPotion -> {
|
||||
final long potionTime = (long) timedPotion.getPotion().getDuration() * MinecraftServer.TICK_MS;
|
||||
return timedPotion.getStartingTime() + potionTime <= time;
|
||||
// Remove if the potion should be expired
|
||||
return timedPotion.getStartingTime() + potionTime >= time;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user