Java Code Examples for net.minecraft.inventory.EntityEquipmentSlot#HEAD

The following examples show how to use net.minecraft.inventory.EntityEquipmentSlot#HEAD . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfileAshlea.java    From minecraft-roguelike with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void addEquipment(World world, Random rand, int level, IEntity mob) {
	
	mob.setChild(true);
	
	MonsterProfile.get(MonsterProfile.VILLAGER).addEquipment(world, rand, level, mob);
	
	ItemStack weapon = ItemNovelty.getItem(ItemNovelty.ASHLEA);
	mob.setSlot(EntityEquipmentSlot.MAINHAND, weapon);
	
	for(EntityEquipmentSlot slot : new EntityEquipmentSlot[]{
			EntityEquipmentSlot.HEAD,
			EntityEquipmentSlot.CHEST,
			EntityEquipmentSlot.LEGS,
			EntityEquipmentSlot.FEET
			}){
		ItemStack item = ItemArmour.get(rand, Slot.getSlot(slot), Quality.WOOD);
		ItemArmour.dyeArmor(item, 255, 100, 255);
		mob.setSlot(slot, item);
	}
}
 
Example 2
Source File: ProfileMagicArcher.java    From minecraft-roguelike with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void addEquipment(World world, Random rand, int level, IEntity mob) {
	
	mob.setMobClass(MobType.STRAY, false);
	
	mob.setSlot(EntityEquipmentSlot.OFFHAND, TippedArrow.get(Potion.HARM));
	mob.setSlot(EntityEquipmentSlot.MAINHAND, ItemWeapon.getBow(rand, level, Enchant.canEnchant(world.getDifficulty(), rand, level)));
	
	for(EntityEquipmentSlot slot : new EntityEquipmentSlot[]{
			EntityEquipmentSlot.HEAD,
			EntityEquipmentSlot.CHEST,
			EntityEquipmentSlot.LEGS,
			EntityEquipmentSlot.FEET
			}){
		ItemStack item = ItemArmour.get(rand, Slot.getSlot(slot), Quality.WOOD);
		Enchant.enchantItem(rand, item, 20);
		ItemArmour.dyeArmor(item, 51, 0, 102);
		mob.setSlot(slot, item);
	}
}
 
Example 3
Source File: ItemRoyalArmor.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
@SubscribeEvent
public static void init(final RegistryEvent.Register<Item> event) {
	bootsItem = new ItemRoyalArmor(NAME + "_boots", 1, EntityEquipmentSlot.FEET);
	leggingsItem = new ItemRoyalArmor(NAME + "_leggings", 2, EntityEquipmentSlot.LEGS);
	helmetItem = new ItemRoyalArmor(NAME + "_helmet", 1, EntityEquipmentSlot.HEAD);
	chestplateItem = new ItemRoyalArmor(NAME + "_chestplate", 1, EntityEquipmentSlot.CHEST);

	bootsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_boots"));
	event.getRegistry().register(bootsItem);

	leggingsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_leggings"));
	event.getRegistry().register(leggingsItem);

	helmetItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_helmet"));
	event.getRegistry().register(helmetItem);

	chestplateItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_chestplate"));
	event.getRegistry().register(chestplateItem);
}
 
Example 4
Source File: ItemReinforcedDiamondArmor.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
@SubscribeEvent
public static void init(final RegistryEvent.Register<Item> event) {
	bootsItem = new ItemReinforcedDiamondArmor(NAME + "_boots", 1, EntityEquipmentSlot.FEET);
	leggingsItem = new ItemReinforcedDiamondArmor(NAME + "_leggings", 2, EntityEquipmentSlot.LEGS);
	helmetItem = new ItemReinforcedDiamondArmor(NAME + "_helmet", 1, EntityEquipmentSlot.HEAD);
	chestplateItem = new ItemReinforcedDiamondArmor(NAME + "_chestplate", 1, EntityEquipmentSlot.CHEST);

	bootsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_boots"));
	event.getRegistry().register(bootsItem);

	leggingsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_leggings"));
	event.getRegistry().register(leggingsItem);

	helmetItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_helmet"));
	event.getRegistry().register(helmetItem);

	chestplateItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_chestplate"));
	event.getRegistry().register(chestplateItem);
}
 
Example 5
Source File: ItemToroArmor.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
@SubscribeEvent
public static void init(final RegistryEvent.Register<Item> event) {
	bootsItem = new ItemToroArmor(NAME + "_boots", 1, EntityEquipmentSlot.FEET);
	leggingsItem = new ItemToroArmor(NAME + "_leggings", 2, EntityEquipmentSlot.LEGS);
	helmetItem = new ItemToroArmor(NAME + "_helmet", 1, EntityEquipmentSlot.HEAD);
	chestplateItem = new ItemToroArmor(NAME + "_chestplate", 1, EntityEquipmentSlot.CHEST);

	bootsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_boots"));
	event.getRegistry().register(bootsItem);

	leggingsItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_leggings"));
	event.getRegistry().register(leggingsItem);

	helmetItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_helmet"));
	event.getRegistry().register(helmetItem);

	chestplateItem.setRegistryName(new ResourceLocation(ToroQuest.MODID, NAME + "_chestplate"));
	event.getRegistry().register(chestplateItem);
}
 
