2014-04-18 04:52:39 +02:00
|
|
|
/* Example:
|
|
|
|
|
|
|
|
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
|
|
|
|
|
|
|
*/
|
|
|
|
package appeng.core.api.imc;
|
|
|
|
|
|
|
|
import appeng.api.AEApi;
|
|
|
|
import appeng.core.AELog;
|
|
|
|
import appeng.core.api.IIMCHandler;
|
|
|
|
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
|
|
|
|
|
|
|
public class IMCSpatial implements IIMCHandler
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void post(IMCMessage m)
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Class classInstance = Class.forName( m.getStringValue() );
|
2014-09-20 22:37:58 +02:00
|
|
|
AEApi.instance().registries().movable().whiteListTileEntity( classInstance );
|
2014-04-18 04:52:39 +02:00
|
|
|
}
|
|
|
|
catch (ClassNotFoundException e)
|
|
|
|
{
|
|
|
|
AELog.info( "Bad Class Registered: " + m.getStringValue() + " by " + m.getSender() );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|