2013-04-06 19:28:59 +02:00
|
|
|
package mekanism.common;
|
|
|
|
|
2014-06-02 17:33:19 +02:00
|
|
|
import io.netty.buffer.ByteBuf;
|
2014-01-03 20:26:41 +01:00
|
|
|
|
2014-06-02 17:33:19 +02:00
|
|
|
import java.io.IOException;
|
2014-01-03 20:26:41 +01:00
|
|
|
|
2013-04-06 19:28:59 +02:00
|
|
|
/**
|
2013-06-14 03:37:26 +02:00
|
|
|
* Implement in your main class if your mod happens to be completely reliant on Mekanism, or in other words, is a Mekanism module.
|
2013-04-06 19:28:59 +02:00
|
|
|
* @author aidancbrady
|
|
|
|
*
|
|
|
|
*/
|
2013-07-07 03:33:08 +02:00
|
|
|
public interface IModule
|
2013-04-06 19:28:59 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Gets the version of the module.
|
|
|
|
* @return the module's version
|
|
|
|
*/
|
|
|
|
public Version getVersion();
|
2014-03-08 02:00:25 +01:00
|
|
|
|
2013-04-06 19:28:59 +02:00
|
|
|
/**
|
|
|
|
* Gets the name of the module. Note that this doesn't include "Mekanism" like the actual module's name does, just the
|
|
|
|
* unique name. For example, MekanismGenerators returns "Generators" here.
|
|
|
|
* @return unique name of the module
|
|
|
|
*/
|
|
|
|
public String getName();
|
2014-03-08 02:00:25 +01:00
|
|
|
|
2014-01-03 20:26:41 +01:00
|
|
|
/**
|
|
|
|
* Writes this module's configuration to a ConfigSync packet.
|
2014-06-02 17:33:19 +02:00
|
|
|
* @param dataStream - the ByteBuf of the sync packet
|
2014-01-03 20:26:41 +01:00
|
|
|
*/
|
2014-06-02 17:33:19 +02:00
|
|
|
public void writeConfig(ByteBuf dataStream) throws IOException;
|
2014-03-08 02:00:25 +01:00
|
|
|
|
2014-01-03 20:26:41 +01:00
|
|
|
/**
|
|
|
|
* Reads this module's configuration from the original ConfigSync packet.
|
2014-06-02 17:33:19 +02:00
|
|
|
* @param dataStream - the incoming ByteBuf of the sync packet
|
2014-01-03 20:26:41 +01:00
|
|
|
*/
|
2014-06-02 17:33:19 +02:00
|
|
|
public void readConfig(ByteBuf dataStream) throws IOException;
|
2013-04-06 19:28:59 +02:00
|
|
|
}
|