    001package net.minecraft.block;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import net.minecraft.client.renderer.texture.IconRegister;
    006import net.minecraft.util.Icon;
    007import net.minecraft.world.World;
    008
    009public class BlockRail extends BlockRailBase
    010{
    011    @SideOnly(Side.CLIENT)
    012    private Icon field_94359_b;
    013
    014    protected BlockRail(int par1)
    015    {
    016        super(par1, false);
    017    }
    018
    019    @SideOnly(Side.CLIENT)
    020
    021    /**
    022     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
    023     */
    024    public Icon getBlockTextureFromSideAndMetadata(int par1, int par2)
    025    {
    026        return par2 >= 6 ? this.field_94359_b : this.field_94336_cN;
    027    }
    028
    029    @SideOnly(Side.CLIENT)
    030    public void func_94332_a(IconRegister par1IconRegister)
    031    {
    032        super.func_94332_a(par1IconRegister);
    033        this.field_94359_b = par1IconRegister.func_94245_a("rail_turn");
    034    }
    035
    036    protected void func_94358_a(World par1World, int par2, int par3, int par4, int par5, int par6, int par7)
    037    {
    038        if (par7 > 0 && Block.blocksList[par7].canProvidePower() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).func_94505_a() == 3)
    039        {
    040            this.refreshTrackShape(par1World, par2, par3, par4, false);
    041        }
    042    }
    043}