From abe82d456c154c5872f7702ff1560f0a118eb7f1 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 10 Aug 2023 17:30:21 +0700 Subject: [PATCH] Fix computed int not returning proper value clientside --- .../mc/otm/network/synchronizer/FieldSynchronizer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/synchronizer/FieldSynchronizer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/synchronizer/FieldSynchronizer.kt index 523b28c8b..dc52d38c9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/synchronizer/FieldSynchronizer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/synchronizer/FieldSynchronizer.kt @@ -1309,6 +1309,8 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa private var isRemoteSet = false protected var clientValue: Int = 0 set(value) { + isClientValue = true + if (field != value) { field = value subs.accept(value)