mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
23 lines
1.0 KiB
Diff
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 d00035e31cf4773a418d1cc6a6018d08e6b558f0..9f5153580f96f643240a8817a74a47b22e2a85cc 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@@ -1968,6 +1968,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) {
|