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@00ef8bd Fix Entity#isTicking and update Paper entity command (#11590) PaperMC/Paper@6483ecb Updated Upstream (Bukkit/CraftBukkit) PaperMC/Paper@17dbf74 Improve CraftEntity and CraftPlayer equals PaperMC/Paper@0af4e84 [ci skip] Add identifying line to some larger/optimization patches PaperMC/Paper@bcbd108 Call CraftPlayer#onEntityRemove for all online players (#11598) PaperMC/Paper@e47f79a Configure mockito agent (#11560) PaperMC/Paper@94ea770 Re-add exact choice shapeless support (#11546) PaperMC/Paper@2e6eafb Improve Minecart#getMinecartMaterial (#11544) PaperMC/Paper@9d1c91d [ci skip] Fix UseCooldownComponent jd (#11565) PaperMC/Paper@59b79c8 Fix NPE with enchantable (#11557) PaperMC/Paper@6da7b9e Update Eigencraft patch to 1.21.3 (#11553) PaperMC/Paper@1ef4c0e Improve performance of RecipeMap#removeRecipe (#11547) PaperMC/Paper@52fb265 Optimize custom map rendering (#11000) PaperMC/Paper@661839e Fix and optimize getChunkCount (#11610) PaperMC/Paper@c60af44 Fix experimental minecart collisions on sloped rails PaperMC/Paper@13f48d8 [ci skip] Rebuild patches PaperMC/Paper@be886cf Fix Naming issue inside Add PlayerArmorChangeEvent (#11614) PaperMC/Paper@7b13d93 Updated Upstream (Bukkit/CraftBukkit) (#11626) PaperMC/Paper@4e2291e chore: refactor issue templates PaperMC/Paper@bc4a705 [ci skip] chore: change paste.gg links to mclo.gs (#11629) PaperMC/Paper@3480489 Update Alternate Current patch to 1.21.3 (#11602) PaperMC/Paper@575c1c4 Update disableGameRuleLimits casing PaperMC/Paper@11d708d [ci skip] Add missing feature patch identifiers PaperMC/Paper@daf3113 Make logs less annoying PaperMC/Paper@4e01ede Fix inverted global skip check PaperMC/Paper@d8b66dd fix: move to jline-terminal-ffm on java 22+ and fall back to jni on 21, fixes #10405 PaperMC/Paper@6735c60 Fix enderchest opening animation (#11635) PaperMC/Paper@de6173b Item DataComponent API (#10845) PaperMC/Paper@8c5b837 Rework async chunk api implementation PaperMC/Paper@37b9630 Do not create unneccessary callback in ChunkTaskScheduler#scheduleChunkLoad PaperMC/Paper@878da16 Fix non block ticking chunks not sending block/light updates PaperMC/Paper@fdef6d3 Add missing NotNull annotation for getChunksAtAsync cb param PaperMC/Paper@01dd50f [ci skip] Rebuild patches PaperMC/Paper@f9f964d Fix drops for shearing bogged (#11628) PaperMC/Paper@21cc763 Fix drops for shearing mushroom cow (#11632) PaperMC/Paper@57eab3e Add PlayerItemGroupCooldownEvent (#11625) PaperMC/Paper@d0dcd7d Fix incorrect invulnerability damage reduction (#11599) PaperMC/Paper@85bfdc0 Fix NPE when EntityResurrectEvent is uncancelled (#11636) PaperMC/Paper@c28d89d Update spark PaperMC/Paper@55475f0 [ci skip] Fix typos PaperMC/Paper@f8e2a67 Check for AbstractBoat instead of Boat in EAR ignore list
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 8992f0ad55c1177bee9d4167cedf2fef54117a6a..8cb19ec587512d70a792235ba4e7d82b56074a77 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2535,6 +2535,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);
|
|
}
|
|
|