mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 16:42:03 -07:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5299)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9d0ad318 Fix javadoc errors in previous commits 9501daa2 #578: Add methods to modify the rate of regeneration and starvation 197d8f3d #577: Add EntityExhaustionEvent CraftBukkit Changes: a021e334 #795: Add methods to modify the rate of regeneration and starvation 509e523c #792: Add EntityExhaustionEvent Spigot Changes: db99f821 Rebuild patches
This commit is contained in:
@@ -32,11 +32,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- 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 >= 10) {
|
||||
if (this.foodTickTimer >= this.saturatedRegenRate) { // CraftBukkit
|
||||
float f = Math.min(this.saturationLevel, 6.0F);
|
||||
|
||||
- entityhuman.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||
+ entityhuman.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED, true); // CraftBukkit - added RegainReason // Paper - This is fast regen
|
||||
this.a(f);
|
||||
// this.a(f); CraftBukkit - EntityExhaustionEvent
|
||||
entityhuman.applyExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
|
||||
this.foodTickTimer = 0;
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value
|
||||
this.applyExhaustion(world.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||
} else {
|
||||
- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_NODAMAGE, this.getSoundCategory(), 1.0F, 1.0F);
|
||||
+ sendSoundEffect(this, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_NODAMAGE, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||
@@ -68,5 +68,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
// CraftBukkit start
|
||||
public void applyExhaustion(float f) {
|
||||
if (!this.abilities.isInvulnerable) {
|
||||
|
Submodule work/Bukkit updated: 95ff95ed62...9d0ad3184e
Submodule work/CraftBukkit updated: ea050e6e98...a021e334aa
Submodule work/Spigot updated: 73fb6094f4...db99f82161
Reference in New Issue
Block a user