From 2f03d6730aefa5f69c569b0cc355d156f760b42e Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 30 Mar 2025 16:34:18 +0700 Subject: [PATCH] Fix IDAllocator not being utilized properly in dynamic synchable group --- .../dbotthepony/mc/otm/network/syncher/DynamicSynchableGroup.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/syncher/DynamicSynchableGroup.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/syncher/DynamicSynchableGroup.kt index 9494e2094..4d72a71c7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/syncher/DynamicSynchableGroup.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/syncher/DynamicSynchableGroup.kt @@ -269,6 +269,7 @@ class DynamicSynchableGroup( if (value2slot.isNotEmpty()) { value2slot.clear() id2slot.clear() + idAllocator.reset() remoteStates.toTypedArray().forEach { it.clear() } } @@ -319,6 +320,7 @@ class DynamicSynchableGroup( val slot = value2slot.remove(element)!! checkNotNull(id2slot.remove(slot.id)) remoteStates.forEach { it.remove(slot) } + idAllocator.release(slot.id) return true }