Skip to content

Commit

Permalink
Temporarily use only vanilla iron/copper ingots over tags
Browse files Browse the repository at this point in the history
Need to re-evaluate "common datagen" decision to account for different convention tag formats across Fabric and Forge.
  • Loading branch information
62832 committed Jan 24, 2023
1 parent 85d668d commit e582ca0
Showing 1 changed file with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.data.recipes.ShapelessRecipeBuilder;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
Expand Down Expand Up @@ -47,19 +46,19 @@ protected void generateRecipes(@NotNull Consumer<FinishedRecipe> consumer) {
component(consumer, MEGAItems.TIER_64M, MEGAItems.TIER_16M, AEItems.MATTER_BALL.asItem());
component(consumer, MEGAItems.TIER_256M, MEGAItems.TIER_64M, AEItems.MATTER_BALL.asItem());

housing(consumer, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
housing(consumer, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
housing(consumer, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
housing(consumer, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);

cell(consumer, MEGAItems.ITEM_CELL_1M, MEGAItems.CELL_COMPONENT_1M, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_4M, MEGAItems.CELL_COMPONENT_4M, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_16M, MEGAItems.CELL_COMPONENT_16M, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_64M, MEGAItems.CELL_COMPONENT_64M, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_256M, MEGAItems.CELL_COMPONENT_256M, MEGAItems.MEGA_ITEM_CELL_HOUSING, ConventionTags.IRON_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_1M, MEGAItems.CELL_COMPONENT_1M, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_4M, MEGAItems.CELL_COMPONENT_4M, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_16M, MEGAItems.CELL_COMPONENT_16M, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_64M, MEGAItems.CELL_COMPONENT_64M, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_256M, MEGAItems.CELL_COMPONENT_256M, MEGAItems.MEGA_FLUID_CELL_HOUSING, ConventionTags.COPPER_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_1M, MEGAItems.CELL_COMPONENT_1M, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_4M, MEGAItems.CELL_COMPONENT_4M, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_16M, MEGAItems.CELL_COMPONENT_16M, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_64M, MEGAItems.CELL_COMPONENT_64M, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
cell(consumer, MEGAItems.ITEM_CELL_256M, MEGAItems.CELL_COMPONENT_256M, MEGAItems.MEGA_ITEM_CELL_HOUSING, Items.IRON_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_1M, MEGAItems.CELL_COMPONENT_1M, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_4M, MEGAItems.CELL_COMPONENT_4M, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_16M, MEGAItems.CELL_COMPONENT_16M, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_64M, MEGAItems.CELL_COMPONENT_64M, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);
cell(consumer, MEGAItems.FLUID_CELL_256M, MEGAItems.CELL_COMPONENT_256M, MEGAItems.MEGA_FLUID_CELL_HOUSING, Items.COPPER_INGOT);

portable(consumer, MEGAItems.PORTABLE_ITEM_CELL_1M, MEGAItems.CELL_COMPONENT_1M, MEGAItems.MEGA_ITEM_CELL_HOUSING);
portable(consumer, MEGAItems.PORTABLE_ITEM_CELL_4M, MEGAItems.CELL_COMPONENT_4M, MEGAItems.MEGA_ITEM_CELL_HOUSING);
Expand Down Expand Up @@ -100,7 +99,7 @@ protected void generateRecipes(@NotNull Consumer<FinishedRecipe> consumer) {
.pattern("aba")
.pattern("cdc")
.pattern("aba")
.define('a', ConventionTags.IRON_INGOT)
.define('a', Items.IRON_INGOT)
.define('b', AEItems.LOGIC_PROCESSOR)
.define('c', AEParts.SMART_CABLE.item(AEColor.TRANSPARENT))
.define('d', AEItems.ENGINEERING_PROCESSOR)
Expand Down Expand Up @@ -138,7 +137,7 @@ protected void generateRecipes(@NotNull Consumer<FinishedRecipe> consumer) {
.pattern("IPI")
.pattern("V V")
.pattern("IPI")
.define('I', ConventionTags.IRON_INGOT)
.define('I', Items.IRON_INGOT)
.define('P', ConventionTags.PATTERN_PROVIDER)
.define('V', AEBlocks.QUARTZ_VIBRANT_GLASS)
.unlockedBy("has_pattern_provider", has(ConventionTags.PATTERN_PROVIDER))
Expand Down Expand Up @@ -185,7 +184,7 @@ private static void specialisedComponent(Consumer<FinishedRecipe> consumer, Item
}

private static void cell(Consumer<FinishedRecipe> consumer, ItemDefinition<?> cell, ItemDefinition<?> component,
ItemDefinition<?> housing, TagKey<Item> housingMaterial) {
ItemDefinition<?> housing, Item housingMaterial) {
ShapedRecipeBuilder.shaped(cell)
.pattern("aba")
.pattern("bcb")
Expand Down Expand Up @@ -217,8 +216,7 @@ private static void portable(Consumer<FinishedRecipe> consumer, ItemDefinition<?
.save(consumer, Utils.makeId("cells/portable/" + cell.id().getPath()));
}

private static void housing(Consumer<FinishedRecipe> consumer, ItemDefinition<?> housing,
TagKey<Item> housingMaterial) {
private static void housing(Consumer<FinishedRecipe> consumer, ItemDefinition<?> housing, Item housingMaterial) {
ShapedRecipeBuilder.shaped(housing)
.pattern("aba")
.pattern("b b")
Expand Down

0 comments on commit e582ca0

Please sign in to comment.