diff options
33 files changed, 122 insertions, 68 deletions
diff --git a/.classpath b/.classpath index 956388a675..49638592b2 100644 --- a/.classpath +++ b/.classpath @@ -9,5 +9,6 @@ <classpathentry kind="lib" path="libs/gregtech-5.09.32-dev.jar" sourcepath="libs/gregtech-5.09.32-dev-src.zip"/> <classpathentry kind="lib" path="libs/industrialcraft-2-2.2.828a-experimental-deobf.jar"/> <classpathentry kind="lib" path="libs/NotEnoughItems-1.7.10-1.0.5.120-dev.jar"/> + <classpathentry kind="lib" path="libs/joml-jdk8-1.9.16.jar" sourcepath="libs/JOML-1.9.16.zip"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/.gradle/2.0/taskArtifacts/cache.properties.lock b/.gradle/2.0/taskArtifacts/cache.properties.lock Binary files differindex 8d556d3686..61bc620fff 100644 --- a/.gradle/2.0/taskArtifacts/cache.properties.lock +++ b/.gradle/2.0/taskArtifacts/cache.properties.lock diff --git a/.gradle/2.0/taskArtifacts/fileHashes.bin b/.gradle/2.0/taskArtifacts/fileHashes.bin Binary files differindex 91f9219747..05ddaaf444 100644 --- a/.gradle/2.0/taskArtifacts/fileHashes.bin +++ b/.gradle/2.0/taskArtifacts/fileHashes.bin diff --git a/.gradle/2.0/taskArtifacts/fileSnapshots.bin b/.gradle/2.0/taskArtifacts/fileSnapshots.bin Binary files differindex 9af800bf56..97416717d2 100644 --- a/.gradle/2.0/taskArtifacts/fileSnapshots.bin +++ b/.gradle/2.0/taskArtifacts/fileSnapshots.bin diff --git a/.gradle/2.0/taskArtifacts/outputFileStates.bin b/.gradle/2.0/taskArtifacts/outputFileStates.bin Binary files differindex 33e592204a..b6c1e22668 100644 --- a/.gradle/2.0/taskArtifacts/outputFileStates.bin +++ b/.gradle/2.0/taskArtifacts/outputFileStates.bin diff --git a/.gradle/2.0/taskArtifacts/taskArtifacts.bin b/.gradle/2.0/taskArtifacts/taskArtifacts.bin Binary files differindex 704a62e32f..3b2f4a9f40 100644 --- a/.gradle/2.0/taskArtifacts/taskArtifacts.bin +++ b/.gradle/2.0/taskArtifacts/taskArtifacts.bin diff --git a/build.gradle b/build.gradle index 1a154c453c..37112ea804 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'forge' sourceCompatibility = 1.8 targetCompatibility = 1.8 -version = "0.1" +version = "0.1.1" group= "kekztech" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "kekztech" diff --git a/config/IC2.ini b/config/IC2.ini index 2bfdabd5ee..34fe6da562 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,5 +1,5 @@ ; ic2 general config
-; created Jun 11, 2019 9:14:02 PM
+; created Jul 1, 2019 9:51:39 PM
;---
[worldgen]
diff --git a/config/splash.properties b/config/splash.properties index f91453a5dc..21e90a2892 100644 --- a/config/splash.properties +++ b/config/splash.properties @@ -1,5 +1,5 @@ #Splash screen properties -#Tue Jun 11 21:13:52 CEST 2019 +#Mon Jul 01 21:51:29 CEST 2019 logoTexture=textures/gui/title/mojang.png background=0xFFFFFF font=0x0 diff --git a/logs/2019-06-11-4.log.gz b/logs/2019-06-11-4.log.gz Binary files differnew file mode 100644 index 0000000000..264c788ae1 --- /dev/null +++ b/logs/2019-06-11-4.log.gz diff --git a/logs/2019-06-17-1.log.gz b/logs/2019-06-17-1.log.gz Binary files differnew file mode 100644 index 0000000000..dc49bd1cd9 --- /dev/null +++ b/logs/2019-06-17-1.log.gz diff --git a/logs/2019-07-01-1.log.gz b/logs/2019-07-01-1.log.gz Binary files differnew file mode 100644 index 0000000000..b1ce1ecd1a --- /dev/null +++ b/logs/2019-07-01-1.log.gz diff --git a/logs/2019-07-01-2.log.gz b/logs/2019-07-01-2.log.gz Binary files differnew file mode 100644 index 0000000000..a9ef2b8eed --- /dev/null +++ b/logs/2019-07-01-2.log.gz diff --git a/logs/2019-07-01-3.log.gz b/logs/2019-07-01-3.log.gz Binary files differnew file mode 100644 index 0000000000..111fe9811c --- /dev/null +++ b/logs/2019-07-01-3.log.gz diff --git a/logs/2019-07-01-4.log.gz b/logs/2019-07-01-4.log.gz Binary files differnew file mode 100644 index 0000000000..43c1f5c16f --- /dev/null +++ b/logs/2019-07-01-4.log.gz diff --git a/logs/2019-07-01-5.log.gz b/logs/2019-07-01-5.log.gz Binary files differnew file mode 100644 index 0000000000..f22aba1013 --- /dev/null +++ b/logs/2019-07-01-5.log.gz diff --git a/logs/2019-07-01-6.log.gz b/logs/2019-07-01-6.log.gz Binary files differnew file mode 100644 index 0000000000..f37dd6c7f3 --- /dev/null +++ b/logs/2019-07-01-6.log.gz diff --git a/logs/2019-07-01-7.log.gz b/logs/2019-07-01-7.log.gz Binary files differnew file mode 100644 index 0000000000..63f7628ca6 --- /dev/null +++ b/logs/2019-07-01-7.log.gz diff --git a/saves/NEI/local/New World/NEI.dat b/saves/NEI/local/New World/NEI.dat Binary files differindex 448ff32f0b..a175c5f790 100644 --- a/saves/NEI/local/New World/NEI.dat +++ b/saves/NEI/local/New World/NEI.dat diff --git a/saves/New World/DIM-1/data/villages.dat b/saves/New World/DIM-1/data/villages.dat Binary files differindex b217d6334f..2ceba3a031 100644 --- a/saves/New World/DIM-1/data/villages.dat +++ b/saves/New World/DIM-1/data/villages.dat diff --git a/saves/New World/DIM1/data/villages.dat b/saves/New World/DIM1/data/villages.dat Binary files differindex b217d6334f..2ceba3a031 100644 --- a/saves/New World/DIM1/data/villages.dat +++ b/saves/New World/DIM1/data/villages.dat diff --git a/saves/New World/data/villages.dat b/saves/New World/data/villages.dat Binary files differindex b217d6334f..2ceba3a031 100644 --- a/saves/New World/data/villages.dat +++ b/saves/New World/data/villages.dat diff --git a/saves/New World/level.dat b/saves/New World/level.dat Binary files differindex 75a864b1cf..9874c1e8ea 100644 --- a/saves/New World/level.dat +++ b/saves/New World/level.dat diff --git a/saves/New World/level.dat_old b/saves/New World/level.dat_old Binary files differindex a4c90146a6..969f2be759 100644 --- a/saves/New World/level.dat_old +++ b/saves/New World/level.dat_old diff --git a/saves/New World/playerdata/ddc68fe4-0789-360b-a837-3dcbb936da65.dat b/saves/New World/playerdata/ddc68fe4-0789-360b-a837-3dcbb936da65.dat Binary files differindex c97b947a00..737a8aecf4 100644 --- a/saves/New World/playerdata/ddc68fe4-0789-360b-a837-3dcbb936da65.dat +++ b/saves/New World/playerdata/ddc68fe4-0789-360b-a837-3dcbb936da65.dat diff --git a/saves/New World/region/r.0.-1.mca b/saves/New World/region/r.0.-1.mca Binary files differindex 477bd7298b..bb45a59b3f 100644 --- a/saves/New World/region/r.0.-1.mca +++ b/saves/New World/region/r.0.-1.mca diff --git a/saves/New World/region/r.0.0.mca b/saves/New World/region/r.0.0.mca Binary files differindex 907b692fe5..61ed32fa61 100644 --- a/saves/New World/region/r.0.0.mca +++ b/saves/New World/region/r.0.0.mca diff --git a/saves/New World/session.lock b/saves/New World/session.lock Binary files differindex 9232f2d4b4..878b37a530 100644 --- a/saves/New World/session.lock +++ b/saves/New World/session.lock diff --git a/saves/New World/stats/ddc68fe4-0789-360b-a837-3dcbb936da65.json b/saves/New World/stats/ddc68fe4-0789-360b-a837-3dcbb936da65.json index 8e34a51d31..bea6b63000 100644 --- a/saves/New World/stats/ddc68fe4-0789-360b-a837-3dcbb936da65.json +++ b/saves/New World/stats/ddc68fe4-0789-360b-a837-3dcbb936da65.json @@ -1 +1 @@ -{"stat.flyOneCm":39340,"stat.walkOneCm":170980,"stat.jump":241,"stat.playOneMinute":410701,"achievement.openInventory":174,"stat.climbOneCm":1819,"stat.leaveGame":1,"stat.useItem.3":43,"achievement.exploreAllBiomes":{"value":0,"progress":["Swampland"]}}
\ No newline at end of file +{"stat.flyOneCm":89340,"stat.walkOneCm":327994,"stat.jump":382,"stat.useItem.323":8,"stat.playOneMinute":635974,"achievement.openInventory":260,"stat.climbOneCm":2320,"stat.leaveGame":1,"stat.useItem.3":43,"achievement.exploreAllBiomes":{"value":0,"progress":["Swampland"]}}
\ No newline at end of file diff --git a/screenshots/2019-07-01_20.22.41.png b/screenshots/2019-07-01_20.22.41.png Binary files differnew file mode 100644 index 0000000000..79cf60adff --- /dev/null +++ b/screenshots/2019-07-01_20.22.41.png diff --git a/src/main/java/kekztech/Util.java b/src/main/java/kekztech/Util.java index ccbcc799e6..78dee44f75 100644 --- a/src/main/java/kekztech/Util.java +++ b/src/main/java/kekztech/Util.java @@ -4,6 +4,9 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.joml.Vector3i; +import org.joml.Vector3ic; + import items.ErrorItem; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -11,6 +14,42 @@ import net.minecraftforge.oredict.OreDictionary; public class Util { + public static Vector3ic rotateOffsetVector(Vector3ic forgeDirection, int x, int y, int z) { + final Vector3i offset = new Vector3i(); + + // either direction on z-axis + if(forgeDirection.x() == 0 && forgeDirection.z() == -1) { + offset.x = x; + offset.y = y; + offset.z = z; + } + if(forgeDirection.x() == 0 && forgeDirection.z() == 1) { + offset.x = -x; + offset.y = y; + offset.z = -z; + } + // either direction on x-axis + if(forgeDirection.x() == -1 && forgeDirection.z() == 0) { + offset.x = z; + offset.y = y; + offset.z = -x; + } + if(forgeDirection.x() == 1 && forgeDirection.z() == 0) { + offset.x = -z; + offset.y = y; + offset.z = x; + } + // either direction on y-axis + if(forgeDirection.y() == -1) { + offset.x = x; + offset.y = z; + offset.z = y; + } + + return offset; + } + + @Deprecated public static ItemStack getStackofAmountFromOreDict(String oredictName, final int amount){ final ArrayList<ItemStack> list = OreDictionary.getOres(oredictName); if(!list.isEmpty()) { diff --git a/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java index f5fa228392..522da09b8f 100644 --- a/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java +++ b/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java @@ -4,6 +4,9 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import org.joml.Vector3i; +import org.joml.Vector3ic; + import blocks.Block_YSZUnit; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -17,6 +20,7 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import kekztech.Util; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; @@ -140,24 +144,26 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { @Override public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) { - - final int XDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX; - final int ZDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ; - + // Figure out the vector for the direction the back face of the controller is facing + final Vector3ic forgeDirection = new Vector3i( + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX, + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetY, + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ + ); int minCasingAmount = 12; - boolean checklist = true; // if this is still true at the end, machine is good to go :) + boolean formationChecklist = true; // if this is still true at the end, machine is good to go :) - // Front slice + // Front slice for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { if(X == 0 && Y == 0) { continue; // is controller } + // Get next TE - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + -1; + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, 0); IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -166,11 +172,12 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { && !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } @@ -179,26 +186,25 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { // Middle three slices for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { - for(int Z = 0; Z < 3; Z++) { - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + Z; + for(int Z = -1; Z >= -3; Z--) { + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, Z); if(X == 0 && Y == 0) { - if(!thisController.getBlockOffset(THIS_X, 0, THIS_Z).getUnlocalizedName() + if(!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() .equals(Block_YSZUnit.getInstance().getUnlocalizedName())) { - checklist = false; + formationChecklist = false; } continue; } if(Y == 0 && (X == -1 || X == 1)) { - if(!thisController.getBlockOffset(THIS_X, 0, THIS_Z).getUnlocalizedName() + if(!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() .equals("blockAlloyGlass")) { - checklist = false; + formationChecklist = false; } continue; } // Get next TE IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z());// x, y ,z // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -207,11 +213,12 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { && !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } @@ -222,10 +229,9 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { // Get next TE - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + 3; + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, -4); IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z());// x, y ,z // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -235,30 +241,31 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { && !super.addDynamoToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } - } + } if(minCasingAmount > 0) { - checklist = false; + formationChecklist = false; } if(this.mDynamoHatches.size() != 1) { System.out.println("Exactly one dynamo hatch is required!"); - checklist = false; + formationChecklist = false; } if(this.mInputHatches.size() < 2) { System.out.println("At least two input hatches are required!"); - checklist = false; + formationChecklist = false; } - return checklist; + return formationChecklist; } @Override diff --git a/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java index b3cee6da6a..c645ce464a 100644 --- a/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java @@ -4,6 +4,9 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import org.joml.Vector3i; +import org.joml.Vector3ic; + import blocks.Block_GDCUnit; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -17,6 +20,7 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import kekztech.Util; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -139,24 +143,26 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { @Override public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) { - - final int XDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX; - final int ZDIR_BACKFACE = ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ; - + // Figure out the vector for the direction the back face of the controller is facing + final Vector3ic forgeDirection = new Vector3i( + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX, + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetY, + ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ + ); int minCasingAmount = 12; - boolean checklist = true; // if this is still true at the end, machine is good to go :) + boolean formationChecklist = true; // if this is still true at the end, machine is good to go :) - // Front slice + // Front slice for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { if(X == 0 && Y == 0) { continue; // is controller } + // Get next TE - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + -1; + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, 0); IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -165,11 +171,12 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { && !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } @@ -178,26 +185,25 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { // Middle three slices for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { - for(int Z = 0; Z < 3; Z++) { - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + Z; + for(int Z = -1; Z >= -3; Z--) { + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, Z); if(X == 0 && Y == 0) { - if(!thisController.getBlockOffset(THIS_X, 0, THIS_Z).getUnlocalizedName() + if(!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() .equals(Block_GDCUnit.getInstance().getUnlocalizedName())) { - checklist = false; + formationChecklist = false; } continue; } if(Y == 0 && (X == -1 || X == 1)) { - if(!thisController.getBlockOffset(THIS_X, 0, THIS_Z).getUnlocalizedName() + if(!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() .equals("blockAlloyGlass")) { - checklist = false; + formationChecklist = false; } continue; } // Get next TE IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z());// x, y ,z // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -206,11 +212,12 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { && !super.addOutputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } @@ -221,10 +228,9 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { // Get next TE - final int THIS_X = XDIR_BACKFACE + X; - final int THIS_Z = ZDIR_BACKFACE + 3; + final Vector3ic offset = Util.rotateOffsetVector(forgeDirection, X, Y, -4); IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(THIS_X, Y, THIS_Z);// x, y ,z + thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z());// x, y ,z // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch texture (TAE for GT++) @@ -234,30 +240,31 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { && !super.addDynamoToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(THIS_X, Y, THIS_Z) == CASING) && (thisController.getMetaIDOffset(THIS_X, Y, THIS_Z) == CASING_META)) { + if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) + && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == CASING_META)) { // Seems to be valid casing. Decrement counter. minCasingAmount--; } else { - checklist = false; + formationChecklist = false; } } } - } + } if(minCasingAmount > 0) { - checklist = false; + formationChecklist = false; } - if(this.mDynamoHatches.size() < 1) { - System.out.println("At least one dynamo hatch is required!"); - checklist = false; + if(this.mDynamoHatches.size() != 1) { + System.out.println("Exactly one dynamo hatch is required!"); + formationChecklist = false; } if(this.mInputHatches.size() < 2) { System.out.println("At least two input hatches are required!"); - checklist = false; + formationChecklist = false; } - return checklist; + return formationChecklist; } @Override |