i just solved the problem by replacing with some of my old code, now to isolate it and give u a solution
here is the code i have changed, just note that i have changed your redarmor textures to some generic armor textures i used so i could make sure all the armor rendered properly. just change the names of the armor back to what it was
Main Mod File
package SpectrumCrafter.redstonemod;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = RedstoneModInfo.ID, name = RedstoneModInfo.NAME, version = RedstoneModInfo.VERS)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class RedstoneMod
{
//Redstone Material
public static EnumArmorMaterial redarmor = EnumHelper.addArmorMaterial("Redstone", 40 , new int[]{5, 10, 8, 5}, 25);
//Redstone Armor
public final static Item redHelm = new RedArmor(4506, redarmor, 5, 0).setUnlocalizedName("redstoneHelmet");
public final static Item redChest = new RedArmor(4507, redarmor, 5, 1).setUnlocalizedName("redstoneChestplate");
public final static Item redLeg = new RedArmor(4508, redarmor, 5, 2).setUnlocalizedName("redstoneLeggings");
public final static Item redBoot = new RedArmor(4509, redarmor, 5, 3).setUnlocalizedName("redstoneBoots");
// The instance of your mod that Forge uses.
@Instance(RedstoneModInfo.NAME)
public static RedstoneMod instance;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide = RedstoneModInfo.CLIENTPROXY + "ClientProxy", serverSide = RedstoneModInfo.COMMONPROXY + "CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
// Stub Method
}
@EventHandler
public void load(FMLInitializationEvent event)
{
proxy.registerRenderers();
RenderingRegistry.addNewArmourRendererPrefix("redarmor");
//ItemStacks
/*
ItemStack redIngot = new ItemStack(RedstoneMod.redstoneIngot);
ItemStack diamond = new ItemStack(Item.diamond);
ItemStack redstone = new ItemStack(Item.redstone);
ItemStack stick = new ItemStack(Item.stick);
ItemStack redSword = new ItemStack(RedstoneMod.redstoneSword);
ItemStack redAxe = new ItemStack(RedstoneMod.redstoneAxe);
ItemStack redSpade = new ItemStack(RedstoneMod.redstoneSpade);
ItemStack redHoe = new ItemStack(RedstoneMod.redstoneHoe);
ItemStack redPick = new ItemStack(RedstoneMod.redstonePickaxe);
*/
//Test Armor
GameRegistry.registerItem(redHelm, "redstoneHelmet");
LanguageRegistry.addName(redHelm, "Redstone Helmet");
GameRegistry.registerItem(redChest, "redstoneChestplate");
LanguageRegistry.addName(redChest, "Redstone Chestplate");
GameRegistry.registerItem(redLeg, "redstoneLeggings");
LanguageRegistry.addName(redLeg, "Redstone Leggings");
GameRegistry.registerItem(redBoot, "redstoneBoots");
LanguageRegistry.addName(redBoot, "Redstone Boots");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
// Stub Method
}
}
RedArmor File
package SpectrumCrafter.redstonemod;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class RedArmor extends ItemArmor {
public RedArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
if (stack.itemID == RedstoneMod.redHelm.itemID || stack.itemID == RedstoneMod.redChest.itemID || stack.itemID == RedstoneMod.redBoot.itemID) {
return "basemod:textures/armor/titaniumArmor_1.png";
}
if (stack.itemID == RedstoneMod.redLeg.itemID) {
return "basemod:textures/armor/titaniumArmor_2.png";
}
else {
return null;
}
}
public void registerIcons(IconRegister reg) {
if (itemID == RedstoneMod.redHelm.itemID) {
this.itemIcon = reg.registerIcon("basemod:titaniumHelmet");
}
if (itemID == RedstoneMod.redChest.itemID) {
this.itemIcon = reg.registerIcon("basemod:titaniumChestplate");
}
if (itemID == RedstoneMod.redLeg.itemID) {
this.itemIcon = reg.registerIcon("basemod:titaniumLeggings");
}
if (itemID == RedstoneMod.redBoot.itemID) {
this.itemIcon = reg.registerIcon("basemod:titaniumBoots");
}
}
}
Thank you - I don't have the chance to check it out now but ill make sure I get back to you tomorrow!
i dont know why your original code isnt working, as its the same as mine.
Double check it for tiny mistakes that you might have made; i have encountered that problem a lot more than i would like to have, but hey, thats coding
Ok, I've made a few edits - No success. Im now just giving out the code and the textures in hope someone will download them and fix them.
I booked marked these people, I also need ideas, and some others options, because what if (MODDERNAME) doesn't have a tutorial on how to (SOME PART OF MODDING), I have other options to choose from!
I usually come to here when kenneth doesnt have a video - After searching youtube of course
this code is wrong
case 1:
this.texturePath += type + "redArmor_1";
this.iconPath +=type + "redChest";break;
do not change it unless you want the armour to have its own class
the code should be like this
private void SetArmorType(String type, int par4){switch(par4){
case 0:this.texturePath += type + "_layer_1.png";this.iconPath +=type + "_helmet";
break;
case 1:this.texturePath += type + "_layer_1.png";this.iconPath +=type + "_chest";
break;
case 2:this.texturePath += type + "_layer_2.png";this.iconPath +=type + "_leggings";
break;
case 3:this.texturePath += type + "_layer_1.png";this.iconPath +=type + "_boots";
break;
for me to help you even more can you provide me your console log that shows up when you start running the game
OK, I did what you said - I renamed the texture files to _chest and _layer_1 - Still not working.
RedArmor:
package SpectrumCrafter.redstonemod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class RedArmor extends ItemArmor{
private String texturePath = RedstoneModInfo.NAME.toLowerCase() + ":" + "textures/model/armor/";
private String iconPath = (RedstoneModInfo.NAME.toLowerCase() + ":");
public RedArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, String type) {
super(par1, par2EnumArmorMaterial, par3, par4);
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTabs.tabCombat);
this.SetArmorType(type.toLowerCase(), par4);
}
// 0 = helmet
// 1 = chestplate
// 2 = leggings
// 3 = boots
private void SetArmorType(String type, int par4){
switch(par4){
case 0:
this.texturePath += type + "_layer_1";
this.iconPath +=type + "_helmet";
break;
case 1:
this.texturePath += type + "_layer_1";
this.iconPath +=type + "_chest";
break;
case 2:
this.texturePath += type + "_layer_2";
this.iconPath +=type + "_leggings";
break;
case 3:
this.texturePath += type + "_layer_1";
this.iconPath +=type + "_boots";
break;
}
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister register){
itemIcon = register.registerIcon(RedstoneModInfo.NAME.toLowerCase() + ":" + this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".")+1));
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer){
return this.texturePath;
}
}
Console:
Feb 15, 2014 1:17:45 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Feb 15, 2014 1:17:45 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
Feb 15, 2014 1:17:45 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Forge Mod Loader version 6.4.45.953 for Minecraft 1.6.4 loading
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_65, running on Mac OS X:x86_64:10.8.5, installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-02-15 13:17:45 [INFO] [STDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg
2014-02-15 13:17:45 [SEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
2014-02-15 13:17:45 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
2014-02-15 13:17:46 [INFO] [STDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg
2014-02-15 13:17:46 [INFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
2014-02-15 13:17:46 [INFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}
2014-02-15 13:17:46 [INFO] [Minecraft-Client] Setting user: Player590
2014-02-15 13:17:47 [INFO] [Minecraft-Client] LWJGL Version: 2.9.0
2014-02-15 13:17:48 [INFO] [Minecraft-Client] Reloading ResourceManager: Default
2014-02-15 13:17:48 [INFO] [MinecraftForge] Attempting early MinecraftForge initialization
2014-02-15 13:17:48 [INFO] [STDOUT] MinecraftForge v9.11.1.953 Initialized
2014-02-15 13:17:48 [INFO] [ForgeModLoader] MinecraftForge v9.11.1.953 Initialized
2014-02-15 13:17:48 [INFO] [STDOUT] Replaced 112 ore recipies
2014-02-15 13:17:48 [INFO] [MinecraftForge] Completed early MinecraftForge initialization
2014-02-15 13:17:48 [INFO] [ForgeModLoader] Reading custom logging properties from /Users/ginimars/Desktop/MC Mods/mcp811/forge/mcp/jars/config/logging.properties
2014-02-15 13:17:48 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2014-02-15 13:17:48 [INFO] [ForgeModLoader] Searching /Users/ginimars/Desktop/MC Mods/mcp811/forge/mcp/jars/mods for mods
2014-02-15 13:17:50 [INFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2014-02-15 13:17:50 [INFO] [mcp] Activating mod mcp
2014-02-15 13:17:50 [INFO] [FML] Activating mod FML
2014-02-15 13:17:50 [INFO] [Forge] Activating mod Forge
2014-02-15 13:17:50 [INFO] [Redstone Mod] Activating mod Redstone Mod
2014-02-15 13:17:50 [INFO] [Basic] Activating mod Basic
2014-02-15 13:17:50 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:50 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:50 [WARNING] [RedstoneMod] Mod RedstoneMod is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:50 [WARNING] [Basic] Mod Basic is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:50 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:RedstoneMod, FMLFileResourcePack:Basic
2014-02-15 13:17:50 [INFO] [ForgeModLoader] Registering Forge Packet Handler
2014-02-15 13:17:50 [INFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2014-02-15 13:17:50 [INFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstoneIngot with ID 759 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstoneSword with ID 4756 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstoneAxe with ID 4757 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstoneSpade with ID 4758 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstoneHoe with ID 4759 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedstonePickaxe with ID 4760 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.MSProj with ID 4761 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedArmor with ID 4762 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedArmor with ID 4763 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedArmor with ID 4764 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class SpectrumCrafter.redstonemod.RedArmor with ID 4765 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class tutorial.basic.GenericItem with ID 5256 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class tutorial.basic.GenericItem with ID 5257 owned by mod Redstone Mod, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:50 [SEVERE] [ForgeModLoader] Found anonymous item of class tutorial.basic.GenericSword with ID 5258 owned by mod Basic, this item will NOT survive a 1.7 upgrade!
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_501_genericOre.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneBoots.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneHelmet.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneLeggings.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneChestplate.png
2014-02-15 13:17:51 [INFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 5 mods
2014-02-15 13:17:51 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:51 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:51 [WARNING] [RedstoneMod] Mod RedstoneMod is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:51 [WARNING] [Basic] Mod Basic is missing a pack.mcmeta file, things may not work well
2014-02-15 13:17:51 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:RedstoneMod, FMLFileResourcePack:Basic
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneBoots.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneHelmet.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneLeggings.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: redstonemod:textures/items/redstoneChestplate.png
2014-02-15 13:17:51 [SEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_501_genericOre.png
2014-02-15 13:17:52 [INFO] [STDOUT]
2014-02-15 13:17:52 [INFO] [STDOUT] Starting up SoundSystem...
2014-02-15 13:17:52 [INFO] [STDOUT] Initializing LWJGL OpenAL
2014-02-15 13:17:52 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2014-02-15 13:17:52 [INFO] [STDOUT] OpenAL initialized.
2014-02-15 13:17:52 [INFO] [STDOUT]
2014-02-15 13:17:53 [SEVERE] [Minecraft-Client] Realms: Server not available!
2014-02-15 13:17:53 [INFO] [Minecraft-Client] Stopping!
2014-02-15 13:17:53 [INFO] [STDOUT]
2014-02-15 13:17:53 [INFO] [STDOUT] SoundSystem shutting down...
2014-02-15 13:17:53 [INFO] [STDOUT] Author: Paul Lamb, www.paulscode.com
2014-02-15 13:17:53 [INFO] [STDOUT]
public class ItemCustomArmor extends ItemArmor{
private String texturePath = References.MODID + ":" + "textures/model/armor/";
private String iconPath = (References.MODID + ":");
public ItemCustomArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, String type) {
super(par1, par2EnumArmorMaterial, par3, par4);
this.setMaxStackSize(1);
this.setCreativeTab(MoreToMinecraft.MoreToMinecraftTab);
this.SetArmorType(type.toLowerCase(), par4);
}
// 0 = helmet
// 1 = chestplate
// 2 = leggings
// 3 = boots
private void SetArmorType(String type, int par4){
switch(par4){
case 0:
this.texturePath += type + "_layer_1.png";
this.iconPath +=type + "_helmet";
break;
case 1:
this.texturePath += type + "_layer_1.png";
this.iconPath +=type + "_chest";
break;
case 2:
this.texturePath += type + "_layer_2.png";
this.iconPath +=type + "_leggings";
break;
case 3:
this.texturePath += type + "_layer_1.png";
this.iconPath +=type + "_boots";
break;
}
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister register){
itemIcon = register.registerIcon(References.MODID + ":" + this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".")+1));
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer){
return this.texturePath;
}
}
Ok, so its still not working and now the chestplate Item texture is also gone.
When I added your code my definers (In main class) said that they needed a string - I didnt know what to put so I just put "redarmor". It seemed to take it but I dont know if it was right.
Updated Code:
Main:
package SpectrumCrafter.redstonemod;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = RedstoneModInfo.ID, name = RedstoneModInfo.NAME, version = RedstoneModInfo.VERS)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class RedstoneMod
{
//Redstone Material
public static EnumToolMaterial redstone = EnumHelper.addToolMaterial("Redstone", 3, 2000, 8.0F, 8.0F, 25);
public static EnumArmorMaterial redarmor = EnumHelper.addArmorMaterial("Redstone", 40 , new int[]{5, 10, 8, 5}, 25);
public static EnumToolMaterial msproj = EnumHelper.addToolMaterial("MSProj", 999, 9999, 999, 999, 999);
public static EnumToolMaterial quinn = EnumHelper.addToolMaterial("Quinn", 99999, 99999, 99999, 99999, 99999);
//Redstone Tools
public final static Item redstoneSword = new RedstoneSword(4500, redstone);
public final static Item redstoneAxe = new RedstoneAxe(4501, redstone);
public final static Item redstoneSpade = new RedstoneSpade(4502, redstone);
public final static Item redstoneHoe = new RedstoneHoe(4503, redstone);
public final static Item redstonePickaxe = new RedstonePickaxe(4504, redstone);
public final static Item msprojSword = new MSProj(4505, msproj);
//Redstone Armor
public final static Item redHelm = new RedArmor(4506, redarmor, 5, 0, "redarmor").setUnlocalizedName("redstoneHelmet");
public final static Item redChest = new RedArmor(4507, redarmor, 5, 1, "redArmor").setUnlocalizedName("redstoneChestplate");
public final static Item redLeg = new RedArmor(4508, redarmor, 5, 2, "redArmor").setUnlocalizedName("redstoneLeggings");
public final static Item redBoot = new RedArmor(4509, redarmor, 5, 3, "redArmor").setUnlocalizedName("redstoneBoots");
//Redstone Item
public static final Item redstoneIngot = new RedstoneIngot(503);
// The instance of your mod that Forge uses.
@Instance(RedstoneModInfo.NAME)
public static RedstoneMod instance;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide = RedstoneModInfo.CLIENTPROXY + "ClientProxy", serverSide = RedstoneModInfo.COMMONPROXY + "CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
// Stub Method
}
@EventHandler
public void load(FMLInitializationEvent event)
{
proxy.registerRenderers();
RenderingRegistry.addNewArmourRendererPrefix("redarmor");
//ItemStacks
ItemStack redIngot = new ItemStack(RedstoneMod.redstoneIngot);
ItemStack diamond = new ItemStack(Item.diamond);
ItemStack redstone = new ItemStack(Item.redstone);
ItemStack stick = new ItemStack(Item.stick);
ItemStack redSword = new ItemStack(RedstoneMod.redstoneSword);
ItemStack redAxe = new ItemStack(RedstoneMod.redstoneAxe);
ItemStack redSpade = new ItemStack(RedstoneMod.redstoneSpade);
ItemStack redHoe = new ItemStack(RedstoneMod.redstoneHoe);
ItemStack redPick = new ItemStack(RedstoneMod.redstonePickaxe);
//Redstone Ingot
GameRegistry.registerItem(redstoneIngot, "redstoneItem");
LanguageRegistry.addName(redstoneIngot, "Redstone Ingot");
GameRegistry.addRecipe(redIngot, "***", "*A*", "***", '*', redstone, 'A', diamond);
//Redstone Sword
GameRegistry.registerItem(redstoneSword, "redstoneSword");
LanguageRegistry.addName(redstoneSword, "Redstone Sword");
GameRegistry.addRecipe(redSword, " * ", " * ", "*A*", '*', redIngot, 'A', stick);
//Redstone Axe
GameRegistry.registerItem(redstoneAxe, "redstoneAxe");
LanguageRegistry.addName(redstoneAxe, "Redstone Axe");
GameRegistry.addRecipe(redAxe, "*A*", "*A ", " A ", '*', redIngot, 'A', stick);
//Redstone Spade (Shovel)
GameRegistry.registerItem(redstoneSpade, "redstoneSpade");
LanguageRegistry.addName(redstoneSpade, "Redstone Spade");
GameRegistry.addRecipe(redSpade, " * ", "*A*", " A ", '*', redIngot, 'A', stick );
//Redstone Hoe
GameRegistry.registerItem(redstoneHoe, "redstoneHoe");
LanguageRegistry.addName(redstoneHoe, "Redstone Hoe");
GameRegistry.addRecipe(redHoe, "** ", " A*", " A ", '*', redIngot, 'A', stick);
//Redstone Pickaxe
GameRegistry.registerItem(redstonePickaxe, "redstonePickaxe");
LanguageRegistry.addName(redstonePickaxe, "Redstone Pickaxe");
GameRegistry.addRecipe(redPick, "***", "*A*", " A ", '*', redIngot, 'A', stick );
//Test Armor
GameRegistry.registerItem(redHelm, "redstoneHelmet");
LanguageRegistry.addName(redHelm, "Redstone Helmet");
GameRegistry.registerItem(redChest, "redstoneChestplate");
LanguageRegistry.addName(redChest, "Redstone Chestplate");
GameRegistry.registerItem(redLeg, "redstoneLeggings");
LanguageRegistry.addName(redLeg, "Redstone Leggings");
GameRegistry.registerItem(redBoot, "redstoneBoots");
LanguageRegistry.addName(redBoot, "Redstone Boots");
//MS Project
GameRegistry.registerItem(msprojSword, "msprojSword");
LanguageRegistry.addName(msprojSword, "MS Project");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
// Stub Method
}
}
Definers (Excerpt from main class)
//Redstone Armor
public final static Item redHelm = new RedArmor(4506, redarmor, 5, 0, "redarmor").setUnlocalizedName("redstoneHelmet");
public final static Item redChest = new RedArmor(4507, redarmor, 5, 1, "redArmor").setUnlocalizedName("redstoneChestplate");
public final static Item redLeg = new RedArmor(4508, redarmor, 5, 2, "redArmor").setUnlocalizedName("redstoneLeggings");
public final static Item redBoot = new RedArmor(4509, redarmor, 5, 3, "redArmor").setUnlocalizedName("redstoneBoots");
RedArmor Class
package SpectrumCrafter.redstonemod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class RedArmor extends ItemArmor{
private String texturePath = RedstoneModInfo.NAME.toLowerCase() + ":" + "textures/model/armor/";
private String iconPath = (RedstoneModInfo.NAME.toLowerCase() + ":");
public RedArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, String type) {
super(par1, par2EnumArmorMaterial, par3, par4);
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTabs.tabCombat);
this.SetArmorType(type.toLowerCase(), par4);
}
// 0 = helmet
// 1 = chestplate
// 2 = leggings
// 3 = boots
private void SetArmorType(String type, int par4){
switch(par4){
case 0:
this.texturePath += type + "redArmor_1";
this.iconPath +=type + "_helmet";
break;
case 1:
this.texturePath += type + "redArmor_1";
this.iconPath +=type + "redChest";
break;
case 2:
this.texturePath += type + "_layer_2.png";
this.iconPath +=type + "_leggings";
break;
case 3:
this.texturePath += type + "_layer_1.png";
this.iconPath +=type + "_boots";
break;
}
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister register){
itemIcon = register.registerIcon(RedstoneModInfo.NAME.toLowerCase() + ":" + this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".")+1));
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer){
return this.texturePath;
}
Hello Guys, I've gotten into mod developing and I need help completing my first mod; the Redstone Mod. Anyways, I've ran into a little problem with rendering my armor. I've got the ITEM texture working fine (I've just only finished the chestplate texture) but Im trying to fix the texture when its on my body.
The current textures are in: /Desktop/MC Mods/mcp811/forge/mcp/eclipse/Minecraft/bin/assets/redstonemod/textures/models/armor/redArmor_1
(redArmor_2 isnt finished yet)
Main Class:
package SpectrumCrafter.redstonemod;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = RedstoneModInfo.ID, name = RedstoneModInfo.NAME, version = RedstoneModInfo.VERS)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class RedstoneMod
{
//Redstone Material
public static EnumToolMaterial redstone = EnumHelper.addToolMaterial("Redstone", 3, 2000, 8.0F, 8.0F, 25);
public static EnumArmorMaterial redarmor = EnumHelper.addArmorMaterial("Redstone", 40 , new int[]{5, 10, 8, 5}, 25);
public static EnumToolMaterial msproj = EnumHelper.addToolMaterial("MSProj", 999, 9999, 999, 999, 999);
//Redstone Tools
public final static Item redstoneSword = new RedstoneSword(4500, redstone);
public final static Item redstoneAxe = new RedstoneAxe(4501, redstone);
public final static Item redstoneSpade = new RedstoneSpade(4502, redstone);
public final static Item redstoneHoe = new RedstoneHoe(4503, redstone);
public final static Item redstonePickaxe = new RedstonePickaxe(4504, redstone);
public final static Item msprojSword = new MSProj(4505, msproj);
//Redstone Armor
public final static Item redHelm = new RedArmor(4506, redarmor, 5, 0).setUnlocalizedName("redstoneHelmet");
public final static Item redChest = new RedArmor(4507, redarmor, 5, 1).setUnlocalizedName("redstoneChestplate");
public final static Item redLeg = new RedArmor(4508, redarmor, 5, 2).setUnlocalizedName("redstoneLeggings");
public final static Item redBoot = new RedArmor(4509, redarmor, 5, 3).setUnlocalizedName("redstoneBoots");
//Redstone Item
public static final Item redstoneIngot = new RedstoneIngot(503);
// The instance of your mod that Forge uses.
@Instance(RedstoneModInfo.NAME)
public static RedstoneMod instance;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide = RedstoneModInfo.CLIENTPROXY + "ClientProxy", serverSide = RedstoneModInfo.COMMONPROXY + "CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
// Stub Method
}
@EventHandler
public void load(FMLInitializationEvent event)
{
proxy.registerRenderers();
RenderingRegistry.addNewArmourRendererPrefix("redarmor");
//ItemStacks
ItemStack redIngot = new ItemStack(RedstoneMod.redstoneIngot);
ItemStack diamond = new ItemStack(Item.diamond);
ItemStack redstone = new ItemStack(Item.redstone);
ItemStack stick = new ItemStack(Item.stick);
ItemStack redSword = new ItemStack(RedstoneMod.redstoneSword);
ItemStack redAxe = new ItemStack(RedstoneMod.redstoneAxe);
ItemStack redSpade = new ItemStack(RedstoneMod.redstoneSpade);
ItemStack redHoe = new ItemStack(RedstoneMod.redstoneHoe);
ItemStack redPick = new ItemStack(RedstoneMod.redstonePickaxe);
//Redstone Ingot
GameRegistry.registerItem(redstoneIngot, "redstoneItem");
LanguageRegistry.addName(redstoneIngot, "Redstone Ingot");
GameRegistry.addRecipe(redIngot, "***", "*A*", "***", '*', redstone, 'A', diamond);
//Redstone Sword
GameRegistry.registerItem(redstoneSword, "redstoneSword");
LanguageRegistry.addName(redstoneSword, "Redstone Sword");
GameRegistry.addRecipe(redSword, " * ", " * ", "*A*", '*', redIngot, 'A', stick);
//Redstone Axe
GameRegistry.registerItem(redstoneAxe, "redstoneAxe");
LanguageRegistry.addName(redstoneAxe, "Redstone Axe");
GameRegistry.addRecipe(redAxe, "*A*", "*A ", " A ", '*', redIngot, 'A', stick);
//Redstone Spade (Shovel)
GameRegistry.registerItem(redstoneSpade, "redstoneSpade");
LanguageRegistry.addName(redstoneSpade, "Redstone Spade");
GameRegistry.addRecipe(redSpade, " * ", "*A*", " A ", '*', redIngot, 'A', stick );
//Redstone Hoe
GameRegistry.registerItem(redstoneHoe, "redstoneHoe");
LanguageRegistry.addName(redstoneHoe, "Redstone Hoe");
GameRegistry.addRecipe(redHoe, "** ", " A*", " A ", '*', redIngot, 'A', stick);
//Redstone Pickaxe
GameRegistry.registerItem(redstonePickaxe, "redstonePickaxe");
LanguageRegistry.addName(redstonePickaxe, "Redstone Pickaxe");
GameRegistry.addRecipe(redPick, "***", "*A*", " A ", '*', redIngot, 'A', stick );
//Test Armor
GameRegistry.registerItem(redHelm, "redstoneHelmet");
LanguageRegistry.addName(redHelm, "Redstone Helmet");
GameRegistry.registerItem(redChest, "redstoneChestplate");
LanguageRegistry.addName(redChest, "Redstone Chestplate");
GameRegistry.registerItem(redLeg, "redstoneLeggings");
LanguageRegistry.addName(redLeg, "Redstone Leggings");
GameRegistry.registerItem(redBoot, "redstoneBoots");
LanguageRegistry.addName(redBoot, "Redstone Boots");
//MS Project
GameRegistry.registerItem(msprojSword, "msprojSword");
LanguageRegistry.addName(msprojSword, "MS Project");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
// Stub Method
}
}
RedArmor Class:
package SpectrumCrafter.redstonemod;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class RedArmor extends ItemArmor {
public RedArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial,
int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
int layer) {
if (stack.itemID == RedstoneMod.redHelm.itemID
|| stack.itemID == RedstoneMod.redChest.itemID
|| stack.itemID == RedstoneMod.redBoot.itemID) {
return RedstoneModInfo.NAME.toLowerCase() + ":textures/armor/redArmor_1";
}
if (stack.itemID == RedstoneMod.redLeg.itemID) {
return RedstoneModInfo.NAME.toLowerCase() + ":textures/armor/redArmor_2";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == RedstoneMod.redChest.itemID) {
this.itemIcon = reg.registerIcon(RedstoneModInfo.NAME.toLowerCase() + ":redChest"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == RedstoneMod.redLeg.itemID) {
this.itemIcon = reg.registerIcon("redLeg"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == RedstoneMod.redBoot.itemID) {
this.itemIcon = reg.registerIcon("redBoot"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == RedstoneMod.redHelm.itemID) {
this.itemIcon = reg.registerIcon("redHelm"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
The story is that the Nether realm has begun to leak into the real world. This mod adds a new ore known as Nether Fragment. You use this Nether fragment which is rare to create the Nether chunk This Nether chunk can be made into armor and tools that are faster than creative mode.
0
Thank you - I don't have the chance to check it out now but ill make sure I get back to you tomorrow!
0
Ok, I've made a few edits - No success. Im now just giving out the code and the textures in hope someone will download them and fix them.
Click here to download it.
0
0
0
I usually come to here when kenneth doesnt have a video - After searching youtube of course
0
0
OK, I did what you said - I renamed the texture files to _chest and _layer_1 - Still not working.
RedArmor:
Console:
0
Ok, so its still not working and now the chestplate Item texture is also gone.
When I added your code my definers (In main class) said that they needed a string - I didnt know what to put so I just put "redarmor". It seemed to take it but I dont know if it was right.
Updated Code:
Main:
Definers (Excerpt from main class)
RedArmor Class
0
The current textures are in: /Desktop/MC Mods/mcp811/forge/mcp/eclipse/Minecraft/bin/assets/redstonemod/textures/models/armor/redArmor_1
(redArmor_2 isnt finished yet)
Main Class:
RedArmor Class:
Thanks in advance!
0
0
I have created my first mod for Minecraft 1.6.2.
The story is that the Nether realm has begun to leak into the real world.
This mod adds a new ore known as Nether Fragment.
You use this Nether fragment which is rare to create the Nether chunk
This Nether chunk can be made into armor and tools that are faster than creative mode.
Crafting:
https://mail.google.......gb640&safe=1
NETHER HELMET
https://mail.google.......hojw0&safe=1
NETHER CHESTPLATE
https://mail.google....=f_hkufhvpw1
NETHER LEGGINGS
https://mail.google.......i56d2&safe=1
NETHER BOOTS
Stats:
Together the armor has a protection of 2000. (Diamond about 1560)
https://mail.google....=f_hkufi9j93
NETHER SWORD
Stats:
Has 2000 uses.
Does 11 Hearts of damage.
https://mail-attachm...PJMwXxmiwxQrYXQ
NETHER PICKAXE
Stats:
Has 2000 uses
Destroys blocks faster than creative mode. (Stone, ores, etc)
https://mail.google....=f_hkufiwoa5
(Sorry for small size idk what happened)
NETHER AXE
2000 uses
Fast as creative mode.
https://mail.google....=f_hkufj00w6
(Sorry again for small size)
NETHER CHUNK
Bugs
Send bugs and questions to [email protected]
Only found bug - Armor textures pop up as black and purple squares ONLY IN INVENTORY.
Download:
http://adf.ly/Uf0p9
Installation:
First install Minecraft forge (Google tutorial)
Go to %appdata%
.minecraft
Place mod into mods folder.
Have fun!