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'm trying to get all files from one asset.

For example I have a asset like this: "textures/gui/.." and I want to have all files from this asset in a List.

I don't know if it's enough to describe what I need, but I hope You can get the point.

  • Author

Thank you! I found it, however, I have problems with what to pass in to the pathIn parameter as most of the times it won't return anything for me.

I've looked at some vanilla usages but after some tries, I came up empty handed..

Can you explain it for me, if you don't mind?

  • Author

I actually looked at the FontResourceManager class to get some ideas on what to pass in, then when I tried it myself I did not get anything at all.

I was expecting to get a few json files from the vanilla font directory, but seems it works differently.

 

Anyway that is the exact code I tried last time:

public static void test(){
  FallbackResourceManager r = new FallbackResourceManager(ResourcePackType.CLIENT_RESOURCES);
		
  Collection<ResourceLocation> res = r.getAllResourceLocations("font",  (t) -> {return t.toLowerCase().endsWith(".json");});
  Logger.getLogger("Log").info(String.valueOf(res.size()));
  for(ResourceLocation resource : res) {
    Logger.getLogger("Log").info(resource.getPath());
  }
}

 

In the meantime I'm also trying to figure out the implementation. 

  • Author

Oh thank you! works just as I expected now with Minecraft's ResourceManager. :)

 

 

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.