Skip to content

Commit

Permalink
Fix custom time sync not setting client-side time ticking correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD committed Oct 18, 2024
1 parent 71955d3 commit 1a9a443
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ public static void handle(AdvancedContainerSetDataPayload msg, IPayloadContext c
public static void handle(final ClientboundCustomSetTimePayload payload, final IPayloadContext context) {
@SuppressWarnings("resource")
final ClientLevel level = Minecraft.getInstance().level;
level.getLevelData().setGameTime(payload.gameTime());
level.getLevelData().setDayTime(payload.dayTime());
// TODO porting: check whether the custom time system relies on this
//level.getGameRules().getRule(GameRules.RULE_DAYLIGHT).set(payload.gameRule(), null);
level.setTimeFromServer(payload.gameTime(), payload.dayTime(), payload.gameRule());
level.setDayTimeFraction(payload.dayTimeFraction());
level.setDayTimePerTick(payload.dayTimePerTick());
}
Expand Down

0 comments on commit 1a9a443

Please sign in to comment.