jayhillx

[Advanced Combat] ACRecipeManager

Dec 19th, 2021 (edited)
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 12.08 KB | None | 0 0
  1. /** Adds and registers custom item recipes. */
  2. public class ACRecipeManager extends RecipeProvider {
  3.  
  4.     public ACRecipeManager(DataGenerator generator) {
  5.         super(generator);
  6.     }
  7.  
  8.     @Override
  9.     protected void buildShapelessRecipes(@Nonnull Consumer<IFinishedRecipe> consumer) {
  10.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.SHARPNESS_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.FLINT).define('A', Items.IRON_SWORD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  11.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.SMITE_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.ROTTEN_FLESH).define('A', Items.BONE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  12.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.BANE_OF_ARTHROPODS_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.SPIDER_EYE).define('A', Items.STRING).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  13.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.KNOCKBACK_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Blocks.PISTON).define('A', Blocks.SLIME_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  14.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FIRE_ASPECT_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.FIRE_CHARGE).define('A', Blocks.COAL_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  15.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LOOTING_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.GOLD_INGOT).define('A', Items.GOLDEN_SWORD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  16.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.UNBREAKING_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Blocks.OBSIDIAN).define('A', Items.DIAMOND_CHESTPLATE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  17.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.MENDING_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Blocks.ANVIL).define('A', Items.POPPED_CHORUS_FRUIT).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  18.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PROTECTION_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.LEATHER_CHESTPLATE).define('A', Items.SHIELD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  19.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FIRE_PROTECTION_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.NETHER_BRICK).define('A', Items.FLINT_AND_STEEL).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  20.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.BLAST_PROTECTION_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Blocks.OBSIDIAN).define('A', Blocks.TNT).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  21.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PROJECTILE_PROTECTION_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.ARROW).define('A', Items.BOW).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  22.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FEATHER_FALLING_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.FEATHER).define('A', Blocks.HAY_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  23.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.RESPIRATION_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.TROPICAL_FISH).define('A', Items.GLASS_BOTTLE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  24.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.AQUA_AFFINITY_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.TROPICAL_FISH).define('A', Items.IRON_PICKAXE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  25.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.THORNS_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Blocks.CACTUS).define('A', Items.FLINT).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  26.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.DEPTH_STRIDER_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.LEATHER_BOOTS).define('A', Items.WATER_BUCKET).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  27.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FROST_WALKER_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.GOLDEN_BOOTS).define('A', Blocks.ICE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  28.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.EFFICIENCY_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.REDSTONE).define('A', Items.DIAMOND_PICKAXE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  29.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.SILK_TOUCH_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.STRING).define('A', Items.GOLDEN_PICKAXE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  30.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FORTUNE_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.DIAMOND).define('A', Items.GOLD_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  31.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.POWER_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.ARROW).define('A', Items.FLINT).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  32.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PUNCH_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.ARROW).define('A', Blocks.PISTON).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  33.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FLAME_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.BLAZE_ROD).define('A', Blocks.COAL_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  34.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.INFINITY_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.BOW).define('A', Items.GOLDEN_APPLE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  35.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LUCK_OF_THE_SEA_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.FISHING_ROD).define('A', Items.TROPICAL_FISH).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  36.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LURE_UPGRADE.get(), 0), 1).define('I', Items.PAPER).define('X', Items.FISHING_ROD).define('A', Items.TROPICAL_FISH).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  37.  
  38.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.SHARPNESS_UPGRADE.get(), 1), 1).define('A', ACItems.SHARPNESS_UPGRADE.get()).define('X', Items.DIAMOND_SWORD).define('I', Items.PRISMARINE_SHARD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  39.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.SMITE_UPGRADE.get(), 1), 1).define('A', ACItems.SMITE_UPGRADE.get()).define('X', Items.ZOMBIE_HEAD).define('I', Items.SKELETON_SKULL).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  40.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.BANE_OF_ARTHROPODS_UPGRADE.get(), 0), 1).define('A', ACItems.BANE_OF_ARTHROPODS_UPGRADE.get()).define('X', Items.FERMENTED_SPIDER_EYE).define('I', Items.COBWEB).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  41.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.KNOCKBACK_UPGRADE.get(), 1), 1).define('A', ACItems.KNOCKBACK_UPGRADE.get()).define('X', Items.STICKY_PISTON).define('I', Items.SLIME_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  42.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FIRE_ASPECT_UPGRADE.get(), 1), 1).define('A', ACItems.FIRE_ASPECT_UPGRADE.get()).define('X', Items.COAL_BLOCK).define('I', Items.BLAZE_ROD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  43.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LOOTING_UPGRADE.get(), 1), 1).define('A', ACItems.LOOTING_UPGRADE.get()).define('X', Items.GOLD_BLOCK).define('I', Items.LAPIS_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  44.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.UNBREAKING_UPGRADE.get(), 1), 1).define('A', ACItems.UNBREAKING_UPGRADE.get()).define('X', Items.GHAST_TEAR).define('I', Items.DIAMOND_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  45.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PROTECTION_UPGRADE.get(), 1), 1).define('A', ACItems.PROTECTION_UPGRADE.get()).define('X', Items.DIAMOND_CHESTPLATE).define('I', Items.OBSIDIAN).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  46.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FIRE_PROTECTION_UPGRADE.get(), 1), 1).define('A', ACItems.FIRE_PROTECTION_UPGRADE.get()).define('X', Items.FIRE_CHARGE).define('I', Items.OBSIDIAN).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  47.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.BLAST_PROTECTION_UPGRADE.get(), 1), 1).define('A', ACItems.BLAST_PROTECTION_UPGRADE.get()).define('X', Items.TNT).define('I', Items.CREEPER_HEAD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  48.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PROJECTILE_PROTECTION_UPGRADE.get(), 1), 1).define('A', ACItems.PROJECTILE_PROTECTION_UPGRADE.get()).define('X', Items.BOW).define('I', Items.OBSIDIAN).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  49.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FEATHER_FALLING_UPGRADE.get(), 1), 1).define('A', ACItems.FEATHER_FALLING_UPGRADE.get()).define('X', Items.HAY_BLOCK).define('I', Items.WHITE_BED).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  50.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.THORNS_UPGRADE.get(), 1), 1).define('A', ACItems.THORNS_UPGRADE.get()).define('X', Items.IRON_BARS).define('I', Items.CACTUS).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  51.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FROST_WALKER_UPGRADE.get(), 1), 1).define('A', ACItems.FROST_WALKER_UPGRADE.get()).define('X', Items.DIAMOND_BOOTS).define('I', Items.PACKED_ICE).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  52.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.EFFICIENCY_UPGRADE.get(), 1), 1).define('A', ACItems.EFFICIENCY_UPGRADE.get()).define('X', Items.REDSTONE_BLOCK).define('I', Items.DIAMOND_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  53.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.FORTUNE_UPGRADE.get(), 1), 1).define('A', ACItems.FORTUNE_UPGRADE.get()).define('X', Items.GOLD_BLOCK).define('I', Items.DIAMOND_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  54.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.POWER_UPGRADE.get(), 1), 1).define('A', ACItems.POWER_UPGRADE.get()).define('X', Items.ARROW).define('I', Items.IRON_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  55.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.PUNCH_UPGRADE.get(), 1), 1).define('A', ACItems.PUNCH_UPGRADE.get()).define('X', Items.PISTON).define('I', Items.SLIME_BLOCK).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  56.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LUCK_OF_THE_SEA_UPGRADE.get(), 1), 1).define('A', ACItems.LUCK_OF_THE_SEA_UPGRADE.get()).define('X', Items.RABBIT_FOOT).define('I', Items.EMERALD).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  57.         ShapedRecipeBuilder.shaped(getEnchantmentTier(ACItems.LURE_UPGRADE.get(), 1), 1).define('A', ACItems.LURE_UPGRADE.get()).define('X', Items.TROPICAL_FISH).define('I', Items.POISONOUS_POTATO).pattern("IXI").pattern("XAX").pattern("IXI").save(consumer);
  58.     }
  59.  
  60.     /** Clarifies if the item is elite or not. */
  61.     private Item getEnchantmentTier(Item item, int value) {
  62.         ItemStack stack = new ItemStack(item, 1);
  63.  
  64.         stack.setDamageValue(value);
  65.         return item;
  66.     }
  67.  
  68. }
Add Comment
Please, Sign In to add comment