Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to get list of filenames in directory in resources


Recommended Posts

I try answer from stackoverflow: https://stackoverflow.com/questions/3923129/get-a-list-of-resources-from-classpath-directory

And it work correctly when I run game from my IDE(Intellij Idea).

But when I build mod, put jar in /mods/ and run Minecraft from launcher, it method give empty filelist. Hovewer, content of files in folder are load fine.

What is true way to get list of files in directory in resources?

Thx in advance!

Link to comment
Share on other sites

Why? In the context of modding you should be using ResourceLocation and inputting the path manually.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.