This package contains code use to integrate with other mods. This is usually done by implementing block drivers for other mods' blocks, or by implementing (item stack) converters.
###General Structure The general structure for mod integration is as follows:
Mods.IDs
(Mods.scala
file).SimpleMod
instance suffices, some may require a specialized implementation. These instances are an internal way of checking for mod availablity.ModModname
class implementing the ModProxy
interface. This class is initialized from Mods.init()
if the mod it represents is available.ModProxy.initialize()
.Have a look at the existing modules for examples if that description was too abstract for you.
###On pull requests The basic guidelines from the main readme still apply, but I'd like to stress again that all integration must be optional. Make sure you properly test OC still works with and without the mod you added support for.
An additional guideline is on what drivers should actually do. Drivers built into OC should, in general, err on the side of being limited. This way addons can still add more “powerful” functionality, if so desired, while the other way around would not work (addons would not be able to limit existing functionality). Here's a few rules-of-thumb:
When in doubt, ask on the IRC or open an issue to discuss the driver you'd like to add!