PaperMC/paper-server/nms-patches/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch
CraftBukkit/Spigot f64dc66a5f #1290: Add methods to get/set evoker fang attack delay
By: Jishuna <joshl5324@gmail.com>
2023-11-09 06:36:06 +11:00

21 lines
1 KiB
Diff

--- a/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
+++ b/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
@@ -19,7 +19,7 @@
public static final int ATTACK_DURATION = 20;
public static final int LIFE_OFFSET = 2;
public static final int ATTACK_TRIGGER_TICKS = 14;
- private int warmupDelayTicks;
+ public int warmupDelayTicks;
private boolean sentSpikeEvent;
private int lifeTicks;
private boolean clientSideAttackStarted;
@@ -129,7 +129,9 @@
if (entityliving.isAlive() && !entityliving.isInvulnerable() && entityliving != entityliving1) {
if (entityliving1 == null) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = this; // CraftBukkit
entityliving.hurt(this.damageSources().magic(), 6.0F);
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
} else {
if (entityliving1.isAlliedTo((Entity) entityliving)) {
return;