Package mods.railcraft.common.plugins.buildcraft

Source Code of mods.railcraft.common.plugins.buildcraft.BuildcraftPlugin

package mods.railcraft.common.plugins.buildcraft;

import buildcraft.api.statements.StatementManager;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameData;
import net.minecraft.block.Block;
import mods.railcraft.common.plugins.buildcraft.actions.ActionProvider;
import mods.railcraft.common.plugins.buildcraft.triggers.TriggerProvider;
import mods.railcraft.common.util.misc.Game;

/**
*
* @author CovertJaguar <http://www.railcraft.info>
*/
public class BuildcraftPlugin {

    public static void init() {
        try {
            StatementManager.registerTriggerProvider(new TriggerProvider());
            StatementManager.registerActionProvider(new ActionProvider());
        } catch (Throwable error) {
            Game.logErrorAPI("Buildcraft", error, StatementManager.class);
        }
    }

    public static void addFacade(Block block, int meta) {
        if (block == null) return;
        FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", String.format("%s@%d", GameData.blockRegistry.getNameForObject(block), meta));
    }

}
TOP

Related Classes of mods.railcraft.common.plugins.buildcraft.BuildcraftPlugin

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.