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


Hola! A few days ago I wanted to create a little mod for my server and now I have a few questions.

How can I make an item that will be displayed everywhere as a 2d texture, and in the hands of the character will be displayed as a 3d model?

I am using minecraft json 3d model format.

Right now I have item model with 3d model: /assets/tavernrp/models/item/dice.json

{
    "textures": { ... },

    "elements": [ ... ]
}

And 2d icon: /assets/tavernrp/textures/item/icon/dice.png

How do I need to change dice.json, so that 3d model was drawn only in the hands, and in other places it was 2d icon?

And how can I reduce the size of the model?..

Spoiler

9gW2KqK.png

(apologies for potential misspellings, English is not my native language)

  • Author

Thank you, it really worked!

Spoiler

xdtztsG.png


But there was a small problem: the icon in the inventory has become darker than it should be. Can this be fixed?
Also.. can I somehow specify the displayed 3d model scale in the model definition? Some kind of "transform"?

  • Author

Fixed the dark icon this way:

{
	"loader": "forge:separate-perspective",
	"gui_light": "front", // add this
	"base": {
		"parent": "minecraft:item/handheld",
		"textures": {
			"layer0": "tavernrp:item/icon/dice"
		}
	},
	"perspectives": {
		"first_person_right_hand": {
			"parent": "tavernrp:item/dice3d"
		},
                ...
	}
}
  • jpdiv changed the title to 1.17.1 2d icon in gui && 3d model in hands [SOLVED]

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.