Applied-Energistics-2-tiler.../client/texture/TmpFlipableIcon.java

38 lines
677 B
Java
Raw Normal View History

package appeng.client.texture;
2014-05-08 03:54:28 +02:00
import net.minecraft.init.Blocks;
2014-02-09 02:34:52 +01:00
import net.minecraft.util.IIcon;
public class TmpFlipableIcon extends FlipableIcon
{
2014-05-08 03:54:28 +02:00
private static final IIcon nullIcon = new MissingIcon( Blocks.diamond_block );
public TmpFlipableIcon() {
2014-05-08 03:54:28 +02:00
super( nullIcon );
}
2014-02-09 02:34:52 +01:00
public void setOriginal(IIcon i)
{
setFlip( false, false );
while (i instanceof FlipableIcon)
{
FlipableIcon fi = (FlipableIcon) i;
if ( fi.flip_u )
this.flip_u = !this.flip_u;
if ( fi.flip_v )
this.flip_v = !this.flip_v;
i = fi.getOriginal();
}
2014-05-08 03:54:28 +02:00
if ( i == null )
original = nullIcon;
else
original = i;
}
}