--- a/net/minecraft/world/entity/monster/Evoker.java
+++ b/net/minecraft/world/entity/monster/Evoker.java
@@ -39,6 +39,7 @@
 import net.minecraft.world.phys.shapes.VoxelShape;
 
 public class Evoker extends SpellcasterIllager {
+
     @Nullable
     private Sheep wololoTarget;
 
@@ -59,7 +60,7 @@
         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(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));
@@ -96,19 +97,7 @@
 
     @Override
     public boolean isAlliedTo(Entity other) {
-        if (other == null) {
-            return false;
-        } else if (other == this) {
-            return true;
-        } else if (super.isAlliedTo(other)) {
-            return true;
-        } else if (other instanceof Vex) {
-            return this.isAlliedTo(((Vex)other).getOwner());
-        } else if (other instanceof LivingEntity && ((LivingEntity)other).getMobType() == MobType.ILLAGER) {
-            return this.getTeam() == null && other.getTeam() == null;
-        } else {
-            return false;
-        }
+        return other == null ? false : (other == this ? true : (super.isAlliedTo(other) ? true : (other instanceof Vex ? this.isAlliedTo((Entity) ((Vex) other).getOwner()) : (other instanceof LivingEntity && ((LivingEntity) other).getMobType() == MobType.ILLAGER ? this.getTeam() == null && other.getTeam() == null : false))));
     }
 
     @Override
@@ -130,8 +119,8 @@
         this.wololoTarget = wololoTarget;
     }
 
-    @Nullable
-    public Sheep getWololoTarget() {
+    public @Nullable
+    Sheep getWololoTarget() {
         return this.wololoTarget;
     }
 
@@ -141,157 +130,185 @@
     }
 
     @Override
-    public void applyRaidBuffs(int wave, boolean unused) {
-    }
+    public void applyRaidBuffs(int wave, boolean unused) {}
 
-    class EvokerAttackSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
-        @Override
-        protected int getCastingTime() {
-            return 40;
-        }
+    private class EvokerCastingSpellGoal extends SpellcasterIllager.SpellcasterCastingSpellGoal {
 
-        @Override
-        protected int getCastingInterval() {
-            return 100;
+        EvokerCastingSpellGoal() {
+            super();
         }
 
         @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.0D;
-            float f = (float)Mth.atan2(livingEntity.getZ() - Evoker.this.getZ(), livingEntity.getX() - Evoker.this.getX());
-            if (Evoker.this.distanceToSqr(livingEntity) < 9.0D) {
-                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.5D, Evoker.this.getZ() + (double)Mth.sin(g) * 1.5D, d, e, g, 0);
-                }
-
-                for(int j = 0; j < 8; ++j) {
-                    float h = f + (float)j * (float)Math.PI * 2.0F / 8.0F + 1.2566371F;
-                    this.createSpellEntity(Evoker.this.getX() + (double)Mth.cos(h) * 2.5D, Evoker.this.getZ() + (double)Mth.sin(h) * 2.5D, d, e, h, 3);
-                }
-            } else {
-                for(int k = 0; k < 16; ++k) {
-                    double l = 1.25D * (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);
-                }
+        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());
             }
 
         }
+    }
 
-        private void createSpellEntity(double x, double z, double maxY, double y, float yaw, int warmup) {
-            BlockPos blockPos = new BlockPos(x, y, z);
-            boolean bl = false;
-            double d = 0.0D;
+    private class EvokerSummonSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
 
-            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);
-                        }
-                    }
+        private final TargetingConditions vexCountTargeting = TargetingConditions.forNonCombat().range(16.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
 
-                    bl = true;
-                    break;
-                }
+        EvokerSummonSpellGoal() {
+            super();
+        }
 
-                blockPos = blockPos.below();
-            } while(blockPos.getY() >= Mth.floor(maxY) - 1);
+        @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();
 
-            if (bl) {
-                Evoker.this.level.addFreshEntity(new EvokerFangs(Evoker.this.level, x, (double)blockPos.getY() + d, z, yaw, warmup, Evoker.this));
+                return Evoker.this.random.nextInt(8) + 1 > i;
             }
-
         }
 
         @Override
-        protected SoundEvent getSpellPrepareSound() {
-            return SoundEvents.EVOKER_PREPARE_ATTACK;
+        protected int getCastingTime() {
+            return 100;
         }
 
         @Override
-        protected SpellcasterIllager.IllagerSpell getSpell() {
-            return SpellcasterIllager.IllagerSpell.FANGS;
+        protected int getCastingInterval() {
+            return 340;
         }
-    }
 
-    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());
+        protected void performSpellCasting() {
+            ServerLevel worldserver = (ServerLevel) Evoker.this.level;
+
+            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);
+
+                if (entityvex != null) {
+                    entityvex.moveTo(blockposition, 0.0F, 0.0F);
+                    entityvex.finalizeSpawn(worldserver, Evoker.this.level.getCurrentDifficultyAt(blockposition), MobSpawnType.MOB_SUMMONED, (SpawnGroupData) null, (CompoundTag) null);
+                    entityvex.setOwner(Evoker.this);
+                    entityvex.setBoundOrigin(blockposition);
+                    entityvex.setLimitedLife(20 * (30 + Evoker.this.random.nextInt(90)));
+                    worldserver.addFreshEntityWithPassengers(entityvex, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPELL); // CraftBukkit - Add SpawnReason
+                }
             }
 
         }
-    }
 
-    class EvokerSummonSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
-        private final TargetingConditions vexCountTargeting = TargetingConditions.forNonCombat().range(16.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
+        @Override
+        protected SoundEvent getSpellPrepareSound() {
+            return SoundEvents.EVOKER_PREPARE_SUMMON;
+        }
 
         @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;
-            }
+        protected SpellcasterIllager.IllagerSpell getSpell() {
+            return SpellcasterIllager.IllagerSpell.SUMMON_VEX;
+        }
+    }
+
+    private class EvokerAttackSpellGoal extends SpellcasterIllager.SpellcasterUseSpellGoal {
+
+        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;
+            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, (SpawnGroupData)null, (CompoundTag)null);
-                    vex.setOwner(Evoker.this);
-                    vex.setBoundOrigin(blockPos);
-                    vex.setLimitedLife(20 * (30 + Evoker.this.random.nextInt(90)));
-                    serverLevel.addFreshEntityWithPassengers(vex);
+            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 = new BlockPos(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);
+                        }
+                    }
+
+                    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));
+            }
+
+        }
+
         @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.0D).selector((livingEntity) -> {
-            return ((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() {
             if (Evoker.this.getTarget() != null) {
@@ -304,10 +321,11 @@
                 return false;
             } else {
                 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;
                 }
             }
@@ -321,14 +339,15 @@
         @Override
         public void stop() {
             super.stop();
-            Evoker.this.setWololoTarget((Sheep)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);
             }
 
         }
