32 lines
1.6 KiB
Diff
32 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lexi <lexi@qixils.dev>
|
|
Date: Fri, 17 Jun 2022 14:36:42 -0400
|
|
Subject: [PATCH] Add config for ticking TIME_SINCE_REST
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..aa47cd0274db73cefb5feb062be53f1cd66d48cf 100644
|
|
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
@@ -287,6 +287,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
}
|
|
|
|
public boolean disablePlayerCrits = false;
|
|
+ public boolean tickTimeSinceSleep = true; // Parchment
|
|
public boolean nerfPigmenFromNetherPortals = false;
|
|
public PillagerPatrols pillagerPatrols;
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
index 31f533ae280f147cbc183430a6209beedf4e96b3..1016f8a15756756fa7e85878aa22dbab5ae74a55 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@@ -288,7 +288,7 @@ public abstract class Player extends LivingEntity {
|
|
this.awardStat(Stats.CROUCH_TIME);
|
|
}
|
|
|
|
- if (!this.isSleeping()) {
|
|
+ if (!this.isSleeping() && this.level().paperConfig().entities.behavior.tickTimeSinceSleep) { // Parchment
|
|
this.awardStat(Stats.TIME_SINCE_REST);
|
|
}
|
|
}
|