mirror of
https://github.com/Samsuik/Sakura.git
synced 2026-01-04 15:31:43 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@52a0590 Updated Upstream (Bukkit/CraftBukkit) (#11543) PaperMC/Paper@5c0930d Fix fix recipe iterator patch PaperMC/Paper@1de0130 re-add a dispense fix patch PaperMC/Paper@16d7d73 bunch more general fixes PaperMC/Paper@a5d7426 Correctly support RecipeChoice.empty (#11550) PaperMC/Paper@85c870e Correct update cursor (#11554) PaperMC/Paper@d19be64 Fix NPE with spark when CraftServer is not init yet (#11558) PaperMC/Paper@92131ad Decrease dead entity teleport warning (#11559) PaperMC/Paper@a6df4c8 Handle corrupt light data gracefully PaperMC/Paper@ce0a041 [ci skip] Rebuild patches PaperMC/Paper@c6aa61e Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561) PaperMC/Paper@93b435d [ci skip] better instructions for patch apply conflict (#11568) PaperMC/Paper@42a1901 Correctly adopt upstream item EAR fix (#11582) PaperMC/Paper@fcb6c72 Correctly pass velocity native compressor (#11509) PaperMC/Paper@99f4bb2 Fix infinite fireworks (#11592) (#11594)
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <kfian294ma4@gmail.com>
|
|
Date: Wed, 2 Oct 2024 18:45:22 +0100
|
|
Subject: [PATCH] Add max armour durability damage
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index d40dbe4bd5c4983337453d753f20a8b555236f16..a7709e4fc5ade9882d115fdbcf37146574fffcbd 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2513,6 +2513,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
// Apply damage to armor
|
|
if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
|
|
float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
|
|
+ // Sakura start - add max armour durability damage
|
|
+ int maxArmourDamage = this.level().sakuraConfig().players.combat.maxArmourDamage.or(-1);
|
|
+ if (maxArmourDamage >= 0) {
|
|
+ armorDamage = Math.min(armorDamage, maxArmourDamage);
|
|
+ }
|
|
+ // Sakura end - add max armour durability damage
|
|
this.hurtArmor(damagesource, armorDamage);
|
|
}
|
|
|