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.

Dynamically creating/loading assets (recipes, textures, models) [1.20.2]

Featured Replies

Posted

I've recently gotten into modding again after a hiatus.

Currently I'm experimenting with a mod that would allow users to create simple 'content packs' in plain-text form. These files are loaded on startup by the mod and it then registers items based off of this data via the registry events, which works fine (though I'm not yet sure what would happen if there's a mismatch between the server and client content packs).

However I would like to be able to automatically load & register resources and data for these items, based off of the loaded data; E.G item textures & models, and crafting recipes (dynamically registering recipes used to be quite straightforward last time I did any modding)

I have yet to find anything on this that is up to date, though I did find a solution that would probably work, that essentially relied on handling all the rendering on its own.

Is there any reasonable way to do this, short of requiring the user to also install a resource pack and data pack for every content pack?

Edited by Korall

yeah, you can do that (make a data pack for recipes and loot tables and make an asset pack for models and textures).

i'll tell you right away it would be a lot of work and questionable benefit - there are already mods that allow you to add items with a few lines of text and a png file. there always have been.

if you really must, investigate source code of BuddingCrystals by XFactHD.

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.