From 20bbaec62a7989990e143578ff53b554514420c8 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 14 Apr 2023 22:45:39 +0700 Subject: [PATCH] Kotlin? Hello? --- .../network/synchronizer/FieldSynchronizer.kt | 25 +++++++++++++++++++ 1 file changed, 25 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 a4b68d91f..8de4d082e 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 @@ -1117,6 +1117,11 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa isClientValue = true observer.accept(newValue) } + + @Deprecated("Use type specific property", replaceWith = ReplaceWith("this.property")) + override fun getValue(thisRef: Any?, property: KProperty<*>): Float { + return super.getValue(thisRef, property) + } } /** @@ -1184,6 +1189,11 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa isClientValue = true observer.accept(newValue) } + + @Deprecated("Use type specific property", replaceWith = ReplaceWith("this.property")) + override fun getValue(thisRef: Any?, property: KProperty<*>): Double { + return super.getValue(thisRef, property) + } } /** @@ -1237,6 +1247,11 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa return getter.asInt } } + + @Deprecated("Use type specific property", replaceWith = ReplaceWith("this.property")) + override fun getValue(thisRef: Any?, property: KProperty<*>): Int { + return super.getValue(thisRef, property) + } } /** @@ -1332,6 +1347,11 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa return getter.asLong } } + + @Deprecated("Use type specific property", replaceWith = ReplaceWith("this.property")) + override fun getValue(thisRef: Any?, property: KProperty<*>): Long { + return super.getValue(thisRef, property) + } } /** @@ -1441,6 +1461,11 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa isClientValue = true observer.accept(newValue) } + + @Deprecated("Use type specific property", replaceWith = ReplaceWith("this.property")) + override fun getValue(thisRef: Any?, property: KProperty<*>): Boolean { + return super.getValue(thisRef, property) + } } /**