--- a/net/minecraft/world/entity/monster/Evoker.java
+++ b/net/minecraft/world/entity/monster/Evoker.java
@@ -4,6 +4,7 @@
 import javax.annotation.Nullable;
 import net.minecraft.core.BlockPos;
 import net.minecraft.core.Direction;
+import net.minecraft.core.Holder;
 import net.minecraft.nbt.CompoundTag;
 import net.minecraft.network.syncher.SynchedEntityData;
 import net.minecraft.server.level.ServerLevel;
@@ -16,6 +17,7 @@
 import net.minecraft.world.entity.LivingEntity;
 import net.minecraft.world.entity.Mob;
 import net.minecraft.world.entity.MobSpawnType;
+import net.minecraft.world.entity.SpawnGroupData;
 import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
 import net.minecraft.world.entity.ai.attributes.Attributes;
 import net.minecraft.world.entity.ai.goal.AvoidEntityGoal;
@@ -41,6 +43,7 @@
 import net.minecraft.world.scores.PlayerTeam;
 
 public class Evoker extends SpellcasterIllager {
+
     @Nullable
     private Sheep wololoTarget;
 
@@ -54,21 +57,21 @@
         super.registerGoals();
         this.goalSelector.addGoal(0, new FloatGoal(this));
         this.goalSelector.addGoal(1, new Evoker.EvokerCastingSpellGoal());
-        this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Player.class, 8.0F, 0.6, 1.0));
+        this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Player.class, 8.0F, 0.6D, 1.0D));
         this.goalSelector.addGoal(4, new Evoker.EvokerSummonSpellGoal());
         this.goalSelector.addGoal(5, new Evoker.EvokerAttackSpellGoal());
         this.goalSelector.addGoal(6, new Evoker.EvokerWololoSpellGoal());
-        this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6));
+        this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
         this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 3.0F, 1.0F));
         this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 8.0F));
-        this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Raider.class).setAlertOthers());
-        this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true).setUnseenMemoryTicks(300));
-        this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false).setUnseenMemoryTicks(300));
+        this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[]{Raider.class})).setAlertOthers());
+        this.targetSelector.addGoal(2, (new NearestAttackableTargetGoal<>(this, Player.class, true)).setUnseenMemoryTicks(300));
+        this.targetSelector.addGoal(3, (new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)).setUnseenMemoryTicks(300));
         this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, false));
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.FOLLOW_RANGE, 12.0).add(Attributes.MAX_HEALTH, 24.0);
+        return Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.5D).add(Attributes.FOLLOW_RANGE, 12.0D).add(Attributes.MAX_HEALTH, 24.0D);
     }
 
     @Override
@@ -98,7 +101,19 @@
 
     @Override
     public boolean isAlliedTo(Entity other) {
-        return other != null && (other == this || super.isAlliedTo(other) || other instanceof Vex vex && this.isAlliedTo(vex.getOwner()));
+        if (other == null) {
+            return false;
+        } else if (other == this) {
+            return true;
+        } else if (super.isAlliedTo(other)) {
+            return true;
+        } else if (other instanceof Vex) {
+            Vex entityvex = (Vex) other;
+
+            return this.isAlliedTo((Entity) entityvex.getOwner());
+        } else {
+            return false;
+        }
     }
 
     @Override
@@ -120,8 +135,8 @@
         this.wololoTarget = wololoTarget;
     }
 
-    @Nullable
-    public Sheep getWololoTarget() {
+    public @Nullable
+    Sheep getWololoTarget() {
         return this.wololoTarget;
     }
 
@@ -131,161 +146,191 @@
     }
 
     @Override
