1085 lines
68 KiB
Diff
1085 lines
68 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 b203394ed62807e7d5df433830993f1d2ee14939..e86d6dc83f77ef17c0e4458470009e5ca642f583 100644
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
@@ -434,7 +434,7 @@ public class Commands {
|
|
int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT);
|
|
|
|
try {
|
|
- ExecutionContext executioncontext1 = new ExecutionContext<>(i, j, minecraftserver.getProfiler());
|
|
+ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j); //, minecraftserver.getProfiler()); // Plazma - Completely remove Mojang Profiler
|
|
|
|
try {
|
|
Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1);
|
|
diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
index 38854a047c6da7e2551f206478d17628e765168d..c989f0ddca966cb522fca68734baa5cc5231272f 100644
|
|
--- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
+++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
@@ -12,7 +12,7 @@ import net.minecraft.commands.ExecutionCommandSource;
|
|
import net.minecraft.commands.execution.tasks.BuildContexts;
|
|
import net.minecraft.commands.execution.tasks.CallFunction;
|
|
import net.minecraft.commands.functions.InstantiatedFunction;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class ExecutionContext<T> implements AutoCloseable {
|
|
@@ -20,7 +20,7 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final int commandLimit;
|
|
private final int forkLimit;
|
|
- private final ProfilerFiller profiler;
|
|
+ //private final ProfilerFiller profiler; // Plazma - Completely remove Mojang Profiler
|
|
@Nullable
|
|
private TraceCallbacks tracer;
|
|
private int commandQuota;
|
|
@@ -29,10 +29,10 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
private final List<CommandQueueEntry<T>> newTopCommands = new ObjectArrayList<>();
|
|
private int currentFrameDepth;
|
|
|
|
- public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount, ProfilerFiller profiler) {
|
|
+ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang Profiler
|
|
this.commandLimit = maxCommandChainLength;
|
|
this.forkLimit = maxCommandForkCount;
|
|
- this.profiler = profiler;
|
|
+ //this.profiler = profiler; // Plazma - Completely remove Mojang Profiler
|
|
this.commandQuota = maxCommandChainLength;
|
|
}
|
|
|
|
@@ -127,9 +127,11 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
return this.tracer;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
public ProfilerFiller profiler() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
public int forkLimit() {
|
|
return this.forkLimit;
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index c81695902775f345d77154ea309bb71d34d08175..c153becedc7c8573dc1d8a736581db2a31a8d4f5 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -113,16 +113,18 @@ import net.minecraft.util.Unit;
|
|
import net.minecraft.util.datafix.DataFixers;
|
|
import net.minecraft.util.profiling.EmptyProfileResults;
|
|
import net.minecraft.util.profiling.ProfileResults;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.util.profiling.ResultField;
|
|
-import net.minecraft.util.profiling.SingleTickProfiler;
|
|
+// import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.util.profiling.jfr.JvmProfiler;
|
|
import net.minecraft.util.profiling.jfr.callback.ProfiledDuration;
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
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;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.RandomSequences;
|
|
@@ -217,11 +219,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public LevelStorageSource.LevelStorageAccess storageSource;
|
|
public final PlayerDataStorage playerDataStorage;
|
|
private final List<Runnable> tickables = Lists.newArrayList();
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
private MetricsRecorder metricsRecorder;
|
|
private ProfilerFiller profiler;
|
|
private Consumer<ProfileResults> onMetricsRecordingStopped;
|
|
private Consumer<Path> onMetricsRecordingFinished;
|
|
private boolean willStartRecordingMetrics;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
@Nullable
|
|
private MinecraftServer.TimeProfiler debugCommandProfiler;
|
|
private boolean debugCommandProfilerDelayStart;
|
|
@@ -2487,10 +2491,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
+ /*
|
|
public ProfilerFiller getProfiler() {
|
|
if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
|
|
|
@@ -2727,6 +2733,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// CraftBukkit end
|
|
|
|
+ /* // Plazma - Completely remove Mojang 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) -> {
|
|
@@ -2753,12 +2760,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 - Fix for IDE
|
|
this.stopRecordingMetrics();
|
|
resultConsumer.accept(methodprofilerresults);
|
|
};
|
|
this.onMetricsRecordingFinished = dumpConsumer;
|
|
- this.willStartRecordingMetrics = true;*/ // Purpur
|
|
+ this.willStartRecordingMetrics = true;/ // Purpur // Plazma - Fix for IDE
|
|
}
|
|
|
|
public void stopRecordingMetrics() {
|
|
@@ -2773,6 +2780,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
//this.metricsRecorder.cancel(); // Purpur
|
|
//this.profiler = this.metricsRecorder.getProfiler(); // Purpur
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
public Path getWorldPath(LevelResource worldSavePath) {
|
|
return this.storageSource.getLevelPath(worldSavePath);
|
|
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
index 31718823250a1490b783f426fff65bf5a067b6f4..619bab6faff5917bfe8d253a33edc8d8abec2cb8 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
@@ -25,7 +25,7 @@ import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
import net.minecraft.util.ProblemReporter;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.world.level.storage.loot.LootDataManager;
|
|
import org.slf4j.Logger;
|
|
|
|
@@ -42,7 +42,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
|
|
this.lootData = conditionManager;
|
|
}
|
|
|
|
- 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 Profiler
|
|
Builder<ResourceLocation, AdvancementHolder> builder = ImmutableMap.builder();
|
|
|
|
prepared.forEach((minecraftkey, jsonelement) -> {
|
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
index de2eb71bb6933f2bd06859bc2c56fd0ad15ab71a..f65d6dc2b1596232707be402cf0377b5ab90cc01 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
|
@@ -25,7 +25,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 Profiler
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.phys.Vec2;
|
|
import net.minecraft.world.phys.Vec3;
|
|
@@ -62,7 +62,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener {
|
|
}
|
|
|
|
@Override
|
|
- public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
|
+ public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, /*ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler,*/ Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler
|
|
CompletableFuture<Map<ResourceLocation, List<TagLoader.EntryWithSource>>> completableFuture = CompletableFuture.supplyAsync(() -> {
|
|
return this.tagsLoader.load(manager);
|
|
}, prepareExecutor);
|
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
index 5dd0dcb47211cec69189115bf4eab1dffc3ca8cf..1b54ec6a39f40f3334b49348941290b5efa7f07b 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 Profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class ServerFunctionManager {
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
index bb412ca874b85d777c0e3565fcefcee15b23182b..d1056b1c91edc3ec06c78e65c8fa2dd1f000c43f 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 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 6167ffb1263a1a65b582b7d295d1d77ef38c3ee3..37f14f17b50d1ea23c859858d2dbdfcf56c125af 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -23,7 +23,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 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 08a5afa3b0f9729bc0883054e2255dee4d9ed815..611916db3f9a6d2fbfa720e883fb03973b4a65c2 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -78,7 +78,7 @@ import net.minecraft.util.Mth;
|
|
import net.minecraft.util.ProgressListener;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.util.valueproviders.IntProvider;
|
|
import net.minecraft.util.valueproviders.UniformInt;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
@@ -695,15 +695,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())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), 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())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang 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 Profiler
|
|
+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded); //, this.getProfilerSupplier()); // Plazma - Completely remove Mojang Profiler
|
|
this.navigatingMobs = new ObjectOpenHashSet();
|
|
this.blockEvents = new ObjectLinkedOpenHashSet();
|
|
this.blockEventsToReschedule = new ArrayList(64);
|
|
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 828196decc89e7e03f88c4a3208ee1ab2bb69242..daa0e38490d576ba143636d2a4c3e308461ad408 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
|
@@ -2,10 +2,10 @@ 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 Profiler
|
|
|
|
public interface PreparableReloadListener {
|
|
- CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor);
|
|
+ CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor); // Plazma - Completely remove Mojang Profiler
|
|
|
|
default String getName() {
|
|
return this.getClass().getSimpleName();
|
|
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 7383c7d3820dce06108eaafd236a7c6c06a10a42..6324dafd01eafcf8663c1b739efbc064c8498782 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
@@ -3,11 +3,11 @@ 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 Profiler
|
|
|
|
public interface ResourceManagerReloadListener extends PreparableReloadListener {
|
|
@Override
|
|
- default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
|
+ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler
|
|
return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
|
|
//applyProfiler.startTick(); // Purpur
|
|
//applyProfiler.push("listener"); // Purpur
|
|
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 9cc09f0415a09299102dbcf022326944368ea033..13b5b1b9ddea35d9b4bc69bba1e15deb5669c4e0 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
@@ -11,7 +11,7 @@ import java.util.Map;
|
|
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 Profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public abstract class SimpleJsonResourceReloadListener extends SimplePreparableReloadListener<Map<ResourceLocation, JsonElement>> {
|
|
@@ -25,7 +25,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 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 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..c5d72ce3a55110c9d53477adba5e56ea4108665a 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
@@ -2,19 +2,19 @@ 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 Profiler
|
|
|
|
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
|
@Override
|
|
- public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
|
+ public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler
|
|
return CompletableFuture.supplyAsync(() -> {
|
|
- return this.prepare(manager, prepareProfiler);
|
|
+ return this.prepare(manager/*, prepareProfiler*/); // Plazma - Completely remove Mojang Profiler
|
|
}, prepareExecutor).thenCompose(synchronizer::wait).thenAcceptAsync((prepared) -> {
|
|
- this.apply(prepared, manager, applyProfiler);
|
|
+ this.apply(prepared, manager/*, applyProfiler*/); // Plazma - Completely remove Mojang Profiler
|
|
}, applyExecutor);
|
|
}
|
|
|
|
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang Profiler
|
|
|
|
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
index de2ecc7c69fb870f843f60596115866214267ee4..b9c89ce6d94aeb16fa6ea28d6b82aeea270790bf 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
|
@@ -9,7 +9,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 Profiler
|
|
|
|
public class SimpleReloadInstance<S> implements ReloadInstance {
|
|
private static final int PREPARATION_PROGRESS_WEIGHT = 2;
|
|
@@ -26,7 +26,7 @@ public class SimpleReloadInstance<S> implements ReloadInstance {
|
|
|
|
public static SimpleReloadInstance<Void> of(ResourceManager manager, List<PreparableReloadListener> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage) {
|
|
return new SimpleReloadInstance<>(prepareExecutor, applyExecutor, manager, reloaders, (synchronizer, resourceManager, reloader, prepare, apply) -> {
|
|
- return reloader.reload(synchronizer, resourceManager, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE, prepareExecutor, apply);
|
|
+ return reloader.reload(synchronizer, resourceManager/*, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE*/, prepareExecutor, apply); // Plazma - Completely remove Profiler
|
|
}, initialStage);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/tags/TagManager.java b/src/main/java/net/minecraft/tags/TagManager.java
|
|
index 60ed9413c32d91ce33583cc24998d08869d07a23..2919eaa15c64165c826b68dacc3e8c6905e7630a 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 Profiler
|
|
|
|
public class TagManager implements PreparableReloadListener {
|
|
private static final Map<ResourceKey<? extends Registry<?>>, String> CUSTOM_REGISTRY_DIRECTORIES = Map.of(Registries.BLOCK, "tags/blocks", Registries.ENTITY_TYPE, "tags/entity_types", Registries.FLUID, "tags/fluids", Registries.GAME_EVENT, "tags/game_events", Registries.ITEM, "tags/items");
|
|
@@ -35,7 +35,7 @@ public class TagManager implements PreparableReloadListener {
|
|
}
|
|
|
|
@Override
|
|
- public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
|
+ public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler
|
|
List<? extends CompletableFuture<? extends TagManager.LoadResult<?>>> list = this.registryAccess.registries().map((registry) -> {
|
|
return this.createLoader(manager, prepareExecutor, registry);
|
|
}).toList();
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
|
index c6c30d99399c5cde2b0ec2f320d81d952b422d78..ff4f6f23086913b45a58407e31f2a5edc10e5bdd 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class ActiveProfiler implements ProfileCollector {
|
|
+interface ActiveProfiler { /*implements ProfileCollector { // Plazma - Completely remove Mojang 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();
|
|
@@ -205,4 +207,5 @@ public class ActiveProfiler implements ProfileCollector {
|
|
return Object2LongMaps.unmodifiable(this.counters);
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..76044b62cba0e2d1956b932eb8bdb99049ac79af 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import java.util.function.IntSupplier;
|
|
import java.util.function.LongSupplier;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public class ContinuousProfiler {
|
|
+interface ContinuousProfiler { /* // Plazma - Completely remove Mojang 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();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java b/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java
|
|
index 253a5221bc0d99f0bcbab18ad0d15b99b0d8f5f6..92886cebd9dca26524b7d970fde4f2d31798a7f3 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class FilledProfileResults implements ProfileResults {
|
|
+final class FilledProfileResults { /* implements ProfileResults { // Plazma - Completely remove Mojang Profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final ProfilerPathEntry EMPTY = new ProfilerPathEntry() {
|
|
@Override
|
|
@@ -291,4 +293,5 @@ public class FilledProfileResults implements ProfileResults {
|
|
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..a4249befbdd2098fd391120542715ddd85e2fe9a 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class InactiveProfiler implements ProfileCollector {
|
|
+interface InactiveProfiler { /* implements ProfileCollector { // Plazma - Completely remove Mojang 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();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..97864e2adcc7651435cf1cafca816dbf36ca397a 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public interface ProfileCollector extends ProfilerFiller {
|
|
+interface ProfileCollector { /* extends ProfilerFiller { // Plazma - Completely remove Mojang Profiler
|
|
ProfileResults getResults();
|
|
|
|
@Nullable
|
|
ActiveProfiler.PathEntry getEntry(String name);
|
|
|
|
Set<Pair<String, MetricCategory>> getChartedPaths();
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
|
index 863343a87fe34d72f04af89d75268b477b2adc7a..995ad7365636ac1845bf136cd98b31f21b7ba400 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public interface ProfilerFiller {
|
|
+interface ProfilerFiller { /* // Plazma - Completely remove Mojang Profiler
|
|
String ROOT = "root";
|
|
|
|
@io.papermc.paper.annotation.DoNotUse // Purpur
|
|
@@ -113,4 +115,5 @@ public interface ProfilerFiller {
|
|
};
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..cac51347b479837c92e4269ba93ef4b157d5fce0 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;
|
|
+//import it.unimi.dsi.fastutil.objects.Object2LongMap; // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public interface ProfilerPathEntry {
|
|
+interface ProfilerPathEntry { /* // Plazma - Completely remove Mojang Profiler
|
|
long getDuration();
|
|
|
|
long getMaxDuration();
|
|
@@ -10,4 +10,5 @@ public interface ProfilerPathEntry {
|
|
long getCount();
|
|
|
|
Object2LongMap<String> getCounters();
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java b/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java
|
|
index 38c9b686212c0f78eb702b1897d491e450267ca7..b9f35d744a5aed7fe39df0586e8a3b5aa7540bf2 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class SingleTickProfiler {
|
|
+interface SingleTickProfiler { /* // Plazma - Completely remove Mojang Profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final LongSupplier realTime;
|
|
private final long saveThreshold;
|
|
@@ -50,4 +52,5 @@ public class SingleTickProfiler {
|
|
public static ProfilerFiller decorateFiller(ProfilerFiller profiler, @Nullable SingleTickProfiler monitor) {
|
|
return monitor != null ? ProfilerFiller.tee(monitor.startTick(), profiler) : profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..c16b85bcc4c0b497b8eeb8d46c5774f5e9e2213e 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import java.util.Set;
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.ProfileCollector;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public interface MetricsSamplerProvider {
|
|
- Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier);
|
|
+interface MetricsSamplerProvider {
|
|
+ //Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier); // Plazma - Completely remove Mojang 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 157e6562bc2fa0946ea6be825cd740d067b4e84f..cc0d5704d244d09c740c8eb99e5bb75a35809f64 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class ActiveMetricsRecorder implements MetricsRecorder {
|
|
+interface ActiveMetricsRecorder { /*implements MetricsRecorder { // Plazma - Completely remove Mojang Profiler
|
|
public static final int PROFILING_MAX_DURATION_SECONDS = 10;
|
|
@Nullable
|
|
private static Consumer<Path> globalOnReportFinished = null;
|
|
@@ -161,4 +163,5 @@ public class ActiveMetricsRecorder implements MetricsRecorder {
|
|
public static void registerGlobalCompletionCallback(Consumer<Path> consumer) {
|
|
globalOnReportFinished = consumer;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..70732d7f72660e30b4265ddb9c3172f27131ec56 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.util.profiling.InactiveProfiler;
|
|
import net.minecraft.util.profiling.ProfilerFiller;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public class InactiveMetricsRecorder implements MetricsRecorder {
|
|
+interface InactiveMetricsRecorder { /* implements MetricsRecorder { // Plazma - Completely remove Mojang Profiler
|
|
public static final MetricsRecorder INSTANCE = new InactiveMetricsRecorder();
|
|
|
|
@Override
|
|
@@ -31,4 +33,5 @@ public class InactiveMetricsRecorder implements MetricsRecorder {
|
|
@Override
|
|
public void endTick() {
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..9279d9c67c803e580f5bfc595bddf7a24a686806 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;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public interface MetricsRecorder {
|
|
+interface MetricsRecorder { /* // Plazma - Completely remove Mojang Profiler
|
|
void end();
|
|
|
|
void cancel();
|
|
@@ -14,4 +14,5 @@ public interface MetricsRecorder {
|
|
ProfilerFiller getProfiler();
|
|
|
|
void endTick();
|
|
+ */ // Plazma - Completely remove Mojang 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 5bdfad52aa555c1720ca9eb8abc94d6e3f9be86c..6c14448b30863919082d3661b94b84fdca640cdd 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang 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 Profiler
|
|
|
|
-public class ProfilerSamplerAdapter {
|
|
+interface ProfilerSamplerAdapter { /* // Plazma - Completely remove Mojang Profiler
|
|
private final Set<String> previouslyFoundSamplerNames = new ObjectOpenHashSet<>();
|
|
|
|
public Set<MetricSampler> newSamplersFoundInProfiler(Supplier<ProfileCollector> profilerSupplier) {
|
|
@@ -33,4 +35,5 @@ public class ProfilerSamplerAdapter {
|
|
return pathEntry == null ? 0.0D : (double)pathEntry.getMaxDuration() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND;
|
|
});
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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 42fc60456bc651345c5f6e13b975c7874532231e..3108ddd081e51066acaa867e4d3680d1bc4683e6 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import com.google.common.base.Stopwatch;
|
|
import com.google.common.base.Ticker;
|
|
import com.google.common.collect.ImmutableSet;
|
|
@@ -19,8 +20,9 @@ import net.minecraft.util.profiling.metrics.MetricsSamplerProvider;
|
|
import org.slf4j.Logger;
|
|
import oshi.SystemInfo;
|
|
import oshi.hardware.CentralProcessor;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public class ServerMetricsSamplersProvider implements MetricsSamplerProvider {
|
|
+interface ServerMetricsSamplersProvider { /* implements MetricsSamplerProvider { // Plazma - Completely remove Mojang Profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final Set<MetricSampler> samplers = new ObjectOpenHashSet<>();
|
|
private final ProfilerSamplerAdapter samplerFactory = new ProfilerSamplerAdapter();
|
|
@@ -99,4 +101,5 @@ public class ServerMetricsSamplersProvider implements MetricsSamplerProvider {
|
|
return this.currentLoad[index] * 100.0D;
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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 2c2b8bf76ea213b111f3a76b0823146565dc3880..310ee93b974b8e88e7ac614d1003425ea6e171a3 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,13 +1,14 @@
|
|
package net.minecraft.util.profiling.metrics.storage;
|
|
|
|
+import java.nio.file.Path;
|
|
+import java.nio.file.Paths;
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import com.mojang.logging.LogUtils;
|
|
import java.io.IOException;
|
|
import java.io.UncheckedIOException;
|
|
import java.io.Writer;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.file.Files;
|
|
-import java.nio.file.Path;
|
|
-import java.nio.file.Paths;
|
|
import java.time.ZoneId;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.util.List;
|
|
@@ -24,9 +25,11 @@ 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 Profiler
|
|
|
|
-public class MetricsPersister {
|
|
+public interface MetricsPersister { // Plazma - Completely remove Mojang Profiler
|
|
public static final Path PROFILING_RESULTS_DIR = Paths.get("debug/profiling");
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
public static final String METRICS_DIR_NAME = "metrics";
|
|
public static final String DEVIATIONS_DIR_NAME = "deviations";
|
|
public static final String PROFILING_RESULT_FILENAME = "profiling.txt";
|
|
@@ -126,4 +129,5 @@ public class MetricsPersister {
|
|
private void saveProfilingTaskExecutionResult(ProfileResults result, Path directory) {
|
|
result.saveResults(directory.resolve("profiling.txt"));
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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..23cf0ff4c86c3d05668b1ed176364606a9a66056 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;
|
|
|
|
+/* // Plazma - Completely remove Mojang Profiler
|
|
import java.time.Instant;
|
|
import net.minecraft.util.profiling.ProfileResults;
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
|
|
-public final class RecordedDeviation {
|
|
+interface RecordedDeviation { /* // Plazma - Completely remove Mojang 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;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 1d1688fafc438a5957096118790d44fbd55476bb..546b14cc2cf0c4145a059142aa33ad113d7479bf 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -149,8 +149,8 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
|
this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.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 Profiler
|
|
+ this.targetSelector = new GoalSelector(); //world.getProfilerSupplier()); // Plazma - Completely remove Mojang 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 bb068bffc9e2f035dee90276156129ce750a7cd7..766349777b3b2d947e3b05dfaacae3e747806b86 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
|
|
@@ -11,7 +11,7 @@ import java.util.Set;
|
|
import java.util.function.Predicate;
|
|
import java.util.function.Supplier;
|
|
import java.util.stream.Stream;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class GoalSelector {
|
|
@@ -29,7 +29,7 @@ public class GoalSelector {
|
|
};
|
|
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
|
private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
|
- private final Supplier<ProfilerFiller> profiler;
|
|
+ //private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang Profiler
|
|
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
|
|
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 tickCount;
|
|
@@ -37,9 +37,11 @@ public class GoalSelector {
|
|
private int curRate;
|
|
private static final Goal.Flag[] GOAL_FLAG_VALUES = Goal.Flag.values(); // Paper - remove streams from pathfindergoalselector
|
|
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
|
this.profiler = profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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 d87124f5356180a37e581febc6141fdc5f1395a7..681e3fcd759a26578e054f88e8048e392312b84b 100644
|
|
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
@@ -37,7 +37,7 @@ import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
import net.minecraft.util.GsonHelper;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler
|
|
|
|
public class RecipeManager extends SimpleJsonResourceReloadListener {
|
|
|
|
@@ -51,7 +51,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
|
super(RecipeManager.GSON, "recipes");
|
|
}
|
|
|
|
- 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 Profiler
|
|
this.hasErrors = false;
|
|
// CraftBukkit start - SPIGOT-5667 make sure all types are populated and mutable
|
|
Map<RecipeType<?>, Object2ObjectLinkedOpenHashMap<ResourceLocation, RecipeHolder<?>>> map1 = Maps.newHashMap();
|
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index c4bfdf19651a3c8ef66795a6c7f5a29c72f9ee2d..4eb8cab1f7f2d3d2dcba15bb0bd64b60c027882a 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -36,7 +36,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 Profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.TickRateManager;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -135,7 +135,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
private final ResourceKey<DimensionType> dimensionTypeId;
|
|
private final Holder<DimensionType> dimensionTypeRegistration;
|
|
public final WritableLevelData levelData;
|
|
- private final Supplier<ProfilerFiller> profiler;
|
|
+ // private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang Profiler
|
|
public final boolean isClientSide;
|
|
private final WorldBorder worldBorder;
|
|
private final BiomeManager biomeManager;
|
|
@@ -258,7 +258,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
|
|
//protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI
|
|
|
|
- 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 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
|
|
@@ -275,7 +275,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
}
|
|
|
|
// CraftBukkit end
|
|
- this.profiler = supplier;
|
|
+ //this.profiler = supplier; // Plazma - Completely remove Mojang Profiler
|
|
this.levelData = worlddatamutable;
|
|
this.dimensionTypeRegistration = holder;
|
|
this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> {
|
|
@@ -1841,6 +1841,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
return false;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
public ProfilerFiller getProfiler() {
|
|
if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
|
return (ProfilerFiller) this.profiler.get();
|
|
@@ -1849,6 +1850,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
public Supplier<ProfilerFiller> getProfilerSupplier() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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 0f1025495237aebe30132ace0832aa5718d6f9bb..cb12c0a7db86a1f3e1e34a9fbe0b67e5d5a64741 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 Profiler
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.level.biome.Biome;
|
|
@@ -155,7 +155,9 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
|
return this.level.getHeight();
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang Profiler
|
|
public ProfilerFiller getProfiler() {
|
|
return this.level.getProfiler();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang 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 1b49ecbf8fdbe8b734f8ca5191dc9ed70aa66af7..88bf97e8a8242b5bf182ec84688671ca5a6106cb 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -25,7 +25,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 Profiler
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.Level;
|
|
@@ -455,7 +455,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 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 f039d6109ee6f55542adc8f30476ba9a9e4974bf..c61d12cfc5e169df825d83cb946eb0be93d312db 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 Profiler
|
|
+// import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang 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.getGoal(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 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 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/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
|
index 3ddf6ab00de2456ebf504985b88994f970e3b5c4..61c36d6d2a4a958ca63adbd2b4f6805261b13909 100644
|
|
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
|
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
|
@@ -20,7 +20,7 @@ import net.minecraft.server.packs.resources.PreparableReloadListener;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
import net.minecraft.util.ProblemReporter;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler // Plazma - Completely remove Mojang Profiler
|
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
|
import org.bukkit.craftbukkit.CraftLootTable;
|
|
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
|
@@ -37,7 +37,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv
|
|
public LootDataManager() {}
|
|
|
|
@Override
|
|
- public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
|
+ public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, /*ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler,*/ Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler
|
|
Map<LootDataType<?>, Map<ResourceLocation, ?>> map = new HashMap();
|
|
CompletableFuture<?>[] acompletablefuture = (CompletableFuture[]) LootDataType.values().map((lootdatatype) -> {
|
|
return LootDataManager.scheduleElementParse(lootdatatype, manager, prepareExecutor, map);
|
|
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
index 0043c0087896a6df6910b0500da37d84b287c901..af959513cdbccafd86e2d747aea3e1518ebc6792 100644
|
|
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
@@ -23,7 +23,7 @@ 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 Profiler
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
|
|
|
@@ -32,7 +32,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
|
return 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 Profiler
|
|
private final Long2ObjectMap<LevelChunkTicks<T>> allContainers = new Long2ObjectOpenHashMap<>();
|
|
private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), (map) -> {
|
|
map.defaultReturnValue(Long.MAX_VALUE);
|
|
@@ -48,9 +48,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 Profiler
|
|
this.tickCheck = tickingFutureReadyPredicate;
|
|
- this.profiler = profilerGetter;
|
|
+ //this.profiler = profilerGetter; // Plazma - Completely remove Mojang Profiler
|
|
}
|
|
|
|
public void addContainer(ChunkPos pos, LevelChunkTicks<T> scheduler) {
|
|
@@ -88,7 +88,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); // Purpur // Plazma - Completely remove Mojang Profiler
|
|
//profilerFiller.popPush("run"); // Purpur
|
|
//profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size()); // Purpur
|
|
this.runCollectedTicks(ticker);
|
|
@@ -97,7 +97,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 Profiler
|
|
this.sortContainersToTick(time);
|
|
//profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
|
|
this.drainContainers(time, maxTicks);
|