Java Code Examples for net.minecraft.inventory.EntityEquipmentSlot#CHEST
The following examples show how to use
net.minecraft.inventory.EntityEquipmentSlot#CHEST .
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: 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 2
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 3
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 4
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 5
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 6
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 7
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 8
Source File: TileChemicalReactor.java From AdvancedRocketry with MIT License | 6 votes |
@Override public void registerRecipes() { //Chemical Reactor RecipesMachine.getInstance().addRecipe(TileChemicalReactor.class, new Object[] {new ItemStack(AdvancedRocketryItems.itemCarbonScrubberCartridge,1, 0), new ItemStack(Items.COAL, 1, 1)}, 40, 20, new ItemStack(AdvancedRocketryItems.itemCarbonScrubberCartridge, 1, AdvancedRocketryItems.itemCarbonScrubberCartridge.getMaxDamage())); RecipesMachine.getInstance().addRecipe(TileChemicalReactor.class, new ItemStack(Items.DYE,5,0xF), 100, 1, Items.BONE, new FluidStack(AdvancedRocketryFluids.fluidNitrogen, 10)); RecipesMachine.getInstance().addRecipe(TileChemicalReactor.class, new FluidStack(AdvancedRocketryFluids.fluidRocketFuel, 20), 100, 10, new FluidStack(AdvancedRocketryFluids.fluidOxygen, 10), new FluidStack(AdvancedRocketryFluids.fluidHydrogen, 10)); if(Configuration.enableOxygen) { for(ResourceLocation key : Item.REGISTRY.getKeys()) { Item item = Item.REGISTRY.getObject(key); if(item instanceof ItemArmor && !(item instanceof ItemSpaceArmor)) { ItemStack enchanted = new ItemStack(item); enchanted.addEnchantment(AdvancedRocketryAPI.enchantmentSpaceProtection, 1); if(((ItemArmor)item).armorType == EntityEquipmentSlot.CHEST) RecipesMachine.getInstance().addRecipe(TileChemicalReactor.class, enchanted, 100, 10, item, "gemDiamond", new ItemStack(AdvancedRocketryItems.itemPressureTank, 1, 3)); else RecipesMachine.getInstance().addRecipe(TileChemicalReactor.class, enchanted, 100, 10, item, "gemDiamond"); } } } }
Example 9
Source File: ItemSpaceArmor.java From AdvancedRocketry with MIT License | 5 votes |
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { if(armorSlot == EntityEquipmentSlot.CHEST) { for(ItemStack stack : getComponents(itemStack)) { if(stack.getItem() instanceof IJetPack) return new RenderJetPack(_default); } } return super.getArmorModel(entityLiving, itemStack, armorSlot, _default); }
Example 10
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 11
Source File: ItemMetalArmor.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
public static ItemMetalArmor createChestplate(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.CHEST); }
Example 12
Source File: ItemAirUtils.java From AdvancedRocketry with MIT License | 5 votes |
@Override public boolean protectsFromSubstance(IAtmosphere atmosphere, ItemStack stack, boolean commitProtection) { if(stack != null && stack.getItem() instanceof ItemArmor) { if(((ItemArmor) stack.getItem()).armorType == EntityEquipmentSlot.CHEST ) return decrementAir(stack, 1) == 1; return true; } return false; }
Example 13
Source File: GTItemEnergyPack.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
public GTItemEnergyPack(int index, String tex, int max, String reg, String unl, int lvl, int limit) { super(index, EntityEquipmentSlot.CHEST); this.indexitem = index; this.setMaxDamage(0); this.texture = tex; this.maxEnergy = max; this.setRegistryName(reg); this.setUnlocalizedName(GTMod.MODID + unl); this.setCreativeTab(GTMod.creativeTabGT); this.tier = lvl; // 1; this.transferlimit = limit; this.rare = EnumRarity.COMMON; }
Example 14
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 15
Source File: ItemJetpack.java From AdvancedRocketry with MIT License | 4 votes |
@Override public boolean isAllowedInSlot(ItemStack stack, EntityEquipmentSlot slot) { return slot == EntityEquipmentSlot.CHEST; }
Example 16
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 17
Source File: ItemPressureTank.java From AdvancedRocketry with MIT License | 4 votes |
@Override public boolean isAllowedInSlot(ItemStack stack, EntityEquipmentSlot slot) { return slot == EntityEquipmentSlot.CHEST; }
Example 18
Source File: ItemHaori.java From Sakura_mod with MIT License | 4 votes |
public ItemHaori() { super(ItemLoader.KIMONO_MATERIAL, 0, EntityEquipmentSlot.CHEST); setUnlocalizedName(SakuraMain.MODID + "." + "haori"); }
Example 19
Source File: ItemCapeChest.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public ItemCapeChest() { super("cape", ArmorMaterial.LEATHER, EntityEquipmentSlot.CHEST); setMaxStackSize(1); }
Example 20
Source File: ContentItemArmorChest.java From customstuff4 with GNU General Public License v3.0 | 4 votes |
@Override protected ItemArmor createItem() { return new ItemArmor(this, EntityEquipmentSlot.CHEST); }