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 everyone!

 

I was wondering if there was a way in Forge to pull additional data from a JSON file on top of what Minecraft normally pulls.  All of my current searches kept pulling up nada to help me here.  Any help would be appreciated!  Thank you!

  • Author

Basically it's going to be a model JSON file for an item, but I want to add in additional data like offsets applied to the modular item it will be a part of.

My current system stores this offset separately but I'd like to make it so users can make a JSON and have the internal system update from the file rather than hard-coding everything.  This would also allow people to make additional models without needing to make a new mod and still be compatible with the current design.

Why don't you create your own .JSON file reader - search for the file the user creates with the model information, parse it to whatever you need, then apply to the item model. Really, I don't see why you would do this with this .JSON system, pretty flexible with rotations / translations / scale.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

  • Author

Why don't you create your own .JSON file reader - search for the file the user creates with the model information, parse it to whatever you need, then apply to the item model. Really, I don't see why you would do this with this .JSON system, pretty flexible with rotations / translations / scale.

Because translations and rotations won't persist with my current item.  Individually it would but the design I worked on is a compilation of multiple item models, unless ISmartItemModel has some rotation voodoo I haven't found.

As for a JSON file reader, I feel like an idiot now.  Thank you!  (Will update with results.)

  • Author

I got it!  It was actually surprisingly simple, if a little tedious.

 

For those who are curious, hunt down the JsonParser class in the dev environment, and remember JsonObject, JsonElement, and JsonArray.  Good luck!

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.