Search in sources :

Example 1 with HarvestableTreeLeaves

use of powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves in project MineFactoryReloaded by powercrystals.

the class TwilightForest method load.

@SuppressWarnings("rawtypes")
@Init
public static void load(FMLInitializationEvent e) {
    if (!Loader.isModLoaded("TwilightForest")) {
        FMLLog.warning("Twilight Forest missing - MFR Twilight Forest Compat not loading");
        return;
    }
    try {
        entityEggs = (HashMap) Class.forName("twilightforest.entity.TFCreatures").getField("entityEggs").get(null);
        twilightForestContainer = FMLCommonHandler.instance().findContainerFor(Class.forName("twilightforest.TwilightForestMod").getField("instance").get(null));
        Class tfBighorn = Class.forName("twilightforest.entity.passive.EntityTFBighorn");
        Class tfBoar = Class.forName("twilightforest.entity.passive.EntityTFBoar");
        Class tfDeer = Class.forName("twilightforest.entity.passive.EntityTFDeer");
        Class tfHydra = Class.forName("twilightforest.entity.EntityTFHydra");
        Class tfHydraHead = Class.forName("twilightforest.entity.EntityTFHydraHead");
        Class tfHydraNeck = Class.forName("twilightforest.entity.EntityTFHydraNeck");
        Class tfHydraPart = Class.forName("twilightforest.entity.EntityTFHydraPart");
        Class tfKingSpider = Class.forName("twilightforest.entity.EntityTFKingSpider");
        Class tfLich = Class.forName("twilightforest.entity.EntityTFLich");
        Class tfNaga = Class.forName("twilightforest.entity.EntityTFNaga");
        Class tfNagaSegment = Class.forName("twilightforest.entity.EntityTFNagaSegment");
        Class tfQuestRam = Class.forName("twilightforest.entity.passive.EntityTFQuestRam");
        Class tfUrGhast = Class.forName("twilightforest.entity.EntityTFUrGhast");
        MFRRegistry.registerSafariNetBlacklist(tfHydra);
        MFRRegistry.registerSafariNetBlacklist(tfHydraHead);
        MFRRegistry.registerSafariNetBlacklist(tfHydraNeck);
        MFRRegistry.registerSafariNetBlacklist(tfHydraPart);
        MFRRegistry.registerSafariNetBlacklist(tfKingSpider);
        MFRRegistry.registerSafariNetBlacklist(tfLich);
        MFRRegistry.registerSafariNetBlacklist(tfNaga);
        MFRRegistry.registerSafariNetBlacklist(tfNagaSegment);
        MFRRegistry.registerSafariNetBlacklist(tfQuestRam);
        MFRRegistry.registerSafariNetBlacklist(tfUrGhast);
        MFRRegistry.registerGrinderBlacklist(tfUrGhast);
        MFRRegistry.registerGrinderBlacklist(tfNagaSegment);
        MFRRegistry.registerGrinderBlacklist(tfNaga);
        MFRRegistry.registerGrinderBlacklist(tfLich);
        MFRRegistry.registerGrinderBlacklist(tfHydraPart);
        MFRRegistry.registerGrinderBlacklist(tfHydraNeck);
        MFRRegistry.registerGrinderBlacklist(tfHydraHead);
        MFRRegistry.registerGrinderBlacklist(tfHydra);
        MFRRegistry.registerMobEggHandler(new TwilightForestEggHandler());
        MFRRegistry.registerBreederFood(tfBighorn, new ItemStack(Item.wheat));
        MFRRegistry.registerBreederFood(tfBoar, new ItemStack(Item.carrot));
        MFRRegistry.registerBreederFood(tfDeer, new ItemStack(Item.wheat));
        MFRRegistry.registerRanchable(new RanchableTFBighorn(tfBighorn));
        Class tfBlocks = Class.forName("twilightforest.block.TFBlocks");
        if (tfBlocks != null) {
            MFRRegistry.registerHarvestable(new HarvestableStandard(((Block) tfBlocks.getField("log").get(null)).blockID, HarvestType.Tree));
            MFRRegistry.registerHarvestable(new HarvestableStandard(((Block) tfBlocks.getField("magicLog").get(null)).blockID, HarvestType.Tree));
            MFRRegistry.registerHarvestable(new HarvestableStandard(((Block) tfBlocks.getField("magicLogSpecial").get(null)).blockID, HarvestType.Tree));
            MFRRegistry.registerHarvestable(new HarvestableStandard(((Block) tfBlocks.getField("root").get(null)).blockID, HarvestType.Tree));
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(((Block) tfBlocks.getField("leaves").get(null)).blockID));
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(((Block) tfBlocks.getField("magicLeaves").get(null)).blockID));
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(((Block) tfBlocks.getField("hedge").get(null)).blockID));
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(((Block) tfBlocks.getField("firefly").get(null)).blockID));
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(((Block) tfBlocks.getField("cicada").get(null)).blockID));
            MFRRegistry.registerHarvestable(new HarvestableStandard(((Block) tfBlocks.getField("plant").get(null)).blockID, HarvestType.Normal));
            MFRRegistry.registerPlantable(new PlantableStandard(((Block) tfBlocks.getField("sapling").get(null)).blockID, ((Block) tfBlocks.getField("sapling").get(null)).blockID));
            MFRRegistry.registerFertilizable(new FertilizableSapling(((Block) tfBlocks.getField("sapling").get(null)).blockID));
        }
        MFRRegistry.registerRandomMobProvider(new TwilightForestMobProvider());
    } catch (Exception x) {
        x.printStackTrace();
    }
}
Also used : FertilizableSapling(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableSapling) HarvestableStandard(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStandard) Block(net.minecraft.block.Block) HarvestableTreeLeaves(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves) ItemStack(net.minecraft.item.ItemStack) PlantableStandard(powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard) Init(cpw.mods.fml.common.Mod.Init)

