PaperMC/paper-server/nms-patches/net/minecraft/world/entity/monster/EntityIllagerWizard.patch
CraftBukkit/Spigot 65bc2541a3 Update to Minecraft 1.20.5
By: md_5 <git@md-5.net>
2024-04-24 01:15:00 +10:00

25 lines
1.1 KiB
Diff

--- a/net/minecraft/world/entity/monster/EntityIllagerWizard.java
+++ b/net/minecraft/world/entity/monster/EntityIllagerWizard.java
@@ -17,6 +17,10 @@
import net.minecraft.world.entity.ai.goal.PathfinderGoal;
import net.minecraft.world.level.World;
+// CraftBukkit start
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+// CraftBukkit end
+
public abstract class EntityIllagerWizard extends EntityIllagerAbstract {
private static final DataWatcherObject<Byte> DATA_SPELL_CASTING_ID = DataWatcher.defineId(EntityIllagerWizard.class, DataWatcherRegistry.BYTE);
@@ -158,6 +162,11 @@
public void tick() {
--this.attackWarmupDelay;
if (this.attackWarmupDelay == 0) {
+ // CraftBukkit start
+ if (!CraftEventFactory.handleEntitySpellCastEvent(EntityIllagerWizard.this, this.getSpell())) {
+ return;
+ }
+ // CraftBukkit end
this.performSpellCasting();
EntityIllagerWizard.this.playSound(EntityIllagerWizard.this.getCastingSoundEvent(), 1.0F, 1.0F);
}