mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-07 16:01:55 +01:00
Prevent potion effect filter when the list is empty
This commit is contained in:
parent
a6314abbad
commit
7d4e04bc66
@ -678,7 +678,7 @@ public class Entity implements Viewable, Tickable, EventHandler, DataContainer,
|
|||||||
callEvent(EntityTickEvent.class, tickEvent); // reuse tickEvent to avoid recreating it each tick
|
callEvent(EntityTickEvent.class, tickEvent); // reuse tickEvent to avoid recreating it each tick
|
||||||
|
|
||||||
// remove expired effects
|
// remove expired effects
|
||||||
{
|
if (!effects.isEmpty()) {
|
||||||
this.effects.removeIf(timedPotion -> {
|
this.effects.removeIf(timedPotion -> {
|
||||||
final long potionTime = (long) timedPotion.getPotion().getDuration() * MinecraftServer.TICK_MS;
|
final long potionTime = (long) timedPotion.getPotion().getDuration() * MinecraftServer.TICK_MS;
|
||||||
// Remove if the potion should be expired
|
// Remove if the potion should be expired
|
||||||
|
Loading…
Reference in New Issue
Block a user