mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-10 09:20:28 +00:00
f695f22d8a
Disk drives have had a long-standing issue with mutating their contents on the computer thread, potentially leading to all sorts of odd bugs. We tried to fix this by moving setDiskLabel and the mounting code to run on the main thread. Unfortunately, this means there is a slight delay to mounts being attached, breaking disk startup. This commit implements an alternative solution - we now do mounting on the computer thread again. If the disk's stack is modified, we update it in the peripheral-facing item, but not the actual inventory. The next time the disk drive is ticked, we then sync the two items. This does mean that there is a fraction of a tick where the two will be out-of-sync. This isn't ideal - it would potentially be possible to cycle through disk ids - but I don't really think that's avoidable without significantly complicating the IMedia API. Fixes #1649, fixes #1686. |
||
---|---|---|
.. | ||
common | ||
common-api | ||
core | ||
core-api | ||
fabric | ||
fabric-api | ||
forge | ||
forge-api | ||
lints | ||
standalone | ||
web | ||
ARCHITECTURE.md |