Example 6
Source File: ProfilePoisonArcher.java    From minecraft-roguelike with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void addEquipment(World world, Random rand, int level, IEntity mob) {
	
	mob.setMobClass(MobType.STRAY, false);
	
	mob.setSlot(EntityEquipmentSlot.OFFHAND, TippedArrow.get(PotionTypes.STRONG_POISON));
	mob.setSlot(EntityEquipmentSlot.MAINHAND, ItemWeapon.getBow(rand, level, Enchant.canEnchant(world.getDifficulty(), rand, level)));
	
	for(EntityEquipmentSlot slot : new EntityEquipmentSlot[]{
			EntityEquipmentSlot.HEAD,
			EntityEquipmentSlot.CHEST,
			EntityEquipmentSlot.LEGS,
			EntityEquipmentSlot.FEET
			}){
		ItemStack item = ItemArmour.get(rand, Slot.getSlot(slot), Quality.WOOD);
		Enchant.enchantItem(rand, item, 20);
		ItemArmour.dyeArmor(item, 178, 255, 102); //bright lime green
		mob.setSlot(slot, item);
	}
}
 
Example 7
Source File: ItemMetalArmor.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static ItemMetalArmor createHelmet(MetalMaterial metal){
	ArmorMaterial material = cyano.basemetals.init.Materials.getArmorMaterialFor(metal);
	if(material == null){
		// uh-oh
		FMLLog.severe("Failed to load armor material enum for "+metal);
	}
	return new ItemMetalArmor(metal,material,material.ordinal(),EntityEquipmentSlot.HEAD);
}
 
Example 8
Source File: ArmorMetaItem.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static EntityEquipmentSlot getSlotByIndex(int index) {
    switch (index) {
        case 0: return EntityEquipmentSlot.FEET;
        case 1: return EntityEquipmentSlot.LEGS;
        case 2: return EntityEquipmentSlot.CHEST;
        default: return EntityEquipmentSlot.HEAD;
    }
}
 
Example 9
Source File: ItemUpgrade.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
@Override
public boolean isAllowedInSlot(ItemStack componentStack, EntityEquipmentSlot targetSlot) {
	if(componentStack.getItemDamage() == legUpgradeDamage)
		return targetSlot == EntityEquipmentSlot.LEGS;
	else if(componentStack.getItemDamage() == bootsUpgradeDamage)
		return targetSlot == EntityEquipmentSlot.FEET;
	return targetSlot == EntityEquipmentSlot.HEAD;
}
 
Example 10
Source File: GTItemLightHelmet.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
public GTItemLightHelmet() {
	super(-1, EntityEquipmentSlot.HEAD);
	this.setRegistryName("light_helmet");
	this.setUnlocalizedName(GTMod.MODID + "." + "light_helmet");
	this.setCreativeTab(GTMod.creativeTabGT);
	setMaxDamage(0);
}
 
Example 11
Source File: ProfileTallMob.java    From minecraft-roguelike with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void addEquipment(World world, Random rand, int level, IEntity mob) {
	for(EntityEquipmentSlot slot : new EntityEquipmentSlot[]{
			EntityEquipmentSlot.HEAD,
			EntityEquipmentSlot.CHEST,
			EntityEquipmentSlot.LEGS,
			EntityEquipmentSlot.FEET
			}){
		ItemStack item = Loot.getEquipmentBySlot(rand, Slot.getSlot(slot), level, Enchant.canEnchant(world.getDifficulty(), rand, level));
		mob.setSlot(slot, item);
	}

}
 
Example 12
Source File: ItemCreativeHaloHead.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
public ItemCreativeHaloHead() {
	super("halo_creative", ArmorMaterial.IRON, EntityEquipmentSlot.HEAD);
	setMaxStackSize(1);
}
 
Example 13
Source File: EnchantmentSpaceBreathing.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public EnchantmentSpaceBreathing() {
	super(Rarity.COMMON, EnumEnchantmentType.ARMOR, new EntityEquipmentSlot[] {EntityEquipmentSlot.CHEST, EntityEquipmentSlot.FEET, EntityEquipmentSlot.HEAD, EntityEquipmentSlot.LEGS});
	this.setName("spaceBreathing");
}
 
Example 14
Source File: ItemBeaconFinder.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public boolean isAllowedInSlot(ItemStack componentStack,
		EntityEquipmentSlot armorType) {
	return armorType == EntityEquipmentSlot.HEAD;
}
 
Example 15
Source File: ItemAtmosphereAnalzer.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public boolean isAllowedInSlot(ItemStack componentStack, EntityEquipmentSlot targetSlot) {
	return targetSlot == EntityEquipmentSlot.HEAD;
}
 
Example 16
Source File: ContentItemArmorHelmet.java    From customstuff4 with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected ItemArmor createItem()
{
    return new ItemArmor(this, EntityEquipmentSlot.HEAD);
}
 
Example 17
Source File: ArmorLogicRebreather.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public EntityEquipmentSlot getEquipmentSlot(ItemStack itemStack) {
    return EntityEquipmentSlot.HEAD;
}
 
Example 18
Source File: DummyArmorLogic.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public EntityEquipmentSlot getEquipmentSlot(ItemStack itemStack) {
    return EntityEquipmentSlot.HEAD;
}
 
Example 19
Source File: ItemSexyGlasses.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
public ItemSexyGlasses() {
	super(ArmorMaterial.IRON, 0, EntityEquipmentSlot.HEAD);
}
 
Example 20
Source File: SpaceHelm.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
public SpaceHelm() {
	super(Space.SPACEHELM, 0, EntityEquipmentSlot.HEAD);
	setRegistryName("spacehelm");
       setTranslationKey(CommunityGlobals.MOD_ID + ".spacehelm");
	setCreativeTab(CommunityGlobals.TAB);
}