#How do I make the resourcepack use minecraft's default inventory GUI, Fixed and Ground Appearance

37 messages · Page 1 of 1 (latest)

tired maple
#

I am trying to make a mace texture pack, and I made the 3D model, but want the mace to look 2D like it does when it's in the GUI and ground

The first picture showcases the look right now
Second picture is what I am aiming for

sleek sparrowBOT
#
Welcome to the help forum!

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.

sleek sparrowBOT
# heady ether !faq gui-model
FAQ
Java: Java 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

  1. Create a new .json file in assets/minecraft/items (not to be confused with models/item!)
  2. 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._
heady ether
#

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

tired maple
#

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?

tired maple
tired maple
heady ether
tired maple
#

It can't be mono?

#

Like enchantment glint on each of these parts is seperate

#

It's easily visible

heady ether
#

as I said, the enchantment glint uses the exact same UV as the model

tired maple
#

So no way of fixing this?

heady ether
#

imagine glint like an animated texture that gets applied onto your model additionally

tired maple
#

there has to be a way

#

cause I fixed it with my old model but I forgot

heady ether
#

yeah, by making sure the UV makes sense

tired maple
#

so do I Auto-UV?

heady ether
#

no

#

if those parts of the texture aren't next to one another then your glint won't be either.

tired maple
#

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

heady ether
molten narwhal
heady ether
molten narwhal
# heady ether You can put that inside a custom_model_data check (instead of "type": "model" an...

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"
}
},

heady ether
#

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.
molten narwhal
# heady ether Meanwhile if you split each case into separate files like this: extra_afterburne...

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

heady ether
#

the values should be the same names used for the display settings btw.