Added IMC Support for P2P / Grinder / Spatial / MatterCannon

This commit is contained in:
AlgorithmX2
2014-04-17 21:52:39 -05:00
parent 572352c18e
commit cb81f34db3
6 changed files with 242 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
/* 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() );
AEApi.instance().registries().moveable().whiteListTileEntity( classInstance );
}
catch (ClassNotFoundException e)
{
AELog.info( "Bad Class Registered: " + m.getStringValue() + " by " + m.getSender() );
}
}
}