-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Armor stand cant kill by mob projectile
- Loading branch information
1 parent
aa4c184
commit 0d5e5c3
Showing
13 changed files
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
patches/server/0125-Armor-stand-cant-kill-by-mob-projectile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <[email protected]> | ||
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 e3a32c8b764b4dec59c70283efc6611f469abe21..cddcd4b8124cc24de79d728dbd18f964e6752291 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; |