2022-01-07 00:16:37 +01:00
|
|
|
package de.ellpeck.actuallyadditions.data;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
2022-01-15 19:38:00 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe;
|
2022-01-07 00:16:37 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
2024-03-03 01:20:53 +01:00
|
|
|
import net.minecraft.data.PackOutput;
|
2024-03-04 20:21:48 +01:00
|
|
|
import net.minecraft.data.recipes.RecipeOutput;
|
2024-03-02 21:23:08 +01:00
|
|
|
import net.minecraft.data.recipes.RecipeProvider;
|
|
|
|
import net.minecraft.resources.ResourceLocation;
|
|
|
|
import net.minecraft.world.item.crafting.Ingredient;
|
2024-03-04 20:21:48 +01:00
|
|
|
import net.neoforged.neoforge.fluids.FluidStack;
|
2022-01-07 00:16:37 +01:00
|
|
|
|
|
|
|
public class MiscMachineRecipeGenerator extends RecipeProvider {
|
2024-03-03 01:20:53 +01:00
|
|
|
public MiscMachineRecipeGenerator(PackOutput packOutput) {
|
|
|
|
super(packOutput);
|
2022-01-07 00:16:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2024-03-03 01:20:53 +01:00
|
|
|
public String getName() {
|
|
|
|
return "Misc " + super.getName();
|
2022-01-07 00:16:37 +01:00
|
|
|
}
|
|
|
|
|
2024-03-04 20:21:48 +01:00
|
|
|
// @Override //TODO: Flanks do your RecipeOutput wrapper thingy ;)
|
|
|
|
// protected @Nullable CompletableFuture<?> saveAdvancement(CachedOutput stack, FinishedRecipe finishedRecipe, JsonObject advancementJson) {
|
|
|
|
// return null;
|
|
|
|
// //Nope... maybe later...
|
|
|
|
// }
|
2024-03-03 01:20:53 +01:00
|
|
|
|
|
|
|
@Override
|
2024-03-04 20:21:48 +01:00
|
|
|
protected void buildRecipes(RecipeOutput consumer) {
|
|
|
|
consumer.accept(folderRecipe("pressing", "canola"), new PressingRecipe(
|
|
|
|
Ingredient.of(ActuallyItems.CANOLA.get()), new FluidStack(InitFluids.CANOLA_OIL.get(), 80)), null);
|
2022-01-15 19:38:00 +01:00
|
|
|
|
2024-03-04 20:21:48 +01:00
|
|
|
consumer.accept(folderRecipe("fermenting", "refined_canola"), new FermentingRecipe(
|
|
|
|
new FluidStack(InitFluids.CANOLA_OIL.get(), 80), new FluidStack(InitFluids.REFINED_CANOLA_OIL.get(), 80), 100), null);
|
2022-01-07 01:59:06 +01:00
|
|
|
}
|
|
|
|
|
2024-03-02 21:23:08 +01:00
|
|
|
// private String getItemName(ItemLike item) {
|
2024-03-04 20:21:48 +01:00
|
|
|
// return BuiltInRegistries.ITEM.getKey(item.asItem()).getPath();
|
2024-03-02 21:23:08 +01:00
|
|
|
// }
|
2022-08-31 00:20:32 +02:00
|
|
|
|
2022-01-07 01:59:06 +01:00
|
|
|
private ResourceLocation folderRecipe(String folder, String recipe) {
|
|
|
|
return new ResourceLocation(ActuallyAdditions.MODID, folder + "/" + recipe);
|
2022-01-07 00:16:37 +01:00
|
|
|
}
|
|
|
|
}
|