Arqade Asked by Sam Hill on June 15, 2021
I was wondering if there was a way to make an item have a different texture in the GUI than the player’s hand with normal optifine.
For example, I have a long staff item I am trying to add, which is a 32×32 texture. I’ve scaled it to 2x in the 3rd person and on the ground, so it looks very nice, and the pixels are the same size as 16×16 items. I can scale it up in the GUI as well, but with that it protrudes outside of the GUI box and doesn’t look very good. I have an icon I would like to use in the GUI but I don’t know how to make it apply:
Here’s how it looks in 3rd person, as well as a comparison of how it should look vs how it actually looks.
Here is my model.json to show what I’ve tried:
{
"parent": "builtin/generated",
"textures": {
"layer0": "./staff",
"layer1": "./staff_icon"
},
"display": {
"thirdperson": {
"texture": "layer0",
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 0.25, 2 ],
"scale": [ 2, 2, 1 ]
},
"firstperson": {
"texture": "layer0",
"rotation": [ 0, -135, 25 ],
"translation": [ 3, -5, -1 ],
"scale": [ 3.4, 3.4, 1.7 ]
},
"gui": {
"texture": "layer1",
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 2.0, 2.0, 1.0 ]
},
"ground": {
"texture": "layer0",
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 0.5, 0 ],
"scale": [ 2.0, 2.0, 1 ]
}
}
}
However with this, they both get overlayed on top of each other no matter where they are, and it looks even worse than before:
It’s because lines like "texture:", "layer0"
don’t actually do anything. I want it so that in the GUI it uses staff_icon.png
to display the textures, but in all other places it displays the normal staff.png
and looks good.
Is there any way to make a certain situation, GUI in this case, hide or display certain layers of the model? If not, then I’m clearly misusing layers, so what are they really for?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP