BloodMagic/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java

50 lines
1.3 KiB
Java
Raw Normal View History

package WayofTime.bloodmagic.compat;
/**
* Implement on all primary compatibility classes.
*/
public interface ICompatibility
{
/**
* Called during each initialization phase after the given {@link #getModId()}
* has been verified as loaded.
*
* @param phase
* - The load phase at which this method is being called.
*/
void loadCompatibility(InitializationPhase phase);
/**
2016-01-01 10:52:42 -08:00
* @return The {@code modid} of the mod we are adding compatibility for.
*/
String getModId();
2015-12-02 13:28:50 -08:00
/**
* Whether or not compatibility should be loaded even if the mod were to be
* found.
*
2015-12-02 13:28:50 -08:00
* Generally a determined by a config option.
*
2016-01-01 10:52:42 -08:00
* @return If Compatibility should load.
2015-12-02 13:28:50 -08:00
*/
boolean enableCompat();
/**
* Represents a given mod initialization state.
*/
enum InitializationPhase {
/**
* Represents {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent}
*/
PRE_INIT,
/**
* Represents {@link net.minecraftforge.fml.common.event.FMLInitializationEvent}
*/
INIT,
/**
* Represents {@link net.minecraftforge.fml.common.event.FMLPostInitializationEvent}
*/
POST_INIT
}
}