Files
PlazmaBukkitMC/patches/server/0049-Completely-remove-Mojang-profiler.patch
AlphaKR93 0c58a0b04a Fix build
2024-12-26 01:22:49 +09:00

2931 lines
164 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 13:54:02 +0900
Subject: [PATCH] Completely remove Mojang profiler
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index fe9a01e19ef182fb8e9c653fc1232ec7f13037e4..2ef4dc9169a9bec304b4922a2e91c31b966c711d 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -132,7 +132,7 @@ import net.minecraft.server.commands.WorldBorderCommand;
import net.minecraft.server.commands.data.DataCommands;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.tags.TagKey;
-import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.flag.FeatureFlags;
@@ -353,9 +353,11 @@ public class Commands {
// Paper end
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
+ /* // Plazma - Completely remove Mojang profiler
Profiler.get().push(() -> {
return "/" + s;
});
+ */ // Plazma - Completely remove Mojang profiler
ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent
try {
@@ -384,9 +386,10 @@ public class Commands {
commandlistenerwrapper.sendFailure(Component.literal(Util.describeError(exception)));
Commands.LOGGER.error("'/{}' threw an exception", s, exception);
}
- } finally {
+ } /*finally { // Plazma - Completely remove Mojang profiler
Profiler.get().pop();
}
+ */ // Plazma - Completely remove Mojang profiler
}
@@ -448,7 +451,7 @@ public class Commands {
int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT);
try {
- ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j, Profiler.get());
+ ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j/*, Profiler.get()*/); // Plazma - Completely remove Mojang profiler
try {
Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1);
diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..316fad1e5af6f9bbc1f8b8c8ff0422ded29afedd 100644
--- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
+++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
@@ -12,7 +12,7 @@ import net.minecraft.commands.ExecutionCommandSource;
import net.minecraft.commands.execution.tasks.BuildContexts;
import net.minecraft.commands.execution.tasks.CallFunction;
import net.minecraft.commands.functions.InstantiatedFunction;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
public class ExecutionContext<T> implements AutoCloseable {
@@ -20,7 +20,7 @@ public class ExecutionContext<T> implements AutoCloseable {
private static final Logger LOGGER = LogUtils.getLogger();
private final int commandLimit;
private final int forkLimit;
- private final ProfilerFiller profiler;
+ //private final ProfilerFiller profiler; // Plazma - Completely remove Mojang profiler
@Nullable
private TraceCallbacks tracer;
private int commandQuota;
@@ -29,10 +29,10 @@ public class ExecutionContext<T> implements AutoCloseable {
private final List<CommandQueueEntry<T>> newTopCommands = new ObjectArrayList<>();
private int currentFrameDepth;
- public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount, ProfilerFiller profiler) {
+ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
this.commandLimit = maxCommandChainLength;
this.forkLimit = maxCommandForkCount;
- this.profiler = profiler;
+ //this.profiler = profiler; // Plazma - Completely remove Mojang profiler
this.commandQuota = maxCommandChainLength;
}
@@ -129,9 +129,11 @@ public class ExecutionContext<T> implements AutoCloseable {
return this.tracer;
}
+ /* // Plazma - Completely remove Mojang profiler
public ProfilerFiller profiler() {
return this.profiler;
}
+ */ // Plazma - Completely remove Mojang profiler
public int forkLimit() {
return this.forkLimit;
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
index 9f5c3ec2eae9b30bdb8dbcb328d7f701cb7aeb9d..16de7288702aa7e4b0225d4eb1f3cd81289d9176 100644
--- a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
+++ b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
@@ -42,52 +42,48 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
ChainModifiers chainModifiers = flags;
List<T> list = sources;
if (contextChain.getStage() != Stage.EXECUTE) {
- context.profiler().push(() -> "prepare " + this.commandInput);
+ // Plazma start - Completely remove Mojang profiler
+ for (int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
+ CommandContext<T> commandContext = contextChain.getTopContext();
+ if (commandContext.isForked()) {
+ chainModifiers = chainModifiers.setForked();
+ }
- try {
- for (int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
- CommandContext<T> commandContext = contextChain.getTopContext();
- if (commandContext.isForked()) {
- chainModifiers = chainModifiers.setForked();
- }
+ RedirectModifier<T> redirectModifier = commandContext.getRedirectModifier();
+ if (redirectModifier instanceof CustomModifierExecutor customModifierExecutor) { // Purpur - decompile error
+ customModifierExecutor.apply(baseSource, list, contextChain, chainModifiers, ExecutionControl.create(context, frame));
+ return;
+ }
- RedirectModifier<T> redirectModifier = commandContext.getRedirectModifier();
- if (redirectModifier instanceof CustomModifierExecutor customModifierExecutor) { // Purpur - decompile error
- customModifierExecutor.apply(baseSource, list, contextChain, chainModifiers, ExecutionControl.create(context, frame));
- return;
- }
+ if (redirectModifier != null) {
+ context.incrementCost();
+ boolean bl = chainModifiers.isForked();
+ List<T> list2 = new ObjectArrayList<>();
+
+ for (T executionCommandSource : list) {
+ try {
+ Collection<T> collection = ContextChain.runModifier(
+ commandContext, executionCommandSource, (contextx, successful, returnValue) -> {
+ }, bl
+ );
+ if (list2.size() + collection.size() >= i) {
+ baseSource.handleError(ERROR_FORK_LIMIT_REACHED.create(i), bl, context.tracer());
+ return;
+ }
- if (redirectModifier != null) {
- context.incrementCost();
- boolean bl = chainModifiers.isForked();
- List<T> list2 = new ObjectArrayList<>();
-
- for (T executionCommandSource : list) {
- try {
- Collection<T> collection = ContextChain.runModifier(
- commandContext, executionCommandSource, (contextx, successful, returnValue) -> {
- }, bl
- );
- if (list2.size() + collection.size() >= i) {
- baseSource.handleError(ERROR_FORK_LIMIT_REACHED.create(i), bl, context.tracer());
- return;
- }
-
- list2.addAll(collection);
- } catch (CommandSyntaxException var20) {
- executionCommandSource.handleError(var20, bl, context.tracer());
- if (!bl) {
- return;
- }
+ list2.addAll(collection);
+ } catch (CommandSyntaxException var20) {
+ executionCommandSource.handleError(var20, bl, context.tracer());
+ if (!bl) {
+ return;
}
}
-
- list = list2;
}
+
+ list = list2;
}
- } finally {
- context.profiler().pop();
}
+ // Plazma end - Completely remove Mojang profiler
}
if (list.isEmpty()) {
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
index e9775b4506909bee65a74964f0d5391a0513de1d..a72bf8986d7f93dc0b3d8830c17745cfe93001be 100644
--- a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
+++ b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
@@ -23,7 +23,7 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
@Override
public void execute(T executionCommandSource, ExecutionContext<T> executionContext, Frame frame) {
- executionContext.profiler().push(() -> "execute " + this.commandInput);
+ //executionContext.profiler().push(() -> "execute " + this.commandInput); // Plazma - Completely remove Mojang profiler
try {
executionContext.incrementCost();
@@ -36,8 +36,9 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
}
} catch (CommandSyntaxException var9) {
executionCommandSource.handleError(var9, this.modifiers.isForked(), executionContext.tracer());
- } finally {
+ } /*finally { // Plazma - Completely remove Mojang profiler
executionContext.profiler().pop();
}
+ */ // Plazma - Completely remove Mojang profiler
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3e0d878c3b3dcefb8f223bc93a5fc6d594998565..f8377d6165f77bc19b904ca81a0c4aa139e728b0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -111,19 +111,19 @@ import net.minecraft.util.datafix.DataFixers;
import net.minecraft.util.debugchart.RemoteDebugSampleType;
import net.minecraft.util.debugchart.SampleLogger;
import net.minecraft.util.debugchart.TpsDebugDimensions;
-import net.minecraft.util.profiling.EmptyProfileResults;
-import net.minecraft.util.profiling.ProfileResults;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
-import net.minecraft.util.profiling.ResultField;
-import net.minecraft.util.profiling.SingleTickProfiler;
+//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.util.profiling.jfr.callback.ProfiledDuration;
-import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder;
-import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder;
-import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder;
-import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider;
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
+//import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
import net.minecraft.world.Difficulty;
import net.minecraft.world.RandomSequences;
@@ -229,13 +229,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public LevelStorageSource.LevelStorageAccess storageSource;
public final PlayerDataStorage playerDataStorage;
private final List<Runnable> tickables = Lists.newArrayList();
- private MetricsRecorder metricsRecorder;
- private Consumer<ProfileResults> onMetricsRecordingStopped;
- private Consumer<Path> onMetricsRecordingFinished;
- private boolean willStartRecordingMetrics;
- @Nullable
- private MinecraftServer.TimeProfiler debugCommandProfiler;
- private boolean debugCommandProfilerDelayStart;
+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang profiler
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove Mojang profiler
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove Mojang profiler
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang profiler
+ //@Nullable // Plazma - Completely remove Mojang profiler
+ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang profiler
+ //private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang profiler
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@Nullable
@@ -435,12 +435,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
SERVER = this; // Paper - better singleton
- this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
+ //this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; // Plazma - Completely remove Mojang profiler
+ /* // Plazma - Completely remove Mojang profiler
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
this.stopRecordingMetrics();
};
this.onMetricsRecordingFinished = (path) -> {
};
+ */ // Plazma - Completely remove Mojang profiler
this.random = RandomSource.create();
this.port = -1;
this.levels = Maps.newLinkedHashMap();
@@ -1055,9 +1057,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Paper
// Paper end
// CraftBukkit end
+ /* // Plazma - Completely remove Mojang profiler
if (this.metricsRecorder.isRecording()) {
this.cancelRecordingMetrics();
}
+ */ // Plazma - Completely remove Mojang profiler
MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -1353,70 +1357,44 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
boolean flag = i == 0L;
+ /* // Plazma - Completely remove Mojang profiler
if (this.debugCommandProfilerDelayStart) {
this.debugCommandProfilerDelayStart = false;
- this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
+ //this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
+ */ // Plazma - Completely remove Mojang profiler
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
lastTick = currentTime;
this.nextTickTimeNanos += i;
- try {
- Profiler.Scope profiler_a = Profiler.use(this.createProfiler());
-
- try {
- ProfilerFiller gameprofilerfiller = Profiler.get();
-
- gameprofilerfiller.push("tick");
- this.tickFrame.start();
- this.tickServer(flag ? () -> {
- return false;
- } : this::haveTime);
- // Paper start - rewrite chunk system
- final Throwable crash = this.chunkSystemCrash;
- if (crash != null) {
- this.chunkSystemCrash = null;
- throw new RuntimeException("Chunk system crash propagated to tick()", crash);
- }
- // Paper end - rewrite chunk system
- this.tickFrame.end();
- gameprofilerfiller.popPush("nextTickWait");
- this.mayHaveDelayedTasks = true;
- this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
- // Pufferfish start - tps catchup
- if (!org.purpurmc.purpur.PurpurConfig.tpsCatchup || !gg.pufferfish.pufferfish.PufferfishConfig.tpsCatchup) { // Purpur
- this.nextTickTimeNanos = currentTime + i;
- this.delayedTasksMaxNextTickTimeNanos = nextTickTimeNanos;
- }
- // Pufferfish end
- this.startMeasuringTaskExecutionTime();
- this.waitUntilNextTick();
- this.finishMeasuringTaskExecutionTime();
- if (flag) {
- this.tickRateManager.endTickWork();
- }
-
- gameprofilerfiller.pop();
- this.logFullTickTime();
- } catch (Throwable throwable) {
- if (profiler_a != null) {
- try {
- profiler_a.close();
- } catch (Throwable throwable1) {
- throwable.addSuppressed(throwable1);
- }
- }
-
- throw throwable;
- }
-
- if (profiler_a != null) {
- profiler_a.close();
- }
- } finally {
- this.endMetricsRecordingTick();
+ // Plazma start - Completely remove Mojang profiler
+ this.tickFrame.start();
+ this.tickServer(flag ? () -> false : this::haveTime);
+ // Paper start - rewrite chunk system
+ final Throwable crash = this.chunkSystemCrash;
+ if (crash != null) {
+ this.chunkSystemCrash = null;
+ throw new RuntimeException("Chunk system crash propagated to tick()", crash);
+ }
+ // Paper end - rewrite chunk system
+ this.tickFrame.end();
+
+ this.mayHaveDelayedTasks = true;
+ this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
+ // Pufferfish start - tps catchup
+ if (!org.purpurmc.purpur.PurpurConfig.tpsCatchup) { // Purpur // Plazma - nice code purpur
+ this.nextTickTimeNanos = currentTime + i;
+ this.delayedTasksMaxNextTickTimeNanos = nextTickTimeNanos;
}
+ // Pufferfish end
+ this.startMeasuringTaskExecutionTime();
+ this.waitUntilNextTick();
+ this.finishMeasuringTaskExecutionTime();
+ if (flag) this.tickRateManager.endTickWork();
+
+ this.logFullTickTime();
+ // Plazma end - Completely remove Mojang profiler
this.isReady = true;
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
@@ -1623,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
- Profiler.get().incrementCounter("runTask");
+ //Profiler.get().incrementCounter("runTask"); // Plazma - Completely remove Mojang profiler
super.doRunTask(ticktask);
}
@@ -1722,12 +1700,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
--this.ticksUntilAutosave;
// Paper start - Incremental chunk and player saving
- final ProfilerFiller profiler = Profiler.get();
+ //final ProfilerFiller profiler = Profiler.get(); // Plazma - Completely remove Mojang profiler
int playerSaveInterval = io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.rate;
if (playerSaveInterval < 0) {
playerSaveInterval = autosavePeriod;
}
- profiler.push("save");
+ //profiler.push("save"); // Plazma - Completely remove Mojang profiler
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
@@ -1742,10 +1720,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
- profiler.pop();
+ //profiler.pop(); // Plazma - Completely remove Mojang profiler
// Paper end - Incremental chunk and player saving
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
this.server.spark.executeMainThreadTasks(); // Paper - spark
@@ -1755,7 +1733,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
// Paper end - Server Tick Events
this.server.spark.tickEnd(((double)(endTime - lastTick) / 1000000D)); // Paper - spark
- gameprofilerfiller.push("tallying");
+ //gameprofilerfiller.push("tallying"); // Plazma - Completely remove Mojang profiler
long k = Util.getNanos() - i;
int l = this.tickCount % 100;
@@ -1769,17 +1747,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickTimes60s.add(this.tickCount, k);
// Paper end - Add tick times API and /mspt command
this.logTickMethodTime(i);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
private void autoSave() {
this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
MinecraftServer.LOGGER.debug("Autosave started");
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("save");
+ //gameprofilerfiller.push("save"); // Plazma - Completely remove Mojang profiler
this.saveEverything(true, false, false);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
MinecraftServer.LOGGER.debug("Autosave finished");
}
@@ -1848,7 +1826,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
protected void tickChildren(BooleanSupplier shouldKeepTicking) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
@@ -1869,9 +1847,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
- gameprofilerfiller.push("commandFunctions");
+ //gameprofilerfiller.push("commandFunctions"); // Plazma - Completely remove Mojang profiler
this.getFunctions().tick();
- gameprofilerfiller.popPush("levels");
+ //gameprofilerfiller.popPush("levels"); // Plazma - Completely remove Mojang profiler
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
// CraftBukkit start
@@ -1910,11 +1888,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.updateLagCompensationTick(); // Paper - lag compensation
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur - Ridables
+ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
return s + " " + String.valueOf(worldserver.dimension().location());
});
+ */ // Plazma - Completely remove Mojang profiler
/* Drop global time updates
if (this.tickCount % 20 == 0) {
gameprofilerfiller.push("timeSync");
@@ -1923,7 +1903,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end */
- gameprofilerfiller.push("tick");
+ //gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profiler
try {
worldserver.tick(shouldKeepTicking);
@@ -1934,27 +1914,27 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport);
}
- gameprofilerfiller.pop();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
}
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
- gameprofilerfiller.popPush("connection");
+ //gameprofilerfiller.popPush("connection"); // Plazma - Completely remove Mojang profiler
this.tickConnection();
- gameprofilerfiller.popPush("players");
+ //gameprofilerfiller.popPush("players"); // Plazma - Completely remove Mojang profiler
this.playerList.tick();
if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
GameTestTicker.SINGLETON.tick();
}
- gameprofilerfiller.popPush("server gui refresh");
+ //gameprofilerfiller.popPush("server gui refresh"); // Plazma - Completely remove Mojang profiler
for (int i = 0; i < this.tickables.size(); ++i) {
((Runnable) this.tickables.get(i)).run();
}
- gameprofilerfiller.popPush("send chunks");
+ //gameprofilerfiller.popPush("send chunks"); // Plazma - Completely remove Mojang profiler
iterator = this.playerList.getPlayers().iterator();
while (iterator.hasNext()) {
@@ -1964,7 +1944,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.resumeFlushing();
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
public void tickConnection() {
@@ -1976,9 +1956,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void forceTimeSynchronization() {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("timeSync");
+ //gameprofilerfiller.push("timeSync"); // Plazma - Completely remove Mojang profiler
Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1987,7 +1967,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver);
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
public boolean isLevelEnabled(Level world) {
@@ -2940,20 +2920,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end
+ /* // Plazma - Completely remove Mojang profiler
private ProfilerFiller createProfiler() {
- if (gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE;
- if (this.willStartRecordingMetrics) {
- this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, true /*this.isDedicatedServer()*/), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> { // Plazma - Remove persist 'isClientSide' flag
- this.executeBlocking(() -> {
- this.saveDebugReport(path.resolve("server"));
- });
- this.onMetricsRecordingFinished.accept(path);
- });
- this.willStartRecordingMetrics = false;
- }
-
- this.metricsRecorder.startTick();
- return SingleTickProfiler.decorateFiller(this.metricsRecorder.getProfiler(), SingleTickProfiler.createTickProfiler("Server"));
+ throw new UnsupportedOperationException("Profiler not supported"); // Plazma - compiler fix
}
public void endMetricsRecordingTick() {
@@ -2984,6 +2953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void cancelRecordingMetrics() {
this.metricsRecorder.cancel();
}
+ */ // Plazma - Completely remove Mojang profiler
public Path getWorldPath(LevelResource worldSavePath) {
return this.storageSource.getLevelPath(worldSavePath);
@@ -3034,6 +3004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.isSaving;
}
+ /* // Plazma - Completely remove Mojang profiler
public boolean isTimeProfilerRunning() {
return this.debugCommandProfilerDelayStart || this.debugCommandProfiler != null;
}
@@ -3052,6 +3023,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return methodprofilerresults;
}
}
+ */ // Plazma - Completely remove Mojang profiler
public int getMaxChainedNeighborUpdates() {
return 1000000;
@@ -3165,6 +3137,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
+ /* // Plazma - Completely remove Mojang profiler
private static class TimeProfiler {
final long startNanos;
@@ -3214,6 +3187,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
+ */ // Plazma - Completely remove Mojang profiler
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
index debd90fda75048f5352e7cddaeeb8121ed74b19c..a8550b8e9fe653064ee114747647bda688359bf3 100644
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
@@ -18,7 +18,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
import net.minecraft.util.ProblemReporter;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
// CraftBukkit start
@@ -37,7 +37,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener<A
this.registries = registries;
}
- protected void apply(Map<ResourceLocation, Advancement> prepared, ResourceManager manager, ProfilerFiller profiler) {
+ protected void apply(Map<ResourceLocation, Advancement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
Builder<ResourceLocation, AdvancementHolder> builder = ImmutableMap.builder();
prepared.forEach((minecraftkey, advancement) -> {
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
index 0b348f701b61c7b7ed0190eff8b2d73f3a3d5c74..c7f64b3aed44591d282760785ee9c83b93bd6e32 100644
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
@@ -16,8 +16,8 @@ import net.minecraft.commands.functions.CommandFunction;
import net.minecraft.commands.functions.InstantiatedFunction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
public class ServerFunctionManager {
@@ -54,10 +54,10 @@ public class ServerFunctionManager {
}
private void executeTagFunctions(Collection<CommandFunction<CommandSourceStack>> functions, ResourceLocation label) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
Objects.requireNonNull(label);
- gameprofilerfiller.push(label::toString);
+ //gameprofilerfiller.push(label::toString); // Plazma - Completely remove Mojang profiler
Iterator iterator = functions.iterator();
while (iterator.hasNext()) {
@@ -66,15 +66,17 @@ public class ServerFunctionManager {
this.execute(commandfunction, this.getGameLoopSender());
}
- Profiler.get().pop();
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
}
public void execute(CommandFunction<CommandSourceStack> function, CommandSourceStack source) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
return "function " + String.valueOf(function.id());
});
+ */ // Plazma - Completely remove Mojang profiler
try {
InstantiatedFunction<CommandSourceStack> instantiatedfunction = function.instantiate((CompoundTag) null, this.getDispatcher());
@@ -86,9 +88,9 @@ public class ServerFunctionManager {
;
} catch (Exception exception) {
ServerFunctionManager.LOGGER.warn("Failed to execute function {}", function.id(), exception);
- } finally {
+ } /*finally { // Plazma - Completely remove Mojang profiler
gameprofilerfiller.pop();
- }
+ }*/ // Plazma - Completely remove Mojang profiler
}
diff --git a/src/main/java/net/minecraft/server/commands/DebugCommand.java b/src/main/java/net/minecraft/server/commands/DebugCommand.java
index c3374d11753d8cd152784727bf7ed08d18931136..d343e463363aeb4307ce0dcf24784ebc322bf7aa 100644
--- a/src/main/java/net/minecraft/server/commands/DebugCommand.java
+++ b/src/main/java/net/minecraft/server/commands/DebugCommand.java
@@ -35,8 +35,9 @@ import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.TimeUtil;
-import net.minecraft.util.profiling.ProfileResults;
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
import org.apache.commons.io.IOUtils;
+import org.bukkit.command.CommandSender;
import org.slf4j.Logger;
public class DebugCommand {
@@ -52,8 +53,8 @@ public class DebugCommand {
dispatcher.register(
Commands.literal("debug")
.requires(source -> source.hasPermission(3))
- .then(Commands.literal("start").executes(context -> start(context.getSource())))
- .then(Commands.literal("stop").executes(context -> stop(context.getSource())))
+ //.then(Commands.literal("start").executes(context -> start(context.getSource()))) // Plazma - Completely remove Mojang profiler
+ //.then(Commands.literal("stop").executes(context -> stop(context.getSource()))) // Plazma - Completely remove Mojang profiler
.then(
Commands.literal("function")
.requires(source -> source.hasPermission(3))
@@ -66,6 +67,7 @@ public class DebugCommand {
);
}
+ /* // Plazma - Completely remove Mojang profiler
private static int start(CommandSourceStack source) throws CommandSyntaxException {
MinecraftServer minecraftServer = source.getServer();
if (minecraftServer.isTimeProfilerRunning()) {
@@ -97,6 +99,7 @@ public class DebugCommand {
return (int)e;
}
}
+ */ // Plazma - Completely remove Mojang profiler
static class TraceCustomExecutor
extends CustomCommandExecutor.WithErrorHandling<CommandSourceStack>
diff --git a/src/main/java/net/minecraft/server/commands/PerfCommand.java b/src/main/java/net/minecraft/server/commands/PerfCommand.java
index 8c587f829c5e8c6b6df3150024c4ae704988c47b..818c6730aeed88438cd77289a8aa5c5726a1fe0f 100644
--- a/src/main/java/net/minecraft/server/commands/PerfCommand.java
+++ b/src/main/java/net/minecraft/server/commands/PerfCommand.java
@@ -19,9 +19,9 @@ import net.minecraft.network.chat.Component;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.FileZipper;
import net.minecraft.util.TimeUtil;
-import net.minecraft.util.profiling.EmptyProfileResults;
-import net.minecraft.util.profiling.ProfileResults;
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
+//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profiler
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
@@ -36,11 +36,12 @@ public class PerfCommand {
dispatcher.register(
Commands.literal("perf")
.requires(source -> source.hasPermission(4))
- .then(Commands.literal("start").executes(context -> startProfilingDedicatedServer(context.getSource())))
- .then(Commands.literal("stop").executes(context -> stopProfilingDedicatedServer(context.getSource())))
+ //.then(Commands.literal("start").executes(context -> startProfilingDedicatedServer(context.getSource()))) // Plazma - Completely remove Mojang profiler
+ //.then(Commands.literal("stop").executes(context -> stopProfilingDedicatedServer(context.getSource()))) // Plazma - Completely remove Mojang profiler
);
}
+ /* // Plazma - Completely remove Mojang profiler
private static int startProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
MinecraftServer minecraftServer = source.getServer();
if (minecraftServer.isRecordingMetrics()) {
@@ -104,4 +105,5 @@ public class PerfCommand {
);
}
}
+ */ // Plazma - Completely remove Mojang profiler
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java b/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
index 7ea8c13c9993576c1408e710d3ceb9947b09090d..6db0eb0c3f7190840c39bd5ca1027f60c40948f4 100644
--- a/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
+++ b/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
@@ -5,8 +5,8 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Nullable;
import net.minecraft.util.StaticCache2D;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.Zone;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.Zone; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.status.ChunkDependencies;
@@ -67,7 +67,7 @@ public class ChunkGenerationTask {
chunkStatus = ChunkStatus.getStatusList().get(this.scheduledStatus.getIndex() + 1);
}
- this.scheduleLayer(chunkStatus, this.needsGeneration);
+ //this.scheduleLayer(chunkStatus, this.needsGeneration); // Plazma - Completely remove Mojang profiler
this.scheduledStatus = chunkStatus;
}
@@ -112,6 +112,7 @@ public class ChunkGenerationTask {
return this.cache.get(this.pos.x, this.pos.z);
}
+ /* // Plazma - Completely remove Mojang profiler
private void scheduleLayer(ChunkStatus targetStatus, boolean allowGeneration) {
try (Zone zone = Profiler.get().zone("scheduleLayer")) {
zone.addText(targetStatus::getName);
@@ -127,6 +128,7 @@ public class ChunkGenerationTask {
}
}
}
+ */ // Plazma - Completely remove Mojang profiler
private int getRadiusForLayer(ChunkStatus status, boolean generate) {
ChunkPyramid chunkPyramid = generate ? ChunkPyramid.GENERATION_PYRAMID : ChunkPyramid.LOADING_PYRAMID;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index cfeeddf2cb4ff50dbc29c6913e78ca1dee076790..af7d150e77001c514e306b4fb1369aae0569d494 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -65,8 +65,8 @@ import net.minecraft.server.network.ServerPlayerConnection;
import net.minecraft.util.CsvOutput;
import net.minecraft.util.Mth;
import net.minecraft.util.StaticCache2D;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.util.thread.BlockableEventLoop;
import net.minecraft.util.thread.ConsecutiveExecutor;
import net.minecraft.world.entity.Entity;
@@ -406,16 +406,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
protected void tick(BooleanSupplier shouldKeepTicking) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("poi");
+ //gameprofilerfiller.push("poi"); // Plazma - Completely remove Mojang profiler
this.poiManager.tick(shouldKeepTicking);
- gameprofilerfiller.popPush("chunk_unload");
+ //gameprofilerfiller.popPush("chunk_unload"); // Plazma - Completely remove Mojang profiler
if (!this.level.noSave()) {
this.processUnloads(shouldKeepTicking);
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
public boolean hasWork() {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index aea9a45c0916501f71018d3250b56da435f5664e..a84faa2e82a8d33b7bfe71f174f2913b585d99e8 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -26,8 +26,8 @@ import net.minecraft.network.protocol.Packet;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.progress.ChunkProgressListener;
import net.minecraft.util.VisibleForDebug;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.thread.BlockableEventLoop;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.ai.village.poi.PoiManager;
@@ -446,6 +446,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().chunkHolderManager.close(save, true); // Paper - rewrite chunk system
}
+ /* // Plazma - Completely remove Mojang profiler
// CraftBukkit start - modelled on below
public void purgeUnload() {
if (true) return; // Paper - rewrite chunk system
@@ -460,27 +461,28 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.clearCache();
}
// CraftBukkit end
+ */ // Plazma - Completely remove Mojang profiler
@Override
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("purge");
+ //gameprofilerfiller.push("purge"); // Plazma - Completely remove Mojang profiler
if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
this.distanceManager.purgeStaleTickets();
}
this.runDistanceManagerUpdates();
- gameprofilerfiller.popPush("chunks");
+ //gameprofilerfiller.popPush("chunks"); // Plazma - Completely remove Mojang profiler
if (tickChunks) {
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
this.tickChunks();
this.chunkMap.tick();
}
- gameprofilerfiller.popPush("unload");
+ //gameprofilerfiller.popPush("unload"); // Plazma - Completely remove Mojang profiler
this.chunkMap.tick(shouldKeepTicking);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.clearCache();
}
@@ -490,29 +492,29 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("pollingChunks");
+ //gameprofilerfiller.push("pollingChunks"); // Plazma - Completely remove Mojang profiler
if (this.level.tickRateManager().runsNormally()) {
List<LevelChunk> list = this.tickingChunks;
try {
- gameprofilerfiller.push("filteringTickingChunks");
+ //gameprofilerfiller.push("filteringTickingChunks"); // Plazma - Completely remove Mojang profiler
this.collectTickingChunks(list);
- gameprofilerfiller.popPush("shuffleChunks");
+ //gameprofilerfiller.popPush("shuffleChunks"); // Plazma - Completely remove Mojang profiler
// Paper start - chunk tick iteration optimisation
this.shuffleRandom.setSeed(this.level.random.nextLong());
if (!this.level.paperConfig().entities.spawning.perPlayerMobSpawns) Util.shuffle(list, this.shuffleRandom); // Paper - Optional per player mob spawns; do not need this when per-player is enabled
// Paper end - chunk tick iteration optimisation
- this.tickChunks(gameprofilerfiller, j, list);
- gameprofilerfiller.pop();
+ this.tickChunks(/*gameprofilerfiller,*/ j, list); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
} finally {
list.clear();
}
}
- this.broadcastChangedChunks(gameprofilerfiller);
- gameprofilerfiller.pop();
+ this.broadcastChangedChunks(/*gameprofilerfiller*/); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
// Pufferfish start - optimize mob spawning
@@ -553,8 +555,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Pufferfish end
}
- private void broadcastChangedChunks(ProfilerFiller profiler) {
- profiler.push("broadcast");
+ private void broadcastChangedChunks(/*ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
+ //profiler.push("broadcast"); // Plazma - Completely remove Mojang profiler
Iterator iterator = this.chunkHoldersToBroadcast.iterator();
while (iterator.hasNext()) {
@@ -567,7 +569,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
this.chunkHoldersToBroadcast.clear();
- profiler.pop();
+ //profiler.pop(); // Plazma - Completely remove Mojang profiler
}
private void collectTickingChunks(List<LevelChunk> chunks) {
@@ -593,8 +595,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Paper end - chunk tick iteration optimisation
}
- private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
- profiler.popPush("naturalSpawnCount");
+ private void tickChunks(/*ProfilerFiller profiler,*/ long timeDelta, List<LevelChunk> chunks) {
+ //profiler.popPush("naturalSpawnCount"); // Plazma - Completely remove Mojang profiler
int j = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
final int naturalSpawnChunkCount = j;
@@ -626,7 +628,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Paper end - Optional per player mob spawns
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
- profiler.popPush("spawnAndTick");
+ //profiler.popPush("spawnAndTick"); // Plazma - Completely remove Mojang profiler
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
List list1;
@@ -663,7 +665,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}
- profiler.popPush("customSpawners");
+ //profiler.popPush("customSpawners"); // Plazma - Completely remove Mojang profiler
if (flag) {
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
}
@@ -861,7 +863,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override
protected void doRunTask(Runnable task) {
- Profiler.get().incrementCounter("runTask");
+ //Profiler.get().incrementCounter("runTask"); // Plazma - Completely remove Mojang profiler
super.doRunTask(task);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index df0f52ee12eeab816c8920d6844a284239143054..518b9feb5e2494e52fe9719ddc22dce7da4db0fb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -80,8 +80,8 @@ import net.minecraft.util.ProgressListener;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
import net.minecraft.util.datafix.DataFixTypes;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
@@ -749,18 +749,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
public void tick(BooleanSupplier shouldKeepTicking) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
this.handlingTick = true;
TickRateManager tickratemanager = this.tickRateManager();
boolean flag = tickratemanager.runsNormally();
if (flag) {
- gameprofilerfiller.push("world border");
+ //gameprofilerfiller.push("world border"); // Plazma - Completely remove Mojang profiler
this.getWorldBorder().tick();
- gameprofilerfiller.popPush("weather");
+ //gameprofilerfiller.popPush("weather"); // Plazma - Completely remove Mojang profiler
this.advanceWeatherCycle();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
@@ -791,30 +791,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.tickTime();
}
- gameprofilerfiller.push("tickPending");
+ //gameprofilerfiller.push("tickPending"); // Plazma - Completely remove Mojang profiler
if (!this.isDebug() && flag) {
j = this.getGameTime();
- gameprofilerfiller.push("blockTicks");
+ //gameprofilerfiller.push("blockTicks"); // Plazma - Completely remove Mojang profiler
this.blockTicks.tick(j, paperConfig().environment.maxBlockTicks, this::tickBlock); // Paper - configurable max block ticks
- gameprofilerfiller.popPush("fluidTicks");
+ //gameprofilerfiller.popPush("fluidTicks"); // Plazma - Completely remove Mojang profiler
this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
- gameprofilerfiller.popPush("raid");
+ //gameprofilerfiller.popPush("raid"); // Plazma - Completely remove Mojang profiler
if (flag) {
this.raids.tick();
}
- gameprofilerfiller.popPush("chunkSource");
+ //gameprofilerfiller.popPush("chunkSource"); // Plazma - Completely remove Mojang profiler
this.getChunkSource().tick(shouldKeepTicking, true);
- gameprofilerfiller.popPush("blockEvents");
+ //gameprofilerfiller.popPush("blockEvents"); // Plazma - Completely remove Mojang profiler
if (flag) {
this.runBlockEvents();
}
this.handlingTick = false;
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this
if (flag1) {
@@ -822,11 +822,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
if (flag1 || this.emptyTime++ < 300) {
- gameprofilerfiller.push("entities");
+ //gameprofilerfiller.push("entities"); // Plazma - Completely remove Mojang profiler
if (this.dragonFight != null && flag) {
- gameprofilerfiller.push("dragonFight");
+ //gameprofilerfiller.push("dragonFight"); // Plazma - Completely remove Mojang profiler
this.dragonFight.tick();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@@ -834,9 +834,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.activatedPriorityReset = false; // Pufferfish - DAB
if (!entity.isRemoved()) {
if (!tickratemanager.isEntityFrozen(entity)) {
- gameprofilerfiller.push("checkDespawn");
+ //gameprofilerfiller.push("checkDespawn"); // Plazma - Completely remove Mojang profiler
entity.checkDespawn();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
if (true) { // Paper - rewrite chunk system
Entity entity1 = entity.getVehicle();
@@ -848,7 +848,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.stopRiding();
}
- gameprofilerfiller.push("tick");
+ //gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profiler
// Pufferfish start - copied from this.guardEntityTick
try {
this.tickNonPassenger(entity); // Pufferfish - changed
@@ -863,18 +863,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
this.moonrise$midTickTasks(); // Paper - rewrite chunk system
// Pufferfish end
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
}
}
});
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.tickBlockEntities();
}
- gameprofilerfiller.push("entityManagement");
+ //gameprofilerfiller.push("entityManagement"); // Plazma - Completely remove Mojang profiler
// Paper - rewrite chunk system
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
@Override
@@ -890,9 +890,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
long i = this.levelData.getGameTime() + 1L;
this.serverLevelData.setGameTime(i);
- Profiler.get().push("scheduledFunctions");
+ //Profiler.get().push("scheduledFunctions"); // Plazma - Completely remove Mojang profiler
this.serverLevelData.getScheduledEvents().tick(this.server, i);
- Profiler.get().pop();
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
// Purpur start - Configurable daylight cycle
int incrementTicks = isDay() ? this.purpurConfig.daytimeTicks : this.purpurConfig.nighttimeTicks;
@@ -1001,9 +1001,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
boolean flag = this.isRaining();
int j = chunkcoordintpair.getMinBlockX();
int k = chunkcoordintpair.getMinBlockZ();
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get();
- gameprofilerfiller.push("thunder");
+ //gameprofilerfiller.push("thunder"); // Plazma - Completely remove Mojang profiler
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*simpleRandom.nextInt(this.spigotConfig.thunderChance) == 0*/ chunk.shouldDoLightning(this.simpleRandom)) { // Spigot // Paper - Option to disable thunder // Paper - optimise random ticking // Pufferfish - replace random with shouldDoLightning
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
@@ -1040,7 +1040,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
- gameprofilerfiller.popPush("iceandsnow");
+ //gameprofilerfiller.popPush("iceandsnow"); // Plazma - Completely remove Mojang profiler
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
for (int l = 0; l < randomTickSpeed; ++l) {
@@ -1050,12 +1050,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
} // Paper - Option to disable ice and snow
- gameprofilerfiller.popPush("tickBlocks");
+ //gameprofilerfiller.popPush("tickBlocks"); // Plazma - Completely remove Mojang profiler
if (randomTickSpeed > 0) {
this.optimiseRandomTick(chunk, randomTickSpeed); // Paper - optimise random ticking
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
@VisibleForTesting
@@ -1388,19 +1388,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}*/ // Paper - comment out EAR 2
// Spigot end
entity.setOldPosAndRot();
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
++entity.tickCount;
+ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
});
- gameprofilerfiller.incrementCounter("tickNonPassenger");
+ */ // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.incrementCounter("tickNonPassenger"); // Plazma - Completely remove Mojang profiler
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); // Paper - EAR 2
if (isActive) { // Paper - EAR 2
entity.tick();
entity.postTick(); // CraftBukkit
} else { entity.inactiveTick(); } // Paper - EAR 2
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {
@@ -1423,12 +1425,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
passenger.setOldPosAndRot();
++passenger.tickCount;
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get();
+ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
});
- gameprofilerfiller.incrementCounter("tickPassenger");
+ */ // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.incrementCounter("tickPassenger"); // Plazma - Completely remove Mojang profiler
// Paper start - EAR 2
if (isActive) {
passenger.rideTick();
@@ -1440,7 +1444,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
vehicle.positionRider(passenger);
}
// Paper end - EAR 2
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
Iterator iterator = passenger.getPassengers().iterator();
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 6f39fd99ffb28d6c0267f4251c54af0c519289db..98f3f1d5319821c24920aabc27029c7f5fd58fd1 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -101,8 +101,8 @@ import net.minecraft.tags.FluidTags;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.effect.MobEffectInstance;
@@ -1664,15 +1664,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.unsetRemoved();
*/
// CraftBukkit end
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("moving");
+ //gameprofilerfiller.push("moving"); // Plazma - Completely remove Mojang profiler
if (worldserver != null && resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit - empty to fall through to null to event
this.enteredNetherPosition = this.position();
}
- gameprofilerfiller.pop();
- gameprofilerfiller.push("placing");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("placing"); // Plazma - Completely remove Mojang profiler
// CraftBukkit start
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
LevelData worlddata = worldserver.getLevelData();
@@ -1690,7 +1690,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
worldserver.addDuringTeleport(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.triggerDimensionChangeTriggers(worldserver1);
this.stopUsingItem();
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 10120b2ac4c4aea480ee4bb23b3203bad74dc9ae..24cd8ae3018d93e0f25834407a98804dddfe2cd7 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -30,7 +30,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ClientInformation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.VisibleForDebug;
-import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.thread.BlockableEventLoop;
import org.slf4j.Logger;
@@ -275,7 +275,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
protected void keepConnectionAlive() {
- Profiler.get().push("keepAlive");
+ //Profiler.get().push("keepAlive"); // Plazma - Completely remove Mojang profiler
// 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 = Util.getMillis();
@@ -308,7 +308,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
// Paper end - give clients a longer time to respond to pings as per pre 1.12.2 timings
- Profiler.get().pop();
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
}
private boolean checkIfClosed(long time) {
diff --git a/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
index 5a2b07340c63577f6d32c0658ce5f9b616c82f91..9245d2010c8d0579fe58f7eab4acd7ed1891d8dc 100644
--- a/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
+++ b/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
@@ -9,8 +9,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import net.minecraft.Util;
import net.minecraft.util.Unit;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
public class ProfiledReloadInstance extends SimpleReloadInstance<ProfiledReloadInstance.State> {
@@ -51,12 +51,12 @@ public class ProfiledReloadInstance extends SimpleReloadInstance<ProfiledReloadI
private static Executor profiledExecutor(Executor executor, AtomicLong atomicLong, String string) {
return runnable -> executor.execute(() -> {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push(string);
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push(string); // Plazma - Completely remove Mojang profiler
long l = Util.getNanos();
runnable.run();
atomicLong.addAndGet(Util.getNanos() - l);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
});
}
diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
index d2d82e4f22bfeac8881b6815e4bef56c254fded9..3e307274084df5304e801acdde2ae3b8f75ce8d6 100644
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
@@ -3,8 +3,8 @@ package net.minecraft.server.packs.resources;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import net.minecraft.util.Unit;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
public interface ResourceManagerReloadListener extends PreparableReloadListener {
@Override
@@ -12,10 +12,10 @@ public interface ResourceManagerReloadListener extends PreparableReloadListener
PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor
) {
return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("listener");
+ //ProfilerFiller profilerFiller = Profiler.get();
+ //profilerFiller.push("listener");
this.onResourceManagerReload(manager);
- profilerFiller.pop();
+ //profilerFiller.pop();
}, applyExecutor);
}
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
index b6b79e6482d04098b4086bc307a83921df322760..83f309323586f96a97246b65e25e1592b9cd3395 100644
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
@@ -17,7 +17,7 @@ import net.minecraft.core.Registry;
import net.minecraft.resources.FileToIdConverter;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
public abstract class SimpleJsonResourceReloadListener<T> extends SimplePreparableReloadListener<Map<ResourceLocation, T>> {
@@ -41,7 +41,7 @@ public abstract class SimpleJsonResourceReloadListener<T> extends SimplePreparab
}
@Override
- protected Map<ResourceLocation, T> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
+ protected Map<ResourceLocation, T> prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Mojang profiler
Map<ResourceLocation, T> map = new HashMap<>();
scanDirectory(resourceManager, this.lister, this.ops, this.codec, map);
return map;
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
index 0aaab6a2a10bf012c9d275f7cee2095c8fbb8809..524417d6726249a06371918155a94add2d421b98 100644
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
@@ -2,20 +2,20 @@ package net.minecraft.server.packs.resources;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
@Override
public final CompletableFuture<Void> reload(
PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor
) {
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, Profiler.get()), prepareExecutor)
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager/*, Profiler.get()*/), prepareExecutor) // Plazma - Completely remove Mojang profiler
.thenCompose(synchronizer::wait)
- .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, Profiler.get()), applyExecutor);
+ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager/*, Profiler.get()*/), applyExecutor); // Plazma - Completely remove Mojang profiler
}
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang profiler
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang profiler
}
diff --git a/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java b/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
index 805532c7acc4ad81b83e305d669f5cee0e7597e9..f37e42621b50d183c17efdda14211736fc7968c9 100644
--- a/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
+++ b/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
@@ -7,13 +7,13 @@ import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.atomic.AtomicReference;
import net.minecraft.Util;
-import net.minecraft.util.profiling.metrics.MetricCategory;
-import net.minecraft.util.profiling.metrics.MetricSampler;
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
-import net.minecraft.util.profiling.metrics.ProfilerMeasured;
+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
-public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements ProfilerMeasured, TaskScheduler<T>, Runnable {
+public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements /*ProfilerMeasured,*/ TaskScheduler<T>, Runnable { // Plazma - Completely remove Mojang profiler
private static final Logger LOGGER = LogUtils.getLogger();
private final AtomicReference<AbstractConsecutiveExecutor.Status> status = new AtomicReference<>(AbstractConsecutiveExecutor.Status.SLEEPING);
private final StrictQueue<T> queue;
@@ -24,7 +24,7 @@ public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements
this.executor = executor;
this.queue = queue;
this.name = name;
- MetricsRegistry.INSTANCE.add(this);
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
}
private boolean canBeScheduled() {
@@ -108,10 +108,12 @@ public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements
return this.name;
}
+ /* // Plazma - Completely remove Mojang profiler
@Override
public List<MetricSampler> profiledMetrics() {
return ImmutableList.of(MetricSampler.create(this.name + "-queue-size", MetricCategory.CONSECUTIVE_EXECUTORS, this::size));
}
+ */ // Plazma - Completely remove Mojang profiler
private boolean setRunning() {
return this.status.compareAndSet(AbstractConsecutiveExecutor.Status.SLEEPING, AbstractConsecutiveExecutor.Status.RUNNING);
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
index 9b706276dc5b5f55b966c5472c6c4e864342b916..d8efe335be1808422abef6d7ba094c9a3a4f3be3 100644
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
@@ -15,13 +15,13 @@ import java.util.function.Supplier;
import javax.annotation.CheckReturnValue;
import net.minecraft.ReportedException;
import net.minecraft.SharedConstants;
-import net.minecraft.util.profiling.metrics.MetricCategory;
-import net.minecraft.util.profiling.metrics.MetricSampler;
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
-import net.minecraft.util.profiling.metrics.ProfilerMeasured;
+//import net.minecraft.util.profiling.metrics.MetricCategory;
+//import net.minecraft.util.profiling.metrics.MetricSampler;
+//import net.minecraft.util.profiling.metrics.MetricsRegistry;
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured;
import org.slf4j.Logger;
-public abstract class BlockableEventLoop<R extends Runnable> implements ProfilerMeasured, TaskScheduler<R>, Executor {
+public abstract class BlockableEventLoop<R extends Runnable> implements /*ProfilerMeasured,*/ TaskScheduler<R>, Executor { // Plazma - Completely remove Mojang profiler
public static final long BLOCK_TIME_NANOS = 100000L;
private final String name;
private static final Logger LOGGER = LogUtils.getLogger();
@@ -30,7 +30,7 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
protected BlockableEventLoop(String name) {
this.name = name;
- MetricsRegistry.INSTANCE.add(this);
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
}
protected abstract boolean shouldRun(R task);
@@ -160,10 +160,12 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
}
}
+ /* // Plazma - Completely remove Mojang profiler
@Override
public List<MetricSampler> profiledMetrics() {
return ImmutableList.of(MetricSampler.create(this.name + "-pending-tasks", MetricCategory.EVENT_LOOPS, this::getPendingTasksCount));
}
+ */ // Plazma - Completely remove Mojang profiler
public static boolean isNonRecoverable(Throwable exception) {
return exception instanceof ReportedException reportedException
diff --git a/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java b/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
index c67846e4d5583d79c6e9760c10d2581f0d54f45c..fdace9b3dedcd2c0879ea4ef30657d9d0e37ad7e 100644
--- a/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
+++ b/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
@@ -3,12 +3,12 @@ package net.minecraft.util.thread;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Consumer;
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang profiler
public class PriorityConsecutiveExecutor extends AbstractConsecutiveExecutor<StrictQueue.RunnableWithPriority> {
public PriorityConsecutiveExecutor(int priorityCount, Executor executor, String name) {
super(new StrictQueue.FixedPriorityQueue(priorityCount), executor, name);
- MetricsRegistry.INSTANCE.add(this);
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
}
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9b5379edf00ab7256e7e90702e319de9b20ac0b4..af0b090a831205ba681012d465842b07a1b7fda9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -84,8 +84,8 @@ import net.minecraft.tags.FluidTags;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.Nameable;
@@ -919,9 +919,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end
public void baseTick() {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("entityBaseTick");
+ //gameprofilerfiller.push("entityBaseTick"); // Plazma - Completely remove Mojang profiler
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
this.inBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) {
@@ -990,7 +990,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
public void setSharedFlagOnFire(boolean onFire) {
@@ -1221,9 +1221,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("move");
+ //gameprofilerfiller.push("move"); // Plazma - Completely remove Mojang profiler
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1232,7 +1232,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper start - ignore movement changes while inactive.
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) {
setDeltaMovement(Vec3.ZERO);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
return;
}
// Paper end
@@ -1253,8 +1253,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
}
- gameprofilerfiller.pop();
- gameprofilerfiller.push("rest");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("rest"); // Plazma - Completely remove Mojang profiler
boolean flag = !Mth.equal(movement.x, vec3d1.x);
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
@@ -1281,7 +1281,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
*/ // Plazma - Remove persist 'isClientSide' flag
if (this.isRemoved()) {
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
} else {
if (this.horizontalCollision) {
Vec3 vec3d2 = this.getDeltaMovement();
@@ -1330,7 +1330,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
float f = this.getBlockSpeedFactor();
this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f));
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
}
// Paper start - detailed watchdog information
@@ -3524,9 +3524,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.processPortalCooldown();
if (this.portalProcess != null) {
if (this.portalProcess.processPortalTeleportation(worldserver, this, this.canUsePortal(false))) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("portal");
+ //gameprofilerfiller.push("portal"); // Plazma - Completely remove Mojang profiler
this.setPortalCooldown();
TeleportTransition teleporttransition = this.portalProcess.getPortalDestination(worldserver, this);
@@ -3538,7 +3538,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
} else if (this.portalProcess.hasExpired()) {
this.portalProcess = null;
}
@@ -4062,16 +4062,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.teleport(this.calculatePassengerTransition(teleportTarget, entity));
}
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("teleportSameDimension");
+ //gameprofilerfiller.push("teleportSameDimension"); // Plazma - Completely remove Mojang profiler
this.teleportSetPosition(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
if (!teleportTarget.asPassenger()) {
this.sendTeleportTransitionToRidingPlayers(teleportTarget);
}
teleportTarget.postTeleportTransition().onTransition(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
return this;
}
@@ -4093,12 +4093,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("teleportCrossDimension");
+ //gameprofilerfiller.push("teleportCrossDimension"); // Plazma - Completely remove Mojang profiler
entity = this.getType().create(world, EntitySpawnReason.DIMENSION_TRAVEL);
if (entity == null) {
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
return null;
} else {
// Paper start - Fix item duplication and teleport issues
@@ -4124,7 +4124,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
world.resetEmptyTime();
teleportTarget.postTeleportTransition().onTransition(entity);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
return entity;
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9940c74dac4ebcfacdaf88d0b1e95e78e964e1ba..d6d43ad1677d035c26619b73e5a2dd6e72ab278b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -72,8 +72,8 @@ import net.minecraft.tags.FluidTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.damagesource.CombatRules;
@@ -455,9 +455,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
super.baseTick();
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("livingEntityBaseTick");
+ //gameprofilerfiller.push("livingEntityBaseTick"); // Plazma - Completely remove Mojang profiler
if (this.fireImmune() /*|| this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag
this.clearFire();
}
@@ -567,7 +567,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.yHeadRotO = this.yHeadRot;
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
// Pufferfish start - optimize suffocation
@@ -3451,12 +3451,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.run += (f3 - this.run) * 0.3F;
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("headTurn");
+ //gameprofilerfiller.push("headTurn"); // Plazma - Completely remove Mojang profiler
f2 = this.tickHeadTurn(f1, f2);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("rangeChecks");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("rangeChecks"); // Plazma - Completely remove Mojang profiler
// Paper start - stop large pitch and yaw changes from crashing the server
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
@@ -3468,7 +3468,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
// Paper end
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.animStep += f2;
if (this.isFallFlying()) {
++this.fallFlyTicks;
@@ -3700,21 +3700,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.setDeltaMovement(d0, d1, d2);
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("ai");
+ //gameprofilerfiller.push("ai"); // Plazma - Completely remove Mojang profiler
if (this.isImmobile()) {
this.jumping = false;
this.xxa = 0.0F;
this.zza = 0.0F;
} else /*if (this.isEffectiveAi())*/ { // Plazma - Remove persist 'isClientSide' flag
- gameprofilerfiller.push("newAi");
+ //gameprofilerfiller.push("newAi"); // Plazma - Completely remove Mojang profiler
this.serverAiStep();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
- gameprofilerfiller.pop();
- gameprofilerfiller.push("jump");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("jump"); // Plazma - Completely remove Mojang profiler
if (this.jumping && this.isAffectedByFluids()) {
double d3;
@@ -3741,8 +3741,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.noJumpDelay = 0;
}
- gameprofilerfiller.pop();
- gameprofilerfiller.push("travel");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("travel"); // Plazma - Completely remove Mojang profiler
this.xxa *= 0.98F;
this.zza *= 0.98F;
if (this.isFallFlying()) {
@@ -3775,8 +3775,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
//} // Plazma - Remove persist 'isClientSide' flag
this.calculateEntityAnimation(this instanceof FlyingAnimal);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("freezing");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("freezing"); // Plazma - Completely remove Mojang profiler
if (/*!this.level().isClientSide &&*/ !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API // Plazma - Remove persist 'isClientSide' flag
int i = this.getTicksFrozen();
@@ -3797,15 +3797,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
- gameprofilerfiller.pop();
- gameprofilerfiller.push("push");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("push"); // Plazma - Completely remove Mojang profiler
if (this.autoSpinAttackTicks > 0) {
--this.autoSpinAttackTicks;
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
}
this.pushEntities();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
// Paper start - Add EntityMoveEvent
// Purpur start - Ridables
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index ae1dcf013b03c6d04ccf34be4e54048581479183..af8a02ea3daaf8c147f87e5a58d25a1583490413 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -34,8 +34,8 @@ import net.minecraft.sounds.SoundEvent;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
@@ -369,15 +369,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
public void baseTick() {
super.baseTick();
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("mobBaseTick");
+ //gameprofilerfiller.push("mobBaseTick"); // Plazma - Completely remove Mojang profiler
if (this.isAlive() && this.random.nextInt(1000) < this.ambientSoundTime++) {
this.resetAmbientSoundTime();
this.playAmbientSound();
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
incrementTicksSinceLastInteraction(); // Purpur
}
@@ -712,9 +712,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
public void aiStep() {
super.aiStep();
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("looting");
+ //gameprofilerfiller.push("looting"); // Plazma - Completely remove Mojang profiler
Level world = this.level();
if (world instanceof ServerLevel worldserver) {
@@ -738,7 +738,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
}
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
protected Vec3i getPickupReach() {
@@ -950,49 +950,49 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
return;
}
// Paper end - Allow nerfed mobs to jump and float
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("sensing");
+ //gameprofilerfiller.push("sensing"); // Plazma - Completely remove Mojang profiler
//this.sensing.tick(); // Plazma - moved down
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
int i = this.tickCount + this.getId();
if (i % this.level().plazmaConfig().entity.sensorTick == 0) this.sensing.tick(); // Plazma - Configurable entity sensor tick
if (i % 2 != 0 && this.tickCount > 1) {
- gameprofilerfiller.push("targetSelector");
+ //gameprofilerfiller.push("targetSelector"); // Plazma - Completely remove Mojang profiler
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
this.targetSelector.tickRunningGoals(false);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("goalSelector");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("goalSelector"); // Plazma - Completely remove Mojang profiler
if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
this.goalSelector.tickRunningGoals(false);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
} else {
- gameprofilerfiller.push("targetSelector");
+ //gameprofilerfiller.push("targetSelector"); // Plazma - Completely remove Mojang profiler
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
this.targetSelector.tick();
- gameprofilerfiller.pop();
- gameprofilerfiller.push("goalSelector");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("goalSelector"); // Plazma - Completely remove Mojang profiler
if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
this.goalSelector.tick();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
- gameprofilerfiller.push("navigation");
+ //gameprofilerfiller.push("navigation"); // Plazma - Completely remove Mojang profiler
this.navigation.tick();
- gameprofilerfiller.pop();
- gameprofilerfiller.push("mob tick");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("mob tick"); // Plazma - Completely remove Mojang profiler
this.customServerAiStep((ServerLevel) this.level());
- gameprofilerfiller.pop();
- gameprofilerfiller.push("controls");
- gameprofilerfiller.push("move");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("controls"); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("move"); // Plazma - Completely remove Mojang profiler
this.moveControl.tick();
- gameprofilerfiller.popPush("look");
+ //gameprofilerfiller.popPush("look"); // Plazma - Completely remove Mojang profiler
this.lookControl.tick();
- gameprofilerfiller.popPush("jump");
+ //gameprofilerfiller.popPush("jump"); // Plazma - Completely remove Mojang profiler
this.jumpControl.tick();
- gameprofilerfiller.pop();
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.sendDebugPackets();
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
index 5a439e3b0fdc1010884634c1e046e49d8b9aee17..e04f1f946e0b37ea1362aa2af7ff4232cc73c123 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
@@ -7,8 +7,8 @@ import java.util.EnumSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
public class GoalSelector {
private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() {
@@ -85,8 +85,8 @@ public class GoalSelector {
}
public void tick() {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("goalCleanup");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("goalCleanup"); // Plazma - Completely remove Mojang profiler
for (WrappedGoal wrappedGoal : this.availableGoals) {
if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams
@@ -95,8 +95,8 @@ public class GoalSelector {
}
this.lockedFlags.entrySet().removeIf(entry -> !entry.getValue().isRunning());
- profilerFiller.pop();
- profilerFiller.push("goalUpdate");
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("goalUpdate"); // Plazma - Completely remove Mojang profiler
for (WrappedGoal wrappedGoal2 : this.availableGoals) {
// Paper start
@@ -116,13 +116,13 @@ public class GoalSelector {
}
}
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
this.tickRunningGoals(true);
}
public void tickRunningGoals(boolean tickAll) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("goalTick");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("goalTick"); // Plazma - Completely remove Mojang profiler
for (WrappedGoal wrappedGoal : this.availableGoals) {
if (wrappedGoal.isRunning() && (tickAll || wrappedGoal.requiresUpdateEveryTick())) {
@@ -130,7 +130,7 @@ public class GoalSelector {
}
}
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
}
public Set<WrappedGoal> getAvailableGoals() {
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 99e31c8e8488ce7138c5385575cbbabe0bd7394e..ac4d7310f50340da668c0e6d63982f99d71f7e05 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -10,8 +10,8 @@ import net.minecraft.core.Vec3i;
import net.minecraft.network.protocol.game.DebugPackets;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.attributes.Attributes;
@@ -189,13 +189,13 @@ public abstract class PathNavigation {
}
}
// Paper end - EntityPathfindEvent
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("pathfind");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("pathfind"); // Plazma - Completely remove Mojang profiler
BlockPos blockPos = useHeadPos ? this.mob.blockPosition().above() : this.mob.blockPosition();
int i = (int)(followRange + (float)range);
PathNavigationRegion pathNavigationRegion = new PathNavigationRegion(this.level, blockPos.offset(-i, -i, -i), blockPos.offset(i, i, i));
Path path = this.pathFinder.findPath(pathNavigationRegion, this.mob, positions, followRange, distance, this.maxVisitedNodesMultiplier);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
// Plazma start - Process pathfinding asynchronously
if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) {
if (!positions.isEmpty()) this.targetPos = positions.iterator().next();
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
index 116b1e251ffe68bae5c404d0823c2bc7c1afddf6..24aa626c1ccd12c6a00d004ac3af46980d3042f2 100644
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
@@ -2,8 +2,8 @@ package net.minecraft.world.entity.ai.sensing;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
@@ -28,10 +28,10 @@ public class Sensing {
} else if (this.unseen.contains(i)) {
return false;
} else {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("hasLineOfSight");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("hasLineOfSight"); // Plazma - Completely remove Mojang profiler
boolean bl = this.mob.hasLineOfSight(entity);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
if (bl) {
this.seen.add(i);
} else {
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
index 502277270c38cfcbd686455552d2b54701774e5f..f63ae92412184949e085ee23c434a4bc1a236b16 100644
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
@@ -31,8 +31,8 @@ import net.minecraft.tags.GameEventTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.SimpleContainer;
@@ -280,15 +280,15 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("allayBrain");
+ //gameprofilerfiller.push("allayBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("allayActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("allayActivityUpdate"); // Plazma - Completely remove Mojang profiler
AllayAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index d239c8325468c72fc7acf3831115c3cdf1f77f43..ece73c0cdf7358fa0e2bdc4512fbd873c085983b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -23,8 +23,8 @@ import net.minecraft.util.ByIdMap;
import net.minecraft.util.RandomSource;
import net.minecraft.util.StringRepresentable;
import net.minecraft.util.TimeUtil;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
@@ -166,15 +166,15 @@ public class Armadillo extends Animal {
private int behaviorTick; // Plazma - Add missing pufferfish configurations
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("armadilloBrain");
+ //gameprofilerfiller.push("armadilloBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
((Brain<Armadillo>) this.brain).tick(world, this); // CraftBukkit - decompile error
- gameprofilerfiller.pop();
- gameprofilerfiller.push("armadilloActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("armadilloActivityUpdate"); // Plazma - Completely remove Mojang profiler
ArmadilloAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) {
this.forceDrops = true; // CraftBukkit
if (this.dropFromGiftLootTable(world, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
index a38bca8cf5fbb218f8dbd2fb27705051c4d4836f..87bc28617a2c56bd4d04705885631de43a038a65 100644
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -26,8 +26,8 @@ import net.minecraft.util.ByIdMap;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.StringRepresentable;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@@ -339,15 +339,15 @@ public class Axolotl extends Animal implements VariantHolder<Axolotl.Variant>, B
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("axolotlBrain");
+ //gameprofilerfiller.push("axolotlBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("axolotlActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("axolotlActivityUpdate"); // Plazma - Completely remove Mojang profiler
AxolotlAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
if (!this.isNoAi()) {
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index 70c3bb5d0c35fa79f74f76f452e9b34ebfe8041e..6e3572c9151743b231fafcc81b56b5d114691e65 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -17,8 +17,8 @@ import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@@ -169,17 +169,17 @@ public class Camel extends AbstractHorse {
private int behaviorTick = 0; // Plazma - Add missing pufferfish configurations
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("camelBrain");
+ //gameprofilerfiller.push("camelBrain"); // Plazma - Completely remove Mojang profiler
Brain<Camel> behaviorcontroller = (Brain<Camel>) this.getBrain(); // CraftBukkit - decompile error
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
behaviorcontroller.tick(world, this);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("camelActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("camelActivityUpdate"); // Plazma - Completely remove Mojang profiler
CamelAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index 963e55584c741a3a3f903f465d897c7ecbf5cd4d..3dbd2205fdabf316819d05818e9f75089bc506cf 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -28,8 +28,8 @@ import net.minecraft.tags.ItemTags;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AgeableMob;
@@ -260,14 +260,14 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("frogBrain");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("frogBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- profilerFiller.pop();
- profilerFiller.push("frogActivityUpdate");
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("frogActivityUpdate"); // Plazma - Completely remove Mojang profiler
FrogAi.updateActivity(this);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
index e5affd87506a717f4cffa9fad4873c1efbded295..f69bfc81a7990ddb9043557a767083f687aeb248 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -12,8 +12,8 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.ItemTags;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
@@ -140,15 +140,15 @@ public class Tadpole extends AbstractFish {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("tadpoleBrain");
+ //gameprofilerfiller.push("tadpoleBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("tadpoleActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("tadpoleActivityUpdate"); // Plazma - Completely remove Mojang profiler
TadpoleAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index 9cd08bb4e9069bb2f701ef3825ba4c5af6f56790..ea1c1fe3da78b90a3a2b5d40b17508d25eb05b03 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -20,8 +20,8 @@ import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@@ -230,15 +230,15 @@ public class Goat extends Animal {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("goatBrain");
+ //gameprofilerfiller.push("goatBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
- gameprofilerfiller.push("goatActivityUpdate");
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+ //gameprofilerfiller.push("goatActivityUpdate"); // Plazma - Completely remove Mojang profiler
GoatAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index 5a101b5ff1f2e3f6f3882f84e219ba7c502ec462..4f9c44973a125e7a82b289f405b4451542310f5d 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -30,8 +30,8 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.ByIdMap;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
@@ -514,14 +514,14 @@ public class Sniffer extends Animal {
private int behaviorTick; // Plazma - Add missing pufferfish configurations
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("snifferBrain");
+ //gameprofilerfiller.push("snifferBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
this.getBrain().tick(world, this);
- gameprofilerfiller.popPush("snifferActivityUpdate");
+ //gameprofilerfiller.popPush("snifferActivityUpdate"); // Plazma - Completely remove Mojang profiler
SnifferAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
index a933e33a1b30d53e90d10bea3dadf1f35ed94398..eae9a9d433f425e3f2e2fed727dfd00facdea262 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
@@ -15,8 +15,8 @@ import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
@@ -284,11 +284,11 @@ public class Zoglin extends Monster implements HoglinBase {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("zoglinBrain");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("zoglinBrain"); // Plazma - Completely remove Mojang profiler
if (getRider() == null || !this.isControllable()) // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
this.updateActivity();
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
index 0f2e655eae6c6ab00cead76e256dfad5b19cbb60..2aaf70c202b3d08add495ebda0700d753bec3051 100644
--- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
+++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
@@ -12,8 +12,8 @@ import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.EntityTypeTags;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AnimationState;
import net.minecraft.world.entity.Entity;
@@ -235,13 +235,13 @@ public class Breeze extends Monster {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("breezeBrain");
+ //gameprofilerfiller.push("breezeBrain"); // Plazma - Completely remove Mojang profiler
this.getBrain().tick(world, this);
- gameprofilerfiller.popPush("breezeActivityUpdate");
+ //gameprofilerfiller.popPush("breezeActivityUpdate"); // Plazma - Completely remove Mojang profiler
BreezeAi.updateActivity(this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
index cff47b1e136c07b0fa21efa76b7fd5675d0d0b02..5d6166a9fd22f909f8e4c2192ebe11d9ccf2043d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
+++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
@@ -19,8 +19,8 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.DamageTypeTags;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AnimationState;
import net.minecraft.world.entity.Entity;
@@ -241,11 +241,11 @@ public class Creaking extends Monster {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("creakingBrain");
+ //gameprofilerfiller.push("creakingBrain"); // Plazma - Completely remove Mojang profiler
this.getBrain().tick((ServerLevel) this.level(), this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
CreakingAi.updateActivity(this);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
index 5ff8c677d54a9538c07425ac1a6336e17be51760..6dcdd3ef9de2a46275aee3b3580c4a5f63a3aa00 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -16,8 +16,8 @@ import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.RandomSource;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@@ -183,12 +183,12 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
private int behaviorTick; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("hoglinBrain");
+ //gameprofilerfiller.push("hoglinBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
HoglinAi.updateActivity(this);
if (this.isConverting()) {
++this.timeInOverworld;
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
index 60dadde71ae0d32dfe04d7aad282b9f17cf05823..7b090b48fa9379940728c8c737a684ba0cabae00 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -8,8 +8,8 @@ import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.util.RandomSource;
import net.minecraft.util.VisibleForDebug;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@@ -346,12 +346,12 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
private int behaviorTick; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("piglinBrain");
+ //gameprofilerfiller.push("piglinBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
PiglinAi.updateActivity(this);
super.customServerAiStep(world);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
index 24e198440d4841daac664dc6c5a8a3dc6825b469..e6f642e4004ce54c5c49436315869c57f850150a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
@@ -8,8 +8,8 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.RandomSource;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.EntitySpawnReason;
@@ -151,11 +151,11 @@ public class PiglinBrute extends AbstractPiglin {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("piglinBruteBrain");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.push("piglinBruteBrain"); // Plazma - Completely remove Mojang profiler
if (getRider() == null || this.isControllable()) // Purpur - only use brain if no rider
this.getBrain().tick(world, this);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
PiglinBruteAi.updateActivity(this);
PiglinBruteAi.maybePlayActivitySound(this);
super.customServerAiStep(world);
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
index 839a5550a6d613abf4567b32b5f1a04700d6ccf4..fdadca863827f19f8a27915fd7d2bb296064cc78 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -32,8 +32,8 @@ import net.minecraft.tags.TagKey;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffectInstance;
@@ -321,12 +321,12 @@ public class Warden extends Monster implements VibrationSystem {
private int behaviorTick = 0; // Pufferfish
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("wardenBrain");
+ //gameprofilerfiller.push("wardenBrain"); // Plazma - Completely remove Mojang profiler
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing Purpur configurations
this.getBrain().tick(world, this);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
super.customServerAiStep(world);
if ((this.tickCount + this.getId()) % 120 == 0) {
Warden.applyDarknessAround(world, this.position(), this, 20);
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index e15d07f33db78872363f02cc5a631b7ab1255314..95d9bba10fa589c4858fd99d2cc6de3397bdcab2 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -38,8 +38,8 @@ import net.minecraft.stats.Stats;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.Mth;
import net.minecraft.util.SpawnUtil;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
@@ -349,9 +349,9 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}
protected void customServerAiStep(ServerLevel world, boolean inactive) { // Purpur - not final
// Paper end - EAR 2
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("villagerBrain");
+ //gameprofilerfiller.push("villagerBrain"); // Plazma - Completely remove Mojang profiler
// Purpur start
if (this.level().purpurConfig.villagerLobotomizeEnabled) {
// treat as inactive if lobotomized
@@ -365,7 +365,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
this.getBrain().tick(world, this); // Paper // Purpur - Ridables
}
// Pufferfish end
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false;
}
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 2483627f807d7a3907f6848a8bc45d7a798e746d..3f5bda2682891a15c7507ef10dbaad38f6856f5d 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -42,7 +42,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
import net.minecraft.server.packs.resources.SimplePreparableReloadListener;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> implements RecipeAccess {
@@ -96,7 +96,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
}
@Override
- protected RecipeMap prepare(ResourceManager manager, ProfilerFiller profiler) {
+ protected RecipeMap prepare(ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
SortedMap<ResourceLocation, Recipe<?>> sortedmap = new TreeMap();
SimpleJsonResourceReloadListener.scanDirectory(manager, RecipeManager.RECIPE_LISTER, this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedmap);
@@ -111,7 +111,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
return RecipeMap.create(list);
}
- protected void apply(RecipeMap prepared, ResourceManager manager, ProfilerFiller profiler) {
+ protected void apply(RecipeMap prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
this.recipes = prepared;
RecipeManager.LOGGER.info("Loaded {} recipes", prepared.values().size());
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9a6152fc74ba6c71b32da7519cec537e34291fa2..805db223ad83b50546c32747fc127d9fe42b34f9 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -36,8 +36,8 @@ import net.minecraft.util.AbortableIterationConsumer;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.StringRepresentable;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profilers
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profilers
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.TickRateManager;
import net.minecraft.world.damagesource.DamageSource;
@@ -276,7 +276,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override
public final <T extends Entity> List<T> getEntitiesOfClass(final Class<T> entityClass, final AABB boundingBox, final Predicate<? super T> predicate) {
- Profiler.get().incrementCounter("getEntities");
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
final List<T> ret = new java.util.ArrayList<>();
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getEntities(entityClass, null, boundingBox, ret, predicate);
@@ -286,7 +286,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override
public final List<Entity> moonrise$getHardCollidingEntities(final Entity entity, final AABB box, final Predicate<? super Entity> predicate) {
- Profiler.get().incrementCounter("getEntities");
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
final List<Entity> ret = new java.util.ArrayList<>();
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate);
@@ -1513,9 +1513,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}
protected void tickBlockEntities() {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
- gameprofilerfiller.push("blockEntities");
+ //gameprofilerfiller.push("blockEntities"); // Plazma - Completely remove Mojang profilers
this.tickingBlockEntities = true;
if (!this.pendingBlockEntityTickers.isEmpty()) {
this.blockEntityTickers.addAll(this.pendingBlockEntityTickers);
@@ -1553,7 +1553,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
this.tickingBlockEntities = false;
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
this.spigotConfig.currentPrimedTnt = 0; // Spigot
}
@@ -1723,7 +1723,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
- Profiler.get().incrementCounter("getEntities");
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
//List<Entity> list = Lists.newArrayList(); // Plazma - minor optimizations
// Paper start - rewrite chunk system
@@ -1753,7 +1753,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
final AABB boundingBox, final Predicate<? super T> predicate,
final List<? super T> into, final int maxCount) {
- Profiler.get().incrementCounter("getEntities");
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
if (maxCount != Integer.MAX_VALUE) {
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index dc15c15951e4ca30b8341d24f813259a77f41c77..ff61aee501131c4141c79354f408d89bfdda21cd 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -24,8 +24,8 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.VisibleForDebug;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.util.random.WeightedRandomList;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntitySpawnReason;
@@ -163,9 +163,9 @@ public final class NaturalSpawner {
}
public static void spawnForChunk(ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnState info, List<MobCategory> spawnableGroups) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("spawner");
+ //gameprofilerfiller.push("spawner"); // Plazma - Completely remove Mojang profiler
Iterator iterator = spawnableGroups.iterator();
while (iterator.hasNext()) {
@@ -211,7 +211,7 @@ public final class NaturalSpawner {
}
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
// Paper start - Add mobcaps commands
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
index 4c7e4683c53afb0800b7f17c5964ba8ff31848d1..f894b47b228a2dc37b4486f7e5b89681cdcaa849 100644
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
@@ -15,8 +15,8 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.Mth;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
@@ -700,11 +700,11 @@ public class ServerExplosion implements Explosion {
this.hurtEntities();
if (this.interactsWithBlocks()) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("explosion_blocks");
+ //gameprofilerfiller.push("explosion_blocks"); // Plazma - Completely remove Mojang profiler
this.interactWithBlocks(list);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
if (this.fire) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 2144652adb3259a4d5113fe3337e13280cda3f12..ee836953b1d6a362a3a785dc1fd0ea0416bdd984 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -26,8 +26,8 @@ import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.Level;
@@ -424,13 +424,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
}
if (LightEngine.hasDifferentLightProperties(iblockdata1, iblockdata)) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push("updateSkyLightSources");
+ //gameprofilerfiller.push("updateSkyLightSources"); // Plazma - Completely remove Mojang profiler
// Paper - rewrite chunk system
- gameprofilerfiller.popPush("queueCheckLight");
+ //gameprofilerfiller.popPush("queueCheckLight"); // Plazma - Completely remove Mojang profiler
this.level.getChunkSource().getLightEngine().checkBlock(blockposition);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
}
boolean flag3 = iblockdata1.hasBlockEntity();
@@ -1077,9 +1077,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
if (LevelChunk.this.isTicking(blockposition)) {
try {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
- gameprofilerfiller.push(this::getType);
+ //gameprofilerfiller.push(this::getType); // Plazma - Completely remove Mojang profiler
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
if (this.blockEntity.getType().isValid(iblockdata)) {
@@ -1095,7 +1095,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
// Paper end - Remove the Block Entity if it's invalid
}
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
} catch (Throwable throwable) {
if (throwable instanceof ThreadDeath) throw throwable; // Paper
// Paper start - Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
index 95e71c471904fc54003180632dc85398ae06d241..376d7715daee8fd97757746d6a6f1c665558c8b8 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
@@ -12,9 +12,9 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import net.minecraft.core.BlockPos;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
-import net.minecraft.util.profiling.metrics.MetricCategory;
+//import net.minecraft.util.profiling.Profiler;
+//import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.metrics.MetricCategory;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.level.PathNavigationRegion;
import dev.kaiijumc.kaiiju.path.*; // Plazma - Process pathfinding asynchronously
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
index 778e6476c86d823dc8efe603a95e589e8b2ea9d9..fe3ba3e7fb5c2711edfa7c78441a590b08a68aa3 100644
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
@@ -23,8 +23,8 @@ import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.SectionPos;
import net.minecraft.core.Vec3i;
-import net.minecraft.util.profiling.Profiler;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.levelgen.structure.BoundingBox;
@@ -79,20 +79,20 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
}
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("collect");
- this.collectTicks(time, maxTicks, profilerFiller);
- profilerFiller.popPush("run");
- profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size());
+ //ProfilerFiller profilerFiller = Profiler.get();
+ //profilerFiller.push("collect");
+ this.collectTicks(time, maxTicks/*, profilerFiller*/); // Plazma - Completely remove Mojang profiler
+ //profilerFiller.popPush("run");
+ //profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size());
this.runCollectedTicks(ticker);
- profilerFiller.popPush("cleanup");
+ //profilerFiller.popPush("cleanup");
this.cleanupAfterTick();
- profilerFiller.pop();
+ //profilerFiller.pop();
}
- private void collectTicks(long time, int maxTicks, ProfilerFiller profiler) {
+ private void collectTicks(long time, int maxTicks/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
this.sortContainersToTick(time);
- profiler.incrementCounter("containersToTick", this.containersToTick.size());
+ //profiler.incrementCounter("containersToTick", this.containersToTick.size());
this.drainContainers(time, maxTicks);
this.rescheduleLeftoverContainers();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index deddf588826dda9b15beff3acf20be56837d240b..0c1409f190d67029b090c025f1657467d8113004 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -471,7 +471,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
this.unloadChunkRequest(x, z);
- this.world.getChunkSource().purgeUnload();
+ //this.world.getChunkSource().purgeUnload(); // Plazma - Completely remove Mojang profiler
return !this.isChunkLoaded(x, z);
}