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

IPeripheral implementation

Started by Keridos, 05 February 2016 - 04:11 AM
Keridos #1
Posted 05 February 2016 - 05:11 AM
I use this class: https://github.com/OpenModularTurretsTeam/OpenModularTurrets/blob/master/src/main/java/openmodularturrets/tileentity/turretbase/TurretBase.java
and have implemented all the required function regarding to their description. But when I place a computer next to it and try to wrap it via test = peripheral.wrap(side), it always gives test the value nil. What is my error in there?
Lyqyd #2
Posted 05 February 2016 - 05:14 AM
Have you implemented an IPeripheralProvider? You'll need one to tell ComputerCraft to use the IPeripheral. I've got an example of one if you haven't made one before. You don't have to put it in the Block, you can put it anywhere you like, as long as you register it correctly.
Keridos #3
Posted 05 February 2016 - 12:16 PM
The registering does not work for me, it tells me expression expected in my intelliJ.

It wanted an instance of the object, not the class itself. Thanks :)/>
Edited on 09 February 2016 - 12:27 PM