From 6c9f71aed821843e8b2cd90a3b8faaca0e6e5336 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 6 Sep 2022 23:07:46 +0700 Subject: [PATCH] More minecraft'y tritanium block coloring fixes #69 --- .../datagen/recipes/CraftingTableRecipes.kt | 64 +++++++++++-------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt index 18faa0cc1..50653cdf0 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt @@ -46,16 +46,6 @@ fun addCraftingTableRecipes(consumer: Consumer) { .unlockedBy("has_chest", has(Tags.Items.CHESTS)) .save(consumer) - for ((color, item) in MRegistry.TRITANIUM_BLOCK.mappedColoredItemsAll) { - MatteryRecipe(item, 24) - .rowBC(MItemTags.PLATE_TRITANIUM, color?.tag) - .row(MItemTags.PLATE_TRITANIUM, COBBLESTONE, MItemTags.PLATE_TRITANIUM) - .rowB(MItemTags.PLATE_TRITANIUM) - .unlockedBy(MItemTags.PLATE_TRITANIUM) - .also { if (color != null) it.unlockedBy(color.tag) } - .build(consumer) - } - MatteryRecipe(MBlocks.PLATE_PRESS) .row(MItems.ELECTRIC_PARTS, MItems.ENERGY_BUS, MItems.ELECTRIC_PARTS) .row(MItemTags.INGOT_TRITANIUM, Items.BLAST_FURNACE, MItemTags.INGOT_TRITANIUM) @@ -80,26 +70,50 @@ fun addCraftingTableRecipes(consumer: Consumer) { .unlockedBy(Tags.Items.DYES_YELLOW) .build(consumer) - for ((item, colors) in MRegistry.TRITANIUM_STRIPED_BLOCK.itemsWithColor) { - val (base, stripe) = colors + MatteryRecipe(MRegistry.TRITANIUM_BLOCK.item, 24) + .rowB(MItemTags.PLATE_TRITANIUM) + .row(MItemTags.PLATE_TRITANIUM, COBBLESTONE, MItemTags.PLATE_TRITANIUM) + .rowB(MItemTags.PLATE_TRITANIUM) + .unlockedBy(MItemTags.PLATE_TRITANIUM) + .build(consumer) - MatteryRecipe(item, 24) - .rowBC(MItemTags.PLATE_TRITANIUM, base.tag) - .row(MItemTags.PLATE_TRITANIUM, COBBLESTONE, MItemTags.PLATE_TRITANIUM) - .rowAB(stripe.tag, MItemTags.PLATE_TRITANIUM) - .unlockedBy(MItemTags.PLATE_TRITANIUM) - .unlockedBy(base.tag) - .unlockedBy(stripe.tag) + for ((color, item) in MRegistry.TRITANIUM_BLOCK.mappedColoredItems) { + MatteryRecipe(item, 8) + .row(MRegistry.TRITANIUM_BLOCK.item, MRegistry.TRITANIUM_BLOCK.item, MRegistry.TRITANIUM_BLOCK.item) + .row(MRegistry.TRITANIUM_BLOCK.item, color.tag, MRegistry.TRITANIUM_BLOCK.item) + .row(MRegistry.TRITANIUM_BLOCK.item, MRegistry.TRITANIUM_BLOCK.item, MRegistry.TRITANIUM_BLOCK.item) + .unlockedBy(MRegistry.TRITANIUM_BLOCK.item) + .unlockedBy(color.tag) .build(consumer) } - for ((color, item) in MRegistry.VENT.mappedColoredItemsAll) { - MatteryRecipe(item, 24) - .rowBC(MItemTags.PLATE_TRITANIUM, color?.tag) - .row(MItemTags.PLATE_TRITANIUM, Items.IRON_BARS, MItemTags.PLATE_TRITANIUM) - .rowB(MItemTags.PLATE_TRITANIUM) + for ((item, colors) in MRegistry.TRITANIUM_STRIPED_BLOCK.itemsWithColor) { + val (base, stripe) = colors + + val original = MRegistry.TRITANIUM_BLOCK.mappedColoredItems[base]!! + + MatteryRecipe(item, 8) + .row(original, original, original) + .row(original, stripe.tag, original) + .row(original, original, original) + .unlockedBy(original) + .build(consumer) + } + + MatteryRecipe(MRegistry.VENT.item, 24) + .rowB(MItemTags.PLATE_TRITANIUM) + .row(MItemTags.PLATE_TRITANIUM, Items.IRON_BARS, MItemTags.PLATE_TRITANIUM) + .rowB(MItemTags.PLATE_TRITANIUM) + .unlockedBy(MItemTags.PLATE_TRITANIUM) + .build(consumer) + + for ((color, item) in MRegistry.VENT.mappedColoredItems) { + MatteryRecipe(item, 8) + .row(MRegistry.VENT.item, MRegistry.VENT.item, MRegistry.VENT.item) + .row(MRegistry.VENT.item, color.tag, MRegistry.VENT.item) + .row(MRegistry.VENT.item, MRegistry.VENT.item, MRegistry.VENT.item) .unlockedBy(MItemTags.PLATE_TRITANIUM) - .also { if (color != null) it.unlockedBy(color.tag) } + .unlockedBy(color.tag) .build(consumer) }