Configurable daylight cycle

This commit is contained in:
William Blake Galbreath
2025-01-09 19:32:36 -08:00
committed by granny
parent 13ce5ce283
commit 2baf951200
5 changed files with 73 additions and 97 deletions

View File

@@ -61,6 +61,15 @@
this.startMeasuringTaskExecutionTime();
this.waitUntilNextTick();
this.finishMeasuringTaskExecutionTime();
@@ -1690,7 +_,7 @@
long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) {
- if (!(entityhuman instanceof ServerPlayer) || (tickCount + entityhuman.getId()) % 20 != 0) {
+ if (!(entityhuman instanceof ServerPlayer) || (!level.isForceTime() && (tickCount + entityhuman.getId()) % 20 != 0)) { // Purpur - Configurable daylight cycle
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1854,7 +_,7 @@
@DontObfuscate