Jump to content

Dion6103

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Dion6103

  1. 16 minutes ago, Choonster said:

     

    Item#isValidArmor receives the EntityEquipmentSlot that's being checked as an argument, only return true if it's EntityEquipmentSlot.HEAD.

    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: 

    @Override
    	public boolean isValidArmor(ItemStack stack, EntityEquipmentSlot armorType, Entity entity) {
    		if(armorType == EntityEquipmentSlot.HEAD) {
    			return true;
    		}else {
    			return false;
    		}
    	}

    (Change EntityEquipmentSlot.HEAD to the respective armor piece or just return true if you want it to equip in all slots.

     

  2. 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) : 

     

    2017-10-24_22.17.22.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.