Update to Minecraft 1.19.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-03-15 03:30:00 +11:00
parent 90a887a912
commit 40076782ed
227 changed files with 2788 additions and 1621 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/food/FoodMetaData.java
+++ b/net/minecraft/world/food/FoodMetaData.java
@@ -8,15 +8,33 @@
@@ -7,15 +7,33 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameRules;
@@ -35,7 +35,7 @@
public void eat(int i, float f) {
this.foodLevel = Math.min(i + this.foodLevel, 20);
@@ -26,8 +44,17 @@
@@ -25,8 +43,17 @@
public void eat(Item item, ItemStack itemstack) {
if (item.isEdible()) {
FoodInfo foodinfo = item.getFoodProperties();
@@ -54,7 +54,7 @@
}
}
@@ -41,7 +68,15 @@
@@ -40,7 +67,15 @@
if (this.saturationLevel > 0.0F) {
this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
} else if (enumdifficulty != EnumDifficulty.PEACEFUL) {
@@ -71,7 +71,7 @@
}
}
@@ -49,23 +84,25 @@
@@ -48,23 +83,25 @@
if (flag && this.saturationLevel > 0.0F && entityhuman.isHurt() && this.foodLevel >= 20) {
++this.tickTimer;
@@ -102,5 +102,5 @@
- if (this.tickTimer >= 80) {
+ if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
if (entityhuman.getHealth() > 10.0F || enumdifficulty == EnumDifficulty.HARD || entityhuman.getHealth() > 1.0F && enumdifficulty == EnumDifficulty.NORMAL) {
entityhuman.hurt(DamageSource.STARVE, 1.0F);
entityhuman.hurt(entityhuman.damageSources().starve(), 1.0F);
}