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 22ad6f598..70fc856aa 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 @@ -144,16 +144,16 @@ class MatteryRecipe(val result: ItemLike, val count: Int = 1, val category: Reci return builder } - private var source: ResourceLocation? = null + private var upgradeSource: ResourceLocation? = null private val copyPaths = ArrayList() fun setUpgradeSource(source: ResourceLocation): MatteryRecipe { - this.source = source + this.upgradeSource = source return this } fun setUpgradeSource(source: ItemLike): MatteryRecipe { - this.source = source.asItem().registryName!! + this.upgradeSource = source.asItem().registryName!! return this } @@ -163,7 +163,7 @@ class MatteryRecipe(val result: ItemLike, val count: Int = 1, val category: Reci } private fun filter(consumer: Consumer): Consumer { - if (source != null) { + if (upgradeSource != null) { check(copyPaths.isNotEmpty()) { "Defined upgrade recipe without nbt migration operations" } return Consumer { @@ -172,7 +172,7 @@ class MatteryRecipe(val result: ItemLike, val count: Int = 1, val category: Reci it.serializeRecipeData(pJson) pJson["copyPaths"] = copyPaths.stream().map { it.serialize() }.collect(JsonArrayCollector) - pJson["source"] = source!!.toString() + pJson["source"] = upgradeSource!!.toString() } override fun getType(): RecipeSerializer<*> {