Fix-Banner Patch: Display correct time in F3

This commit is contained in:
Gabscap 2016-07-17 18:25:24 +02:00
parent 949044df1a
commit a589eedb2a

View File

@ -15,9 +15,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // World Age in ticks + // World Age in ticks
+ // Not changed by server commands + // Not changed by server commands
+ // World Age must not be negative
private long a; private long a;
+ // Time of Day in ticks + // Time of Day in ticks
+ // If negative the sun will stop moving at the Math.abs of the time + // If negative the sun will stop moving at the Math.abs of the time
+ // Displayed in the debug screen (F3)
private long b; private long b;
public PacketPlayOutUpdateTime() {} public PacketPlayOutUpdateTime() {}
@ -26,8 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
+ // Paper start + // Paper start
+ this.a = this.a % 192000; // World age must not be negative + this.a = this.a % 192000;
+ this.b = this.b % 192000 - (this.b < 0 ? 192000 : 0); // Keep sign
+ // Paper end + // Paper end
} }