Example 2 with HarvestableTreeLeaves

use of powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves in project MineFactoryReloaded by powercrystals.

the class RP2 method load.

@Init
public static void load(FMLInitializationEvent e) {
    if (!Loader.isModLoaded("RedPowerWorld")) {
        FMLLog.warning("RedPowerWorld missing - MFR RedPower2 Compat not loading");
        return;
    }
    try {
        Class<?> modClass = Class.forName("com.eloraam.redpower.RedPowerWorld");
        int blockIdLeaves = ((Block) modClass.getField("blockLeaves").get(null)).blockID;
        int blockIdLogs = ((Block) modClass.getField("blockLogs").get(null)).blockID;
        int blockIdPlants = ((Block) modClass.getField("blockPlants").get(null)).blockID;
        int blockIdCrops = ((Block) modClass.getField("blockCrops").get(null)).blockID;
        int itemCropSeedId = ((Item) modClass.getField("itemSeeds").get(null)).itemID;
        Method fertilizeMethod = Class.forName("com.eloraam.redpower.world.BlockCustomFlower").getMethod("growTree", World.class, int.class, int.class, int.class);
        MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(blockIdLeaves));
        MFRRegistry.registerHarvestable(new HarvestableStandard(blockIdLogs, HarvestType.Tree));
        MFRRegistry.registerHarvestable(new HarvestableRedPowerPlant(blockIdPlants));
        MFRRegistry.registerHarvestable(new HarvestableRedPowerFlax(blockIdCrops));
        MFRRegistry.registerPlantable(new PlantableStandard(blockIdPlants, blockIdPlants));
        MFRRegistry.registerPlantable(new PlantableCropPlant(itemCropSeedId, blockIdCrops));
        MFRRegistry.registerFertilizable(new FertilizableRedPowerFlax(blockIdCrops));
        MFRRegistry.registerFertilizable(new FertilizableRedPowerRubberTree(blockIdPlants, fertilizeMethod));
    } catch (Exception x) {
        x.printStackTrace();
    }
}
Also used : Method(java.lang.reflect.Method) HarvestableTreeLeaves(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves) Item(net.minecraft.item.Item) HarvestableStandard(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStandard) PlantableCropPlant(powercrystals.minefactoryreloaded.farmables.plantables.PlantableCropPlant) Block(net.minecraft.block.Block) PlantableStandard(powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard) Init(cpw.mods.fml.common.Mod.Init)

Example 3 with HarvestableTreeLeaves

use of powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves in project MineFactoryReloaded by powercrystals.

the class Vanilla method load.

