for(String crop : crops)
{
seedId = ((Item)mod.getField("seed" + crop).get(null)).itemID;
blockId = ((Block)mod.getField("crop" + crop).get(null)).blockID;
fertilize = Class.forName("magicCrop.crop" + crop).getMethod("func_72272_c_", World.class, int.class, int.class, int.class);
MFRRegistry.registerPlantable(new PlantableCropPlant(seedId, blockId));
MFRRegistry.registerHarvestable(new HarvestableCropPlant(blockId, 7));
MFRRegistry.registerFertilizable(new FertilizableCropReflection(blockId, fertilize, 7));
}
for(String crop : namedAsMagicalCropButExtendsBlockCrops)
{
seedId = ((Item)mod.getField("mSeeds" + crop).get(null)).itemID;
blockId = ((Block)mod.getField("mCrop" + crop).get(null)).blockID;
fertilize = Class.forName("magicCrop.mCrop" + crop).getMethod("func_72272_c_", World.class, int.class, int.class, int.class);
MFRRegistry.registerPlantable(new PlantableCropPlant(seedId, blockId));
MFRRegistry.registerHarvestable(new HarvestableCropPlant(blockId, 7));
MFRRegistry.registerFertilizable(new FertilizableCropReflection(blockId, fertilize, 7));
}
for(String magicalCrop : magicalCrops)
{
seedId = ((Item)mod.getField("mSeeds" + magicalCrop).get(null)).itemID;
blockId = ((Block)mod.getField("mCrop" + magicalCrop).get(null)).blockID;
fertilize = Class.forName("magicCrop.mCrop" + magicalCrop).getMethod("fertilize", World.class, int.class, int.class, int.class);
MFRRegistry.registerPlantable(new PlantableCropPlant(seedId, blockId));
MFRRegistry.registerHarvestable(new HarvestableCropPlant(blockId, 7));
MFRRegistry.registerFertilizable(new FertilizableMagicalCropReflection(blockId, fertilize, 7));
}
for(String soulCrop : soulCrops)
{
seedId = ((Item)mod.getField("soulSeed" + soulCrop).get(null)).itemID;
blockId = ((Block)mod.getField("soulCrop" + soulCrop).get(null)).blockID;
fertilize = Class.forName("magicCrop.soulCrop" + soulCrop).getMethod("fertilize", World.class, int.class, int.class, int.class);
MFRRegistry.registerPlantable(new PlantableCropPlant(seedId, blockId));
MFRRegistry.registerHarvestable(new HarvestableCropPlant(blockId, 7));
MFRRegistry.registerFertilizable(new FertilizableMagicalCropReflection(blockId, fertilize, 7));
}
Item magicalFertilizer = (Item)mod.getField("magicFertilizer").get(null);