You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
Java
43 lines
1.3 KiB
Java
package net.minecraft.block;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.World;
|
|
|
|
public class BlockRail extends BlockRailBase
|
|
{
|
|
@SideOnly(Side.CLIENT)
|
|
private IIcon field_150056_b;
|
|
private static final String __OBFID = "CL_00000293";
|
|
|
|
protected BlockRail()
|
|
{
|
|
super(false);
|
|
}
|
|
|
|
/**
|
|
* Gets the block's texture. Args: side, meta
|
|
*/
|
|
@SideOnly(Side.CLIENT)
|
|
public IIcon getIcon(int side, int meta)
|
|
{
|
|
return meta >= 6 ? this.field_150056_b : this.blockIcon;
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public void registerBlockIcons(IIconRegister reg)
|
|
{
|
|
super.registerBlockIcons(reg);
|
|
this.field_150056_b = reg.registerIcon(this.getTextureName() + "_turned");
|
|
}
|
|
|
|
protected void func_150048_a(World p_150048_1_, int p_150048_2_, int p_150048_3_, int p_150048_4_, int p_150048_5_, int p_150048_6_, Block p_150048_7_)
|
|
{
|
|
if (p_150048_7_.canProvidePower() && (new BlockRailBase.Rail(p_150048_1_, p_150048_2_, p_150048_3_, p_150048_4_)).func_150650_a() == 3)
|
|
{
|
|
this.func_150052_a(p_150048_1_, p_150048_2_, p_150048_3_, p_150048_4_, false);
|
|
}
|
|
}
|
|
} |