This commit is contained in:
DBotThePony 2022-10-10 10:04:50 +07:00
parent 37a989b110
commit 1206d078a2
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -337,12 +337,14 @@ class EnergyCounterBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Mat
val resolve = ent.getEnergySided(-side)
if (resolve !== old) {
if (resolve.isPresent) {
val weak = WeakReference(this)
resolve.addListener {
if (SERVER_IS_LIVE)
weak.get()?.checkSurroundings()
}
}
return resolve
}