Advertisement
jayhillx

[Advanced Combat] ACItems

Dec 26th, 2021
1,394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 10.81 KB | None | 0 0
  1. package com.advancedcombat.init;
  2.  
  3. import com.advancedcombat.AdvancedCombat;
  4. import com.advancedcombat.common.item.*;
  5. import com.advancedcombat.common.item.util.ACArmorMaterial;
  6. import com.advancedcombat.common.item.util.ACToolTier;
  7. import com.advancedcombat.common.item.ObsidianArmorItem;
  8. import com.advancedcombat.common.item.StoneArmorItem;
  9. import com.advancedcombat.common.item.WoodArmorItem;
  10. import com.advancedcombat.common.item.util.BlockItemUtils;
  11. import net.minecraft.enchantment.Enchantments;
  12. import net.minecraft.inventory.EquipmentSlotType;
  13. import net.minecraft.item.*;
  14. import net.minecraftforge.fml.RegistryObject;
  15. import net.minecraftforge.registries.DeferredRegister;
  16. import net.minecraftforge.registries.ForgeRegistries;
  17.  
  18. public class ACItems {
  19.     public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, AdvancedCombat.MOD_ID);
  20.  
  21.     /** Blocks. */
  22.     public static RegistryObject<Item> advanced_stone;
  23.     public static RegistryObject<Item> nether_star_block;
  24.     public static RegistryObject<Item> reinforced_obsidian;
  25.  
  26.     public static RegistryObject<Item> advanced_wooden_sword;
  27.     public static RegistryObject<Item> advanced_stone_sword;
  28.     public static RegistryObject<Item> advanced_golden_sword;
  29.     public static RegistryObject<Item> advanced_iron_sword;
  30.     public static RegistryObject<Item> advanced_emerald_sword;
  31.     public static RegistryObject<Item> advanced_diamond_sword;
  32.     public static RegistryObject<Item> nether_star_sword;
  33.     public static RegistryObject<Item> advanced_nether_star_sword;
  34.     public static RegistryObject<Item> creative_sword;
  35.  
  36.     /** Upgrades. */
  37.     public static RegistryObject<Item> sharpness_upgrade;
  38.     public static RegistryObject<Item> smite_upgrade;
  39.     public static RegistryObject<Item> bane_of_arthropods_upgrade;
  40.     public static RegistryObject<Item> knockback_upgrade;
  41.     public static RegistryObject<Item> fire_aspect_upgrade;
  42.     public static RegistryObject<Item> looting_upgrade;
  43.     public static RegistryObject<Item> unbreaking_upgrade;
  44.     public static RegistryObject<Item> mending_upgrade;
  45.     public static RegistryObject<Item> protection_upgrade;
  46.     public static RegistryObject<Item> fire_protection_upgrade;
  47.     public static RegistryObject<Item> blast_protection_upgrade;
  48.     public static RegistryObject<Item> projectile_protection_upgrade;
  49.     public static RegistryObject<Item> feather_falling_upgrade;
  50.     public static RegistryObject<Item> respiration_upgrade;
  51.     public static RegistryObject<Item> aqua_affinity_upgrade;
  52.     public static RegistryObject<Item> thorns_upgrade;
  53.     public static RegistryObject<Item> depth_strider_upgrade;
  54.     public static RegistryObject<Item> frost_walker_upgrade;
  55.     public static RegistryObject<Item> efficiency_upgrade;
  56.     public static RegistryObject<Item> silk_touch_upgrade;
  57.     public static RegistryObject<Item> fortune_upgrade;
  58.     public static RegistryObject<Item> power_upgrade;
  59.     public static RegistryObject<Item> punch_upgrade;
  60.     public static RegistryObject<Item> flame_upgrade;
  61.     public static RegistryObject<Item> infinity_upgrade;
  62.     public static RegistryObject<Item> luck_of_the_sea_upgrade;
  63.     public static RegistryObject<Item> lure_upgrade;
  64.  
  65.     public static RegistryObject<Item> advanced_bow;
  66.     public static RegistryObject<Item> advanced_shield;
  67.  
  68.     /** Armor. */
  69.     public static RegistryObject<Item> wooden_helmet;
  70.     public static RegistryObject<Item> wooden_chestplate;
  71.     public static RegistryObject<Item> wooden_leggings;
  72.     public static RegistryObject<Item> wooden_boots;
  73.  
  74.     public static RegistryObject<Item> stone_helmet;
  75.     public static RegistryObject<Item> stone_chestplate;
  76.     public static RegistryObject<Item> stone_leggings;
  77.     public static RegistryObject<Item> stone_boots;
  78.  
  79.     public static RegistryObject<Item> obsidian_helmet;
  80.     public static RegistryObject<Item> obsidian_chestplate;
  81.     public static RegistryObject<Item> obsidian_leggings;
  82.     public static RegistryObject<Item> obsidian_boots;
  83.  
  84.     /** Registers items based on config values. */
  85.     public static void registerItems(DeferredRegister<Item> items) {
  86.         advanced_stone = items.register("advanced_stone", () -> new BlockItemUtils(ACBlocks.ADVANCED_STONE.get()));
  87.         nether_star_block = items.register("nether_star_block", () -> new BlockItemUtils(ACBlocks.NETHER_STAR_BLOCK.get()));
  88.         reinforced_obsidian = items.register("reinforced_obsidian", () -> new BlockItemUtils(ACBlocks.REINFORCED_OBSIDIAN.get()));
  89.  
  90.         advanced_wooden_sword = items.register("advanced_wooden_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_WOOD, 3, -2.4F, false));
  91.         advanced_stone_sword = items.register("advanced_stone_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_STONE, 3, -2.4F, false));
  92.         advanced_golden_sword = items.register("advanced_golden_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_GOLD, 3, -2.4F, false));
  93.         advanced_iron_sword = items.register("advanced_iron_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_IRON, 3, -2.4F, false));
  94.         advanced_emerald_sword = items.register("advanced_emerald_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_EMERALD, 3, -2.4F, false));
  95.         advanced_diamond_sword = items.register("advanced_diamond_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_DIAMOND, 3, -2.4F, false));
  96.         nether_star_sword = items.register("nether_star_sword", () -> new AdvancedSwordItem(ACToolTier.NETHER_STAR, 3, -2.4F, true));
  97.         advanced_nether_star_sword = items.register("advanced_nether_star_sword", () -> new AdvancedSwordItem(ACToolTier.ADVANCED_NETHER_STAR, 3, -2.4F, true));
  98.         creative_sword = items.register("creative_sword", () -> new CreativeSwordItem(ACToolTier.CREATIVE));
  99.  
  100.         sharpness_upgrade = items.register("sharpness_upgrade", () -> new EnchantmentItem(Enchantments.SHARPNESS));
  101.         smite_upgrade = items.register("smite_upgrade", () -> new EnchantmentItem(Enchantments.SMITE));
  102.         bane_of_arthropods_upgrade = items.register("bane_of_arthropods_upgrade", () -> new EnchantmentItem(Enchantments.BANE_OF_ARTHROPODS));
  103.         knockback_upgrade = items.register("knockback_upgrade", () -> new EnchantmentItem(Enchantments.KNOCKBACK));
  104.         fire_aspect_upgrade = items.register("fire_aspect_upgrade", () -> new EnchantmentItem(Enchantments.FIRE_ASPECT));
  105.         looting_upgrade = items.register("looting_upgrade", () -> new EnchantmentItem(Enchantments.MOB_LOOTING));
  106.         unbreaking_upgrade = items.register("unbreaking_upgrade", () -> new EnchantmentItem(Enchantments.UNBREAKING));
  107.         mending_upgrade = items.register("mending_upgrade", () -> new EnchantmentItem(Enchantments.MENDING));
  108.         protection_upgrade = items.register("protection_upgrade", () -> new EnchantmentItem(Enchantments.ALL_DAMAGE_PROTECTION));
  109.         fire_protection_upgrade = items.register("fire_protection_upgrade", () -> new EnchantmentItem(Enchantments.FIRE_PROTECTION));
  110.         blast_protection_upgrade = items.register("blast_protection_upgrade", () -> new EnchantmentItem(Enchantments.BLAST_PROTECTION));
  111.         projectile_protection_upgrade = items.register("projectile_protection_upgrade", () -> new EnchantmentItem(Enchantments.PROJECTILE_PROTECTION));
  112.         feather_falling_upgrade = items.register("feather_falling_upgrade", () -> new EnchantmentItem(Enchantments.FALL_PROTECTION));
  113.         respiration_upgrade = items.register("respiration_upgrade", () -> new EnchantmentItem(Enchantments.RESPIRATION));
  114.         aqua_affinity_upgrade = items.register("aqua_affinity_upgrade", () -> new EnchantmentItem(Enchantments.AQUA_AFFINITY));
  115.         thorns_upgrade = items.register("thorns_upgrade", () -> new EnchantmentItem(Enchantments.THORNS));
  116.         depth_strider_upgrade = items.register("depth_strider_upgrade", () -> new EnchantmentItem(Enchantments.DEPTH_STRIDER));
  117.         frost_walker_upgrade = items.register("frost_walker_upgrade", () -> new EnchantmentItem(Enchantments.FROST_WALKER));
  118.         efficiency_upgrade = items.register("efficiency_upgrade", () -> new EnchantmentItem(Enchantments.BLOCK_EFFICIENCY));
  119.         silk_touch_upgrade = items.register("silk_touch_upgrade", () -> new EnchantmentItem(Enchantments.SILK_TOUCH));
  120.         fortune_upgrade = items.register("fortune_upgrade", () -> new EnchantmentItem(Enchantments.BLOCK_FORTUNE));
  121.         power_upgrade = items.register("power_upgrade", () -> new EnchantmentItem(Enchantments.POWER_ARROWS));
  122.         punch_upgrade = items.register("punch_upgrade", () -> new EnchantmentItem(Enchantments.PUNCH_ARROWS));
  123.         flame_upgrade = items.register("flame_upgrade", () -> new EnchantmentItem(Enchantments.FLAMING_ARROWS));
  124.         infinity_upgrade = items.register("infinity_upgrade", () -> new EnchantmentItem(Enchantments.INFINITY_ARROWS));
  125.         luck_of_the_sea_upgrade = items.register("luck_of_the_sea_upgrade", () -> new EnchantmentItem(Enchantments.FISHING_LUCK));
  126.         lure_upgrade = items.register("lure_upgrade", () -> new EnchantmentItem(Enchantments.FISHING_SPEED));
  127.  
  128.         advanced_bow = items.register("advanced_bow", AdvancedBowItem::new);
  129.         advanced_shield = items.register("advanced_shield", AdvancedShieldItem::new);
  130.  
  131.         wooden_helmet = items.register("wooden_helmet", () -> new WoodArmorItem(ACArmorMaterial.WOODEN, EquipmentSlotType.HEAD));
  132.         wooden_chestplate = items.register("wooden_chestplate", () -> new WoodArmorItem(ACArmorMaterial.WOODEN, EquipmentSlotType.CHEST));
  133.         wooden_leggings = items.register("wooden_leggings", () -> new WoodArmorItem(ACArmorMaterial.WOODEN, EquipmentSlotType.LEGS));
  134.         wooden_boots = items.register("wooden_boots", () -> new WoodArmorItem(ACArmorMaterial.WOODEN, EquipmentSlotType.FEET));
  135.  
  136.         stone_helmet = items.register("stone_helmet", () -> new StoneArmorItem(ACArmorMaterial.STONE, EquipmentSlotType.HEAD));
  137.         stone_chestplate = items.register("stone_chestplate", () -> new StoneArmorItem(ACArmorMaterial.STONE, EquipmentSlotType.CHEST));
  138.         stone_leggings = items.register("stone_leggings", () -> new StoneArmorItem(ACArmorMaterial.STONE, EquipmentSlotType.LEGS));
  139.         stone_boots = items.register("stone_boots", () -> new StoneArmorItem(ACArmorMaterial.STONE, EquipmentSlotType.FEET));
  140.  
  141.         obsidian_helmet = items.register("obsidian_helmet", () -> new ObsidianArmorItem(ACArmorMaterial.OBSIDIAN, EquipmentSlotType.HEAD));
  142.         obsidian_chestplate = items.register("obsidian_chestplate", () -> new ObsidianArmorItem(ACArmorMaterial.OBSIDIAN, EquipmentSlotType.CHEST));
  143.         obsidian_leggings = items.register("obsidian_leggings", () -> new ObsidianArmorItem(ACArmorMaterial.OBSIDIAN, EquipmentSlotType.LEGS));
  144.         obsidian_boots = items.register("obsidian_boots", () -> new ObsidianArmorItem(ACArmorMaterial.OBSIDIAN, EquipmentSlotType.FEET));
  145.     }
  146.  
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement