#2d item in hotbar 3d on hand

50 messages · Page 1 of 1 (latest)

drowsy harbor
#

How can i achieve this? its like how tridents or spyglasses are. 2d on hotbar but on hand its 3d. how can i make kubejs read both the 2d texture and the 3d model and use 2d texture for hotbar,inventory etc and 3d for everything else?

barren runeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

drowsy harbor
#

.

#

if it helps this is the script

#
    event.create('conquerors_scythe', 'sword')
    .tier('netherite')
    .attackDamageBaseline(9.0)
});```
#

and model

valid oakBOT
#

Paste version of 68aDLqF.txt from @drowsy harbor

drowsy harbor
#

ignore the fact that its a .txt file i tried to copy the code and send it here and it sent it as a txt file

drowsy harbor
#

bump (pls someone help)

bold crane
#

Bump I want to know too xd

#

I think you have to set parent model or something like that

#

But that's just a guess

drowsy harbor
drowsy harbor
#

anybody?

drowsy harbor
#

;-;

prisma crescent
#

It's quite easy.
You can just add a model to the item and in the item constructor add ```.item((item) => {
Item.texture("your2dtexture")
})
I may have gotten the syntax a little off. But that should be accurate.
If it doesn't work, I'll check one of my old items to get working code from there.

#

Hope this helps :)

drowsy harbor
#

will try it next day its 3 am rn and will let you know. thanks so much for helping

prisma crescent
#

Np. Hope it goes well :)

drowsy harbor
#

yoooooo

#

i just didnt know i had to make 3 models

#

im gonna explain what i did to future folk who may need it rn

#

you make 3 models.
youritemname.json
youritemname_gui.json
youritemname_model.json

in the youritemname.json you put this:

    "parent": "minecraft:item/handheld",
    "loader": "forge:separate_transforms",
    "base": {
      "parent": "kubejs:item/youritemname_model"
    },
    "perspectives": {
      "gui": {
        "parent": "kubejs:item/youritemname_gui"
      }
    }
  }```
#

this basically tells minecraft when to use which model

#

now youritemname_model is the model you use for the 3d stuff no need to touch that one

#

as for youritemname_gui its this:

    "parent": "item/generated",
    "textures": {
      "layer0": "kubejs:item/your2dtexture"
    }
  }```
drowsy harbor
drowsy harbor
#

anyways im out, thanks again.

jovial sage
#

@drowsy harbor Can I ask a question? I'm really struggling with this, I'm even asking for help in the gpt chat and getting lost. Regarding creating 3 models, for example, I have one already made. Can I just duplicate it the other two times and change the name? And do I put these codes in the code?

jovial sage
#

Mine in the hotbar looks 2d, and in the hand 3d! However without texture, or buggy texture

mossy wharf
mossy wharf
#

make a new post in #1047320998199955458 and post code

jovial sage
mossy wharf
jovial sage
drowsy harbor
#

no

#

make 3 files

#

1 is ur model

#

other 2 are just empty files

#

you can copy paste the codes into those

weak mango
#

i want the block to have 2d texture in inventory and the model itself on hand

prisma crescent
#

Yeah. That's doable 👍
You can just specify it in the model.

You can either add another model file to the item path. Or you can specify it in the item constructor on the block.

rugged elbow
#

Sorry for reviving this thread again, but I'm trying to accomplish this with my custom spears, but all it results in is the spear models and textures being used in both the handheld item and gui.