From 347214202cb2d10aa278d13aa53eb716df2c4a92 Mon Sep 17 00:00:00 2001 From: tier940 Date: Mon, 10 Feb 2025 18:49:14 +0900 Subject: [PATCH] Fix Electric Spawner --- .../gtexpert/core/common/GTEConfigHolder.java | 2 ++ .../eio/recipes/EIOBlocksRecipe.java | 27 +++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/github/gtexpert/core/common/GTEConfigHolder.java b/src/main/java/com/github/gtexpert/core/common/GTEConfigHolder.java index 7ee99cbf..1413ffbc 100644 --- a/src/main/java/com/github/gtexpert/core/common/GTEConfigHolder.java +++ b/src/main/java/com/github/gtexpert/core/common/GTEConfigHolder.java @@ -41,6 +41,8 @@ public static class ModpackFlag { @Config.Comment({ "1. When enabled, the following recipes will be changed to Peaceful difficulty: ", "Nether Star Dust, Skeleton Skull, Wither Skeleton Skull, Zombie Head, Creeper Head, Enderman Head", + "2. When enabled, some machine recipes are for Peaceful: ", + "Electric Spawner", "Default: false" }) public boolean peacefulFlag = false; diff --git a/src/main/java/com/github/gtexpert/core/integration/eio/recipes/EIOBlocksRecipe.java b/src/main/java/com/github/gtexpert/core/integration/eio/recipes/EIOBlocksRecipe.java index da215a81..1a52d899 100644 --- a/src/main/java/com/github/gtexpert/core/integration/eio/recipes/EIOBlocksRecipe.java +++ b/src/main/java/com/github/gtexpert/core/integration/eio/recipes/EIOBlocksRecipe.java @@ -87,14 +87,25 @@ public static void init() { 'Z', "skullZombieController"); // Electric Spawner - MetaTileEntityLoader.registerMachineRecipe(true, - EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC", - 'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy), - 'E', "skullSentientEnder", - 'S', new UnificationEntry(plate, GTEMaterials.Soularium), - 'H', HULL, - 'C', "itemEnderCrystal", - 'Z', "skullZombieFrankenstein"); + if (GTEConfigHolder.gteFlag.peacefulFlag) { + MetaTileEntityLoader.registerMachineRecipe(true, + EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC", + 'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy), + 'E', "skullEnderResonator", + 'S', new UnificationEntry(plate, GTEMaterials.Soularium), + 'H', HULL, + 'C', "itemEnderCrystal", + 'Z', "skullZombieController"); + } else { + MetaTileEntityLoader.registerMachineRecipe(true, + EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC", + 'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy), + 'E', "skullSentientEnder", + 'S', new UnificationEntry(plate, GTEMaterials.Soularium), + 'H', HULL, + 'C', "itemEnderCrystal", + 'Z', "skullZombieFrankenstein"); + } if (EnderIOConfigHolder.addShapelessRecipeMachines) { // Slice'N'Splice