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

Create a new peripheral

Started by ExDomino, 28 April 2014 - 08:35 AM
ExDomino #1
Posted 28 April 2014 - 10:35 AM
Hello!

I would like to create a new peripheral on my server, a peripheral that add one command and one event. The command would be something like "hypernet_send(message)" and the event would be "hypernet_message". When the command "hypernet_send()" would be used, all other instances of my peripheral placed in the world (or in another world) will emit the "hypernet_message" with arg1 as the message that was sent by "hypernet_send()". I don't think to add a channel or port feature, I would like to create something simple.

Do I have to create a new Forge mod using the ComputerCraft API, if it exists because I don't know, or I could add my peripheral only in editing the lua code inside the ComputerCraft's zip? I have the mod CustomStuff2 to add a new block for my peripheral, but I would like to allow it to be "wrappable" via a modem. I mean, not neccessary just beside the computer, if you see what I mean. ^^

Thank you in advance for you help! ^^
Carrots084 #2
Posted 27 July 2014 - 07:43 PM
Ok! That sounds quite useful as a peripheral. You would have to create a Forge Mod, using Java Class Files. If you don't know Java, you wont have a chance making mods. I personally recommend thenewboston's youtube tutorials on Java. Any peripheral can be wrapped through a wired modem! To learn how to code a peripheral I would look at a mod like Immibis' Peripherals or TOBIT's MoarPeripherals!
theoriginalbit #3
Posted 27 July 2014 - 10:50 PM
Moved topic.

To learn how to code a peripheral I would look at a mod like […] TOBIT's MoarPeripherals!
potentially not the best mod to look through, since I use my Peripheral-Framework, so it's not the best example of making the peripherals with the native CC API. However, on that note, my Peripheral-Framework makes creating peripherals much easier.
Edited on 27 July 2014 - 08:53 PM
Carrots084 #4
Posted 27 July 2014 - 11:05 PM
Moved topic.

To learn how to code a peripheral I would look at a mod like […] TOBIT's MoarPeripherals!
potentially not the best mod to look through, since I use my Peripheral-Framework, so it's not the best example of making the peripherals with the native CC API. However, on that note, my Peripheral-Framework makes creating peripherals much easier.

Are you stalking my recent posts :P/>