mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-22 12:59:49 +00:00
AE Compat Plugin + Router Unit
This commit is contained in:
1 parent
6e5041dfb6
commit
2ebedc8b08
3 files changed
+55
-1
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package mantle.compat.plugins.builtin
|
||||
|
||||
import mantle.compat.plugins.ICompatPlugin
|
||||
import mantle.router.routing.RouterCoordinator
|
||||
import mantle.router.routing.builtin.UnitAppEng
|
||||
|
||||
/**
|
||||
* Applied Energistics compatibility plugin
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
object PluginAppEng extends ICompatPlugin {
|
||||
|
||||
def providedMod: String = "AppliedEnergistics"
|
||||
|
||||
def accept() {
|
||||
RouterCoordinator.registerPipelineUnit(UnitAppEng) // Register AE pipeline object
|
||||
}
|
||||
|
||||
def preInit() {
|
||||
|
||||
}
|
||||
|
||||
def init() {
|
||||
|
||||
}
|
||||
|
||||
def postInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,8 @@ import mantle.router.lib.RouterRepo._
|
||||
* Handles all incoming Mantle messages and their processing.
|
||||
*
|
||||
* Reserved Mantle messages:
|
||||
* * registerDecorativeBlock (Block) -- Used for FMP/BC Facades. May be hooked by other units.
|
||||
* * registerDecorativeBlock (Int[] - bID & meta OR tuple(bID, meta)) -- Used for FMP/BC Facades. May be hooked by other units.
|
||||
* * movableTile (String (full class path)) -- Used for AE SpatialIO. May be hooked by other units.
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package mantle.router.routing.builtin
|
||||
|
||||
import mantle.router.routing.{MantleMessage, IPipelineUnit}
|
||||
import mantle.router.lib.RouterRepo._
|
||||
import cpw.mods.fml.common.event.FMLInterModComms
|
||||
|
||||
/**
|
||||
* Applied Energistics pipeline unit
|
||||
*
|
||||
* @author Sunstrike <[email protected]>
|
||||
*/
|
||||
object UnitAppEng extends IPipelineUnit {
|
||||
|
||||
def unitName: String = "AppEng Compat"
|
||||
|
||||
def handleMessage(msg: MantleMessage) = msg.getAttachment match {
|
||||
case s:String => FMLInterModComms.sendMessage("AppliedEnergistics", "movabletile", s)
|
||||
case _ => logger.warning(s"Received invalid movableTile message: $msg")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user