Dion6103
-
Posts
3 -
Joined
-
Last visited
Posts posted by Dion6103
-
-
On 10/25/2017 at 4:14 AM, diesieben07 said:
Make a custom ItemBlock for your block and override isValidArmor.
I did this and it half worked. Is there a way to make it so that It can only be equipped in one slot, in this case the head slot?
P.S. Sorry if I am being a noob and this is some basic Java thing that I haven't encountered yet
-
I am currently working on a mod where I want to have a block able to be placed and equipped in the helmet slot like a pumpkin would. I have been looking at the code of a pumpkin and have found nothing. So far, I have a working block, it's model including it being placed and worn on the head.
How would I make it so that I can put a block onto my head without having to use commands?
Picture of the block placed and being worn on my head using the command ./replaceitem entity @p slot.armor.head modid:blockmagichat (Still need to know how to get it equipable normally) :
[Solved] Blocks equipable on head like pumpkins [1.10.2]
in Modder Support
Posted · Edited by Dion6103
Thanks a bunch! (Don't know why I didn't think of this before.... XD)
https://imgur.com/a/cg7ti
For anyone looking for the answer in the future, this is what I did.
In your ItemBlock class I put:
(Change EntityEquipmentSlot.HEAD to the respective armor piece or just return true if you want it to equip in all slots.