Guest User

Untitled

a guest
Jun 19th, 2021
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.kup.burgercraft.data;
  2.  
  3. import com.kup.burgercraft.setup.ModBlocks;
  4. import com.kup.burgercraft.setup.ModItems;
  5. import com.kup.burgercraft.util.recipe.MeatGrindingRecipeBuilder;
  6. import net.minecraft.data.*;
  7. import net.minecraft.item.Items;
  8. import net.minecraft.item.crafting.Ingredient;
  9.  
  10. import java.util.function.Consumer;
  11.  
  12. public class ModRecipeProvider extends RecipeProvider {
  13.     public ModRecipeProvider(DataGenerator dataGenerator) {
  14.         super(dataGenerator);
  15.     }
  16.  
  17.     @Override
  18.     protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
  19.  
  20.         RegisterMeatGrinding(consumer);
  21.  
  22.         CookingRecipeBuilder.smelting(Ingredient.of(ModBlocks.ADAMANTIUM_ORE.get()), ModItems.ADAMANTIUM_INGOT.get(),0.7f,200)
  23.             .unlockedBy("has_item", has(ModBlocks.ADAMANTIUM_ORE.get()))
  24.             .save(consumer);
  25.  
  26.         CookingRecipeBuilder.smelting(Ingredient.of(ModItems.RAW_BURGER_PATTY.get()), ModItems.COOKED_BURGER_PATTY.get(),1f,150)
  27.             .unlockedBy("has_item", has(ModItems.RAW_BURGER_PATTY.get()))
  28.             .save(consumer);
  29.  
  30.         ShapedRecipeBuilder.shaped(ModItems.ADAMANTIUM_SWORD.get())
  31.                 .define('#', Items.STICK)
  32.                 .define('X', ModItems.ADAMANTIUM_INGOT.get())
  33.                 .pattern("X")
  34.                 .pattern("X")
  35.                 .pattern("#")
  36.                 .unlockedBy("has_adamantium_ingot", has(Items.IRON_INGOT))
  37.                 .save(consumer);
  38.  
  39.         ShapedRecipeBuilder.shaped(ModItems.DOUBLE_CHEESE_BURGER.get())
  40.                 .define('#', Items.BREAD)
  41.                 .define('X', Items.COOKED_BEEF)
  42.                 .pattern(" # ")
  43.                 .pattern(" X ")
  44.                 .pattern(" # ")
  45.                 .unlockedBy("has_cooked_beef", has(Items.COOKED_BEEF))
  46.                 .save(consumer);
  47.  
  48.  
  49.     }
  50.  
  51.     private void RegisterMeatGrinding(Consumer<IFinishedRecipe> consumer){
  52.         MeatGrindingRecipeBuilder.meatGrinding(Ingredient.of(Items.BEEF), ModItems.RAW_BURGER_PATTY.get())
  53.                 .save(consumer, "burger_patty_from_beef");
  54.     }
  55.  
  56.  
  57. }
  58.  
RAW Paste Data