Jump to content




Create a new peripheral



3 replies to this topic

#1 ExDomino

  • Members
  • 44 posts

Posted 28 April 2014 - 09: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! ^^

#2 Carrots084

  • Members
  • 46 posts

Posted 27 July 2014 - 06: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!

#3 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 27 July 2014 - 09:50 PM

Moved topic.

View PostCarrots084, on 27 July 2014 - 06:43 PM, said:

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 by theoriginalbit, 27 July 2014 - 09:53 PM.


#4 Carrots084

  • Members
  • 46 posts

Posted 27 July 2014 - 10:05 PM

View Posttheoriginalbit, on 27 July 2014 - 09:50 PM, said:

Moved topic.

View PostCarrots084, on 27 July 2014 - 06:43 PM, said:

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users