2014-02-23 21:06:07 +01:00
|
|
|
package appeng.client.texture;
|
|
|
|
|
2014-03-09 04:35:53 +01:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.client.renderer.texture.TextureMap;
|
2014-02-23 21:06:07 +01:00
|
|
|
import net.minecraft.util.IIcon;
|
2014-03-09 04:35:53 +01:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2014-02-23 21:06:07 +01:00
|
|
|
|
|
|
|
public class MissingIcon implements IIcon
|
|
|
|
{
|
|
|
|
|
2014-03-09 04:35:53 +01:00
|
|
|
boolean isBlock;
|
|
|
|
|
|
|
|
public MissingIcon(Object forWhat) {
|
|
|
|
isBlock = forWhat instanceof Block;
|
|
|
|
}
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public IIcon getMissing()
|
|
|
|
{
|
|
|
|
return ((TextureMap) Minecraft.getMinecraft().getTextureManager()
|
|
|
|
.getTexture( isBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
|
|
|
}
|
|
|
|
|
2014-02-23 21:06:07 +01:00
|
|
|
@Override
|
|
|
|
public int getIconWidth()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getIconWidth();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getIconHeight()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getIconHeight();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getMinU()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getMinU();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getMaxU()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getMaxU();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getInterpolatedU(double var1)
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getInterpolatedU( var1 );
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getMinV()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getMinV();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getMaxV()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getMaxV();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getInterpolatedV(double var1)
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getInterpolatedV( var1 );
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getIconName()
|
|
|
|
{
|
2014-03-09 04:35:53 +01:00
|
|
|
return getMissing().getIconName();
|
2014-02-23 21:06:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|