@Init
public void load(FMLInitializationEvent event) {
    MFRRegistry.registerPlantable(new PlantableStandard(Block.sapling.blockID, Block.sapling.blockID));
    MFRRegistry.registerPlantable(new PlantableStandard(Item.pumpkinSeeds.itemID, Block.pumpkinStem.blockID));
    MFRRegistry.registerPlantable(new PlantableStandard(Item.melonSeeds.itemID, Block.melonStem.blockID));
    MFRRegistry.registerPlantable(new PlantableStandard(Block.mushroomBrown.blockID, Block.mushroomBrown.blockID));
    MFRRegistry.registerPlantable(new PlantableStandard(Block.mushroomRed.blockID, Block.mushroomRed.blockID));
    MFRRegistry.registerPlantable(new PlantableCropPlant(Item.seeds.itemID, Block.crops.blockID));
    MFRRegistry.registerPlantable(new PlantableCropPlant(Item.carrot.itemID, Block.carrot.blockID));
    MFRRegistry.registerPlantable(new PlantableCropPlant(Item.potato.itemID, Block.potato.blockID));
    MFRRegistry.registerPlantable(new PlantableNetherWart());
    MFRRegistry.registerPlantable(new PlantableCocoa());
    MFRRegistry.registerPlantable(new PlantableStandard(MineFactoryReloadedCore.rubberSaplingBlock.blockID, MineFactoryReloadedCore.rubberSaplingBlock.blockID));
    MFRRegistry.registerHarvestable(new HarvestableWood());
    MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(Block.leaves.blockID));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.reed.blockID, HarvestType.LeaveBottom));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.cactus.blockID, HarvestType.LeaveBottom));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.plantRed.blockID, HarvestType.Normal));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.plantYellow.blockID, HarvestType.Normal));
    MFRRegistry.registerHarvestable(new HarvestableShrub(Block.tallGrass.blockID));
    MFRRegistry.registerHarvestable(new HarvestableShrub(Block.deadBush.blockID));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.mushroomCapBrown.blockID, HarvestType.Tree));
    MFRRegistry.registerHarvestable(new HarvestableStandard(Block.mushroomCapRed.blockID, HarvestType.Tree));
    MFRRegistry.registerHarvestable(new HarvestableMushroom(Block.mushroomBrown.blockID));
    MFRRegistry.registerHarvestable(new HarvestableMushroom(Block.mushroomRed.blockID));
    MFRRegistry.registerHarvestable(new HarvestableStemPlant(Block.pumpkin.blockID, HarvestType.Normal));
    MFRRegistry.registerHarvestable(new HarvestableStemPlant(Block.melon.blockID, HarvestType.Normal));
    MFRRegistry.registerHarvestable(new HarvestableCropPlant(Block.crops.blockID, 7));
    MFRRegistry.registerHarvestable(new HarvestableCropPlant(Block.carrot.blockID, 7));
    MFRRegistry.registerHarvestable(new HarvestableCropPlant(Block.potato.blockID, 7));
    MFRRegistry.registerHarvestable(new HarvestableVine());
    MFRRegistry.registerHarvestable(new HarvestableNetherWart());
    MFRRegistry.registerHarvestable(new HarvestableCocoa());
    MFRRegistry.registerHarvestable(new HarvestableStandard(MineFactoryReloadedCore.rubberWoodBlock.blockID, HarvestType.Tree));
    MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(MineFactoryReloadedCore.rubberLeavesBlock.blockID));
    MFRRegistry.registerFertilizable(new FertilizableSapling(Block.sapling.blockID));
    MFRRegistry.registerFertilizable(new FertilizableCropPlant(Block.crops.blockID, 7));
    MFRRegistry.registerFertilizable(new FertilizableCropPlant(Block.carrot.blockID, 7));
    MFRRegistry.registerFertilizable(new FertilizableCropPlant(Block.potato.blockID, 7));
    MFRRegistry.registerFertilizable(new FertilizableGiantMushroom(Block.mushroomBrown.blockID));
    MFRRegistry.registerFertilizable(new FertilizableGiantMushroom(Block.mushroomRed.blockID));
    MFRRegistry.registerFertilizable(new FertilizableStemPlants(Block.pumpkinStem.blockID));
    MFRRegistry.registerFertilizable(new FertilizableStemPlants(Block.melonStem.blockID));
    MFRRegistry.registerFertilizable(new FertilizableNetherWart());
    MFRRegistry.registerFertilizable(new FertilizableCocoa());
    MFRRegistry.registerFertilizable(new FertilizableGrass());
    MFRRegistry.registerFertilizable(new FertilizableRubberSapling());
    MFRRegistry.registerFertilizer(new FertilizerStandard(MineFactoryReloadedCore.fertilizerItem.itemID, 0));
    if (MFRConfig.enableBonemealFertilizing.getBoolean(false)) {
        MFRRegistry.registerFertilizer(new FertilizerStandard(Item.dyePowder.itemID, 15));
    } else {
        MFRRegistry.registerFertilizer(new FertilizerStandard(Item.dyePowder.itemID, 15, FertilizerType.Grass));
    }
    MFRRegistry.registerRanchable(new RanchableCow());
    MFRRegistry.registerRanchable(new RanchableMooshroom());
    MFRRegistry.registerRanchable(new RanchableSheep());
    MFRRegistry.registerRanchable(new RanchableSquid());
    MFRRegistry.registerRanchable(new RanchableChicken());
    MFRRegistry.registerGrinderBlacklist(EntityPlayer.class);
    MFRRegistry.registerGrinderBlacklist(EntityDragon.class);
    MFRRegistry.registerGrinderBlacklist(EntityWither.class);
    MFRRegistry.registerGrinderBlacklist(EntityVillager.class);
    MFRRegistry.registerGrindable(new GrindableStandard(EntityChicken.class, new MobDrop[] { new MobDrop(30, null), new MobDrop(10, new ItemStack(Item.egg)) }, false));
    MFRRegistry.registerGrindable(new GrindableStandard(EntityOcelot.class, new MobDrop[] { new MobDrop(10, new ItemStack(Item.fishRaw)), new MobDrop(10, new ItemStack(Item.silk)) }));
    MFRRegistry.registerGrindable(new GrindableStandard(EntityWolf.class, new ItemStack(Item.bone)));
    MFRRegistry.registerGrindable(new GrindableZombiePigman());
    MFRRegistry.registerGrindable(new GrindableSlime(EntitySlime.class, new ItemStack(Item.slimeBall), 1));
    MFRRegistry.registerGrindable(new GrindableSlime(EntityPinkSlime.class, new ItemStack(MineFactoryReloadedCore.pinkSlimeballItem), 1));
    MFRRegistry.registerSludgeDrop(50, new ItemStack(Block.sand));
    MFRRegistry.registerSludgeDrop(40, new ItemStack(Block.dirt));
    MFRRegistry.registerSludgeDrop(30, new ItemStack(Item.clay, 4));
    MFRRegistry.registerSludgeDrop(3, new ItemStack(Block.mycelium));
    MFRRegistry.registerSludgeDrop(5, new ItemStack(Block.slowSand));
    MFRRegistry.registerBreederFood(EntityChicken.class, new ItemStack(Item.seeds));
    MFRRegistry.registerBreederFood(EntityChicken.class, new ItemStack(Item.melonSeeds));
    MFRRegistry.registerBreederFood(EntityChicken.class, new ItemStack(Item.pumpkinSeeds));
    MFRRegistry.registerBreederFood(EntityChicken.class, new ItemStack(Item.netherStalkSeeds));
    MFRRegistry.registerBreederFood(EntityWolf.class, new ItemStack(Item.porkCooked));
    MFRRegistry.registerBreederFood(EntityOcelot.class, new ItemStack(Item.fishRaw));
    MFRRegistry.registerBreederFood(EntityPig.class, new ItemStack(Item.carrot));
    MFRRegistry.registerSafariNetHandler(new EntityLivingHandler());
    MFRRegistry.registerSafariNetHandler(new EntityAgeableHandler());
    MFRRegistry.registerSafariNetHandler(new SheepHandler());
    MFRRegistry.registerSafariNetHandler(new SlimeHandler());
    MFRRegistry.registerMobEggHandler(new VanillaEggHandler());
    MFRRegistry.registerRubberTreeBiome("Swampland");
    MFRRegistry.registerRubberTreeBiome("Forest");
    MFRRegistry.registerRubberTreeBiome("Taiga");
    MFRRegistry.registerRubberTreeBiome("TaigaHills");
    MFRRegistry.registerRubberTreeBiome("Jungle");
    MFRRegistry.registerRubberTreeBiome("JungleHills");
    MFRRegistry.registerSafariNetBlacklist(EntityPlayer.class);
    MFRRegistry.registerSafariNetBlacklist(EntityDragon.class);
    MFRRegistry.registerSafariNetBlacklist(EntityWither.class);
    MFRRegistry.registerRandomMobProvider(new VanillaMobProvider());
    MFRRegistry.registerLiquidDrinkHandler(Block.waterStill.blockID, new DrinkHandlerWater());
    MFRRegistry.registerLiquidDrinkHandler(Block.waterMoving.blockID, new DrinkHandlerWater());
    MFRRegistry.registerLiquidDrinkHandler(Block.lavaStill.blockID, new DrinkHandlerLava());
    MFRRegistry.registerLiquidDrinkHandler(Block.lavaMoving.blockID, new DrinkHandlerLava());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.milkLiquid.blockID, new DrinkHandlerMilk());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.biofuelLiquid.blockID, new DrinkHandlerBiofuel());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.sewageLiquid.blockID, new DrinkHandlerSewage());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.sludgeLiquid.blockID, new DrinkHandlerSludge());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.essenceLiquid.blockID, new DrinkHandlerMobEssence());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.meatLiquid.blockID, new DrinkHandlerMeat());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.pinkSlimeLiquid.blockID, new DrinkHandlerPinkSlime());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.chocolateMilkLiquid.blockID, new DrinkHandlerChocolateMilk());
    MFRRegistry.registerLiquidDrinkHandler(MineFactoryReloadedCore.mushroomSoupLiquid.blockID, new DrinkHandlerMushroomSoup());
    MFRRegistry.registerRedNetLogicCircuit(new AdderAnalog());
    MFRRegistry.registerRedNetLogicCircuit(new AdderDigitalFull());
    MFRRegistry.registerRedNetLogicCircuit(new AdderDigitalHalf());
    MFRRegistry.registerRedNetLogicCircuit(new And2());
    MFRRegistry.registerRedNetLogicCircuit(new And3());
    MFRRegistry.registerRedNetLogicCircuit(new And4());
    MFRRegistry.registerRedNetLogicCircuit(new Counter());
    MFRRegistry.registerRedNetLogicCircuit(new DecomposeIntToDecimal());
    MFRRegistry.registerRedNetLogicCircuit(new Delay());
    MFRRegistry.registerRedNetLogicCircuit(new DeMux16Analog());
    MFRRegistry.registerRedNetLogicCircuit(new DeMux4());
    MFRRegistry.registerRedNetLogicCircuit(new Equal());
    MFRRegistry.registerRedNetLogicCircuit(new Fanout());
    MFRRegistry.registerRedNetLogicCircuit(new FlipFlopJK());
    MFRRegistry.registerRedNetLogicCircuit(new FlipFlopT());
    MFRRegistry.registerRedNetLogicCircuit(new Greater());
    MFRRegistry.registerRedNetLogicCircuit(new GreaterOrEqual());
    MFRRegistry.registerRedNetLogicCircuit(new Inverter());
    MFRRegistry.registerRedNetLogicCircuit(new LatchDGated());
    MFRRegistry.registerRedNetLogicCircuit(new LatchSR());
    MFRRegistry.registerRedNetLogicCircuit(new LatchSRGated());
    MFRRegistry.registerRedNetLogicCircuit(new Less());
    MFRRegistry.registerRedNetLogicCircuit(new LessOrEqual());
    MFRRegistry.registerRedNetLogicCircuit(new Max2());
    MFRRegistry.registerRedNetLogicCircuit(new Max3());
    MFRRegistry.registerRedNetLogicCircuit(new Max4());
    MFRRegistry.registerRedNetLogicCircuit(new Min2());
    MFRRegistry.registerRedNetLogicCircuit(new Min3());
    MFRRegistry.registerRedNetLogicCircuit(new Min4());
    MFRRegistry.registerRedNetLogicCircuit(new Multipulse());
    MFRRegistry.registerRedNetLogicCircuit(new Mux4());
    MFRRegistry.registerRedNetLogicCircuit(new Nand2());
    MFRRegistry.registerRedNetLogicCircuit(new Nand3());
    MFRRegistry.registerRedNetLogicCircuit(new Nand4());
    MFRRegistry.registerRedNetLogicCircuit(new Negator());
    MFRRegistry.registerRedNetLogicCircuit(new Noop());
    MFRRegistry.registerRedNetLogicCircuit(new Nor2());
    MFRRegistry.registerRedNetLogicCircuit(new Nor3());
    MFRRegistry.registerRedNetLogicCircuit(new Nor4());
    MFRRegistry.registerRedNetLogicCircuit(new NotEqual());
    MFRRegistry.registerRedNetLogicCircuit(new OneShot());
    MFRRegistry.registerRedNetLogicCircuit(new Or2());
    MFRRegistry.registerRedNetLogicCircuit(new Or3());
    MFRRegistry.registerRedNetLogicCircuit(new Or4());
    MFRRegistry.registerRedNetLogicCircuit(new Passthrough());
    MFRRegistry.registerRedNetLogicCircuit(new PassthroughGated());
    MFRRegistry.registerRedNetLogicCircuit(new PassthroughRoundRobin());
    MFRRegistry.registerRedNetLogicCircuit(new PulseLengthener());
    MFRRegistry.registerRedNetLogicCircuit(new RandomizerAnalog());
    MFRRegistry.registerRedNetLogicCircuit(new RandomizerDigital());
    MFRRegistry.registerRedNetLogicCircuit(new SevenSegmentEncoder());
    MFRRegistry.registerRedNetLogicCircuit(new SawtoothFalling());
    MFRRegistry.registerRedNetLogicCircuit(new SawtoothRising());
    MFRRegistry.registerRedNetLogicCircuit(new Scaler());
    MFRRegistry.registerRedNetLogicCircuit(new SchmittTrigger());
    MFRRegistry.registerRedNetLogicCircuit(new Sine());
    MFRRegistry.registerRedNetLogicCircuit(new Square());
    MFRRegistry.registerRedNetLogicCircuit(new Subtractor());
    MFRRegistry.registerRedNetLogicCircuit(new Triangle());
    MFRRegistry.registerRedNetLogicCircuit(new Xnor2());
    MFRRegistry.registerRedNetLogicCircuit(new Xnor3());
    MFRRegistry.registerRedNetLogicCircuit(new Xnor4());
    MFRRegistry.registerRedNetLogicCircuit(new Xor2());
    MFRRegistry.registerRedNetLogicCircuit(new Xor3());
    MFRRegistry.registerRedNetLogicCircuit(new Xor4());
    MFRRegistry.registerLaserOre(175, new ItemStack(Block.oreCoal));
    MFRRegistry.registerLaserOre(50, new ItemStack(Block.oreDiamond));
    MFRRegistry.registerLaserOre(50, new ItemStack(Block.oreEmerald));
    MFRRegistry.registerLaserOre(70, new ItemStack(Block.oreGold));
    MFRRegistry.registerLaserOre(150, new ItemStack(Block.oreIron));
    MFRRegistry.registerLaserOre(80, new ItemStack(Block.oreLapis));
    MFRRegistry.registerLaserOre(100, new ItemStack(Block.oreRedstone));
    MFRRegistry.registerLaserOre(50, new ItemStack(Block.oreNetherQuartz));
    MFRRegistry.registerLaserOre(80, new ItemStack(Block.glowStone));
    MFRRegistry.registerFruitLogBlockId(Block.wood.blockID);
    MFRRegistry.registerFruit(new FruitCocoa());
    MFRRegistry.registerAutoSpawnerBlacklist("VillagerGolem");
    MFRRegistry.addLaserPreferredOre(15, new ItemStack(Block.oreCoal));
    MFRRegistry.addLaserPreferredOre(3, new ItemStack(Block.oreDiamond));
    MFRRegistry.addLaserPreferredOre(5, new ItemStack(Block.oreEmerald));
    MFRRegistry.addLaserPreferredOre(4, new ItemStack(Block.oreGold));
    MFRRegistry.addLaserPreferredOre(12, new ItemStack(Block.oreIron));
    MFRRegistry.addLaserPreferredOre(11, new ItemStack(Block.oreLapis));
    MFRRegistry.addLaserPreferredOre(14, new ItemStack(Block.oreRedstone));
    MFRRegistry.addLaserPreferredOre(0, new ItemStack(Block.oreNetherQuartz));
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoStandardItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoStandardItem);
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoLavaItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoLavaItem);
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoSludgeItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoSludgeItem);
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoSewageItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoSewageItem);
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoFireItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoFireItem);
    MFRRegistry.registerNeedleAmmoType(MineFactoryReloadedCore.needlegunAmmoAnvilItem.itemID, (INeedleAmmo) MineFactoryReloadedCore.needlegunAmmoAnvilItem);
}
Also used : Passthrough(powercrystals.minefactoryreloaded.circuits.Passthrough) HarvestableNetherWart(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableNetherWart) HarvestableMushroom(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableMushroom) SawtoothRising(powercrystals.minefactoryreloaded.circuits.wave.SawtoothRising) Triangle(powercrystals.minefactoryreloaded.circuits.wave.Triangle) RanchableCow(powercrystals.minefactoryreloaded.farmables.ranchables.RanchableCow) SheepHandler(powercrystals.minefactoryreloaded.farmables.safarinethandlers.SheepHandler) HarvestableCropPlant(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableCropPlant) GreaterOrEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.GreaterOrEqual) Equal(powercrystals.minefactoryreloaded.circuits.logicboolean.Equal) LessOrEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.LessOrEqual) NotEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.NotEqual) GrindableSlime(powercrystals.minefactoryreloaded.farmables.grindables.GrindableSlime) OneShot(powercrystals.minefactoryreloaded.circuits.timing.OneShot) DeMux4(powercrystals.minefactoryreloaded.circuits.digital.DeMux4) Multipulse(powercrystals.minefactoryreloaded.circuits.timing.Multipulse) PulseLengthener(powercrystals.minefactoryreloaded.circuits.timing.PulseLengthener) DrinkHandlerMobEssence(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerMobEssence) NotEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.NotEqual) EntityPinkSlime(powercrystals.minefactoryreloaded.entity.EntityPinkSlime) AdderDigitalFull(powercrystals.minefactoryreloaded.circuits.digital.AdderDigitalFull) HarvestableTreeLeaves(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves) FertilizableRubberSapling(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableRubberSapling) Square(powercrystals.minefactoryreloaded.circuits.wave.Square) SlimeHandler(powercrystals.minefactoryreloaded.farmables.safarinethandlers.SlimeHandler) DecomposeIntToDecimal(powercrystals.minefactoryreloaded.circuits.analog.DecomposeIntToDecimal) DrinkHandlerChocolateMilk(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerChocolateMilk) PlantableCropPlant(powercrystals.minefactoryreloaded.farmables.plantables.PlantableCropPlant) FlipFlopJK(powercrystals.minefactoryreloaded.circuits.latch.FlipFlopJK) DrinkHandlerSewage(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerSewage) ItemStack(net.minecraft.item.ItemStack) LessOrEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.LessOrEqual) And4(powercrystals.minefactoryreloaded.circuits.logic.And4) AdderDigitalHalf(powercrystals.minefactoryreloaded.circuits.digital.AdderDigitalHalf) And3(powercrystals.minefactoryreloaded.circuits.logic.And3) And2(powercrystals.minefactoryreloaded.circuits.logic.And2) FertilizableCropPlant(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableCropPlant) EntityOcelot(net.minecraft.entity.passive.EntityOcelot) FruitCocoa(powercrystals.minefactoryreloaded.farmables.fruits.FruitCocoa) FertilizableCocoa(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableCocoa) Max2(powercrystals.minefactoryreloaded.circuits.analog.Max2) Max3(powercrystals.minefactoryreloaded.circuits.analog.Max3) LatchDGated(powercrystals.minefactoryreloaded.circuits.latch.LatchDGated) PlantableNetherWart(powercrystals.minefactoryreloaded.farmables.plantables.PlantableNetherWart) GrindableStandard(powercrystals.minefactoryreloaded.farmables.grindables.GrindableStandard) SchmittTrigger(powercrystals.minefactoryreloaded.circuits.analog.SchmittTrigger) FertilizableSapling(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableSapling) FertilizerStandard(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizerStandard) Max4(powercrystals.minefactoryreloaded.circuits.analog.Max4) RanchableSheep(powercrystals.minefactoryreloaded.farmables.ranchables.RanchableSheep) SawtoothFalling(powercrystals.minefactoryreloaded.circuits.wave.SawtoothFalling) PlantableStandard(powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard) Inverter(powercrystals.minefactoryreloaded.circuits.digital.Inverter) Min2(powercrystals.minefactoryreloaded.circuits.analog.Min2) Min3(powercrystals.minefactoryreloaded.circuits.analog.Min3) Min4(powercrystals.minefactoryreloaded.circuits.analog.Min4) EntityLivingHandler(powercrystals.minefactoryreloaded.farmables.safarinethandlers.EntityLivingHandler) GreaterOrEqual(powercrystals.minefactoryreloaded.circuits.logicboolean.GreaterOrEqual) HarvestableShrub(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableShrub) LatchSRGated(powercrystals.minefactoryreloaded.circuits.latch.LatchSRGated) Xor4(powercrystals.minefactoryreloaded.circuits.logic.Xor4) Xor3(powercrystals.minefactoryreloaded.circuits.logic.Xor3) RanchableSquid(powercrystals.minefactoryreloaded.farmables.ranchables.RanchableSquid) AdderAnalog(powercrystals.minefactoryreloaded.circuits.analog.AdderAnalog) Xor2(powercrystals.minefactoryreloaded.circuits.logic.Xor2) DrinkHandlerSludge(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerSludge) Nor2(powercrystals.minefactoryreloaded.circuits.logic.Nor2) FertilizableStemPlants(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableStemPlants) SevenSegmentEncoder(powercrystals.minefactoryreloaded.circuits.digital.SevenSegmentEncoder) Fanout(powercrystals.minefactoryreloaded.circuits.Fanout) Nor4(powercrystals.minefactoryreloaded.circuits.logic.Nor4) Nor3(powercrystals.minefactoryreloaded.circuits.logic.Nor3) RandomizerDigital(powercrystals.minefactoryreloaded.circuits.digital.RandomizerDigital) HarvestableStemPlant(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStemPlant) Sine(powercrystals.minefactoryreloaded.circuits.wave.Sine) DrinkHandlerMilk(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerMilk) Delay(powercrystals.minefactoryreloaded.circuits.timing.Delay) Or2(powercrystals.minefactoryreloaded.circuits.logic.Or2) Or4(powercrystals.minefactoryreloaded.circuits.logic.Or4) EntityAgeableHandler(powercrystals.minefactoryreloaded.farmables.safarinethandlers.EntityAgeableHandler) Or3(powercrystals.minefactoryreloaded.circuits.logic.Or3) HarvestableStandard(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStandard) FertilizableGiantMushroom(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableGiantMushroom) RanchableMooshroom(powercrystals.minefactoryreloaded.farmables.ranchables.RanchableMooshroom) Counter(powercrystals.minefactoryreloaded.circuits.digital.Counter) PlantableCocoa(powercrystals.minefactoryreloaded.farmables.plantables.PlantableCocoa) FertilizableNetherWart(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableNetherWart) EntityWolf(net.minecraft.entity.passive.EntityWolf) Less(powercrystals.minefactoryreloaded.circuits.logicboolean.Less) Negator(powercrystals.minefactoryreloaded.circuits.analog.Negator) DeMux4(powercrystals.minefactoryreloaded.circuits.digital.DeMux4) Mux4(powercrystals.minefactoryreloaded.circuits.digital.Mux4) DrinkHandlerBiofuel(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerBiofuel) PassthroughRoundRobin(powercrystals.minefactoryreloaded.circuits.PassthroughRoundRobin) VanillaEggHandler(powercrystals.minefactoryreloaded.farmables.egghandlers.VanillaEggHandler) EntitySlime(net.minecraft.entity.monster.EntitySlime) Noop(powercrystals.minefactoryreloaded.circuits.Noop) DrinkHandlerPinkSlime(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerPinkSlime) RandomizerAnalog(powercrystals.minefactoryreloaded.circuits.analog.RandomizerAnalog) EntityChicken(net.minecraft.entity.passive.EntityChicken) Subtractor(powercrystals.minefactoryreloaded.circuits.analog.Subtractor) HarvestableVine(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableVine) MobDrop(powercrystals.minefactoryreloaded.api.MobDrop) DeMux16Analog(powercrystals.minefactoryreloaded.circuits.digital.DeMux16Analog) HarvestableCocoa(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableCocoa) Scaler(powercrystals.minefactoryreloaded.circuits.analog.Scaler) FertilizableGrass(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizableGrass) FlipFlopT(powercrystals.minefactoryreloaded.circuits.latch.FlipFlopT) Xnor4(powercrystals.minefactoryreloaded.circuits.logic.Xnor4) Xnor3(powercrystals.minefactoryreloaded.circuits.logic.Xnor3) Xnor2(powercrystals.minefactoryreloaded.circuits.logic.Xnor2) DrinkHandlerLava(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerLava) DrinkHandlerWater(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerWater) HarvestableWood(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableWood) GrindableZombiePigman(powercrystals.minefactoryreloaded.farmables.grindables.GrindableZombiePigman) Nand2(powercrystals.minefactoryreloaded.circuits.logic.Nand2) Nand3(powercrystals.minefactoryreloaded.circuits.logic.Nand3) PassthroughGated(powercrystals.minefactoryreloaded.circuits.PassthroughGated) LatchSR(powercrystals.minefactoryreloaded.circuits.latch.LatchSR) Nand4(powercrystals.minefactoryreloaded.circuits.logic.Nand4) DrinkHandlerMushroomSoup(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerMushroomSoup) Greater(powercrystals.minefactoryreloaded.circuits.logicboolean.Greater) DrinkHandlerMeat(powercrystals.minefactoryreloaded.farmables.drinkhandlers.DrinkHandlerMeat) RanchableChicken(powercrystals.minefactoryreloaded.farmables.ranchables.RanchableChicken) Init(cpw.mods.fml.common.Mod.Init)

