32 lines
1.8 KiB
Diff
32 lines
1.8 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 4bcf27f98765abf693e535cfc1756c27a10cb316..6a698656c90c368d5c64f4a0b2a16500c7dadc02 100644
|
|
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
|
@@ -290,6 +290,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
|
}
|
|
|
|
public boolean disablePlayerCrits = false;
|
|
+ public boolean tickTimeSinceSleep = true; // Parchment
|
|
public boolean nerfPigmenFromNetherPortals = false;
|
|
@Comment("Prevents merging items that are not on the same y level, preventing potential visual artifacts.")
|
|
public boolean onlyMergeItemsHorizontally = false;
|
|
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 0acb4ef6d4ea60d7e4bc17534e84a7a9b477f04e..dae72e66a976701c0cb1fc26e6c37657b79da423 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@@ -304,7 +304,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);
|
|
}
|
|
}
|