mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
26 lines
1.4 KiB
Diff
26 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Fri, 29 Sep 2023 10:39:36 +0800
|
|
Subject: [PATCH] Armor stand cant kill by mob projectile
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
index 9ab1c4dccf0cc96ecc6f3a2a8dbcb38df0b530af..9883db7b41c44fdb878ae3e110b1339a87dfa7a3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -531,6 +531,14 @@ public class ArmorStand extends LivingEntity {
|
|
boolean flag = source.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND);
|
|
boolean flag1 = source.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS);
|
|
|
|
+ // Leaves start - Armor stand cant kill by mob projectile
|
|
+ if (org.leavesmc.leaves.LeavesConfig.armorStandCantKillByMobProjectile) {
|
|
+ if (!flag && !(source.getDirectEntity() instanceof net.minecraft.world.entity.projectile.AbstractArrow)) {
|
|
+ return false;
|
|
+ }
|
|
+ }
|
|
+ // Leaves end - Armor stand cant kill by mob projectile
|
|
+
|
|
if (!flag && !flag1) {
|
|
return false;
|
|
} else {
|