Jump to content

[1.10.2] [SOLVED] Equip item (just like pumpkins or skulls)


Recommended Posts

Posted

Hi, I'm trying to make an Item that can be equipped the same way as a pumpkin or a skull. I've been looking in the BlockPumpkin and ItemSkull code but there's nothing there O.o

 

Do someone know how to make it without extending ItemArmor? Thanks

Posted

Override

isValidArmor

in your Item class.

 

One last thing. I made that and it worked but the item is rendered too small. I thought that overriding getArmorModel would change that but the method is never called. What should I use?  ???

Posted

You mean inside the inventory? In first person when held? Also post your model files.

 

I'm trying to use a ModelBiped right now.

I mean in third person when equipped :) sorry for forgetting to tell you that.

Now I'm thinking: Is there a "display" element for thirdperson_equipped in the item.json?

Posted

You mean inside the inventory? In first person when held? Also post your model files.

 

I'm trying to use a ModelBiped right now.

I mean in third person when equipped :) sorry for forgetting to tell you that.

Now I'm thinking: Is there a "display" element for thirdperson_equipped in the item.json?

 

Oh forget it, there's a "head" element for "display" inside item.json

 

Like this:

"display": {
        "gui": {
            "rotation": [ 30, 225, 0 ],
            "translation": [ 0, 3, 0 ],
            "scale": [ 1, 1, 1 ]
        },
        "fixed": {
            "rotation": [ 0, 180, 0 ],
            "translation": [ 0, 4, 0],
            "scale":[ 1, 1, 1 ]
        },
        "ground": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0, 3, 0 ],
            "scale": [ 0.5, 0.5, 0.5 ]
        },
        "thirdperson_righthand": {
            "rotation": [ 45, 45, 0 ],
            "translation": [ 0, 3, 0 ],
            "scale": [ 0.5, 0.5, 0.5 ]
        },
        "head": {
        	"translation": [ 0, 8, 3.5 ],
            "scale": [ 1.5, 1.5, 1.5 ]
        }
}

 

 

Posted

ModelBiped is something you use for entities, not items.

Yeah sorry I thought you were talking about the one I was trying to use on getArmorModel :)

 

Please post the complete model JSON.

The "head" part in "display" is making what I wanted, that's what I wanted to say with "forget it" n.n Thanks for your help!

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.