|
|
|
@@ -1,14 +1,84 @@
|
|
|
|
From 24a16168874efef0d75d669be78f42404b211390 Mon Sep 17 00:00:00 2001
|
|
|
|
From ca5f28349f85a068161a35c7e69bb3246258b3ad Mon Sep 17 00:00:00 2001
|
|
|
|
From: Sotr <i@omc.hk>
|
|
|
|
From: Sotr <i@omc.hk>
|
|
|
|
Date: Wed, 15 Apr 2020 22:18:01 +0700
|
|
|
|
Date: Wed, 15 Apr 2020 22:18:01 +0700
|
|
|
|
Subject: [PATCH] Remove vanilla profiler callers
|
|
|
|
Subject: [PATCH] Remove vanilla profiler callers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
|
|
|
|
|
|
index ce653f6b4b..21e28b98b4 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
|
|
|
|
|
|
@@ -271,7 +271,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
|
|
|
|
|
|
|
|
public void tick() {
|
|
|
|
|
|
|
|
final ChunkProviderServer chunkProvider = this.world.getChunkProvider();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().enter("cleaning");
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().enter("cleaning"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.timingCleanup.startTiming();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.prepare();
|
|
|
|
|
|
|
|
@@ -282,7 +282,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
|
|
|
|
|
|
|
|
this.nextTick = this.world.getTime() + 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.timingCleanup.stopTiming();
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().exitEnter("ticking");
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.timingTicking.startTiming();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (final NextTickListEntry<T> toTick : this.toTickThisTick) {
|
|
|
|
|
|
|
|
@@ -314,7 +314,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.timingTicking.stopTiming();
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.timingFinished.startTiming();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// finished ticking, actual cleanup time
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
index f741a034e8..ae40078d0f 100644
|
|
|
|
index f741a034e8..04ffecd061 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
@@ -602,33 +602,33 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -368,9 +368,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
return ifLoaded;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.c("getChunk");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.c("getChunk"); // Akarin - remove caller
|
|
|
|
|
|
|
|
long k = ChunkCoordIntPair.pair(i, j);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IChunkAccess ichunkaccess;
|
|
|
|
|
|
|
|
@@ -384,7 +384,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.c("getChunkCacheMiss");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.c("getChunkCacheMiss"); // Akarin - remove caller
|
|
|
|
|
|
|
|
// Paper start - Chunk Load/Gen Priority
|
|
|
|
|
|
|
|
boolean prevBlocking = IS_CHUNK_LOAD_BLOCKING_MAIN;
|
|
|
|
|
|
|
|
IS_CHUNK_LOAD_BLOCKING_MAIN = true;
|
|
|
|
|
|
|
|
@@ -458,12 +458,16 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
|
|
|
|
|
|
|
|
if (this.a(playerchunk, l)) {
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gameprofilerfiller.enter("chunkLoad");
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
this.tickDistanceManager();
|
|
|
|
|
|
|
|
playerchunk = this.getChunk(k);
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (this.a(playerchunk, l)) {
|
|
|
|
|
|
|
|
throw (IllegalStateException) SystemUtils.c(new IllegalStateException("No chunk holder after ticket has been added"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -602,33 +606,33 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
|
|
|
|
// CraftBukkit start - modelled on below
|
|
|
|
// CraftBukkit start - modelled on below
|
|
|
|
public void purgeUnload() {
|
|
|
|
public void purgeUnload() {
|
|
|
|
@@ -49,7 +119,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
this.clearCache();
|
|
|
|
this.clearCache();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -642,7 +642,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -642,7 +646,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit
|
|
|
|
boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit
|
|
|
|
|
|
|
|
|
|
|
|
if (!flag) {
|
|
|
|
if (!flag) {
|
|
|
|
@@ -58,7 +128,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
|
|
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
|
|
BlockPosition blockposition = this.world.getSpawn();
|
|
|
|
BlockPosition blockposition = this.world.getSpawn();
|
|
|
|
// CraftBukkit start - Other mob type spawn tick rate
|
|
|
|
// CraftBukkit start - Other mob type spawn tick rate
|
|
|
|
@@ -653,7 +653,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -653,7 +657,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
boolean flag2 = spawnAnimalThisTick;
|
|
|
|
boolean flag2 = spawnAnimalThisTick;
|
|
|
|
// CraftBukkit end
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
|
|
|
|
@@ -67,7 +137,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
|
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
|
|
int l = this.chunkMapDistance.b();
|
|
|
|
int l = this.chunkMapDistance.b();
|
|
|
|
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
|
|
|
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
|
|
|
@@ -675,7 +675,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -675,7 +679,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
// Paper end
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
|
|
|
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
|
|
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
|
|
|
@@ -76,7 +146,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
//Paper start - call player naturally spawn event
|
|
|
|
//Paper start - call player naturally spawn event
|
|
|
|
int chunkRange = world.spigotConfig.mobSpawnRange;
|
|
|
|
int chunkRange = world.spigotConfig.mobSpawnRange;
|
|
|
|
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
|
|
|
|
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
|
|
|
|
@@ -691,18 +691,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -691,18 +695,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
if (optional.isPresent()) {
|
|
|
|
if (optional.isPresent()) {
|
|
|
|
Chunk chunk = (Chunk) optional.get();
|
|
|
|
Chunk chunk = (Chunk) optional.get();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -98,7 +168,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
this.world.timings.mobSpawn.startTiming(); // Spigot
|
|
|
|
this.world.timings.mobSpawn.startTiming(); // Spigot
|
|
|
|
EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype;
|
|
|
|
EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype;
|
|
|
|
int i1 = aenumcreaturetype.length;
|
|
|
|
int i1 = aenumcreaturetype.length;
|
|
|
|
@@ -762,7 +762,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -762,7 +766,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.world.timings.mobSpawn.stopTiming(); // Spigot
|
|
|
|
this.world.timings.mobSpawn.stopTiming(); // Spigot
|
|
|
|
@@ -107,7 +177,7 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
|
|
|
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
|
|
|
@@ -772,15 +772,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
@@ -772,15 +776,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@@ -126,11 +196,55 @@ index f741a034e8..ae40078d0f 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.playerChunkMap.g();
|
|
|
|
this.playerChunkMap.g();
|
|
|
|
|
|
|
|
@@ -906,7 +910,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected void executeTask(Runnable runnable) {
|
|
|
|
|
|
|
|
- ChunkProviderServer.this.world.getMethodProfiler().c("runTask");
|
|
|
|
|
|
|
|
+ // ChunkProviderServer.this.world.getMethodProfiler().c("runTask"); // Akarin - remove caller
|
|
|
|
|
|
|
|
super.executeTask(runnable);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
|
|
|
|
|
|
index 2414b0a552..1b0a878d2a 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
|
|
|
|
|
|
@@ -168,7 +168,7 @@ public class CommandDispatcher {
|
|
|
|
|
|
|
|
stringreader.skip();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- commandlistenerwrapper.getServer().getMethodProfiler().enter(s);
|
|
|
|
|
|
|
|
+ // commandlistenerwrapper.getServer().getMethodProfiler().enter(s); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
byte b0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -231,7 +231,7 @@ public class CommandDispatcher {
|
|
|
|
|
|
|
|
b0 = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
- commandlistenerwrapper.getServer().getMethodProfiler().exit();
|
|
|
|
|
|
|
|
+ // commandlistenerwrapper.getServer().getMethodProfiler().exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return b0;
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
|
|
index ee42e1dfa4..bd9684c4ed 100644
|
|
|
|
index ee42e1dfa4..68dc7cdfbc 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -58,10 +58,10 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void tick() {
|
|
|
|
|
|
|
|
- GameProfiler gameprofiler = this.server.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfiler gameprofiler = this.server.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
MinecraftKey minecraftkey = CustomFunctionData.d;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofiler.a(minecraftkey::toString);
|
|
|
|
|
|
|
|
+ // gameprofiler.a(minecraftkey::toString); // Akarin - remove caller
|
|
|
|
|
|
|
|
Iterator iterator = this.l.iterator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
|
|
|
@@ -70,14 +70,14 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
this.a(customfunction, this.f());
|
|
|
|
this.a(customfunction, this.f());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -139,6 +253,15 @@ index ee42e1dfa4..bd9684c4ed 100644
|
|
|
|
if (this.m) {
|
|
|
|
if (this.m) {
|
|
|
|
this.m = false;
|
|
|
|
this.m = false;
|
|
|
|
Collection<CustomFunction> collection = this.h().b(CustomFunctionData.e).a();
|
|
|
|
Collection<CustomFunction> collection = this.h().b(CustomFunctionData.e).a();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofiler = this.server.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // gameprofiler = this.server.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
minecraftkey = CustomFunctionData.e;
|
|
|
|
|
|
|
|
- gameprofiler.a(minecraftkey::toString);
|
|
|
|
|
|
|
|
+ // gameprofiler.a(minecraftkey::toString); // Akarin - remove caller
|
|
|
|
|
|
|
|
Iterator iterator1 = collection.iterator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (iterator1.hasNext()) {
|
|
|
|
@@ -86,7 +86,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
@@ -86,7 +86,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
this.a(customfunction1, this.f());
|
|
|
|
this.a(customfunction1, this.f());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -148,6 +271,15 @@ index ee42e1dfa4..bd9684c4ed 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -121,7 +121,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
CustomFunctionData.a customfunctiondata_a = (CustomFunctionData.a) this.i.removeFirst();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- this.server.getMethodProfiler().a(customfunctiondata_a::toString);
|
|
|
|
|
|
|
|
+ // this.server.getMethodProfiler().a(customfunctiondata_a::toString); // Akarin - remove caller
|
|
|
|
|
|
|
|
customfunctiondata_a.a(this.i, i);
|
|
|
|
|
|
|
|
if (!this.j.isEmpty()) {
|
|
|
|
|
|
|
|
List list = Lists.reverse(this.j);
|
|
|
|
@@ -132,7 +132,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
@@ -132,7 +132,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
|
|
|
this.j.clear();
|
|
|
|
this.j.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -158,7 +290,7 @@ index ee42e1dfa4..bd9684c4ed 100644
|
|
|
|
|
|
|
|
|
|
|
|
++k;
|
|
|
|
++k;
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
index 9cb4e5a1e6..34aac60312 100644
|
|
|
|
index 9cb4e5a1e6..b290f64fa1 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/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
|
|
|
|
@@ -395,7 +395,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
@@ -188,6 +320,15 @@ index 9cb4e5a1e6..34aac60312 100644
|
|
|
|
if (this.y.g() > 1.0E-7D) {
|
|
|
|
if (this.y.g() > 1.0E-7D) {
|
|
|
|
vec3d = vec3d.h(this.y);
|
|
|
|
vec3d = vec3d.h(this.y);
|
|
|
|
this.y = Vec3D.a;
|
|
|
|
this.y = Vec3D.a;
|
|
|
|
|
|
|
|
@@ -572,7 +572,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
|
|
|
|
// Paper start - ignore movement changes while inactive.
|
|
|
|
|
|
|
|
if (isTemporarilyActive && !(this instanceof EntityItem) && vec3d == getMot() && enummovetype == EnumMoveType.SELF) {
|
|
|
|
|
|
|
|
setMot(Vec3D.a);
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().exit();
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paper end
|
|
|
|
@@ -585,8 +585,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
@@ -585,8 +585,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
this.recalcPosition();
|
|
|
|
this.recalcPosition();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -267,7 +408,7 @@ index 9cb4e5a1e6..34aac60312 100644
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
|
|
index 1991cee43d..e9f00a1e13 100644
|
|
|
|
index 1991cee43d..bb20398abc 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -223,13 +223,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
|
|
@@ -352,7 +493,7 @@ index 1991cee43d..e9f00a1e13 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
index ad474500e2..e93b7b2809 100644
|
|
|
|
index ad474500e2..2848268979 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -242,7 +242,7 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
@@ -450,8 +591,41 @@ index ad474500e2..e93b7b2809 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void n() {
|
|
|
|
private void n() {
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
|
|
|
index cd8df622f0..4f0ae1bc45 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
|
|
|
@@ -825,7 +825,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
|
|
|
double d3 = 8.0D;
|
|
|
|
|
|
|
|
float f2 = f1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- worldserver.getMethodProfiler().enter("moving");
|
|
|
|
|
|
|
|
+ // worldserver.getMethodProfiler().enter("moving"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (worldserver1 == null) { } else // CraftBukkit - empty to fall through to null to event
|
|
|
|
|
|
|
|
if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) {
|
|
|
|
|
|
|
|
this.cr = this.getPositionVector();
|
|
|
|
|
|
|
|
@@ -866,8 +866,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.setPositionRotation(d0, d1, d2, f1, f); // CraftBukkit - PlayerTeleportEvent handles position changes
|
|
|
|
|
|
|
|
- worldserver.getMethodProfiler().exit();
|
|
|
|
|
|
|
|
- worldserver.getMethodProfiler().enter("placing");
|
|
|
|
|
|
|
|
+ // worldserver.getMethodProfiler().exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
+ // worldserver.getMethodProfiler().enter("placing"); // Akarin - remove caller
|
|
|
|
|
|
|
|
double d4 = Math.min(-2.9999872E7D, worldserver1.getWorldBorder().c() + 16.0D);
|
|
|
|
|
|
|
|
double d5 = Math.min(-2.9999872E7D, worldserver1.getWorldBorder().d() + 16.0D);
|
|
|
|
|
|
|
|
double d6 = Math.min(2.9999872E7D, worldserver1.getWorldBorder().e() - 16.0D);
|
|
|
|
|
|
|
|
@@ -938,7 +938,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- worldserver.getMethodProfiler().exit();
|
|
|
|
|
|
|
|
+ // worldserver.getMethodProfiler().exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
// CraftBukkit start - PlayerTeleportEvent
|
|
|
|
|
|
|
|
PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, cause);
|
|
|
|
|
|
|
|
Bukkit.getServer().getPluginManager().callEvent(tpEvent);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
|
|
index 6e0020ae0b..9d94aa135e 100644
|
|
|
|
index 6e0020ae0b..a7a07ffc43 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
|
|
+++ b/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
|
|
|
|
@@ -144,9 +144,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
|
|
@@ -467,7 +641,7 @@ index 6e0020ae0b..9d94aa135e 100644
|
|
|
|
--this.bB;
|
|
|
|
--this.bB;
|
|
|
|
if (this.bB <= 0) {
|
|
|
|
if (this.bB <= 0) {
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
index a353f3d5fa..81e699b404 100644
|
|
|
|
index a353f3d5fa..5f976a17c7 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
@@ -285,7 +285,7 @@ public class Explosion {
|
|
|
|
@@ -285,7 +285,7 @@ public class Explosion {
|
|
|
|
@@ -489,14 +663,20 @@ index a353f3d5fa..81e699b404 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
index 63865f767b..4f0cad71bd 100644
|
|
|
|
index 63865f767b..82aa50bf85 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
@@ -937,13 +937,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -933,18 +933,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
|
|
|
this.nextTick += 50L;
|
|
|
|
|
|
|
|
if (this.T) {
|
|
|
|
|
|
|
|
this.T = false;
|
|
|
|
|
|
|
|
- this.methodProfiler.d().d();
|
|
|
|
|
|
|
|
+ // this.methodProfiler.d().d(); // Akarin - remove caller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.methodProfiler.a();
|
|
|
|
- this.methodProfiler.a();
|
|
|
|
- this.methodProfiler.enter("tick");
|
|
|
|
- this.methodProfiler.enter("tick");
|
|
|
|
|
|
|
|
+ // this.methodProfiler.a(); // Akarin - remove caller
|
|
|
|
+ // this.methodProfiler.enter("tick"); // Akarin - remove caller
|
|
|
|
+ // this.methodProfiler.enter("tick"); // Akarin - remove caller
|
|
|
|
this.a(this::canSleepForTick);
|
|
|
|
this.a(this::canSleepForTick);
|
|
|
|
- this.methodProfiler.exitEnter("nextTickWait");
|
|
|
|
- this.methodProfiler.exitEnter("nextTickWait");
|
|
|
|
@@ -505,10 +685,21 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
|
|
this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
|
|
this.sleepForTick();
|
|
|
|
this.sleepForTick();
|
|
|
|
- this.methodProfiler.exit();
|
|
|
|
- this.methodProfiler.exit();
|
|
|
|
|
|
|
|
- this.methodProfiler.b();
|
|
|
|
+ // this.methodProfiler.exit(); // Akarin - remove caller
|
|
|
|
+ // this.methodProfiler.exit(); // Akarin - remove caller
|
|
|
|
this.methodProfiler.b();
|
|
|
|
+ // this.methodProfiler.b(); // Akarin - remove caller
|
|
|
|
this.hasTicked = true;
|
|
|
|
this.hasTicked = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
@@ -1076,7 +1076,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void c(TickTask ticktask) {
|
|
|
|
|
|
|
|
- this.getMethodProfiler().c("runTask");
|
|
|
|
|
|
|
|
+ // this.getMethodProfiler().c("runTask"); // Akarin - remove caller
|
|
|
|
|
|
|
|
super.executeTask(ticktask);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1148,7 +1148,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -1148,7 +1148,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
//if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
|
|
|
|
//if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
|
|
|
|
//MinecraftServer.LOGGER.debug("Autosave started"); // Paper
|
|
|
|
//MinecraftServer.LOGGER.debug("Autosave started"); // Paper
|
|
|
|
@@ -566,15 +757,21 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
Iterator iterator = this.getWorlds().iterator();
|
|
|
|
Iterator iterator = this.getWorlds().iterator();
|
|
|
|
|
|
|
|
|
|
|
|
// CraftBukkit start
|
|
|
|
// CraftBukkit start
|
|
|
|
@@ -1262,13 +1262,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -1257,9 +1257,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
|
|
|
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
|
|
|
|
|
|
|
TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
|
|
|
|
|
|
|
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
this.methodProfiler.a(() -> {
|
|
|
|
|
|
|
|
return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
/* Drop global time updates
|
|
|
|
/* Drop global time updates
|
|
|
|
if (this.ticks % 20 == 0) {
|
|
|
|
if (this.ticks % 20 == 0) {
|
|
|
|
- this.methodProfiler.enter("timeSync");
|
|
|
|
this.methodProfiler.enter("timeSync");
|
|
|
|
+ //this.methodProfiler.enter("timeSync"); // Akarin - remove caller
|
|
|
|
@@ -1268,7 +1272,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
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 */
|
|
|
|
// CraftBukkit end */
|
|
|
|
|
|
|
|
|
|
|
|
@@ -583,7 +780,7 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
worldserver.timings.doTick.startTiming(); // Spigot
|
|
|
|
worldserver.timings.doTick.startTiming(); // Spigot
|
|
|
|
@@ -1288,17 +1288,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -1288,17 +1292,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
throw new ReportedException(crashreport);
|
|
|
|
throw new ReportedException(crashreport);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -605,7 +802,7 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
|
|
|
this.playerList.tick();
|
|
|
|
this.playerList.tick();
|
|
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
|
|
@@ -1306,7 +1306,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -1306,7 +1310,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
GameTestHarnessTicker.a.b();
|
|
|
|
GameTestHarnessTicker.a.b();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -614,7 +811,7 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
|
|
|
|
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
|
|
@@ -1314,7 +1314,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
@@ -1314,7 +1318,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
|
|
|
|
|
|
|
|
@@ -624,7 +821,7 @@ index 63865f767b..4f0cad71bd 100644
|
|
|
|
|
|
|
|
|
|
|
|
public boolean getAllowNether() {
|
|
|
|
public boolean getAllowNether() {
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
|
|
index dc32107ec3..b763d7f37e 100644
|
|
|
|
index dc32107ec3..cd8a631d7d 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -137,14 +137,14 @@ public abstract class NavigationAbstract {
|
|
|
|
@@ -688,8 +885,69 @@ index 90319909e5..c09c5440b3 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Stream<PathfinderGoalWrapped> c() {
|
|
|
|
public Stream<PathfinderGoalWrapped> c() {
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
|
|
|
index c38d31fafe..e230087620 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
|
|
|
@@ -537,20 +537,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
|
|
|
private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.96; // Spigot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void unloadChunks(BooleanSupplier booleansupplier) {
|
|
|
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try (Timing ignored = this.world.timings.poiUnload.startTiming()) { // Paper
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("poi");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("poi"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.m.a(booleansupplier);
|
|
|
|
|
|
|
|
} // Paper
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("chunk_unload");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("chunk_unload"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (!this.world.isSavingDisabled()) {
|
|
|
|
|
|
|
|
try (Timing ignored = this.world.timings.chunkUnload.startTiming()) { // Paper
|
|
|
|
|
|
|
|
this.b(booleansupplier);
|
|
|
|
|
|
|
|
}// Paper
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void b(BooleanSupplier booleansupplier) {
|
|
|
|
|
|
|
|
@@ -761,7 +761,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
|
|
|
// Paper start - Async chunk io
|
|
|
|
|
|
|
|
final java.util.function.BiFunction<ChunkRegionLoader.InProgressChunkHolder, Throwable, Either<IChunkAccess, PlayerChunk.Failure>> syncLoadComplete = (chunkHolder, ioThrowable) -> {
|
|
|
|
|
|
|
|
try (Timing ignored = this.world.timings.syncChunkLoadTimer.startTimingIfSync()) { // Paper
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().c("chunkLoad");
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().c("chunkLoad"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (ioThrowable != null) {
|
|
|
|
|
|
|
|
com.destroystokyo.paper.io.IOUtil.rethrow(ioThrowable);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -824,9 +824,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.requestingNeighbor = prevNeighbor; // Paper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
this.world.getMethodProfiler().c(() -> {
|
|
|
|
|
|
|
|
return "chunkGenerate " + chunkstatus.d();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
return completablefuture.thenComposeAsync((either) -> {
|
|
|
|
|
|
|
|
return either.map((list) -> { // Paper - Shut up.
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
@@ -1100,7 +1104,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- this.world.getMethodProfiler().c("chunkSave");
|
|
|
|
|
|
|
|
+ // this.world.getMethodProfiler().c("chunkSave"); // Akarin - remove caller
|
|
|
|
|
|
|
|
} // Paper
|
|
|
|
|
|
|
|
try (co.aikar.timings.Timing ignored1 = this.world.timings.chunkSaveDataSerialization.startTiming()) { // Paper
|
|
|
|
|
|
|
|
nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
index 7929fcc800..e1225d5017 100644
|
|
|
|
index 7929fcc800..6dfbbc67dd 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/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 {
|
|
|
|
@@ -185,7 +185,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
|
|
@@ -711,7 +969,7 @@ index 7929fcc800..e1225d5017 100644
|
|
|
|
for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ;
|
|
|
|
for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ;
|
|
|
|
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
|
|
|
|
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
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
|
|
|
index 3f1aa5ced6..af705e6c65 100644
|
|
|
|
index 3f1aa5ced6..a7f2dee2c4 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
|
|
|
+++ b/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> {
|
|
|
|
@@ -65,7 +65,7 @@ public class TickListServer<T> implements TickList<T> {
|
|
|
|
@@ -742,7 +1000,7 @@ index 3f1aa5ced6..af705e6c65 100644
|
|
|
|
this.h.clear();
|
|
|
|
this.h.clear();
|
|
|
|
this.g.clear();
|
|
|
|
this.g.clear();
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
|
|
index 839ddb14ef..9708d61fd3 100644
|
|
|
|
index 839ddb14ef..11629c4ce8 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
|
|
@@ -378,9 +378,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
@@ -378,9 +378,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
@@ -757,11 +1015,330 @@ index 839ddb14ef..9708d61fd3 100644
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
|
|
|
|
@@ -742,9 +742,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void tickBlockEntities() {
|
|
|
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("blockEntities");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("blockEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.tileEntityTick.startTiming(); // Spigot
|
|
|
|
|
|
|
|
if (!this.tileEntityListUnload.isEmpty()) {
|
|
|
|
|
|
|
|
// Paper start - Use alternate implementation with faster contains
|
|
|
|
|
|
|
|
@@ -777,9 +777,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.chunkProvider.a(blockposition) && this.getWorldBorder().a(blockposition)) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
gameprofilerfiller.a(() -> {
|
|
|
|
|
|
|
|
return String.valueOf(TileEntityTypes.a(tileentity.getTileType()));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
tileentity.tickTimer.startTiming(); // Spigot
|
|
|
|
|
|
|
|
if (tileentity.getTileType().isValidBlock(this.getType(blockposition).getBlock())) {
|
|
|
|
|
|
|
|
((ITickable) tileentity).tick();
|
|
|
|
|
|
|
|
@@ -787,7 +791,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
tileentity.v();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
} catch (Throwable throwable) {
|
|
|
|
|
|
|
|
// Paper start - Prevent tile entity and entity crashes
|
|
|
|
|
|
|
|
String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ();
|
|
|
|
|
|
|
|
@@ -823,7 +827,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
timings.tileEntityTick.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
timings.tileEntityPending.startTiming(); // Spigot
|
|
|
|
|
|
|
|
this.tickingTileEntities = false;
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("pendingBlockEntities");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("pendingBlockEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (!this.tileEntityListPending.isEmpty()) {
|
|
|
|
|
|
|
|
for (int i = 0; i < this.tileEntityListPending.size(); ++i) {
|
|
|
|
|
|
|
|
TileEntity tileentity1 = (TileEntity) this.tileEntityListPending.get(i);
|
|
|
|
|
|
|
|
@@ -856,7 +860,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
timings.tileEntityPending.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
co.aikar.timings.TimingHistory.tileEntityTicks += this.tileEntityListTick.size(); // Paper
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
spigotConfig.currentPrimedTnt = 0; // Spigot
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1175,7 +1179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<Entity> getEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super Entity> predicate) {
|
|
|
|
|
|
|
|
- this.getMethodProfiler().c("getEntities");
|
|
|
|
|
|
|
|
+ // this.getMethodProfiler().c("getEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
List<Entity> list = Lists.newArrayList();
|
|
|
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int j = MathHelper.floor((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
@@ -1196,7 +1200,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public <T extends Entity> List<T> a(@Nullable EntityTypes<T> entitytypes, AxisAlignedBB axisalignedbb, Predicate<? super T> predicate) {
|
|
|
|
|
|
|
|
- this.getMethodProfiler().c("getEntities");
|
|
|
|
|
|
|
|
+ // this.getMethodProfiler().c("getEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
@@ -1218,7 +1222,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public <T extends Entity> List<T> a(Class<? extends T> oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super T> predicate) {
|
|
|
|
|
|
|
|
- this.getMethodProfiler().c("getEntities");
|
|
|
|
|
|
|
|
+ // this.getMethodProfiler().c("getEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
@@ -1241,7 +1245,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public <T extends Entity> List<T> b(Class<? extends T> oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super T> predicate) {
|
|
|
|
|
|
|
|
- this.getMethodProfiler().c("getLoadedEntities");
|
|
|
|
|
|
|
|
+ // this.getMethodProfiler().c("getLoadedEntities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
index a0db38b588..03cfc7f0bc 100644
|
|
|
|
index a0db38b588..78fdacdaf1 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
@@ -849,7 +849,7 @@ public class WorldServer extends World {
|
|
|
|
@@ -274,12 +274,12 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void doTick(BooleanSupplier booleansupplier) {
|
|
|
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.ticking = true;
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("world border");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("world border"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.getWorldBorder().s();
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("weather");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("weather"); // Akarin - remove caller
|
|
|
|
|
|
|
|
boolean flag = this.isRaining();
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -418,11 +418,11 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.N();
|
|
|
|
|
|
|
|
this.a();
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("chunkSource");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("chunkSource"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.timings.chunkProviderTick.startTiming(); // Paper - timings
|
|
|
|
|
|
|
|
this.getChunkProvider().tick(booleansupplier);
|
|
|
|
|
|
|
|
this.timings.chunkProviderTick.stopTiming(); // Paper - timings
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("tickPending");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("tickPending"); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.scheduledBlocks.startTiming(); // Spigot
|
|
|
|
|
|
|
|
if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) {
|
|
|
|
|
|
|
|
this.nextTickListBlock.b();
|
|
|
|
|
|
|
|
@@ -431,7 +431,7 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
timings.scheduledBlocks.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getMinecraftServer().midTickLoadChunks(); // Paper
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("raid");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("raid"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.timings.raids.startTiming(); // Paper - timings
|
|
|
|
|
|
|
|
this.persistentRaid.a();
|
|
|
|
|
|
|
|
if (this.mobSpawnerTrader != null) {
|
|
|
|
|
|
|
|
@@ -439,13 +439,13 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.timings.raids.stopTiming(); // Paper - timings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("blockEvents");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("blockEvents"); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.doSounds.startTiming(); // Spigot
|
|
|
|
|
|
|
|
this.ad();
|
|
|
|
|
|
|
|
timings.doSounds.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
this.getMinecraftServer().midTickLoadChunks(); // Paper
|
|
|
|
|
|
|
|
this.ticking = false;
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("entities");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("entities"); // Akarin - remove caller
|
|
|
|
|
|
|
|
boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (flag3) {
|
|
|
|
|
|
|
|
@@ -455,7 +455,7 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
if (flag3 || this.emptyTime++ < 300) {
|
|
|
|
|
|
|
|
timings.tickEntities.startTiming(); // Spigot
|
|
|
|
|
|
|
|
this.worldProvider.j();
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("global");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("global"); // Akarin - remove caller
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Entity entity;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -475,7 +475,7 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("regular");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("regular"); // Akarin - remove caller
|
|
|
|
|
|
|
|
this.tickingEntities = true;
|
|
|
|
|
|
|
|
ObjectIterator objectiterator = this.entitiesById.int2ObjectEntrySet().iterator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -497,12 +497,12 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// CraftBukkit end */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("checkDespawn");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("checkDespawn"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (!entity1.dead) {
|
|
|
|
|
|
|
|
entity1.checkDespawn();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (entity2 != null) {
|
|
|
|
|
|
|
|
if (!entity2.dead && entity2.w(entity1)) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
@@ -511,20 +511,24 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
entity1.stopRiding();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("tick");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("tick"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) {
|
|
|
|
|
|
|
|
this.a(this::entityJoinedWorld, entity1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
gameprofilerfiller.enter("remove");
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
if (entity1.dead) {
|
|
|
|
|
|
|
|
this.removeEntityFromChunk(entity1);
|
|
|
|
|
|
|
|
objectiterator.remove();
|
|
|
|
|
|
|
|
this.unregisterEntity(entity1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
timings.entityTick.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -548,14 +552,14 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Paper - timings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.tickEntities.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
this.getMinecraftServer().midTickLoadChunks(); // Paper
|
|
|
|
|
|
|
|
this.tickBlockEntities();
|
|
|
|
|
|
|
|
this.getMinecraftServer().midTickLoadChunks(); // Paper
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void wakeupPlayers() {
|
|
|
|
|
|
|
|
@@ -574,9 +578,9 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
boolean flag = this.isRaining();
|
|
|
|
|
|
|
|
int j = chunkcoordintpair.d();
|
|
|
|
|
|
|
|
int k = chunkcoordintpair.e();
|
|
|
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
+ // GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("thunder");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("thunder"); // Akarin - remove caller
|
|
|
|
|
|
|
|
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.paperConfig.disableThunder && flag && this.U() && this.randomTickRandom.nextInt(100000) == 0) { // Paper - Disable thunder // Paper - optimise random ticking
|
|
|
|
|
|
|
|
@@ -598,7 +602,7 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("iceandsnow");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exitEnter("iceandsnow"); // Akarin - remove caller
|
|
|
|
|
|
|
|
if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
|
|
|
|
|
|
|
|
// Paper start - optimise chunk ticking
|
|
|
|
|
|
|
|
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
|
|
|
|
|
|
|
@@ -629,7 +633,7 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Paper start - optimise random block ticking
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
int blocks = chunk.tickingList.size();
|
|
|
|
|
|
|
|
if (i > 0 && blocks > 0) {
|
|
|
|
|
|
|
|
if ((this.randomTickRandom.nextInt() & (16 * 16 * 256 - 1)) > blocks) {
|
|
|
|
|
|
|
|
@@ -639,12 +643,12 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
// Note: The number of blocks that get ticked per tick still REMAIN the same.
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("tickBlocks");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("tickBlocks"); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.chunkTicksBlocks.startTiming(); // Paper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int toTick = i << 4; // i * 16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.enter("randomTick");
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.enter("randomTick"); // Akarin - remove caller
|
|
|
|
|
|
|
|
for (int tick = 0; tick < toTick; ++tick) {
|
|
|
|
|
|
|
|
int tickingSize = chunk.tickingList.size();
|
|
|
|
|
|
|
|
if (tickingSize == 0) {
|
|
|
|
|
|
|
|
@@ -669,9 +673,9 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
// TODO CHECK ON UPDATE
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
timings.chunkTicksBlocks.stopTiming(); // Paper
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -785,15 +789,19 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
entity.lastPitch = entity.pitch;
|
|
|
|
|
|
|
|
if (entity.inChunk) {
|
|
|
|
|
|
|
|
++entity.ticksLived;
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gameprofilerfiller.a(() -> {
|
|
|
|
|
|
|
|
return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
gameprofilerfiller.c("tickNonPassenger");
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
entity.tick();
|
|
|
|
|
|
|
|
entity.postTick(); // CraftBukkit
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.chunkCheck(entity);
|
|
|
|
|
|
|
|
@@ -821,14 +829,18 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
entity1.lastPitch = entity1.pitch;
|
|
|
|
|
|
|
|
if (entity1.inChunk) {
|
|
|
|
|
|
|
|
++entity1.ticksLived;
|
|
|
|
|
|
|
|
+ // Akarin start - remove caller
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
|
|
|
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gameprofilerfiller.a(() -> {
|
|
|
|
|
|
|
|
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
gameprofilerfiller.c("tickPassenger");
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
|
|
|
+ // Akarin end
|
|
|
|
|
|
|
|
entity1.passengerTick();
|
|
|
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
|
|
|
+ // gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.chunkCheck(entity1);
|
|
|
|
|
|
|
|
@@ -849,7 +861,7 @@ public class WorldServer extends World {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void chunkCheck(Entity entity) {
|
|
|
|
public void chunkCheck(Entity entity) {
|
|
|
|
@@ -770,7 +1347,7 @@ index a0db38b588..03cfc7f0bc 100644
|
|
|
|
int i = MathHelper.floor(entity.locX() / 16.0D);
|
|
|
|
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 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);
|
|
|
|
int k = MathHelper.floor(entity.locZ() / 16.0D);
|
|
|
|
@@ -866,7 +866,7 @@ public class WorldServer extends World {
|
|
|
|
@@ -866,7 +878,7 @@ public class WorldServer extends World {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|