Ejemplo n.º 1
0
  public static void registerBlockMachineBeta() {
    if (blockMachineBeta == null) {
      int var0 = Config.getBlockID("blocks.base.harmoniontank.id");

      if (var0 > 0) {
        int var1 = Harmonion.proxy.getRenderIdTank();
        int[] var2 = new int[16];
        Arrays.fill(var2, 255);
        var2[EnumMachineBeta.TANK_IRON_WALL.ordinal()] = 0;
        var2[EnumMachineBeta.TANK_IRON_VALVE.ordinal()] = 0;
        var2[EnumMachineBeta.TANK_IRON_GAUGE.ordinal()] = 0;
        blockMachineBeta =
            (new net.Harmonion.tanks.BlockMachine(var0, var1, new MachineProxyBeta(), false, var2))
                .setBlockName("rcBlockMachineBeta");
        GameRegistry.registerBlock(
            blockMachineBeta, ItemMachine.class, blockMachineBeta.getBlockName());
        EnumMachineBeta[] var3 = EnumMachineBeta.values();
        int var4 = var3.length;

        for (int var5 = 0; var5 < var4; ++var5) {
          EnumMachineBeta var6 = var3[var5];
          MinecraftForge.setBlockHarvestLevel(blockMachineBeta, var6.ordinal(), "pickaxe", 2);
        }
      }
    }
  }
Ejemplo n.º 2
0
  public static void init() {

    /* Initialize each mod block individually */
    HarmonionOre = new BlockHarmonionOre(Config.getBlockID("blocks.base.harmonionore.id"), 0);
    HarmonionBlock = new BlockHarmonionBlock(Config.getBlockID("blocks.base.harmonionblock.id"), 3);
    HarmonionLog = new BlockHarmonionLog(Config.getBlockID("blocks.base.harmonionlog.id"));
    HarmonionLeaves = new BlockHarmonionLeaves(Config.getBlockID("blocks.base.harmonionleaves.id"));
    HarmonionSapling =
        new BlockHarmonionSapling(Config.getBlockID("blocks.base.harmonionsapling.id"), 13);
    HarmonionDoor =
        new BlockHarmonionDoor(
            Config.getBlockID("blocks.base.harmoniondoor.id"), 11, 12, Material.iron);
    HarmonionGlass =
        new BlockHarmonionGlass(
            Config.getBlockID("blocks.base.harmonionglass.id"), 4, Material.glass, false);
    HarmonionPortal =
        (BlockHarmonionPortal)
            ((BlockHarmonionPortal)
                (new BlockHarmonionPortal(
                    Config.getBlockID("blocks.base.harmonionportal.id"), 14)));
    HarmonionFire =
        (new BlockHarmonionFire(
            Config.getBlockID("blocks.base.harmonionfire.id"), Block.fire.blockIndexInTexture));

    blockPower = new BlockMicro(Config.getBlockID("blocks.base.harmonionwire.id"));
    blockPower.setBlockName("Harmonionwire");
    GameRegistry.registerBlock(blockPower, ItemMicro.class, "micro");
    blockPower.addTileEntityMapping(0, TileCovered.class);
    CoverLib.blockCoverPlate = blockPower;

    blockMachine = new BlockMachine(Config.getBlockID("blocks.base.harmonionmachine.id"));
    blockMachine.setBlockName("Harmonionmachine");
    GameRegistry.registerBlock(blockMachine, ItemExtended.class, "machine");
    blockMachine.setItemName(0, "Harmonionbatbox");
    GameRegistry.registerTileEntity(TileBatteryBox.class, "HarmoionBatBox");
    blockMachine.addTileEntityMapping(0, TileBatteryBox.class);

    blockMachinePanel =
        new BlockMachinePanel(Config.getBlockID("blocks.base.harmonionmachinepanel.id"));
    GameRegistry.registerBlock(blockMachinePanel, ItemMachinePanel.class, "machinePanel");
    GameRegistry.registerTileEntity(TileSolarPanel.class, "HarmonionSolar");
    blockMachinePanel.addTileEntityMapping(0, TileSolarPanel.class);
    blockMachinePanel.setItemName(0, "Harmonionsolar");

    blockAppliance = new BlockAppliance(Config.getBlockID("blocks.base.harmonionappliance.id"));
    GameRegistry.registerBlock(blockAppliance, ItemExtended.class, "appliance");
    GameRegistry.registerTileEntity(TileChargingBench.class, "HarmonionCharge");
    blockAppliance.setItemName(0, "harmonioncharge");
    blockAppliance.addTileEntityMapping(0, TileChargingBench.class);

    int var1;
    int var2;
    HarmonionLib.addCompatibleMapping(0, 1);

    for (var1 = 0; var1 < 16; ++var1) {
      HarmonionLib.addCompatibleMapping(0, 2 + var1);
      HarmonionLib.addCompatibleMapping(1, 2 + var1);
      HarmonionLib.addCompatibleMapping(65, 2 + var1);

      for (var2 = 0; var2 < 16; ++var2) {
        HarmonionLib.addCompatibleMapping(19 + var2, 2 + var1);
      }

      HarmonionLib.addCompatibleMapping(18, 2 + var1);
      HarmonionLib.addCompatibleMapping(18, 19 + var1);
    }

    HarmonionLib.addCompatibleMapping(0, 65);
    HarmonionLib.addCompatibleMapping(1, 65);
    HarmonionLib.addCompatibleMapping(64, 65);
    HarmonionLib.addCompatibleMapping(64, 67);
    HarmonionLib.addCompatibleMapping(65, 67);
    HarmonionLib.addCompatibleMapping(66, 67);

    /* Adds Blocks into the game */
    OreDictionary.registerOre("HarmonionOre", HarmonionOre);
    GameRegistry.registerBlock(HarmonionOre, BlockOresMeta.class);
    GameRegistry.registerBlock(HarmonionLeaves);
    GameRegistry.registerBlock(HarmonionLog);
    GameRegistry.registerBlock(HarmonionDoor);
    GameRegistry.registerBlock(HarmonionGlass);

    GameRegistry.registerBlock(HarmonionBlock);
    GameRegistry.registerBlock(HarmonionPortal);
    GameRegistry.registerBlock(HarmonionFire);

    DimensionManager.registerProviderType(
        Config.getBlockID("dimension.dimension.id"), WorldProviderHarmonion.class, false);
    DimensionManager.registerDimension(
        Config.getBlockID("dimension.dimension.id"), Config.getBlockID("dimension.dimension.id"));

    /* WorldGen */
    GameRegistry.registerWorldGenerator(new WorldPopulator());

    EnumMachineBeta[] var6 = EnumMachineBeta.values();
    int var3 = var6.length;
    int var4;
    var3 = var6.length;

    for (var4 = 0; var4 < var3; ++var4) {
      EnumMachineBeta var12 = var6[var4];

      if (var12.isEnabled()) {
        ItemRegistry.registerItem(var12.getTag(), var12.getItem());
      }
    }
  }