9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2026-01-03 22:16:22 +00:00
Files
DivineMC/patches/server/0014-Fix-MC-31819.patch
NONPLAYT 0da68fccb5 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@04ee5e7 Updated Upstream (Paper)
2023-12-29 22:32:03 +03:00

23 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sat, 10 Jun 2023 13:17:01 +0300
Subject: [PATCH] Fix MC-31819
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 738aca99196c5b88ed5d561d410964c71625578d..33ec0391c98c3d0b102fe4add182d57d43fe039f 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1905,6 +1905,11 @@ public abstract class Player extends LivingEntity {
}
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
+ // DivineMC start - Fix MC-31819
+ if (this.level().getDifficulty() == Difficulty.PEACEFUL) {
+ return;
+ }
+ // DivineMC end
// CraftBukkit end
if (!this.abilities.invulnerable) {
if (!this.level().isClientSide) {