aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 4aa49a954c..a16768850f 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -26,6 +26,7 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
@@ -94,7 +95,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
super.writeToNBT(aNBT);
} catch (Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
try {
@@ -121,7 +122,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
aNBT.setBoolean("mOutputDisabled", mOutputDisabled);
aNBT.setTag("GT.CraftingComponents", mRecipeStuff);
} catch (Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
try {
@@ -141,12 +142,12 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
mMetaTileEntity.saveNBTData(aNBT);
} catch (Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
}
} catch (Throwable e) {
- GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
}
@@ -211,7 +212,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
mMetaTileEntity.loadNBTData(aNBT);
} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while loading MetaTileEntity, the Server should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered Exception while loading MetaTileEntity, the Server should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
}
@@ -599,7 +600,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
mMetaTileEntity.receiveClientEvent((byte) aEventID, (byte) aValue);
} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered Exception while receiving Data from the Server, the Client should've been crashed by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
}
@@ -651,25 +652,25 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aLogLevel) {
ArrayList<String> tList = new ArrayList<String>();
if (aLogLevel > 2) {
- tList.add("Meta-ID: " + mID + (canAccessData() ? " valid" : " invalid") + (mMetaTileEntity == null ? " MetaTileEntity == null!" : " "));
+ tList.add("Meta-ID: " +EnumChatFormatting.BLUE+ mID +EnumChatFormatting.RESET + (canAccessData() ? EnumChatFormatting.GREEN+" valid"+EnumChatFormatting.RESET : EnumChatFormatting.RED+" invalid"+EnumChatFormatting.RESET) + (mMetaTileEntity == null ? EnumChatFormatting.RED+" MetaTileEntity == null!"+EnumChatFormatting.RESET : " "));
}
if (aLogLevel > 1) {
if (mTimeStatistics.length > 0) {
double tAverageTime = 0;
for (int tTime : mTimeStatistics) tAverageTime += tTime;
- tList.add("This particular TileEntity has caused an average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ms over the last " + mTimeStatistics.length + " ticks.");
+ tList.add("Average CPU-load of ~" + (tAverageTime / mTimeStatistics.length) + "ms since " + mTimeStatistics.length + " ticks.");
}
if (mLagWarningCount > 0) {
- tList.add("This TileEntity has also caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server.");
+ tList.add("Caused " + (mLagWarningCount >= 10 ? "more than 10" : mLagWarningCount) + " Lag Spike Warnings (anything taking longer than " + GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING + "ms) on the Server.");
}
- tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : " not ") + "accessible for you");
+ tList.add("Is" + (mMetaTileEntity.isAccessAllowed(aPlayer) ? " " : EnumChatFormatting.RED+" not "+EnumChatFormatting.RESET) + "accessible for you");
}
if (aLogLevel > 0) {
if (getSteamCapacity() > 0 && hasSteamEngineUpgrade())
tList.add(getStoredSteam() + " of " + getSteamCapacity() + " Steam");
- tList.add("Machine is " + (mActive ? "active" : "inactive"));
+ tList.add("Machine is " + (mActive ? EnumChatFormatting.GREEN+"active"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"inactive"+EnumChatFormatting.RESET));
if (!mHasEnoughEnergy)
- tList.add("ATTENTION: This Device consumes Energy at a higher Rate than you input. You could insert more to speed up the process.");
+ tList.add(EnumChatFormatting.RED+"ATTENTION: This Device needs more power."+EnumChatFormatting.RESET);
}
return mMetaTileEntity.getSpecialDebugInfo(this, aPlayer, aLogLevel, tList);
}
@@ -1321,7 +1322,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
if (hasValidMetaTileEntity()) return mMetaTileEntity.onRightclick(this, aPlayer, aSide, aX, aY, aZ);
} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered Exception while rightclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
@@ -1333,7 +1334,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
if (aPlayer != null && hasValidMetaTileEntity()) mMetaTileEntity.onLeftclick(this, aPlayer);
} catch (Throwable e) {
- GT_Log.err.println("Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ GT_Log.err.println("Encountered Exception while leftclicking TileEntity, the Game should've crashed now, but I prevented that. Please report immediately to GregTech Intergalactical!!!");
e.printStackTrace(GT_Log.err);
}
}