OpenMods / OpenPeripheral

https://openmods.info
MIT License
67 stars 25 forks source link

How do I modify the source code to integrate with other mods? #277

Open J09 opened 6 years ago

J09 commented 6 years ago

Hello I wanted to modify the source code to integrate with electricalage how can I do that? Explaining: I wanted to change the voltage going through wire or get voltage going through wire and I wanted to get voltage from battery.

boq commented 6 years ago

That's quite broad question. Usually that includes importing API from target mod (though only if there is public one) and creating adapters. For example, I suggest looking at rf2 package.

J09 commented 6 years ago

What is the rf2 package? Sorry I’m not a pro lol

boq commented 6 years ago

https://github.com/OpenMods/OpenPeripheral-Integration/tree/master/src/main/java/openperipheral/integration/cofh/energy

Though it seems electrical age does not provide proper API and it already has some ComputerCraft and OpenComputers support (though not one described here). So probably I wouldn't accept that into this repository. Are are allowed to make your modifications though (see licence).

J09 commented 6 years ago

Ok one more question. How do I print how much power is still in a battery?