Fixed math

This commit is contained in:
themode 2020-12-31 12:07:16 +01:00
parent fd920ffdfe
commit 2141792fcf

View File

@ -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;
});
}