This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FireHead996's profile picture

[1.7.10][CC 1.6.5]New peripheral not compatible with modems

Started by FireHead996, 04 February 2015 - 06:08 PM
FireHead996 #1
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?
Lyqyd #2
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.
FireHead996 #3
Posted 04 February 2015 - 08:10 PM
Here:

Core: http://pastebin.com/LPWRkGwv
TileEntity: http://pastebin.com/iDfvFiNy
PeripheralProvider: http://pastebin.com/9awJvpau
Bugged block class: http://pastebin.com/tL1YYvPp
Working block class: http://pastebin.com/cDUwQSR5
Edited on 04 February 2015 - 07:10 PM
FireHead996 #4
Posted 28 July 2015 - 02:58 PM
Anyone? I really don't know what is with it…
SquidDev #5
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
FireHead996 #6
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