Fix part capabilities not being invalidated when network is reinitialized#1594
Fix part capabilities not being invalidated when network is reinitialized#1594Archengius wants to merge 2 commits intoCyclopsMC:master-1.21-ltsfrom
Conversation
…ized, causing capability queries on part blocks to return old capabilities
|
Hi @Archengius, thanks for the PR. Before we go any further we this, could you explain what the exact problem is you are trying to solve? Also, I thought we already had some cap invalidation logic in place (can't check right now, so I might misremember), so it might be fixable in that place if there is indeed a problem. |
|
Passive interaction does not work with mods that cache capabilities because ID capabilities change without being invalidated, causing mods that look them up to use stale capability objects and be unable to insert into/extract from ID network. Simplest repro I have is an EnderIO alloy smelter with crafting tunnel attached to it for a craft, and the smelter is configured to auto output the result into the crafting tunnel. Then if you try to order the craft it works, but if you invalidate the network in any way (say, by placing or removing a cable next to the interface), the auto output stops working until either block is replaced. There is 0 logic for capability invalidation that I have found. |
|
I see, thanks for the additional info. I'll have to go through this myself, to make sure there are no unintended consequences due to this, and if cap invalidation in all of these places is really necessary. And indeed, it looks like we don't have any cap invalidation logic in here. I must have been confusing it with another mod. |
|
@Archengius I just pushed a slightly different change that resolves the described problem on my end. |
|
A new release is out with the above mentioned fix. |
This causes capability queries on part blocks to return old capabilities that are no longer valid to access the network