AndrewSherman Posted June 13, 2013 Posted June 13, 2013 SOLVED: The directory for resources is minecraft/mods/[YOURMOD.zip]/mods/resources/textures/blocks/.png. Rather than just .minecraft/mods/resources/textures/blocks/.png/ MCP 751 I'm on a mac (not by free choice though ) Ok so here's the deal. I only found out yesterday that the whole Item/Block texture system has completely changed from what it was when I was last modding (around January 2013). So I hastily looked up how to do it. An example of my code is here: http://i1227.photobucket.com/albums/ee437/AndrewShermans/Screenshot2013-06-13at120046_zps074f2109.png[/img] Now this works fine in Eclipse, with the directory for the image files as [mcp751]/src/minecraft/mods/GraveyardResources/textures/blocksORitems/icon.png But as soon as I put my mod folder into minecraft.jar (after reobfuscating obviously), the mod works fine but all of the textures have the mysterious white texture which says 'Missing Texture'( or whatever). This is the directory of my resources folder: http://i1227.photobucket.com/albums/ee437/AndrewShermans/Screenshot2013-06-13at115941_zps80fd819c.png[/img] Anyone know what the problem is? Either code or directories, I'm open to suggestions! PS: Could it be something to do with the Mac? Quote
jordsta95 Posted June 13, 2013 Posted June 13, 2013 You have missed the this. from the front of your code... Simple mistake Here is an example @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister){ this.itemIcon = iconRegister.registerIcon("<mod folder>:<file name, without.png>"); } Quote Why bother?
Draco18s Posted June 13, 2013 Posted June 13, 2013 You have missed the this. from the front of your code... Simple mistake No he didn't, check the screenshots again. Andrew: Did you add your textures to your reobfuscated zip? The recompiler/reobfuscator doesn't pull textures in. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
AndrewSherman Posted June 13, 2013 Author Posted June 13, 2013 No, the reobfuscated file was my Graveyards_Mod folder, which contains all of the .class files. I simply copied the GraveyardResources folder from where I had it in the MCP/src/mod/...etc into the directory in the picture! EDIT: Sorry for the late reply, I'm surprised at the quick responses! PS: What time zone are the majority of people here on? I'm in the UK so it's now 13:19 Quote
jordsta95 Posted June 13, 2013 Posted June 13, 2013 Wait, so are you saying that when you add your mod's folder into .minecraft/mods... you just copy over the reobf's folder as it is... or do you add the folders which aren't reobfuscated too? Quote Why bother?
AndrewSherman Posted June 13, 2013 Author Posted June 13, 2013 Whoah there! When I reobfuscate I get this [MCP]/reobf/minecraft/Graveyards_Mod/**list of class files** Because I made my own package for my mod, I just copy the Graveyards_Mod folder into minecraft.jar for it to work right? Not zipped or anything, just the folder with the compiled class files inside. The resources I took the folder inside the mods folder in eclipse (which is called GraveyardResources) and I put it in the directory shown in the image. Quote
Yagoki Posted June 13, 2013 Posted June 13, 2013 you need to include mods. in the zipped package (so it'd be mods.Graveyards_Mod.blocks.texture.png for example) like this You have missed the this. from the front of your code... Simple mistake Here is an example @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister){ this.itemIcon = iconRegister.registerIcon("<mod folder>:<file name, without.png>"); } umm... i'm not sure what to say? did you learn java? the this. ensures that the variable being referenced is the one local to the class/object, it exists so we can do things like: public class Foo { public int bar = 0; public void setBar(int bar) { this.bar = bar; } //Alternatively you could do public void setBar(int b) { bar = b; } } the use if it is only required when there is a variable in the method with the same name, and is sometimes used outside this condition to clarify that this parameter belongs to this object, not just the method. the lack of a this. in the case you are showing wouldn't even matter and, if it did cause a problem, it would be visible inside eclipse. Quote github
AndrewSherman Posted June 13, 2013 Author Posted June 13, 2013 Ok, so I zipped together the two folders: Graveyard_Mod (which contains the .class files) and the mods folder (containing GraveyardResources/textures/blocks/xyz.png). And I got the same result as last time. No textures. Ok, here is my mod file! I know it's a big ask, but could you please check the files and set up? (try installing it normally first then check the source, as it could just be my computer somehow) Excuse the abismal coding http://www.mediafire.com/?41prnkr12ir77m7 Quote
ObsequiousNewt Posted June 14, 2013 Posted June 14, 2013 Ok, so I zipped together the two folders: Graveyard_Mod (which contains the .class files) and the mods folder (containing GraveyardResources/textures/blocks/xyz.png). And I got the same result as last time. No textures. Ok, here is my mod file! I know it's a big ask, but could you please check the files and set up? (try installing it normally first then check the source, as it could just be my computer somehow) Excuse the abismal coding http://www.mediafire.com/?41prnkr12ir77m7 I didn't even need to see the coding, abyssmal or not. Replace "GraveyardResources/" with "mods/GraveyardResources/". Quote BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
AndrewSherman Posted June 14, 2013 Author Posted June 14, 2013 Haha, wow I'm an idiot apparently. BTW I think it should be made clearer that the mods folder that you put your resources in is inside the .zip file rather than just putting the resources folder in the actual mods folder (.minecraft/mods). Quote
ObsequiousNewt Posted June 14, 2013 Posted June 14, 2013 Haha, wow I'm an idiot apparently. BTW I think it should be made clearer that the mods folder that you put your resources in is inside the .zip file rather than just putting the resources folder in the actual mods folder (.minecraft/mods). Exactly. I think, Draco, that this should be put in our EAQ as well. Quote BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.