From 09124ea92b62d749160ec220f11c0fea0ac54424 Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:09:23 -0700 Subject: [PATCH] Add config for automated brewing - Add allowBrewingInMixer config - Add 0.5.0e to the bug report template - Allow Flywheel 0.6.6 --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + src/main/java/com/simibubi/create/compat/jei/CreateJEI.java | 1 + .../components/mixer/MechanicalMixerTileEntity.java | 4 ++++ .../java/com/simibubi/create/foundation/config/CRecipes.java | 4 +++- src/main/resources/META-INF/mods.toml | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 26c78676c..3a6a51b4e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,6 +49,7 @@ body: label: Mod Version description: The version of the mod you were using when the bug occured options: + - "0.5.0e" - "0.5.0d" - "0.5.0c" - "0.5.0b" 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 d70a09af5..22f20cead 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -186,6 +186,7 @@ public class CreateJEI implements IModPlugin { .build("automatic_shapeless", MixingCategory::autoShapeless), brewing = builder(BasinRecipe.class) + .enableWhen(c -> c.allowBrewingInMixer) .addRecipes(() -> PotionMixingRecipes.ALL) .catalyst(AllBlocks.MECHANICAL_MIXER::get) .catalyst(AllBlocks.BASIN::get) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java index c36e0da53..ed4e27367 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java @@ -218,6 +218,10 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity { protected List> getMatchingRecipes() { List> matchingRecipes = super.getMatchingRecipes(); + if (!AllConfigs.SERVER.recipes.allowBrewingInMixer.get()) { + return matchingRecipes; + } + Optional basin = getBasin(); if (!basin.isPresent()) return matchingRecipes; diff --git a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java index 18b0a54fe..3f29ecced 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java +++ b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java @@ -4,6 +4,7 @@ public class CRecipes extends ConfigBase { public final ConfigBool bulkPressing = b(false, "bulkPressing", Comments.bulkPressing); public final ConfigBool bulkCutting = b(false, "bulkCutting", Comments.bulkCutting); + public final ConfigBool allowBrewingInMixer = b(true, "allowBrewingInMixer", Comments.allowBrewingInMixer); public final ConfigBool allowShapelessInMixer = b(true, "allowShapelessInMixer", Comments.allowShapelessInMixer); public final ConfigBool allowShapedSquareInPress = b(true, "allowShapedSquareInPress", Comments.allowShapedSquareInPress); public final ConfigBool allowRegularCraftingInCrafter = @@ -28,8 +29,9 @@ public class CRecipes extends ConfigBase { private static class Comments { static String bulkPressing = "Allow the Mechanical Press to process entire stacks at a time."; static String bulkCutting = "Allow the Mechanical Saw to process entire stacks at a time."; + static String allowBrewingInMixer = "Allow supported potions to be brewed by a Mechanical Mixer + Basin."; static String allowShapelessInMixer = - "Allow allows any shapeless crafting recipes to be processed by a Mechanical Mixer + Basin."; + "Allow any shapeless crafting recipes to be processed by a Mechanical Mixer + Basin."; static String allowShapedSquareInPress = "Allow any single-ingredient 2x2 or 3x3 crafting recipes to be processed by a Mechanical Press + Basin."; static String allowRegularCraftingInCrafter = diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 10430dbe9..8fb436889 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -33,6 +33,6 @@ Technology that empowers the player.''' [[dependencies.create]] modId="flywheel" mandatory=true - versionRange="[0.6.5,0.6.6)" + versionRange="[0.6.5,0.6.7)" ordering="AFTER" side="CLIENT"