Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
fixed the armor texture
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Aug 18, 2014
1 parent 22fde7f commit 52f0b21
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/common/blocks/CementBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void registerBlockIcons(IIconRegister iconRegister) {
this.icons = new IIcon[TEXTURE_NAME.length];

for (int i = 0; i < this.icons.length; ++i) {
this.icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + "cement/" + "cement_" + TEXTURE_NAME[i]);
this.icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + "cement/" + "cement_" + TEXTURE_NAME[i]);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ public void registerBlockIcons(IIconRegister iconRegister) {
icons = new IIcon[TEXTURE_NAMES.length];

for (int i = 0; i < icons.length; ++i)
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + TEXTURE_NAMES[i] + "_block");
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + TEXTURE_NAMES[i] + "_block");
}
}
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/common/blocks/HighOvenBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void registerBlockIcons(IIconRegister iconRegister) {
icons = new IIcon[textureNames.length];

for (int i = 0; i < icons.length; ++i)
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + textureNames[i]);
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + textureNames[i]);
}

private void spawnHighGolem(World world, int x, int y, int z) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public void registerBlockIcons(IIconRegister iconRegister) {
icons = new IIcon[textureNames.length];

for (int i = 0; i < icons.length; ++i)
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + textureNames[i]);
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + textureNames[i]);
}
}
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/common/blocks/TSBaseBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public void getSubBlocks(Item block, CreativeTabs tab, List list) {
public void registerBlockIcons(IIconRegister iconRegister) {
icons = new IIcon[textureNames.length];
for (int i = 0; i < icons.length; ++i)
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + textureNames[i]);
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + textureNames[i]);
}
}
4 changes: 2 additions & 2 deletions src/main/java/tsteelworks/common/blocks/TSFluidBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public int getRenderBlockPass() {

@Override
public void registerBlockIcons(IIconRegister iconRegister) {
stillIcon = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + texture);
flowIcon = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + texture + "_flow");
stillIcon = iconRegister.registerIcon(TSRepo.NAMESPACE + texture);
flowIcon = iconRegister.registerIcon(TSRepo.NAMESPACE + texture + "_flow");
}

@Override
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tsteelworks/common/items/TSArmorBasic.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ public TSArmorBasic(ArmorMaterial par2EnumArmorMaterial, int par3, String textur

@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
return TSRepo.TEXTURE_DIR + "textures/armor/" + textureName + "_" + type + ".png";
return TSRepo.NAMESPACE + "textures/armor/" + textureName + "_" + (slot == 2 ? 2 : 1) + ".png";
}

@Override
public void registerIcons(IIconRegister par1IconRegister) {
itemIcon = par1IconRegister.registerIcon(TSRepo.TEXTURE_DIR + "armor/" + textureName + "_" + (armorType == 0 ? "helmet" : armorType == 1 ? "chestplate" : armorType == 2 ? "leggings" : armorType == 3 ? "boots" : "helmet"));
final String[] armorTypes = { "helmet", "chestplate", "leggings", "boots" };
itemIcon = par1IconRegister.registerIcon(TSRepo.NAMESPACE + "armor/" + textureName + "_" + armorTypes[armorType]);
}
}
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/common/items/TSCraftingItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public void registerIcons(IIconRegister iconRegister) {

for (int i = 0; i < icons.length; ++i)
if (!(textureNames[i].equals("")))
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + folder + textureNames[i]);
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + folder + textureNames[i]);
}
}
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/lib/TSRepo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class TSRepo {
public static final String MOD_SERV_PROXY = "tsteelworks.common.core.TSCommonProxy";
public static final String MOD_CLIENT_PROXY = "tsteelworks.client.core.TSClientProxy";
public static final String MOD_REQUIRE = "required-after:TConstruct;required-after:Forge@[10.13,);required-after:cookiecore@[1.2.0,);after:CoFHCore,NotEnoughItems";
public static final String TEXTURE_DIR = "tsteelworks:";
public static final String NAMESPACE = "tsteelworks:";

public class NBTNames {
// Shared
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tsteelworks/lib/blocks/TSInventoryBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void registerBlockIcons(IIconRegister iconRegister) {
icons = new IIcon[textureNames.length];

for (int i = 0; i < icons.length; ++i)
icons[i] = iconRegister.registerIcon(TSRepo.TEXTURE_DIR + textureNames[i]);
icons[i] = iconRegister.registerIcon(TSRepo.NAMESPACE + textureNames[i]);
}

public static boolean isActive(IBlockAccess world, int x, int y, int z) {
Expand Down

0 comments on commit 52f0b21

Please sign in to comment.