#How do I make the resourcepack use minecraft's default inventory GUI, Fixed and Ground Appearance
37 messages · Page 1 of 1 (latest)
Please make sure to read #1029373817119838218 as it may answer your question!
Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.
!faq gui-model
Disclaimer: This will only work for 1.21.4 and newer. For older versions you will need to use mods or shader workarounds to do this.
To have a different model in the gui than in the hand (or other displays) you do the following
- Create a new .json file in
assets/minecraft/items(not to be confused withmodels/item!) - Make a .json file in there that looks something like this:
{
"model": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"ground",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "minecraft:item/2d"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/3d"
}
}
}```
3. Name the .json the same as the id of the item you want to do this for (unless you are using this in combination with the item_model= component).
4. Replace `item/2d` and `item/3d` with the repsective model references to the 3D and 2D model. Your "2D model" can be just something like this
```json
{
"parent": "item/generated",
"textures": {
"layer0": "item/feather"
}
}``` (replace item/feather with your actual texture)
_Note: The bot example basically works the same as a trident. If you want the 2D model to appear in more/less displays adjust the values in the "when" array accordingly._
in your case instead of "item/2d" you write "item/mace", and instead of "item/3d" the path to your model
-# which shouldn't be called mace.json in models/item
and where do I input the code above into my resourcepack?
also the mace has 2 jsons
one with handheld and one with mace
so which do I use?
How do I also fix this enchantment glint issue with the model?
I fixed this isse
issue
the enchantment glint uses the exact same UV as the model
It can't be mono?
Like enchantment glint on each of these parts is seperate
It's easily visible
as I said, the enchantment glint uses the exact same UV as the model
So no way of fixing this?
imagine glint like an animated texture that gets applied onto your model additionally
yeah, by making sure the UV makes sense
so do I Auto-UV?
no
if those parts of the texture aren't next to one another then your glint won't be either.
So I have to make an entire section of a face be right next to each other?
But then the extrusions I made won't be affected
since glint uses the same UV as the model the textures have to be alligned accordingly so that the glint animation looks correct.
is there a way to do this including custom model data?
Meaning I have one item (e.g. dirt), that dirt item has multiple diffrent models (golden_dirt, diamond_dirt, etc) and making it look diffrent from diffrent perspectives?
You can put that inside a custom_model_data check (instead of "type": "model" and the model path).
Though using item_model instead of custom_model_data makes it a lot easier (since you can just make it a separate file per model without needing to combine .json files) and also allows you to have "several dirt item models" just like custom_model_data
with being easier, do you mean that I dont have to list them all in the same json like i am doing here with the extras?
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "minecraft:item/paper"
},
"cases": [
{
"when": "extra_afterburner",
"model": {
"type": "model",
"model": "item/items/extra_afterburner"
}
},
{
"when": "extra_blast_supressor",
"model": {
"type": "model",
"model": "item/items/extra_blast_supressor"
}
},
well, if you wanna have different display models for each custom_model_data you would have one dirt file that looks something like this:
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "minecraft:item/paper"
},
"cases": [
{
"when": "extra_afterburner",
"model": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"ground",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "minecraft:item/2d"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/3d"
}
}
},
{
"when": "extra_blast_supressor",
"model": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"ground",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "minecraft:item/2d"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/3d"
}
}
},
...
]
}
}```
Meanwhile if you split each case into separate files like this:
extra_afterburner.json
{
"model": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"ground",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "minecraft:item/extra_afterburner_2d"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/extra_afterburner_3d"
}
}
}```
And then use the item_model component ingame to assign this item definition file to the item you won't have to fiddle around with .json that will increase in depth over time.
So with the second method i would seperate it into multiple files instead of one big one, correct?
Also, in the "when: gui, ground, fixed", is there a list of these or are these 3 all of them? because what I'm trying to accomplish is that the 3d model is used for the player that holds it ONLY in first person but in every other case (outside players, slot, laying on the ground, etc) is the 2d version.
@heady ether , nvm I figured it out
I might be albert einstein
Thanks for taking the time
the values should be the same names used for the display settings btw.