mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-29 20:09:23 +00:00
fix: old zombie piglin drop config(#508)
This commit is contained in:
@@ -5,17 +5,16 @@ 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 822712eaff2f6c579d982734ab14a00c02182770..a9d139932cdcf55abef58cc834a1df322aa7d66c 100644
|
||||
index 822712eaff2f6c579d982734ab14a00c02182770..abc18460374a246d0895dd56a3c3d8a6503ccde4 100644
|
||||
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
@@ -160,6 +160,10 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
|
||||
@@ -113,6 +113,9 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
this.maybeAlertOthers();
|
||||
}
|
||||
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.oldZombiePiglinDrop && livingEntity instanceof Player player) {
|
||||
+ this.setLastHurtByPlayer(player, super.tickCount);
|
||||
+ }
|
||||
+
|
||||
return super.setTarget(livingEntity, reason); // CraftBukkit
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.oldZombiePiglinDrop && this.isAngry()) this.lastHurtByPlayerMemoryTime = this.tickCount; // Leaves - old zombie piglin drop
|
||||
+
|
||||
super.customServerAiStep(level);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user