2piradians Posted December 14, 2015 Share Posted December 14, 2015 Hello, I am trying to have my armor get its texture from a location outside of the normal Minecraft domain, but I have not found a way to accomplish this. I have tried to override the getArmorTexture method using the following code: @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { location = new ResourceLocation("<modding folder>", "<texture folder inside modding folder>/texture.png"); return location.toString(); } However, I get the following error: java.io.FileNotFoundException: <modding folder>:<texture folder inside modding folder>/texture.png Is it possible to accomplish this task using this method? Or possibly through another method? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
RANKSHANK Posted December 14, 2015 Share Posted December 14, 2015 You'll have to make a custom IResourcePack if you can't get ResourcePackFolder to suit your needs Quote I think its my java of the variables. Link to comment Share on other sites More sharing options...
LexManos Posted December 14, 2015 Share Posted December 14, 2015 Why are you accessing something inside the mod folder? You should use your normal resource settings and use your assets folder there. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
2piradians Posted December 14, 2015 Author Share Posted December 14, 2015 I want my mod to allow players to add their own textures for my mod armor, in addition to the textures I already have. I know how to change between my textures in the domain, but I do not know how to allow users to add their own textures that I can access inside of the normal Minecraft domain, which is why I want to try to find a way to access them outside of the domain. Quote Link to comment Share on other sites More sharing options...
RANKSHANK Posted December 14, 2015 Share Posted December 14, 2015 Create a resource pack based off the folder, add it to the default texture pack lists, parse your target folder for file names so you can convert them to resource locations and feed them to the resource manager. I'd suggest creating an IResourcePack that uses unique key for the domain so that there aren't any conflicts pulling textures from your original assets. That is unless you want the capability to overwrite the original textures you or a resource pack has supplied Quote I think its my java of the variables. Link to comment Share on other sites More sharing options...
N247S Posted December 14, 2015 Share Posted December 14, 2015 Isnt that just possible with a normal regular resourcepack? You can 'override' any texture inside the resourcefolder with a resourcepack as long as you use the ResourceLocation object for binding the texture. The only thing people need to do is holding on to the same datastructure you have used inside your resourcefolder. No need to do crazy things Quote Projects: Discontinued: - N2ConfigAPI - Meachanical Crafting Table Latest: - CollectionUtils Coöperations: - InGameConfigManager Link to comment Share on other sites More sharing options...
RANKSHANK Posted December 14, 2015 Share Posted December 14, 2015 I want my mod to allow players to add their own textures for my mod armor, in addition to the textures I already have. In addition, not replacing the existing textures. Hence the need to get crafty. Quote I think its my java of the variables. Link to comment Share on other sites More sharing options...
2piradians Posted December 15, 2015 Author Share Posted December 15, 2015 Create a resource pack based off the folder, add it to the default texture pack lists, parse your target folder for file names so you can convert them to resource locations and feed them to the resource manager. I'd suggest creating an IResourcePack that uses unique key for the domain so that there aren't any conflicts pulling textures from your original assets. That is unless you want the capability to overwrite the original textures you or a resource pack has supplied You seem confident with this method. I will give it a shot! I have not used resource packs before, so this should be fun. Quote Link to comment Share on other sites More sharing options...
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.