aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java18
4 files changed, 46 insertions, 9 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
index d4c5a51dba..938febfea7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
@@ -1,8 +1,10 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
import net.minecraft.util.EnumChatFormatting;
-
+import net.minecraftforge.fluids.FluidStack;
+import gregtech.GT_Mod;
import gregtech.api.enums.Dyes;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.interfaces.ITexture;
@@ -16,17 +18,39 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid {
public final GT_Materials mMaterial;
+ private boolean mCheckConnections;
+
+ public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial,
+ int aCapacity, int aHeatResistance, boolean aGasProof) {
+ this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1);
+ }
- public GregtechMetaPipeEntityFluid(final int aID, final String aName, final String aNameRegional, final float aThickNess, final GT_Materials aMaterial, final int aCapacity, final int aHeatResistance, final boolean aGasProof) {
+ public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial,
+ int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) {
super(aID, aName, aNameRegional, aThickNess, null, aCapacity, aHeatResistance, aGasProof);
+ this.mLastReceivedFrom = 0;
+ this.oLastReceivedFrom = 0;
+ this.mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe;
+ this.mDisableInput = 0;
this.mMaterial = aMaterial;
+ this.addInfo(aID);
}
-
+
public GregtechMetaPipeEntityFluid(final String aName, final float aThickNess, final GT_Materials aMaterial, final int aCapacity, final int aHeatResistance, final boolean aGasProof) {
- super(aName, aThickNess, null, aCapacity, aHeatResistance, aGasProof);
+ this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1);
+ }
+
+ public GregtechMetaPipeEntityFluid(String aName, float aThickNess, GT_Materials aMaterial, int aCapacity,
+ int aHeatResistance, boolean aGasProof, int aFluidTypes) {
+ super(aName, aThickNess, null, aCapacity, aHeatResistance, aGasProof, aFluidTypes);
+ this.mLastReceivedFrom = 0;
+ this.oLastReceivedFrom = 0;
+ this.mCheckConnections = !GT_Mod.gregtechproxy.gt6Pipe;
+ this.mDisableInput = 0;
this.mMaterial = aMaterial;
}
+
@Override
public byte getTileEntityBaseType() {
return this.mMaterial == null ? 4 : (byte) ((this.mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, this.mMaterial.mToolQuality)));
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index da6171651f..25cb5ae014 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -197,7 +197,7 @@ public class Meta_GT_Proxy {
if (afluid != null) {
int tFluidAmount = afluid.amount;
if (tFluidAmount > 0) {
- aList.add(tFluidAmount + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_FLUIDTANK", "Fluid: "+afluid.getLocalizedName()+" "+tFluidAmount+"L", !GregTech_API.sPostloadFinished ));
+ aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_FLUIDTANK", "Tank Fluid: "+tFluidAmount+"L "+afluid.getLocalizedName()+"", !GregTech_API.sPostloadFinished ));
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index e0cfd78a6d..9c67f0f84f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -28,8 +28,7 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
public String[] getDescription() {
String[] aTip;
if (this.mFluid == null) {
- //aTip = new String[] {this.mDescription, "Not a very portable tank.", CORE.GT_Tooltip};
- aTip = super.getDescription();
+ aTip = new String[] {this.mDescription, "A portable tank.", CORE.GT_Tooltip};
}
else {
aTip = new String[] {this.mDescription, "A portable tank.", "Fluid: "+mFluid.getLocalizedName()+" "+mFluid.amount+"L", CORE.GT_Tooltip};
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
index a800891102..77ffd98531 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
@@ -70,8 +70,9 @@ public class GregtechConduits {
if (Utils.getGregtechVersionAsInt() >= 50930) {
try {
Class<GT_MetaPipeEntity_Fluid> aPipeEntity = GT_MetaPipeEntity_Fluid.class;
- Constructor<GT_MetaPipeEntity_Fluid> constructor = aPipeEntity.getConstructor(new Class[]{int.class, String.class, String.class, float.class, Materials.class, int.class, int.class, boolean.class, int.class});
+ Constructor<GT_MetaPipeEntity_Fluid> constructor = aPipeEntity.getConstructor(int.class, String.class, String.class, float.class, Materials.class, int.class, int.class, boolean.class, int.class);
if (constructor != null) {
+ Logger.INFO("Generating Hexadecuple pipes.");
generateFluidMultiPipes(constructor, Materials.Copper, Materials.Copper.mName, "Copper", BasePipeHexadecupleID++, 60, 1000, true);
generateFluidMultiPipes(constructor, Materials.Bronze, Materials.Bronze.mName, "Bronze", BasePipeHexadecupleID++, 120, 2000, true);
generateFluidMultiPipes(constructor, Materials.Steel, Materials.Steel.mName, "Steel", BasePipeHexadecupleID++, 240, 2500, true);
@@ -85,8 +86,13 @@ public class GregtechConduits {
generateFluidMultiPipes(constructor, aPTFE, aPTFE.mName, "PTFE", BasePipeHexadecupleID++, 480, 600, true);
}
}
+ else {
+ Logger.INFO("Failed during Hexadecuple pipe generation.");
+ }
} catch (NoSuchMethodException | SecurityException e) {
+ Logger.INFO("Failed during Hexadecuple pipe generation. [Ecx]");
+ e.printStackTrace();
}
}
}
@@ -97,9 +103,17 @@ public class GregtechConduits {
aPipe = aClazz.newInstance(startID, "GT_Pipe_" + name + "_Hexadecuple",
"Hexadecuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, gasProof,
16);
- GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L));
+ if (aPipe == null) {
+ Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes.");
+ }
+ else {
+ Logger.INFO("Generated "+aMaterial+" Hexadecuple pipes.");
+ GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L));
+ }
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException
| InvocationTargetException e) {
+ Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes. [Ecx]");
+ e.printStackTrace();
}
}