nice
This commit is contained in:
parent
37a989b110
commit
1206d078a2
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user