2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/monster/EntityIllagerWizard.java
|
|
|
|
+++ b/net/minecraft/world/entity/monster/EntityIllagerWizard.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -17,6 +17,10 @@
|
2023-06-24 09:15:05 +02:00
|
|
|
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);
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -158,6 +162,11 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
public void tick() {
|
2021-06-11 07:00:00 +02:00
|
|
|
--this.attackWarmupDelay;
|
|
|
|
if (this.attackWarmupDelay == 0) {
|
2020-08-15 01:12:20 +02:00
|
|
|
+ // CraftBukkit start
|
2023-06-24 09:15:05 +02:00
|
|
|
+ if (!CraftEventFactory.handleEntitySpellCastEvent(EntityIllagerWizard.this, this.getSpell())) {
|
2020-08-15 01:12:20 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2021-11-21 23:00:00 +01:00
|
|
|
this.performSpellCasting();
|
|
|
|
EntityIllagerWizard.this.playSound(EntityIllagerWizard.this.getCastingSoundEvent(), 1.0F, 1.0F);
|
2020-08-15 01:12:20 +02:00
|
|
|
}
|