Example 4 with HarvestableTreeLeaves

use of powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves in project MineFactoryReloaded by powercrystals.

the class IC2 method load.

@Init
public static void load(FMLInitializationEvent e) {
    if (!Loader.isModLoaded("IC2")) {
        FMLLog.warning("IC2 missing - MFR IC2 Compat not loading");
        return;
    }
    try {
        ItemStack crop = Items.getItem("crop");
        ItemStack rubber = Items.getItem("rubber");
        ItemStack rubberSapling = Items.getItem("rubberSapling");
        ItemStack rubberLeaves = Items.getItem("rubberLeaves");
        ItemStack rubberWood = Items.getItem("rubberWood");
        ItemStack stickyResin = Items.getItem("resin");
        ItemStack plantBall = Items.getItem("plantBall");
        if (rubberSapling != null) {
            MFRRegistry.registerPlantable(new PlantableStandard(rubberSapling.itemID, rubberSapling.itemID));
            MFRRegistry.registerFertilizable(new FertilizableIC2RubberTree(rubberSapling.itemID));
        }
        if (rubberLeaves != null) {
            MFRRegistry.registerHarvestable(new HarvestableTreeLeaves(rubberLeaves.itemID));
        }
        if (rubberWood != null) {
            MFRRegistry.registerHarvestable(new HarvestableIC2RubberWood(rubberWood.itemID, HarvestType.Tree, stickyResin.itemID));
            MFRRegistry.registerFruitLogBlockId(((ItemBlock) rubberWood.getItem()).getBlockID());
            MFRRegistry.registerFruit(new FruitIC2Resin(rubberWood, stickyResin));
        }
        ItemStack fertilizer = Items.getItem("fertilizer");
        if (fertilizer != null) {
            MFRRegistry.registerFertilizer(new FertilizerStandard(fertilizer.itemID, fertilizer.getItemDamage()));
        }
        MFRRegistry.registerHarvestable(new HarvestableIC2Crop(crop.itemID));
        GameRegistry.addShapedRecipe(plantBall, new Object[] { "LLL", "L L", "LLL", Character.valueOf('L'), new ItemStack(MineFactoryReloadedCore.rubberLeavesBlock) });
        Recipes.extractor.addRecipe(new ItemStack(MineFactoryReloadedCore.rubberSaplingBlock), rubber);
    } catch (Exception x) {
        x.printStackTrace();
    }
}
Also used : FertilizerStandard(powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizerStandard) HarvestableTreeLeaves(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves) ItemStack(net.minecraft.item.ItemStack) PlantableStandard(powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard) Init(cpw.mods.fml.common.Mod.Init)

