diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java index 7859cc587d8..b3d4347616c 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java @@ -50,7 +50,9 @@ import org.jetbrains.annotations.NotNull; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.SideReference; @@ -84,7 +86,7 @@ import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.ParallelHelper; -public class MTEBioVat extends MTEEnhancedMultiBlockBase { +public class MTEBioVat extends MTEEnhancedMultiBlockBase implements ISurvivalConstructable { public static final HashMap staticColorMap = new HashMap<>(); @@ -783,6 +785,12 @@ public void construct(ItemStack itemStack, boolean b) { this.buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 2, 3, 0); } + @Override + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { + if (mMachine) return -1; + return survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 2, 3, 0, elementBudget, env, false, true); + } + @Override public String[] getInfoData() { final String[] baseInfoData = super.getInfoData(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java index 5e750d5465b..5597023871b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java @@ -248,7 +248,7 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu int built = survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 3, 4, 0, elementBudget, env, false, true); if (built >= 0) return built; int tTotalWidth = Math.min(stackSize.stackSize + 1, 6); - for (int i = 1; i < tTotalWidth - 1; i++) { + for (int i = 1; i < tTotalWidth; i++) { mWidth = i; nWidth = i; built = survivialBuildPiece(MS_LEFT_MID, stackSize, 3 + 2 * i, 4, 0, elementBudget, env, false, true); @@ -256,26 +256,29 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu built = survivialBuildPiece(MS_RIGHT_MID, stackSize, -2 - 2 * i, 4, 0, elementBudget, env, false, true); if (built >= 0) return built; } - if (mWidth == tTotalWidth - 2) return survivialBuildPiece( - MS_END, - stackSize, - (2 + tTotalWidth) * 2 - 4, - 4, - 0, - elementBudget, - env, - false, - true); - else return survivialBuildPiece( - MS_END, - stackSize, - (-2 - tTotalWidth) * 2 + 4, - 4, - 0, - elementBudget, - env, - false, - true); + if (mWidth == tTotalWidth - 1) { + built += survivialBuildPiece( + MS_END, + stackSize, + (3 + tTotalWidth) * 2 - 4, + 4, + 0, + elementBudget, + env, + false, + true); + built += survivialBuildPiece( + MS_END, + stackSize, + (-3 - tTotalWidth) * 2 + 4, + 4, + 0, + elementBudget, + env, + false, + true); + } + return built; } @Override