nice
This commit is contained in:
parent
37a989b110
commit
1206d078a2
@ -337,11 +337,13 @@ class EnergyCounterBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Mat
|
|||||||
val resolve = ent.getEnergySided(-side)
|
val resolve = ent.getEnergySided(-side)
|
||||||
|
|
||||||
if (resolve !== old) {
|
if (resolve !== old) {
|
||||||
val weak = WeakReference(this)
|
if (resolve.isPresent) {
|
||||||
|
val weak = WeakReference(this)
|
||||||
|
|
||||||
resolve.addListener {
|
resolve.addListener {
|
||||||
if (SERVER_IS_LIVE)
|
if (SERVER_IS_LIVE)
|
||||||
weak.get()?.checkSurroundings()
|
weak.get()?.checkSurroundings()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return resolve
|
return resolve
|
||||||
|
Loading…
Reference in New Issue
Block a user