File tree Expand file tree Collapse file tree
shreddedpaper-server/minecraft-patches/sources/net/minecraft/server/level Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ --- a/net/minecraft/server/level/TicketType.java
2+ +++ b/net/minecraft/server/level/TicketType.java
3+ @@ -4,6 +_,8 @@
4+ import java.lang.annotation.Retention;
5+ import java.lang.annotation.RetentionPolicy;
6+ import java.lang.annotation.Target;
7+ +
8+ + import io.multipaper.shreddedpaper.config.ShreddedPaperConfiguration;
9+ import net.minecraft.core.Registry;
10+ import net.minecraft.core.registries.BuiltInRegistries;
11+
12+ @@ -98,7 +_,7 @@
13+ private final int flags;
14+
15+ public TicketType(long timeout, int flags) {
16+ - this.timeout = timeout;
17+ + this.timeout = timeout == 0 ? 0 : Math.max(ShreddedPaperConfiguration.get().optimizations.purgeStaleTicketsFrequency + 1L, timeout); // ShreddedPaper - purgeStaleTicketsFrequency - ensure tickets live for at least 1 tick
18+ this.flags = flags;
19+ } // long timeout, int flags
20+
You can’t perform that action at this time.
0 commit comments