@@ -1,4 +1,4 @@
|
||||
From adcf9b66485a16ca0d14efd12230771086c06a90 Mon Sep 17 00:00:00 2001
|
||||
From 71424df72027daf0b96555a580d54fc91909b8b5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||
Subject: [PATCH] Improved Timings System
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Improved Timings System
|
||||
Tracks nearly every point of minecraft internals and plugin events to give a good quick overview on what is causing TPS loss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index a702fe8..e642388 100644
|
||||
index 2f842c3..88853ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -107,6 +107,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@@ -145,10 +145,10 @@ index 5db21fd..9543509 100644
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index aa6d8d8..cf5fb7e 100644
|
||||
index da1a7e7..c4ed619 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -910,6 +910,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
@@ -915,6 +915,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@@ -156,7 +156,7 @@ index aa6d8d8..cf5fb7e 100644
|
||||
// CraftBukkit start
|
||||
CraftPlayer player = this.getPlayer();
|
||||
|
||||
@@ -917,19 +918,23 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
@@ -922,19 +923,23 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -198,7 +198,7 @@ index 811f1a4..3de32fe 100644
|
||||
private static Map i = new HashMap();
|
||||
private static Map j = new HashMap();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 75fed94..33391e8 100644
|
||||
index e580460..5cfcc6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
|
||||
@@ -209,7 +209,7 @@ index 75fed94..33391e8 100644
|
||||
import org.bukkit.craftbukkit.util.UnsafeList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -132,6 +133,8 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -133,6 +134,8 @@ public abstract class World implements IBlockAccess {
|
||||
final Object chunkLock = new Object();
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
@@ -218,7 +218,7 @@ index 75fed94..33391e8 100644
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
@@ -211,6 +214,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -212,6 +215,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a();
|
||||
|
||||
this.getServer().addWorld(this.world); // CraftBukkit
|
||||
@@ -226,7 +226,7 @@ index 75fed94..33391e8 100644
|
||||
}
|
||||
|
||||
protected abstract IChunkProvider j();
|
||||
@@ -1243,6 +1247,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1249,6 +1253,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.f.clear();
|
||||
this.methodProfiler.c("regular");
|
||||
|
||||
@@ -234,7 +234,7 @@ index 75fed94..33391e8 100644
|
||||
for (i = 0; i < this.entityList.size(); ++i) {
|
||||
entity = (Entity) this.entityList.get(i);
|
||||
|
||||
@@ -1265,7 +1270,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1271,7 +1276,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.a("tick");
|
||||
if (!entity.dead) {
|
||||
try {
|
||||
@@ -244,7 +244,7 @@ index 75fed94..33391e8 100644
|
||||
} catch (Throwable throwable1) {
|
||||
crashreport = CrashReport.a(throwable1, "Ticking entity");
|
||||
crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||
@@ -1290,7 +1297,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1296,7 +1303,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ index 75fed94..33391e8 100644
|
||||
this.N = true;
|
||||
Iterator iterator = this.tileEntityList.iterator();
|
||||
|
||||
@@ -1305,8 +1314,11 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1311,8 +1320,11 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) {
|
||||
try {
|
||||
@@ -266,7 +266,7 @@ index 75fed94..33391e8 100644
|
||||
crashreport = CrashReport.a(throwable2, "Ticking block entity");
|
||||
crashreportsystemdetails = crashreport.a("Block entity being ticked");
|
||||
tileentity.a(crashreportsystemdetails);
|
||||
@@ -1326,6 +1338,8 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1332,6 +1344,8 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ index 75fed94..33391e8 100644
|
||||
this.N = false;
|
||||
if (!this.b.isEmpty()) {
|
||||
this.tileEntityList.removeAll(this.b);
|
||||
@@ -1364,6 +1378,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1370,6 +1384,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a.clear();
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ index 75fed94..33391e8 100644
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
@@ -1386,6 +1401,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1392,6 +1407,7 @@ public abstract class World implements IBlockAccess {
|
||||
byte b0 = 32;
|
||||
|
||||
if (!flag || this.b(i - b0, 0, j - b0, i + b0, 0, j + b0)) {
|
||||
@@ -291,7 +291,7 @@ index 75fed94..33391e8 100644
|
||||
entity.T = entity.locX;
|
||||
entity.U = entity.locY;
|
||||
entity.V = entity.locZ;
|
||||
@@ -1447,6 +1463,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1453,6 +1469,7 @@ public abstract class World implements IBlockAccess {
|
||||
entity.passenger = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user