Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -26,98 +27,85 @@ 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"),
|
||||
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"),
|
||||
LevelEmitterTorchOn( "ItemPart.LevelEmitterOn" ), BlockWirelessOn( "BlockWirelessOn" ),
|
||||
|
||||
BlockP2PTunnel2("ItemPart.P2PTunnel2"), BlockP2PTunnel3("ItemPart.P2PTunnel3"),
|
||||
BlockP2PTunnel2( "ItemPart.P2PTunnel2" ), BlockP2PTunnel3( "ItemPart.P2PTunnel3" ),
|
||||
|
||||
// MEWaiting("MEWaiting"),
|
||||
|
||||
PartMonitorSides("PartMonitorSides"), PartMonitorBack("PartMonitorBack"),
|
||||
PartMonitorSides( "PartMonitorSides" ), PartMonitorBack( "PartMonitorBack" ),
|
||||
|
||||
Transparent("Transparent"), PartMonitorSidesStatus("PartMonitorSidesStatus"), PartMonitorSidesStatusLights("PartMonitorSidesStatusLights"),
|
||||
Transparent( "Transparent" ), PartMonitorSidesStatus( "PartMonitorSidesStatus" ), PartMonitorSidesStatusLights( "PartMonitorSidesStatusLights" ),
|
||||
|
||||
PartMonitor_Colored("PartMonitor_Colored"), PartMonitor_Bright("PartMonitor_Bright"),
|
||||
PartMonitor_Colored( "PartMonitor_Colored" ), PartMonitor_Bright( "PartMonitor_Bright" ),
|
||||
|
||||
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
|
||||
PartPatternTerm_Bright( "PartPatternTerm_Bright" ), PartPatternTerm_Colored( "PartPatternTerm_Colored" ), PartPatternTerm_Dark( "PartPatternTerm_Dark" ),
|
||||
|
||||
PartConversionMonitor_Bright("PartConversionMonitor_Bright"), PartConversionMonitor_Colored("PartConversionMonitor_Colored"), PartConversionMonitor_Dark("PartConversionMonitor_Dark"),
|
||||
PartConversionMonitor_Bright( "PartConversionMonitor_Bright" ), PartConversionMonitor_Colored( "PartConversionMonitor_Colored" ), PartConversionMonitor_Dark( "PartConversionMonitor_Dark" ),
|
||||
|
||||
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
|
||||
"PartInterfaceTerm_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"), //
|
||||
PartCraftingTerm_Bright( "PartCraftingTerm_Bright" ), PartCraftingTerm_Colored( "PartCraftingTerm_Colored" ), PartCraftingTerm_Dark( "PartCraftingTerm_Dark" ), //
|
||||
|
||||
PartStorageMonitor_Bright("PartStorageMonitor_Bright"), PartStorageMonitor_Colored("PartStorageMonitor_Colored"), PartStorageMonitor_Dark(
|
||||
"PartStorageMonitor_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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
BlockAnnihilationPlaneOn( "BlockAnnihilationPlaneOn" ),
|
||||
|
||||
BlockFormPlaneOn("BlockFormPlaneOn"),
|
||||
BlockFormPlaneOn( "BlockFormPlaneOn" ),
|
||||
|
||||
ItemPartLevelEmitterOn("ItemPart.LevelEmitterOn"), PartTransitionPlaneBack("PartTransitionPlaneBack"),
|
||||
ItemPartLevelEmitterOn( "ItemPart.LevelEmitterOn" ), PartTransitionPlaneBack( "PartTransitionPlaneBack" ),
|
||||
|
||||
PartTunnelSides("PartTunnelSides"), PartPlaneSides("PartPlaneSides"), PartExportSides("PartExportSides"), PartImportSides("PartImportSides"),
|
||||
PartTunnelSides( "PartTunnelSides" ), PartPlaneSides( "PartPlaneSides" ), PartExportSides( "PartExportSides" ), PartImportSides( "PartImportSides" ),
|
||||
|
||||
PartWirelessSides("PartWirelessSides"), PartStorageSides("PartStorageSides"), PartStorageBack("PartStorageBack");
|
||||
PartWirelessSides( "PartWirelessSides" ), PartStorageSides( "PartStorageSides" ), PartStorageBack( "PartStorageBack" );
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
CableBusTextures( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static ResourceLocation GuiTexture( String string )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
CableBusTextures( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
public void registerIcon( TextureMap map )
|
||||
{
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -26,108 +27,98 @@ import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
public enum ExtraBlockTextures
|
||||
{
|
||||
BlockVibrationChamberFrontOn("BlockVibrationChamberFrontOn"),
|
||||
BlockVibrationChamberFrontOn( "BlockVibrationChamberFrontOn" ),
|
||||
|
||||
OreQuartzStone("OreQuartzStone"),
|
||||
OreQuartzStone( "OreQuartzStone" ),
|
||||
|
||||
MEChest("BlockMEChest"),
|
||||
MEChest( "BlockMEChest" ),
|
||||
|
||||
BlockMEChestItems_Light("BlockMEChestItems_Light"), BlockMEChestItems_Dark("BlockMEChestItems_Dark"), BlockMEChestItems_Medium("BlockMEChestItems_Medium"),
|
||||
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"),
|
||||
BlockControllerPowered( "BlockControllerPowered" ), BlockControllerColumnPowered( "BlockControllerColumnPowered" ), BlockControllerColumn( "BlockControllerColumn" ), BlockControllerLights( "BlockControllerLights" ), BlockControllerColumnLights( "BlockControllerColumnLights" ), BlockControllerColumnConflict( "BlockControllerColumnConflict" ), BlockControllerConflict( "BlockControllerConflict" ), BlockControllerInsideA( "BlockControllerInsideA" ), BlockControllerInsideB( "BlockControllerInsideB" ),
|
||||
|
||||
BlockMolecularAssemblerLights("BlockMolecularAssemblerLights"),
|
||||
BlockMolecularAssemblerLights( "BlockMolecularAssemblerLights" ),
|
||||
|
||||
BlockChargerInside("BlockChargerInside"),
|
||||
BlockChargerInside( "BlockChargerInside" ),
|
||||
|
||||
BlockInterfaceAlternate("BlockInterfaceAlternate"), BlockInterfaceAlternateArrow("BlockInterfaceAlternateArrow"),
|
||||
BlockInterfaceAlternate( "BlockInterfaceAlternate" ), BlockInterfaceAlternateArrow( "BlockInterfaceAlternateArrow" ),
|
||||
|
||||
MEStorageCellTextures("MEStorageCellTextures"), White("White"),
|
||||
MEStorageCellTextures( "MEStorageCellTextures" ), White( "White" ),
|
||||
|
||||
BlockMatterCannonParticle("BlockMatterCannonParticle"), BlockEnergyParticle("BlockEnergyParticle"),
|
||||
BlockMatterCannonParticle( "BlockMatterCannonParticle" ), BlockEnergyParticle( "BlockEnergyParticle" ),
|
||||
|
||||
GlassFrame("BlockQuartzGlassFrame"),
|
||||
GlassFrame( "BlockQuartzGlassFrame" ),
|
||||
|
||||
BlockQRingCornerLight("BlockQRingCornerLight"), BlockQRingEdgeLight("BlockQRingEdgeLight"),
|
||||
BlockQRingCornerLight( "BlockQRingCornerLight" ), BlockQRingEdgeLight( "BlockQRingEdgeLight" ),
|
||||
|
||||
MEDenseEnergyCell0("BlockDenseEnergyCell0"), MEDenseEnergyCell1("BlockDenseEnergyCell1"), MEDenseEnergyCell2("BlockDenseEnergyCell2"), MEDenseEnergyCell3(
|
||||
"BlockDenseEnergyCell3"), MEDenseEnergyCell4("BlockDenseEnergyCell4"), MEDenseEnergyCell5("BlockDenseEnergyCell5"), MEDenseEnergyCell6(
|
||||
"BlockDenseEnergyCell6"), MEDenseEnergyCell7("BlockDenseEnergyCell7"),
|
||||
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"),
|
||||
MEEnergyCell0( "BlockEnergyCell0" ), MEEnergyCell1( "BlockEnergyCell1" ), MEEnergyCell2( "BlockEnergyCell2" ), MEEnergyCell3( "BlockEnergyCell3" ), MEEnergyCell4( "BlockEnergyCell4" ), MEEnergyCell5( "BlockEnergyCell5" ), MEEnergyCell6( "BlockEnergyCell6" ), MEEnergyCell7( "BlockEnergyCell7" ),
|
||||
|
||||
BlockSpatialPylon_dim("BlockSpatialPylon_dim"), BlockSpatialPylon_red("BlockSpatialPylon_red"),
|
||||
BlockSpatialPylon_dim( "BlockSpatialPylon_dim" ), BlockSpatialPylon_red( "BlockSpatialPylon_red" ),
|
||||
|
||||
BlockSpatialPylonC("BlockSpatialPylon_spanned"), BlockSpatialPylonC_dim("BlockSpatialPylon_spanned_dim"), BlockSpatialPylonC_red(
|
||||
"BlockSpatialPylon_spanned_red"),
|
||||
BlockSpatialPylonC( "BlockSpatialPylon_spanned" ), BlockSpatialPylonC_dim( "BlockSpatialPylon_spanned_dim" ), BlockSpatialPylonC_red( "BlockSpatialPylon_spanned_red" ),
|
||||
|
||||
BlockQuartzGlassB("BlockQuartzGlassB"), BlockQuartzGlassC("BlockQuartzGlassC"), BlockQuartzGlassD("BlockQuartzGlassD"),
|
||||
BlockQuartzGlassB( "BlockQuartzGlassB" ), BlockQuartzGlassC( "BlockQuartzGlassC" ), BlockQuartzGlassD( "BlockQuartzGlassD" ),
|
||||
|
||||
BlockSpatialPylonE("BlockSpatialPylon_end"), BlockSpatialPylonE_dim("BlockSpatialPylon_end_dim"), BlockSpatialPylonE_red("BlockSpatialPylon_end_red"),
|
||||
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"),
|
||||
BlockMESecurityOn_Light( "BlockMESecurityOn_Light" ), BlockMESecurityOn_Medium( "BlockMESecurityOn_Medium" ), BlockMESecurityOn_Dark( "BlockMESecurityOn_Dark" ), BlockInscriberInside( "BlockInscriberInside" ),
|
||||
|
||||
BlockQuartzGrowthAcceleratorOn("BlockQuartzGrowthAcceleratorOn"), BlockQuartzGrowthAcceleratorSideOn("BlockQuartzGrowthAcceleratorSideOn"),
|
||||
BlockQuartzGrowthAcceleratorOn( "BlockQuartzGrowthAcceleratorOn" ), BlockQuartzGrowthAcceleratorSideOn( "BlockQuartzGrowthAcceleratorSideOn" ),
|
||||
|
||||
BlockWirelessInside("BlockWirelessInside"),
|
||||
BlockWirelessInside( "BlockWirelessInside" ),
|
||||
|
||||
BlockCraftingAccelerator("BlockCraftingAccelerator"), BlockCraftingMonitor("BlockCraftingMonitor"),
|
||||
BlockCraftingAccelerator( "BlockCraftingAccelerator" ), BlockCraftingMonitor( "BlockCraftingMonitor" ),
|
||||
|
||||
BlockCraftingStorage1k("BlockCraftingStorage"), BlockCraftingStorage4k("BlockCraftingStorage4k"), BlockCraftingStorage16k("BlockCraftingStorage16k"), BlockCraftingStorage64k(
|
||||
"BlockCraftingStorage64k"),
|
||||
BlockCraftingStorage1k( "BlockCraftingStorage" ), BlockCraftingStorage4k( "BlockCraftingStorage4k" ), BlockCraftingStorage16k( "BlockCraftingStorage16k" ), BlockCraftingStorage64k( "BlockCraftingStorage64k" ),
|
||||
|
||||
BlockCraftingAcceleratorFit("BlockCraftingAcceleratorFit"),
|
||||
BlockCraftingAcceleratorFit( "BlockCraftingAcceleratorFit" ),
|
||||
|
||||
BlockCraftingMonitorFit_Light("BlockCraftingMonitorFit_Light"), BlockCraftingMonitorFit_Dark("BlockCraftingMonitorFit_Dark"), BlockCraftingMonitorFit_Medium(
|
||||
"BlockCraftingMonitorFit_Medium"),
|
||||
BlockCraftingMonitorFit_Light( "BlockCraftingMonitorFit_Light" ), BlockCraftingMonitorFit_Dark( "BlockCraftingMonitorFit_Dark" ), BlockCraftingMonitorFit_Medium( "BlockCraftingMonitorFit_Medium" ),
|
||||
|
||||
BlockCraftingStorage1kFit("BlockCraftingStorageFit"), BlockCraftingStorage4kFit("BlockCraftingStorage4kFit"), BlockCraftingStorage16kFit(
|
||||
"BlockCraftingStorage16kFit"), BlockCraftingStorage64kFit("BlockCraftingStorage64kFit"),
|
||||
BlockCraftingStorage1kFit( "BlockCraftingStorageFit" ), BlockCraftingStorage4kFit( "BlockCraftingStorage4kFit" ), BlockCraftingStorage16kFit( "BlockCraftingStorage16kFit" ), BlockCraftingStorage64kFit( "BlockCraftingStorage64kFit" ),
|
||||
|
||||
BlockCraftingUnitRing("BlockCraftingUnitRing"), BlockCraftingUnitRingLongRotated("BlockCraftingUnitRingLongRotated"), BlockCraftingUnitRingLong(
|
||||
"BlockCraftingUnitRingLong"), BlockCraftingUnitFit("BlockCraftingUnitFit"),
|
||||
BlockCraftingUnitRing( "BlockCraftingUnitRing" ), BlockCraftingUnitRingLongRotated( "BlockCraftingUnitRingLongRotated" ), BlockCraftingUnitRingLong( "BlockCraftingUnitRingLong" ), BlockCraftingUnitFit( "BlockCraftingUnitFit" ),
|
||||
|
||||
BlockCraftingMonitorOuter("BlockCraftingMonitorOuter"), BlockCraftingFitSolid("BlockCraftingFitSolid"),
|
||||
BlockCraftingMonitorOuter( "BlockCraftingMonitorOuter" ), BlockCraftingFitSolid( "BlockCraftingFitSolid" ),
|
||||
|
||||
BlockPaint2("BlockPaint2"), BlockPaint3("BlockPaint3");
|
||||
BlockPaint2( "BlockPaint2" ), BlockPaint3( "BlockPaint3" );
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
ExtraBlockTextures( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static ResourceLocation GuiTexture( String string )
|
||||
{
|
||||
return new ResourceLocation( "appliedenergistics2", "textures/" + string );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
ExtraBlockTextures( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
public void registerIcon( TextureMap map )
|
||||
{
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -26,46 +27,48 @@ import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
public enum ExtraItemTextures
|
||||
{
|
||||
White("White"), ItemPaintBallShimmer("ItemPaintBallShimmer"),
|
||||
White( "White" ), ItemPaintBallShimmer( "ItemPaintBallShimmer" ),
|
||||
|
||||
ToolColorApplicatorTip_Medium("ToolColorApplicatorTip_Medium"),
|
||||
ToolColorApplicatorTip_Medium( "ToolColorApplicatorTip_Medium" ),
|
||||
|
||||
ToolColorApplicatorTip_Dark("ToolColorApplicatorTip_Dark"),
|
||||
ToolColorApplicatorTip_Dark( "ToolColorApplicatorTip_Dark" ),
|
||||
|
||||
ToolColorApplicatorTip_Light("ToolColorApplicatorTip_Light");
|
||||
ToolColorApplicatorTip_Light( "ToolColorApplicatorTip_Light" );
|
||||
|
||||
final private String name;
|
||||
public IIcon IIcon;
|
||||
|
||||
public static ResourceLocation GuiTexture(String string)
|
||||
ExtraItemTextures( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static ResourceLocation GuiTexture( String string )
|
||||
{
|
||||
return new ResourceLocation( "appliedenergistics2", "textures/" + string );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationItemsTexture ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
ExtraItemTextures( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
public void registerIcon( TextureMap map )
|
||||
{
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
|
||||
public class FlippableIcon implements IIcon
|
||||
{
|
||||
|
||||
@@ -27,9 +29,10 @@ public class FlippableIcon implements IIcon
|
||||
boolean flip_u;
|
||||
boolean flip_v;
|
||||
|
||||
public FlippableIcon(IIcon o) {
|
||||
public FlippableIcon( IIcon o )
|
||||
{
|
||||
|
||||
if ( o == null )
|
||||
if( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
this.original = o;
|
||||
@@ -52,7 +55,7 @@ public class FlippableIcon implements IIcon
|
||||
@Override
|
||||
public float getMinU()
|
||||
{
|
||||
if ( this.flip_u )
|
||||
if( this.flip_u )
|
||||
return this.original.getMaxU();
|
||||
return this.original.getMinU();
|
||||
}
|
||||
@@ -60,15 +63,15 @@ public class FlippableIcon implements IIcon
|
||||
@Override
|
||||
public float getMaxU()
|
||||
{
|
||||
if ( this.flip_u )
|
||||
if( this.flip_u )
|
||||
return this.original.getMinU();
|
||||
return this.original.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double px)
|
||||
public float getInterpolatedU( double px )
|
||||
{
|
||||
if ( this.flip_u )
|
||||
if( this.flip_u )
|
||||
return this.original.getInterpolatedU( 16 - px );
|
||||
return this.original.getInterpolatedU( px );
|
||||
}
|
||||
@@ -76,7 +79,7 @@ public class FlippableIcon implements IIcon
|
||||
@Override
|
||||
public float getMinV()
|
||||
{
|
||||
if ( this.flip_v )
|
||||
if( this.flip_v )
|
||||
return this.original.getMaxV();
|
||||
return this.original.getMinV();
|
||||
}
|
||||
@@ -84,15 +87,15 @@ public class FlippableIcon implements IIcon
|
||||
@Override
|
||||
public float getMaxV()
|
||||
{
|
||||
if ( this.flip_v )
|
||||
if( this.flip_v )
|
||||
return this.original.getMinV();
|
||||
return this.original.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double px)
|
||||
public float getInterpolatedV( double px )
|
||||
{
|
||||
if ( this.flip_v )
|
||||
if( this.flip_v )
|
||||
return this.original.getInterpolatedV( 16 - px );
|
||||
return this.original.getInterpolatedV( px );
|
||||
}
|
||||
@@ -108,17 +111,16 @@ public class FlippableIcon implements IIcon
|
||||
return this.original;
|
||||
}
|
||||
|
||||
public void setFlip(boolean u, boolean v)
|
||||
public void setFlip( boolean u, boolean v )
|
||||
{
|
||||
this.flip_u = u;
|
||||
this.flip_v = v;
|
||||
}
|
||||
|
||||
public int setFlip(int orientation)
|
||||
public int setFlip( int orientation )
|
||||
{
|
||||
this.flip_u = (orientation & 8) == 8;
|
||||
this.flip_v = (orientation & 16) == 16;
|
||||
this.flip_u = ( orientation & 8 ) == 8;
|
||||
this.flip_v = ( orientation & 16 ) == 16;
|
||||
return orientation & 7;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,77 +18,27 @@
|
||||
|
||||
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 final IIcon p;
|
||||
|
||||
public FullIcon(IIcon o) {
|
||||
public FullIcon( IIcon o )
|
||||
{
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
if( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
this.p = o;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.p.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return this.p.getMaxU();
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.p.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return this.p.getMaxV();
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
@@ -101,4 +51,56 @@ public class FullIcon implements IIcon
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinU()
|
||||
{
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.p.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedU( double d0 )
|
||||
{
|
||||
if( d0 > 8.0 )
|
||||
return this.p.getMaxU();
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinV()
|
||||
{
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.p.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedV( double d0 )
|
||||
{
|
||||
if( d0 > 8.0 )
|
||||
return this.p.getMaxV();
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -26,20 +27,15 @@ import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
public class MissingIcon implements IIcon
|
||||
{
|
||||
|
||||
final boolean isBlock;
|
||||
|
||||
public MissingIcon(Object forWhat) {
|
||||
this.isBlock = forWhat instanceof Block;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMissing()
|
||||
public MissingIcon( Object forWhat )
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager()
|
||||
.getTexture( this.isBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
||||
this.isBlock = forWhat instanceof Block;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +44,12 @@ public class MissingIcon implements IIcon
|
||||
return this.getMissing().getIconWidth();
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public IIcon getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( this.isBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
@@ -67,7 +69,7 @@ public class MissingIcon implements IIcon
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double var1)
|
||||
public float getInterpolatedU( double var1 )
|
||||
{
|
||||
return this.getMissing().getInterpolatedU( var1 );
|
||||
}
|
||||
@@ -85,7 +87,7 @@ public class MissingIcon implements IIcon
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double var1)
|
||||
public float getInterpolatedV( double var1 )
|
||||
{
|
||||
return this.getMissing().getInterpolatedV( var1 );
|
||||
}
|
||||
@@ -95,5 +97,4 @@ public class MissingIcon implements IIcon
|
||||
{
|
||||
return this.getMissing().getIconName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@@ -31,75 +33,17 @@ public class OffsetIcon implements IIcon
|
||||
|
||||
private final IIcon p;
|
||||
|
||||
public OffsetIcon(IIcon o, float x, float y) {
|
||||
public OffsetIcon( IIcon o, float x, float y )
|
||||
{
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
if( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
this.p = o;
|
||||
this.offsetX = x;
|
||||
this.offsetY = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return this.u( 0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.u( 16 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return this.u( d0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return this.v( 0 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.v( 16 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return this.v( d0 - this.offsetY );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
@@ -112,4 +56,62 @@ public class OffsetIcon implements IIcon
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinU()
|
||||
{
|
||||
return this.u( 0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.u( 16 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedU( double d0 )
|
||||
{
|
||||
return this.u( d0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinV()
|
||||
{
|
||||
return this.v( 0 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.v( 16 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedV( double d0 )
|
||||
{
|
||||
return this.v( d0 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
private float v( double d )
|
||||
{
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u( double d )
|
||||
{
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@@ -30,82 +32,16 @@ public class TaughtIcon implements IIcon
|
||||
|
||||
private final IIcon p;
|
||||
|
||||
public TaughtIcon(IIcon o, float tightness) {
|
||||
public TaughtIcon( IIcon o, float tightness )
|
||||
{
|
||||
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
if( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
this.p = o;
|
||||
this.tightness = tightness * 0.4f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return this.u( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.u( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return this.u( d0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return this.v( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.v( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return this.v( d0 );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= this.tightness;
|
||||
if ( d > 8 )
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= this.tightness;
|
||||
if ( d > 8 )
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
@@ -118,4 +54,70 @@ public class TaughtIcon implements IIcon
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinU()
|
||||
{
|
||||
return this.u( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxU()
|
||||
{
|
||||
return this.u( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedU( double d0 )
|
||||
{
|
||||
return this.u( d0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMinV()
|
||||
{
|
||||
return this.v( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getMaxV()
|
||||
{
|
||||
return this.v( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public float getInterpolatedV( double d0 )
|
||||
{
|
||||
return this.v( d0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getIconName()
|
||||
{
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
private float v( double d )
|
||||
{
|
||||
if( d < 8 )
|
||||
d -= this.tightness;
|
||||
if( d > 8 )
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u( double d )
|
||||
{
|
||||
if( d < 8 )
|
||||
d -= this.tightness;
|
||||
if( d > 8 )
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,38 +18,40 @@
|
||||
|
||||
package appeng.client.texture;
|
||||
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
|
||||
public class TmpFlippableIcon extends FlippableIcon
|
||||
{
|
||||
|
||||
private static final IIcon NULL_ICON = new MissingIcon( Blocks.diamond_block );
|
||||
|
||||
public TmpFlippableIcon() {
|
||||
public TmpFlippableIcon()
|
||||
{
|
||||
super( NULL_ICON );
|
||||
}
|
||||
|
||||
public void setOriginal(IIcon i)
|
||||
public void setOriginal( IIcon i )
|
||||
{
|
||||
this.setFlip( false, false );
|
||||
|
||||
while (i instanceof FlippableIcon)
|
||||
while( i instanceof FlippableIcon )
|
||||
{
|
||||
FlippableIcon fi = (FlippableIcon) i;
|
||||
if ( fi.flip_u )
|
||||
if( fi.flip_u )
|
||||
this.flip_u = !this.flip_u;
|
||||
|
||||
if ( fi.flip_v )
|
||||
if( fi.flip_v )
|
||||
this.flip_v = !this.flip_v;
|
||||
|
||||
i = fi.getOriginal();
|
||||
}
|
||||
|
||||
if ( i == null )
|
||||
if( i == null )
|
||||
this.original = NULL_ICON;
|
||||
else
|
||||
this.original = i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user