diff --git a/src/main/java/exopandora/worldhandler/builder/component/impl/EffectNBT.java b/src/main/java/exopandora/worldhandler/builder/component/impl/EffectNBT.java index dc5bfb9..3d17143 100644 --- a/src/main/java/exopandora/worldhandler/builder/component/impl/EffectNBT.java +++ b/src/main/java/exopandora/worldhandler/builder/component/impl/EffectNBT.java @@ -104,9 +104,10 @@ public class EffectNBT implements INBTWritable public CompoundNBT serialize() { CompoundNBT compound = new CompoundNBT(); + int ticks = this.toTicks(); compound.putByte("Amplifier", (byte) (this.amplifier - 1)); - compound.putInt("Duration", Math.min(this.toTicks(), 1000000)); + compound.putInt("Duration", ticks > 0 ? ticks : 1000000); compound.putBoolean("Ambient", this.ambient); compound.putBoolean("ShowParticles", this.showParticles);