From f03618491e77b9d3b0d82c0658609e53efa2afbf Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 6 Apr 2025 13:42:23 +0200 Subject: [PATCH] fix client side memory leak on anything RedstoneAware https://github.com/GTNewHorizons/OpenComputers/pull/142 Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> --- changelog.md | 3 ++- .../li/cil/oc/common/tileentity/traits/RedstoneAware.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index d60edc02f..517ab0846 100644 --- a/changelog.md +++ b/changelog.md @@ -3,7 +3,8 @@ * [#3769] Add default user agent configuration option; change OpenComputers' default user agent to "opencomputers/$version". * [#3759] Add V1 and V2 to the robot name list. (AutumnalModding) * [#3727] Fix more regressions related to OpenOS error handling. (jasonS05, kcinnajlol) +* Fix client-side memory leak on anything RedstoneAware (Glease) ## List of contributors -asie, AutumnalModding, jasonS05, kcinnajlol \ No newline at end of file +asie, AutumnalModding, Glease, jasonS05, kcinnajlol diff --git a/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala b/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala index fdc794773..fb3e09afe 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/traits/RedstoneAware.scala @@ -135,7 +135,7 @@ trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitte override def validate(): Unit = { super.validate() - if (!canUpdate) { + if (!canUpdate && isServer) { EventHandler.scheduleServer(() => ForgeDirection.VALID_DIRECTIONS.foreach(updateRedstoneInput)) } }