aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch
new file mode 100644
index 0000000000..ba057f3e79
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/ServerTickRateManager.java.patch
@@ -0,0 +1,53 @@
+--- a/net/minecraft/server/ServerTickRateManager.java
++++ b/net/minecraft/server/ServerTickRateManager.java
+@@ -60,8 +59,14 @@
+ }
+
+ public boolean stopSprinting() {
++ // CraftBukkit start, add sendLog parameter
++ return stopSprinting(true);
++ }
++
++ public boolean stopSprinting(boolean sendLog) {
++ // CraftBukkit end
+ if (this.remainingSprintTicks > 0L) {
+- this.finishTickSprint();
++ this.finishTickSprint(sendLog); // CraftBukkit - add sendLog parameter
+ return true;
+ } else {
+ return false;
+@@ -79,7 +84,7 @@
+ return flag;
+ }
+
+- private void finishTickSprint() {
++ private void finishTickSprint(boolean sendLog) { // CraftBukkit - add sendLog parameter
+ long i = this.scheduledCurrentSprintTicks - this.remainingSprintTicks;
+ double d0 = Math.max(1.0D, (double) this.sprintTimeSpend) / (double) TimeUtil.NANOSECONDS_PER_MILLISECOND;
+ int j = (int) ((double) (TimeUtil.MILLISECONDS_PER_SECOND * i) / d0);
+@@ -87,9 +92,13 @@
+
+ this.scheduledCurrentSprintTicks = 0L;
+ this.sprintTimeSpend = 0L;
+- this.server.createCommandSourceStack().sendSuccess(() -> {
+- return Component.translatable("commands.tick.sprint.report", j, s);
+- }, true);
++ // CraftBukkit start - add sendLog parameter
++ if (sendLog) {
++ this.server.createCommandSourceStack().sendSuccess(() -> {
++ return Component.translatable("commands.tick.sprint.report", j, s);
++ }, true);
++ }
++ // CraftBukkit end
+ this.remainingSprintTicks = 0L;
+ this.setFrozen(this.previousIsFrozen);
+ this.server.onTickRateChanged();
+@@ -103,7 +112,7 @@
+ --this.remainingSprintTicks;
+ return true;
+ } else {
+- this.finishTickSprint();
++ this.finishTickSprint(true); // CraftBukkit - add sendLog parameter
+ return false;
+ }
+ }