Jump to content

1.17.1 2d icon in gui && 3d model in hands [SOLVED]


Recommended Posts

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)

Posted

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"?

Posted

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.