Skip to content

Commit

Permalink
Fix NCDFE in FML log thread.
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jul 1, 2013
1 parent 84416fa commit 204424e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions src/common/nallar/patched/world/PatchWorldServer.java
Expand Up @@ -496,7 +496,6 @@ public void run() {
final ChunkProviderServer chunkProviderServer = this.theChunkProviderServer;
final boolean isRaining = this.isRaining();
final boolean isThundering = this.isThundering();
final Profiler profiler = this.theProfiler;
final WorldProvider provider = this.provider;
int updateLCG = this.updateLCG;
// We use a random per thread - randoms are threadsafe, however it can result in some contention. See Random.nextInt - compareAndSet.
Expand Down Expand Up @@ -529,14 +528,12 @@ public void run() {
int xPos = cX * 16;
int zPos = cZ * 16;
this.moodSoundAndLightCheck(xPos, zPos, chunk);
profiler.endStartSection("chunkTick"); // endStart as moodSoundAndLightCheck starts a section.
chunk.updateSkylight();
int var8;
int var9;
int var10;
int var11;

profiler.startSection("lightning");
if (isRaining && isThundering && provider.canDoLightning(chunk) && rand.nextInt(100000) == 0) {
updateLCG = updateLCG * 1664525 + 1013904223;
var8 = updateLCG >> 2;
Expand All @@ -551,7 +548,6 @@ public void run() {

int blockID;

profiler.endStartSection("precipitation");
if (provider.canDoRainSnowIce(chunk) && rand.nextInt(16) == 0) {
updateLCG = updateLCG * 1664525 + 1013904223;
var8 = updateLCG >> 2;
Expand Down Expand Up @@ -580,7 +576,6 @@ public void run() {
}
}

profiler.endStartSection("blockTick");
ExtendedBlockStorage[] var19 = chunk.getBlockStorageArray();
var9 = var19.length;

Expand All @@ -606,8 +601,6 @@ public void run() {
}
}
}
profiler.endSection();
profiler.endStartSection("iterate");
}
this.updateLCG += updateLCG * 1664525;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/nallar/tickthreading/LogFormatter.java
Expand Up @@ -38,7 +38,7 @@ public String format(LogRecord record) {
Throwable throwable = record.getThrown();
if (throwable != null) {
if (throwable.getStackTrace().length == 0) {
formattedMessage.append("Stack trace unavailable for ").append(Log.toString(throwable)).append(". Add -XX:-OmitStackTraceInFastThrow to your java parameters to see all stack traces.").append(LINE_SEPARATOR);
formattedMessage.append("Stack trace unavailable for ").append(String.valueOf(throwable)).append('-').append(throwable.getClass().getName()).append(". Add -XX:-OmitStackTraceInFastThrow to your java parameters to see all stack traces.").append(LINE_SEPARATOR);
} else {
StringWriter stackTraceWriter = new StringWriter();
// No need to close this - StringWriter.close() does nothing, and PrintWriter.close() just calls it.
Expand Down

0 comments on commit 204424e

Please sign in to comment.