diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index bf54ad7e6..3ff7488e8 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -3391,6 +3391,7 @@ ab602a53a5d8d057aad910dd1c5529cde2d587ab data/create/recipes/mixing/chocolate.js d3bf74bb3826cf2dccaf7377b8b3e0fdaa38f1aa data/create/recipes/mixing/chocolate_melting.json 0e29b4ce13750aab5a60ae54cbec8776569b35e0 data/create/recipes/mixing/chromatic_compound.json d9a3dff1288d675ab812eef1eb73cb27dcc71bd2 data/create/recipes/mixing/crushed_brass.json +ec331b1de31bbe2795aec729e931726ec4f4534f data/create/recipes/mixing/dough_by_mixing.json ffba306dbb52e4d7afeaec183b92821dbc402a7c data/create/recipes/mixing/honey.json cd9a78454bce20cf3557f5c44febae77ebd43e54 data/create/recipes/mixing/lava_from_cobble.json 0f89b3f2d81585591513619b8d1e8694eb874316 data/create/recipes/mixing/tea.json diff --git a/src/generated/resources/data/create/recipes/mixing/dough_by_mixing.json b/src/generated/resources/data/create/recipes/mixing/dough_by_mixing.json new file mode 100644 index 000000000..79d9a710a --- /dev/null +++ b/src/generated/resources/data/create/recipes/mixing/dough_by_mixing.json @@ -0,0 +1,18 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "item": "create:wheat_flour" + }, + { + "fluid": "minecraft:water", + "nbt": {}, + "amount": 1000 + } + ], + "results": [ + { + "item": "create:dough" + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index fa9f08c2f..498db0bc8 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -124,10 +124,6 @@ public class CreateJEI implements IModPlugin { seqAssembly = register("sequenced_assembly", SequencedAssemblyCategory::new) .recipes(AllRecipeTypes.SEQUENCED_ASSEMBLY::getType) - .catalyst(AllBlocks.MECHANICAL_PRESS::get) - .catalyst(AllBlocks.MECHANICAL_SAW::get) - .catalyst(AllBlocks.DEPLOYER::get) - .catalyst(AllBlocks.SPOUT::get) .build(), autoShapeless = register("automatic_shapeless", MixingCategory::autoShapeless) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java index da1b579b8..0e1b480c4 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SequencedAssemblyCategory.java @@ -89,6 +89,17 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory> inputs = ingredients.getInputs(VanillaTypes.ITEM); +// int catalystX = -2; +// int catalystY = 14; +// for (; index < inputs.size(); index++) { +// itemStacks.init(index, true, catalystX, catalystY); +// itemStacks.set(index, inputs.get(index)); +// catalystY += 19; +// } itemStacks.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> { if (slotIndex != 1) @@ -234,7 +245,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory assemblyIngredients = new ArrayList<>(); assemblyIngredients.add(recipe.getIngredient()); assemblyIngredients.add(Ingredient.fromStacks(recipe.getTransitionalItem())); - recipe.addAdditionalIngredients(assemblyIngredients); + recipe.addAdditionalIngredientsAndMachines(assemblyIngredients); return assemblyIngredients; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java index 2fd87d4a6..d3c6f0ed8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerApplicationRecipe.java @@ -1,9 +1,11 @@ package com.simibubi.create.content.contraptions.components.deployer; import java.util.List; +import java.util.Set; import java.util.function.Supplier; import java.util.stream.Collectors; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.Create; @@ -17,6 +19,7 @@ import com.simibubi.create.foundation.utility.Lang; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.IItemProvider; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TranslationTextComponent; @@ -87,6 +90,11 @@ public class DeployerApplicationRecipe extends ProcessingRecipe i return Lang.translate("recipe.assembly.deploying_item", new TranslationTextComponent(matchingStacks[0].getTranslationKey()).getString()); } + + @Override + public void addRequiredMachines(Set list) { + list.add(AllBlocks.DEPLOYER.get()); + } @Override public Supplier> getJEISubCategory() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java index e6adcc1c2..4f9374ec1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressingRecipe.java @@ -1,10 +1,12 @@ package com.simibubi.create.content.contraptions.components.press; import java.util.List; +import java.util.Set; import java.util.function.Supplier; import javax.annotation.ParametersAreNonnullByDefault; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; @@ -13,6 +15,7 @@ import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuild import com.simibubi.create.foundation.utility.Lang; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.IItemProvider; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -53,6 +56,11 @@ public class PressingRecipe extends ProcessingRecipe implements I return Lang.translate("recipe.assembly.pressing"); } + @Override + public void addRequiredMachines(Set list) { + list.add(AllBlocks.MECHANICAL_PRESS.get()); + } + @Override public Supplier> getJEISubCategory() { return () -> SequencedAssemblySubCategory.AssemblyPressing::new; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java index a49e9ffd8..eddb48062 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/CuttingRecipe.java @@ -1,10 +1,12 @@ package com.simibubi.create.content.contraptions.components.saw; import java.util.List; +import java.util.Set; import java.util.function.Supplier; import javax.annotation.ParametersAreNonnullByDefault; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; @@ -13,6 +15,7 @@ import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuild import com.simibubi.create.foundation.utility.Lang; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.IItemProvider; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -53,6 +56,11 @@ public class CuttingRecipe extends ProcessingRecipe implements IA return Lang.translate("recipe.assembly.cutting"); } + @Override + public void addRequiredMachines(Set list) { + list.add(AllBlocks.MECHANICAL_SAW.get()); + } + @Override public Supplier> getJEISubCategory() { return () -> SequencedAssemblySubCategory.AssemblyCutting::new; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java index b52dee1c0..56dd45e26 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FillingRecipe.java @@ -1,8 +1,10 @@ package com.simibubi.create.content.contraptions.fluids.actors; import java.util.List; +import java.util.Set; import java.util.function.Supplier; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe; @@ -12,6 +14,7 @@ import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.IItemProvider; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TranslationTextComponent; @@ -74,6 +77,11 @@ public class FillingRecipe extends ProcessingRecipe implements IA .getTranslationKey()).getString()); } + @Override + public void addRequiredMachines(Set list) { + list.add(AllBlocks.SPOUT.get()); + } + @Override public Supplier> getJEISubCategory() { return () -> SequencedAssemblySubCategory.AssemblySpouting::new; diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java index 62d84c7c9..9958cf457 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/IAssemblyRecipe.java @@ -1,12 +1,14 @@ package com.simibubi.create.content.contraptions.itemAssembly; import java.util.List; +import java.util.Set; import java.util.function.Supplier; import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory; import com.simibubi.create.foundation.fluid.FluidIngredient; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.IItemProvider; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -20,6 +22,8 @@ public interface IAssemblyRecipe { @OnlyIn(Dist.CLIENT) public ITextComponent getDescriptionForAssembly(); + public void addRequiredMachines(Set list); + public void addAssemblyIngredients(List list); default void addAssemblyFluidIngredients(List list) {} diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java index 4b8eea67c..d0f5f70fc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipe.java @@ -1,8 +1,10 @@ package com.simibubi.create.content.contraptions.itemAssembly; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Optional; +import java.util.Set; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.Create; @@ -19,6 +21,7 @@ import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.IRecipeType; import net.minecraft.item.crafting.Ingredient; import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.IItemProvider; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; @@ -90,9 +93,15 @@ public class SequencedAssemblyRecipe implements IRecipe { return loops; } - public void addAdditionalIngredients(List list) { + public void addAdditionalIngredientsAndMachines(List list) { sequence.forEach(sr -> sr.getAsAssemblyRecipe() .addAssemblyIngredients(list)); + Set machines = new HashSet<>(); + sequence.forEach(sr -> sr.getAsAssemblyRecipe() + .addRequiredMachines(machines)); + machines.stream() + .map(Ingredient::fromItems) + .forEach(list::add); } public void addAdditionalFluidIngredients(List list) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java index 156ff11ae..da38ffb60 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/BlueprintOverlayRenderer.java @@ -219,8 +219,7 @@ public class BlueprintOverlayRenderer { RenderSystem.enableBlend(); (pair.getSecond() ? AllGuiTextures.HOTSLOT_ACTIVE : AllGuiTextures.HOTSLOT).draw(ms, x, y); ItemStack itemStack = pair.getFirst(); - String count = pair.getSecond() || itemStack.getCount() == 1 ? null - : TextFormatting.GOLD.toString() + itemStack.getCount(); + String count = pair.getSecond() ? null : TextFormatting.GOLD.toString() + itemStack.getCount(); drawItemStack(ms, mc, x, y, itemStack, count); x += 21; } diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/MixingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/MixingRecipeGen.java index 8a02d5073..6e26a2e26 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/MixingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/MixingRecipeGen.java @@ -17,9 +17,9 @@ public class MixingRecipeGen extends ProcessingRecipeGen { GeneratedRecipe - TEMP_LAVA = create("lava_from_cobble", b -> b.require(Tags.Items.COBBLESTONE) - .output(Fluids.LAVA, 50) - .requiresHeat(HeatCondition.SUPERHEATED)), + TEMP_LAVA = create("lava_from_cobble", b -> b.require(Tags.Items.COBBLESTONE) + .output(Fluids.LAVA, 50) + .requiresHeat(HeatCondition.SUPERHEATED)), TEA = create("tea", b -> b.require(Fluids.WATER, 250) .require(Tags.Fluids.MILK, 250) @@ -41,6 +41,10 @@ public class MixingRecipeGen extends ProcessingRecipeGen { .output(AllFluids.HONEY.get(), 1000) .requiresHeat(HeatCondition.HEATED)), + DOUGH = create("dough_by_mixing", b -> b.require(AllItems.WHEAT_FLOUR.get()) + .require(Fluids.WATER, 1000) + .output(AllItems.DOUGH.get(), 1)), + BRASS_INGOT = create("brass_ingot", b -> b.require(I.copper()) .require(I.zinc()) .output(AllItems.BRASS_INGOT.get(), 2)