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

The following examples show how to use net.minecraft.inventory.EntityEquipmentSlot#FEET . 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: 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 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: 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 4
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 5
Source File: ItemSamuraiArmor.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 ItemSamuraiArmor(NAME + "_boots", 1, EntityEquipmentSlot.FEET);
	leggingsItem = new ItemSamuraiArmor(NAME + "_leggings", 2, EntityEquipmentSlot.LEGS);
	helmetItem = new ItemSamuraiArmor(NAME + "_helmet", 1, EntityEquipmentSlot.HEAD);
	chestplateItem = new ItemSamuraiArmor(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: 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 7
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 8
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 9
Source File: ItemMetalArmor.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static ItemMetalArmor createBoots(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.FEET);
}
 
Example 10
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 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: WhatAreThose.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SubscribeEvent
public static void onEquipEvent(TickEvent.PlayerTickEvent event) {
    if (rand.nextInt(1000) < 1) {
        EntityPlayer player = event.player;
        BlockPos pos = new BlockPos(player.posX, player.posY, player.posZ);
        IBlockState state = player.world.getBlockState(pos.add(0, -1, 0));
        if (player.onGround) {
            for (ItemStack stack : player.inventory.armorInventory) {
                if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).getEquipmentSlot() == EntityEquipmentSlot.FEET && state == Blocks.DIAMOND_BLOCK) {
                    player.sendMessage(new TextComponentString("What are THOOOOOSE!?"));
                }
            }
        }
    }
}
 
Example 13
Source File: ContentItemArmorBoots.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.FEET);
}
 
Example 14
Source File: ModelSamuraiArmors.java    From Sakura_mod with MIT License 4 votes vote down vote up
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{

  this.LegpanelL4.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.LegpanelL5.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.LegpanelL6.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  
  this.Chestplate.isHidden = false;
  
  this.LegpanelR4.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.LegpanelR5.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.LegpanelR6.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  
  this.BackpanelL1.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.BackpanelL2.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.BackpanelL3.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  
  this.BackpanelR1.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.BackpanelR2.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.BackpanelR3.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  
  this.SidepanelR1.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.SidepanelL1.isHidden = (state < 1)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.SidepanelR2.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.SidepanelL2.isHidden = (state < 2)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.SidepanelR3.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  this.SidepanelL3.isHidden = (state < 3)||(armorSlot!=EntityEquipmentSlot.LEGS);
  
  this.ShoesL.isHidden=(armorSlot!=EntityEquipmentSlot.FEET);
  this.ShoesR.isHidden=(armorSlot!=EntityEquipmentSlot.FEET);
  this.ShoesPartL.isHidden=(armorSlot!=EntityEquipmentSlot.FEET);
  this.ShoesPartR.isHidden=(armorSlot!=EntityEquipmentSlot.FEET);
  
  this.OrnamentL.isHidden = (state < 3);
  this.OrnamentL2.isHidden = (state < 3);
  this.OrnamentL3.isHidden = (state < 3);
  this.OrnamentR.isHidden = (state < 3);
  this.OrnamentR2.isHidden = (state < 3);
  this.OrnamentR3.isHidden = (state < 3);
  this.Gemornament.isHidden = (state < 3);
  this.Gemornament2.isHidden = (state < 3);
  this.Gemornament3.isHidden = (state < 3);
  this.Gem.isHidden = (state < 3);
  this.flapL.isHidden = (state < 2);
  this.flapR.isHidden = (state < 2);
  this.ShoulderplateLtop.isHidden = (state < 2);
  this.ShoulderplateL1.isHidden = (state < 2);
  this.ShoulderplateL2.isHidden = (state < 3);
  this.ShoulderplateL3.isHidden = (state < 3);
  this.ShoulderplateRtop.isHidden = (state < 2);
  this.ShoulderplateR1.isHidden = (state < 2);
  this.ShoulderplateR2.isHidden = (state < 3);
  this.ShoulderplateR3.isHidden = (state < 3);

  this.BeltL.isHidden = true;
  this.BeltR.isHidden = true;
  
  this.GauntletL.isHidden = (state < 3);
  this.GauntletR.isHidden = (state < 3);
  this.GauntletstrapL.isHidden = (state < 3);
  this.GauntletstrapR.isHidden = (state < 3);
  

  
  setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  if (this.isChild)
  {
    float f6 = 2.0F;
    GL11.glPushMatrix();
    GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
    GL11.glTranslatef(0.0F, 16.0F * f5, 0.0F);
    this.bipedHead.render(f5);
    GL11.glPopMatrix();
    GL11.glPushMatrix();
    GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
    GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
    this.bipedBody.render(f5);
    this.bipedRightArm.render(f5);
    this.bipedLeftArm.render(f5);
    this.bipedRightLeg.render(f5);
    this.bipedLeftLeg.render(f5);
    this.bipedHeadwear.render(f5);
    
    GL11.glPopMatrix();
  }
  else
  {
    GL11.glPushMatrix();
    GL11.glScalef(1.01F, 1.01F, 1.01F);
    this.bipedHead.render(f5);
    GL11.glPopMatrix();
    this.bipedBody.render(f5);
    this.bipedRightArm.render(f5);
    this.bipedLeftArm.render(f5);
    this.bipedRightLeg.render(f5);
    this.bipedLeftLeg.render(f5);
    this.bipedHeadwear.render(f5);
  }
}
 
Example 15
Source File: GTItemSpringBoots.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
public GTItemSpringBoots() {
	super(15, EntityEquipmentSlot.FEET);
	this.setRegistryName("spring_boots");
	this.setUnlocalizedName(GTMod.MODID + "." + "spring_boots");
	this.setCreativeTab(GTMod.creativeTabGT);
}
 
Example 16
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 17
Source File: EnchantmentBoingBoing.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
public EnchantmentBoingBoing() {
    super(Rarity.RARE, EnumEnchantmentType.ARMOR_FEET, new EntityEquipmentSlot[]{EntityEquipmentSlot.FEET});
    this.setRegistryName(new ResourceLocation(CommunityGlobals.MOD_ID, "bijump"));
    this.setName("bijump");
}