Open LemADEC opened 5 years ago
The only thing I can think of is that your mod somehow has multiple registered IPeripheralProvider
s that return the same thing, that method would only be called multiple times if the peripheral containing it appears in the list of peripherals multiple times, meaning there are multiple providers returning it.
Why would it be called multiple times only in presence of Computronics? My single IPeripheralProvider is only registered once, during FMLPostInitialization. My provider always return the same thing, which is the tile entity at the location.
Because Computronics calls every registered IPeripheralProvider
, while normal ComputerCraft only calls them until one returns anything other than null, and then stops. For this exact thing to be called multiple times, either ComputerCraft must call it multiple times, or the provider is registered multiple times. It cannot really be the former, that would cause issues with practically every mod, including Computronics itself, if it were the case.
There's a total of 46 calls instead of 1. That's 45 extras. Could it be another mod registering IPeripheralProvider for my blocks? Could it be related to my blocks supporting both CC and OC? Any logs, option or something we could do to narrow down where the 45 extras are coming from?
You could always try to reproduce it with only your mod, CC, and Computronics first, and then keep adding mods interacting with CC until it happens. If it happens with only those three mods it's likely to be something on your end.
All blocks in Computronics also support both CC and OC, and they are not experiencing this.
It's a large modpack producing an issue in SMP only. Brute force removing mods to try to find the rootcause is fairly inefficient. This is why I came here asking for help to understand your mod and eventually instrument it.
Add half of the remaining missing mods at a time until you get the issue, then remove half until you find the most causing issues.
I guess the other thing to try would be copying a few chunks surrounding a problematic tile and trying to reproduce on a local server. SMP bugs are the worst to reproduce, but sometimes it's the only way :/.
So there's really no way to tell me where to put a log listing which mod registered which provider and provided 45 of those?
As of Computronics-1.12.2-1.6.6.191-charset-wires, when the mod is present on our server with many mods, we can see multiple calls to attach the same computer to the same block. Without Computronics this doesn't happen.
As initially reported on CC-Tweaked, here https://github.com/SquidDev-CC/CC-Tweaked/issues/103 : with Computronics
without Computronics
So far, I wasn't able to reproduced in single player nor in dev space SMP with fewer mods.