mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes:b33b63908eSupport complex components in written book builder (#6337)bfb3d42b44Optimize entity tracker passenger checks (#6361)399710ff79Add reobf mappings patch for MinecraftServer#getLootTables (#6368)25cd8aba9fConfig option for Piglins guarding chests (#4829)80650e8936Added EntityItemDamageEvent (#4928) Tuinity Changes:8e7cc4dc96Do not submit profile lookups to worldgen threads
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Encode42 <me@encode42.dev>
|
||||
Date: Tue, 29 Jun 2021 23:44:36 -0400
|
||||
Subject: [PATCH] Configurable hunger starvation damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
index c1130952e3fa22abaa27fcc1c4761c831dc56cc3..1ac08eca469739cb52abd38483c431b63b7f84a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
@@ -103,7 +103,7 @@ public class FoodData {
|
||||
++this.tickTimer;
|
||||
if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
|
||||
if (player.getHealth() > 10.0F || enumdifficulty == Difficulty.HARD || player.getHealth() > 1.0F && enumdifficulty == Difficulty.NORMAL) {
|
||||
- player.hurt(DamageSource.STARVE, 1.0F);
|
||||
+ player.hurt(DamageSource.STARVE, player.level.purpurConfig.hungerStarvationDamage); // Purpur
|
||||
}
|
||||
|
||||
this.tickTimer = 0;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 342b855ece49e1acbdd1268222ba156bf3012036..093340d3871ec3db4271d5c33e53edef04d7ce03 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -2279,4 +2279,9 @@ public class PurpurWorldConfig {
|
||||
private void seedSettings() {
|
||||
randomPopulatorSeed = getBoolean("seed.random-populator-seed", randomPopulatorSeed);
|
||||
}
|
||||
+
|
||||
+ public float hungerStarvationDamage = 1.0F;
|
||||
+ private void hungerSettings() {
|
||||
+ hungerStarvationDamage = (float) getDouble("hunger.starvation-damage", hungerStarvationDamage);
|
||||
+ }
|
||||
}
|
||||
Reference in New Issue
Block a user