9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-03 22:26:12 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0130-Old-zombie-piglin-drop-behavior.patch
Lumine1909 f09fbb247d 1.21.5 (#470)
---------

Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>
Co-authored-by: Fortern <blueten.ki@gmail.com>
Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com>
Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
2025-06-05 18:41:51 +08:00

22 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
Date: Fri, 23 May 2025 08:05:45 +0800
Subject: [PATCH] Old zombie piglin drop behavior
diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
index 05de183ce7b0be9b41f005b2ca36807a109fc634..6c3895f96ef0c3bd69dc5cd0fae56c83116537a3 100644
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
@@ -159,6 +159,10 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
}
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.oldZombiePiglinDrop && livingEntity instanceof Player player) {
+ this.setLastHurtByPlayer(player, super.tickCount);
+ }
+
return super.setTarget(livingEntity, reason); // CraftBukkit
}