Mekanism-tilera-Edition/src/main/java/mekanism/common/IModule.java

39 lines
1 KiB
Java
Raw Normal View History

package mekanism.common;
import io.netty.buffer.ByteBuf;
2014-01-03 20:26:41 +01:00
import java.io.IOException;
2014-01-03 20:26:41 +01: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.
* @author aidancbrady
*
*/
public interface IModule
{
/**
* Gets the version of the module.
* @return the module's version
*/
public Version getVersion();
/**
* 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-01-03 20:26:41 +01:00
/**
* Writes this module's configuration to a ConfigSync packet.
* @param dataStream - the ByteBuf of the sync packet
2014-01-03 20:26:41 +01:00
*/
public void writeConfig(ByteBuf dataStream) throws IOException;
2014-01-03 20:26:41 +01:00
/**
* Reads this module's configuration from the original ConfigSync packet.
* @param dataStream - the incoming ByteBuf of the sync packet
2014-01-03 20:26:41 +01:00
*/
public void readConfig(ByteBuf dataStream) throws IOException;
}