From ed2fe38160fdded8beca801942cc98d92e82a3af Mon Sep 17 00:00:00 2001 From: ayutac Date: Thu, 18 May 2023 20:26:17 +0200 Subject: [PATCH] Added foundation for centrifuge datagen. --- .../datagen/TechRebornDataGen.groovy | 2 + .../recipes/TechRebornRecipesProvider.groovy | 4 ++ .../CentrifugeRecipesProvider.groovy | 47 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 src/datagen/groovy/techreborn/datagen/recipes/machine/centrifuge/CentrifugeRecipesProvider.groovy diff --git a/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy b/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy index 05a95db45..4177cb283 100644 --- a/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy +++ b/src/datagen/groovy/techreborn/datagen/TechRebornDataGen.groovy @@ -36,6 +36,7 @@ import techreborn.datagen.recipes.crafting.CraftingRecipesProvider import techreborn.datagen.recipes.machine.alloy_smelter.AlloySmelterRecipesProvider import techreborn.datagen.recipes.machine.assembling_machine.AssemblingMachineRecipesProvider import techreborn.datagen.recipes.machine.blast_furnace.BlastFurnaceRecipesProvider +import techreborn.datagen.recipes.machine.centrifuge.CentrifugeRecipesProvider import techreborn.datagen.recipes.machine.chemical_reactor.ChemicalReactorRecipesProvider import techreborn.datagen.recipes.machine.compressor.CompressorRecipesProvider import techreborn.datagen.recipes.machine.extractor.ExtractorRecipesProvider @@ -78,6 +79,7 @@ class TechRebornDataGen implements DataGeneratorEntrypoint { add ChemicalReactorRecipesProvider::new add AssemblingMachineRecipesProvider::new add BlastFurnaceRecipesProvider::new + add CentrifugeRecipesProvider::new add IndustrialGrinderRecipesProvider::new add IndustrialSawmillRecipesProvider::new add AlloySmelterRecipesProvider::new diff --git a/src/datagen/groovy/techreborn/datagen/recipes/TechRebornRecipesProvider.groovy b/src/datagen/groovy/techreborn/datagen/recipes/TechRebornRecipesProvider.groovy index 28ec8d359..685405c75 100644 --- a/src/datagen/groovy/techreborn/datagen/recipes/TechRebornRecipesProvider.groovy +++ b/src/datagen/groovy/techreborn/datagen/recipes/TechRebornRecipesProvider.groovy @@ -176,6 +176,10 @@ abstract class TechRebornRecipesProvider extends FabricRecipeProvider { MachineRecipeJsonFactory.create(ModRecipes.ASSEMBLING_MACHINE, this, closure).offerTo(exporter) } + def offerCentrifugeRecipe(@DelegatesTo(value = MachineRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) { + MachineRecipeJsonFactory.create(ModRecipes.CENTRIFUGE, this, closure).offerTo(exporter) + } + def offerBlastFurnaceRecipe(@DelegatesTo(value = BlastFurnaceRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) { BlastFurnaceRecipeJsonFactory.createBlastFurnace(this, closure).offerTo(exporter) } diff --git a/src/datagen/groovy/techreborn/datagen/recipes/machine/centrifuge/CentrifugeRecipesProvider.groovy b/src/datagen/groovy/techreborn/datagen/recipes/machine/centrifuge/CentrifugeRecipesProvider.groovy new file mode 100644 index 000000000..2f12ca541 --- /dev/null +++ b/src/datagen/groovy/techreborn/datagen/recipes/machine/centrifuge/CentrifugeRecipesProvider.groovy @@ -0,0 +1,47 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2020 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package techreborn.datagen.recipes.machine.centrifuge + +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput +import net.minecraft.item.Items +import net.minecraft.registry.RegistryWrapper +import net.minecraft.registry.tag.ItemTags +import techreborn.datagen.recipes.TechRebornRecipesProvider +import techreborn.init.TRContent + +import java.util.concurrent.CompletableFuture + +class CentrifugeRecipesProvider extends TechRebornRecipesProvider { + + CentrifugeRecipesProvider(FabricDataOutput output, CompletableFuture registriesFuture) { + super(output, registriesFuture) + } + + @Override + void generateRecipes() { + + } + +}