mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-03 22:26:12 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: LittleChest <81231195+LittleChest@users.noreply.github.com>
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 df29a54063ee957c2b88a12ef228c7d8541a2f2c..93d4345695f69c94325edda17fb9aee65bf61ce5 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 {
|