1485 lines
87 KiB
Diff
1485 lines
87 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 f9d0e8ee9414b3897f268ba78a1469ddf868f51a..58d89000af36f72d629d8e0873d6efbbbb720fe1 100644
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
@@ -429,7 +429,7 @@ public class Commands {
|
|
int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT);
|
|
|
|
try {
|
|
- ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j, minecraftserver.getProfiler());
|
|
+ ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j/*, minecraftserver.getProfiler()*/); // 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 dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0ab7f7e72 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -104,18 +104,18 @@ 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.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.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;
|
|
@@ -222,14 +222,14 @@ 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 ProfilerFiller profiler;
|
|
- 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's Profiler
|
|
+ // private ProfilerFiller profiler; // 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; // Plazma - Completely remove Mojang's Profiler
|
|
private ServerConnectionListener connection;
|
|
public final ChunkProgressListenerFactory progressListenerFactory;
|
|
@Nullable
|
|
@@ -2586,10 +2586,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
public ProfilerFiller getProfiler() {
|
|
//if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur // Purpur - TODO: Pufferfish
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
|
|
|
@@ -2833,6 +2835,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// CraftBukkit end
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
private void startMetricsRecordingTick() {
|
|
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) -> {
|
|
@@ -2859,12 +2862,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 - IDE problem
|
|
this.stopRecordingMetrics();
|
|
resultConsumer.accept(methodprofilerresults);
|
|
};
|
|
this.onMetricsRecordingFinished = dumpConsumer;
|
|
- this.willStartRecordingMetrics = true;*/ // Purpur
|
|
+ this.willStartRecordingMetrics = true; // Purpur // Plazma - IDE problem
|
|
}
|
|
|
|
public void stopRecordingMetrics() {
|
|
@@ -2879,6 +2882,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
//this.metricsRecorder.cancel(); // Purpur
|
|
//this.profiler = this.metricsRecorder.getProfiler(); // Purpur
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public Path getWorldPath(LevelResource worldSavePath) {
|
|
return this.storageSource.getLevelPath(worldSavePath);
|
|
@@ -2929,6 +2933,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
|
|
}
|
|
@@ -2947,6 +2952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
return methodprofilerresults;
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public int getMaxChainedNeighborUpdates() {
|
|
return 1000000;
|
|
@@ -2998,6 +3004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
private static class TimeProfiler {
|
|
|
|
final long startNanos;
|
|
@@ -3047,6 +3054,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 b4f15c51faae544bc0a4fcc33760df66e1397f87..19803d24870db355a1567d0ec5132108724563b1 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
@@ -26,7 +26,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;
|
|
|
|
public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
|
|
@@ -42,7 +42,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
|
|
this.registries = registryLookup;
|
|
}
|
|
|
|
- protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager, ProfilerFiller profiler) {
|
|
+ protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler
|
|
RegistryOps<JsonElement> registryops = this.registries.createSerializationContext(JsonOps.INSTANCE);
|
|
Builder<ResourceLocation, AdvancementHolder> builder = ImmutableMap.builder();
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
index bae0d208b31aa0a6977c30f2f8484ab3c316bc71..05d8ca83abf69226aae43ec6f75055726de06e8a 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
@@ -26,7 +26,7 @@ import net.minecraft.server.packs.resources.PreparableReloadListener;
|
|
import net.minecraft.server.packs.resources.Resource;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.tags.TagLoader;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
import net.minecraft.world.phys.Vec2;
|
|
import net.minecraft.world.phys.Vec3;
|
|
import org.slf4j.Logger;
|
|
@@ -65,8 +65,8 @@ public class ServerFunctionLibrary implements PreparableReloadListener {
|
|
public CompletableFuture<Void> reload(
|
|
PreparableReloadListener.PreparationBarrier synchronizer,
|
|
ResourceManager manager,
|
|
- ProfilerFiller prepareProfiler,
|
|
- ProfilerFiller applyProfiler,
|
|
+ // ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
+ // ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
Executor prepareExecutor,
|
|
Executor applyExecutor
|
|
) {
|
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
index 775b24a9e55528944b629fd85e1f6ebef9a9892f..579e0b0040ea3315fc7c0e209574b7fef799d2d1 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
@@ -16,7 +16,7 @@ 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.ProfilerFiller;
|
|
+// 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/PerfCommand.java b/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
index 8c587f829c5e8c6b6df3150024c4ae704988c47b..319f484b535143a94ee2da11114acacce5d12ccf 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
@@ -1,36 +1,39 @@
|
|
package net.minecraft.server.commands;
|
|
|
|
+// Plazma start - Completely remove Mojang's Profiler
|
|
import com.mojang.brigadier.CommandDispatcher;
|
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|
-import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
|
-import com.mojang.logging.LogUtils;
|
|
-import java.io.IOException;
|
|
-import java.nio.file.Path;
|
|
-import java.nio.file.Paths;
|
|
-import java.util.Locale;
|
|
-import java.util.function.Consumer;
|
|
-import net.minecraft.FileUtil;
|
|
-import net.minecraft.SharedConstants;
|
|
-import net.minecraft.SystemReport;
|
|
-import net.minecraft.Util;
|
|
+// import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
|
+// import com.mojang.logging.LogUtils;
|
|
+// import java.io.IOException;
|
|
+// import java.nio.file.Path;
|
|
+// import java.nio.file.Paths;
|
|
+// import java.util.Locale;
|
|
+// import java.util.function.Consumer;
|
|
+// import net.minecraft.FileUtil;
|
|
+// import net.minecraft.SharedConstants;
|
|
+// import net.minecraft.SystemReport;
|
|
+// import net.minecraft.Util;
|
|
import net.minecraft.commands.CommandSourceStack;
|
|
import net.minecraft.commands.Commands;
|
|
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 org.apache.commons.io.FileUtils;
|
|
-import org.slf4j.Logger;
|
|
+// 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 org.apache.commons.io.FileUtils;
|
|
+// import org.slf4j.Logger;
|
|
|
|
public class PerfCommand {
|
|
+ /*
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final SimpleCommandExceptionType ERROR_NOT_RUNNING = new SimpleCommandExceptionType(Component.translatable("commands.perf.notRunning"));
|
|
private static final SimpleCommandExceptionType ERROR_ALREADY_RUNNING = new SimpleCommandExceptionType(
|
|
Component.translatable("commands.perf.alreadyRunning")
|
|
);
|
|
+ */
|
|
|
|
public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
|
|
dispatcher.register(
|
|
@@ -42,6 +45,9 @@ public class PerfCommand {
|
|
}
|
|
|
|
private static int startProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
|
|
+ source.sendFailure(Component.literal("Vanilla Profiler is removed due to Performance issues. Use Spark instead."));
|
|
+ return 1;
|
|
+ /*
|
|
MinecraftServer minecraftServer = source.getServer();
|
|
if (minecraftServer.isRecordingMetrics()) {
|
|
throw ERROR_ALREADY_RUNNING.create();
|
|
@@ -52,9 +58,13 @@ public class PerfCommand {
|
|
source.sendSuccess(() -> Component.translatable("commands.perf.started"), false);
|
|
return 0;
|
|
}
|
|
+ */
|
|
}
|
|
|
|
private static int stopProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
|
|
+ source.sendFailure(Component.literal("Vanilla Profiler is removed due to Performance issues. Use Spark instead."));
|
|
+ return 1;
|
|
+ /*
|
|
MinecraftServer minecraftServer = source.getServer();
|
|
if (!minecraftServer.isRecordingMetrics()) {
|
|
throw ERROR_NOT_RUNNING.create();
|
|
@@ -62,8 +72,10 @@ public class PerfCommand {
|
|
minecraftServer.finishRecordingMetrics();
|
|
return 0;
|
|
}
|
|
+ */
|
|
}
|
|
|
|
+ /*
|
|
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()
|
|
@@ -104,4 +116,6 @@ public class PerfCommand {
|
|
);
|
|
}
|
|
}
|
|
+ */
|
|
}
|
|
+// Plazma end - 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 1dc1536df986862396aa0f58e834c9c1599bf38e..2d704c3e24505314ec9754cb407fce54e914511b 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -923,11 +923,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/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
index 9162c6338dbb516ce60f4853e57da6e49be79282..809d74ce3a0b02538b1543346485731828a9f139 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
@@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
|
import net.minecraft.server.network.ServerPlayerConnection;
|
|
import net.minecraft.util.CsvOutput;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
import net.minecraft.util.thread.BlockableEventLoop;
|
|
import net.minecraft.util.thread.ProcessorHandle;
|
|
import net.minecraft.util.thread.ProcessorMailbox;
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index 53c0b48966558f43bb9bd7d29d9588f9d83e0de7..7ff845a0ddb308e8b69881f05086105f7f83e605 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -21,7 +21,7 @@ import net.minecraft.core.SectionPos;
|
|
import net.minecraft.network.protocol.Packet;
|
|
import net.minecraft.server.level.progress.ChunkProgressListener;
|
|
import net.minecraft.util.VisibleForDebug;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// 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;
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index 94c61a1ace5b736e770a801990414f49ef8831e9..49307871db084a7f22a0f8570a27c9aa8f7f2f30 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -79,7 +79,7 @@ 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.ProfilerFiller;
|
|
+// 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;
|
|
@@ -706,15 +706,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
|
|
|
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
|
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma
|
|
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), /*minecraftserver::getProfiler,*/ false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang's Profiler
|
|
this.pvpMode = minecraftserver.isPvpAllowed();
|
|
this.convertable = convertable_conversionsession;
|
|
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
|
// CraftBukkit end
|
|
this.players = Lists.newArrayList();
|
|
this.entityTickList = new EntityTickList();
|
|
- this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier());
|
|
- this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier());
|
|
+ this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler
|
|
+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler
|
|
this.pathTypesByPosCache = new PathTypeCache();
|
|
this.navigatingMobs = new ObjectOpenHashSet();
|
|
this.blockEvents = new ObjectLinkedOpenHashSet();
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
|
index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..097d7101c802070f554345057bf34dcb6f504cf3 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
|
@@ -2,14 +2,14 @@ package net.minecraft.server.packs.resources;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Executor;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public interface PreparableReloadListener {
|
|
CompletableFuture<Void> reload(
|
|
PreparableReloadListener.PreparationBarrier synchronizer,
|
|
ResourceManager manager,
|
|
- ProfilerFiller prepareProfiler,
|
|
- ProfilerFiller applyProfiler,
|
|
+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
Executor prepareExecutor,
|
|
Executor applyExecutor
|
|
);
|
|
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 0c25f3ed0a8a538edc7cadd3476100c9b3631f7a..ea73502f9e2ac9422031ebc24bf94aaae34e6ba2 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
@@ -3,15 +3,15 @@ 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.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public interface ResourceManagerReloadListener extends PreparableReloadListener {
|
|
@Override
|
|
default CompletableFuture<Void> reload(
|
|
PreparableReloadListener.PreparationBarrier synchronizer,
|
|
ResourceManager manager,
|
|
- ProfilerFiller prepareProfiler,
|
|
- ProfilerFiller applyProfiler,
|
|
+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
Executor prepareExecutor,
|
|
Executor 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 8246e06392c06f70309c1876561bd00b59ba589f..0df1be595c6784f06eab328f6b7f6f62a5e056ec 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
@@ -12,7 +12,7 @@ import java.util.Map.Entry;
|
|
import net.minecraft.resources.FileToIdConverter;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.util.GsonHelper;
|
|
-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 extends SimplePreparableReloadListener<Map<ResourceLocation, JsonElement>> {
|
|
@@ -26,7 +26,7 @@ public abstract class SimpleJsonResourceReloadListener extends SimplePreparableR
|
|
}
|
|
|
|
@Override
|
|
- protected Map<ResourceLocation, JsonElement> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
|
|
+ protected Map<ResourceLocation, JsonElement> prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Mojang's Profiler
|
|
Map<ResourceLocation, JsonElement> map = new HashMap<>();
|
|
scanDirectory(resourceManager, this.directory, this.gson, 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 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..2bd55b0353b6db1e2d1ae7d7e0890c352283dc7f 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
@@ -2,24 +2,24 @@ package net.minecraft.server.packs.resources;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Executor;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//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,
|
|
- ProfilerFiller prepareProfiler,
|
|
- ProfilerFiller applyProfiler,
|
|
+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
Executor prepareExecutor,
|
|
Executor applyExecutor
|
|
) {
|
|
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, prepareProfiler), prepareExecutor)
|
|
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager/*, prepareProfiler*/), prepareExecutor) // Plazma - Completely remove Mojang's Profiler
|
|
.thenCompose(synchronizer::wait)
|
|
- .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, applyProfiler), applyExecutor);
|
|
+ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager/*, applyProfiler*/), applyExecutor); // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
|
|
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang's 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's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
index 5a8ed7c2a0217366c0d7e6341006037c114f8097..8f3990ca74d00d8566255687a778b4ed749bbde0 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
@@ -10,7 +10,7 @@ import java.util.concurrent.Executor;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import net.minecraft.Util;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.InactiveProfiler;
|
|
+//import net.minecraft.util.profiling.InactiveProfiler; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public class SimpleReloadInstance<S> implements ReloadInstance {
|
|
private static final int PREPARATION_PROGRESS_WEIGHT = 2;
|
|
@@ -38,7 +38,7 @@ public class SimpleReloadInstance<S> implements ReloadInstance {
|
|
manager,
|
|
reloaders,
|
|
(synchronizer, resourceManager, reloader, prepare, apply) -> reloader.reload(
|
|
- synchronizer, resourceManager, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE, prepareExecutor, apply
|
|
+ synchronizer, resourceManager, /*InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE,*/ prepareExecutor, apply
|
|
),
|
|
initialStage
|
|
);
|
|
diff --git a/src/main/java/net/minecraft/tags/TagManager.java b/src/main/java/net/minecraft/tags/TagManager.java
|
|
index cd178d9a30263a3fc68d2b997974a1f9a0c8bab5..f81cd35f9babe7906d3738aa135ac88d78cdfdab 100644
|
|
--- a/src/main/java/net/minecraft/tags/TagManager.java
|
|
+++ b/src/main/java/net/minecraft/tags/TagManager.java
|
|
@@ -14,7 +14,7 @@ import net.minecraft.resources.ResourceKey;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public class TagManager implements PreparableReloadListener {
|
|
private static final Map<ResourceKey<? extends Registry<?>>, String> CUSTOM_REGISTRY_DIRECTORIES = Map.of(
|
|
@@ -49,8 +49,8 @@ public class TagManager implements PreparableReloadListener {
|
|
public CompletableFuture<Void> reload(
|
|
PreparableReloadListener.PreparationBarrier synchronizer,
|
|
ResourceManager manager,
|
|
- ProfilerFiller prepareProfiler,
|
|
- ProfilerFiller applyProfiler,
|
|
+ // ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
+ // ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler
|
|
Executor prepareExecutor,
|
|
Executor applyExecutor
|
|
) {
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
|
index 600a7036b503f60cc9c95f189f73c2dbf020e2e1..bbc7e78d38a720b00456efd71f7d8ee36bf967ff 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.mojang.logging.LogUtils;
|
|
@@ -21,8 +22,9 @@ import net.minecraft.Util;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
import org.slf4j.Logger;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class ActiveProfiler implements ProfileCollector {
|
|
+interface ActiveProfiler {/* implements ProfileCollector { // Plazma - Completely remove Mojang's Profiler
|
|
private static final long WARNING_TIME_NANOS = Duration.ofMillis(100L).toNanos();
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final List<String> paths = Lists.newArrayList();
|
|
@@ -203,4 +205,5 @@ public class ActiveProfiler implements ProfileCollector {
|
|
return Object2LongMaps.unmodifiable(this.counters);
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java b/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java
|
|
index 4424bca7effa4fef26453afcd06d86e6a30d7b8f..04012ab769a21bff11305fb4f01e72f71e3b5bd8 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.util.function.IntSupplier;
|
|
import java.util.function.LongSupplier;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class ContinuousProfiler {
|
|
+interface ContinuousProfiler { /* // Plazma - Completely remove Mojang's Profiler
|
|
private final LongSupplier realTime;
|
|
private final IntSupplier tickCount;
|
|
private ProfileCollector profiler = InactiveProfiler.INSTANCE;
|
|
@@ -32,4 +34,5 @@ public class ContinuousProfiler {
|
|
public ProfileResults getResults() {
|
|
return this.profiler.getResults();
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java b/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java
|
|
index 843e28baf089349851d7794c496e518ca396e92d..25d0ffdfdd50cfd794f735a00bc0131a102d7911 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java
|
|
@@ -1,10 +1,12 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.nio.file.Path;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class EmptyProfileResults implements ProfileResults {
|
|
+interface EmptyProfileResults { /*implements ProfileResults { // Plazma - Completely remove Mojang's Profiler
|
|
public static final EmptyProfileResults EMPTY = new EmptyProfileResults();
|
|
|
|
private EmptyProfileResults() {
|
|
@@ -44,4 +46,5 @@ public class EmptyProfileResults implements ProfileResults {
|
|
public String getProfilerResults() {
|
|
return "";
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java b/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java
|
|
index fc3a3a32e6432c284b29216989385f8b0993c315..ac32c5e8aab03f949b7848cac35e475f30810ecb 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.google.common.base.Splitter;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
@@ -22,8 +23,9 @@ import net.minecraft.Util;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.slf4j.Logger;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class FilledProfileResults implements ProfileResults {
|
|
+interface FilledProfileResults {/* implements ProfileResults { // Plazma - Completely remove Mojang's Profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final ProfilerPathEntry EMPTY = new ProfilerPathEntry() {
|
|
@Override
|
|
@@ -338,4 +340,5 @@ public class FilledProfileResults implements ProfileResults {
|
|
}
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java b/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java
|
|
index 5d2d8018460c04f7314c872441a8b21bc296c1ea..124beebb323e39b7cc9cc123019cb32d13b384cb 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java
|
|
@@ -1,13 +1,15 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.google.common.collect.ImmutableSet;
|
|
import java.util.Set;
|
|
import java.util.function.Supplier;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class InactiveProfiler implements ProfileCollector {
|
|
+interface InactiveProfiler { /* implements ProfileCollector { // Plazma - Completely remove Mojang's Profiler
|
|
public static final InactiveProfiler INSTANCE = new InactiveProfiler();
|
|
|
|
private InactiveProfiler() {
|
|
@@ -68,4 +70,5 @@ public class InactiveProfiler implements ProfileCollector {
|
|
public Set<Pair<String, MetricCategory>> getChartedPaths() {
|
|
return ImmutableSet.of();
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ProfileCollector.java b/src/main/java/net/minecraft/util/profiling/ProfileCollector.java
|
|
index fe47a3ce6318ad74bd4d9b10dbf5ee06c94b6939..b3c84a9bca9b66c58837b94732bd9be12c213029 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ProfileCollector.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ProfileCollector.java
|
|
@@ -1,15 +1,18 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.util.Set;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public interface ProfileCollector extends ProfilerFiller {
|
|
+interface ProfileCollector { /* extends ProfilerFiller { // Plazma - Completely remove Mojang's Profiler
|
|
ProfileResults getResults();
|
|
|
|
@Nullable
|
|
ActiveProfiler.PathEntry getEntry(String name);
|
|
|
|
Set<Pair<String, MetricCategory>> getChartedPaths();
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ProfileResults.java b/src/main/java/net/minecraft/util/profiling/ProfileResults.java
|
|
index afefd549cf9792a91dd8919c12697a693200d042..46c2447650e108065a19420a71e29775f69c746f 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ProfileResults.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ProfileResults.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.nio.file.Path;
|
|
import java.util.List;
|
|
+ */
|
|
|
|
-public interface ProfileResults {
|
|
+interface ProfileResults { /* { // Plazma - Completely remove Mojang's Profiler
|
|
char PATH_SEPARATOR = '\u001e';
|
|
|
|
List<ResultField> getTimes(String parentPath);
|
|
@@ -31,4 +33,5 @@ public interface ProfileResults {
|
|
static String demanglePath(String path) {
|
|
return path.replace('\u001e', '.');
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
|
index 223c3665126c576eddb1a8f7c9f5bc60c6ff9818..7623bbd58d9a95e04e9260f85d39e5f9ebb1c75b 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public interface ProfilerFiller {
|
|
+interface ProfilerFiller { /* // Plazma - Completely remove Mojang's Profiler
|
|
String ROOT = "root";
|
|
|
|
@io.papermc.paper.annotation.DoNotUse // Purpur
|
|
@@ -113,4 +115,5 @@ public interface ProfilerFiller {
|
|
};
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java b/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java
|
|
index c073262f663309e6f73e67b303927b3996ea0c16..2fae8377f0cb3ff22c2d4e2b8e8322f76e00f5ff 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java
|
|
@@ -1,8 +1,8 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
-import it.unimi.dsi.fastutil.objects.Object2LongMap;
|
|
+// <editor-fold desc="Removed class" defaultstate="collapsed"> import it.unimi.dsi.fastutil.objects.Object2LongMap; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public interface ProfilerPathEntry {
|
|
+interface ProfilerPathEntry { /* // Plazma - Completely remove Mojang's Profiler
|
|
long getDuration();
|
|
|
|
long getMaxDuration();
|
|
@@ -10,4 +10,5 @@ public interface ProfilerPathEntry {
|
|
long getCount();
|
|
|
|
Object2LongMap<String> getCounters();
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ResultField.java b/src/main/java/net/minecraft/util/profiling/ResultField.java
|
|
index 179dd48aeeacc0b2a42c99f6213dd23683159681..892926e44cc8a271a839881e108f6aa8420f60e6 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/ResultField.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/ResultField.java
|
|
@@ -1,6 +1,6 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
-public final class ResultField implements Comparable<ResultField> {
|
|
+interface ResultField { /* <editor-fold desc="Removed class" defaultstate="collapsed"> implements Comparable<ResultField> { // Plazma - Completely remove Mojang's Profiler
|
|
public final double percentage;
|
|
public final double globalPercentage;
|
|
public final long count;
|
|
@@ -25,4 +25,5 @@ public final class ResultField implements Comparable<ResultField> {
|
|
public int getColor() {
|
|
return (this.name.hashCode() & 11184810) + 4473924;
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java b/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java
|
|
index 563d82c9153c88b651d6991caae4374c285a3065..a028709d3e1fba0e697b8ad097efb95311a2403e 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java
|
|
@@ -1,13 +1,15 @@
|
|
package net.minecraft.util.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.mojang.logging.LogUtils;
|
|
import java.io.File;
|
|
import java.util.function.LongSupplier;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.Util;
|
|
import org.slf4j.Logger;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class SingleTickProfiler {
|
|
+interface SingleTickProfiler { /* // Plazma - Completely remove Mojang's Profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final LongSupplier realTime;
|
|
private final long saveThreshold;
|
|
@@ -47,4 +49,5 @@ public class SingleTickProfiler {
|
|
public static ProfilerFiller decorateFiller(ProfilerFiller profiler, @Nullable SingleTickProfiler monitor) {
|
|
return monitor != null ? ProfilerFiller.tee(monitor.startTick(), profiler) : profiler;
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java
|
|
index fc84538abcb3e8617e91a4b54c968f1ab2900cf8..b2e626bb31ffef87175fbd1aa316062a445c032d 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java
|
|
@@ -1,6 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics;
|
|
|
|
-public enum MetricCategory {
|
|
+interface MetricCategory { /* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
PATH_FINDING("pathfinding"),
|
|
EVENT_LOOPS("event-loops"),
|
|
MAIL_BOXES("mailboxes"),
|
|
@@ -20,4 +20,5 @@ public enum MetricCategory {
|
|
public String getDescription() {
|
|
return this.description;
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java
|
|
index dd2bf15d22e5839ca986d3e824fb785786af86c8..4e6d03e2e7975ad2299f3ca9944c3e29f6d24eb7 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import io.netty.buffer.ByteBuf;
|
|
import io.netty.buffer.ByteBufAllocator;
|
|
import it.unimi.dsi.fastutil.ints.Int2DoubleMap;
|
|
@@ -9,8 +10,9 @@ import java.util.function.Consumer;
|
|
import java.util.function.DoubleSupplier;
|
|
import java.util.function.ToDoubleFunction;
|
|
import javax.annotation.Nullable;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class MetricSampler {
|
|
+interface MetricSampler { /* // Plazma - Completely remove Mojang's Profiler
|
|
private final String name;
|
|
private final MetricCategory category;
|
|
private final DoubleSupplier sampler;
|
|
@@ -210,4 +212,5 @@ public class MetricSampler {
|
|
return bl2;
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java
|
|
index c22a91ee393744a4eaffe1fff168b18ac1bc55bd..f93afd84b47041f6ccc6a651fbe1831931befbc7 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java
|
|
@@ -1,13 +1,15 @@
|
|
package net.minecraft.util.profiling.metrics;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed">
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Objects;
|
|
import java.util.WeakHashMap;
|
|
import java.util.stream.Collectors;
|
|
import javax.annotation.Nullable;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class MetricsRegistry {
|
|
+interface MetricsRegistry { /* // Plazma - Completely remove Mojang's Profiler
|
|
public static final MetricsRegistry INSTANCE = new MetricsRegistry();
|
|
private final WeakHashMap<ProfilerMeasured, Void> measuredInstances = new WeakHashMap<>();
|
|
|
|
@@ -82,4 +84,5 @@ public class MetricsRegistry {
|
|
return Objects.hash(super.hashCode(), this.delegates);
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java
|
|
index 07f78c451e5330296c38f6b599d979610a03381f..b6ea87aa3fef7b03ec83d789b9ce588f1b2d9b13 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling.metrics;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.util.Set;
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.ProfileCollector;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public interface MetricsSamplerProvider {
|
|
- Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier);
|
|
+interface MetricsSamplerProvider {
|
|
+ //Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier); </editor-fold> // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java b/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java
|
|
index 3057e9caa1936d114e07b3dfbd0dffd8aca1223c..976dcc062391c6b3a05a8848b029ee8424cda63b 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java
|
|
@@ -2,6 +2,6 @@ package net.minecraft.util.profiling.metrics;
|
|
|
|
import java.util.List;
|
|
|
|
-public interface ProfilerMeasured {
|
|
- List<MetricSampler> profiledMetrics();
|
|
+interface ProfilerMeasured { // Plazma - Completely remove Mojang's Profiler
|
|
+ // List<MetricSampler> profiledMetrics(); </editor-fold> // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java
|
|
index 9b8e774dfbfc9e06e9bf04ff789737511d6966ba..746b7f8a136d2611e1d72e71425ee32a219454dd 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.google.common.collect.ImmutableSet;
|
|
import com.google.common.collect.Lists;
|
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
|
@@ -26,8 +27,9 @@ import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
import net.minecraft.util.profiling.metrics.MetricsSamplerProvider;
|
|
import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
|
|
import net.minecraft.util.profiling.metrics.storage.RecordedDeviation;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class ActiveMetricsRecorder implements MetricsRecorder {
|
|
+interface ActiveMetricsRecorder {/*implements MetricsRecorder { // Plazma - Completely remove Mojang's Profiler
|
|
public static final int PROFILING_MAX_DURATION_SECONDS = 10;
|
|
@Nullable
|
|
private static Consumer<Path> globalOnReportFinished = null;
|
|
@@ -165,4 +167,5 @@ public class ActiveMetricsRecorder implements MetricsRecorder {
|
|
public static void registerGlobalCompletionCallback(Consumer<Path> consumer) {
|
|
globalOnReportFinished = consumer;
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java
|
|
index 12d7b7c86115b667bd8f940206985d9ed4b837d4..0feece395aaaec1be498af95454238270c0bfd01 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling.metrics.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import net.minecraft.util.profiling.InactiveProfiler;
|
|
import net.minecraft.util.profiling.ProfilerFiller;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class InactiveMetricsRecorder implements MetricsRecorder {
|
|
+interface InactiveMetricsRecorder { /* implements MetricsRecorder { // Plazma - Completely remove Mojang's Profiler
|
|
public static final MetricsRecorder INSTANCE = new InactiveMetricsRecorder();
|
|
|
|
@Override
|
|
@@ -31,4 +33,5 @@ public class InactiveMetricsRecorder implements MetricsRecorder {
|
|
@Override
|
|
public void endTick() {
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java
|
|
index 48e7211e01691a677c52cf1f5982b0c179eaf83b..9aa963c3e8d58832d4b0ce1e7f1122eee3773928 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java
|
|
@@ -1,8 +1,8 @@
|
|
package net.minecraft.util.profiling.metrics.profiling;
|
|
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// <editor-fold desc="Removed class" defaultstate="collapsed"> import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public interface MetricsRecorder {
|
|
+interface MetricsRecorder { /* // Plazma - Completely remove Mojang's Profiler
|
|
void end();
|
|
|
|
void cancel();
|
|
@@ -14,4 +14,5 @@ public interface MetricsRecorder {
|
|
ProfilerFiller getProfiler();
|
|
|
|
void endTick();
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java
|
|
index cf47ee0f4ec9ffb130b04c7cf92e7907f9b791ef..63cbfb116ac524498eac756ae95f1e0a19aed7fa 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
|
import java.util.Set;
|
|
import java.util.function.Supplier;
|
|
@@ -9,8 +10,9 @@ import net.minecraft.util.profiling.ActiveProfiler;
|
|
import net.minecraft.util.profiling.ProfileCollector;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class ProfilerSamplerAdapter {
|
|
+interface ProfilerSamplerAdapter {/* // Plazma - Completely remove Mojang's Profiler
|
|
private final Set<String> previouslyFoundSamplerNames = new ObjectOpenHashSet<>();
|
|
|
|
public Set<MetricSampler> newSamplersFoundInProfiler(Supplier<ProfileCollector> profilerSupplier) {
|
|
@@ -34,4 +36,5 @@ public class ProfilerSamplerAdapter {
|
|
return pathEntry == null ? 0.0 : (double)pathEntry.getMaxDuration() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND;
|
|
});
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java
|
|
index 978412a8b9e24d7d79c94911f0cf7d20796389e1..7bcbb6d4a828cf65ff2599554e24c1228657fa73 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics.profiling;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.google.common.base.Stopwatch;
|
|
import com.google.common.base.Ticker;
|
|
import com.google.common.collect.ImmutableSet;
|
|
@@ -20,8 +21,9 @@ import net.minecraft.util.profiling.metrics.MetricsSamplerProvider;
|
|
import org.slf4j.Logger;
|
|
import oshi.SystemInfo;
|
|
import oshi.hardware.CentralProcessor;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class ServerMetricsSamplersProvider implements MetricsSamplerProvider {
|
|
+interface ServerMetricsSamplersProvider {/*implements MetricsSamplerProvider {
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final Set<MetricSampler> samplers = new ObjectOpenHashSet<>();
|
|
private final ProfilerSamplerAdapter samplerFactory = new ProfilerSamplerAdapter();
|
|
@@ -102,4 +104,5 @@ public class ServerMetricsSamplersProvider implements MetricsSamplerProvider {
|
|
return this.currentLoad[index] * 100.0;
|
|
}
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java b/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java
|
|
index 8579309bf1b6ad0e42aa9431a8d274ee810911fd..176e04d4e18eae86dd0e3c57831512aae5f0b19c 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.minecraft.util.profiling.metrics.storage;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import com.mojang.logging.LogUtils;
|
|
import java.io.IOException;
|
|
import java.io.UncheckedIOException;
|
|
@@ -24,8 +25,9 @@ import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.slf4j.Logger;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public class MetricsPersister {
|
|
+interface MetricsPersister { /* // Plazma - Completely remove Mojang's Profiler
|
|
public static final Path PROFILING_RESULTS_DIR = Paths.get("debug/profiling");
|
|
public static final String METRICS_DIR_NAME = "metrics";
|
|
public static final String DEVIATIONS_DIR_NAME = "deviations";
|
|
@@ -122,4 +124,5 @@ public class MetricsPersister {
|
|
private void saveProfilingTaskExecutionResult(ProfileResults result, Path directory) {
|
|
result.saveResults(directory.resolve("profiling.txt"));
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java b/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java
|
|
index f012d23b22b1a9d1acb6c020c66dc727f7fe9e1a..9be6accd64c6669a7e63e8e78889b958464f039f 100644
|
|
--- a/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java
|
|
+++ b/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java
|
|
@@ -1,9 +1,11 @@
|
|
package net.minecraft.util.profiling.metrics.storage;
|
|
|
|
+/* <editor-fold desc="Removed class" defaultstate="collapsed"> // Plazma - Completely remove Mojang's Profiler
|
|
import java.time.Instant;
|
|
import net.minecraft.util.profiling.ProfileResults;
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
-public final class RecordedDeviation {
|
|
+interface RecordedDeviation { /* // Plazma - Completely remove Mojang's Profiler
|
|
public final Instant timestamp;
|
|
public final int tick;
|
|
public final ProfileResults profilerResultAtTick;
|
|
@@ -13,4 +15,5 @@ public final class RecordedDeviation {
|
|
this.tick = ticks;
|
|
this.profilerResultAtTick = result;
|
|
}
|
|
+ </editor-fold> */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
index 43487a9ee202c5b0e5a416519939111f77b3059c..dee5cab2d8e28d968de5beb7084efeaf1a20da3a 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
@@ -11,13 +11,13 @@ import java.util.concurrent.locks.LockSupport;
|
|
import java.util.function.BooleanSupplier;
|
|
import java.util.function.Supplier;
|
|
import javax.annotation.CheckReturnValue;
|
|
-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, ProcessorHandle<R>, Executor {
|
|
+public abstract class BlockableEventLoop<R extends Runnable> implements /*ProfilerMeasured,*/ ProcessorHandle<R>, Executor { // Plazma - Completely remove Mojang's Profiler
|
|
private final String name;
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final Queue<R> pendingRunnables = Queues.newConcurrentLinkedQueue();
|
|
@@ -25,7 +25,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 R wrapRunnable(Runnable runnable);
|
|
@@ -155,8 +155,10 @@ 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
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
|
index 97c129f5949ca7cb7430e1cf56e881c00f129530..5c4d902a6febe8ffadecbbc64b50ecdc60307588 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java
|
|
@@ -9,13 +9,13 @@ import java.util.concurrent.Executor;
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
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 class ProcessorMailbox<T> implements ProfilerMeasured, ProcessorHandle<T>, AutoCloseable, Runnable {
|
|
+public class ProcessorMailbox<T> implements /*ProfilerMeasured,*/ ProcessorHandle<T>, AutoCloseable, Runnable {
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final int CLOSED_BIT = 1;
|
|
private static final int SCHEDULED_BIT = 2;
|
|
@@ -32,7 +32,7 @@ public class ProcessorMailbox<T> implements ProfilerMeasured, ProcessorHandle<T>
|
|
this.dispatcher = executor;
|
|
this.queue = queue;
|
|
this.name = name;
|
|
- MetricsRegistry.INSTANCE.add(this);
|
|
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
|
|
private boolean setAsScheduled() {
|
|
@@ -151,8 +151,10 @@ public class ProcessorMailbox<T> implements ProfilerMeasured, ProcessorHandle<T>
|
|
return this.name;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
@Override
|
|
public List<MetricSampler> profiledMetrics() {
|
|
return ImmutableList.of(MetricSampler.create(this.name + "-queue-size", MetricCategory.MAIL_BOXES, this::size));
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 56da8a4600688efd1987d82d4fcad1757e33f4f2..cdae1cda0bf50d6fd7d40945b99663f79da80ab1 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -37,7 +37,7 @@ 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.ProfilerFiller;
|
|
+// 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;
|
|
@@ -165,8 +165,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
|
this.pathfindingMalus = Maps.newEnumMap(PathType.class);
|
|
this.restrictCenter = BlockPos.ZERO;
|
|
this.restrictRadius = -1.0F;
|
|
- this.goalSelector = new GoalSelector(world.getProfilerSupplier());
|
|
- this.targetSelector = new GoalSelector(world.getProfilerSupplier());
|
|
+ this.goalSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler
|
|
+ this.targetSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler
|
|
this.lookControl = new org.purpurmc.purpur.controller.LookControllerWASD(this); // Purpur
|
|
this.moveControl = new org.purpurmc.purpur.controller.MoveControllerWASD(this); // Purpur
|
|
this.jumpControl = new JumpControl(this);
|
|
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 b4e4670536f6dcea109c029d75d9710cb386f1d0..9155d68c43239b535190cc7cb5ee92c60189f1ac 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
|
|
@@ -8,7 +8,7 @@ import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.function.Predicate;
|
|
import java.util.function.Supplier;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// 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() {
|
|
@@ -24,14 +24,16 @@ public class GoalSelector {
|
|
};
|
|
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
|
private final Set<WrappedGoal> availableGoals = new ObjectLinkedOpenHashSet<>();
|
|
- private final Supplier<ProfilerFiller> profiler;
|
|
+ // private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang's Profiler
|
|
private static final Goal.Flag[] GOAL_FLAG_VALUES = Goal.Flag.values(); // Paper - remove streams from pathfindergoalselector
|
|
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
|
|
private int curRate;
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
|
this.profiler = profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
public void addGoal(int priority, Goal goal) {
|
|
this.availableGoals.add(new WrappedGoal(priority, goal));
|
|
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 a31326e24cb68472c81cd781c5e3041772712862..03323be2a120c53ac5a3607f6154c99d0b990308 100644
|
|
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
@@ -28,7 +28,7 @@ import net.minecraft.resources.RegistryOps;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
import net.minecraft.world.Container;
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.world.level.Level;
|
|
@@ -53,7 +53,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
|
this.registries = registryLookup;
|
|
}
|
|
|
|
- protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager, ProfilerFiller profiler) {
|
|
+ protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler
|
|
this.hasErrors = false;
|
|
Builder<RecipeType<?>, RecipeHolder<?>> builder = ImmutableMultimap.builder();
|
|
com.google.common.collect.ImmutableMap.Builder<ResourceLocation, RecipeHolder<?>> com_google_common_collect_immutablemap_builder = ImmutableMap.builder();
|
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index 64e489fa71c7f38797c8978de96840e0321e59a1..11a92adbcc97233f10cbe2547352213e92d0a09c 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -35,7 +35,7 @@ import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.util.AbortableIterationConsumer;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// 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;
|
|
@@ -133,7 +133,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
private final RandomSource threadSafeRandom = RandomSource.createThreadSafe();
|
|
private final Holder<DimensionType> dimensionTypeRegistration;
|
|
public final WritableLevelData levelData;
|
|
- private final Supplier<ProfilerFiller> profiler;
|
|
+ // private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang's Profiler
|
|
public final boolean isClientSide;
|
|
private final WorldBorder worldBorder;
|
|
private final BiomeManager biomeManager;
|
|
@@ -263,7 +263,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
|
|
public abstract ResourceKey<LevelStem> getTypeKey();
|
|
|
|
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma
|
|
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, /*Supplier<ProfilerFiller> supplier,*/ boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang's Profiler
|
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
|
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
|
this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma - Configurable Plazma
|
|
@@ -280,7 +280,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
}
|
|
|
|
// CraftBukkit end
|
|
- this.profiler = supplier;
|
|
+ // this.profiler = supplier; // Plazma - Completely remove Mojang's Profiler
|
|
this.levelData = worlddatamutable;
|
|
this.dimensionTypeRegistration = holder;
|
|
final DimensionType dimensionmanager = (DimensionType) holder.value();
|
|
@@ -1857,6 +1857,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
return false;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profi
|
|
public ProfilerFiller getProfiler() {
|
|
//if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur // Purpur - TODO: Pufferfish
|
|
return (ProfilerFiller) this.profiler.get();
|
|
@@ -1865,6 +1866,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
public Supplier<ProfilerFiller> getProfilerSupplier() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
|
|
@Override
|
|
public BiomeManager getBiomeManager() {
|
|
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
|
index c5454b92ca2565461c799d7340160f9fb72c1b0f..760a4f4b15a02f9cbb7a368961286ae3c64d9db3 100644
|
|
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
|
@@ -8,7 +8,7 @@ import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.Holder;
|
|
import net.minecraft.core.SectionPos;
|
|
import net.minecraft.core.registries.Registries;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.level.biome.Biome;
|
|
@@ -152,7 +152,9 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
|
return this.level.getHeight();
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang's Profiler
|
|
public ProfilerFiller getProfiler() {
|
|
return this.level.getProfiler();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
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 37120fcb31f4c9a90be37db252b17eb93db2cb0f..8764e00de0ae8730bf1f12414f431d6cf75613b8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -26,7 +26,7 @@ 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.ProfilerFiller;
|
|
+// 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;
|
|
@@ -443,7 +443,7 @@ public class LevelChunk extends ChunkAccess {
|
|
}
|
|
|
|
if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) {
|
|
- ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
|
+ // ProfilerFiller gameprofilerfiller = this.level.getProfiler(); // Plazma - Completely remove Mojang's Profiler
|
|
|
|
//gameprofilerfiller.push("updateSkyLightSources"); // Purpur
|
|
// Paper - starlight - remove skyLightSources
|
|
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 404080976208c30e9e95e5bee47c2a749e709a45..97a81d749d9fece6283fdd1b0ed89ce04be32c78 100644
|
|
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
|
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
|
@@ -12,8 +12,8 @@ import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.core.BlockPos;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+// 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;
|
|
|
|
@@ -44,7 +44,7 @@ public class PathFinder {
|
|
map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getTarget(pos.getX(), pos.getY(), pos.getZ()), pos));
|
|
}
|
|
// Paper end - Perf: remove streams and optimize collection
|
|
- Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier);
|
|
+ Path path = this.findPath(/*world.getProfiler(), */node, map, followRange, distance, rangeMultiplier); // Plazma - Completely remove Mojang's Profiler
|
|
this.nodeEvaluator.done();
|
|
return path;
|
|
}
|
|
@@ -52,7 +52,7 @@ public class PathFinder {
|
|
|
|
@Nullable
|
|
// Paper start - Perf: remove streams and optimize collection
|
|
- private Path findPath(ProfilerFiller profiler, Node startNode, List<Map.Entry<Target, BlockPos>> positions, float followRange, int distance, float rangeMultiplier) {
|
|
+ private Path findPath(/*ProfilerFiller profiler, */Node startNode, List<Map.Entry<Target, BlockPos>> positions, float followRange, int distance, float rangeMultiplier) { // Plazma - Completely remove Mojang's Profiler
|
|
//profiler.push("find_path"); // Purpur
|
|
//profiler.markForCharting(MetricCategory.PATH_FINDING); // Purpur
|
|
// Set<Target> set = positions.keySet();
|
|
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
index a6d62abd3102770652f914b9d697c6d3c2533cfc..7ad353388f975e271f597de8c262b9b8866547b4 100644
|
|
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
@@ -24,14 +24,14 @@ import net.minecraft.Util;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.SectionPos;
|
|
import net.minecraft.core.Vec3i;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//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;
|
|
|
|
public class LevelTicks<T> implements LevelTickAccess<T> {
|
|
private static final Comparator<LevelChunkTicks<?>> CONTAINER_DRAIN_ORDER = (a, b) -> ScheduledTick.INTRA_TICK_DRAIN_ORDER.compare(a.peek(), b.peek());
|
|
private final LongPredicate tickCheck;
|
|
- private final Supplier<ProfilerFiller> profiler;
|
|
+ //private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang's Profiler
|
|
private final Long2ObjectMap<LevelChunkTicks<T>> allContainers = new Long2ObjectOpenHashMap<>();
|
|
private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), map -> map.defaultReturnValue(Long.MAX_VALUE));
|
|
private final Queue<LevelChunkTicks<T>> containersToTick = new PriorityQueue<>(CONTAINER_DRAIN_ORDER);
|
|
@@ -44,9 +44,9 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
|
}
|
|
};
|
|
|
|
- public LevelTicks(LongPredicate tickingFutureReadyPredicate, Supplier<ProfilerFiller> profilerGetter) {
|
|
+ public LevelTicks(LongPredicate tickingFutureReadyPredicate/*, Supplier<ProfilerFiller> profilerGetter*/) { // Plazma - Completely remove Mojang's Profiler
|
|
this.tickCheck = tickingFutureReadyPredicate;
|
|
- this.profiler = profilerGetter;
|
|
+ //this.profiler = profilerGetter; // Plazma - Completely remove Mojang's Profiler
|
|
}
|
|
|
|
public void addContainer(ChunkPos pos, LevelChunkTicks<T> scheduler) {
|
|
@@ -83,7 +83,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
|
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
|
|
//ProfilerFiller profilerFiller = this.profiler.get(); // Purpur
|
|
//profilerFiller.push("collect"); // Purpur
|
|
- this.collectTicks(time, maxTicks, null); // Purpur
|
|
+ this.collectTicks(time, maxTicks/*, null*/); // Purpur // Plazma - Completely remove Mojang's Profiler
|
|
//profilerFiller.popPush("run"); // Purpur
|
|
//profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size()); // Purpur
|
|
this.runCollectedTicks(ticker);
|
|
@@ -92,7 +92,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/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler
|
|
this.sortContainersToTick(time);
|
|
//profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
|
|
this.drainContainers(time, maxTicks);
|