Search in sources :

Example 1 with Noop

use of powercrystals.minefactoryreloaded.circuits.Noop in project MineFactoryReloaded by powercrystals.

the class TileEntityRedNetLogic method reinitialize.

public void reinitialize(EntityPlayer player) {
    for (int i = 0; i < _upgradeLevel.length; i++) {
        if (_upgradeLevel[i] > 0) {
            ItemStack card = new ItemStack(MineFactoryReloadedCore.logicCardItem.itemID, 1, _upgradeLevel[i] - 1);
            if (!player.inventory.addItemStackToInventory(card)) {
                player.entityDropItem(card, 0.0F);
            }
            _upgradeLevel[i] = 0;
        }
    }
    updateUpgradeLevels();
    for (int i = 0; i < _circuits.length; i++) {
        initCircuit(i, new Noop());
        sendCircuitDefinition(i);
    }
    worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
Also used : Noop(powercrystals.minefactoryreloaded.circuits.Noop) ItemStack(net.minecraft.item.ItemStack)

Example 2 with Noop

use of powercrystals.minefactoryreloaded.circuits.Noop 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 3 with Noop

use of powercrystals.minefactoryreloaded.circuits.Noop in project MineFactoryReloaded by powercrystals.

the class TileEntityRedNetLogic method updateEntity.

@Override
public void updateEntity() {
    if (worldObj.isRemote) {
        return;
    }
    int[][] lastOuput = new int[6][];
    for (int i = 0; i < 6; i++) {
        lastOuput[i] = _buffers[i + 6];
        _buffers[i + 6] = new int[16];
    }
    for (int circuitNum = 0; circuitNum < _circuits.length; circuitNum++) {
        if (_circuits[circuitNum] instanceof Noop) {
            continue;
        }
        int[] input = new int[_circuits[circuitNum].getInputCount()];
        for (int pinNum = 0; pinNum < input.length; pinNum++) {
            input[pinNum] = _buffers[_pinMappingInputs[circuitNum][pinNum].buffer][_pinMappingInputs[circuitNum][pinNum].pin];
        }
        int[] output = _circuits[circuitNum].recalculateOutputValues(worldObj.getTotalWorldTime(), input);
        for (int pinNum = 0; pinNum < output.length; pinNum++) {
            _buffers[_pinMappingOutputs[circuitNum][pinNum].buffer][_pinMappingOutputs[circuitNum][pinNum].pin] = output[pinNum];
        }
    }
    for (int i = 0; i < 6; i++) {
        if (!Arrays.areEqual(lastOuput[i], _buffers[i + 6])) {
            BlockPosition bp = new BlockPosition(this);
            bp.orientation = ForgeDirection.VALID_DIRECTIONS[i];
            bp.moveForwards(1);
            Block b = Block.blocksList[worldObj.getBlockId(bp.x, bp.y, bp.z)];
            if (b instanceof IRedNetNetworkContainer) {
                ((IRedNetNetworkContainer) b).updateNetwork(worldObj, bp.x, bp.y, bp.z);
            } else if (b instanceof IConnectableRedNet) {
                ((IConnectableRedNet) b).onInputsChanged(worldObj, bp.x, bp.y, bp.z, bp.orientation.getOpposite(), _buffers[i + 6]);
            }
        }
    }
}
Also used : IRedNetNetworkContainer(powercrystals.minefactoryreloaded.api.rednet.IRedNetNetworkContainer) Noop(powercrystals.minefactoryreloaded.circuits.Noop) BlockPosition(powercrystals.core.position.BlockPosition) Block(net.minecraft.block.Block) IConnectableRedNet(powercrystals.minefactoryreloaded.api.rednet.IConnectableRedNet)

Example 4 with Noop

use of powercrystals.minefactoryreloaded.circuits.Noop in project MineFactoryReloaded by powercrystals.

the class TileEntityRedNetLogic method updateUpgradeLevels.

private void updateUpgradeLevels() {
    // recalculate sizes
    int circuitCount = 6;
    int variableCount = 16;
    for (int i = 0; i < _upgradeLevel.length; i++) {
        circuitCount += ItemLogicUpgradeCard.getCircuitsForLevel(_upgradeLevel[i]);
        variableCount += ItemLogicUpgradeCard.getVariablesForLevel(_upgradeLevel[i]);
    }
    _circuitCount = circuitCount;
    _variableCount = variableCount;
    // re-init circuit array and variable buffer
    _circuits = java.util.Arrays.copyOf(_circuits, _circuitCount);
    _buffers[13] = Arrays.copyOf(_buffers[13], _variableCount);
    // re-init pinmapping arrays
    PinMapping[][] inputMappings = new PinMapping[_circuitCount][];
    for (int i = 0; i < inputMappings.length; i++) {
        if (i < _pinMappingInputs.length && _pinMappingInputs[i] != null) {
            inputMappings[i] = _pinMappingInputs[i];
        }
    }
    _pinMappingInputs = inputMappings;
    PinMapping[][] outputMappings = new PinMapping[_circuitCount][];
    for (int i = 0; i < outputMappings.length; i++) {
        if (i < _pinMappingOutputs.length && _pinMappingOutputs[i] != null) {
            outputMappings[i] = _pinMappingOutputs[i];
        }
    }
    _pinMappingOutputs = outputMappings;
    // finally, init any new circuits
    for (int i = 0; i < _circuits.length; i++) {
        if (_circuits[i] == null) {
            initCircuit(i, new Noop());
        }
    }
}
Also used : Noop(powercrystals.minefactoryreloaded.circuits.Noop)

Aggregations

Noop (powercrystals.minefactoryreloaded.circuits.Noop)4 ItemStack (net.minecraft.item.ItemStack)2 Init (cpw.mods.fml.common.Mod.Init)1 Block (net.minecraft.block.Block)1 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 BlockPosition (powercrystals.core.position.BlockPosition)1 MobDrop (powercrystals.minefactoryreloaded.api.MobDrop)1 IConnectableRedNet (powercrystals.minefactoryreloaded.api.rednet.IConnectableRedNet)1 IRedNetNetworkContainer (powercrystals.minefactoryreloaded.api.rednet.IRedNetNetworkContainer)1 Fanout (powercrystals.minefactoryreloaded.circuits.Fanout)1 Passthrough (powercrystals.minefactoryreloaded.circuits.Passthrough)1 PassthroughGated (powercrystals.minefactoryreloaded.circuits.PassthroughGated)1 PassthroughRoundRobin (powercrystals.minefactoryreloaded.circuits.PassthroughRoundRobin)1 AdderAnalog (powercrystals.minefactoryreloaded.circuits.analog.AdderAnalog)1 DecomposeIntToDecimal (powercrystals.minefactoryreloaded.circuits.analog.DecomposeIntToDecimal)1 Max2 (powercrystals.minefactoryreloaded.circuits.analog.Max2)1 Max3 (powercrystals.minefactoryreloaded.circuits.analog.Max3)1