Example 5 with HarvestableTreeLeaves

use of powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves 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();
    }
}
Also used : Item(net.minecraft.item.Item) FertilizableSaplingReflection(powercrystals.minefactoryreloaded.modhelpers.FertilizableSaplingReflection) HarvestableStandard(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStandard) FertilizableCropReflection(powercrystals.minefactoryreloaded.modhelpers.FertilizableCropReflection) Block(net.minecraft.block.Block) Method(java.lang.reflect.Method) HarvestableTreeLeaves(powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves) PlantableStandard(powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard) Init(cpw.mods.fml.common.Mod.Init)

Aggregations

Init (cpw.mods.fml.common.Mod.Init)6 HarvestableTreeLeaves (powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves)6 PlantableStandard (powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard)6 HarvestableStandard (powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableStandard)5 ItemStack (net.minecraft.item.ItemStack)4 Method (java.lang.reflect.Method)3 Block (net.minecraft.block.Block)3 Item (net.minecraft.item.Item)2 FertilizerStandard (powercrystals.minefactoryreloaded.farmables.fertilizables.FertilizerStandard)2 EntitySlime (net.minecraft.entity.monster.EntitySlime)1 EntityChicken (net.minecraft.entity.passive.EntityChicken)1 EntityOcelot (net.minecraft.entity.passive.EntityOcelot)1 EntityWolf (net.minecraft.entity.passive.EntityWolf)1 HarvestType (powercrystals.minefactoryreloaded.api.HarvestType)1 MobDrop (powercrystals.minefactoryreloaded.api.MobDrop)1 Fanout (powercrystals.minefactoryreloaded.circuits.Fanout)1 Noop (powercrystals.minefactoryreloaded.circuits.Noop)1 Passthrough (powercrystals.minefactoryreloaded.circuits.Passthrough)1 PassthroughGated (powercrystals.minefactoryreloaded.circuits.PassthroughGated)1 PassthroughRoundRobin (powercrystals.minefactoryreloaded.circuits.PassthroughRoundRobin)1