diff options
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index e5724bb653..090c71abe7 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -78,6 +78,10 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { * }
*/
public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) {
+ this(aID, aBasicName, aRegionalName, aInvSlotCount, true);
+ }
+
+ public MetaPipeEntity(int aID, String aBasicName, String aRegionalName, int aInvSlotCount, boolean aAddInfo) {
if (GregTech_API.sPostloadStarted || !GregTech_API.sPreloadStarted)
throw new IllegalAccessError("This Constructor has to be called in the load Phase");
if (GregTech_API.METATILEENTITIES[aID] == null) {
@@ -91,12 +95,16 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable { GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName);
mInventory = new ItemStack[aInvSlotCount];
- if (GT.isClientSide()) {
- ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID);
- tStack.getItem().addInformation(tStack, null, new ArrayList<String>(), true);
+ if (aAddInfo && GT.isClientSide()) {
+ addInfo(aID);
}
}
+ protected final void addInfo(int aID) {
+ ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID);
+ tStack.getItem().addInformation(tStack, null, new ArrayList<String>(), true);
+ }
+
/**
* This is the normal Constructor.
*/
|