From 841ba0aafab9f6d7e8c13e9297e1de59695566a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8F=E3=81=81=E3=83=BC=E3=82=8A=E3=81=83?= <39122497+Quarri6343@users.noreply.github.com> Date: Mon, 4 Jul 2022 14:46:37 +0900 Subject: [PATCH] fix energy hatch causes inifinite loop on explosion (#1058) --- .../metatileentity/multiblock/MultiblockControllerBase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockControllerBase.java b/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockControllerBase.java index f28ae0db7b2..ec2078ac890 100644 --- a/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockControllerBase.java +++ b/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockControllerBase.java @@ -402,7 +402,10 @@ public int getDefaultPaintingColor() { public void explodeMultiblock() { List parts = new ArrayList<>(getMultiblockParts()); - parts.forEach(p -> ((MetaTileEntity) p).doExplosion(8)); + for (IMultiblockPart part : parts) { + part.removeFromMultiBlock(this); + ((MetaTileEntity) part).doExplosion(8); + } doExplosion(8); } }