Java Code Examples for net.minecraft.inventory.EntityEquipmentSlot#LEGS
The following examples show how to use
net.minecraft.inventory.EntityEquipmentSlot#LEGS .
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: ItemSamuraiArmor.java From ToroQuest with GNU General Public License v3.0 | 6 votes |
@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 2
Source File: ProfileMagicArcher.java From minecraft-roguelike with GNU General Public License v3.0 | 6 votes |
@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 |
@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 |
@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: ItemToroArmor.java From ToroQuest with GNU General Public License v3.0 | 6 votes |
@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: ItemReinforcedDiamondArmor.java From ToroQuest with GNU General Public License v3.0 | 6 votes |
@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 |
@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: ArmorMetaItem.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
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 |
@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: ItemMetalArmor.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
protected ItemMetalArmor(MetalMaterial metal, ArmorMaterial armorMat, int renderIndex, EntityEquipmentSlot slot) { super(armorMat, renderIndex, slot); this.metal = metal; this.repairOreDictName = "ingot"+metal.getCapitalizedName(); this.customTexture = BaseMetals.MODID+":textures/models/armor/"+metal.getName()+"_layer_"+(slot == EntityEquipmentSlot.LEGS ? 2 : 1)+".png"; }
Example 11
Source File: ItemMetalArmor.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
public static ItemMetalArmor createLeggings(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.LEGS); }
Example 12
Source File: ProfileTallMob.java From minecraft-roguelike with GNU General Public License v3.0 | 5 votes |
@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 13
Source File: ContentItemArmorLegs.java From customstuff4 with GNU General Public License v3.0 | 4 votes |
@Override protected ItemArmor createItem() { return new ItemArmor(this, EntityEquipmentSlot.LEGS); }
Example 14
Source File: ItemKimono.java From Sakura_mod with MIT License | 4 votes |
public ItemKimono() { super(ItemLoader.KIMONO_MATERIAL, 0, EntityEquipmentSlot.LEGS); setUnlocalizedName(SakuraMain.MODID + "." + "kimono"); }
Example 15
Source File: EnchantmentSpaceBreathing.java From AdvancedRocketry with MIT License | 4 votes |
public EnchantmentSpaceBreathing() { super(Rarity.COMMON, EnumEnchantmentType.ARMOR, new EntityEquipmentSlot[] {EntityEquipmentSlot.CHEST, EntityEquipmentSlot.FEET, EntityEquipmentSlot.HEAD, EntityEquipmentSlot.LEGS}); this.setName("spaceBreathing"); }
Example 16
Source File: ArmorRenderHooks.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
private static boolean isLegSlot(EntityEquipmentSlot equipmentSlot) { return equipmentSlot == EntityEquipmentSlot.LEGS; }
Example 17
Source File: ItemTightPants.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
public ItemTightPants() { super(SPANDEX, 0, EntityEquipmentSlot.LEGS); this.setTranslationKey(CommunityGlobals.MOD_ID + ".tight_pants"); this.setCreativeTab(CommunityGlobals.TAB); }
Example 18
Source File: ModelSamuraiArmors.java From Sakura_mod with MIT License | 4 votes |
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); } }