Merge pull request #383 from MrGazdag/patch-8

Set time to negative when timeRate is 0
This commit is contained in:
TheMode 2021-07-28 09:31:39 +02:00 committed by GitHub
commit ec6bcf2d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,7 +405,7 @@ public abstract class Instance implements BlockGetter, BlockSetter, Tickable, Ta
* @return the {@link TimeUpdatePacket} with this instance data
*/
private @NotNull TimeUpdatePacket createTimePacket() {
return new TimeUpdatePacket(worldAge, time);
return new TimeUpdatePacket(worldAge, timeRate == 0 ? -Math.abs(time) : time);
}
/**
@ -791,4 +791,4 @@ public abstract class Instance implements BlockGetter, BlockSetter, Tickable, Ta
public @NotNull Pointers pointers() {
return this.pointers;
}
}
}