broken-arrow

Untitled

Sep 26th, 2021
1,061
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public void loadRecipes() {
  2.         recipeCache = new RecipeCache();
  3.         for (Crafting craftingRecipe : Crafting.values()) {
  4.             String recipeValues = craftingRecipe.toString();
  5.  
  6.             if (Minecraftversion(recipeValues)) continue;
  7.  
  8.             String matrialNameFirst = Crafting.valueOf(recipeValues).getMaterialName1();
  9.             String matrialNameSecond = Crafting.valueOf(recipeValues).getMaterialName2();
  10.             String matrialNameThird = Crafting.valueOf(recipeValues).getMaterialName3();
  11.             String matrialNameFourth = Crafting.valueOf(recipeValues).getMaterialName4();
  12.             String matrialNameFifth = Crafting.valueOf(recipeValues).getMaterialName5();
  13.             int matrialamountFirst = Crafting.valueOf(recipeValues).getAmontNeededCrafting1();
  14.             int matrialamountSecond = Crafting.valueOf(recipeValues).getAmontNeededCrafting2();
  15.             int matrialamountThird = Crafting.valueOf(recipeValues).getAmontNeededCrafting3();
  16.             int matrialamountFourth = Crafting.valueOf(recipeValues).getAmontNeededCrafting4();
  17.             int matrialamountFifth = Crafting.valueOf(recipeValues).getAmontNeededCrafting5();
  18.             int matrialTotalamount = Crafting.valueOf(recipeValues).getNumberOutput();
  19.  
  20.             if (Minecraftversion(matrialNameFirst, matrialNameSecond, matrialNameThird, matrialNameFourth, matrialNameFifth))
  21.                 continue;
  22.             Set<ItemStack> items = new LinkedHashSet<>(Arrays.asList((matrialNameFirst.contains(",") ? ItemUtily.createItemStack(matrialNameFirst.split(",")) : new ItemStack[]{ItemUtily.createItemStack(matrialNameFirst)})));
  23.             Set<ItemStack> items2 = new LinkedHashSet<>(Arrays.asList((matrialNameSecond != null && matrialNameSecond.contains(",") ? ItemUtily.createItemStack(matrialNameSecond.split(",")) : new ItemStack[]{ItemUtily.createItemStack(matrialNameSecond)})));
  24.             Set<ItemStack> items3 = new LinkedHashSet<>(Arrays.asList((matrialNameThird != null && matrialNameThird.contains(",") ? ItemUtily.createItemStack(matrialNameThird.split(",")) : new ItemStack[]{ItemUtily.createItemStack(matrialNameThird)})));
  25.             Set<ItemStack> items4 = new LinkedHashSet<>(Arrays.asList((matrialNameFourth != null && matrialNameFourth.contains(",") ? ItemUtily.createItemStack(matrialNameFourth.split(",")) : new ItemStack[]{ItemUtily.createItemStack(matrialNameFourth)})));
  26.             Set<ItemStack> items5 = new LinkedHashSet<>(Arrays.asList((matrialNameFifth != null && matrialNameFifth.contains(",") ? ItemUtily.createItemStack(matrialNameFifth.split(",")) : new ItemStack[]{ItemUtily.createItemStack(matrialNameFifth)})));
  27.  
  28.  
  29.             recipeCache.addRecipes(ItemUtily.createItemStack(recipeValues), items,
  30.                     items2, items3, items4, items5, matrialamountFirst,
  31.                     matrialamountSecond, matrialamountThird, matrialamountFourth, matrialamountFifth, matrialTotalamount);
  32.  
  33.         }
  34.     }
RAW Paste Data