From d7b7ab9a67249b0cd505a89f311da3d1d18151ef Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 2 Sep 2024 18:44:52 +0700 Subject: [PATCH] broadcastChanges was called on client (even in vanilla code) all this time and found out only now :) --- .../ru/dbotthepony/mc/otm/menu/MatteryMenu.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt index 28d5e053a..5a6f8f484 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt @@ -353,14 +353,20 @@ abstract class MatteryMenu( } override fun broadcastChanges() { - super.broadcastChanges() - matteryBroadcast() + // how did mojang missed this + if (player is ServerPlayer) { + super.broadcastChanges() + matteryBroadcast() + } } override fun broadcastFullState() { - synchronizerRemote.invalidate() - super.broadcastFullState() - matteryBroadcast() + // how did mojang missed this + if (player is ServerPlayer) { + synchronizerRemote.invalidate() + super.broadcastFullState() + matteryBroadcast() + } } override fun stillValid(player: Player): Boolean {