mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
2377cf1414
Included Commits: Update IRC channel to irc.spi.gt SpigotMC/Spigot@a791c555e7 Remove inv close patch for now SpigotMC/Spigot@a3abb3bea9 Limit TNT Detonations per tick SpigotMC/Spigot@8f9c601aed Use sane default config values SpigotMC/Spigot@1cbbb9b62e These commits were not included as they were quickly reverted: Only close if we are actually placing a block SpigotMC/Spigot@ea0b1b2d67 Revert for the above SpigotMC/Spigot@28faa0bd20 Add isUnbreakable and setUnbreakable to ItemMeta. Also fixes a bug wh... SpigotMC/Spigot@32e6d74a5f Revert for the above SpigotMC/Spigot@4b5a26b11c
66 lines
No EOL
3.3 KiB
Diff
66 lines
No EOL
3.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: lazertester <austin.techhead@gmail.com>
|
|
Date: Sun, 17 Aug 2014 19:56:17 +1000
|
|
Subject: [PATCH] Add Hunger Config Values
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
}
|
|
}
|
|
|
|
- this.applyExhaustion(0.3F);
|
|
+ this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value
|
|
} else if (flag1) {
|
|
entity.extinguish();
|
|
}
|
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
super.bj();
|
|
this.a(StatisticList.r, 1);
|
|
if (this.isSprinting()) {
|
|
- this.applyExhaustion(0.8F);
|
|
+ this.applyExhaustion(world.spigotConfig.sprintExhaustion); // Spigot - Change to use configurable value
|
|
} else {
|
|
- this.applyExhaustion(0.2F);
|
|
+ this.applyExhaustion(world.spigotConfig.walkExhaustion); // Spigot - Change to use configurable value
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
|
|
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
|
|
@@ -0,0 +0,0 @@ public class FoodMetaData {
|
|
if (this.foodTickTimer >= 80) {
|
|
// CraftBukkit - added RegainReason
|
|
entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED);
|
|
- this.a(3.0F);
|
|
+ this.a(entityhuman.world.spigotConfig.regenExhaustion); // Spigot - Change to use configurable value
|
|
this.foodTickTimer = 0;
|
|
}
|
|
} else if (this.foodLevel <= 0) {
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
|
largeFeatureSeed = getInt( "seed-feature", 14357617 );
|
|
log( "Custom Map Seeds: Village: " + villageSeed + " Feature: " + largeFeatureSeed );
|
|
}
|
|
+
|
|
+ public float walkExhaustion;
|
|
+ public float sprintExhaustion;
|
|
+ public float combatExhaustion;
|
|
+ public float regenExhaustion;
|
|
+ private void initHunger()
|
|
+ {
|
|
+ walkExhaustion = (float) getDouble( "hunger.walk-exhaustion", 0.2 );
|
|
+ sprintExhaustion = (float) getDouble( "hunger.sprint-exhaustion", 0.8 );
|
|
+ combatExhaustion = (float) getDouble( "hunger.combat-exhaustion", 0.3 );
|
|
+ regenExhaustion = (float) getDouble( "hunger.regen-exhaustion", 3 );
|
|
+ }
|
|
}
|
|
--
|