Texture fixes for @CyanideX
This commit is contained in:
parent
9d22b7277c
commit
97bd7198d1
2 changed files with 24 additions and 13 deletions
|
@ -183,7 +183,7 @@ public class MekanismRenderer
|
||||||
|
|
||||||
for(DefIcon def : defaults)
|
for(DefIcon def : defaults)
|
||||||
{
|
{
|
||||||
if(def.icons.contains(side.ordinal()+6))
|
if(def.icons.contains(side.ordinal()+6) && def.overridesInactive)
|
||||||
{
|
{
|
||||||
textures[side.ordinal()+6] = def.defIcon;
|
textures[side.ordinal()+6] = def.defIcon;
|
||||||
found = true;
|
found = true;
|
||||||
|
@ -219,6 +219,10 @@ public class MekanismRenderer
|
||||||
|
|
||||||
public List<Integer> icons = new ArrayList<Integer>();
|
public List<Integer> icons = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
/** If this DefIcon should be prioritized over a machine's side-specific off texture
|
||||||
|
* if no on texture is present. */
|
||||||
|
public boolean overridesInactive = true;
|
||||||
|
|
||||||
public DefIcon(IIcon icon, int... is)
|
public DefIcon(IIcon icon, int... is)
|
||||||
{
|
{
|
||||||
defIcon = icon;
|
defIcon = icon;
|
||||||
|
@ -229,6 +233,13 @@ public class MekanismRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DefIcon setOverrides(boolean b)
|
||||||
|
{
|
||||||
|
overridesInactive = b;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public static DefIcon getAll(IIcon icon)
|
public static DefIcon getAll(IIcon icon)
|
||||||
{
|
{
|
||||||
return new DefIcon(icon, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
|
return new DefIcon(icon, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
|
||||||
|
|
|
@ -199,20 +199,20 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||||
for(RecipeType type : RecipeType.values())
|
for(RecipeType type : RecipeType.values())
|
||||||
{
|
{
|
||||||
MekanismRenderer.loadDynamicTextures(register, "factory/basic/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.BASIC.getName() + type.getUnlocalizedName() + MachineType.BASIC_FACTORY.name, factoryIcons[0][type.ordinal()],
|
MekanismRenderer.loadDynamicTextures(register, "factory/basic/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.BASIC.getName() + type.getUnlocalizedName() + MachineType.BASIC_FACTORY.name, factoryIcons[0][type.ordinal()],
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryFront"), 2),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryFront"), 2).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryTop"), 1),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryTop"), 1).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryBottom"), 0),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryBottom"), 0).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactorySide"), 3, 4, 5));
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactorySide"), 3, 4, 5).setOverrides(false));
|
||||||
MekanismRenderer.loadDynamicTextures(register, "factory/advanced/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ADVANCED.getName() + type.getUnlocalizedName() + MachineType.ADVANCED_FACTORY.name, factoryIcons[1][type.ordinal()],
|
MekanismRenderer.loadDynamicTextures(register, "factory/advanced/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ADVANCED.getName() + type.getUnlocalizedName() + MachineType.ADVANCED_FACTORY.name, factoryIcons[1][type.ordinal()],
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryFront"), 2),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryFront"), 2).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryTop"), 1),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryTop"), 1).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryBottom"), 0),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryBottom"), 0).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactorySide"), 3, 4, 5));
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactorySide"), 3, 4, 5).setOverrides(false));
|
||||||
MekanismRenderer.loadDynamicTextures(register, "factory/elite/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ELITE.getName() + type.getUnlocalizedName() + MachineType.ELITE_FACTORY.name, factoryIcons[2][type.ordinal()],
|
MekanismRenderer.loadDynamicTextures(register, "factory/elite/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ELITE.getName() + type.getUnlocalizedName() + MachineType.ELITE_FACTORY.name, factoryIcons[2][type.ordinal()],
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryFront"), 2),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryFront"), 2).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryTop"), 1),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryTop"), 1).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryBottom"), 0),
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryBottom"), 0).setOverrides(false),
|
||||||
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactorySide"), 3, 4, 5));
|
DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactorySide"), 3, 4, 5).setOverrides(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
MekanismRenderer.loadDynamicTextures(register, "purification_chamber/" + MachineType.PURIFICATION_CHAMBER.name, icons[9], def);
|
MekanismRenderer.loadDynamicTextures(register, "purification_chamber/" + MachineType.PURIFICATION_CHAMBER.name, icons[9], def);
|
||||||
|
|
Loading…
Reference in a new issue