Remove Spigot timings
This commit is contained in:
@@ -238,14 +238,10 @@
|
||||
if (tileentity != null) {
|
||||
Level world = this.level;
|
||||
|
||||
@@ -549,9 +611,68 @@
|
||||
if (this.postLoad != null) {
|
||||
this.postLoad.run(this);
|
||||
this.postLoad = null;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
@@ -553,6 +615,65 @@
|
||||
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public void loadCallback() {
|
||||
+ // Paper start
|
||||
@@ -283,9 +279,9 @@
|
||||
+ }
|
||||
+ server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||
+ }
|
||||
}
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+
|
||||
+ public void unloadCallback() {
|
||||
+ org.bukkit.Server server = this.level.getCraftServer();
|
||||
+ org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
@@ -302,11 +298,12 @@
|
||||
+ @Override
|
||||
+ public boolean isUnsaved() {
|
||||
+ return super.isUnsaved() && !this.mustNotSave;
|
||||
}
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
+
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
@@ -750,7 +871,7 @@
|
||||
|
||||
private <T extends BlockEntity> void updateBlockEntityTicker(T blockEntity) {
|
||||
@@ -325,22 +322,11 @@
|
||||
this.ticker = blockentityticker;
|
||||
}
|
||||
|
||||
@@ -855,6 +976,7 @@
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push(this::getType);
|
||||
+ this.blockEntity.tickTimer.startTiming(); // Spigot
|
||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||
|
||||
if (this.blockEntity.getType().isValid(iblockdata)) {
|
||||
@@ -872,6 +994,10 @@
|
||||
@@ -872,6 +993,7 @@
|
||||
|
||||
this.blockEntity.fillCrashReportCategory(crashreportsystemdetails);
|
||||
throw new ReportedException(crashreport);
|
||||
+ // Spigot start
|
||||
+ } finally {
|
||||
+ this.blockEntity.tickTimer.stopTiming();
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,31 +132,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -550,12 +576,15 @@
|
||||
@Nullable
|
||||
private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, List<CompoundTag> entities, List<CompoundTag> blockEntities) {
|
||||
return entities.isEmpty() && blockEntities.isEmpty() ? null : (chunk) -> {
|
||||
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
||||
if (!entities.isEmpty()) {
|
||||
world.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(entities, world, EntitySpawnReason.LOAD));
|
||||
}
|
||||
+ world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
|
||||
|
||||
Iterator iterator = blockEntities.iterator();
|
||||
|
||||
+ world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
|
||||
while (iterator.hasNext()) {
|
||||
CompoundTag nbttagcompound = (CompoundTag) iterator.next();
|
||||
boolean flag = nbttagcompound.getBoolean("keepPacked");
|
||||
@@ -571,6 +600,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
|
||||
|
||||
};
|
||||
}
|
||||
@@ -623,6 +653,12 @@
|
||||
@@ -623,6 +649,12 @@
|
||||
StructureStart structurestart = StructureStart.loadStaticStart(context, nbttagcompound1.getCompound(s), worldSeed);
|
||||
|
||||
if (structurestart != null) {
|
||||
|
||||
Reference in New Issue
Block a user