This PR updates the ComputerCraft integration to 1.20.1, meaning flux gate, energy pylon, and reactor peripherals work again. Afraid I'd got most of the way through this before realising #1785 exists — felt it was worth submitting anyway, but aware the changes conflict. Feel free to close if you'd rather focus on that PR instead!
Mark all methods as executing on the main thread. This ensures that methods that interact with the Minecraft world (such as getCachedCore or tile.flowOverridden) are called from the Minecraft thread, rather than the Lua one.
Update capability code to fetch the peripheral via CapabilityManager. It might be worth refactoring some of this logic into a common base class (CC itself just has a dedicated ICapabilityProvider impl), but given that this goes away in 1.21, possibly not worth it.
This PR updates the ComputerCraft integration to 1.20.1, meaning flux gate, energy pylon, and reactor peripherals work again. Afraid I'd got most of the way through this before realising #1785 exists — felt it was worth submitting anyway, but aware the changes conflict. Feel free to close if you'd rather focus on that PR instead!
Mark all methods as executing on the main thread. This ensures that methods that interact with the Minecraft world (such as
getCachedCore
ortile.flowOverridden
) are called from the Minecraft thread, rather than the Lua one.Update capability code to fetch the peripheral via
CapabilityManager
. It might be worth refactoring some of this logic into a common base class (CC itself just has a dedicatedICapabilityProvider
impl), but given that this goes away in 1.21, possibly not worth it.