Relocate Source to proper directory.
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public enum CableBusTextures
|
||||
{
|
||||
|
||||
Channels00("MECableSmart00"), Channels01("MECableSmart01"), Channels02("MECableSmart02"), Channels03("MECableSmart03"), Channels10("MECableSmart10"), Channels11(
|
||||
"MECableSmart11"), Channels12("MECableSmart12"), Channels13("MECableSmart13"), Channels14("MECableSmart14"), Channels04("MECableSmart04"),
|
||||
|
||||
LevelEmitterTorchOn("ItemPart.LevelEmitterOn"), BlockWirelessOn("BlockWirelessOn"),
|
||||
|
||||
BlockP2PTunnel2("ItemPart.P2PTunnel2"), BlockP2PTunnel3("ItemPart.P2PTunnel3"),
|
||||
|
||||
// MEWaiting("MEWaiting"),
|
||||
|
||||
PartMonitorSides("PartMonitorSides"), PartMonitorBack("PartMonitorBack"),
|
||||
|
||||
Transparent("Transparent"), PartMonitorSidesStatus("PartMonitorSidesStatus"), PartMonitorSidesStatusLights("PartMonitorSidesStatusLights"),
|
||||
|
||||
PartMonitor_Colored("PartMonitor_Colored"), PartMonitor_Bright("PartMonitor_Bright"),
|
||||
|
||||
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
|
||||
|
||||
PartConvMonitor_Bright("PartConvMonitor_Bright"), PartConvMonitor_Colored("PartConvMonitor_Colored"), PartConvMonitor_Dark("PartConvMonitor_Dark"),
|
||||
|
||||
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
|
||||
"PartInterfaceTerm_Dark"),
|
||||
|
||||
PartCraftingTerm_Bright("PartCraftingTerm_Bright"), PartCraftingTerm_Colored("PartCraftingTerm_Colored"), PartCraftingTerm_Dark("PartCraftingTerm_Dark"), //
|
||||
|
||||
PartStorageMonitor_Bright("PartStorageMonitor_Bright"), PartStorageMonitor_Colored("PartStorageMonitor_Colored"), PartStorageMonitor_Dark(
|
||||
"PartStorageMonitor_Dark"),
|
||||
|
||||
PartTerminal_Bright("PartTerminal_Bright"), PartTerminal_Colored("PartTerminal_Colored"), PartTerminal_Dark("PartTerminal_Dark"),
|
||||
|
||||
MECable_Green("MECable_Green"), MECable_Grey("MECable_Grey"), MECable_LightBlue("MECable_LightBlue"), MECable_LightGrey("MECable_LightGrey"), MECable_Lime(
|
||||
"MECable_Lime"), MECable_Magenta("MECable_Magenta"), MECable_Orange("MECable_Orange"), MECable_Pink("MECable_Pink"), MECable_Purple(
|
||||
"MECable_Purple"), MECable_Red("MECable_Red"), MECable_White("MECable_White"), MECable_Yellow("MECable_Yellow"), MECable_Black("MECable_Black"), MECable_Blue(
|
||||
"MECable_Blue"), MECable_Brown("MECable_Brown"), MECable_Cyan("MECable_Cyan"),
|
||||
|
||||
MEDense_Black("MEDense_Black"), MEDense_Blue("MEDense_Blue"), MEDense_Brown("MEDense_Brown"), MEDense_Cyan("MEDense_Cyan"), MEDense_Gray("MEDense_Gray"), MEDense_Green(
|
||||
"MEDense_Green"), MEDense_LightBlue("MEDense_LightBlue"), MEDense_LightGrey("MEDense_LightGrey"), MEDense_Lime("MEDense_Lime"), MEDense_Magenta(
|
||||
"MEDense_Magenta"), MEDense_Orange("MEDense_Orange"), MEDense_Pink("MEDense_Pink"), MEDense_Purple("MEDense_Purple"), MEDense_Red("MEDense_Red"), MEDense_White(
|
||||
"MEDense_White"), MEDense_Yellow("MEDense_Yellow"),
|
||||
|
||||
MESmart_Black("MESmart_Black"), MESmart_Blue("MESmart_Blue"), MESmart_Brown("MESmart_Brown"), MESmart_Cyan("MESmart_Cyan"), MESmart_Gray("MESmart_Gray"), MESmart_Green(
|
||||
"MESmart_Green"), MESmart_LightBlue("MESmart_LightBlue"), MESmart_LightGrey("MESmart_LightGrey"), MESmart_Lime("MESmart_Lime"), MESmart_Magenta(
|
||||
"MESmart_Magenta"), MESmart_Orange("MESmart_Orange"), MESmart_Pink("MESmart_Pink"), MESmart_Purple("MESmart_Purple"), MESmart_Red("MESmart_Red"), MESmart_White(
|
||||
"MESmart_White"), MESmart_Yellow("MESmart_Yellow"),
|
||||
|
||||
MECovered_Black("MECovered_Black"), MECovered_Blue("MECovered_Blue"), MECovered_Brown("MECovered_Brown"), MECovered_Cyan("MECovered_Cyan"), MECovered_Gray(
|
||||
"MECovered_Gray"), MECovered_Green("MECovered_Green"), MECovered_LightBlue("MECovered_LightBlue"), MECovered_LightGrey("MECovered_LightGrey"), MECovered_Lime(
|
||||
"MECovered_Lime"), MECovered_Magenta("MECovered_Magenta"), MECovered_Orange("MECovered_Orange"), MECovered_Pink("MECovered_Pink"), MECovered_Purple(
|
||||
"MECovered_Purple"), MECovered_Red("MECovered_Red"), MECovered_White("MECovered_White"), MECovered_Yellow("MECovered_Yellow"),
|
||||
|
||||
BlockAnnihilationPlaneOn("BlockAnnihilationPlaneOn"),
|
||||
|
||||
BlockFormPlaneOn("BlockFormPlaneOn"),
|
||||
|
||||
ItemPartLevelEmitterOn("ItemPart.LevelEmitterOn"), PartTransitionPlaneBack("PartTransitionPlaneBack"),
|
||||
|
||||
PartTunnelSides("PartTunnelSides"), PartPlaneSides("PartPlaneSides"), PartExportSides("PartExportSides"), PartImportSides("PartImportSides"),
|
||||
|
||||
PartWirelessSides("PartWirelessSides"), PartStorageSides("PartStorageSides"), PartStorageBack("PartStorageBack");
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
private CableBusTextures(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public enum ExtraBlockTextures
|
||||
{
|
||||
BlockVibrationChamberFrontOn("BlockVibrationChamberFrontOn"),
|
||||
|
||||
OreQuartzStone("OreQuartzStone"),
|
||||
|
||||
MEChest("BlockMEChest"),
|
||||
|
||||
BlockMEChestItems_Light("BlockMEChestItems_Light"), BlockMEChestItems_Dark("BlockMEChestItems_Dark"), BlockMEChestItems_Medium("BlockMEChestItems_Medium"),
|
||||
|
||||
BlockControllerPowered("BlockControllerPowered"), BlockControllerColumnPowered("BlockControllerColumnPowered"), BlockControllerColumn(
|
||||
"BlockControllerColumn"), BlockControllerLights("BlockControllerLights"), BlockControllerColumnLights("BlockControllerColumnLights"), BlockControllerColumnConflict(
|
||||
"BlockControllerColumnConflict"), BlockControllerConflict("BlockControllerConflict"), BlockControllerInsideA("BlockControllerInsideA"), BlockControllerInsideB(
|
||||
"BlockControllerInsideB"),
|
||||
|
||||
BlockMolecularAssemblerLights("BlockMolecularAssemblerLights"),
|
||||
|
||||
BlockChargerInside("BlockChargerInside"),
|
||||
|
||||
BlockInterfaceAlternate("BlockInterfaceAlternate"), BlockInterfaceAlternateArrow("BlockInterfaceAlternateArrow"),
|
||||
|
||||
MEStorageCellTextures("MEStorageCellTextures"), White("White"),
|
||||
|
||||
BlockMatterCannonParticle("BlockMatterCannonParticle"), BlockEnergyParticle("BlockEnergyParticle"),
|
||||
|
||||
GlassFrame("BlockQuartzGlassFrame"),
|
||||
|
||||
BlockQRingCornerLight("BlockQRingCornerLight"), BlockQRingEdgeLight("BlockQRingEdgeLight"),
|
||||
|
||||
MEDenseEnergyCell0("BlockDenseEnergyCell0"), MEDenseEnergyCell1("BlockDenseEnergyCell1"), MEDenseEnergyCell2("BlockDenseEnergyCell2"), MEDenseEnergyCell3(
|
||||
"BlockDenseEnergyCell3"), MEDenseEnergyCell4("BlockDenseEnergyCell4"), MEDenseEnergyCell5("BlockDenseEnergyCell5"), MEDenseEnergyCell6(
|
||||
"BlockDenseEnergyCell6"), MEDenseEnergyCell7("BlockDenseEnergyCell7"),
|
||||
|
||||
MEEnergyCell0("BlockEnergyCell0"), MEEnergyCell1("BlockEnergyCell1"), MEEnergyCell2("BlockEnergyCell2"), MEEnergyCell3("BlockEnergyCell3"), MEEnergyCell4(
|
||||
"BlockEnergyCell4"), MEEnergyCell5("BlockEnergyCell5"), MEEnergyCell6("BlockEnergyCell6"), MEEnergyCell7("BlockEnergyCell7"),
|
||||
|
||||
BlockSpatialPylon_dim("BlockSpatialPylon_dim"), BlockSpatialPylon_red("BlockSpatialPylon_red"),
|
||||
|
||||
BlockSpatialPylonC("BlockSpatialPylon_spanned"), BlockSpatialPylonC_dim("BlockSpatialPylon_spanned_dim"), BlockSpatialPylonC_red(
|
||||
"BlockSpatialPylon_spanned_red"),
|
||||
|
||||
BlockQuartzGlassB("BlockQuartzGlassB"), BlockQuartzGlassC("BlockQuartzGlassC"), BlockQuartzGlassD("BlockQuartzGlassD"),
|
||||
|
||||
BlockSpatialPylonE("BlockSpatialPylon_end"), BlockSpatialPylonE_dim("BlockSpatialPylon_end_dim"), BlockSpatialPylonE_red("BlockSpatialPylon_end_red"),
|
||||
|
||||
BlockMESecurityOn_Light("BlockMESecurityOn_Light"), BlockMESecurityOn_Medium("BlockMESecurityOn_Medium"), BlockMESecurityOn_Dark("BlockMESecurityOn_Dark"), BlockInscriberInside(
|
||||
"BlockInscriberInside"),
|
||||
|
||||
BlockQuartzGrowthAcceleratorOn("BlockQuartzGrowthAcceleratorOn"), BlockQuartzGrowthAcceleratorSideOn("BlockQuartzGrowthAcceleratorSideOn"),
|
||||
|
||||
BlockWirelessInside("BlockWirelessInside"),
|
||||
|
||||
BlockCraftingAccelerator("BlockCraftingAccelerator"), BlockCraftingMonitor("BlockCraftingMonitor"),
|
||||
|
||||
BlockCraftingStorage1k("BlockCraftingStorage"), BlockCraftingStorage4k("BlockCraftingStorage4k"), BlockCraftingStorage16k("BlockCraftingStorage16k"), BlockCraftingStorage64k(
|
||||
"BlockCraftingStorage64k"),
|
||||
|
||||
BlockCraftingAcceleratorFit("BlockCraftingAcceleratorFit"),
|
||||
|
||||
BlockCraftingMonitorFit_Light("BlockCraftingMonitorFit_Light"), BlockCraftingMonitorFit_Dark("BlockCraftingMonitorFit_Dark"), BlockCraftingMonitorFit_Medium(
|
||||
"BlockCraftingMonitorFit_Medium"),
|
||||
|
||||
BlockCraftingStorage1kFit("BlockCraftingStorageFit"), BlockCraftingStorage4kFit("BlockCraftingStorage4kFit"), BlockCraftingStorage16kFit(
|
||||
"BlockCraftingStorage16kFit"), BlockCraftingStorage64kFit("BlockCraftingStorage64kFit"),
|
||||
|
||||
BlockCraftingUnitRing("BlockCraftingUnitRing"), BlockCraftingUnitRingLongRotated("BlockCraftingUnitRingLongRotated"), BlockCraftingUnitRingLong(
|
||||
"BlockCraftingUnitRingLong"), BlockCraftingUnitFit("BlockCraftingUnitFit"),
|
||||
|
||||
BlockCraftingMonitorOuter("BlockCraftingMonitorOuter"), BlockCraftingFitSolid("BlockCraftingFitSolid"),
|
||||
|
||||
BlockPaint2("BlockPaint2"), BlockPaint3("BlockPaint3");
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
{
|
||||
return new ResourceLocation( "appliedenergistics2", "textures/" + string );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
private ExtraBlockTextures(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public enum ExtraItemTextures
|
||||
{
|
||||
White("White"), ItemPaintBallShimmer("ItemPaintBallShimmer"),
|
||||
|
||||
ToolColorApplicatorTip_Medium("ToolColorApplicatorTip_Medium"),
|
||||
|
||||
ToolColorApplicatorTip_Dark("ToolColorApplicatorTip_Dark"),
|
||||
|
||||
ToolColorApplicatorTip_Light("ToolColorApplicatorTip_Light");
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
{
|
||||
return new ResourceLocation( "appliedenergistics2", "textures/" + string );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
private ExtraItemTextures(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class FlippableIcon implements IIcon
|
||||
{
|
||||
|
||||
protected IIcon original;
|
||||
boolean flip_u;
|
||||
boolean flip_v;
|
||||
|
||||
public FlippableIcon(IIcon o) {
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
original = o;
|
||||
flip_u = false;
|
||||
flip_v = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return original.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return original.getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinU()
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getMaxU();
|
||||
return original.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxU()
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getMinU();
|
||||
return original.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double px)
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getInterpolatedU( 16 - px );
|
||||
return original.getInterpolatedU( px );
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinV()
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getMaxV();
|
||||
return original.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxV()
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getMinV();
|
||||
return original.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double px)
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getInterpolatedV( 16 - px );
|
||||
return original.getInterpolatedV( px );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconName()
|
||||
{
|
||||
return original.getIconName();
|
||||
}
|
||||
|
||||
public IIcon getOriginal()
|
||||
{
|
||||
return original;
|
||||
}
|
||||
|
||||
public void setFlip(boolean u, boolean v)
|
||||
{
|
||||
flip_u = u;
|
||||
flip_v = v;
|
||||
}
|
||||
|
||||
public int setFlip(int orientation)
|
||||
{
|
||||
flip_u = (orientation & 8) == 8;
|
||||
flip_v = (orientation & 16) == 16;
|
||||
return orientation & 7;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FullIcon implements IIcon
|
||||
{
|
||||
|
||||
private IIcon p;
|
||||
|
||||
public FullIcon(IIcon o) {
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return p.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return p.getMaxU();
|
||||
return p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return p.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return p.getMaxV();
|
||||
return p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class MissingIcon implements IIcon
|
||||
{
|
||||
|
||||
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" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return getMissing().getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return getMissing().getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinU()
|
||||
{
|
||||
return getMissing().getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxU()
|
||||
{
|
||||
return getMissing().getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double var1)
|
||||
{
|
||||
return getMissing().getInterpolatedU( var1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinV()
|
||||
{
|
||||
return getMissing().getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxV()
|
||||
{
|
||||
return getMissing().getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double var1)
|
||||
{
|
||||
return getMissing().getInterpolatedV( var1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconName()
|
||||
{
|
||||
return getMissing().getIconName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class OffsetIcon implements IIcon
|
||||
{
|
||||
|
||||
final float offsetX;
|
||||
final float offsetY;
|
||||
|
||||
private IIcon p;
|
||||
|
||||
public OffsetIcon(IIcon o, float x, float y) {
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
offsetX = x;
|
||||
offsetY = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return u( 0 - offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return u( 16 - offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return u( d0 - offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return v( 0 - offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return v( 16 - offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return v( d0 - offsetY );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
return p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
return p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TaughtIcon implements IIcon
|
||||
{
|
||||
|
||||
final float tightness;
|
||||
|
||||
private IIcon p;
|
||||
|
||||
public TaughtIcon(IIcon o, float tightness) {
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
this.tightness = tightness * 0.4f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return u( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return u( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return u( d0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return v( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return v( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return v( d0 );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= tightness;
|
||||
if ( d > 8 )
|
||||
d += tightness;
|
||||
return p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= tightness;
|
||||
if ( d > 8 )
|
||||
d += tightness;
|
||||
return p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package appeng.client.texture;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class TmpFlippableIcon extends FlippableIcon
|
||||
{
|
||||
|
||||
private static final IIcon nullIcon = new MissingIcon( Blocks.diamond_block );
|
||||
|
||||
public TmpFlippableIcon() {
|
||||
super( nullIcon );
|
||||
}
|
||||
|
||||
public void setOriginal(IIcon i)
|
||||
{
|
||||
setFlip( false, false );
|
||||
|
||||
while (i instanceof FlippableIcon)
|
||||
{
|
||||
FlippableIcon fi = (FlippableIcon) i;
|
||||
if ( fi.flip_u )
|
||||
this.flip_u = !this.flip_u;
|
||||
|
||||
if ( fi.flip_v )
|
||||
this.flip_v = !this.flip_v;
|
||||
|
||||
i = fi.getOriginal();
|
||||
}
|
||||
|
||||
if ( i == null )
|
||||
original = nullIcon;
|
||||
else
|
||||
original = i;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user