use of powercrystals.minefactoryreloaded.modhelpers.FertilizableSaplingReflection in project MineFactoryReloaded by powercrystals.
the class Atum method load.
@SuppressWarnings("rawtypes")
@Init
public static void load(FMLInitializationEvent e) {
if (!Loader.isModLoaded("Atum")) {
FMLLog.warning("Atum missing - MFR Atum Compat not loading");
return;
}
try {
Class AtumItems = Class.forName("rebelkeithy.mods.atum.AtumItems");
Class AtumBlocks = Class.forName("rebelkeithy.mods.atum.AtumBlocks");
String entityprefix = "rebelkeithy.mods.atum.entities.Entity";
Class banditWarlord = Class.forName(entityprefix + "BanditWarlord");
Class pharaoh = Class.forName(entityprefix + "Pharaoh");
int atumLogId = ((Block) AtumBlocks.getField("log").get(null)).blockID;
int atumLeavesId = ((Block) AtumBlocks.getField("leaves").get(null)).blockID;
int atumSaplingId = ((Block) AtumBlocks.getField("palmSapling").get(null)).blockID;
int flaxSeedsId = ((Item) AtumItems.getField("flaxSeeds").get(null)).itemID;
int flaxId = ((Block) AtumBlocks.getField("flax").get(null)).blockID;
int papyrusId = ((Block) AtumBlocks.getField("papyrus").get(null)).blockID;
int shrubId = ((Block) AtumBlocks.getField("shrub").get(null)).blockID;
int weedId = ((Block) AtumBlocks.getField("weed").get(null)).blockID;
Method atumSaplingGrowTree = Class.forName("rebelkeithy.mods.atum.blocks.BlockPalmSapling").getMethod("growTree", World.class, int.class, int.class, int.class, Random.class);
Method atumFlaxFertilize = Class.forName("rebelkeithy.mods.atum.blocks.BlockFlax").getMethod("fertilize", World.class, int.class, int.class, int.class);
MFRRegistry.registerSafariNetBlacklist(banditWarlord);
MFRRegistry.registerSafariNetBlacklist(pharaoh);
MFRRegistry.registerGrinderBlacklist(banditWarlord);
MFRRegistry.registerGrinderBlacklist(pharaoh);
MFRRegistry.registerPlantable(new PlantableStandard(atumSaplingId, atumSaplingId));
MFRRegistry.registerPlantable(new PlantableStandard(flaxSeedsId, flaxId));
MFRRegistry.registerFertilizable(new FertilizableCropReflection(flaxId, atumFlaxFertilize, 5));
MFRRegistry.registerFertilizable(new FertilizableSaplingReflection(atumSaplingId, atumSaplingGrowTree));
MFRRegistry.registerHarvestable(new HarvestableStandard(atumLogId, HarvestType.Tree));
MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(atumLeavesId));
MFRRegistry.registerHarvestable(new HarvestableStandard(flaxId, HarvestType.Normal));
MFRRegistry.registerHarvestable(new HarvestableStandard(papyrusId, HarvestType.LeaveBottom));
MFRRegistry.registerHarvestable(new HarvestableStandard(shrubId, HarvestType.Normal));
MFRRegistry.registerHarvestable(new HarvestableStandard(weedId, HarvestType.Normal));
} catch (Exception x) {
System.out.println("Last updated for " + lastUpdated);
x.printStackTrace();
}
}
Aggregations