mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-05 17:46:21 +00:00
a9191a4d4e
When rendering non-origin monitors, we would fetch the origin monitor, read its client state, and then cache that on the current monitor to avoid repeated lookups. However, if the origin monitor is unloaded/removed on the client, and then loaded agin, this cache will be not be invalidated, causing us to render both the old and new monitor! I think the correct thing to do here is cache the origin monitor. This allows us to check when the origin monitor has been removed, and invalidate the cache if needed. However, I'm wary of any other edge cases here, so for now we do something much simpler, and remove the cache entirely. This does mean that monitors now need to perform extra block entity lookups, but the performance cost doesn't appear to be too bad. Fixes #1741 |
||
---|---|---|
.. | ||
src | ||
build.gradle.kts |