Upstream has released updates that appear to apply and compile correctly. [Purpur Changes] PurpurMC/Purpur@e86a1b6: Updated Upstream (Paper) PurpurMC/Purpur@962ee30: Updated Upstream (Paper) PurpurMC/Purpur@74d1b4c: Updated Upstream (Paper) PurpurMC/Purpur@e2e8c61: Updated Upstream (Paper) PurpurMC/Purpur@7a01fd8: Updated Upstream (Paper) PurpurMC/Purpur@34c18f0: Updated Upstream (Paper) PurpurMC/Purpur@ca668ab: Updated Upstream (Paper) PurpurMC/Purpur@200178d: Updated Upstream (Paper) PurpurMC/Purpur@9968cbb: Updated Upstream (Paper) PurpurMC/Purpur@db09358: Fix clamp-levels option not being true by default (#1609) PurpurMC/Purpur@f289b6a: Updated Upstream (Paper) PurpurMC/Purpur@959c29d: Fix Tridents giving errors without having an Elytra equipped (#1612) PurpurMC/Purpur@68c1612: Fix villagers not spawning when the `follow-emerald-blocks` option is enabled (#1611) PurpurMC/Purpur@5b75c68: fix `bypass-mob-griefing` not being the inverse of mobgriefing gamerule, closes #1603 PurpurMC/Purpur@55d4309: Updated Upstream (Paper) PurpurMC/Purpur@0601f87: Updated Upstream (Paper) PurpurMC/Purpur@06dde9d: Add Ridable and Attribute options for Creaking mob (#1613) PurpurMC/Purpur@420a1ce: Set the bee's `takes-damage-from-water` option to true by default (#1614) PurpurMC/Purpur@2b6f273: Updated Upstream (Paper) PurpurMC/Purpur@504f311: Updated Upstream (Paper) PurpurMC/Purpur@2b694c9: Updated Upstream (Paper) PurpurMC/Purpur@96d7ef7: Updated Upstream (Paper) PurpurMC/Purpur@e141f68: Updated Upstream (Paper) PurpurMC/Purpur@7f6f667: Updated Upstream (Pufferfish) PurpurMC/Purpur@de20ba9: ignore `minecart.max-speed` config value if using minecart experiment, closes #1618 PurpurMC/Purpur@03062a8: fix ridable mobs not being controllable, closes #1620 PurpurMC/Purpur@0493ac3: Updated Upstream (Paper) PurpurMC/Purpur@16ce24a: fix(ridables/creaking): override tick method in look/move control
2923 lines
165 KiB
Diff
2923 lines
165 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: AlphaKR93 <dev@alpha93.kr>
|
|
Date: Fri, 13 Dec 2024 13:54:02 +0900
|
|
Subject: [PATCH] Completely remove Mojang profiler
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
|
index 8d82425ccbc30b3f4a59767ca72bf37311ddeda0..731592a7eeb1434c8568b722314fba64b8b83050 100644
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
@@ -132,7 +132,7 @@ import net.minecraft.server.commands.WorldBorderCommand;
|
|
import net.minecraft.server.commands.data.DataCommands;
|
|
import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.tags.TagKey;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.util.profiling.jfr.JvmProfiler;
|
|
import net.minecraft.world.flag.FeatureFlagSet;
|
|
import net.minecraft.world.flag.FeatureFlags;
|
|
@@ -353,9 +353,11 @@ public class Commands {
|
|
// Paper end
|
|
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
Profiler.get().push(() -> {
|
|
return "/" + s;
|
|
});
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent
|
|
|
|
try {
|
|
@@ -384,9 +386,9 @@ public class Commands {
|
|
commandlistenerwrapper.sendFailure(Component.literal(Util.describeError(exception)));
|
|
Commands.LOGGER.error("'/{}' threw an exception", s, exception);
|
|
}
|
|
- } finally {
|
|
+ } /*finally { // Plazma - Completely remove Mojang profiler
|
|
Profiler.get().pop();
|
|
- }
|
|
+ }*/ // Plazma - Completely remove Mojang profiler
|
|
|
|
}
|
|
|
|
@@ -448,7 +450,7 @@ public class Commands {
|
|
int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT);
|
|
|
|
try {
|
|
- ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j, Profiler.get());
|
|
+ ExecutionContext<CommandSourceStack> executioncontext1 = new ExecutionContext<>(i, j/*, Profiler.get()*/);
|
|
|
|
try {
|
|
Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1);
|
|
diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..316fad1e5af6f9bbc1f8b8c8ff0422ded29afedd 100644
|
|
--- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
+++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java
|
|
@@ -12,7 +12,7 @@ import net.minecraft.commands.ExecutionCommandSource;
|
|
import net.minecraft.commands.execution.tasks.BuildContexts;
|
|
import net.minecraft.commands.execution.tasks.CallFunction;
|
|
import net.minecraft.commands.functions.InstantiatedFunction;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class ExecutionContext<T> implements AutoCloseable {
|
|
@@ -20,7 +20,7 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final int commandLimit;
|
|
private final int forkLimit;
|
|
- private final ProfilerFiller profiler;
|
|
+ //private final ProfilerFiller profiler; // Plazma - Completely remove Mojang profiler
|
|
@Nullable
|
|
private TraceCallbacks tracer;
|
|
private int commandQuota;
|
|
@@ -29,10 +29,10 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
private final List<CommandQueueEntry<T>> newTopCommands = new ObjectArrayList<>();
|
|
private int currentFrameDepth;
|
|
|
|
- public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount, ProfilerFiller profiler) {
|
|
+ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
this.commandLimit = maxCommandChainLength;
|
|
this.forkLimit = maxCommandForkCount;
|
|
- this.profiler = profiler;
|
|
+ //this.profiler = profiler; // Plazma - Completely remove Mojang profiler
|
|
this.commandQuota = maxCommandChainLength;
|
|
}
|
|
|
|
@@ -129,9 +129,11 @@ public class ExecutionContext<T> implements AutoCloseable {
|
|
return this.tracer;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
public ProfilerFiller profiler() {
|
|
return this.profiler;
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
public int forkLimit() {
|
|
return this.forkLimit;
|
|
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
|
index 9f5c3ec2eae9b30bdb8dbcb328d7f701cb7aeb9d..16de7288702aa7e4b0225d4eb1f3cd81289d9176 100644
|
|
--- a/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
|
+++ b/src/main/java/net/minecraft/commands/execution/tasks/BuildContexts.java
|
|
@@ -42,52 +42,48 @@ public class BuildContexts<T extends ExecutionCommandSource<T>> {
|
|
ChainModifiers chainModifiers = flags;
|
|
List<T> list = sources;
|
|
if (contextChain.getStage() != Stage.EXECUTE) {
|
|
- context.profiler().push(() -> "prepare " + this.commandInput);
|
|
+ // Plazma start - Completely remove Mojang profiler
|
|
+ for (int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
|
|
+ CommandContext<T> commandContext = contextChain.getTopContext();
|
|
+ if (commandContext.isForked()) {
|
|
+ chainModifiers = chainModifiers.setForked();
|
|
+ }
|
|
|
|
- try {
|
|
- for (int i = context.forkLimit(); contextChain.getStage() != Stage.EXECUTE; contextChain = contextChain.nextStage()) {
|
|
- CommandContext<T> commandContext = contextChain.getTopContext();
|
|
- if (commandContext.isForked()) {
|
|
- chainModifiers = chainModifiers.setForked();
|
|
- }
|
|
+ RedirectModifier<T> redirectModifier = commandContext.getRedirectModifier();
|
|
+ if (redirectModifier instanceof CustomModifierExecutor customModifierExecutor) { // Purpur - decompile error
|
|
+ customModifierExecutor.apply(baseSource, list, contextChain, chainModifiers, ExecutionControl.create(context, frame));
|
|
+ return;
|
|
+ }
|
|
|
|
- RedirectModifier<T> redirectModifier = commandContext.getRedirectModifier();
|
|
- if (redirectModifier instanceof CustomModifierExecutor customModifierExecutor) { // Purpur - decompile error
|
|
- customModifierExecutor.apply(baseSource, list, contextChain, chainModifiers, ExecutionControl.create(context, frame));
|
|
- return;
|
|
- }
|
|
+ if (redirectModifier != null) {
|
|
+ context.incrementCost();
|
|
+ boolean bl = chainModifiers.isForked();
|
|
+ List<T> list2 = new ObjectArrayList<>();
|
|
+
|
|
+ for (T executionCommandSource : list) {
|
|
+ try {
|
|
+ Collection<T> collection = ContextChain.runModifier(
|
|
+ commandContext, executionCommandSource, (contextx, successful, returnValue) -> {
|
|
+ }, bl
|
|
+ );
|
|
+ if (list2.size() + collection.size() >= i) {
|
|
+ baseSource.handleError(ERROR_FORK_LIMIT_REACHED.create(i), bl, context.tracer());
|
|
+ return;
|
|
+ }
|
|
|
|
- if (redirectModifier != null) {
|
|
- context.incrementCost();
|
|
- boolean bl = chainModifiers.isForked();
|
|
- List<T> list2 = new ObjectArrayList<>();
|
|
-
|
|
- for (T executionCommandSource : list) {
|
|
- try {
|
|
- Collection<T> collection = ContextChain.runModifier(
|
|
- commandContext, executionCommandSource, (contextx, successful, returnValue) -> {
|
|
- }, bl
|
|
- );
|
|
- if (list2.size() + collection.size() >= i) {
|
|
- baseSource.handleError(ERROR_FORK_LIMIT_REACHED.create(i), bl, context.tracer());
|
|
- return;
|
|
- }
|
|
-
|
|
- list2.addAll(collection);
|
|
- } catch (CommandSyntaxException var20) {
|
|
- executionCommandSource.handleError(var20, bl, context.tracer());
|
|
- if (!bl) {
|
|
- return;
|
|
- }
|
|
+ list2.addAll(collection);
|
|
+ } catch (CommandSyntaxException var20) {
|
|
+ executionCommandSource.handleError(var20, bl, context.tracer());
|
|
+ if (!bl) {
|
|
+ return;
|
|
}
|
|
}
|
|
-
|
|
- list = list2;
|
|
}
|
|
+
|
|
+ list = list2;
|
|
}
|
|
- } finally {
|
|
- context.profiler().pop();
|
|
}
|
|
+ // Plazma end - Completely remove Mojang profiler
|
|
}
|
|
|
|
if (list.isEmpty()) {
|
|
diff --git a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
|
index e9775b4506909bee65a74964f0d5391a0513de1d..a72bf8986d7f93dc0b3d8830c17745cfe93001be 100644
|
|
--- a/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
|
+++ b/src/main/java/net/minecraft/commands/execution/tasks/ExecuteCommand.java
|
|
@@ -23,7 +23,7 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
|
|
|
@Override
|
|
public void execute(T executionCommandSource, ExecutionContext<T> executionContext, Frame frame) {
|
|
- executionContext.profiler().push(() -> "execute " + this.commandInput);
|
|
+ //executionContext.profiler().push(() -> "execute " + this.commandInput); // Plazma - Completely remove Mojang profiler
|
|
|
|
try {
|
|
executionContext.incrementCost();
|
|
@@ -36,8 +36,9 @@ public class ExecuteCommand<T extends ExecutionCommandSource<T>> implements Unbo
|
|
}
|
|
} catch (CommandSyntaxException var9) {
|
|
executionCommandSource.handleError(var9, this.modifiers.isForked(), executionContext.tracer());
|
|
- } finally {
|
|
+ } /*finally { // Plazma - Completely remove Mojang profiler
|
|
executionContext.profiler().pop();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index ad0e9c8f64e9ef925b3f12ac1570689c9450e21b..e63e6d885054cd926508f9999c8a4eed712d4891 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -111,19 +111,19 @@ import net.minecraft.util.datafix.DataFixers;
|
|
import net.minecraft.util.debugchart.RemoteDebugSampleType;
|
|
import net.minecraft.util.debugchart.SampleLogger;
|
|
import net.minecraft.util.debugchart.TpsDebugDimensions;
|
|
-import net.minecraft.util.profiling.EmptyProfileResults;
|
|
-import net.minecraft.util.profiling.ProfileResults;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
-import net.minecraft.util.profiling.ResultField;
|
|
-import net.minecraft.util.profiling.SingleTickProfiler;
|
|
+//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang profilers
|
|
import net.minecraft.util.profiling.jfr.JvmProfiler;
|
|
import net.minecraft.util.profiling.jfr.callback.ProfiledDuration;
|
|
-import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder;
|
|
-import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder;
|
|
-import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder;
|
|
-import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider;
|
|
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
|
|
+//import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profilers
|
|
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.RandomSequences;
|
|
@@ -229,13 +229,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public LevelStorageSource.LevelStorageAccess storageSource;
|
|
public final PlayerDataStorage playerDataStorage;
|
|
private final List<Runnable> tickables = Lists.newArrayList();
|
|
- private MetricsRecorder metricsRecorder;
|
|
- private Consumer<ProfileResults> onMetricsRecordingStopped;
|
|
- private Consumer<Path> onMetricsRecordingFinished;
|
|
- private boolean willStartRecordingMetrics;
|
|
- @Nullable
|
|
- private MinecraftServer.TimeProfiler debugCommandProfiler;
|
|
- private boolean debugCommandProfilerDelayStart;
|
|
+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang profilers
|
|
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove Mojang profilers
|
|
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove Mojang profilers
|
|
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang profilers
|
|
+ //@Nullable // Plazma - Completely remove Mojang profilers
|
|
+ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang profilers
|
|
+ //private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang profilers
|
|
private ServerConnectionListener connection;
|
|
public final ChunkProgressListenerFactory progressListenerFactory;
|
|
@Nullable
|
|
@@ -434,12 +434,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
|
super("Server");
|
|
SERVER = this; // Paper - better singleton
|
|
- this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
|
+ //this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; // Plazma - Completely remove Mojang profilers
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
|
this.stopRecordingMetrics();
|
|
};
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
this.onMetricsRecordingFinished = (path) -> {
|
|
};
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
this.random = RandomSource.create();
|
|
this.port = -1;
|
|
this.levels = Maps.newLinkedHashMap();
|
|
@@ -1054,9 +1058,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
org.spigotmc.WatchdogThread.doStop(); // Paper
|
|
// Paper end
|
|
// CraftBukkit end
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
if (this.metricsRecorder.isRecording()) {
|
|
this.cancelRecordingMetrics();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
MinecraftServer.LOGGER.info("Stopping server");
|
|
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
|
@@ -1352,22 +1358,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
boolean flag = i == 0L;
|
|
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
if (this.debugCommandProfilerDelayStart) {
|
|
this.debugCommandProfilerDelayStart = false;
|
|
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
|
lastTick = currentTime;
|
|
this.nextTickTimeNanos += i;
|
|
|
|
- try {
|
|
- Profiler.Scope profiler_a = Profiler.use(this.createProfiler());
|
|
+ //try { // Plazma - Completely remove Mojang profilers
|
|
+ //Profiler.Scope profiler_a = Profiler.use(this.createProfiler()); // Plazma - Completely remove Mojang profilers
|
|
|
|
try {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
- gameprofilerfiller.push("tick");
|
|
+ //gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profilers
|
|
this.tickFrame.start();
|
|
this.tickServer(flag ? () -> {
|
|
return false;
|
|
@@ -1380,7 +1388,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// Paper end - rewrite chunk system
|
|
this.tickFrame.end();
|
|
- gameprofilerfiller.popPush("nextTickWait");
|
|
+ //gameprofilerfiller.popPush("nextTickWait"); // Plazma - Completely remove Mojang profilers
|
|
this.mayHaveDelayedTasks = true;
|
|
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
|
// Pufferfish start - tps catchup
|
|
@@ -1396,9 +1404,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.tickRateManager.endTickWork();
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
this.logFullTickTime();
|
|
} catch (Throwable throwable) {
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
if (profiler_a != null) {
|
|
try {
|
|
profiler_a.close();
|
|
@@ -1406,16 +1415,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
throwable.addSuppressed(throwable1);
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
throw throwable;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
if (profiler_a != null) {
|
|
profiler_a.close();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
} finally {
|
|
this.endMetricsRecordingTick();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
this.isReady = true;
|
|
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
|
@@ -1622,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
|
- Profiler.get().incrementCounter("runTask");
|
|
+ //Profiler.get().incrementCounter("runTask"); // Plazma - Completely remove Mojang profilers
|
|
super.doRunTask(ticktask);
|
|
}
|
|
|
|
@@ -1721,12 +1735,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
--this.ticksUntilAutosave;
|
|
// Paper start - Incremental chunk and player saving
|
|
- final ProfilerFiller profiler = Profiler.get();
|
|
+ //final ProfilerFiller profiler = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
int playerSaveInterval = io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.rate;
|
|
if (playerSaveInterval < 0) {
|
|
playerSaveInterval = autosavePeriod;
|
|
}
|
|
- profiler.push("save");
|
|
+ //profiler.push("save"); // Plazma - Completely remove Mojang profilers
|
|
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
|
try {
|
|
this.isSaving = true;
|
|
@@ -1741,10 +1755,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
} finally {
|
|
this.isSaving = false;
|
|
}
|
|
- profiler.pop();
|
|
+ //profiler.pop(); // Plazma - Completely remove Mojang profilers
|
|
// Paper end - Incremental chunk and player saving
|
|
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
|
|
this.server.spark.executeMainThreadTasks(); // Paper - spark
|
|
@@ -1754,7 +1768,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
|
// Paper end - Server Tick Events
|
|
this.server.spark.tickEnd(((double)(endTime - lastTick) / 1000000D)); // Paper - spark
|
|
- gameprofilerfiller.push("tallying");
|
|
+ //gameprofilerfiller.push("tallying"); // Plazma - Completely remove Mojang profilers
|
|
long k = Util.getNanos() - i;
|
|
int l = this.tickCount % 100;
|
|
|
|
@@ -1768,17 +1782,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.tickTimes60s.add(this.tickCount, k);
|
|
// Paper end - Add tick times API and /mspt command
|
|
this.logTickMethodTime(i);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
}
|
|
|
|
private void autoSave() {
|
|
this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
|
|
MinecraftServer.LOGGER.debug("Autosave started");
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
- gameprofilerfiller.push("save");
|
|
+ //gameprofilerfiller.push("save"); // Plazma - Completely remove Mojang profilers
|
|
this.saveEverything(true, false, false);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
MinecraftServer.LOGGER.debug("Autosave finished");
|
|
}
|
|
|
|
@@ -1847,7 +1861,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
protected void tickChildren(BooleanSupplier shouldKeepTicking) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
|
entityplayer.connection.suspendFlushing();
|
|
@@ -1868,9 +1882,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
});
|
|
// Paper end - Folia scheduler API
|
|
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
|
- gameprofilerfiller.push("commandFunctions");
|
|
+ //gameprofilerfiller.push("commandFunctions"); // Plazma - Completely remove Mojang profilers
|
|
this.getFunctions().tick();
|
|
- gameprofilerfiller.popPush("levels");
|
|
+ //gameprofilerfiller.popPush("levels"); // Plazma - Completely remove Mojang profilers
|
|
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
|
|
|
// CraftBukkit start
|
|
@@ -1909,11 +1923,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
worldserver.updateLagCompensationTick(); // Paper - lag compensation
|
|
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
|
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
gameprofilerfiller.push(() -> {
|
|
String s = String.valueOf(worldserver);
|
|
|
|
return s + " " + String.valueOf(worldserver.dimension().location());
|
|
});
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
/* Drop global time updates
|
|
if (this.tickCount % 20 == 0) {
|
|
gameprofilerfiller.push("timeSync");
|
|
@@ -1922,7 +1938,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// CraftBukkit end */
|
|
|
|
- gameprofilerfiller.push("tick");
|
|
+ //gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profilers
|
|
|
|
try {
|
|
worldserver.tick(shouldKeepTicking);
|
|
@@ -1933,27 +1949,27 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
throw new ReportedException(crashreport);
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
|
}
|
|
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
|
|
|
- gameprofilerfiller.popPush("connection");
|
|
+ //gameprofilerfiller.popPush("connection"); // Plazma - Completely remove Mojang profilers
|
|
this.tickConnection();
|
|
- gameprofilerfiller.popPush("players");
|
|
+ //gameprofilerfiller.popPush("players"); // Plazma - Completely remove Mojang profilers
|
|
this.playerList.tick();
|
|
if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
|
|
GameTestTicker.SINGLETON.tick();
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("server gui refresh");
|
|
+ //gameprofilerfiller.popPush("server gui refresh"); // Plazma - Completely remove Mojang profilers
|
|
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
((Runnable) this.tickables.get(i)).run();
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("send chunks");
|
|
+ //gameprofilerfiller.popPush("send chunks"); // Plazma - Completely remove Mojang profilers
|
|
iterator = this.playerList.getPlayers().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -1963,7 +1979,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
entityplayer.connection.resumeFlushing();
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
}
|
|
|
|
public void tickConnection() {
|
|
@@ -1975,9 +1991,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
public void forceTimeSynchronization() {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
- gameprofilerfiller.push("timeSync");
|
|
+ //gameprofilerfiller.push("timeSync"); // Plazma - Completely remove Mojang profilers
|
|
Iterator iterator = this.getAllLevels().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -1986,7 +2002,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.synchronizeTime(worldserver);
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
}
|
|
|
|
public boolean isLevelEnabled(Level world) {
|
|
@@ -2939,6 +2955,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
// CraftBukkit end
|
|
|
|
+ /*
|
|
private ProfilerFiller createProfiler() {
|
|
if (gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE;
|
|
if (this.willStartRecordingMetrics) {
|
|
@@ -2983,6 +3000,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public void cancelRecordingMetrics() {
|
|
this.metricsRecorder.cancel();
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
public Path getWorldPath(LevelResource worldSavePath) {
|
|
return this.storageSource.getLevelPath(worldSavePath);
|
|
@@ -3033,6 +3051,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
return this.isSaving;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
public boolean isTimeProfilerRunning() {
|
|
return this.debugCommandProfilerDelayStart || this.debugCommandProfiler != null;
|
|
}
|
|
@@ -3051,6 +3070,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
return methodprofilerresults;
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
public int getMaxChainedNeighborUpdates() {
|
|
return 1000000;
|
|
@@ -3164,6 +3184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profilers
|
|
private static class TimeProfiler {
|
|
|
|
final long startNanos;
|
|
@@ -3213,6 +3234,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
};
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profilers
|
|
|
|
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
index 5c8cf225d936617b6c8d265527a19bdfa371a93b..012bae0c1bc5f7008286bc3594e34f2000acf52e 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
|
@@ -18,7 +18,7 @@ import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
import net.minecraft.util.ProblemReporter;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import org.slf4j.Logger;
|
|
|
|
// CraftBukkit start
|
|
@@ -37,7 +37,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener<A
|
|
this.registries = registries;
|
|
}
|
|
|
|
- protected void apply(Map<ResourceLocation, Advancement> prepared, ResourceManager manager, ProfilerFiller profiler) {
|
|
+ protected void apply(Map<ResourceLocation, Advancement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
Builder<ResourceLocation, AdvancementHolder> builder = ImmutableMap.builder();
|
|
|
|
prepared.forEach((minecraftkey, advancement) -> {
|
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
index 0b348f701b61c7b7ed0190eff8b2d73f3a3d5c74..c7f64b3aed44591d282760785ee9c83b93bd6e32 100644
|
|
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
|
@@ -16,8 +16,8 @@ import net.minecraft.commands.functions.CommandFunction;
|
|
import net.minecraft.commands.functions.InstantiatedFunction;
|
|
import net.minecraft.nbt.CompoundTag;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class ServerFunctionManager {
|
|
@@ -54,10 +54,10 @@ public class ServerFunctionManager {
|
|
}
|
|
|
|
private void executeTagFunctions(Collection<CommandFunction<CommandSourceStack>> functions, ResourceLocation label) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
Objects.requireNonNull(label);
|
|
- gameprofilerfiller.push(label::toString);
|
|
+ //gameprofilerfiller.push(label::toString); // Plazma - Completely remove Mojang profiler
|
|
Iterator iterator = functions.iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -66,15 +66,17 @@ public class ServerFunctionManager {
|
|
this.execute(commandfunction, this.getGameLoopSender());
|
|
}
|
|
|
|
- Profiler.get().pop();
|
|
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
public void execute(CommandFunction<CommandSourceStack> function, CommandSourceStack source) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
gameprofilerfiller.push(() -> {
|
|
return "function " + String.valueOf(function.id());
|
|
});
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
try {
|
|
InstantiatedFunction<CommandSourceStack> instantiatedfunction = function.instantiate((CompoundTag) null, this.getDispatcher());
|
|
@@ -86,9 +88,9 @@ public class ServerFunctionManager {
|
|
;
|
|
} catch (Exception exception) {
|
|
ServerFunctionManager.LOGGER.warn("Failed to execute function {}", function.id(), exception);
|
|
- } finally {
|
|
+ } /*finally { // Plazma - Completely remove Mojang profiler
|
|
gameprofilerfiller.pop();
|
|
- }
|
|
+ }*/ // Plazma - Completely remove Mojang profiler
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/commands/DebugCommand.java b/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
|
index f8cdd6911fe9d6402455b7368d0e98c25e9511ca..23927255476bb9776c54139d11a386cb69489bc5 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
|
@@ -35,8 +35,9 @@ import net.minecraft.network.chat.Component;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.util.TimeUtil;
|
|
-import net.minecraft.util.profiling.ProfileResults;
|
|
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
|
|
import org.apache.commons.io.IOUtils;
|
|
+import org.bukkit.command.CommandSender;
|
|
import org.slf4j.Logger;
|
|
|
|
public class DebugCommand {
|
|
@@ -52,8 +53,8 @@ public class DebugCommand {
|
|
dispatcher.register(
|
|
Commands.literal("debug")
|
|
.requires(source -> source.hasPermission(3))
|
|
- .then(Commands.literal("start").executes(context -> start(context.getSource())))
|
|
- .then(Commands.literal("stop").executes(context -> stop(context.getSource())))
|
|
+ //.then(Commands.literal("start").executes(context -> start(context.getSource()))) // Plazma - Completely remove Mojang profiler
|
|
+ //.then(Commands.literal("stop").executes(context -> stop(context.getSource()))) // Plazma - Completely remove Mojang profiler
|
|
.then(
|
|
Commands.literal("function")
|
|
.requires(source -> source.hasPermission(3))
|
|
@@ -66,6 +67,7 @@ public class DebugCommand {
|
|
);
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
private static int start(CommandSourceStack source) throws CommandSyntaxException {
|
|
MinecraftServer minecraftServer = source.getServer();
|
|
if (minecraftServer.isTimeProfilerRunning()) {
|
|
@@ -97,6 +99,7 @@ public class DebugCommand {
|
|
return (int)e;
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
static class TraceCustomExecutor
|
|
extends CustomCommandExecutor.WithErrorHandling<CommandSourceStack>
|
|
diff --git a/src/main/java/net/minecraft/server/commands/PerfCommand.java b/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
index 8c587f829c5e8c6b6df3150024c4ae704988c47b..818c6730aeed88438cd77289a8aa5c5726a1fe0f 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/PerfCommand.java
|
|
@@ -19,9 +19,9 @@ import net.minecraft.network.chat.Component;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.util.FileZipper;
|
|
import net.minecraft.util.TimeUtil;
|
|
-import net.minecraft.util.profiling.EmptyProfileResults;
|
|
-import net.minecraft.util.profiling.ProfileResults;
|
|
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
|
|
+//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profiler
|
|
import org.apache.commons.io.FileUtils;
|
|
import org.slf4j.Logger;
|
|
|
|
@@ -36,11 +36,12 @@ public class PerfCommand {
|
|
dispatcher.register(
|
|
Commands.literal("perf")
|
|
.requires(source -> source.hasPermission(4))
|
|
- .then(Commands.literal("start").executes(context -> startProfilingDedicatedServer(context.getSource())))
|
|
- .then(Commands.literal("stop").executes(context -> stopProfilingDedicatedServer(context.getSource())))
|
|
+ //.then(Commands.literal("start").executes(context -> startProfilingDedicatedServer(context.getSource()))) // Plazma - Completely remove Mojang profiler
|
|
+ //.then(Commands.literal("stop").executes(context -> stopProfilingDedicatedServer(context.getSource()))) // Plazma - Completely remove Mojang profiler
|
|
);
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
private static int startProfilingDedicatedServer(CommandSourceStack source) throws CommandSyntaxException {
|
|
MinecraftServer minecraftServer = source.getServer();
|
|
if (minecraftServer.isRecordingMetrics()) {
|
|
@@ -104,4 +105,5 @@ public class PerfCommand {
|
|
);
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java b/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
|
|
index 7ea8c13c9993576c1408e710d3ceb9947b09090d..6db0eb0c3f7190840c39bd5ca1027f60c40948f4 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkGenerationTask.java
|
|
@@ -5,8 +5,8 @@ import java.util.List;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.util.StaticCache2D;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.Zone;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.Zone; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.chunk.ChunkAccess;
|
|
import net.minecraft.world.level.chunk.status.ChunkDependencies;
|
|
@@ -67,7 +67,7 @@ public class ChunkGenerationTask {
|
|
chunkStatus = ChunkStatus.getStatusList().get(this.scheduledStatus.getIndex() + 1);
|
|
}
|
|
|
|
- this.scheduleLayer(chunkStatus, this.needsGeneration);
|
|
+ //this.scheduleLayer(chunkStatus, this.needsGeneration); // Plazma - Completely remove Mojang profiler
|
|
this.scheduledStatus = chunkStatus;
|
|
}
|
|
|
|
@@ -112,6 +112,7 @@ public class ChunkGenerationTask {
|
|
return this.cache.get(this.pos.x, this.pos.z);
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
private void scheduleLayer(ChunkStatus targetStatus, boolean allowGeneration) {
|
|
try (Zone zone = Profiler.get().zone("scheduleLayer")) {
|
|
zone.addText(targetStatus::getName);
|
|
@@ -127,6 +128,7 @@ public class ChunkGenerationTask {
|
|
}
|
|
}
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
private int getRadiusForLayer(ChunkStatus status, boolean generate) {
|
|
ChunkPyramid chunkPyramid = generate ? ChunkPyramid.GENERATION_PYRAMID : ChunkPyramid.LOADING_PYRAMID;
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
index cfeeddf2cb4ff50dbc29c6913e78ca1dee076790..af7d150e77001c514e306b4fb1369aae0569d494 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
@@ -65,8 +65,8 @@ import net.minecraft.server.network.ServerPlayerConnection;
|
|
import net.minecraft.util.CsvOutput;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.StaticCache2D;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.util.thread.BlockableEventLoop;
|
|
import net.minecraft.util.thread.ConsecutiveExecutor;
|
|
import net.minecraft.world.entity.Entity;
|
|
@@ -406,16 +406,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
}
|
|
|
|
protected void tick(BooleanSupplier shouldKeepTicking) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("poi");
|
|
+ //gameprofilerfiller.push("poi"); // Plazma - Completely remove Mojang profiler
|
|
this.poiManager.tick(shouldKeepTicking);
|
|
- gameprofilerfiller.popPush("chunk_unload");
|
|
+ //gameprofilerfiller.popPush("chunk_unload"); // Plazma - Completely remove Mojang profiler
|
|
if (!this.level.noSave()) {
|
|
this.processUnloads(shouldKeepTicking);
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
public boolean hasWork() {
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde4ed0fe53 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -26,8 +26,8 @@ import net.minecraft.network.protocol.Packet;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.server.level.progress.ChunkProgressListener;
|
|
import net.minecraft.util.VisibleForDebug;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.util.thread.BlockableEventLoop;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.ai.village.poi.PoiManager;
|
|
@@ -442,38 +442,38 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
// CraftBukkit start - modelled on below
|
|
public void purgeUnload() {
|
|
if (true) return; // Paper - rewrite chunk system
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("purge");
|
|
+ //gameprofilerfiller.push("purge"); // Plazma - Completely remove Mojang profiler
|
|
this.distanceManager.purgeStaleTickets();
|
|
this.runDistanceManagerUpdates();
|
|
- gameprofilerfiller.popPush("unload");
|
|
+ //gameprofilerfiller.popPush("unload"); // Plazma - Completely remove Mojang profiler
|
|
this.chunkMap.tick(() -> true);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.clearCache();
|
|
}
|
|
// CraftBukkit end
|
|
|
|
@Override
|
|
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("purge");
|
|
+ //gameprofilerfiller.push("purge"); // Plazma - Completely remove Mojang profiler
|
|
if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
|
this.distanceManager.purgeStaleTickets();
|
|
}
|
|
|
|
this.runDistanceManagerUpdates();
|
|
- gameprofilerfiller.popPush("chunks");
|
|
+ //gameprofilerfiller.popPush("chunks"); // Plazma - Completely remove Mojang profiler
|
|
if (tickChunks) {
|
|
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
|
|
this.tickChunks();
|
|
this.chunkMap.tick();
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("unload");
|
|
+ //gameprofilerfiller.popPush("unload"); // Plazma - Completely remove Mojang profiler
|
|
this.chunkMap.tick(shouldKeepTicking);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.clearCache();
|
|
}
|
|
|
|
@@ -483,29 +483,29 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
this.lastInhabitedUpdate = i;
|
|
if (!this.level.isDebug()) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("pollingChunks");
|
|
+ //gameprofilerfiller.push("pollingChunks"); // Plazma - Completely remove Mojang profiler
|
|
if (this.level.tickRateManager().runsNormally()) {
|
|
List<LevelChunk> list = this.tickingChunks;
|
|
|
|
try {
|
|
- gameprofilerfiller.push("filteringTickingChunks");
|
|
+ //gameprofilerfiller.push("filteringTickingChunks"); // Plazma - Completely remove Mojang profiler
|
|
this.collectTickingChunks(list);
|
|
- gameprofilerfiller.popPush("shuffleChunks");
|
|
+ //gameprofilerfiller.popPush("shuffleChunks"); // Plazma - Completely remove Mojang profiler
|
|
// Paper start - chunk tick iteration optimisation
|
|
this.shuffleRandom.setSeed(this.level.random.nextLong());
|
|
if (!this.level.paperConfig().entities.spawning.perPlayerMobSpawns) Util.shuffle(list, this.shuffleRandom); // Paper - Optional per player mob spawns; do not need this when per-player is enabled
|
|
// Paper end - chunk tick iteration optimisation
|
|
- this.tickChunks(gameprofilerfiller, j, list);
|
|
- gameprofilerfiller.pop();
|
|
+ this.tickChunks(/*gameprofilerfiller,*/ j, list); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
} finally {
|
|
list.clear();
|
|
}
|
|
}
|
|
|
|
- this.broadcastChangedChunks(gameprofilerfiller);
|
|
- gameprofilerfiller.pop();
|
|
+ this.broadcastChangedChunks(/*gameprofilerfiller*/); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
// Pufferfish start - optimize mob spawning
|
|
@@ -546,8 +546,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
// Pufferfish end
|
|
}
|
|
|
|
- private void broadcastChangedChunks(ProfilerFiller profiler) {
|
|
- profiler.push("broadcast");
|
|
+ private void broadcastChangedChunks(/*ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
+ //profiler.push("broadcast"); // Plazma - Completely remove Mojang profiler
|
|
Iterator iterator = this.chunkHoldersToBroadcast.iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -560,7 +560,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
}
|
|
|
|
this.chunkHoldersToBroadcast.clear();
|
|
- profiler.pop();
|
|
+ //profiler.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
private void collectTickingChunks(List<LevelChunk> chunks) {
|
|
@@ -586,8 +586,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
// Paper end - chunk tick iteration optimisation
|
|
}
|
|
|
|
- private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
|
|
- profiler.popPush("naturalSpawnCount");
|
|
+ private void tickChunks(/*ProfilerFiller profiler,*/ long timeDelta, List<LevelChunk> chunks) { // Plazma - Completely remove Mojang profiler
|
|
+ //profiler.popPush("naturalSpawnCount"); // Plazma - Completely remove Mojang profiler
|
|
int j = this.distanceManager.getNaturalSpawnChunkCount();
|
|
// Paper start - Optional per player mob spawns
|
|
final int naturalSpawnChunkCount = j;
|
|
@@ -619,7 +619,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
// Paper end - Optional per player mob spawns
|
|
|
|
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
|
- profiler.popPush("spawnAndTick");
|
|
+ //profiler.popPush("spawnAndTick"); // Plazma - Completely remove Mojang profiler
|
|
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
|
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
|
|
List list1;
|
|
@@ -656,7 +656,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
}
|
|
}
|
|
|
|
- profiler.popPush("customSpawners");
|
|
+ //profiler.popPush("customSpawners"); // Plazma - Completely remove Mojang profiler
|
|
if (flag) {
|
|
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
|
}
|
|
@@ -854,7 +854,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
@Override
|
|
protected void doRunTask(Runnable task) {
|
|
- Profiler.get().incrementCounter("runTask");
|
|
+ //Profiler.get().incrementCounter("runTask"); // Plazma - Completely remove Mojang profiler
|
|
super.doRunTask(task);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e3742506f 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -79,8 +79,8 @@ import net.minecraft.util.ProgressListener;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.Unit;
|
|
import net.minecraft.util.datafix.DataFixTypes;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.util.valueproviders.IntProvider;
|
|
import net.minecraft.util.valueproviders.UniformInt;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
@@ -748,18 +748,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
|
|
public void tick(BooleanSupplier shouldKeepTicking) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
this.handlingTick = true;
|
|
TickRateManager tickratemanager = this.tickRateManager();
|
|
boolean flag = tickratemanager.runsNormally();
|
|
|
|
if (flag) {
|
|
- gameprofilerfiller.push("world border");
|
|
+ //gameprofilerfiller.push("world border"); // Plazma - Completely remove Mojang profiler
|
|
this.getWorldBorder().tick();
|
|
- gameprofilerfiller.popPush("weather");
|
|
+ //gameprofilerfiller.popPush("weather"); // Plazma - Completely remove Mojang profiler
|
|
this.advanceWeatherCycle();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
|
@@ -790,30 +790,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
this.tickTime();
|
|
}
|
|
|
|
- gameprofilerfiller.push("tickPending");
|
|
+ //gameprofilerfiller.push("tickPending"); // Plazma - Completely remove Mojang profiler
|
|
if (!this.isDebug() && flag) {
|
|
j = this.getGameTime();
|
|
- gameprofilerfiller.push("blockTicks");
|
|
+ //gameprofilerfiller.push("blockTicks"); // Plazma - Completely remove Mojang profiler
|
|
this.blockTicks.tick(j, paperConfig().environment.maxBlockTicks, this::tickBlock); // Paper - configurable max block ticks
|
|
- gameprofilerfiller.popPush("fluidTicks");
|
|
+ //gameprofilerfiller.popPush("fluidTicks"); // Plazma - Completely remove Mojang profiler
|
|
this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("raid");
|
|
+ //gameprofilerfiller.popPush("raid"); // Plazma - Completely remove Mojang profiler
|
|
if (flag) {
|
|
this.raids.tick();
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("chunkSource");
|
|
+ //gameprofilerfiller.popPush("chunkSource"); // Plazma - Completely remove Mojang profiler
|
|
this.getChunkSource().tick(shouldKeepTicking, true);
|
|
- gameprofilerfiller.popPush("blockEvents");
|
|
+ //gameprofilerfiller.popPush("blockEvents"); // Plazma - Completely remove Mojang profiler
|
|
if (flag) {
|
|
this.runBlockEvents();
|
|
}
|
|
|
|
this.handlingTick = false;
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this
|
|
|
|
if (flag1) {
|
|
@@ -821,11 +821,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
|
|
if (flag1 || this.emptyTime++ < 300) {
|
|
- gameprofilerfiller.push("entities");
|
|
+ //gameprofilerfiller.push("entities"); // Plazma - Completely remove Mojang profiler
|
|
if (this.dragonFight != null && flag) {
|
|
- gameprofilerfiller.push("dragonFight");
|
|
+ //gameprofilerfiller.push("dragonFight"); // Plazma - Completely remove Mojang profiler
|
|
this.dragonFight.tick();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
|
@@ -833,9 +833,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
entity.activatedPriorityReset = false; // Pufferfish - DAB
|
|
if (!entity.isRemoved()) {
|
|
if (!tickratemanager.isEntityFrozen(entity)) {
|
|
- gameprofilerfiller.push("checkDespawn");
|
|
+ //gameprofilerfiller.push("checkDespawn"); // Plazma - Completely remove Mojang profiler
|
|
entity.checkDespawn();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
if (true) { // Paper - rewrite chunk system
|
|
Entity entity1 = entity.getVehicle();
|
|
|
|
@@ -847,7 +847,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
entity.stopRiding();
|
|
}
|
|
|
|
- gameprofilerfiller.push("tick");
|
|
+ //gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profiler
|
|
// Pufferfish start - copied from this.guardEntityTick
|
|
try {
|
|
this.tickNonPassenger(entity); // Pufferfish - changed
|
|
@@ -862,18 +862,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
this.moonrise$midTickTasks(); // Paper - rewrite chunk system
|
|
// Pufferfish end
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
}
|
|
}
|
|
});
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.tickBlockEntities();
|
|
}
|
|
|
|
- gameprofilerfiller.push("entityManagement");
|
|
+ //gameprofilerfiller.push("entityManagement"); // Plazma - Completely remove Mojang profiler
|
|
// Paper - rewrite chunk system
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
@Override
|
|
@@ -889,9 +889,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
long i = this.levelData.getGameTime() + 1L;
|
|
|
|
this.serverLevelData.setGameTime(i);
|
|
- Profiler.get().push("scheduledFunctions");
|
|
+ //Profiler.get().push("scheduledFunctions"); // Plazma - Completely remove Mojang profiler
|
|
this.serverLevelData.getScheduledEvents().tick(this.server, i);
|
|
- Profiler.get().pop();
|
|
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
|
|
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
|
|
// Purpur start
|
|
int incrementTicks = isDay() ? this.purpurConfig.daytimeTicks : this.purpurConfig.nighttimeTicks;
|
|
@@ -1000,9 +1000,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
boolean flag = this.isRaining();
|
|
int j = chunkcoordintpair.getMinBlockX();
|
|
int k = chunkcoordintpair.getMinBlockZ();
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("thunder");
|
|
+ //gameprofilerfiller.push("thunder"); // Plazma - Completely remove Mojang profiler
|
|
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*simpleRandom.nextInt(this.spigotConfig.thunderChance) == 0*/ chunk.shouldDoLightning(this.simpleRandom)) { // Spigot // Paper - Option to disable thunder // Paper - optimise random ticking // Pufferfish - replace random with shouldDoLightning
|
|
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
|
|
|
@@ -1039,7 +1039,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.popPush("iceandsnow");
|
|
+ //gameprofilerfiller.popPush("iceandsnow"); // Plazma - Completely remove Mojang profiler
|
|
|
|
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
|
|
for (int l = 0; l < randomTickSpeed; ++l) {
|
|
@@ -1049,12 +1049,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
} // Paper - Option to disable ice and snow
|
|
|
|
- gameprofilerfiller.popPush("tickBlocks");
|
|
+ //gameprofilerfiller.popPush("tickBlocks"); // Plazma - Completely remove Mojang profiler
|
|
if (randomTickSpeed > 0) {
|
|
this.optimiseRandomTick(chunk, randomTickSpeed); // Paper - optimise random ticking
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
@VisibleForTesting
|
|
@@ -1386,19 +1386,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}*/ // Paper - comment out EAR 2
|
|
// Spigot end
|
|
entity.setOldPosAndRot();
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
++entity.tickCount;
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
gameprofilerfiller.push(() -> {
|
|
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
|
});
|
|
- gameprofilerfiller.incrementCounter("tickNonPassenger");
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.incrementCounter("tickNonPassenger"); // Plazma - Completely remove Mojang profiler
|
|
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); // Paper - EAR 2
|
|
if (isActive) { // Paper - EAR 2
|
|
entity.tick();
|
|
entity.postTick(); // CraftBukkit
|
|
} else { entity.inactiveTick(); } // Paper - EAR 2
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
Iterator iterator = entity.getPassengers().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -1421,12 +1423,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
|
|
passenger.setOldPosAndRot();
|
|
++passenger.tickCount;
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
gameprofilerfiller.push(() -> {
|
|
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
|
|
});
|
|
- gameprofilerfiller.incrementCounter("tickPassenger");
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.incrementCounter("tickPassenger");
|
|
// Paper start - EAR 2
|
|
if (isActive) {
|
|
passenger.rideTick();
|
|
@@ -1438,7 +1442,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
vehicle.positionRider(passenger);
|
|
}
|
|
// Paper end - EAR 2
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop();
|
|
Iterator iterator = passenger.getPassengers().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index 94ab672f4576a77a609093eab76b1c5e2abddde2..755f9e3e00a38b276be3d6d757c411eaf27e385f 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -102,8 +102,8 @@ import net.minecraft.tags.FluidTags;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.damagesource.DamageTypes;
|
|
import net.minecraft.world.effect.MobEffectInstance;
|
|
@@ -1673,15 +1673,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
|
this.unsetRemoved();
|
|
*/
|
|
// CraftBukkit end
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("moving");
|
|
+ //gameprofilerfiller.push("moving"); // Plazma - Completely remove Mojang profiler
|
|
if (worldserver != null && resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit - empty to fall through to null to event
|
|
this.enteredNetherPosition = this.position();
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("placing");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("placing"); // Plazma - Completely remove Mojang profiler
|
|
// CraftBukkit start
|
|
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
|
LevelData worlddata = worldserver.getLevelData();
|
|
@@ -1699,7 +1699,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
|
this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
|
|
this.connection.resetPosition();
|
|
worldserver.addDuringTeleport(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove mojang profiler
|
|
this.triggerDimensionChangeTriggers(worldserver1);
|
|
this.stopUsingItem();
|
|
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
index a71c220ea1c464c193029adb1a0d3e5c237442af..f034a030e9402a4ea03028dfbba931b08e5687ae 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
@@ -30,7 +30,7 @@ import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.server.level.ClientInformation;
|
|
import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.util.VisibleForDebug;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.util.thread.BlockableEventLoop;
|
|
import org.slf4j.Logger;
|
|
|
|
@@ -275,7 +275,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
|
}
|
|
|
|
protected void keepConnectionAlive() {
|
|
- Profiler.get().push("keepAlive");
|
|
+ //Profiler.get().push("keepAlive"); // Plazma - Completely remove Mojang profiler
|
|
// Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
|
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
|
long currentTime = Util.getMillis();
|
|
@@ -308,7 +308,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
|
}
|
|
// Paper end - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
|
|
|
- Profiler.get().pop();
|
|
+ //Profiler.get().pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
private boolean checkIfClosed(long time) {
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
|
|
index 5a2b07340c63577f6d32c0658ce5f9b616c82f91..9245d2010c8d0579fe58f7eab4acd7ed1891d8dc 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/ProfiledReloadInstance.java
|
|
@@ -9,8 +9,8 @@ import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
import net.minecraft.Util;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public class ProfiledReloadInstance extends SimpleReloadInstance<ProfiledReloadInstance.State> {
|
|
@@ -51,12 +51,12 @@ public class ProfiledReloadInstance extends SimpleReloadInstance<ProfiledReloadI
|
|
|
|
private static Executor profiledExecutor(Executor executor, AtomicLong atomicLong, String string) {
|
|
return runnable -> executor.execute(() -> {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push(string);
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push(string); // Plazma - Completely remove Mojang profiler
|
|
long l = Util.getNanos();
|
|
runnable.run();
|
|
atomicLong.addAndGet(Util.getNanos() - l);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
});
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
index d2d82e4f22bfeac8881b6815e4bef56c254fded9..3e307274084df5304e801acdde2ae3b8f75ce8d6 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
|
@@ -3,8 +3,8 @@ package net.minecraft.server.packs.resources;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Executor;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
|
|
public interface ResourceManagerReloadListener extends PreparableReloadListener {
|
|
@Override
|
|
@@ -12,10 +12,10 @@ public interface ResourceManagerReloadListener extends PreparableReloadListener
|
|
PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor
|
|
) {
|
|
return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("listener");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get();
|
|
+ //profilerFiller.push("listener");
|
|
this.onResourceManagerReload(manager);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop();
|
|
}, applyExecutor);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
index eb54f0cc67ca25e0ff6e423bcbcebab294bd5d95..c907e7a244f3eaeb264846f477ada086eb29994c 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
|
@@ -15,7 +15,7 @@ import java.util.Map.Entry;
|
|
import net.minecraft.core.HolderLookup;
|
|
import net.minecraft.resources.FileToIdConverter;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import org.slf4j.Logger;
|
|
|
|
public abstract class SimpleJsonResourceReloadListener<T> extends SimplePreparableReloadListener<Map<ResourceLocation, T>> {
|
|
@@ -39,7 +39,7 @@ public abstract class SimpleJsonResourceReloadListener<T> extends SimplePreparab
|
|
}
|
|
|
|
@Override
|
|
- protected Map<ResourceLocation, T> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
|
|
+ protected Map<ResourceLocation, T> prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Mojang profiler
|
|
Map<ResourceLocation, T> map = new HashMap<>();
|
|
scanDirectory(resourceManager, this.directory, this.ops, this.codec, map);
|
|
return map;
|
|
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
index 0aaab6a2a10bf012c9d275f7cee2095c8fbb8809..524417d6726249a06371918155a94add2d421b98 100644
|
|
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
|
@@ -2,20 +2,20 @@ package net.minecraft.server.packs.resources;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Executor;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
|
|
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
|
@Override
|
|
public final CompletableFuture<Void> reload(
|
|
PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor
|
|
) {
|
|
- return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager, Profiler.get()), prepareExecutor)
|
|
+ return CompletableFuture.<T>supplyAsync(() -> this.prepare(manager/*, Profiler.get()*/), prepareExecutor) // Plazma - Completely remove Mojang profiler
|
|
.thenCompose(synchronizer::wait)
|
|
- .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, Profiler.get()), applyExecutor);
|
|
+ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager/*, Profiler.get()*/), applyExecutor); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang profiler
|
|
|
|
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
|
|
+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java b/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
|
|
index 805532c7acc4ad81b83e305d669f5cee0e7597e9..f37e42621b50d183c17efdda14211736fc7968c9 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/AbstractConsecutiveExecutor.java
|
|
@@ -7,13 +7,13 @@ import java.util.concurrent.Executor;
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
import net.minecraft.Util;
|
|
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
-import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
|
|
-import net.minecraft.util.profiling.metrics.ProfilerMeasured;
|
|
+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang profiler
|
|
import org.slf4j.Logger;
|
|
|
|
-public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements ProfilerMeasured, TaskScheduler<T>, Runnable {
|
|
+public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements /*ProfilerMeasured,*/ TaskScheduler<T>, Runnable { // Plazma - Completely remove Mojang profiler
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private final AtomicReference<AbstractConsecutiveExecutor.Status> status = new AtomicReference<>(AbstractConsecutiveExecutor.Status.SLEEPING);
|
|
private final StrictQueue<T> queue;
|
|
@@ -24,7 +24,7 @@ public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements
|
|
this.executor = executor;
|
|
this.queue = queue;
|
|
this.name = name;
|
|
- MetricsRegistry.INSTANCE.add(this);
|
|
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
private boolean canBeScheduled() {
|
|
@@ -108,10 +108,12 @@ public abstract class AbstractConsecutiveExecutor<T extends Runnable> implements
|
|
return this.name;
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
@Override
|
|
public List<MetricSampler> profiledMetrics() {
|
|
return ImmutableList.of(MetricSampler.create(this.name + "-queue-size", MetricCategory.CONSECUTIVE_EXECUTORS, this::size));
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
private boolean setRunning() {
|
|
return this.status.compareAndSet(AbstractConsecutiveExecutor.Status.SLEEPING, AbstractConsecutiveExecutor.Status.RUNNING);
|
|
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
index 9b706276dc5b5f55b966c5472c6c4e864342b916..d8efe335be1808422abef6d7ba094c9a3a4f3be3 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
|
@@ -15,13 +15,13 @@ import java.util.function.Supplier;
|
|
import javax.annotation.CheckReturnValue;
|
|
import net.minecraft.ReportedException;
|
|
import net.minecraft.SharedConstants;
|
|
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
-import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
|
|
-import net.minecraft.util.profiling.metrics.ProfilerMeasured;
|
|
+//import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+//import net.minecraft.util.profiling.metrics.MetricSampler;
|
|
+//import net.minecraft.util.profiling.metrics.MetricsRegistry;
|
|
+//import net.minecraft.util.profiling.metrics.ProfilerMeasured;
|
|
import org.slf4j.Logger;
|
|
|
|
-public abstract class BlockableEventLoop<R extends Runnable> implements ProfilerMeasured, TaskScheduler<R>, Executor {
|
|
+public abstract class BlockableEventLoop<R extends Runnable> implements /*ProfilerMeasured,*/ TaskScheduler<R>, Executor { // Plazma - Completely remove Mojang profiler
|
|
public static final long BLOCK_TIME_NANOS = 100000L;
|
|
private final String name;
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
@@ -30,7 +30,7 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
|
|
|
protected BlockableEventLoop(String name) {
|
|
this.name = name;
|
|
- MetricsRegistry.INSTANCE.add(this);
|
|
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
protected abstract boolean shouldRun(R task);
|
|
@@ -160,10 +160,12 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Completely remove Mojang profiler
|
|
@Override
|
|
public List<MetricSampler> profiledMetrics() {
|
|
return ImmutableList.of(MetricSampler.create(this.name + "-pending-tasks", MetricCategory.EVENT_LOOPS, this::getPendingTasksCount));
|
|
}
|
|
+ */ // Plazma - Completely remove Mojang profiler
|
|
|
|
public static boolean isNonRecoverable(Throwable exception) {
|
|
return exception instanceof ReportedException reportedException
|
|
diff --git a/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java b/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
|
|
index c67846e4d5583d79c6e9760c10d2581f0d54f45c..fdace9b3dedcd2c0879ea4ef30657d9d0e37ad7e 100644
|
|
--- a/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
|
|
+++ b/src/main/java/net/minecraft/util/thread/PriorityConsecutiveExecutor.java
|
|
@@ -3,12 +3,12 @@ package net.minecraft.util.thread;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Executor;
|
|
import java.util.function.Consumer;
|
|
-import net.minecraft.util.profiling.metrics.MetricsRegistry;
|
|
+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang profiler
|
|
|
|
public class PriorityConsecutiveExecutor extends AbstractConsecutiveExecutor<StrictQueue.RunnableWithPriority> {
|
|
public PriorityConsecutiveExecutor(int priorityCount, Executor executor, String name) {
|
|
super(new StrictQueue.FixedPriorityQueue(priorityCount), executor, name);
|
|
- MetricsRegistry.INSTANCE.add(this);
|
|
+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 99d15d6beed3e3d165e71e0955074cc09b02a333..9a3170a65539eb5b66a7461feca9cb44c35a2de5 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -84,8 +84,8 @@ import net.minecraft.tags.FluidTags;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
import net.minecraft.world.Nameable;
|
|
@@ -915,9 +915,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
// CraftBukkit end
|
|
|
|
public void baseTick() {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("entityBaseTick");
|
|
+ //gameprofilerfiller.push("entityBaseTick"); // Plazma - Completely remove Mojang profiler
|
|
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
|
this.inBlockState = null;
|
|
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
|
@@ -986,7 +986,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
public void setSharedFlagOnFire(boolean onFire) {
|
|
@@ -1213,9 +1213,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
}
|
|
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("move");
|
|
+ //gameprofilerfiller.push("move"); // Plazma - Completely remove Mojang profiler
|
|
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
|
movement = movement.multiply(this.stuckSpeedMultiplier);
|
|
this.stuckSpeedMultiplier = Vec3.ZERO;
|
|
@@ -1224,7 +1224,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
// Paper start - ignore movement changes while inactive.
|
|
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) {
|
|
setDeltaMovement(Vec3.ZERO);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
return;
|
|
}
|
|
// Paper end
|
|
@@ -1245,8 +1245,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("rest");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("rest"); // Plazma - Completely remove Mojang profiler
|
|
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
|
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
|
|
|
@@ -1267,9 +1267,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
|
|
//} // Plazma - Remove persist 'isClientSide' flag
|
|
|
|
- if (this.isRemoved()) {
|
|
- gameprofilerfiller.pop();
|
|
- } else {
|
|
+ if (!this.isRemoved()) { // Plazma - Completely remove Mojang profiler
|
|
if (this.horizontalCollision) {
|
|
Vec3 vec3d2 = this.getDeltaMovement();
|
|
|
|
@@ -1319,7 +1317,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
float f = this.getBlockSpeedFactor();
|
|
|
|
this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f));
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
}
|
|
// Paper start - detailed watchdog information
|
|
@@ -3494,9 +3492,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
this.processPortalCooldown();
|
|
if (this.portalProcess != null) {
|
|
if (this.portalProcess.processPortalTeleportation(worldserver, this, this.canUsePortal(false))) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("portal");
|
|
+ //gameprofilerfiller.push("portal"); // Plazma - Completely remove Mojang profiler
|
|
this.setPortalCooldown();
|
|
TeleportTransition teleporttransition = this.portalProcess.getPortalDestination(worldserver, this);
|
|
|
|
@@ -3508,7 +3506,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
} else if (this.portalProcess.hasExpired()) {
|
|
this.portalProcess = null;
|
|
}
|
|
@@ -4024,16 +4022,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
entity.teleport(this.calculatePassengerTransition(teleportTarget, entity));
|
|
}
|
|
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("teleportSameDimension");
|
|
+ //gameprofilerfiller.push("teleportSameDimension"); // Plazma - Completely remove Mojang profiler
|
|
this.teleportSetPosition(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
|
|
if (!teleportTarget.asPassenger()) {
|
|
this.sendTeleportTransitionToRidingPlayers(teleportTarget);
|
|
}
|
|
|
|
teleportTarget.postTeleportTransition().onTransition(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
return this;
|
|
}
|
|
|
|
@@ -4055,12 +4053,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
}
|
|
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("teleportCrossDimension");
|
|
+ //gameprofilerfiller.push("teleportCrossDimension"); // Plazma - Completely remove Mojang profiler
|
|
entity = this.getType().create(world, EntitySpawnReason.DIMENSION_TRAVEL);
|
|
if (entity == null) {
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
return null;
|
|
} else {
|
|
// Paper start - Fix item duplication and teleport issues
|
|
@@ -4086,7 +4084,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
|
|
world.resetEmptyTime();
|
|
teleportTarget.postTeleportTransition().onTransition(entity);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
return entity;
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index 05f5932b771cef2739f9effb9993c3cb4bdb1960..9cd39ccca746c96809e3e1862e25240714662fb2 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -73,8 +73,8 @@ import net.minecraft.tags.FluidTags;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.damagesource.CombatRules;
|
|
@@ -457,9 +457,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
}
|
|
|
|
super.baseTick();
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("livingEntityBaseTick");
|
|
+ //gameprofilerfiller.push("livingEntityBaseTick"); // Plazma - Completely remove Mojang profiler
|
|
if (this.fireImmune() /*|| this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag
|
|
this.clearFire();
|
|
}
|
|
@@ -567,7 +567,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
this.yHeadRotO = this.yHeadRot;
|
|
this.yRotO = this.getYRot();
|
|
this.xRotO = this.getXRot();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
// Pufferfish start - optimize suffocation
|
|
@@ -3435,12 +3435,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
}
|
|
|
|
this.run += (f3 - this.run) * 0.3F;
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("headTurn");
|
|
+ //gameprofilerfiller.push("headTurn"); // Plazma - Completely remove Mojang profiler
|
|
f2 = this.tickHeadTurn(f1, f2);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("rangeChecks");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("rangeChecks"); // Plazma - Completely remove Mojang profiler
|
|
|
|
// Paper start - stop large pitch and yaw changes from crashing the server
|
|
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
|
|
@@ -3452,7 +3452,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
|
|
// Paper end
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.animStep += f2;
|
|
if (this.isFallFlying()) {
|
|
++this.fallFlyTicks;
|
|
@@ -3683,21 +3683,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
}
|
|
|
|
this.setDeltaMovement(d0, d1, d2);
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("ai");
|
|
+ //gameprofilerfiller.push("ai"); // Plazma - Completely remove Mojang profiler
|
|
if (this.isImmobile()) {
|
|
this.jumping = false;
|
|
this.xxa = 0.0F;
|
|
this.zza = 0.0F;
|
|
} else /*if (this.isEffectiveAi())*/ { // Plazma - Remove persist 'isClientSide' flag
|
|
- gameprofilerfiller.push("newAi");
|
|
+ //gameprofilerfiller.push("newAi"); // Plazma - Completely remove Mojang profiler
|
|
this.serverAiStep();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("jump");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("jump"); // Plazma - Completely remove Mojang profiler
|
|
if (this.jumping && this.isAffectedByFluids()) {
|
|
double d3;
|
|
|
|
@@ -3724,8 +3724,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
this.noJumpDelay = 0;
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("travel");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("travel"); // Plazma - Completely remove Mojang profiler
|
|
this.xxa *= 0.98F;
|
|
this.zza *= 0.98F;
|
|
if (this.isFallFlying()) {
|
|
@@ -3758,8 +3758,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
//} // Plazma - Remove persist 'isClientSide' flag
|
|
|
|
this.calculateEntityAnimation(this instanceof FlyingAnimal);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("freezing");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("freezing"); // Plazma - Completely remove Mojang profiler
|
|
if (/*!this.level().isClientSide &&*/ !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API // Plazma - Remove persist 'isClientSide' flag
|
|
int i = this.getTicksFrozen();
|
|
|
|
@@ -3780,15 +3780,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("push");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("push"); // Plazma - Completely remove Mojang profiler
|
|
if (this.autoSpinAttackTicks > 0) {
|
|
--this.autoSpinAttackTicks;
|
|
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
|
}
|
|
|
|
this.pushEntities();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
// Paper start - Add EntityMoveEvent
|
|
// Purpur start
|
|
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 997c5b3deed7c55e5685fba76bcbb53e10e66d9f..c32d248bed500bdd161b8c1aaee3bd3b46ac8fe1 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -34,8 +34,8 @@ import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
@@ -373,15 +373,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
|
@Override
|
|
public void baseTick() {
|
|
super.baseTick();
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("mobBaseTick");
|
|
+ //gameprofilerfiller.push("mobBaseTick"); // Plazma - Completely remove Mojang profiler
|
|
if (this.isAlive() && this.random.nextInt(1000) < this.ambientSoundTime++) {
|
|
this.resetAmbientSoundTime();
|
|
this.playAmbientSound();
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
incrementTicksSinceLastInteraction(); // Purpur
|
|
}
|
|
|
|
@@ -702,9 +702,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
|
@Override
|
|
public void aiStep() {
|
|
super.aiStep();
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("looting");
|
|
+ //gameprofilerfiller.push("looting"); // Plazma - Completely remove Mojang profiler
|
|
Level world = this.level();
|
|
|
|
if (world instanceof ServerLevel worldserver) {
|
|
@@ -728,7 +728,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
protected Vec3i getPickupReach() {
|
|
@@ -950,49 +950,49 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
|
return;
|
|
}
|
|
// Paper end - Allow nerfed mobs to jump and float
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("sensing");
|
|
+ //gameprofilerfiller.push("sensing"); // Plazma - Completely remove Mojang profiler
|
|
//this.sensing.tick(); // Plazma - moved down
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
int i = this.tickCount + this.getId();
|
|
|
|
if (i % this.level().plazmaConfig().entity.sensorTick == 0) this.sensing.tick(); // Plazma - Configurable entity sensor tick
|
|
if (i % 2 != 0 && this.tickCount > 1) {
|
|
- gameprofilerfiller.push("targetSelector");
|
|
+ //gameprofilerfiller.push("targetSelector"); // Plazma - Completely remove Mojang profiler
|
|
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
|
this.targetSelector.tickRunningGoals(false);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("goalSelector");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("goalSelector"); // Plazma - Completely remove Mojang profiler
|
|
if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
|
this.goalSelector.tickRunningGoals(false);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
} else {
|
|
- gameprofilerfiller.push("targetSelector");
|
|
+ //gameprofilerfiller.push("targetSelector"); // Plazma - Completely remove Mojang profiler
|
|
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
|
this.targetSelector.tick();
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("goalSelector");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("goalSelector"); // Plazma - Completely remove Mojang profiler
|
|
if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
|
this.goalSelector.tick();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
- gameprofilerfiller.push("navigation");
|
|
+ //gameprofilerfiller.push("navigation"); // Plazma - Completely remove Mojang profiler
|
|
this.navigation.tick();
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("mob tick");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("mob tick"); // Plazma - Completely remove Mojang profiler
|
|
this.customServerAiStep((ServerLevel) this.level());
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("controls");
|
|
- gameprofilerfiller.push("move");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("controls"); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("move"); // Plazma - Completely remove Mojang profiler
|
|
this.moveControl.tick();
|
|
- gameprofilerfiller.popPush("look");
|
|
+ //gameprofilerfiller.popPush("look"); // Plazma - Completely remove Mojang profiler
|
|
this.lookControl.tick();
|
|
- gameprofilerfiller.popPush("jump");
|
|
+ //gameprofilerfiller.popPush("jump"); // Plazma - Completely remove Mojang profiler
|
|
this.jumpControl.tick();
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.sendDebugPackets();
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
|
index 5a439e3b0fdc1010884634c1e046e49d8b9aee17..e04f1f946e0b37ea1362aa2af7ff4232cc73c123 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
|
@@ -7,8 +7,8 @@ import java.util.EnumSet;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.function.Predicate;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
|
|
public class GoalSelector {
|
|
private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() {
|
|
@@ -85,8 +85,8 @@ public class GoalSelector {
|
|
}
|
|
|
|
public void tick() {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("goalCleanup");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("goalCleanup"); // Plazma - Completely remove Mojang profiler
|
|
|
|
for (WrappedGoal wrappedGoal : this.availableGoals) {
|
|
if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams
|
|
@@ -95,8 +95,8 @@ public class GoalSelector {
|
|
}
|
|
|
|
this.lockedFlags.entrySet().removeIf(entry -> !entry.getValue().isRunning());
|
|
- profilerFiller.pop();
|
|
- profilerFiller.push("goalUpdate");
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("goalUpdate"); // Plazma - Completely remove Mojang profiler
|
|
|
|
for (WrappedGoal wrappedGoal2 : this.availableGoals) {
|
|
// Paper start
|
|
@@ -116,13 +116,13 @@ public class GoalSelector {
|
|
}
|
|
}
|
|
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.tickRunningGoals(true);
|
|
}
|
|
|
|
public void tickRunningGoals(boolean tickAll) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("goalTick");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("goalTick"); // Plazma - Completely remove Mojang profiler
|
|
|
|
for (WrappedGoal wrappedGoal : this.availableGoals) {
|
|
if (wrappedGoal.isRunning() && (tickAll || wrappedGoal.requiresUpdateEveryTick())) {
|
|
@@ -130,7 +130,7 @@ public class GoalSelector {
|
|
}
|
|
}
|
|
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
public Set<WrappedGoal> getAvailableGoals() {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
|
index 99e31c8e8488ce7138c5385575cbbabe0bd7394e..ac4d7310f50340da668c0e6d63982f99d71f7e05 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
|
@@ -10,8 +10,8 @@ import net.minecraft.core.Vec3i;
|
|
import net.minecraft.network.protocol.game.DebugPackets;
|
|
import net.minecraft.tags.BlockTags;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.Mob;
|
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
|
@@ -189,13 +189,13 @@ public abstract class PathNavigation {
|
|
}
|
|
}
|
|
// Paper end - EntityPathfindEvent
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("pathfind");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("pathfind"); // Plazma - Completely remove Mojang profiler
|
|
BlockPos blockPos = useHeadPos ? this.mob.blockPosition().above() : this.mob.blockPosition();
|
|
int i = (int)(followRange + (float)range);
|
|
PathNavigationRegion pathNavigationRegion = new PathNavigationRegion(this.level, blockPos.offset(-i, -i, -i), blockPos.offset(i, i, i));
|
|
Path path = this.pathFinder.findPath(pathNavigationRegion, this.mob, positions, followRange, distance, this.maxVisitedNodesMultiplier);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
// Plazma start - Process pathfinding asynchronously
|
|
if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) {
|
|
if (!positions.isEmpty()) this.targetPos = positions.iterator().next();
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
|
|
index 116b1e251ffe68bae5c404d0823c2bc7c1afddf6..24aa626c1ccd12c6a00d004ac3af46980d3042f2 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java
|
|
@@ -2,8 +2,8 @@ package net.minecraft.world.entity.ai.sensing;
|
|
|
|
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
|
import it.unimi.dsi.fastutil.ints.IntSet;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.Mob;
|
|
|
|
@@ -28,10 +28,10 @@ public class Sensing {
|
|
} else if (this.unseen.contains(i)) {
|
|
return false;
|
|
} else {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("hasLineOfSight");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("hasLineOfSight"); // Plazma - Completely remove Mojang profiler
|
|
boolean bl = this.mob.hasLineOfSight(entity);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
if (bl) {
|
|
this.seen.add(i);
|
|
} else {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
|
index dc833fe4aed149a4edbf668af4bc12937f6a4850..8be1ea2c4825c1647cedadc5f3258fb98242d81c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
|
@@ -31,8 +31,8 @@ import net.minecraft.tags.GameEventTags;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
import net.minecraft.world.SimpleContainer;
|
|
@@ -275,15 +275,15 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("allayBrain");
|
|
+ //gameprofilerfiller.push("allayBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("allayActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("allayActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
AllayAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
index 7ac1ecd192e65a87a30acba509947f93cccfd709..191e42503a8a257b7f07c2a50eb6c23368e916af 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
@@ -23,8 +23,8 @@ import net.minecraft.util.ByIdMap;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.StringRepresentable;
|
|
import net.minecraft.util.TimeUtil;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -164,15 +164,15 @@ public class Armadillo extends Animal {
|
|
private int behaviorTick; // Plazma - Add missing pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("armadilloBrain");
|
|
+ //gameprofilerfiller.push("armadilloBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
|
((Brain<Armadillo>) this.brain).tick(world, this); // CraftBukkit - decompile error
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("armadilloActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("armadilloActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
ArmadilloAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) {
|
|
this.forceDrops = true; // CraftBukkit
|
|
if (this.dropFromGiftLootTable(world, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
index ee9be9de7d64c9354b579dc22954058873e7ab5e..33718841e1d97185ba59142bcc484adcb488fc56 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
|
@@ -26,8 +26,8 @@ import net.minecraft.util.ByIdMap;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.StringRepresentable;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
@@ -335,15 +335,15 @@ public class Axolotl extends Animal implements VariantHolder<Axolotl.Variant>, B
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("axolotlBrain");
|
|
+ //gameprofilerfiller.push("axolotlBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("axolotlActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("axolotlActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
AxolotlAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
if (!this.isNoAi()) {
|
|
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
|
index c11f9111933ec2e033cffcdf930983d505c3acab..81265ee1f2523ba9236f25aa4904892dad1c6132 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
|
@@ -17,8 +17,8 @@ import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.tags.BlockTags;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
@@ -167,17 +167,17 @@ public class Camel extends AbstractHorse {
|
|
private int behaviorTick = 0; // Plazma - Add missing pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("camelBrain");
|
|
+ //gameprofilerfiller.push("camelBrain"); // Plazma - Completely remove Mojang profiler
|
|
Brain<Camel> behaviorcontroller = (Brain<Camel>) this.getBrain(); // CraftBukkit - decompile error
|
|
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
|
behaviorcontroller.tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("camelActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("camelActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
CamelAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
|
index 305fe2c13ae2d81b99ff36f8ef18e24c23255eae..8a228f3cbaf706bc02ee142b11fdebfa3192e3e8 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
|
@@ -28,8 +28,8 @@ import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.entity.AgeableMob;
|
|
@@ -258,14 +258,14 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("frogBrain");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("frogBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- profilerFiller.pop();
|
|
- profilerFiller.push("frogActivityUpdate");
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("frogActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
FrogAi.updateActivity(this);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
index 4b9e57c271b5b4bdaa92f8da7e0770e2c1adba96..d41526c5cc223162f0298ff1ccf65acc1dfdcbca 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
@@ -12,8 +12,8 @@ import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.tags.ItemTags;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -140,15 +140,15 @@ public class Tadpole extends AbstractFish {
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("tadpoleBrain");
|
|
+ //gameprofilerfiller.push("tadpoleBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("tadpoleActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("tadpoleActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
TadpoleAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
index d508cb2a61866c8fd7f381f8deb558ed86f7c845..d911c311b28e80843d3e162553093fe54168a0c6 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
@@ -20,8 +20,8 @@ import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
@@ -227,15 +227,15 @@ public class Goat extends Animal {
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("goatBrain");
|
|
+ //gameprofilerfiller.push("goatBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
- gameprofilerfiller.push("goatActivityUpdate");
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
+ //gameprofilerfiller.push("goatActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
GoatAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
index a108cba43a7272f53cd53b885dc03874fbf27ba4..83d0b7587919a607e44e86b3b8d8806265889455 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
@@ -30,8 +30,8 @@ import net.minecraft.tags.BlockTags;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.util.ByIdMap;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -512,14 +512,14 @@ public class Sniffer extends Animal {
|
|
private int behaviorTick; // Plazma - Add missing pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("snifferBrain");
|
|
+ //gameprofilerfiller.push("snifferBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.popPush("snifferActivityUpdate");
|
|
+ //gameprofilerfiller.popPush("snifferActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
SnifferAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
|
|
index 650af7be38e9ba8e81ac991689ffa0a444e7f94b..f2c623498de9a6f165b45686ec255640332932e3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
|
|
@@ -91,7 +91,7 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity {
|
|
|
|
// CraftBukkit start
|
|
if (leashable instanceof Entity entity && CraftEventFactory.callPlayerLeashEntityEvent(entity, this, player, hand).isCancelled()) {
|
|
- ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder()));
|
|
+ ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(entity, leashable.getLeashHolder()));
|
|
flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities
|
|
continue;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
index 3eb20ffc4a0446b2d0580de40b42eca53b53ec03..18325bcb3274e746b913dbacf28663b4d32786a9 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
@@ -15,8 +15,8 @@ import net.minecraft.network.syncher.SynchedEntityData;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.util.valueproviders.UniformInt;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -281,11 +281,11 @@ public class Zoglin extends Monster implements HoglinBase {
|
|
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("zoglinBrain");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("zoglinBrain"); // Plazma - Completely remove Mojang profiler
|
|
if (getRider() == null || !this.isControllable()) // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
this.updateActivity();
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
index 2e39c65304fff182ee63e18f16b677b490af2837..b5bbec8bc4a228844abad7a90142656482faff63 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
@@ -12,8 +12,8 @@ import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.tags.EntityTypeTags;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.entity.AnimationState;
|
|
import net.minecraft.world.entity.Entity;
|
|
@@ -238,13 +238,13 @@ public class Breeze extends Monster {
|
|
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("breezeBrain");
|
|
+ //gameprofilerfiller.push("breezeBrain"); // Plazma - Completely remove Mojang profiler
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.popPush("breezeActivityUpdate");
|
|
+ //gameprofilerfiller.popPush("breezeActivityUpdate"); // Plazma - Completely remove Mojang profiler
|
|
BreezeAi.updateActivity(this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
index 833667dfaff7f8de638238981adbf0b4a839ea04..60571ab800bad67e7b5f97b09e8610752df81b21 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
@@ -13,8 +13,8 @@ import net.minecraft.network.syncher.SynchedEntityData;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.entity.AnimationState;
|
|
import net.minecraft.world.entity.Entity;
|
|
@@ -144,10 +144,10 @@ public class Creaking extends Monster {
|
|
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("creakingBrain");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("creakingBrain"); // Plazma - Completely remove Mojang profiler
|
|
this.getBrain().tick((ServerLevel)this.level(), this);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
CreakingAi.updateActivity(this);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
index 28ca4b511ea37f6fd0eefc7a8d449c85075b855d..840f62cdb2a691bcfb5c27f00745cebfeb97df96 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
|
@@ -16,8 +16,8 @@ import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
@@ -179,12 +179,12 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
|
private int behaviorTick; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("hoglinBrain");
|
|
+ //gameprofilerfiller.push("hoglinBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
HoglinAi.updateActivity(this);
|
|
if (this.isConverting()) {
|
|
++this.timeInOverworld;
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
index 938b4025122f6d27382086445bc8f231f325b864..8fc0279ab108189f70daec0dd57a6ffd0a7b5711 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
@@ -6,8 +6,8 @@ import java.util.List;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.VisibleForDebug;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResult;
|
|
@@ -340,12 +340,12 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
|
private int behaviorTick; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("piglinBrain");
|
|
+ //gameprofilerfiller.push("piglinBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
PiglinAi.updateActivity(this);
|
|
super.customServerAiStep(world);
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
index bc3b0eb21200eae7e419b2571871b36fc1e07c0f..7134120e8f22904c222ac31b763f67fc12a970ee 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
@@ -8,8 +8,8 @@ import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.util.RandomSource;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.entity.EntitySpawnReason;
|
|
@@ -148,11 +148,11 @@ public class PiglinBrute extends AbstractPiglin {
|
|
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("piglinBruteBrain");
|
|
+ //ProfilerFiller profilerFiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.push("piglinBruteBrain"); // Plazma - Completely remove Mojang profiler
|
|
if (getRider() == null || this.isControllable()) // Purpur - only use brain if no rider
|
|
this.getBrain().tick(world, this);
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
PiglinBruteAi.updateActivity(this);
|
|
PiglinBruteAi.maybePlayActivitySound(this);
|
|
super.customServerAiStep(world);
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
|
index 4102dc4c8b63a1d00a8417aa303521590202f9a6..56d880a05cc8f799e43384bc8bee04d3f829bae2 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
|
@@ -32,8 +32,8 @@ import net.minecraft.tags.TagKey;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.Unit;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.effect.MobEffectInstance;
|
|
@@ -321,12 +321,12 @@ public class Warden extends Monster implements VibrationSystem {
|
|
private int behaviorTick = 0; // Pufferfish
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel world) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("wardenBrain");
|
|
+ //gameprofilerfiller.push("wardenBrain"); // Plazma - Completely remove Mojang profiler
|
|
if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing Purpur configurations
|
|
this.getBrain().tick(world, this);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
super.customServerAiStep(world);
|
|
if ((this.tickCount + this.getId()) % 120 == 0) {
|
|
Warden.applyDarknessAround(world, this.position(), this, 20);
|
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
|
index 68353a8b2a01fbf873c3751f3887dc0ec35c8327..98068cfb9124e8a7cf0691f691a7b16dbdfec194 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
|
@@ -38,8 +38,8 @@ import net.minecraft.stats.Stats;
|
|
import net.minecraft.tags.ItemTags;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.SpawnUtil;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.InteractionHand;
|
|
@@ -344,9 +344,9 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
|
}
|
|
protected void customServerAiStep(ServerLevel world, boolean inactive) { // Purpur - not final
|
|
// Paper end - EAR 2
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("villagerBrain");
|
|
+ //gameprofilerfiller.push("villagerBrain"); // Plazma - Completely remove Mojang profiler
|
|
// Purpur start
|
|
if (this.level().purpurConfig.villagerLobotomizeEnabled) {
|
|
// treat as inactive if lobotomized
|
|
@@ -360,7 +360,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
|
this.getBrain().tick(world, this); // Paper // Purpur
|
|
}
|
|
// Pufferfish end
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
if (this.assignProfessionWhenSpawned) {
|
|
this.assignProfessionWhenSpawned = false;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java
|
|
index bfde7c2d386d94913bde5452b903f2f2ee7ac672..580bd63fdbf9555f867362d3c1f39f41fd750089 100644
|
|
--- a/src/main/java/net/minecraft/world/item/Items.java
|
|
+++ b/src/main/java/net/minecraft/world/item/Items.java
|
|
@@ -1698,7 +1698,7 @@ public class Items {
|
|
ExperienceBottleItem::new,
|
|
new Item.Properties().rarity(Rarity.UNCOMMON).component(DataComponents.ENCHANTMENT_GLINT_OVERRIDE, true)
|
|
);
|
|
- public static final Item FIRE_CHARGE = registerItem("fire_charge", FireChargeItem::new, new Item.Properties().useCooldown(org.plazmamc.plazma.configurations.GlobalConfiguration.get().item.fireCharge.cooldown()));
|
|
+ public static final Item FIRE_CHARGE = registerItem("fire_charge", FireChargeItem::new);
|
|
public static final Item WIND_CHARGE = registerItem("wind_charge", WindChargeItem::new, new Item.Properties().useCooldown(0.5F));
|
|
public static final Item WRITABLE_BOOK = registerItem(
|
|
"writable_book", WritableBookItem::new, new Item.Properties().stacksTo(1).component(DataComponents.WRITABLE_BOOK_CONTENT, WritableBookContent.EMPTY)
|
|
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 f6dd363ececf967d282f5ba713013085da1ddf37..5c11433dcfc858b13f1f056ddcf92ac1cf71ef65 100644
|
|
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
@@ -41,7 +41,7 @@ import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.server.packs.resources.ResourceManager;
|
|
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
|
import net.minecraft.server.packs.resources.SimplePreparableReloadListener;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
|
|
public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> implements RecipeAccess {
|
|
|
|
@@ -94,7 +94,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
|
|
}
|
|
|
|
@Override
|
|
- protected RecipeMap prepare(ResourceManager manager, ProfilerFiller profiler) {
|
|
+ protected RecipeMap prepare(ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
SortedMap<ResourceLocation, Recipe<?>> sortedmap = new TreeMap();
|
|
|
|
SimpleJsonResourceReloadListener.scanDirectory(manager, Registries.elementsDirPath(Registries.RECIPE), this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedmap);
|
|
@@ -109,7 +109,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
|
|
return RecipeMap.create(list);
|
|
}
|
|
|
|
- protected void apply(RecipeMap prepared, ResourceManager manager, ProfilerFiller profiler) {
|
|
+ protected void apply(RecipeMap prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
this.recipes = prepared;
|
|
RecipeManager.LOGGER.info("Loaded {} recipes", prepared.values().size());
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index a44cb5609b3d467ba24d4814ff2d1840f49d37ed..332c1d890eefb0c705200a61b8bc7369457bc3af 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -35,8 +35,8 @@ import net.minecraft.util.AbortableIterationConsumer;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.StringRepresentable;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profilers
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profilers
|
|
import net.minecraft.world.DifficultyInstance;
|
|
import net.minecraft.world.TickRateManager;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
@@ -275,7 +275,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
|
|
@Override
|
|
public final <T extends Entity> List<T> getEntitiesOfClass(final Class<T> entityClass, final AABB boundingBox, final Predicate<? super T> predicate) {
|
|
- Profiler.get().incrementCounter("getEntities");
|
|
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
|
|
final List<T> ret = new java.util.ArrayList<>();
|
|
|
|
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getEntities(entityClass, null, boundingBox, ret, predicate);
|
|
@@ -285,7 +285,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
|
|
@Override
|
|
public final List<Entity> moonrise$getHardCollidingEntities(final Entity entity, final AABB box, final Predicate<? super Entity> predicate) {
|
|
- Profiler.get().incrementCounter("getEntities");
|
|
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
|
|
final List<Entity> ret = new java.util.ArrayList<>();
|
|
|
|
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)this).moonrise$getEntityLookup().getHardCollidingEntities(entity, box, ret, predicate);
|
|
@@ -1511,9 +1511,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
}
|
|
|
|
protected void tickBlockEntities() {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profilers
|
|
|
|
- gameprofilerfiller.push("blockEntities");
|
|
+ //gameprofilerfiller.push("blockEntities"); // Plazma - Completely remove Mojang profilers
|
|
this.tickingBlockEntities = true;
|
|
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
|
this.blockEntityTickers.addAll(this.pendingBlockEntityTickers);
|
|
@@ -1551,7 +1551,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
|
|
|
|
this.tickingBlockEntities = false;
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profilers
|
|
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
|
}
|
|
|
|
@@ -1721,7 +1721,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
|
|
@Override
|
|
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
|
- Profiler.get().incrementCounter("getEntities");
|
|
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
|
|
//List<Entity> list = Lists.newArrayList(); // Plazma - minor optimizations
|
|
|
|
// Paper start - rewrite chunk system
|
|
@@ -1751,7 +1751,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
|
|
final AABB boundingBox, final Predicate<? super T> predicate,
|
|
final List<? super T> into, final int maxCount) {
|
|
- Profiler.get().incrementCounter("getEntities");
|
|
+ //Profiler.get().incrementCounter("getEntities"); // Plazma - Completely remove Mojang profilers
|
|
|
|
if (entityTypeTest instanceof net.minecraft.world.entity.EntityType<T> byType) {
|
|
if (maxCount != Integer.MAX_VALUE) {
|
|
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
index dc15c15951e4ca30b8341d24f813259a77f41c77..ff61aee501131c4141c79354f408d89bfdda21cd 100644
|
|
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
@@ -24,8 +24,8 @@ import net.minecraft.tags.BlockTags;
|
|
import net.minecraft.util.Mth;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.util.VisibleForDebug;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.util.random.WeightedRandomList;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.EntitySpawnReason;
|
|
@@ -163,9 +163,9 @@ public final class NaturalSpawner {
|
|
}
|
|
|
|
public static void spawnForChunk(ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnState info, List<MobCategory> spawnableGroups) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("spawner");
|
|
+ //gameprofilerfiller.push("spawner"); // Plazma - Completely remove Mojang profiler
|
|
Iterator iterator = spawnableGroups.iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -211,7 +211,7 @@ public final class NaturalSpawner {
|
|
}
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
// Paper start - Add mobcaps commands
|
|
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
index 3c3d219c9339f64c23ec0b31783bf68a4423636c..58af43be0743ccafc23755b1d4eb4e6fd3d3b3a6 100644
|
|
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
@@ -15,8 +15,8 @@ import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.Holder;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import net.minecraft.util.Mth;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.EntityType;
|
|
@@ -700,11 +700,11 @@ public class ServerExplosion implements Explosion {
|
|
|
|
this.hurtEntities();
|
|
if (this.interactsWithBlocks()) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("explosion_blocks");
|
|
+ //gameprofilerfiller.push("explosion_blocks"); // Plazma - Completely remove Mojang profiler
|
|
this.interactWithBlocks(list);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
if (this.fire) {
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
index fdebf1f4ae72001c24b20dd973ca7dd54e30df3d..fdee785aec86592e8289eb3f2a8571ca5aa256b5 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
@@ -100,7 +100,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
|
// Paper end - call EntityPortalEnterEvent
|
|
BlockEntity tileentity = world.getBlockEntity(pos);
|
|
|
|
- if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity tileentity) { // Plazma - Remove persist 'isClientSide' flag + minor improvement
|
|
+ if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity tileentityendgateway) { // Plazma - Remove persist 'isClientSide' flag + minor improvement
|
|
//TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity; // Plazma - Remove persist 'isClientSide' flag + minor improvement
|
|
|
|
if (!tileentityendgateway.isCoolingDown()) {
|
|
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 3b3915c4f93f7e35392255c1352e236208a2b447..3c92e6b52394eed3ac66d44973288e4de2c133cc 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -25,8 +25,8 @@ import net.minecraft.network.FriendlyByteBuf;
|
|
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
|
import net.minecraft.server.level.FullChunkStatus;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.Level;
|
|
@@ -419,13 +419,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
}
|
|
|
|
if (LightEngine.hasDifferentLightProperties(iblockdata1, iblockdata)) {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push("updateSkyLightSources");
|
|
+ //gameprofilerfiller.push("updateSkyLightSources"); // Plazma - Completely remove Mojang profiler
|
|
// Paper - rewrite chunk system
|
|
- gameprofilerfiller.popPush("queueCheckLight");
|
|
+ //gameprofilerfiller.popPush("queueCheckLight"); // Plazma - Completely remove Mojang profiler
|
|
this.level.getChunkSource().getLightEngine().checkBlock(blockposition);
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
}
|
|
|
|
boolean flag3 = iblockdata1.hasBlockEntity();
|
|
@@ -1072,9 +1072,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
|
|
if (LevelChunk.this.isTicking(blockposition)) {
|
|
try {
|
|
- ProfilerFiller gameprofilerfiller = Profiler.get();
|
|
+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
|
|
|
|
- gameprofilerfiller.push(this::getType);
|
|
+ //gameprofilerfiller.push(this::getType); // Plazma - Completely remove Mojang profiler
|
|
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
|
|
|
if (this.blockEntity.getType().isValid(iblockdata)) {
|
|
@@ -1090,7 +1090,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
// Paper end - Remove the Block Entity if it's invalid
|
|
}
|
|
|
|
- gameprofilerfiller.pop();
|
|
+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
|
|
} catch (Throwable throwable) {
|
|
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
|
// Paper start - Prevent block entity and entity crashes
|
|
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
|
index 95e71c471904fc54003180632dc85398ae06d241..376d7715daee8fd97757746d6a6f1c665558c8b8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
|
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
|
@@ -12,9 +12,9 @@ import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.core.BlockPos;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
+//import net.minecraft.util.profiling.Profiler;
|
|
+//import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.metrics.MetricCategory;
|
|
import net.minecraft.world.entity.Mob;
|
|
import net.minecraft.world.level.PathNavigationRegion;
|
|
import dev.kaiijumc.kaiiju.path.*; // Plazma - Process pathfinding asynchronously
|
|
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
index 778e6476c86d823dc8efe603a95e589e8b2ea9d9..fe3ba3e7fb5c2711edfa7c78441a590b08a68aa3 100644
|
|
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
|
@@ -23,8 +23,8 @@ import net.minecraft.Util;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.SectionPos;
|
|
import net.minecraft.core.Vec3i;
|
|
-import net.minecraft.util.profiling.Profiler;
|
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
|
+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
|
|
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
|
|
import net.minecraft.world.level.ChunkPos;
|
|
import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
|
|
|
@@ -79,20 +79,20 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
|
}
|
|
|
|
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
|
|
- ProfilerFiller profilerFiller = Profiler.get();
|
|
- profilerFiller.push("collect");
|
|
- this.collectTicks(time, maxTicks, profilerFiller);
|
|
- profilerFiller.popPush("run");
|
|
- profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size());
|
|
+ //ProfilerFiller profilerFiller = Profiler.get();
|
|
+ //profilerFiller.push("collect");
|
|
+ this.collectTicks(time, maxTicks/*, profilerFiller*/); // Plazma - Completely remove Mojang profiler
|
|
+ //profilerFiller.popPush("run");
|
|
+ //profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size());
|
|
this.runCollectedTicks(ticker);
|
|
- profilerFiller.popPush("cleanup");
|
|
+ //profilerFiller.popPush("cleanup");
|
|
this.cleanupAfterTick();
|
|
- profilerFiller.pop();
|
|
+ //profilerFiller.pop();
|
|
}
|
|
|
|
- private void collectTicks(long time, int maxTicks, ProfilerFiller profiler) {
|
|
+ private void collectTicks(long time, int maxTicks/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang profiler
|
|
this.sortContainersToTick(time);
|
|
- profiler.incrementCounter("containersToTick", this.containersToTick.size());
|
|
+ //profiler.incrementCounter("containersToTick", this.containersToTick.size());
|
|
this.drainContainers(time, maxTicks);
|
|
this.rescheduleLeftoverContainers();
|
|
}
|