/*
 * This file is part of GoodTime-Industrial, licensed under MIT License (MIT).
 *
 * Copyright (c) 2015 Minecraft-GoodTime <http://github.com/Minecraft-GoodTime>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package com.mcgoodtime.gti.common.blocks.machines;

import static com.mcgoodtime.gti.common.core.CreativeTabGti.creativeTabGti;

import com.mcgoodtime.gti.common.core.Gti;
import com.mcgoodtime.gti.common.core.GuiHandler;
import com.mcgoodtime.gti.common.tiles.TileGenGasKu;

import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

public class GenGasKu extends BlockContainer {

    @SideOnly(Side.CLIENT)
    private IIcon[] icons = new IIcon[6];

    public GenGasKu() {
        super(Material.rock);
        this.setCreativeTab(creativeTabGti);
        this.setBlockName("gti.GenGasKu");
        this.setBlockTextureName("gti:GenGasKu_0");
        GameRegistry.registerBlock(this, "GenGasKu");
    }

    /**
     * Called upon blocks activation (right click on the blocks.)
     */
    @Override
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int p1, float p2, float p3, float p4) {
        if (world.isRemote) {
            entityPlayer.openGui(Gti.instance, GuiHandler.Guis.GenGasKu.ordinal(), world, x, y, z);
        } else {
            entityPlayer.isInvisibleToPlayer(entityPlayer);
        }
        return true;
    }

    @Override
    public TileEntity createNewTileEntity(World world, int var2) {
        return new TileGenGasKu();
    }

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int side, int var) {
        return icons[side];
    }

    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister iir) {
        this.blockIcon = iir.registerIcon(Gti.MOD_ID + ":" + "GenGasKU");
        for (int i = 0; i < icons.length; i++) {
            icons[i] = iir.registerIcon(Gti.MOD_ID + ":" + "GenGasKU_" + i);
        }
    }
}

@@ -3097,16 +3097,21 @@
  return 
+this.
 icons%5Bsi
@@ -3307,16 +3307,21 @@
  0; i %3C 
+this.
 icons.le
@@ -3345,16 +3345,21 @@
         
+this.
 icons%5Bi%5D

fix style 2