From e6189407fc97e9047adfccf669e6f2936927669c Mon Sep 17 00:00:00 2001 From: Steveplays28 Date: Sat, 26 Aug 2023 14:51:25 +0200 Subject: [PATCH] fix: Fix scheduled events processing Fixes datapack compatibility. --- .../steveplays28/realisticsleep/mixin/ServerWorldMixin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/github/steveplays28/realisticsleep/mixin/ServerWorldMixin.java b/src/main/java/com/github/steveplays28/realisticsleep/mixin/ServerWorldMixin.java index 67c5d38..781e3c9 100644 --- a/src/main/java/com/github/steveplays28/realisticsleep/mixin/ServerWorldMixin.java +++ b/src/main/java/com/github/steveplays28/realisticsleep/mixin/ServerWorldMixin.java @@ -171,6 +171,8 @@ private void sendSleepingStatus() { @Inject(method = "tickTime", at = @At(value = "HEAD"), cancellable = true) public void tickTimeInject(CallbackInfo ci) { + this.worldProperties.getScheduledEvents().processEvents(this.server, this.properties.getTime()); + if (!this.shouldTickTime) { ci.cancel(); return;