fix lots of levels

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:49:22 -04:00
parent d20403a6d0
commit 1cfcb9f28e
43 changed files with 301 additions and 248 deletions

View File

@@ -18,7 +18,7 @@ index 9ec6145fe04ec64bbee8ec6a837719caebdbc6f5..358d610ad020cada1bb83e393deeeaae
public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) {
this.gameTime = time;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6e5bfabe11da547f28b1d56e5a279ae5d9bb3c54..1b24b67437b1a677bbd6ea30b32c703fd7eda2a2 100644
index 6e5bfabe11da547f28b1d56e5a279ae5d9bb3c54..12a5a8c06dc636fbd5008b8f71d05cfae00a52c2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1519,7 +1519,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -26,7 +26,7 @@ index 6e5bfabe11da547f28b1d56e5a279ae5d9bb3c54..1b24b67437b1a677bbd6ea30b32c703f
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) || (!world.isForceTime() && (tickCount + entityhuman.getId()) % 20 != 0)) { // Purpur
+ if (!(entityhuman instanceof ServerPlayer) || (!level.isForceTime() && (tickCount + entityhuman.getId()) % 20 != 0)) { // Purpur
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -88,7 +88,7 @@ index 854e6e73a7fa9c2cd4f0b9beadbff6427c8346e5..3b512beac50bc5a2405ca3287b08e7ff
public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) {
Iterator iterator = this.customSpawners.iterator();
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 1e92e006241e6e8d189081232d2430cfd590586d..88567bc4f504b00bec3841da194a0bd17abf9ce7 100644
index 471ccc46f2e33c68e91553d6cee76be323d20aee..af8aa98460e0fe8d9265087ebc3b6627cefde08e 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -124,6 +124,13 @@ public class PurpurWorldConfig {