-    public void applyRaidBuffs(int wave, boolean unused) {
+    public void applyRaidBuffs(int wave, boolean unused) {}
+
+    private class EvokerCastingSpellGoal extends SpellcasterIllager.SpellcasterCastingSpellGoal {
+
+        EvokerCastingSpellGoal() {
+            super();
+        }
+
+        @Override
+        public void tick() {
+            if (Evoker.this.getTarget() != null) {
+                Evoker.this.getLookControl().setLookAt(Evoker.this.getTarget(), (float) Evoker.this.getMaxHeadYRot(), (float) Evoker.this.getMaxHeadXRot());
+            } else if (Evoker.this.getWololoTarget() != null) {
+                Evoker.this.getLookControl().setLookAt(Evoker.this.getWololoTarget(), (float) Evoker.this.getMaxHeadYRot(), (float) Evoker.this.getMaxHeadXRot());
+            }
+
+        }
     }
 
-    class EvokerAttackSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
+    private class EvokerSummonSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
+
+        private final TargetingConditions vexCountTargeting = TargetingConditions.forNonCombat().range(16.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
+
+        EvokerSummonSpellGoal() {
+            super();
+        }
+
+        @Override
+        public boolean canUse() {
+            if (!super.canUse()) {
+                return false;
+            } else {
+                int i = Evoker.this.level().getNearbyEntities(Vex.class, this.vexCountTargeting, Evoker.this, Evoker.this.getBoundingBox().inflate(16.0D)).size();
+
+                return Evoker.this.random.nextInt(8) + 1 > i;
+            }
+        }
+
         @Override
         protected int getCastingTime() {
-            return 40;
+            return 100;
         }
 
         @Override
         protected int getCastingInterval() {
-            return 100;
+            return 340;
         }
 
         @Override
         protected void performSpellCasting() {
-            LivingEntity livingEntity = Evoker.this.getTarget();
-            double d = Math.min(livingEntity.getY(), Evoker.this.getY());
-            double e = Math.max(livingEntity.getY(), Evoker.this.getY()) + 1.0;
-            float f = (float)Mth.atan2(livingEntity.getZ() - Evoker.this.getZ(), livingEntity.getX() - Evoker.this.getX());
-            if (Evoker.this.distanceToSqr(livingEntity) < 9.0) {
-                for (int i = 0; i < 5; i++) {
-                    float g = f + (float)i * (float) Math.PI * 0.4F;
-                    this.createSpellEntity(Evoker.this.getX() + (double)Mth.cos(g) * 1.5, Evoker.this.getZ() + (double)Mth.sin(g) * 1.5, d, e, g, 0);
-                }
-
-                for (int j = 0; j < 8; j++) {
-                    float h = f + (float)j * (float) Math.PI * 2.0F / 8.0F + (float) (Math.PI * 2.0 / 5.0);
-                    this.createSpellEntity(Evoker.this.getX() + (double)Mth.cos(h) * 2.5, Evoker.this.getZ() + (double)Mth.sin(h) * 2.5, d, e, h, 3);
-                }
-            } else {
-                for (int k = 0; k < 16; k++) {
-                    double l = 1.25 * (double)(k + 1);
-                    int m = 1 * k;
-                    this.createSpellEntity(Evoker.this.getX() + (double)Mth.cos(f) * l, Evoker.this.getZ() + (double)Mth.sin(f) * l, d, e, f, m);
-                }
-            }
-        }
+            ServerLevel worldserver = (ServerLevel) Evoker.this.level();
+            PlayerTeam scoreboardteam = Evoker.this.getTeam();
 
-        private void createSpellEntity(double x, double z, double maxY, double y, float yaw, int warmup) {
-            BlockPos blockPos = BlockPos.containing(x, y, z);
-            boolean bl = false;
-            double d = 0.0;
+            for (int i = 0; i < 3; ++i) {
+                BlockPos blockposition = Evoker.this.blockPosition().offset(-2 + Evoker.this.random.nextInt(5), 1, -2 + Evoker.this.random.nextInt(5));
+                Vex entityvex = (Vex) EntityType.VEX.create(Evoker.this.level());
 
-            do {
-                BlockPos blockPos2 = blockPos.below();
-                BlockState blockState = Evoker.this.level().getBlockState(blockPos2);
-                if (blockState.isFaceSturdy(Evoker.this.level(), blockPos2, Direction.UP)) {
-                    if (!Evoker.this.level().isEmptyBlock(blockPos)) {
-                        BlockState blockState2 = Evoker.this.level().getBlockState(blockPos);
-                        VoxelShape voxelShape = blockState2.getCollisionShape(Evoker.this.level(), blockPos);
-                        if (!voxelShape.isEmpty()) {
-                            d = voxelShape.max(Direction.Axis.Y);
-                        }
+                if (entityvex != null) {
+                    entityvex.moveTo(blockposition, 0.0F, 0.0F);
+                    entityvex.finalizeSpawn(worldserver, Evoker.this.level().getCurrentDifficultyAt(blockposition), MobSpawnType.MOB_SUMMONED, (SpawnGroupData) null);
+                    entityvex.setOwner(Evoker.this);
+                    entityvex.setBoundOrigin(blockposition);
+                    entityvex.setLimitedLife(20 * (30 + Evoker.this.random.nextInt(90)));
+                    if (scoreboardteam != null) {
+                        worldserver.getScoreboard().addPlayerToTeam(entityvex.getScoreboardName(), scoreboardteam);
                     }
 
-                    bl = true;
-                    break;
+                    worldserver.addFreshEntityWithPassengers(entityvex, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPELL); // CraftBukkit - Add SpawnReason
+                    worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.Context.of((Entity) Evoker.this));
                 }
-
-                blockPos = blockPos.below();
-            } while (blockPos.getY() >= Mth.floor(maxY) - 1);
-
-            if (bl) {
-                Evoker.this.level().addFreshEntity(new EvokerFangs(Evoker.this.level(), x, (double)blockPos.getY() + d, z, yaw, warmup, Evoker.this));
-                Evoker.this.level().gameEvent(GameEvent.ENTITY_PLACE, new Vec3(x, (double)blockPos.getY() + d, z), GameEvent.Context.of(Evoker.this));
             }
+
         }
 
         @Override
         protected SoundEvent getSpellPrepareSound() {
-            return SoundEvents.EVOKER_PREPARE_ATTACK;
+            return SoundEvents.EVOKER_PREPARE_SUMMON;
         }
 
         @Override
         protected SpellcasterIllager.IllagerSpell getSpell() {
-            return SpellcasterIllager.IllagerSpell.FANGS;
-        }
-    }
-
-    class EvokerCastingSpellGoal extends SpellcasterIllager.SpellcasterCastingSpellGoal {
-        @Override
-        public void tick() {
-            if (Evoker.this.getTarget() != null) {
-                Evoker.this.getLookControl().setLookAt(Evoker.this.getTarget(), (float)Evoker.this.getMaxHeadYRot(), (float)Evoker.this.getMaxHeadXRot());
-            } else if (Evoker.this.getWololoTarget() != null) {
-                Evoker.this.getLookControl().setLookAt(Evoker.this.getWololoTarget(), (float)Evoker.this.getMaxHeadYRot(), (float)Evoker.this.getMaxHeadXRot());
-            }
+            return SpellcasterIllager.IllagerSpell.SUMMON_VEX;
         }
     }
 
-    class EvokerSummonSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
-        private final TargetingConditions vexCountTargeting = TargetingConditions.forNonCombat().range(16.0).ignoreLineOfSight().ignoreInvisibilityTesting();
+    private class EvokerAttackSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
 
-        @Override
-        public boolean canUse() {
-            if (!super.canUse()) {
-                return false;
-            } else {
-                int i = Evoker.this.level()
-                    .getNearbyEntities(Vex.class, this.vexCountTargeting, Evoker.this, Evoker.this.getBoundingBox().inflate(16.0))
-                    .size();
-                return Evoker.this.random.nextInt(8) + 1 > i;
-            }
+        EvokerAttackSpellGoal() {
+            super();
         }
 
         @Override
         protected int getCastingTime() {
-            return 100;
+            return 40;
         }
 
         @Override
         protected int getCastingInterval() {
-            return 340;
+            return 100;
         }
 
         @Override
         protected void performSpellCasting() {
-            ServerLevel serverLevel = (ServerLevel)Evoker.this.level();
-            PlayerTeam playerTeam = Evoker.this.getTeam();
+            LivingEntity entityliving = Evoker.this.getTarget();
+            double d0 = Math.min(entityliving.getY(), Evoker.this.getY());
+            double d1 = Math.max(entityliving.getY(), Evoker.this.getY()) + 1.0D;
+            float f = (float) Mth.atan2(entityliving.getZ() - Evoker.this.getZ(), entityliving.getX() - Evoker.this.getX());
+            int i;
 
-            for (int i = 0; i < 3; i++) {
-                BlockPos blockPos = Evoker.this.blockPosition().offset(-2 + Evoker.this.random.nextInt(5), 1, -2 + Evoker.this.random.nextInt(5));
-                Vex vex = EntityType.VEX.create(Evoker.this.level());
-                if (vex != null) {
-                    vex.moveTo(blockPos, 0.0F, 0.0F);
-                    vex.finalizeSpawn(serverLevel, Evoker.this.level().getCurrentDifficultyAt(blockPos), MobSpawnType.MOB_SUMMONED, null);
-                    vex.setOwner(Evoker.this);
-                    vex.setBoundOrigin(blockPos);
-                    vex.setLimitedLife(20 * (30 + Evoker.this.random.nextInt(90)));
-                    if (playerTeam != null) {
-                        serverLevel.getScoreboard().addPlayerToTeam(vex.getScoreboardName(), playerTeam);
+            if (Evoker.this.distanceToSqr((Entity) entityliving) < 9.0D) {
+                float f1;
+
+                for (i = 0; i < 5; ++i) {
+                    f1 = f + (float) i * 3.1415927F * 0.4F;
+                    this.createSpellEntity(Evoker.this.getX() + (double) Mth.cos(f1) * 1.5D, Evoker.this.getZ() + (double) Mth.sin(f1) * 1.5D, d0, d1, f1, 0);
+                }
+
+                for (i = 0; i < 8; ++i) {
+                    f1 = f + (float) i * 3.1415927F * 2.0F / 8.0F + 1.2566371F;
+                    this.createSpellEntity(Evoker.this.getX() + (double) Mth.cos(f1) * 2.5D, Evoker.this.getZ() + (double) Mth.sin(f1) * 2.5D, d0, d1, f1, 3);
+                }
+            } else {
+                for (i = 0; i < 16; ++i) {
+                    double d2 = 1.25D * (double) (i + 1);
+                    int j = 1 * i;
+
+                    this.createSpellEntity(Evoker.this.getX() + (double) Mth.cos(f) * d2, Evoker.this.getZ() + (double) Mth.sin(f) * d2, d0, d1, f, j);
+                }
+            }
+
+        }
+
+        private void createSpellEntity(double x, double z, double maxY, double y, float yaw, int warmup) {
+            BlockPos blockposition = BlockPos.containing(x, y, z);
+            boolean flag = false;
+            double d4 = 0.0D;
+
+            do {
+                BlockPos blockposition1 = blockposition.below();
+                BlockState iblockdata = Evoker.this.level().getBlockState(blockposition1);
+
+                if (iblockdata.isFaceSturdy(Evoker.this.level(), blockposition1, Direction.UP)) {
+                    if (!Evoker.this.level().isEmptyBlock(blockposition)) {
+                        BlockState iblockdata1 = Evoker.this.level().getBlockState(blockposition);
+                        VoxelShape voxelshape = iblockdata1.getCollisionShape(Evoker.this.level(), blockposition);
+
+                        if (!voxelshape.isEmpty()) {
+                            d4 = voxelshape.max(Direction.Axis.Y);
+                        }
                     }
 
-                    serverLevel.addFreshEntityWithPassengers(vex);
-                    serverLevel.gameEvent(GameEvent.ENTITY_PLACE, blockPos, GameEvent.Context.of(Evoker.this));
+                    flag = true;
+                    break;
                 }
+
+                blockposition = blockposition.below();
+            } while (blockposition.getY() >= Mth.floor(maxY) - 1);
+
+            if (flag) {
+                Evoker.this.level().addFreshEntity(new EvokerFangs(Evoker.this.level(), x, (double) blockposition.getY() + d4, z, yaw, warmup, Evoker.this));
+                Evoker.this.level().gameEvent((Holder) GameEvent.ENTITY_PLACE, new Vec3(x, (double) blockposition.getY() + d4, z), GameEvent.Context.of((Entity) Evoker.this));
             }
+
         }
 
         @Override
         protected SoundEvent getSpellPrepareSound() {
-            return SoundEvents.EVOKER_PREPARE_SUMMON;
+            return SoundEvents.EVOKER_PREPARE_ATTACK;
         }
 
         @Override
         protected SpellcasterIllager.IllagerSpell getSpell() {
-            return SpellcasterIllager.IllagerSpell.SUMMON_VEX;
+            return SpellcasterIllager.IllagerSpell.FANGS;
         }
     }
 
     public class EvokerWololoSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
-        private final TargetingConditions wololoTargeting = TargetingConditions.forNonCombat()
-            .range(16.0)
-            .selector(livingEntity -> ((Sheep)livingEntity).getColor() == DyeColor.BLUE);
+
+        private final TargetingConditions wololoTargeting = TargetingConditions.forNonCombat().range(16.0D).selector((entityliving) -> {
+            return ((Sheep) entityliving).getColor() == DyeColor.BLUE;
+        });
+
+        public EvokerWololoSpellGoal() {
+            super();
+        }
 
         @Override
         public boolean canUse() {
@@ -298,12 +343,12 @@
             } else if (!Evoker.this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
                 return false;
             } else {
-                List<Sheep> list = Evoker.this.level()
-                    .getNearbyEntities(Sheep.class, this.wololoTargeting, Evoker.this, Evoker.this.getBoundingBox().inflate(16.0, 4.0, 16.0));
+                List<Sheep> list = Evoker.this.level().getNearbyEntities(Sheep.class, this.wololoTargeting, Evoker.this, Evoker.this.getBoundingBox().inflate(16.0D, 4.0D, 16.0D));
+
                 if (list.isEmpty()) {
                     return false;
                 } else {
-                    Evoker.this.setWololoTarget(list.get(Evoker.this.random.nextInt(list.size())));
+                    Evoker.this.setWololoTarget((Sheep) list.get(Evoker.this.random.nextInt(list.size())));
                     return true;
                 }
             }
@@ -317,15 +362,17 @@
         @Override
         public void stop() {
             super.stop();
-            Evoker.this.setWololoTarget(null);
+            Evoker.this.setWololoTarget((Sheep) null);
         }
 
         @Override
         protected void performSpellCasting() {
-            Sheep sheep = Evoker.this.getWololoTarget();
-            if (sheep != null && sheep.isAlive()) {
-                sheep.setColor(DyeColor.RED);
+            Sheep entitysheep = Evoker.this.getWololoTarget();
+
+            if (entitysheep != null && entitysheep.isAlive()) {
+                entitysheep.setColor(DyeColor.RED);
             }
+
         }
 
         @Override
