mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-30 12:29:18 +00:00
20 lines
1.3 KiB
Diff
20 lines
1.3 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 6609f4309c2d6fac14b56dd75963d868a464c44c..60859ca12d6df9770b3c0cb7feffbbb471b8b233 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -552,7 +552,7 @@ public class ArmorStand extends LivingEntity {
|
|
} else {
|
|
long i = this.level().getGameTime();
|
|
|
|
- if (i - this.lastHit > 5L && !flag1) {
|
|
+ if (i - this.lastHit > 5L && (!flag1 || (top.leavesmc.leaves.LeavesConfig.armorStandCantKillByMobProjectile && source.is(net.minecraft.world.damagesource.DamageTypes.MOB_PROJECTILE)))) { // Leaves - Armor stand cant kill by mob projectile
|
|
this.level().broadcastEntityEvent(this, (byte) 32);
|
|
this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity());
|
|
this.lastHit = i;
|