From 53ca200a2ee7ca7024858664fd1404ad1a9779a7 Mon Sep 17 00:00:00 2001 From: Antifluxfield Date: Fri, 30 Jun 2017 02:53:17 +0800 Subject: [PATCH] Make Data Access Hatch part of AssLine --- .../multi/GT_MetaTileEntity_AssemblyLine.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index aee44e4c..9554ea9a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -40,9 +40,10 @@ public class GT_MetaTileEntity_AssemblyLine "Middle: Reinforced Glass, Assembly Line, Reinforced Glass", "UpMiddle: Grate Machine Casing,", " Assembler Machine Casing,", - " Grate Machine Casing (or Controller)", + " Grate Machine Casing (or Controller or Data Access Hatch)", "Top: Steel Casing(or Energy Hatch)", - "Up to 16 repeating slices, last is Output Bus"}; + "Up to 16 repeating slices, last is Output Bus", + "Optional 1x Data Access Hatch next to the Controller"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -168,13 +169,16 @@ public class GT_MetaTileEntity_AssemblyLine for (int r = 0; r <= 16; r++) { int i = r * xDir; + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, 0, i); if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) { - return false; + if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){ + return false; + } } if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) { return false; } - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i); + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i); if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) { if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) { return false; @@ -225,13 +229,16 @@ public class GT_MetaTileEntity_AssemblyLine for (int r = 0; r <= 16; r++) { int i = r * -zDir; + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 0, 0); if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) { - return false; + if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){ + return false; + } } if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) { return false; } - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0); + tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0); if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) { if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) { return false; @@ -297,4 +304,4 @@ public class GT_MetaTileEntity_AssemblyLine public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } -} \ No newline at end of file +}