aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-01 19:52:37 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-01 19:52:37 +0000
commit754e8ab095531069181152cf9ca24c85defc1eac (patch)
tree62056709f66b42a71a3b634f070aec6d4a81bc42 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
parentd015262242110df899f6ffe7a9f84780382e8584 (diff)
downloadGT5-Unofficial-754e8ab095531069181152cf9ca24c85defc1eac.tar.gz
GT5-Unofficial-754e8ab095531069181152cf9ca24c85defc1eac.tar.bz2
GT5-Unofficial-754e8ab095531069181152cf9ca24c85defc1eac.zip
+ Added a mild tweak for OB graves, so that they are now immune to TC Hungry Nodes.
+ Added ability to create Simple Washers using Copper Pipes as well. (Suggested by Bear989Sr) % Adjusted the voltage returned from getVoltageForTier(tier), to now return the correct voltage, not the voltage of the next tier. % Adjusted ABS recipe handling, items for output are now supported. % Adjusted message sent to players when querying Super Buses. % Changed the Large Assembler & Casing recipes to now require an assembler. Also much harder. % Adjusted HG-1223, improved it's ABS recipe and tiering. % Greatly buffed the output of Zhuhai. Please let me know if it needs a nerf. $ Fixed some issues in GregtechMeta_MultiBlockBase, related to recognition of Control Cores & their bus. $ Fixed some hatch detection issues during Multiblock structure checks.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java33
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java41
2 files changed, 58 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
index 833c1bfcc0..96df4dbfd0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
@@ -168,14 +168,31 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In
return;
}
- PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains:");
- for (String s : aNames) {
- if (s.startsWith(" ")) {
- s = s.substring(1);
- }
- //Logger.INFO("Trying to display Super Input Bus contents. "+s);
- PlayerUtils.messagePlayer(aPlayer, s);
- }
+ PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains: ["+getRealInventory().length+"]");
+
+ if (aNames.length <= 12) {
+ for (String s : aNames) {
+ if (s.startsWith(" ")) {
+ s = s.substring(1);
+ }
+ //Logger.INFO("Trying to display Super Input Bus contents. "+s);
+ PlayerUtils.messagePlayer(aPlayer, s);
+ }
+ }
+ else {
+
+ String superString = "";
+
+ for (String s : aNames) {
+ if (s.startsWith(" ")) {
+ s = s.substring(1);
+ }
+ superString += (s+"\r\n");
+ }
+ PlayerUtils.messagePlayer(aPlayer, superString);
+ }
+
+
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 39666a2d3b..892f8f332a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -912,7 +912,10 @@ GT_MetaTileEntity_MultiBlockBase {
return 0;
}
- public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() {
+ public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() {
+ if (this.mControlCoreBus == null || this.mControlCoreBus.isEmpty()) {
+ return null;
+ }
GT_MetaTileEntity_Hatch_ControlCore x = this.mControlCoreBus.get(0);
if (x != null) {
log("getControlCore(ok)");
@@ -1506,11 +1509,8 @@ GT_MetaTileEntity_MultiBlockBase {
public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
-
- boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
-
- boolean aHasCore = (aCoresConfig ? (this.getControlCoreBus() != null) : true);
+ boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
+ boolean aHasCore = (requireControlCores ? (this.getControlCoreBus() != null) : true);
return aStructureCheck && aHasCore;
}
@@ -1526,10 +1526,34 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else {
+ int aMetaTileID = aBaseMetaTileEntity.getMetaTileID();
//Found a controller
- if (aFoundMeta > 0 && aFoundMeta < 1000 && aFoundBlock == GregTech_API.sBlockMachines) {
+ if (aMetaTileID >= 750 && aMetaTileID < 1000 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Vanilla Hatches/Busses
+ else if (aMetaTileID >= 10 && aMetaTileID <= 99 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Adv Mufflers
+ else if (aMetaTileID >= 30001 && aMetaTileID <= 30009 && aFoundBlock == GregTech_API.sBlockMachines) {
return true;
}
+ //Control Core, Super IO
+ else if (aMetaTileID >= 30020 && aMetaTileID <= 30040 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Auto maint
+ else if (aMetaTileID == 111 && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ //Data Ports
+ else if ((aMetaTileID == 131 || aMetaTileID == 132) && aFoundBlock == GregTech_API.sBlockMachines) {
+ return true;
+ }
+ else {
+ Logger.INFO("Found meta Tile: "+aMetaTileID);
+ }
}
}
if (!isHatch) {
@@ -1537,7 +1561,8 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else if (aFoundBlock != aExpectedBlock) {
- Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+", Expected: "+aExpectedBlock.getLocalizedName());
+ Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta);
+ Logger.INFO("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
return false;
}
else if (aFoundMeta != aExpectedMeta) {