feat: 1.20.2

This commit is contained in:
Lexi Larkin
2023-11-11 20:08:17 -05:00
parent 6d85991c24
commit c7cfec78f4
32 changed files with 123 additions and 124 deletions

View File

@@ -0,0 +1,31 @@
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 ed79d30f33b2674863b2d73b1abdb48433c33412..ba37d877ca690b67223c0f1989b441301ce1047c 100644
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
@@ -286,6 +286,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 70bb9c9052ed52308ea42542f50939c23d0311e1..5f310ffc47a30897494beb1c351509a182781e1d 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -293,7 +293,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);
}
}