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>
This commit is contained in:
Adrian Siekierka 2025-04-06 13:42:23 +02:00
parent a4f44f1be6
commit f03618491e
2 changed files with 3 additions and 2 deletions

View File

@ -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
asie, AutumnalModding, Glease, jasonS05, kcinnajlol

View File

@ -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))
}
}