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

Noo, you shouldnt create a fake resourcepack! The Json library (Gson) which is implemented in mc by default and is accesible as long as you add the minecraft project to the classpath of your modproject.

 

I don't think you understood what the OP wants to do. First of all, this isn't a "fake" resource pack; it is a real resource pack that you create during initialization. He does plan to use JSON, he's not saying he wouldn't.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Im verry sorry, I indeed misunderstood something. And I think I used a wrong word.( Im not English).

 

Anyway, I still think that this way is a bit complicated since you can simlly use the resourceManager in combination with a resourceLocation to get an inputStream. No need for reflection.

 

Again Im sorry for misunderstanding

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Did you get this going? I have a few questions about how this might be implemented.

 

JSON files are loaded via the resource manager. So just register a custom resource pack (IResourcePack) and put it into Minecraft#defaultResourcePacks (you will need reflection as the field is private). Then that IResourcePack can fabricate the InputStreams for the JSON files out of "thin air". A helpful thing to do that is converting a String to an InputSteam.

 

How do you register a custom resource pack and when does it have to be done?

 

Could the pack be modified and a model changed at runtime? If so, how?

 

 

 

Ok, I had understood the registering it and adding it to the list were two differents steps. I've got the reflection going and my resource pack is on the list.

 

I have build myself a simple tool for building item models in game. Instead of using a seperate applications like MC Model Maker, I am building the model with blocks, selecting them, and then generating a json model. So far, I have this writing to a file which I relocate when I quit the game, but, if not complicated, it would be interesting to load the model at runtime.

 

 

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.