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

Sorry, I'm kind of dreadful at .json, so please bear with me.

So, I have it so I need to move the position of the item model, but otherwise its a regular item model.

{
  "parent": "item/handheld",
  "textures": {
    "layer0": "matchlockguns:items/matchlock_gun"
  },
  "display": {
    "thirdperson_righthand": {
      "rotation": [ 0, -90, 55 ],
      "translation": [ 0, 1, 0.5 ],
      "scale": [ 0.85, 0.85, 0.85 ]
    },
    "thirdperson_lefthand": {
      "rotation": [ 0, 90, -55 ],
      "translation": [ 0, 1, 0.5 ],
      "scale": [ 0.85, 0.85, 0.85 ]
    },
    "firstperson_righthand": {
      "rotation": [ 0, -90, 25 ],
      "translation": [ 1.13, 3.2, 1.13 ],
      "scale": [ 0.68, 0.68, 0.68 ]
    },
    "firstperson_lefthand": {
      "rotation": [ 0, 90, -25 ],
      "translation": [ 1.13, 3.2, 1.13 ],
      "scale": [ 0.68, 0.68, 0.68 ]
    }
  }
}

However, basically all of my items use this configuration of transforms, so I was woundering how I would go about creating a basic .json model, and then have all my items use it as a substrate, only replacing the texture per for each model. I've tried things like having a model like that and then making the items use it as a parent, but it simply makes them null boxes. I've also been unable to find copies of the item/handheld or item/generated models.

  • Author

For context. This is what i've tried:

 

baseModel.json

{
  "parent": "item/handheld",
  "display": {
    "thirdperson_righthand": {
      "rotation": [ 0, -90, 55 ],
      "translation": [ 0, 1, 0.5 ],
      "scale": [ 0.85, 0.85, 0.85 ]
    },
    "thirdperson_lefthand": {
      "rotation": [ 0, 90, -55 ],
      "translation": [ 0, 1, 0.5 ],
      "scale": [ 0.85, 0.85, 0.85 ]
    },
    "firstperson_righthand": {
      "rotation": [ 0, -90, 25 ],
      "translation": [ 1.13, 3.2, 1.13 ],
      "scale": [ 0.68, 0.68, 0.68 ]
    },
    "firstperson_lefthand": {
      "rotation": [ 0, 90, -25 ],
      "translation": [ 1.13, 3.2, 1.13 ],
      "scale": [ 0.68, 0.68, 0.68 ]
    }
  }
}

 

othermodel.json

{
  "parent": "matchlockguns:item/baseModel",
  "textures": {
    "layer0": "matchlockguns:items/flintlock_musket"
  }
}

 

  • Author
15 minutes ago, Beethoven92 said:

"parent": "matchlockguns:item/baseModel"

You are using invalid characters in your json file name, don't use capital letters

Thank you so much. This solved the issue. Just goes to show my lack of knowledge of the .json models and such.

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.