mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 13:01:32 +01:00
format code
This commit is contained in:
parent
4fc5b4f6c9
commit
73d54e812e
@ -416,15 +416,13 @@ public abstract class Instance implements BlockGetter, BlockSetter, Tickable, Ta
|
|||||||
* @return the {@link TimeUpdatePacket} with this instance data
|
* @return the {@link TimeUpdatePacket} with this instance data
|
||||||
*/
|
*/
|
||||||
private @NotNull TimeUpdatePacket createTimePacket() {
|
private @NotNull TimeUpdatePacket createTimePacket() {
|
||||||
long timeOfDay;
|
long time = this.time;
|
||||||
if (timeRate == 0) {
|
if (timeRate == 0) {
|
||||||
//Negative values make the sun and moon stop moving
|
//Negative values stop the sun and moon from moving
|
||||||
//0 as a long cannot be negative
|
//0 as a long cannot be negative
|
||||||
timeOfDay = time == 0 ? -24000L : -Math.abs(time);
|
time = time == 0 ? -24000L : -Math.abs(time);
|
||||||
} else {
|
|
||||||
timeOfDay = time;
|
|
||||||
}
|
}
|
||||||
return new TimeUpdatePacket(worldAge, timeOfDay);
|
return new TimeUpdatePacket(worldAge, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user