From bc1ef33cd6f4173008f16306ff0b50bd7e66aac1 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Mon, 22 Dec 2014 23:36:37 +0000 Subject: [PATCH] Make unforming the fusion reactor stop the burn. --- .../mekanism/generators/common/FusionReactor.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/mekanism/generators/common/FusionReactor.java b/src/main/java/mekanism/generators/common/FusionReactor.java index d8ed73cf8..f617cf18e 100644 --- a/src/main/java/mekanism/generators/common/FusionReactor.java +++ b/src/main/java/mekanism/generators/common/FusionReactor.java @@ -297,7 +297,7 @@ public class FusionReactor implements IFusionReactor return controller.getMaxEnergy(); } - public void unformMultiblock() + public void unformMultiblock(boolean keepBurning) { for(IReactorBlock block : reactorBlocks) { @@ -309,6 +309,7 @@ public class FusionReactor implements IFusionReactor reactorBlocks.clear(); neutronCaptors.clear(); formed = false; + burning = burning && keepBurning; if(!controller.getWorldObj().isRemote) { @@ -324,25 +325,25 @@ public class FusionReactor implements IFusionReactor Coord4D controllerPosition = Coord4D.get(controller); Coord4D centreOfReactor = controllerPosition.getFromSide(ForgeDirection.DOWN, 2); - unformMultiblock(); + unformMultiblock(true); reactorBlocks.add(controller); if(!createFrame(centreOfReactor)) { - unformMultiblock(); + unformMultiblock(false); return; } if(!addSides(centreOfReactor)) { - unformMultiblock(); + unformMultiblock(false); return; } if(!centreIsClear(centreOfReactor)) { - unformMultiblock(); + unformMultiblock(false); return; }