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

Hi! So I'd like to add a new "type" of json file to modid/assets (EDIT: actually modid/data. Sorry). Obviously I know how to create folders and files, but how would I get my mod to read it? I've had a look at IRecipe, but I'm still not 100% sure how it gets called, etc.

Edited by BlockyPenguin

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

Yeah, it's like more recipes, except it's information that a mod can specify about it's item, so I can't use a recipe serializer.

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

Ah ok, thank you, I'll take a look :)

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

So I've created something that should work, but how exactly do I register it?

EDIT: Looking at other classes, I feel like I'd need to create my own registry. Am I correct?

Edited by BlockyPenguin

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author
5 minutes ago, diesieben07 said:

To register the JsonReloadListener, you simply need to register it as a resource reload listener using addReloadListener.

Sorry if it's obvious, but what class does addReloadListener belong to?

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author
9 minutes ago, diesieben07 said:

IReloadableReloadListener

That class doesn't exist... The closest I found is IReloadableResourceManager, which eclipse can't seem to see any methods in.

image.png.504f3ca80694d84d90534b1be05805ed.png

 

IReloadableResourceManager is an interface, so that would be why. What do I do?

 

EDIT: About the shortcuts, I'll have a look at mine ;)

Edited by BlockyPenguin

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

So, I've found
Minecraft.getInstance().getResourceManager(),
which returns resourceManager which is an IReloadableResourceManager. However,it returns it as an IResourceManager, which does not have the addReloadListener method. I've also found
MinecraftServer.getResourceManager(),
which does return an IReloadableResourceManager. I can get it using
Minecraft.getInstance().getIntegratedServer().getResourceManager().
Would this work on singleplayer though?

Edited by BlockyPenguin

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

Ok, thank you very much!

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

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.