mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-24 03:33:16 +00:00

Oh. This is from ye olde days (it's one of the first PRs to CC[^1]!). In pre-1.13 days, furnaces changing their lit state would replace the block (creating a new BE) and then set back the old BE. CC wouldn't pick up the second event, and so would continue to use the peripheral from the first. We don't really need this any more, for a couple of reasons: a) Furnaces don't do this any more. b) Peripherals are now refreshed on the next tick rather than immediately. c) Forge's capabilities have an explicit invalidate() hook already. This technically only detects *removing* block entities, but I'm not sure there's any cases where you add a block entity without also triggering a block state change. Ironically, the place we probably need this more is Fabric, where the lookup API doesn't have a public invalidate hook (it's hidden away in the BlockApiCache). I'm mostly relying on c) here, in that we just won't see this happen in practice. [^1]: https://github.com/dan200/ComputerCraft/pull/180