Files
PlazmaBukkitMC/patches/server/0041-Completely-remove-Mojang-Profiler.patch
AlphaKR93 dd8042f88a Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@3fc255d: Updated Upstream (Paper)
PurpurMC/Purpur@93f3948: bump Gradle wrapper version to 8.10.2
PurpurMC/Purpur@1a67c42: drop the patch that removes the mojang profiler for now
PurpurMC/Purpur@803bf62: Final 1.21.1 Upstream (Paper)
PurpurMC/Purpur@af96590: Merge branch 'ver/1.21.1' into ver/1.21.3
PurpurMC/Purpur@c6802b0: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@99b1bf9: Use new ClientboundPlayerRotationPacket for setting player rotation
PaperMC/Paper@40211a0: Update Gradle wrapper to 8.10.2
PaperMC/Paper@49eae0d: remove some leftovers
PaperMC/Paper@d576cfc: cleanup bugfix patch
PaperMC/Paper@1196ab5: Avoid issues with certain tasks not processing during sleep (#11526)
PaperMC/Paper@fe2f3d4: Fix portal exit resulting in bad teleport transition
PaperMC/Paper@9f1fa0b: Fix item gravity on inactive items, remove dumb active skipping
PaperMC/Paper@1a1d0cf: Use target pitch in teleport (generally the same thing)
PaperMC/Paper@8ba3073: fix "is_freezing" damage type tag
PaperMC/Paper@1523212: don't resend effects when PlayerItemConsumeEvent is cancelled
PaperMC/Paper@1330880: Add Friction API to minecarts
PaperMC/Paper@580a610: Allow using old ender pearl behavior & apply ender pearl exploit patch (#11524)
PaperMC/Paper@40a960d: Rebuild patches
PaperMC/Paper@dfedf79: Correctly cancel consumption of consumable
PaperMC/Paper@147b796: get previous redstone level from the right state for experimental wires
PaperMC/Paper@ad9c58e: Only expose velocity relative tp flags to API (#11532)
PaperMC/Paper@f273e6e: Set updatingMinecraft to false
PaperMC/Paper@c5c1250: [ci skip] Remove leftover todo file (#11540)
PaperMC/Paper@7ee4835: Correctly clear  explosion density cache(#11541)
PaperMC/Paper@52a0590: Updated Upstream (Bukkit/CraftBukkit) (#11543)
PaperMC/Paper@5c0930d: Fix fix recipe iterator patch
PaperMC/Paper@1de0130: re-add a dispense fix patch
PaperMC/Paper@16d7d73: bunch more general fixes
PaperMC/Paper@a5d7426: Correctly support RecipeChoice.empty (#11550)
PaperMC/Paper@85c870e: Correct update cursor (#11554)
PaperMC/Paper@d19be64: Fix NPE with spark when CraftServer is not init yet (#11558)
PaperMC/Paper@92131ad: Decrease dead entity teleport warning (#11559)
2024-11-02 16:54:55 +09:00

1357 lines
81 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 27 Sep 2023 17:52:52 +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 647a3ac2aea4dadd638836f831cc3768d10c7b74..c3e1e9a8e82f23417138b91aa062a83ec3ef6f24 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's Profiler
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.flag.FeatureFlags;
@@ -448,7 +448,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); // Plazma - Completely remove Mojang's 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..467e17bfce31d0919d603698c9d88a04b05033dc 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's 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's 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's Profiler
this.commandLimit = maxCommandChainLength;
this.forkLimit = maxCommandForkCount;
- this.profiler = profiler;
+ //this.profiler = profiler; // Plazma - Completely remove Mojang's Profiler
this.commandQuota = maxCommandChainLength;
}
@@ -129,9 +129,11 @@ public class ExecutionContext<T> implements AutoCloseable {
return this.tracer;
}
+ /* // Plazma - Completely remove Mojang's Profiler
public ProfilerFiller profiler() {
return this.profiler;
}
+ */ // Plazma - Completely remove Mojang's Profiler
public int forkLimit() {
return this.forkLimit;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f5623f844f17 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's Profiler
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang's 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's Profiler
+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
import net.minecraft.world.Difficulty;
import net.minecraft.world.RandomSequences;
@@ -229,12 +229,12 @@ 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 MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang's Profiler
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove Mojang's Profiler
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove Mojang's Profiler
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang's Profiler
+ //@Nullable // Plazma - Completely remove Mojang's Profiler
+ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang's Profiler
private boolean debugCommandProfilerDelayStart;
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@@ -1409,7 +1409,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profiler_a.close();
}*/ // Purpur
} finally {
- this.endMetricsRecordingTick();
+ //this.endMetricsRecordingTick(); // Plazma - Completely remove Mojang's Profiler
}
this.isReady = true;
@@ -1715,12 +1715,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's 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's Profiler
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
@@ -1735,7 +1735,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
- profiler.pop();
+ //profiler.pop(); // Plazma - Completely remove Mojang's Profiler
// Paper end - Incremental chunk and player saving
//ProfilerFiller gameprofilerfiller = Profiler.get(); // Purpur
@@ -1768,11 +1768,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
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's Profiler
- gameprofilerfiller.push("save");
+ //gameprofilerfiller.push("save"); // Plazma - Completely remove Mojang's Profiler
this.saveEverything(true, false, false);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang's Profiler
MinecraftServer.LOGGER.debug("Autosave finished");
}
@@ -1841,7 +1841,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's Profiler
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
@@ -2932,6 +2932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end
+ /* // Plazma - Completely remove Mojang's Profiler
private ProfilerFiller createProfiler() {
if (false && this.willStartRecordingMetrics) { // Purpur
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
@@ -2957,12 +2958,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void startRecordingMetrics(Consumer<ProfileResults> resultConsumer, Consumer<Path> dumpConsumer) {
- /*this.onMetricsRecordingStopped = (methodprofilerresults) -> { // Purpur
+ this.onMetricsRecordingStopped = (methodprofilerresults) -> { // Purpur // Plazma - Completely remove Mojang's Profiler
this.stopRecordingMetrics();
resultConsumer.accept(methodprofilerresults);
};
this.onMetricsRecordingFinished = dumpConsumer;
- this.willStartRecordingMetrics = true;*/ // Purpur
+ this.willStartRecordingMetrics = true; // Purpur // Plazma - Completely remove Mojang's Profiler
}
public void stopRecordingMetrics() {
@@ -2976,6 +2977,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void cancelRecordingMetrics() {
//this.metricsRecorder.cancel(); // Purpur
}
+ */
public Path getWorldPath(LevelResource worldSavePath) {
return this.storageSource.getLevelPath(worldSavePath);
@@ -3026,6 +3028,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.isSaving;
}
+ /* // Plazma - Completely remove Mojang's Profiler
public boolean isTimeProfilerRunning() {
return false; //this.debugCommandProfilerDelayStart || this.debugCommandProfiler != null; // Purpur
}
@@ -3044,6 +3047,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return methodprofilerresults;
}
}
+ */ // Plazma - Completely remove Mojang's Profiler
public int getMaxChainedNeighborUpdates() {
return 1000000;
@@ -3157,6 +3161,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
+ /* // Plazma - Completely remove Mojang's Profiler
private static class TimeProfiler {
final long startNanos;
@@ -3206,6 +3211,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
+ */ // Plazma - Completely remove Mojang's 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 5c8cf225d936617b6c8d265527a19bdfa371a93b..e0aca1b5216a7fa14cd5fbfb6702e1e5c46cb6c1 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's 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) { // Plazma - Completely remove Mojang's 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 ebd4d2463f88535edd69a1b63a65a635a5592ca2..9523a2fa1e7019339bd166993ca04e1c0eab750b 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import org.slf4j.Logger;
public class ServerFunctionManager {
diff --git a/src/main/java/net/minecraft/server/commands/DebugCommand.java b/src/main/java/net/minecraft/server/commands/DebugCommand.java
index 06568cc308e06b16f43ec7facd5e2c4e36f3fee9..fd288704150960750b4e1d09031cfae8730e8b11 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's Profiler
import org.apache.commons.io.IOUtils;
+import org.bukkit.command.CommandSender;
import org.slf4j.Logger;
public class DebugCommand {
@@ -67,36 +68,22 @@ public class DebugCommand {
}
private static int start(CommandSourceStack source) throws CommandSyntaxException {
- MinecraftServer minecraftServer = source.getServer();
- if (minecraftServer.isTimeProfilerRunning()) {
- throw ERROR_ALREADY_RUNNING.create();
- } else {
- minecraftServer.startTimeProfiler();
- source.sendSuccess(() -> Component.translatable("commands.debug.started"), true);
- return 0;
- }
+ return removedMessage(source); // Plazma - Completely remove Mojang's Profiler
}
private static int stop(CommandSourceStack source) throws CommandSyntaxException {
- MinecraftServer minecraftServer = source.getServer();
- if (!minecraftServer.isTimeProfilerRunning()) {
- throw ERROR_NOT_RUNNING.create();
- } else {
- ProfileResults profileResults = minecraftServer.stopTimeProfiler();
- double d = (double)profileResults.getNanoDuration() / (double)TimeUtil.NANOSECONDS_PER_SECOND;
- double e = (double)profileResults.getTickDuration() / d;
- source.sendSuccess(
- () -> Component.translatable(
- "commands.debug.stopped",
- String.format(Locale.ROOT, "%.2f", d),
- profileResults.getTickDuration(),
- String.format(Locale.ROOT, "%.2f", e)
- ),
- true
- );
- return (int)e;
- }
+ return removedMessage(source); // Plazma - Completely remove Mojang's Profiler
+ }
+
+ // Plazma start - Completely remove Mojang's Profiler
+ private static int removedMessage(CommandSourceStack source) {
+ net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage();
+ source.getSender().sendMessage(mm.deserialize("<gold>Purpur has removed Mojang's Profiler to save your performance. Please use <click:suggest_command:'/spark'><grey>/spark</grey></click> instead"));
+ source.getSender().sendMessage(mm.deserialize("<gold>For more information, view its documentation at"));
+ source.getSender().sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>"));
+ return 0;
}
+ // Plazma end - Completely remove Mojang's Profiler
static class TraceCustomExecutor
extends CustomCommandExecutor.WithErrorHandling<CommandSourceStack>
@@ -267,6 +254,13 @@ public class DebugCommand {
return true;
}
+ // Plazma start - fix build
+ @Override
+ public CommandSender getBukkitSender(final CommandSourceStack wrapper) {
+ return wrapper.getBukkitSender();
+ }
+ // Plazma end - fix build
+
@Override
public void close() {
IOUtils.closeQuietly((Writer)this.output);
diff --git a/src/main/java/net/minecraft/server/commands/PerfCommand.java b/src/main/java/net/minecraft/server/commands/PerfCommand.java
index 8ac4d5dbe7f8febf4226f26a6b035282dcdf1b0f..3d6f649ab1efcc71f70f055cff0854c933672526 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's profiler
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang's profiler
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang's profiler
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
@@ -42,7 +42,8 @@ public class PerfCommand {
}
private static int startProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
- if (true) return removedMessage(source); // Purpur
+ return removedMessage(source); // Purpur // Plazma - Completely remove Mojang's profiler
+ /* // Plazma - Completely remove Mojang's profiler
MinecraftServer minecraftServer = source.getServer();
if (minecraftServer.isRecordingMetrics()) {
throw ERROR_ALREADY_RUNNING.create();
@@ -53,10 +54,12 @@ public class PerfCommand {
source.sendSuccess(() -> Component.translatable("commands.perf.started"), false);
return 0;
}
+ */ // Plazma - Completely remove Mojang's profiler
}
private static int stopProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
- if (true) return removedMessage(source); // Purpur
+ return removedMessage(source); // Purpur // Plazma - Completely remove Mojang's profiler
+ /* // Plazma - Completely remove Mojang's profiler
MinecraftServer minecraftServer = source.getServer();
if (!minecraftServer.isRecordingMetrics()) {
throw ERROR_NOT_RUNNING.create();
@@ -64,6 +67,7 @@ public class PerfCommand {
minecraftServer.finishRecordingMetrics();
return 0;
}
+ */ // Plazma - Completely remove Mojang's profiler
}
// Purpur start
@@ -78,6 +82,7 @@ public class PerfCommand {
}
// Purpur end
+ /* // Plazma - Completely remove Mojang's profiler
private static void saveResults(CommandSourceStack source, Path tempProfilingDirectory, MinecraftServer server) {
String string = String.format(
Locale.ROOT, "%s-%s-%s", Util.getFilenameFormattedDateTime(), server.getWorldData().getLevelName(), SharedConstants.getCurrentVersion().getId()
@@ -118,4 +123,6 @@ public class PerfCommand {
);
}
}
+ */ // Plazma - Completely remove Mojang's profiler
+
}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 808cf602ee77d8156b032fb1a2bd1f5a3a2c2579..77244ec4257bfe3b0f1fdcaf189a0d34a6b84707 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -871,11 +871,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return this.settings.getProperties().serverResourcePackInfo;
}
+ /* // Plazma - Completely remove Mojang's Profiler
@Override
public void endMetricsRecordingTick() {
super.endMetricsRecordingTick();
this.debugSampleSubscriptionTracker.tick(this.getTickCount());
}
+ */ // Plazma - Completely remove Mojang's Profiler
@Override
public SampleLogger getTickTimeLogger() {
diff --git a/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java b/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
index 7ea8c13c9993576c1408e710d3ceb9947b09090d..f49000bed3b273a170258ca3816b0b6d7b1e6bcf 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's Profiler
+//import net.minecraft.util.profiling.Zone; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.status.ChunkDependencies;
@@ -113,8 +113,8 @@ public class ChunkGenerationTask {
}
private void scheduleLayer(ChunkStatus targetStatus, boolean allowGeneration) {
- try (Zone zone = Profiler.get().zone("scheduleLayer")) {
- zone.addText(targetStatus::getName);
+ //try (Zone zone = Profiler.get().zone("scheduleLayer")) { // Plazma - Completely remove Mojang's Profiler
+ //zone.addText(targetStatus::getName); // Plazma - Completely remove Mojang's Profiler
int i = this.getRadiusForLayer(targetStatus, allowGeneration);
for (int j = this.pos.x - i; j <= this.pos.x + i; j++) {
@@ -125,7 +125,7 @@ public class ChunkGenerationTask {
}
}
}
- }
+ //} // Plazma - Completely remove Mojang's Profiler
}
private int getRadiusForLayer(ChunkStatus status, boolean generate) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e16f22dd82b4315da34af3c9a189d9d5fec0fd2f..bff50bec8433979d08d6b40c0c36fd3849ed37e5 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; // Plazma - Completely remove Mojang's profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's profiler
import net.minecraft.util.thread.BlockableEventLoop;
import net.minecraft.util.thread.ConsecutiveExecutor;
import net.minecraft.world.entity.Entity;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index bb168636cbf23b5b0c7232529e390f434546dc37..ffe43a82366355ac0a773ea90b4f2dab3858a8e0 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.util.thread.BlockableEventLoop;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.ai.village.poi.PoiManager;
@@ -497,19 +497,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
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(null, j, list); // Purpur
+ this.tickChunks(j, list); // Purpur // Plazma - Completely remove Mojang's Profiler
//gameprofilerfiller.pop(); // Purpur
} finally {
list.clear();
}
}
- this.broadcastChangedChunks(null); // Purpur
+ this.broadcastChangedChunks(); // Purpur // Plazma - Completely remove Mojang's Profiler
//gameprofilerfiller.pop(); // Purpur
}
}
- private void broadcastChangedChunks(ProfilerFiller profiler) { // Purpur
+ private void broadcastChangedChunks() { // Purpur // Plazma - Completely remove Mojang's Profiler
//profiler.push("broadcast"); // Purpur
Iterator iterator = this.chunkHoldersToBroadcast.iterator();
@@ -549,7 +549,7 @@ 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) {
+ private void tickChunks(long timeDelta, List<LevelChunk> chunks) { // Plazma - Completely remove Mojang's Profiler
//profiler.popPush("naturalSpawnCount"); // Purpur
int j = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e45b76862e38faf4ac8c203422151e06a3f598ad..b7f3ba9fe334362227c1c1624ad7922d624993f3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -79,8 +79,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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
@@ -868,9 +868,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's Profiler
this.serverLevelData.getScheduledEvents().tick(this.server, i);
- Profiler.get().pop();
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang's Profiler
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
// Purpur start
int incrementTicks = isDay() ? this.purpurConfig.daytimeTicks : this.purpurConfig.nighttimeTicks;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 17f5640ab2b6880895b3b96ae06db8b0e3c03a02..646123393dc7d28d2bc184343e3233961482fa2b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -102,8 +102,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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.effect.MobEffectInstance;
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 49cb116fd55e6d5cd36b9773b39191e4ab06b7e0..7a5c3210401e5833188f45619243afe5e08cd6a1 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's Profiler
import net.minecraft.util.thread.BlockableEventLoop;
import org.slf4j.Logger;
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..a5bb5f3fa3b5a232cdf9261c388bbb04a2d96b20 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's 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's Profiler
+ //profilerFiller.push(string); // Plazma - Completely remove Mojang's Profiler
long l = Util.getNanos();
runnable.run();
atomicLong.addAndGet(Util.getNanos() - l);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang's 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 abc92e09b7bb636612f04ace8232947c8d454e68..7c8990a713bf986cbb4e65f52aa1a3fdea7b14af 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
public interface ResourceManagerReloadListener extends PreparableReloadListener {
@Override
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 eb54f0cc67ca25e0ff6e423bcbcebab294bd5d95..11e2efcf07ab5a758812c598468d2f4561fa5264 100644
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
@@ -15,7 +15,7 @@ import java.util.Map.Entry;
import net.minecraft.core.HolderLookup;
import net.minecraft.resources.FileToIdConverter;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import org.slf4j.Logger;
public abstract class SimpleJsonResourceReloadListener<T> extends SimplePreparableReloadListener<Map<ResourceLocation, T>> {
@@ -39,7 +39,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) { // Plazma - Completely remove Mojang's Profiler
Map<ResourceLocation, T> map = new HashMap<>();
scanDirectory(resourceManager, this.directory, 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..4d986ee7bd823386c0ed0e54c1980c9c349bb791 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's 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.supplyAsync(() -> this.prepare(manager), prepareExecutor) // Plazma - Completely remove Mojang's Profiler
.thenCompose(synchronizer::wait)
- .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, Profiler.get()), applyExecutor);
+ .thenAcceptAsync(prepared -> this.apply(prepared, manager), applyExecutor); // Plazma - Completely remove Mojang's Profiler
}
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
+ protected abstract T prepare(ResourceManager manager); // Plazma - Completely remove Mojang's Profiler
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
+ protected abstract void apply(T prepared, ResourceManager manager); // Plazma - Completely remove Mojang's 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..699f69421a36c78bd0cd728e86fe0e20bb515de4 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's Profiler
+//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang's 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 TaskScheduler<T>, Runnable { // Plazma - Completely remove Mojang's 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's Profiler
}
private boolean canBeScheduled() {
@@ -108,10 +108,12 @@ public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements
return this.name;
}
+ /* // Plazma - Completely remove Mojang's Profiler
@Override
public List<MetricSampler> profiledMetrics() {
return ImmutableList.of(MetricSampler.create(this.name + "-queue-size", MetricCategory.CONSECUTIVE_EXECUTORS, this::size));
}
+ */ // Plazma - Completely remove Mojang's 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..f91227bc1a7c650483c9b46b30ac06a9597997f2 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang's Profiler
import org.slf4j.Logger;
-public abstract class BlockableEventLoop<R extends Runnable> implements ProfilerMeasured, TaskScheduler<R>, Executor {
+public abstract class BlockableEventLoop<R extends Runnable> implements TaskScheduler<R>, Executor { // Plazma - Completely remove Mojang's 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's Profiler
}
protected abstract boolean shouldRun(R task);
@@ -160,10 +160,12 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
}
}
+ /* // Plazma - Completely remove Mojang's Profiler
@Override
public List<MetricSampler> profiledMetrics() {
return ImmutableList.of(MetricSampler.create(this.name + "-pending-tasks", MetricCategory.EVENT_LOOPS, this::getPendingTasksCount));
}
+ */ // Plazma - Completely remove Mojang's 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..61f704fc25c45367185633708852ee4bc4084528 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's 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's 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 8c724698d57caf5ca65b8cb0bb21d12250258743..a27d7545c36a32378084646b750ad91a3c954c29 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.Nameable;
@@ -4060,16 +4060,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's Profiler
- gameprofilerfiller.push("teleportSameDimension");
+ //gameprofilerfiller.push("teleportSameDimension"); // Plazma - Completely remove Mojang's 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's Profiler
return this;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d4f6c8732f4e304c690999c0cbd7636a90162504..5144a761577c2a2448aaaa35cf41328a53659a50 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -73,8 +73,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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.damagesource.CombatRules;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 8e5ad4cd6c8f61661b87dc96ba914c0bcd199879..d242eeb3dde8f379a7baad430f2c22ab3ca8a3c9 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
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 74c5914bc51cff128d4b86853316e5e51e02b416..129c907e842f4f16ad13c490672bfec6eaba620e 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
public class GoalSelector {
private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() {
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 a5289b6c453c24cb7b8b3a301b72c3adf92c1d13..c7c6385c71c5bfae5818976008feececf5890654 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.attributes.Attributes;
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 8f5a5db1a07fa6a95ecfacaab2f9de609202faf4..8bd18b5bf660cb307b7d405a497906ae6608b6b4 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
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 026cd57df33476841ed3a8f9fdc4d17a77e037b0..9ed118034e738f662a507553869526328b2a0795 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.SimpleContainer;
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 84516dcfc6cd0fe16c26538ccb86fb5c85b44ffa..b4ec352826aef4fa1e9d912eb26b3f2470d811e8 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
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 c80d74caa393a31e09f2776cdb3cb950ef99e2ef..8a20f056bde735ac896282918c2bed036178fbc7 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
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 39cdecc382a71ef643d382ac506249bbb8df3d34..a8c68b4e17456221d601696571135a281eb1555e 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
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 94ca735513901a180d42ac1cfd48d841142a6ef5..542cd59bb0eecac3845c3eefdd20e9105b1448c0 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AgeableMob;
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 cc5c172b2fccc5fc59337203ed2b6edb2abc0c22..7b9e7d3595bd6add8f76c4d9bf9758c78ecce962 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
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 ebf53d48b09918c7453f982a5e4f9a1584dfc544..c1f79d16fd2fc1b5642d9be68df81465c4b2eb2b 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
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 f853730cee4fad2f3a5711e38918c65dcb1dc038..cd1845f6d7552670ae29c7a5b087220f3b4fc0e9 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
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 f30ad422f19757664228f2064465fbcb22bb54f6..0cff4d4ee945ab5b6362648bf932af796d16a601 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
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 0bc771e20a9bab139cd3fc03ff40baabf787b2f7..e60c2dbc2188ea32459b536b0e3f3fea36f70776 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AnimationState;
import net.minecraft.world.entity.Entity;
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 7b5f9284972b3a6bd8125891b23f73438e875c08..6a17c30afc7863dfa55f1e07ea29b1fb0166adc7 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
@@ -13,8 +13,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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.AnimationState;
import net.minecraft.world.entity.Entity;
@@ -121,10 +121,10 @@ public class Creaking extends Monster {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller profilerFiller = Profiler.get();
- profilerFiller.push("creakingBrain");
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang's Profiler
+ //profilerFiller.push("creakingBrain"); // Plazma - Completely remove Mojang's Profiler
this.getBrain().tick((ServerLevel)this.level(), this);
- profilerFiller.pop();
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang's 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 7afde99f81ec222ecbffbdcdad3aa6404e8221e0..8b91472441a17572d8bb47e42402c585b26aeeb6 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
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 b53e4a312ea0dbbd16e948e61c3f6b836d46f3b8..8e7c737263f55fdd4a2adbab4a9d208674a55639 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
@@ -6,8 +6,8 @@ import java.util.List;
import javax.annotation.Nullable;
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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
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 719179fb232a4f39a2c1642cc0e9593f4dea4bb8..f5c5abbb919455709636d4037b8daa63a2c212e2 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.EntitySpawnReason;
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 9f542e4f0077a6abc89fdec1a4bf3e8f40203b2a..5350c7a6085edc4f8529f443091d52cb70c62efd 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffectInstance;
@@ -318,7 +318,7 @@ public class Warden extends Monster implements VibrationSystem {
@Override
protected void customServerAiStep(ServerLevel world) {
- ProfilerFiller gameprofilerfiller = Profiler.get();
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang's Profiler
//gameprofilerfiller.push("wardenBrain"); // Purpur
this.getBrain().tick(world, this);
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 b4ffad429ace965f16ebf47119c880b709b27f2e..50bed3677f7e38d19ceda0dff0c499957312b2ad 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
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 26814c13559d82e44546f8b2834a90cc58941a49..22ecef07399ab9d9bde3cd9a3024d070f129c6bd 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -29,7 +29,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's Profiler
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.crafting.display.RecipeDisplay;
@@ -93,7 +93,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
}
@Override
- protected RecipeMap prepare(ResourceManager manager, ProfilerFiller profiler) {
+ protected RecipeMap prepare(ResourceManager manager) { // Plazma - Completely remove Mojang's Profiler
SortedMap<ResourceLocation, Recipe<?>> sortedmap = new TreeMap();
SimpleJsonResourceReloadListener.scanDirectory(manager, Registries.elementsDirPath(Registries.RECIPE), this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedmap);
@@ -108,7 +108,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) { // Plazma - Completely remove Mojang's 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 ad15fc9f329f5ea7fa0d0d88c937b2f36e0f2f3d..d03a89d264cafb752e6a2f07558c119a0ee23253 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -35,8 +35,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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.TickRateManager;
import net.minecraft.world.damagesource.DamageSource;
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 7f936a7ba994ccb51c17168c798b42dde0877a5d..49e255a7825d6c38e3851c121ecc4e6a6e0402f8 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
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's Profiler
- gameprofilerfiller.push("spawner");
+ //gameprofilerfiller.push("spawner"); // Plazma - Completely remove Mojang's Profiler
Iterator iterator = spawnableGroups.iterator();
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
index 3c3d219c9339f64c23ec0b31783bf68a4423636c..ce3eb065081cfd7bc96ac95595f80bf5eb8bb263 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
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's Profiler
- gameprofilerfiller.push("explosion_blocks");
+ //gameprofilerfiller.push("explosion_blocks"); // Plazma - Completely remove Mojang's Profiler
this.interactWithBlocks(list);
- gameprofilerfiller.pop();
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang's 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 15c83c6f5f56d6a27911d3bbd326cef1c21b1e58..6656cc0c9041d954d6d318cdefaef86ebee4c2bc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -25,8 +25,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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.Level;
@@ -405,7 +405,7 @@ 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's Profiler
//gameprofilerfiller.push("updateSkyLightSources"); // Purpur
// Paper - rewrite chunk system
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 91abbda59446d462979dddc4b380c6f24d0b4c92..f1aa182d7cc0ffac23ddb1f77335c61ca9f6f720 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; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.entity.Mob;
import net.minecraft.world.level.PathNavigationRegion;
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
index 452fb3442221fd66debfe1e1d6e85ee17951e556..eceb6110cd61c113d762e5c069108077421d03be 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's Profiler
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.levelgen.structure.BoundingBox;
@@ -81,7 +81,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
//ProfilerFiller profilerFiller = Profiler.get(); // Purpur
//profilerFiller.push("collect"); // Purpur
- this.collectTicks(time, maxTicks, null); // Purpur
+ this.collectTicks(time, maxTicks); // Purpur // Plazma - Completely remove Mojang's Profiler
//profilerFiller.popPush("run"); // Purpur
//profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size()); // Purpur
this.runCollectedTicks(ticker);
@@ -90,7 +90,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
//profilerFiller.pop(); // Purpur
}
- private void collectTicks(long time, int maxTicks, ProfilerFiller profiler) {
+ private void collectTicks(long time, int maxTicks) { // Plazma - Completely remove Mojang's Profiler
this.sortContainersToTick(time);
//profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
this.drainContainers(time, maxTicks);