...why aren't you using @Mod? It gives your mod a name in the mods list. If that's the only thing stopping you, then just add it right after the imports in your main class.
Then make the folder paths:
/mods/mymodid/textures/blocks
/mods/mymodid/textures/items
I'm not sure who's problem you're responding to there... I'm using forge, and I want my textures to load for these tools I made. I have the folders set up and am launching minecraft trough eclipse. I've put in a lot of methods that this forum post has provided, but I am still not getting the results. I am assuming I did something wrong, could you tell me the line of text that I need, or what I am doing wrong.
[size=medium]
I'm not sure who's problem you're responding to there... I'm using forge, and I want my textures to load for these tools I made. I have the folders set up and am launching minecraft trough eclipse. I've put in a lot of methods that this forum post has provided, but I am still not getting the results. I am assuming I did something wrong, could you tell me the line of text that I need, or what I am doing wrong.
I was responding to ICExCOLDxPROZ, though from what you've put
So, I have my set of tools all up, I did all the other work, however I cannot figure out how to get rid of last error, where I put in the EndergemPickaxe.iconIndex = ModLoader.addOverride("/gui/items/png", "/enderthings/ender tools/endergempickaxe") does anyone know how to properly fix this?
-I picked the worst possible time to try and start modding.
Why are you using ModLoader if you're using the Forge API?
package mymod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
public class modItem extends Item
{
public modItem (int par1)
{
super(par1);
}
@Override
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister iconRegister)
{
iconIndex = iconRegister.func_94245_a("mymodid:texturename");
}
}
This is all you need to do to get the texture working.
I was responding to ICExCOLDxPROZ, though from what you've put
Why are you using ModLoader if you're using the Forge API?
package mymod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
public class modItem extends Item
{
public modItem (int par1)
{
super(par1);
}
@Override
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister iconRegister)
{
iconIndex = iconRegister.func_94245_a("mymodid:texturename");
}
}
This is all you need to do to get the texture working.
Alright, well as I've said I am very new to coding, and I would completely understand if you disregard this post. So I have that now but I'm not sure where to put it. Do I paste it into the file with all of the tool information on it, do I create another class and put it in there?
(I'm also assuming I replace things like mymod, modItem, texturename, and mymodid, with my actual stuff.)
Alright, well as I've said I am very new to coding, and I would completely understand if you disregard this post. So I have that now but I'm not sure where to put it. Do I paste it into the file with all of the tool information on it, do I create another class and put it in there?
(I'm also assuming I replace things like mymod, modItem, texturename, and mymodid, with my actual stuff.)
...why aren't you using @Mod? It gives your mod a name in the mods list. If that's the only thing stopping you, then just add it right after the imports in your main class.
into all my classes in my entire package which was probably stupid because it took 15 minutes and now I'm crashing because of duplicate key "GemMod." I suppose the modid must be different for each class?
Rollback Post to RevisionRollBack
Maker of GemMod, and supporter of Jerry's Mod! Download it here!
into all my classes in my entire package which was probably stupid because it took 15 minutes and now I'm crashing because of duplicate key "GemMod." I suppose the modid must be different for each class?
No, you don't put it in all your classes, you put it in your main class (where you have your @PreInit and @Init) right after you declare your imports.
package genericmod;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.Mod.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.*;
@Mod(modid="GemMod",name="Gem Mod",version="1.0")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class genericMod
{
@Init
public void main(FMLInitializationEvent event)
{
}
}
Also modname is the actual name of the mod, not your own.
Then you make the folders based on what you put in modid
/mods/gemmod/textures/items
/mods/gemmod/textures/blocks
Have a quick question for you. How do you set blocks that use a different Icon picture for their inventory viewing?
I used to simply place this in the constructor in the custom block class...
this.blockIndexInTexture = 33;
Then place other textures for the sides and such...
The reason I am asking this is currently I am working on a custom Cauldron, however the top texture is being used for the held item texture T_T. How would I go about changing this with the new 1.5 Icons.
Or do I now have to create an placer Item, much like how Mojang did with cake?
No, you don't put it in all your classes, you put it in your main class (where you have your @PreInit and @Init) right after you declare your imports.
package genericmod;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.Mod.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.*;
@Mod(modid="GemMod",name="Gem Mod",version="1.0")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class genericMod
{
@Init
public void main(FMLInitializationEvent event)
{
}
}
Also modname is the actual name of the mod, not your own.
Then you make the folders based on what you put in modid
/mods/gemmod/textures/items
/mods/gemmod/textures/blocks
In regular minecraft, when I drag my mod/mods into the mods folder, the textures don't work. Does my modid HAVE to be all lowercase?
because the directory for when I put the mod into the .minecraft is .minecraft/mods/Mymod/textures/items/Blah.png etc...
Anything I did wrong there. I really am having trouble with his as of recent.
In regular minecraft, when I drag my mod/mods into the mods folder, the textures don't work. Does my modid HAVE to be all lowercase?
because the directory for when I put the mod into the .minecraft is .minecraft/mods/Mymod/textures/items/Blah.png etc...
Anything I did wrong there. I really am having trouble with his as of recent.
You don't put the textures in the .minecraft directory. They have to be in the zip that your mod is in.
Example with Portal Gun mod
replace modid with what you put for you mod's id and the texture name. So if we go off what you have in your main class, and we imagine we have a texture called ruby.png, we would do:
replace modid with what you put for you mod's id and the texture name. So if we go off what you have in your main class, and we imagine we have a texture called ruby.png, we would do:
One question I have that does not seem to be answered yet is does .setUnlocalizedName() need to be associated with an actual png image? The block thin glass does not appear to be associated with an actual png for example. Thanx in advance
setUnlocalizedName sets the string under which mc will attempt to find a png file. It will first look in the vanilla textures, then in the mod folder (as per mod id).
So will minecraft throw a fit if it does not find a png file this way or can I just use the Icon methods in the block and item classes? On a side note I did some looking and found unloclaizedName is used as a key to get the display name for items and blocks from the language files now instead of them being directly assigned in the block and item class. Looks as if all the display names are acquired from these files now. Thank you for your helpful response.
...why aren't you using @Mod? It gives your mod a name in the mods list. If that's the only thing stopping you, then just add it right after the imports in your main class.
Then make the folder paths:
/mods/mymodid/textures/blocks
/mods/mymodid/textures/items
I'm not sure who's problem you're responding to there... I'm using forge, and I want my textures to load for these tools I made. I have the folders set up and am launching minecraft trough eclipse. I've put in a lot of methods that this forum post has provided, but I am still not getting the results. I am assuming I did something wrong, could you tell me the line of text that I need, or what I am doing wrong.
I was responding to ICExCOLDxPROZ, though from what you've put
Why are you using ModLoader if you're using the Forge API?
This is all you need to do to get the texture working.
Alright, well as I've said I am very new to coding, and I would completely understand if you disregard this post. So I have that now but I'm not sure where to put it. Do I paste it into the file with all of the tool information on it, do I create another class and put it in there?
(I'm also assuming I replace things like mymod, modItem, texturename, and mymodid, with my actual stuff.)
Yes.
With
I get error on iconIndex and I have to remove the @Override annotation.
Ok, I've pasted into all my classes in my entire package which was probably stupid because it took 15 minutes and now I'm crashing because of duplicate key "GemMod." I suppose the modid must be different for each class?
No, you don't put it in all your classes, you put it in your main class (where you have your @PreInit and @Init) right after you declare your imports.
Also modname is the actual name of the mod, not your own.
Then you make the folders based on what you put in modid
/mods/gemmod/textures/items
/mods/gemmod/textures/blocks
Soooo.... do I put it into the class with all of my tool information or do I make a new class??
I used to simply place this in the constructor in the custom block class...
this.blockIndexInTexture = 33;
Then place other textures for the sides and such...
The reason I am asking this is currently I am working on a custom Cauldron, however the top texture is being used for the held item texture T_T. How would I go about changing this with the new 1.5 Icons.
Or do I now have to create an placer Item, much like how Mojang did with cake?
The "placer Item" is vanilla/canon, so yes
As to how, its extremely simple, just look at any Item class for Blocks really.
Ok so I have in my main class. How do I make all my other classes part of that?
because the directory for when I put the mod into the .minecraft is .minecraft/mods/Mymod/textures/items/Blah.png etc...
Anything I did wrong there. I really am having trouble with his as of recent.
You don't put the textures in the .minecraft directory. They have to be in the zip that your mod is in.
Example with Portal Gun mod
Alright, now in your classes where ever you have
replace modid with what you put for you mod's id and the texture name. So if we go off what you have in your main class, and we imagine we have a texture called ruby.png, we would do:
inside the class file for our ruby item.
Nevermind, just figured that out before you posted, waste of good fast info :E.
Would .setUnlocalizedName replace this?
The string in the .setUnlocalizedName() method can also be used to find the texture yes. I think. Ill have to double check this..