Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

 

 

You'll have to make a custom IResourcePack if you can't get ResourcePackFolder to suit your needs

I think its my java of the variables.

Why are you accessing something inside the mod folder?

You should use your normal resource settings and use your assets folder there.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

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.

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

 

 

I think its my java of the variables.

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

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

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.

I think its my java of the variables.

  • Author
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. :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.