From 78ae793adef4e80e92f46654d5652ffdcf9142f3 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 16 Feb 2025 12:31:04 +0700 Subject: [PATCH] Add missing "enchantments" upgrade ops to energy sword --- .../ru/dbotthepony/mc/otm/datagen/recipes/MatteryRecipe.kt | 5 ----- .../ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MatteryRecipe.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MatteryRecipe.kt index 890d8364c..4e78d5d12 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MatteryRecipe.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MatteryRecipe.kt @@ -199,11 +199,6 @@ class MatteryRecipe(val result: ItemLike, val count: Int = 1, val category: Reci buildRegular().save(consumer.map(filter()), name) } - fun buildEnergetic(consumer: RecipeOutput, name: String? = null) { - addUpgradeOps(UpgradeRecipe.CopyEnergyCharge) - build(consumer, name) - } - fun row(): MatteryRecipe { if (index == 3) { throw IllegalStateException("Already have all rows defined") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt index b62cc76af..2d2749e32 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt @@ -3,6 +3,7 @@ package ru.dbotthepony.mc.otm.datagen.recipes import net.minecraft.data.recipes.RecipeCategory import net.minecraft.data.recipes.RecipeOutput import net.neoforged.neoforge.common.Tags +import ru.dbotthepony.mc.otm.recipe.UpgradeRecipe import ru.dbotthepony.mc.otm.registry.MItemTags import ru.dbotthepony.mc.otm.registry.game.MItems @@ -12,7 +13,9 @@ fun addToolsRecipes(consumer: RecipeOutput) { .row(MItemTags.CARBON_PLATES, MItemTags.TRITANIUM_PLATES, MItemTags.GOLD_WIRES) .row(MItems.BATTERY_CAPACITOR, MItems.TRITANIUM_SWORD, MItemTags.ADVANCED_CIRCUIT) .unlockedBy(MItems.BATTERY_CAPACITOR) - .buildEnergetic(consumer) + .addUpgradeOps(UpgradeRecipe.CopyEnergyCharge) + .addUpgradeOps(UpgradeRecipe.CopyEnchantments) + .build(consumer) MatteryRecipe(MItems.TRITANIUM_SWORD, category = RecipeCategory.COMBAT) .rowB(MItemTags.TRITANIUM_INGOTS)