summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-11-26 18:27:39 +0100
committerErik Broes <erikbroes@grum.nl>2011-11-26 18:27:39 +0100
commitba608f55e4afe7ded3f31d4723d1e74d910015fc (patch)
tree7ac2e0a6ba0db6feb79a67b0080c826c8b30c553
parent9907638130278944613bd476f6f23c1617899174 (diff)
downloadcraftbukkit-ba608f55e4afe7ded3f31d4723d1e74d910015fc.tar
craftbukkit-ba608f55e4afe7ded3f31d4723d1e74d910015fc.tar.gz
craftbukkit-ba608f55e4afe7ded3f31d4723d1e74d910015fc.tar.lz
craftbukkit-ba608f55e4afe7ded3f31d4723d1e74d910015fc.tar.xz
craftbukkit-ba608f55e4afe7ded3f31d4723d1e74d910015fc.zip
Remove expensive debugcalls from production code
-rw-r--r--src/main/java/net/minecraft/server/Entity.java12
-rw-r--r--src/main/java/net/minecraft/server/EntityCreature.java12
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java12
-rw-r--r--src/main/java/net/minecraft/server/World.java64
4 files changed, 50 insertions, 50 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2625ad35..512afdca 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -192,7 +192,7 @@ public abstract class Entity {
}
public void af() {
- MethodProfiler.a("entityBaseTick");
+ // MethodProfiler.a("entityBaseTick"); // CraftBukkit -- not in production code
if (this.vehicle != null && this.vehicle.dead) {
this.vehicle = null;
}
@@ -295,7 +295,7 @@ public abstract class Entity {
}
this.justCreated = false;
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
protected void av() {
@@ -365,7 +365,7 @@ public abstract class Entity {
this.locY = this.boundingBox.b + (double) this.height - (double) this.bL;
this.locZ = (this.boundingBox.c + this.boundingBox.f) / 2.0D;
} else {
- MethodProfiler.a("move");
+ // MethodProfiler.a("move"); // CraftBukkit -- not in production code
this.bL *= 0.4F;
double d3 = this.locX;
double d4 = this.locZ;
@@ -527,8 +527,8 @@ public abstract class Entity {
}
}
- MethodProfiler.a();
- MethodProfiler.a("rest");
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
+ // MethodProfiler.a("rest"); // CraftBukkit -- not in production code
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
this.locY = this.boundingBox.b + (double) this.height - (double) this.bL;
this.locZ = (this.boundingBox.c + this.boundingBox.f) / 2.0D;
@@ -641,7 +641,7 @@ public abstract class Entity {
this.fireTicks = -this.maxFireTicks;
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
}
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index 0f0bf221..1df836fe 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -22,7 +22,7 @@ public abstract class EntityCreature extends EntityLiving {
}
protected void m_() {
- MethodProfiler.a("ai");
+ // MethodProfiler.a("ai"); // CraftBukkit -- not in production code
if (this.f > 0) {
--this.f;
}
@@ -73,7 +73,7 @@ public abstract class EntityCreature extends EntityLiving {
}
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
if (!this.e && this.target != null && (this.pathEntity == null || this.random.nextInt(20) == 0)) {
this.pathEntity = this.world.findPath(this, this.target, f);
} else if (!this.e && (this.pathEntity == null && this.random.nextInt(180) == 0 || this.random.nextInt(120) == 0 || this.f > 0) && this.aS < 100) {
@@ -86,7 +86,7 @@ public abstract class EntityCreature extends EntityLiving {
this.pitch = 0.0F;
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
- MethodProfiler.a("followpath");
+ // MethodProfiler.a("followpath"); // CraftBukkit -- not in production code
Vec3D vec3d = this.pathEntity.a(this);
double d0 = (double) (this.length * 2.0F);
@@ -154,7 +154,7 @@ public abstract class EntityCreature extends EntityLiving {
this.aW = true;
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
} else {
super.m_();
this.pathEntity = null;
@@ -162,7 +162,7 @@ public abstract class EntityCreature extends EntityLiving {
}
protected void C() {
- MethodProfiler.a("stroll");
+ // MethodProfiler.a("stroll"); // CraftBukkit -- not in production code
boolean flag = false;
int i = -1;
int j = -1;
@@ -188,7 +188,7 @@ public abstract class EntityCreature extends EntityLiving {
this.pathEntity = this.world.a(this, i, j, k, 10.0F);
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
protected void a(Entity entity, float f) {}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 5b0231b6..2fd280b1 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -128,7 +128,7 @@ public abstract class EntityLiving extends Entity {
public void af() {
this.am = this.an;
super.af();
- MethodProfiler.a("mobBaseTick");
+ // MethodProfiler.a("mobBaseTick"); // CraftBukkit -- not in production code
if (this.random.nextInt(1000) < this.a++) {
this.a = -this.h();
this.ae();
@@ -205,7 +205,7 @@ public abstract class EntityLiving extends Entity {
this.W = this.V;
this.lastYaw = this.yaw;
this.lastPitch = this.pitch;
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
// CraftBukkit start
@@ -874,7 +874,7 @@ public abstract class EntityLiving extends Entity {
}
}
- MethodProfiler.a("ai");
+ // MethodProfiler.a("ai"); // CraftBukkit -- not in production code
if (this.L()) {
this.aW = false;
this.aT = 0.0F;
@@ -884,7 +884,7 @@ public abstract class EntityLiving extends Entity {
this.m_();
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
boolean flag = this.az();
boolean flag1 = this.aA();
@@ -909,7 +909,7 @@ public abstract class EntityLiving extends Entity {
this.ak *= this.F();
this.a(this.aT, this.aU);
this.ak = f;
- MethodProfiler.a("push");
+ // MethodProfiler.a("push"); // CraftBukkit -- not in production code
List list1 = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D));
if (list1 != null && list1.size() > 0) {
@@ -922,7 +922,7 @@ public abstract class EntityLiving extends Entity {
}
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
protected boolean L() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cebf2c18..204adaf2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1084,8 +1084,8 @@ public class World implements IBlockAccess {
}
public void tickEntities() {
- MethodProfiler.a("entities");
- MethodProfiler.a("global");
+ // MethodProfiler.a("entities"); // CraftBukkit -- not in production code
+ // MethodProfiler.a("global"); // CraftBukkit -- not in production code
int i;
Entity entity;
@@ -1103,7 +1103,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.b("remove");
+ // MethodProfiler.b("remove"); // CraftBukkit -- not in production code
this.entityList.removeAll(this.J);
int j;
@@ -1123,7 +1123,7 @@ public class World implements IBlockAccess {
}
this.J.clear();
- MethodProfiler.b("regular");
+ // MethodProfiler.b("regular"); // CraftBukkit -- not in production code
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1140,7 +1140,7 @@ public class World implements IBlockAccess {
this.playerJoinedWorld(entity);
}
- MethodProfiler.a("remove");
+ // MethodProfiler.a("remove"); // CraftBukkit -- not in production code
if (entity.dead) {
j = entity.bX;
k = entity.bZ;
@@ -1152,10 +1152,10 @@ public class World implements IBlockAccess {
this.d(entity);
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
- MethodProfiler.b("tileEntities");
+ // MethodProfiler.b("tileEntities"); // CraftBukkit -- not in production code
this.S = true;
Iterator iterator = this.h.iterator();
@@ -1184,7 +1184,7 @@ public class World implements IBlockAccess {
this.N.clear();
}
- MethodProfiler.b("pendingTileEntities");
+ // MethodProfiler.b("pendingTileEntities"); // CraftBukkit -- not in production code
if (!this.M.isEmpty()) {
Iterator iterator1 = this.M.iterator();
@@ -1217,8 +1217,8 @@ public class World implements IBlockAccess {
this.M.clear();
}
- MethodProfiler.a();
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
public void a(Collection collection) {
@@ -1252,7 +1252,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.a("chunkCheck");
+ // MethodProfiler.a("chunkCheck"); // CraftBukkit -- not in production code
if (Double.isNaN(entity.locX) || Double.isInfinite(entity.locX)) {
entity.locX = entity.bI;
}
@@ -1290,7 +1290,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
if (flag && entity.bW && entity.passenger != null) {
if (!entity.passenger.dead && entity.passenger.vehicle == entity) {
this.playerJoinedWorld(entity.passenger);
@@ -1713,13 +1713,13 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.a("mobSpawner");
+ // MethodProfiler.a("mobSpawner"); // CraftBukkit -- not in production code
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
if ((this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.getServer().getHandle().players.size() > 0)) {
SpawnerCreature.spawnEntities(this, this.allowMonsters, this.allowAnimals && this.worldData.f() % 400L == 0L);
}
// CraftBukkit end
- MethodProfiler.b("chunkSource");
+ // MethodProfiler.b("chunkSource"); // CraftBukkit -- not in production code
this.chunkProvider.unloadChunks();
int j = this.a(1.0F);
@@ -1729,16 +1729,16 @@ public class World implements IBlockAccess {
i = this.worldData.f() + 1L;
if (i % (long) this.u == 0L) {
- MethodProfiler.b("save");
+ // MethodProfiler.b("save"); // CraftBukkit -- not in production code
this.save(false, (IProgressUpdate) null);
}
this.worldData.a(i);
- MethodProfiler.b("tickPending");
+ // MethodProfiler.b("tickPending"); // CraftBukkit -- not in production code
this.a(false);
- MethodProfiler.b("tickTiles");
+ // MethodProfiler.b("tickTiles"); // CraftBukkit -- not in production code
this.k();
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
private void z() {
@@ -1857,7 +1857,7 @@ public class World implements IBlockAccess {
protected void k() {
this.T.clear();
- MethodProfiler.a("buildList");
+ // MethodProfiler.a("buildList"); // CraftBukkit -- not in production code
int i;
int j;
@@ -1882,7 +1882,7 @@ public class World implements IBlockAccess {
i = 0;
int j1 = 0;
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
Iterator iterator = this.T.iterator();
while (iterator.hasNext()) {
@@ -1890,12 +1890,12 @@ public class World implements IBlockAccess {
int k1 = chunkcoordintpair.x * 16;
j = chunkcoordintpair.z * 16;
- MethodProfiler.a("getChunk");
+ // MethodProfiler.a("getChunk"); // CraftBukkit -- not in production code
Chunk chunk = this.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z);
- MethodProfiler.b("tickChunk");
+ // MethodProfiler.b("tickChunk"); // CraftBukkit -- not in production code
chunk.i();
- MethodProfiler.b("moodSound");
+ // MethodProfiler.b("moodSound"); // CraftBukkit -- not in production code
int l1;
int i2;
int j2;
@@ -1921,7 +1921,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.b("thunder");
+ // MethodProfiler.b("thunder"); // CraftBukkit -- not in production code
if (this.random.nextInt(100000) == 0 && this.w() && this.v()) {
this.l = this.l * 3 + 1013904223;
l1 = this.l >> 2;
@@ -1934,7 +1934,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.b("iceandsnow");
+ // MethodProfiler.b("iceandsnow"); // CraftBukkit -- not in production code
this.l = this.l * 3 + 1013904223;
l1 = this.l >> 2;
i2 = l1 & 15;
@@ -1966,9 +1966,9 @@ public class World implements IBlockAccess {
// CraftBukkit end
}
- MethodProfiler.b("checkLight");
+ // MethodProfiler.b("checkLight"); // CraftBukkit -- not in production code
this.s(k1 + this.random.nextInt(16), this.random.nextInt(this.height), j + this.random.nextInt(16));
- MethodProfiler.b("tickTiles");
+ // MethodProfiler.b("tickTiles"); // CraftBukkit -- not in production code
for (l1 = 0; l1 < 20; ++l1) {
this.l = this.l * 3 + 1013904223;
@@ -1985,7 +1985,7 @@ public class World implements IBlockAccess {
}
}
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
}
}
@@ -2461,7 +2461,7 @@ public class World implements IBlockAccess {
}
public PathEntity findPath(Entity entity, Entity entity1, float f) {
- MethodProfiler.a("pathfind");
+ // MethodProfiler.a("pathfind"); // CraftBukkit -- not in production code
int i = MathHelper.floor(entity.locX);
int j = MathHelper.floor(entity.locY);
int k = MathHelper.floor(entity.locZ);
@@ -2475,12 +2475,12 @@ public class World implements IBlockAccess {
ChunkCache chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2);
PathEntity pathentity = (new Pathfinder(chunkcache)).a(entity, entity1, f);
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
return pathentity;
}
public PathEntity a(Entity entity, int i, int j, int k, float f) {
- MethodProfiler.a("pathfind");
+ // MethodProfiler.a("pathfind"); // CraftBukkit -- not in production code
int l = MathHelper.floor(entity.locX);
int i1 = MathHelper.floor(entity.locY);
int j1 = MathHelper.floor(entity.locZ);
@@ -2494,7 +2494,7 @@ public class World implements IBlockAccess {
ChunkCache chunkcache = new ChunkCache(this, l1, i2, j2, k2, l2, i3);
PathEntity pathentity = (new Pathfinder(chunkcache)).a(entity, i, j, k, f);
- MethodProfiler.a();
+ // MethodProfiler.a(); // CraftBukkit -- not in production code
return pathentity;
}