1076 lines
67 KiB
Diff
1076 lines
67 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 35563a94879fe77f98d43d97cc6ba57b24906c23..1ecbd34e4066dd33047d2a0d081eb257e3409222 100644
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
@@ -435,7 +435,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 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..2f72549549d4d79251baaf1339dbb482703ab2c9 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 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 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 profiler
|
|
this.commandLimit = maxCommandChainLength;
|
|
this.forkLimit = maxCommandForkCount;
|
|
- this.profiler = profiler;
|
|
+ //this.profiler = profiler; // Plazma - Completely remove profiler
|
|
this.commandQuota = maxCommandChainLength;
|
|
}
|
|
|
|
@@ -127,9 +127,11 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
return this.tracer;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove profiler
|
|
public ProfilerFiller profiler() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove 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 b0c8943b3ad6c2d29b46ce387d349f91acc899f1..6b98e5140e946b4d728c281417cc37dc60413ba1 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -113,16 +113,16 @@ 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 profiler
|
|
import net.minecraft.util.profiling.ResultField;
|
|
-import net.minecraft.util.profiling.SingleTickProfiler;
|
|
+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove 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 profiler
|
|
+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove profiler
|
|
+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove profiler
|
|
+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove profiler
|
|
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove profiler
|
|
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.RandomSequences;
|
|
@@ -217,11 +217,11 @@ 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;
|
|
+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove profiler
|
|
+ //private ProfilerFiller profiler; // Plazma - Completely remove profiler
|
|
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove profiler
|
|
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove profiler
|
|
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove profiler
|
|
@Nullable
|
|
private MinecraftServer.TimeProfiler debugCommandProfiler;
|
|
private boolean debugCommandProfilerDelayStart;
|
|
@@ -2485,10 +2485,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove profiler
|
|
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 profiler
|
|
|
|
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
|
|
|
@@ -2725,6 +2727,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// CraftBukkit end
|
|
|
|
+ /* // Plazma - Completely remove 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) -> {
|
|
@@ -2740,6 +2743,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
//this.metricsRecorder.startTick(); // Purpur
|
|
//this.profiler.startTick(); // Purpur
|
|
}
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
private void endMetricsRecordingTick() {
|
|
//this.profiler.endTick(); // Purpur
|
|
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
index 31718823250a1490b783f426fff65bf5a067b6f4..b4935d70c1043edc8a92a2f07a6acf5da9a9c0dd 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 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 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..0a4caef179e1cbb280381a495dea4e922e4aafe8 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 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 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..6a4229a8a84dbdd915682177893b06bae81fd119 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 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 172c7b94830c13835e48d68a039bd66e7e7622b0..5a8b27dc3c82396123f681dbf466cab3527055bf 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 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 c3c47857515a7f75d69c718f352d8bae4b2c1d26..246345be61ce31baf9721002cc5a880b80fcec17 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 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 9d5b6303fe1ecfe84c935b0811705dbefe6995d0..3902656486aa4fffc448a0f513b5e6564a20d3ad 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 profiler
|
|
import net.minecraft.util.valueproviders.IntProvider;
|
|
import net.minecraft.util.valueproviders.UniformInt;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
@@ -700,15 +700,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
|
|
+ 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 - 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 profiler
|
|
+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded);//, this.getProfilerSupplier()); // Plazma - Completely remove 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..c0088e0e566abb928c8dcd6f819d82cc1122589b 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 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 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..4e1f4e026cd7c566468a58b2ea232d5dee80b86f 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 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 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..2e9e63f3ee6268cafa3b90666cf31019e7341dbb 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 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..7de117e0464a24da632d134870554fd11e1b87ca 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 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 profiler
|
|
return CompletableFuture.supplyAsync(() -> {
|
|
- return this.prepare(manager, prepareProfiler);
|
|
+ return this.prepare(manager/*, prepareProfiler*/); // Plazma - Completely remove profiler
|
|
}, prepareExecutor).thenCompose(synchronizer::wait).thenAcceptAsync((prepared) -> {
|
|
- this.apply(prepared, manager, applyProfiler);
|
|
+ this.apply(prepared, manager/*, applyProfiler*/); // Plazma - Completely remove profiler
|
|
}, applyExecutor);
|
|
}
|
|
|
|
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove profiler
|
|
|
|
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove 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..67c0d8f7294e18c7b2107b82219bc106608a21f0 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 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 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..9800974e23ffa29a264f733db4df08e944cb7fbd 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 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 profiler
|
|
|
|
-public class ActiveProfiler implements ProfileCollector {
|
|
+interface ActiveProfiler { /*implements ProfileCollector { // Plazma - Completely remove 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 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..01efc02c02750e8f046bddd6786c6bb076c2146e 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 profiler
|
|
import java.util.function.IntSupplier;
|
|
import java.util.function.LongSupplier;
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
-public class ContinuousProfiler {
|
|
+interface ContinuousProfiler { /* // Plazma - Completely remove 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 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..4a6410bb32a26190cee6580458f22392e9cce516 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 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 profiler
|
|
|
|
-public class FilledProfileResults implements ProfileResults {
|
|
+final class FilledProfileResults { /* implements ProfileResults { // Plazma - Completely remove 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 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..fcfe21038a647e6ac404c8c248044871282ba386 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 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 profiler
|
|
|
|
-public class InactiveProfiler implements ProfileCollector {
|
|
+interface InactiveProfiler { /* implements ProfileCollector { // Plazma - Completely remove 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 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..26d23cdaddaf734de498d427178370a386f1685b 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 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 profiler
|
|
|
|
-public interface ProfileCollector extends ProfilerFiller {
|
|
+interface ProfileCollector { /* extends ProfilerFiller { // Plazma - Completely remove profiler
|
|
ProfileResults getResults();
|
|
|
|
@Nullable
|
|
ActiveProfiler.PathEntry getEntry(String name);
|
|
|
|
Set<Pair<String, MetricCategory>> getChartedPaths();
|
|
+ */ // Plazma - Completely remove 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..95a7ab6b2977318796aba5af415043d07dc77cfa 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 profiler
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
-public interface ProfilerFiller {
|
|
+interface ProfilerFiller { /* // Plazma - Completely remove profiler
|
|
String ROOT = "root";
|
|
|
|
@io.papermc.paper.annotation.DoNotUse // Purpur
|
|
@@ -113,4 +115,5 @@ public interface ProfilerFiller {
|
|
};
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove 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..79633d06a6d59e03061e2350c7b385a8c042a907 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 profiler
|
|
|
|
-public interface ProfilerPathEntry {
|
|
+interface ProfilerPathEntry { /* // Plazma - Completely remove profiler
|
|
long getDuration();
|
|
|
|
long getMaxDuration();
|
|
@@ -10,4 +10,5 @@ public interface ProfilerPathEntry {
|
|
long getCount();
|
|
|
|
Object2LongMap<String> getCounters();
|
|
+ */ // Plazma - Completely remove 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..76003de077d464b2a6813661ff6bf376bcf01052 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 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 profiler
|
|
|
|
-public class SingleTickProfiler {
|
|
+interface SingleTickProfiler { /* // Plazma - Completely remove 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 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..86c513c5cdb7aa9fc6426f3e59d842f166a86a40 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 profiler
|
|
import java.util.Set;
|
|
import java.util.function.Supplier;
|
|
import net.minecraft.util.profiling.ProfileCollector;
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
-public interface MetricsSamplerProvider {
|
|
- Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier);
|
|
+interface MetricsSamplerProvider {
|
|
+ //Set<MetricSampler> samplers(Supplier<ProfileCollector> profilerSupplier); // Plazma - Completely remove 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..e47c4f37bf4b1fd3d2a4e9932a4304ca42c32f8c 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 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 profiler
|
|
|
|
-public class ActiveMetricsRecorder implements MetricsRecorder {
|
|
+interface ActiveMetricsRecorder { /*implements MetricsRecorder { // Plazma - Completely remove 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 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..7b4f620ad3f30860941d997f5ca517ee8951899c 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 profiler
|
|
import net.minecraft.util.profiling.InactiveProfiler;
|
|
import net.minecraft.util.profiling.ProfilerFiller;
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
-public class InactiveMetricsRecorder implements MetricsRecorder {
|
|
+interface InactiveMetricsRecorder { /* implements MetricsRecorder { // Plazma - Completely remove 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 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..f1f8519954759916fdd840265e87cfb491a396dc 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 profiler
|
|
|
|
-public interface MetricsRecorder {
|
|
+interface MetricsRecorder { /* // Plazma - Completely remove profiler
|
|
void end();
|
|
|
|
void cancel();
|
|
@@ -14,4 +14,5 @@ public interface MetricsRecorder {
|
|
ProfilerFiller getProfiler();
|
|
|
|
void endTick();
|
|
+ */ // Plazma - Completely remove 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..d9e7e097a3336932abbb367cb94784131b79c422 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 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 profiler
|
|
|
|
-public class ProfilerSamplerAdapter {
|
|
+interface ProfilerSamplerAdapter { /* // Plazma - Completely remove 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 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..e437ad3e9dbde84dbe53247e833a556e8fbf4e12 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 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 profiler
|
|
|
|
-public class ServerMetricsSamplersProvider implements MetricsSamplerProvider {
|
|
+interface ServerMetricsSamplersProvider { /* implements MetricsSamplerProvider { // Plazma - Completely remove 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 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..69d71f827943fd0245d7c928d63f791d5d69cdf4 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 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 profiler
|
|
|
|
-public class MetricsPersister {
|
|
+public interface MetricsPersister { // Plazma - Completely remove profiler
|
|
public static final Path PROFILING_RESULTS_DIR = Paths.get("debug/profiling");
|
|
+ /* // Plazma - Completely remove 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 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..b029b178c327652a24dcee889db659fdce7d95a5 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 profiler
|
|
import java.time.Instant;
|
|
import net.minecraft.util.profiling.ProfileResults;
|
|
+ */ // Plazma - Completely remove profiler
|
|
|
|
-public final class RecordedDeviation {
|
|
+interface RecordedDeviation { /* // Plazma - Completely remove 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 profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 4c0d710d20e074ad4a0fdd1cd4c0c3d3383b68a5..2d5568ac864a7f557bc5a21ad796206c25caf028 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -148,8 +148,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 profiler
|
|
+ this.targetSelector = new GoalSelector(); //world.getProfilerSupplier()); // Plazma - Completely remove 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 02978315bc2b828cc603ce7478408f3f82c249c2..4f9b19c45afd6b26833ba892a90d3a9559d5d859 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 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 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 profiler
|
|
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
|
this.profiler = profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove 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..c577e275c0375747b89f56bc79710871e313f6b0 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 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 cde722d3e381d214e2835b7dc5877e9add0a5eda..7ce3756da66a7e6c42ac3220e660131f9fad2a76 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -41,7 +41,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 profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.TickRateManager;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -140,7 +140,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 profiler
|
|
public final boolean isClientSide;
|
|
private final WorldBorder worldBorder;
|
|
private final BiomeManager biomeManager;
|
|
@@ -264,7 +264,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
|
|
+ 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 // Plazma - Completely remove 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
|
|
@@ -281,7 +281,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
}
|
|
|
|
// CraftBukkit end
|
|
- this.profiler = supplier;
|
|
+ //this.profiler = supplier; // Plazma - Completely remove profiler
|
|
this.levelData = worlddatamutable;
|
|
this.dimensionTypeRegistration = holder;
|
|
this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> {
|
|
@@ -1851,6 +1851,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
return false;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove 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();
|
|
@@ -1859,6 +1860,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
public Supplier<ProfilerFiller> getProfilerSupplier() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove 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..0226280bbdb9d63831d93f980ee117da1eac08aa 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 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 profiler
|
|
public ProfilerFiller getProfiler() {
|
|
return this.level.getProfiler();
|
|
}
|
|
+ */ // Plazma - Completely remove 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 c37aa33134b8602caae5ecff00439ad5e0005d18..f65ea0319ba4b715bcfc033ab0030b4302341953 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 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 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 a8af51a25b0f99c3a64d9150fdfcd6b818aa7581..4b894750b2de4dd8ecb766fdabccbdcd6a41a3e8 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 profiler
|
|
+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove 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
|
|
- 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 profiler
|
|
this.nodeEvaluator.done();
|
|
return path;
|
|
}
|
|
@@ -52,7 +52,7 @@ public class PathFinder {
|
|
|
|
@Nullable
|
|
// Paper start - 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 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..77ce02c7edea5170d31c8911b5de5638f23d46af 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 profiler // Plazma - Completely remove 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 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..17a5928afade7e477cda34365dc8c72c52a6b758 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 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 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 profiler
|
|
this.tickCheck = tickingFutureReadyPredicate;
|
|
- this.profiler = profilerGetter;
|
|
+ //this.profiler = profilerGetter; // Plazma - Completely remove 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 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 profiler
|
|
this.sortContainersToTick(time);
|
|
//profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
|
|
this.drainContainers(time, maxTicks);
|