mappings
This commit is contained in:
1 parent
583e023eb1
commit
1fcd8ceffa
11 files changed
+24
-25
No files matched your search
@@ -26,12 +26,8 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow private long timeReference;
|
||||
|
||||
@Shadow private long field_4557;
|
||||
|
||||
@Shadow @Final private static Logger LOGGER;
|
||||
|
||||
//@Shadow private boolean profilerStartQueued;
|
||||
|
||||
@Shadow @Final private Profiler profiler;
|
||||
|
||||
public MinecraftServer_tickspeedMixin(String name)
|
||||
@@ -43,8 +39,6 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow protected abstract boolean shouldKeepTicking();
|
||||
|
||||
@Shadow private boolean field_19249;
|
||||
|
||||
@Shadow private long field_19248;
|
||||
|
||||
@Shadow protected abstract void method_16208();
|
||||
@@ -53,6 +47,10 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow protected abstract void startMonitor(TickDurationMonitor monitor);
|
||||
|
||||
@Shadow private long lastTimeReference;
|
||||
|
||||
@Shadow private boolean waitingForNextTick;
|
||||
|
||||
CarpetProfiler.ProfilerToken currentSection;
|
||||
|
||||
private float carpetMsptAccum = 0.0f;
|
||||
@@ -88,7 +86,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
if (TickSpeed.time_warp_start_time != 0 && TickSpeed.continueWarp())
|
||||
{
|
||||
//making sure server won't flop after the warp or if the warp is interrupted
|
||||
this.timeReference = this.field_4557 = Util.getMeasuringTimeMs();
|
||||
this.timeReference = this.lastTimeReference = Util.getMeasuringTimeMs();
|
||||
carpetMsptAccum = TickSpeed.mspt;
|
||||
}
|
||||
else
|
||||
@@ -106,12 +104,12 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
}
|
||||
//end tick deciding
|
||||
//smoothed out delay to include mcpt component. With 50L gives defaults.
|
||||
if (long_1 > /*2000L*/1000L+20*TickSpeed.mspt && this.timeReference - this.field_4557 >= /*15000L*/10000L+100*TickSpeed.mspt)
|
||||
if (long_1 > /*2000L*/1000L+20*TickSpeed.mspt && this.timeReference - this.lastTimeReference >= /*15000L*/10000L+100*TickSpeed.mspt)
|
||||
{
|
||||
long long_2 = (long)(long_1 / TickSpeed.mspt);//50L;
|
||||
LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", long_1, long_2);
|
||||
this.timeReference += (long)(long_2 * TickSpeed.mspt);//50L;
|
||||
this.field_4557 = this.timeReference;
|
||||
this.lastTimeReference = this.timeReference;
|
||||
}
|
||||
|
||||
this.timeReference += msThisTick;//50L;
|
||||
@@ -121,7 +119,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
this.profiler.push("tick");
|
||||
this.tick(TickSpeed.time_warp_start_time != 0 ? ()->true : this::shouldKeepTicking);
|
||||
this.profiler.swap("nextTickWait");
|
||||
this.field_19249 = true;
|
||||
this.waitingForNextTick = true;
|
||||
this.field_19248 = Math.max(Util.getMeasuringTimeMs() + /*50L*/ msThisTick, this.timeReference);
|
||||
if (TickSpeed.time_warp_start_time != 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user