2015-11-28 23:52:06 -08:00
|
|
|
package WayofTime.bloodmagic.compat;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implement on all primary compatibility classes.
|
|
|
|
*/
|
2015-12-30 15:34:40 -05:00
|
|
|
public interface ICompatibility
|
|
|
|
{
|
2015-11-28 23:52:06 -08:00
|
|
|
/**
|
2016-01-09 20:41:01 -08:00
|
|
|
* 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.
|
2015-11-28 23:52:06 -08:00
|
|
|
*/
|
2016-01-09 20:41:01 -08:00
|
|
|
void loadCompatibility(InitializationPhase phase);
|
2015-11-28 23:52:06 -08:00
|
|
|
|
|
|
|
/**
|
2016-01-01 10:52:42 -08:00
|
|
|
* @return The {@code modid} of the mod we are adding compatibility for.
|
2015-11-28 23:52:06 -08:00
|
|
|
*/
|
|
|
|
String getModId();
|
2015-12-02 13:28:50 -08:00
|
|
|
|
|
|
|
/**
|
2015-12-30 15:34:40 -05: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-02 17:56:37 -05:00
|
|
|
*
|
2016-01-01 10:52:42 -08:00
|
|
|
* @return If Compatibility should load.
|
2015-12-02 13:28:50 -08:00
|
|
|
*/
|
|
|
|
boolean enableCompat();
|
2016-01-09 20:41:01 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
}
|
2015-11-28 23:52:06 -08:00
|
|
|
}
|