Skip to content

Commit cdffd02

Browse files
committed
more type restriction
1 parent aeb10b4 commit cdffd02

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

patches/net/minecraft/server/MinecraftServer.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
+ if (i > 2000L && this.serverTime - this.timeOfLastWarning >= 15000L) {
8383
+ long j = (long)(i / TickSpeed.mspt);//50L;
8484
+ LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
85-
+ this.serverTime += j * TickSpeed.mspt;//50L;
85+
+ this.serverTime += (long)(j * TickSpeed.mspt);//50L;
8686
+ this.timeOfLastWarning = this.serverTime;
8787
+ }
8888

@@ -95,7 +95,7 @@
9595
+ // only corrected if it falls behind more than 2000 and manages to catch the warning
9696
+ // which releases accrued time it falls behind, not 1 tick, but MULTIPLE ticks
9797
+ this.actualServerTime = Util.milliTime();
98-
+ this.serverTime += TickSpeed.mspt;//50L;
98+
+ this.serverTime += (long)TickSpeed.mspt;//50L;
9999

100100
- this.serverIsRunning = true;
101101
+ while (this.isAheadOfTime()) {

src/main/java/carpet/helpers/TickSpeed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static void add_ticks_to_run_in_pause(int ticks)
5858
public static void tickrate(float rate, boolean update)
5959
{
6060
tickrate = rate;
61-
long mspt = (long)(1000.0 / tickrate);
61+
long mspt = (long)(1000.0f / tickrate);
6262
if (mspt <= 0L)
6363
{
6464
mspt = 1L;

0 commit comments

Comments
 (0)