Make unforming the fusion reactor stop the burn.
This commit is contained in:
parent
7296c3dbcb
commit
bc1ef33cd6
1 changed files with 6 additions and 5 deletions
|
@ -297,7 +297,7 @@ public class FusionReactor implements IFusionReactor
|
||||||
return controller.getMaxEnergy();
|
return controller.getMaxEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unformMultiblock()
|
public void unformMultiblock(boolean keepBurning)
|
||||||
{
|
{
|
||||||
for(IReactorBlock block : reactorBlocks)
|
for(IReactorBlock block : reactorBlocks)
|
||||||
{
|
{
|
||||||
|
@ -309,6 +309,7 @@ public class FusionReactor implements IFusionReactor
|
||||||
reactorBlocks.clear();
|
reactorBlocks.clear();
|
||||||
neutronCaptors.clear();
|
neutronCaptors.clear();
|
||||||
formed = false;
|
formed = false;
|
||||||
|
burning = burning && keepBurning;
|
||||||
|
|
||||||
if(!controller.getWorldObj().isRemote)
|
if(!controller.getWorldObj().isRemote)
|
||||||
{
|
{
|
||||||
|
@ -324,25 +325,25 @@ public class FusionReactor implements IFusionReactor
|
||||||
Coord4D controllerPosition = Coord4D.get(controller);
|
Coord4D controllerPosition = Coord4D.get(controller);
|
||||||
Coord4D centreOfReactor = controllerPosition.getFromSide(ForgeDirection.DOWN, 2);
|
Coord4D centreOfReactor = controllerPosition.getFromSide(ForgeDirection.DOWN, 2);
|
||||||
|
|
||||||
unformMultiblock();
|
unformMultiblock(true);
|
||||||
|
|
||||||
reactorBlocks.add(controller);
|
reactorBlocks.add(controller);
|
||||||
|
|
||||||
if(!createFrame(centreOfReactor))
|
if(!createFrame(centreOfReactor))
|
||||||
{
|
{
|
||||||
unformMultiblock();
|
unformMultiblock(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!addSides(centreOfReactor))
|
if(!addSides(centreOfReactor))
|
||||||
{
|
{
|
||||||
unformMultiblock();
|
unformMultiblock(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!centreIsClear(centreOfReactor))
|
if(!centreIsClear(centreOfReactor))
|
||||||
{
|
{
|
||||||
unformMultiblock();
|
unformMultiblock(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue