Upstream has released updates that appears to apply and compile correctly Paper Changes: 1dc7c308a Optimize Collision Chunk lookup and avoid loading far chunks d5c6dbee5 Prevent Double PlayerChunkMap adds crashing server a2a9ffe3b Fix issues with Activation Range causing large chunk lookups. 017297cdb Improve entity.getCurrentChunk() and use it for entity.isChunkLoaded() 52cf89060 Remove some old removed 1.14 patches that are never going to be needed (fixed/already applied)
774 lines
41 KiB
Diff
774 lines
41 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
|
|
<tsao-chi@the-lingo.org>
|
|
Date: Thu, 2 Apr 2020 12:30:35 +0800
|
|
Subject: [PATCH] Remove method profiler callers
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
index 1dcd0980ecf81f1fdc1f792ffdac48da00ec1ac6..72f34871409e287757f469a67e67f87d924c2397 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
@@ -588,31 +588,31 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
// CraftBukkit start - modelled on below
|
|
public void purgeUnload() {
|
|
- this.world.getMethodProfiler().enter("purge");
|
|
+ //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller
|
|
this.chunkMapDistance.purgeTickets();
|
|
this.tickDistanceManager();
|
|
- this.world.getMethodProfiler().exitEnter("unload");
|
|
+ //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller
|
|
this.playerChunkMap.unloadChunks(() -> true);
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
this.clearCache();
|
|
}
|
|
// CraftBukkit end
|
|
|
|
public void tick(BooleanSupplier booleansupplier) {
|
|
- this.world.getMethodProfiler().enter("purge");
|
|
+ //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller
|
|
this.world.timings.doChunkMap.startTiming(); // Spigot
|
|
this.chunkMapDistance.purgeTickets();
|
|
this.tickDistanceManager();
|
|
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
|
- this.world.getMethodProfiler().exitEnter("chunks");
|
|
+ //this.world.getMethodProfiler().exitEnter("chunks"); // Akarin - remove caller
|
|
this.world.timings.chunks.startTiming(); // Paper - timings
|
|
this.tickChunks();
|
|
this.world.timings.chunks.stopTiming(); // Paper - timings
|
|
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
|
- this.world.getMethodProfiler().exitEnter("unload");
|
|
+ //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller
|
|
this.playerChunkMap.unloadChunks(booleansupplier);
|
|
this.world.timings.doChunkUnload.stopTiming(); // Spigot
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
this.clearCache();
|
|
}
|
|
|
|
@@ -626,7 +626,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit
|
|
|
|
if (!flag) {
|
|
- this.world.getMethodProfiler().enter("pollingChunks");
|
|
+ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller
|
|
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
BlockPosition blockposition = this.world.getSpawn();
|
|
// CraftBukkit start - Other mob type spawn tick rate
|
|
@@ -637,7 +637,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
boolean flag2 = spawnAnimalThisTick;
|
|
// CraftBukkit end
|
|
|
|
- this.world.getMethodProfiler().enter("naturalSpawnCount");
|
|
+ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller
|
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
int l = this.chunkMapDistance.b();
|
|
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
|
@@ -659,7 +659,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
// Paper end
|
|
|
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
//Paper start - call player naturally spawn event
|
|
int chunkRange = world.spigotConfig.mobSpawnRange;
|
|
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
|
|
@@ -675,18 +675,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
if (optional.isPresent()) {
|
|
Chunk chunk = (Chunk) optional.get();
|
|
|
|
- this.world.getMethodProfiler().enter("broadcast");
|
|
+ //this.world.getMethodProfiler().enter("broadcast"); // Akarin - remove caller
|
|
this.world.timings.broadcastChunkUpdates.startTiming(); // Paper - timings
|
|
playerchunk.a(chunk);
|
|
this.world.timings.broadcastChunkUpdates.stopTiming(); // Paper - timings
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
|
|
|
|
if (!this.playerChunkMap.isOutsideOfRange(chunkcoordintpair)) {
|
|
// Paper end
|
|
chunk.setInhabitedTime(chunk.getInhabitedTime() + j);
|
|
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
|
|
- this.world.getMethodProfiler().enter("spawner");
|
|
+ //this.world.getMethodProfiler().enter("spawner"); // Akarin - remove caller
|
|
this.world.timings.mobSpawn.startTiming(); // Spigot
|
|
EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype;
|
|
int i1 = aenumcreaturetype.length;
|
|
@@ -746,7 +746,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
}
|
|
|
|
this.world.timings.mobSpawn.stopTiming(); // Spigot
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
|
@@ -755,15 +755,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
}
|
|
}
|
|
});
|
|
- this.world.getMethodProfiler().enter("customSpawners");
|
|
+ //this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller
|
|
if (flag1) {
|
|
try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
|
this.chunkGenerator.doMobSpawning(this.world, this.allowMonsters, this.allowAnimals);
|
|
} // Paper - timings
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
this.playerChunkMap.g();
|
|
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
index ee42e1dfa493c3d7f5af8cc7b8e17e80fcb32b71..bd9684c4ed0d8e71278fbf8547b34899c62c108e 100644
|
|
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
@@ -70,7 +70,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
this.a(customfunction, this.f());
|
|
}
|
|
|
|
- this.server.getMethodProfiler().exit();
|
|
+ //this.server.getMethodProfiler().exit(); // Akarin - remove caller
|
|
if (this.m) {
|
|
this.m = false;
|
|
Collection<CustomFunction> collection = this.h().b(CustomFunctionData.e).a();
|
|
@@ -86,7 +86,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
this.a(customfunction1, this.f());
|
|
}
|
|
|
|
- this.server.getMethodProfiler().exit();
|
|
+ //this.server.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
}
|
|
@@ -132,7 +132,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
this.j.clear();
|
|
}
|
|
} finally {
|
|
- this.server.getMethodProfiler().exit();
|
|
+ //this.server.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
++k;
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index d098b224fb8e6b91abbfab3bdd3c010d80810803..e3b45481196adb551f6f36874e2df9a3a75537ab 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -395,7 +395,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
// CraftBukkit end
|
|
|
|
public void entityBaseTick() {
|
|
- this.world.getMethodProfiler().enter("entityBaseTick");
|
|
+ //this.world.getMethodProfiler().enter("entityBaseTick"); // Akarin - remove caller
|
|
if (this.isPassenger() && this.getVehicle().dead) {
|
|
this.stopRiding();
|
|
}
|
|
@@ -448,7 +448,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
|
|
this.justCreated = false;
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
// Paper start
|
|
@@ -563,7 +563,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
}
|
|
|
|
- this.world.getMethodProfiler().enter("move");
|
|
+ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller
|
|
if (this.y.g() > 1.0E-7D) {
|
|
vec3d = vec3d.h(this.y);
|
|
this.y = Vec3D.a;
|
|
@@ -584,8 +584,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.recalcPosition();
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("rest");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("rest"); // Akarin - remove caller
|
|
this.positionChanged = !MathHelper.b(vec3d.x, vec3d1.x) || !MathHelper.b(vec3d.z, vec3d1.z);
|
|
this.v = vec3d.y != vec3d1.y;
|
|
this.onGround = this.v && vec3d.y < 0.0D;
|
|
@@ -707,7 +707,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.fireTicks = -this.getMaxFireTicks();
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
}
|
|
|
|
@@ -2208,7 +2208,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
if (this.af) {
|
|
if ((true || this.world.getMinecraftServer().getAllowNether()) && !this.isPassenger() && this.ag++ >= i) { // CraftBukkit
|
|
- this.world.getMethodProfiler().enter("portal");
|
|
+ //this.world.getMethodProfiler().enter("portal"); // Akarin - remove caller
|
|
this.ag = i;
|
|
this.portalCooldown = this.ba();
|
|
// CraftBukkit start
|
|
@@ -2218,7 +2218,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.a(this.world.worldProvider.getDimensionManager().getType() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER);
|
|
}
|
|
// CraftBukkit end
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
this.af = false;
|
|
@@ -2596,7 +2596,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
public Entity teleportTo(DimensionManager dimensionmanager, BlockPosition location) {
|
|
// CraftBukkit end
|
|
if (!this.world.isClientSide && !this.dead) {
|
|
- this.world.getMethodProfiler().enter("changeDimension");
|
|
+ //this.world.getMethodProfiler().enter("changeDimension"); // Akarin - remove caller
|
|
MinecraftServer minecraftserver = this.getMinecraftServer();
|
|
DimensionManager dimensionmanager1 = this.dimension;
|
|
WorldServer worldserver = minecraftserver.getWorldServer(dimensionmanager1);
|
|
@@ -2609,7 +2609,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
// this.dimension = dimensionmanager;
|
|
// this.decouple();
|
|
// CraftBukkit end
|
|
- this.world.getMethodProfiler().enter("reposition");
|
|
+ //this.world.getMethodProfiler().enter("reposition"); // Akarin - remove caller
|
|
Vec3D vec3d = this.getMot();
|
|
float f = 0.0F;
|
|
BlockPosition blockposition = location; // CraftBukkit
|
|
@@ -2688,7 +2688,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.decouple();
|
|
// CraftBukkit end
|
|
|
|
- this.world.getMethodProfiler().exitEnter("reloading");
|
|
+ //this.world.getMethodProfiler().exitEnter("reloading"); // Akarin - remove caller
|
|
Entity entity = this.getEntityType().a((World) worldserver1);
|
|
|
|
if (entity != null) {
|
|
@@ -2707,10 +2707,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
|
|
this.dead = true;
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
worldserver.resetEmptyTime();
|
|
worldserver1.resetEmptyTime();
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
return entity;
|
|
} else {
|
|
return null;
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
index 1991cee43d429574f2c0889f807e7cd090f7d7dd..e9f00a1e131faa42d280cab255bc61cd1dcddf2a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
@@ -223,13 +223,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
@Override
|
|
public void entityBaseTick() {
|
|
super.entityBaseTick();
|
|
- this.world.getMethodProfiler().enter("mobBaseTick");
|
|
+ //this.world.getMethodProfiler().enter("mobBaseTick"); // Akarin - remove caller
|
|
if (this.isAlive() && this.random.nextInt(1000) < this.e++) {
|
|
this.l();
|
|
this.B();
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
@Override
|
|
@@ -523,7 +523,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
@Override
|
|
public void movementTick() {
|
|
super.movementTick();
|
|
- this.world.getMethodProfiler().enter("looting");
|
|
+ //this.world.getMethodProfiler().enter("looting"); // Akarin - remove caller
|
|
if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
|
List<EntityItem> list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D));
|
|
Iterator iterator = list.iterator();
|
|
@@ -542,7 +542,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
}
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
protected void a(EntityItem entityitem) {
|
|
@@ -676,30 +676,30 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
return;
|
|
}
|
|
// Paper end
|
|
- this.world.getMethodProfiler().enter("sensing");
|
|
+ //this.world.getMethodProfiler().enter("sensing"); // Akarin - remove caller
|
|
this.bw.a();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("targetSelector");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("targetSelector"); // Akarin - remove caller
|
|
this.targetSelector.doTick();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("goalSelector");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("goalSelector"); // Akarin - remove caller
|
|
this.goalSelector.doTick();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("navigation");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller
|
|
this.navigation.c();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("mob tick");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller
|
|
this.mobTick();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("controls");
|
|
- this.world.getMethodProfiler().enter("move");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("controls"); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller
|
|
this.moveController.a();
|
|
- this.world.getMethodProfiler().exitEnter("look");
|
|
+ //this.world.getMethodProfiler().exitEnter("look"); // Akarin - remove caller
|
|
this.lookController.a();
|
|
- this.world.getMethodProfiler().exitEnter("jump");
|
|
+ //this.world.getMethodProfiler().exitEnter("jump"); // Akarin - remove caller
|
|
this.bq.b();
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
this.K();
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
index ad474500e2f6fd6ad6db7bf2436b74c2d9d6136a..e93b7b280968ad1620a24fb06f2e5a503bdecad0 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -242,7 +242,7 @@ public abstract class EntityLiving extends Entity {
|
|
}
|
|
|
|
super.entityBaseTick();
|
|
- this.world.getMethodProfiler().enter("livingEntityBaseTick");
|
|
+ //this.world.getMethodProfiler().enter("livingEntityBaseTick"); // Akarin - remove caller
|
|
boolean flag = this instanceof EntityHuman;
|
|
|
|
if (this.isAlive()) {
|
|
@@ -344,7 +344,7 @@ public abstract class EntityLiving extends Entity {
|
|
this.aL = this.aK;
|
|
this.lastYaw = this.yaw;
|
|
this.lastPitch = this.pitch;
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
protected void b(BlockPosition blockposition) {
|
|
@@ -2412,10 +2412,10 @@ public abstract class EntityLiving extends Entity {
|
|
}
|
|
|
|
this.aS += (f3 - this.aS) * 0.3F;
|
|
- this.world.getMethodProfiler().enter("headTurn");
|
|
+ //this.world.getMethodProfiler().enter("headTurn"); // Akarin - remove caller
|
|
f2 = this.f(f1, f2);
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("rangeChecks");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("rangeChecks"); // Akarin - remove caller
|
|
|
|
while (this.yaw - this.lastYaw < -180.0F) {
|
|
this.lastYaw -= 360.0F;
|
|
@@ -2449,7 +2449,7 @@ public abstract class EntityLiving extends Entity {
|
|
this.aL += 360.0F;
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
this.aT += f2;
|
|
if (this.isGliding()) {
|
|
++this.bm;
|
|
@@ -2586,19 +2586,19 @@ public abstract class EntityLiving extends Entity {
|
|
}
|
|
|
|
this.setMot(d4, d5, d6);
|
|
- this.world.getMethodProfiler().enter("ai");
|
|
+ //this.world.getMethodProfiler().enter("ai"); // Akarin - remove caller
|
|
if (this.isFrozen()) {
|
|
this.jumping = false;
|
|
this.aZ = 0.0F;
|
|
this.bb = 0.0F;
|
|
} else if (this.doAITick()) {
|
|
- this.world.getMethodProfiler().enter("newAi");
|
|
+ //this.world.getMethodProfiler().enter("newAi"); // Akarin - remove caller
|
|
this.doTick();
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("jump");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller
|
|
if (this.jumping) {
|
|
if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) {
|
|
this.c(TagsFluid.WATER);
|
|
@@ -2614,23 +2614,23 @@ public abstract class EntityLiving extends Entity {
|
|
this.jumpTicks = 0;
|
|
}
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("travel");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("travel"); // Akarin - remove caller
|
|
this.aZ *= 0.98F;
|
|
this.bb *= 0.98F;
|
|
this.n();
|
|
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
|
|
|
this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb));
|
|
- this.world.getMethodProfiler().exit();
|
|
- this.world.getMethodProfiler().enter("push");
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
+ //this.world.getMethodProfiler().enter("push"); // Akarin - remove caller
|
|
if (this.bn > 0) {
|
|
--this.bn;
|
|
this.a(axisalignedbb, this.getBoundingBox());
|
|
}
|
|
|
|
this.collideNearby();
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
private void n() {
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 6e0020ae0b4d2f2597843129b83fff0d194de337..9d94aa135e1374112c5282e009a8407e2f0e1d37 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -144,9 +144,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
|
|
@Override
|
|
protected void mobTick() {
|
|
- this.world.getMethodProfiler().enter("brain");
|
|
+ //this.world.getMethodProfiler().enter("brain"); // Akarin - remove caller
|
|
this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
if (!this.et() && this.bB > 0) {
|
|
--this.bB;
|
|
if (this.bB <= 0) {
|
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
|
index a353f3d5fa5a5f54335f73584589de3f5cb20d3e..81e699b404c3c93a2a0b50d8960c1276067c6580 100644
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
|
@@ -285,7 +285,7 @@ public class Explosion {
|
|
if (!iblockdata.isAir()) {
|
|
BlockPosition blockposition1 = blockposition.immutableCopy();
|
|
|
|
- this.world.getMethodProfiler().enter("explosion_blocks");
|
|
+ //this.world.getMethodProfiler().enter("explosion_blocks"); // Akarin - remove caller
|
|
if (block.a(this) && this.world instanceof WorldServer) {
|
|
TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
|
|
LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source);
|
|
@@ -301,7 +301,7 @@ public class Explosion {
|
|
|
|
this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3);
|
|
block.wasExploded(this.world, blockposition, this);
|
|
- this.world.getMethodProfiler().exit();
|
|
+ //this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 4dd21b5e15ab2bd5b09ab1bb6e60cc3ae1bfd00e..aea487f51e0d3520b8adeca39e15d2e3a2fcb1cc 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -930,13 +930,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
|
|
this.methodProfiler.a();
|
|
- this.methodProfiler.enter("tick");
|
|
+ //this.methodProfiler.enter("tick"); // Akarin - remove caller
|
|
this.a(this::canSleepForTick);
|
|
- this.methodProfiler.exitEnter("nextTickWait");
|
|
+ //this.methodProfiler.exitEnter("nextTickWait"); // Akarin - remove caller
|
|
this.ac = true;
|
|
this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
this.sleepForTick();
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
this.methodProfiler.b();
|
|
this.hasTicked = true;
|
|
}
|
|
@@ -1127,7 +1127,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
//if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
|
|
//MinecraftServer.LOGGER.debug("Autosave started"); // Paper
|
|
serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper
|
|
- this.methodProfiler.enter("save");
|
|
+ //this.methodProfiler.enter("save"); // Akarin - remove caller
|
|
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // Paper
|
|
this.playerList.savePlayers();
|
|
}// Paper
|
|
@@ -1143,11 +1143,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
// Paper end
|
|
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
//MinecraftServer.LOGGER.debug("Autosave finished"); // Paper
|
|
//} // Paper
|
|
|
|
- this.methodProfiler.enter("snooper");
|
|
+ //this.methodProfiler.enter("snooper"); // Akarin - remove caller
|
|
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
|
this.snooper.a();
|
|
}
|
|
@@ -1156,15 +1156,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
this.snooper.b();
|
|
}
|
|
|
|
- this.methodProfiler.exit();
|
|
- this.methodProfiler.enter("tallying");
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
+ //this.methodProfiler.enter("tallying"); // Akarin - remove caller
|
|
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
|
|
|
|
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
|
long i1 = SystemUtils.getMonotonicNanos();
|
|
|
|
this.circularTimer.a(i1 - i);
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
this.slackActivityAccountant.tickEnded(l); // Spigot
|
|
// Paper start - move executeAll() into full server tick timing
|
|
@@ -1184,11 +1184,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
|
this.server.getScheduler().mainThreadHeartbeat(this.ticks); // CraftBukkit
|
|
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
|
- this.methodProfiler.enter("commandFunctions");
|
|
+ //this.methodProfiler.enter("commandFunctions"); // Akarin - remove caller
|
|
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
|
this.getFunctionData().tick();
|
|
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
|
- this.methodProfiler.exitEnter("levels");
|
|
+ //this.methodProfiler.exitEnter("levels"); // Akarin - remove caller
|
|
Iterator iterator = this.getWorlds().iterator();
|
|
|
|
// CraftBukkit start
|
|
@@ -1232,13 +1232,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
});
|
|
/* Drop global time updates
|
|
if (this.ticks % 20 == 0) {
|
|
- this.methodProfiler.enter("timeSync");
|
|
+ //this.methodProfiler.enter("timeSync"); // Akarin - remove caller
|
|
this.playerList.a((Packet) (new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))), worldserver.worldProvider.getDimensionManager());
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
}
|
|
// CraftBukkit end */
|
|
|
|
- this.methodProfiler.enter("tick");
|
|
+ //this.methodProfiler.enter("tick"); // Akarin - remove caller
|
|
|
|
try {
|
|
worldserver.timings.doTick.startTiming(); // Spigot
|
|
@@ -1258,17 +1258,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
throw new ReportedException(crashreport);
|
|
}
|
|
|
|
- this.methodProfiler.exit();
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
|
}
|
|
}
|
|
|
|
- this.methodProfiler.exitEnter("connection");
|
|
+ //this.methodProfiler.exitEnter("connection"); // Akarin - remove caller
|
|
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
|
this.getServerConnection().c();
|
|
MinecraftTimings.connectionTimer.stopTiming(); // Spigot
|
|
- this.methodProfiler.exitEnter("players");
|
|
+ //this.methodProfiler.exitEnter("players"); // Akarin - remove caller
|
|
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
|
this.playerList.tick();
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
@@ -1276,7 +1276,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
GameTestHarnessTicker.a.b();
|
|
}
|
|
|
|
- this.methodProfiler.exitEnter("server gui refresh");
|
|
+ //this.methodProfiler.exitEnter("server gui refresh"); // Akarin - remove caller
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
@@ -1284,7 +1284,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
}
|
|
|
|
public boolean getAllowNether() {
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
index f06764973feaa29ccbb4731b65372c544dcf3032..1e6b3931a3d2781c122dfc0fef1c61dcbe28fa69 100644
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
@@ -137,14 +137,14 @@ public abstract class NavigationAbstract {
|
|
}
|
|
}
|
|
// Paper end
|
|
- this.b.getMethodProfiler().enter("pathfind");
|
|
+ //this.b.getMethodProfiler().enter("pathfind"); // Akarin - remove caller
|
|
float f = (float) this.p.getValue();
|
|
BlockPosition blockposition = flag ? (new BlockPosition(this.a)).up() : new BlockPosition(this.a);
|
|
int k = (int) (f + (float) i);
|
|
ChunkCache chunkcache = new ChunkCache(this.b, blockposition.b(-k, -k, -k), blockposition.b(k, k, k));
|
|
PathEntity pathentity = this.t.a(chunkcache, this.a, set, f, j, this.s);
|
|
|
|
- this.b.getMethodProfiler().exit();
|
|
+ //this.b.getMethodProfiler().exit(); // Akarin - remove caller
|
|
if (pathentity != null && pathentity.k() != null) {
|
|
this.q = pathentity.k();
|
|
this.r = j;
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
|
index 935136771e776fe498f608a159a41393340adc4e..337fb3d64aff37f6e4d2928beefc4501065e4af9 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
|
@@ -67,7 +67,7 @@ public class PathfinderGoalSelector {
|
|
}
|
|
|
|
public void doTick() {
|
|
- this.e.enter("goalCleanup");
|
|
+ //this.e.enter("goalCleanup"); // Akarin - remove caller
|
|
this.c().filter((pathfindergoalwrapped) -> {
|
|
boolean flag;
|
|
|
|
@@ -91,8 +91,8 @@ public class PathfinderGoalSelector {
|
|
}
|
|
|
|
});
|
|
- this.e.exit();
|
|
- this.e.enter("goalUpdate");
|
|
+ //this.e.exit(); // Akarin - remove caller
|
|
+ //this.e.enter("goalUpdate"); // Akarin - remove caller
|
|
this.d.stream().filter((pathfindergoalwrapped) -> {
|
|
return !pathfindergoalwrapped.g();
|
|
}).filter((pathfindergoalwrapped) -> {
|
|
@@ -114,10 +114,10 @@ public class PathfinderGoalSelector {
|
|
});
|
|
pathfindergoalwrapped.c();
|
|
});
|
|
- this.e.exit();
|
|
- this.e.enter("goalTick");
|
|
+ //this.e.exit(); // Akarin - remove caller
|
|
+ //this.e.enter("goalTick"); // Akarin - remove caller
|
|
this.c().forEach(PathfinderGoalWrapped::e);
|
|
- this.e.exit();
|
|
+ //this.e.exit(); // Akarin - remove caller
|
|
}
|
|
|
|
public Stream<PathfinderGoalWrapped> c() {
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 7929fcc800064fa23b260c3ecbed75f846bb375a..e1225d5017cc0b65a4fd5ac753a705a11679cf2b 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -185,7 +185,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
this.E = 0;
|
|
}
|
|
|
|
- this.minecraftServer.getMethodProfiler().enter("keepAlive");
|
|
+ //this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Akarin - remove caller
|
|
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
|
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
|
long currentTime = SystemUtils.getMonotonicMillis();
|
|
@@ -207,7 +207,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
}
|
|
// Paper end
|
|
|
|
- this.minecraftServer.getMethodProfiler().exit();
|
|
+ //this.minecraftServer.getMethodProfiler().exit(); // Akarin - remove caller
|
|
// CraftBukkit start
|
|
for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ;
|
|
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
|
|
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
|
index 3f1aa5ced697490b5481ba992cf5af5dc98b8166..af705e6c650b529c18bdd8f0c063a71c750783f6 100644
|
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
|
+++ b/src/main/java/net/minecraft/server/TickListServer.java
|
|
@@ -65,7 +65,7 @@ public class TickListServer<T> implements TickList<T> {
|
|
ChunkProviderServer chunkproviderserver = this.f.getChunkProvider();
|
|
Iterator<NextTickListEntry<T>> iterator = this.nextTickList.iterator();
|
|
|
|
- this.f.getMethodProfiler().enter("cleaning");
|
|
+ //this.f.getMethodProfiler().enter("cleaning"); // Akarin - remove caller
|
|
|
|
this.timingCleanup.startTiming(); // Paper
|
|
NextTickListEntry nextticklistentry;
|
|
@@ -86,7 +86,7 @@ public class TickListServer<T> implements TickList<T> {
|
|
this.timingCleanup.stopTiming(); // Paper
|
|
|
|
this.timingTicking.startTiming(); // Paper
|
|
- this.f.getMethodProfiler().exitEnter("ticking");
|
|
+ //this.f.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
|
|
|
|
while ((nextticklistentry = (NextTickListEntry) this.g.poll()) != null) {
|
|
if (chunkproviderserver.a(nextticklistentry.a)) {
|
|
@@ -105,7 +105,7 @@ public class TickListServer<T> implements TickList<T> {
|
|
}
|
|
}
|
|
|
|
- this.f.getMethodProfiler().exit();
|
|
+ //this.f.getMethodProfiler().exit(); // Akarin - remove caller
|
|
this.timingTicking.stopTiming(); // Paper
|
|
this.h.clear();
|
|
this.g.clear();
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index 5117dafbcf402d0db82d791a6b4b821eaa1350ba..509fbfb0967cd9a16695e43e764a4b0eb509bb86 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -375,9 +375,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
IBlockData iblockdata2 = this.getType(blockposition);
|
|
|
|
if (iblockdata2 != iblockdata1 && (iblockdata2.b((IBlockAccess) this, blockposition) != iblockdata1.b((IBlockAccess) this, blockposition) || iblockdata2.h() != iblockdata1.h() || iblockdata2.g() || iblockdata1.g())) {
|
|
- this.methodProfiler.enter("queueCheckLight");
|
|
+ //this.methodProfiler.enter("queueCheckLight"); // Akarin - remove caller
|
|
this.getChunkProvider().getLightEngine().a(blockposition);
|
|
- this.methodProfiler.exit();
|
|
+ //this.methodProfiler.exit(); // Akarin - remove caller
|
|
}
|
|
|
|
/*
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index c7ec8cbc11f95e84c6aa932f068a2f1802a5d902..95e982063b2645e2b809848ae846532e87c7f6e0 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -824,7 +824,7 @@ public class WorldServer extends World {
|
|
}
|
|
|
|
public void chunkCheck(Entity entity) {
|
|
- this.getMethodProfiler().enter("chunkCheck");
|
|
+ //this.getMethodProfiler().enter("chunkCheck"); // Akarin - remove caller
|
|
int i = MathHelper.floor(entity.locX() / 16.0D);
|
|
int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior;
|
|
int k = MathHelper.floor(entity.locZ() / 16.0D);
|
|
@@ -841,7 +841,7 @@ public class WorldServer extends World {
|
|
}
|
|
}
|
|
|
|
- this.getMethodProfiler().exit();
|
|
+ //this.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
|
|
@Override
|