Jump to content




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



5 replies to this topic

#1 FireHead996

  • Members
  • 14 posts
  • LocationPoland

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?

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 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.

#3 FireHead996

  • Members
  • 14 posts
  • LocationPoland

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 by FireHead996, 04 February 2015 - 08:10 PM.


#4 FireHead996

  • Members
  • 14 posts
  • LocationPoland

Posted 28 July 2015 - 01:58 PM

Anyone? I really don't know what is with it...

#5 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 28 July 2015 - 05: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 by SquidDev, 28 July 2015 - 05:30 PM.


#6 FireHead996

  • Members
  • 14 posts
  • LocationPoland

Posted 29 July 2015 - 12:21 AM

View PostSquidDev, on 28 July 2015 - 05:30 PM, said:

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 by FireHead996, 29 July 2015 - 12:22 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users