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.java31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 1b3bafca90..23c72a2a03 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -24,6 +24,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.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -69,7 +70,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 {
@@ -96,7 +97,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 {
@@ -116,12 +117,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);
}
}
@@ -186,7 +187,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);
}
}
@@ -568,7 +569,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);
}
}
@@ -620,25 +621,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);
}
@@ -1251,7 +1252,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);
}
@@ -1263,7 +1264,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);
}
}
@@ -1826,4 +1827,4 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) {
mMetaTileEntity.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider);
}
-} \ No newline at end of file
+}