14 posts
Location
Poland
Posted 04 February 2015 - 07:08 PM
Hi. I'm making a peripheral for CC and i have a little problem with a canProvidePower() method. When i add this method to my block class, i can't attach modems to block. Without this method modems are working well and communication between block and computer is good too. With this method communication is good only if block is next to computer. Anyone knows what's the point?
8543 posts
Posted 04 February 2015 - 07:51 PM
Please provide a link to your code repository or pastebin all relevant class files (your block, its TE, the IPeripheral, and the IPeripheralProvider. Please show both versions of the code, one where it works as you expect, and one with the additional method added that seems to be causing it to no longer work.
Moved to Peripheral Help & Discussion.
14 posts
Location
Poland
Posted 04 February 2015 - 08:10 PM
Edited on 04 February 2015 - 07:10 PM
14 posts
Location
Poland
Posted 28 July 2015 - 02:58 PM
Anyone? I really don't know what is with it…
1426 posts
Location
Does anyone put something serious here?
Posted 28 July 2015 - 06:30 PM
My guess would be because it can provide power it is no longer a solid block - though I don't see why that would be the case. Have a look at ItemCable and insert some breakpoints there.
Edited on 28 July 2015 - 04:30 PM
14 posts
Location
Poland
Posted 29 July 2015 - 01:21 AM
My guess would be because it can provide power it is no longer a solid block - though I don't see why that would be the case. Have a look at ItemCable and insert some breakpoints there.
I added isSideSolid() method and now modem can be normally attached with positive canProvidePower() method. :)/> Thx for help. Problem solved.
Edited on 28 July 2015 - 11:22 PM