From f18ed6128b2aa94b3f20734a2528f4ea2f928ae7 Mon Sep 17 00:00:00 2001 From: senseiwells Date: Mon, 5 Feb 2024 02:58:01 +0000 Subject: [PATCH] Fix stupid boolean logic --- build.gradle.kts | 6 ++++++ .../me/senseiwells/replay/mixin/chunk/ChunkHolderMixin.java | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8150cf4..14d3ecc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -58,6 +58,12 @@ dependencies { loom { accessWidenerPath.set(file("src/main/resources/serverreplay.accesswidener")) + + runs { + getByName("server") { + runDir = "run/${project.property("minecraft_version")}" + } + } } tasks.remapJar { diff --git a/src/main/java/me/senseiwells/replay/mixin/chunk/ChunkHolderMixin.java b/src/main/java/me/senseiwells/replay/mixin/chunk/ChunkHolderMixin.java index 60d4917..5377f22 100644 --- a/src/main/java/me/senseiwells/replay/mixin/chunk/ChunkHolderMixin.java +++ b/src/main/java/me/senseiwells/replay/mixin/chunk/ChunkHolderMixin.java @@ -40,7 +40,10 @@ private void onBroadcast(List players, Packet packet, CallbackI ) ) private boolean shouldSkipBroadcasting(boolean noPlayers) { - return noPlayers && !this.replay$recorders.isEmpty(); + if (!this.replay$recorders.isEmpty()) { + return false; + } + return noPlayers; } @Override