use of cpw.mods.fml.common.Mod.Init in project MineFactoryReloaded by powercrystals.
the class Thaumcraft method load.
@Init
public static void load(FMLInitializationEvent e) {
if (!Loader.isModLoaded("Thaumcraft")) {
FMLLog.warning("Thaumcraft missing - MFR Thaumcraft Compat not loading");
return;
}
try {
Block tcSapling = (Block) Class.forName("thaumcraft.common.Config").getField("blockCustomPlant").get(null);
Block tcLog = (Block) Class.forName("thaumcraft.common.Config").getField("blockMagicalLog").get(null);
Block tcLeaves = (Block) Class.forName("thaumcraft.common.Config").getField("blockMagicalLeaves").get(null);
Class<?> golem = Class.forName("thaumcraft.common.entities.golems.EntityGolemBase");
MFRRegistry.registerHarvestable(new HarvestableStandard(tcLog.blockID, HarvestType.Tree));
MFRRegistry.registerHarvestable(new HarvestableThaumcraftLeaves(tcLeaves.blockID, tcSapling.blockID));
MFRRegistry.registerHarvestable(new HarvestableThaumcraftPlant(tcSapling.blockID));
MFRRegistry.registerPlantable(new PlantableThaumcraftTree(tcSapling.blockID, tcSapling.blockID));
MFRRegistry.registerAutoSpawnerBlacklistClass(golem);
MFRRegistry.registerGrinderBlacklist(golem);
// TODO: redo/remove wisp?
MFRRegistry.registerGrindable(new GrindableWisp());
} catch (Exception x) {
x.printStackTrace();
}
}
Aggregations