--- a/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
@@ -2,8 +2,10 @@
 
 import com.google.common.annotations.VisibleForTesting;
 import com.mojang.logging.LogUtils;
+import com.mojang.serialization.DataResult;
 import com.mojang.serialization.Dynamic;
 import java.util.Collections;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.function.BiConsumer;
 import javax.annotation.Nullable;
@@ -72,6 +74,7 @@
 import org.slf4j.Logger;
 
 public class Warden extends Monster implements VibrationSystem {
+
     private static final Logger LOGGER = LogUtils.getLogger();
     private static final int VIBRATION_COOLDOWN_TICKS = 40;
     private static final int TIME_TO_USE_MELEE_UNTIL_SONIC_BOOM = 200;
@@ -105,16 +108,13 @@
     public AnimationState diggingAnimationState = new AnimationState();
     public AnimationState attackAnimationState = new AnimationState();
     public AnimationState sonicBoomAnimationState = new AnimationState();
-    private final DynamicGameEventListener<VibrationSystem.Listener> dynamicGameEventListener;
-    private final VibrationSystem.User vibrationUser;
-    private VibrationSystem.Data vibrationData;
+    private final DynamicGameEventListener<VibrationSystem.Listener> dynamicGameEventListener = new DynamicGameEventListener<>(new VibrationSystem.Listener(this));
+    private final VibrationSystem.User vibrationUser = new Warden.VibrationUser();
+    private VibrationSystem.Data vibrationData = new VibrationSystem.Data();
     AngerManagement angerManagement = new AngerManagement(this::canTargetEntity, Collections.emptyList());
 
     public Warden(EntityType<? extends Monster> type, Level world) {
         super(type, world);
-        this.vibrationUser = new Warden.VibrationUser();
-        this.vibrationData = new VibrationSystem.Data();
-        this.dynamicGameEventListener = new DynamicGameEventListener<>(new VibrationSystem.Listener(this));
         this.xpReward = 5;
         this.getNavigation().setCanFloat(true);
         this.setPathfindingMalus(PathType.UNPASSABLE_RAIL, 0.0F);
@@ -136,6 +136,7 @@
         if (packet.getData() == 1) {
             this.setPose(Pose.EMERGING);
         }
+
     }
 
     @Override
@@ -150,7 +151,7 @@
 
     @Override
     public boolean isInvulnerableTo(DamageSource damageSource) {
-        return this.isDiggingOrEmerging() && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) || super.isInvulnerableTo(damageSource);
+        return this.isDiggingOrEmerging() && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) ? true : super.isInvulnerableTo(damageSource);
     }
 
     boolean isDiggingOrEmerging() {
@@ -173,12 +174,7 @@
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return Monster.createMonsterAttributes()
-            .add(Attributes.MAX_HEALTH, 500.0)
-            .add(Attributes.MOVEMENT_SPEED, 0.3F)
-            .add(Attributes.KNOCKBACK_RESISTANCE, 1.0)
-            .add(Attributes.ATTACK_KNOCKBACK, 1.5)
-            .add(Attributes.ATTACK_DAMAGE, 30.0);
+        return Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 500.0D).add(Attributes.MOVEMENT_SPEED, 0.30000001192092896D).add(Attributes.KNOCKBACK_RESISTANCE, 1.0D).add(Attributes.ATTACK_KNOCKBACK, 1.5D).add(Attributes.ATTACK_DAMAGE, 30.0D);
     }
 
     @Override
@@ -214,7 +210,7 @@
 
     @Override
     public boolean doHurtTarget(Entity target) {
-        this.level().broadcastEntityEvent(this, (byte)4);
+        this.level().broadcastEntityEvent(this, (byte) 4);
         this.playSound(SoundEvents.WARDEN_ATTACK_IMPACT, 10.0F, this.getVoicePitch());
         SonicBoom.setCooldown(this, 40);
         return super.doHurtTarget(target);
@@ -223,21 +219,23 @@
     @Override
     protected void defineSynchedData(SynchedEntityData.Builder builder) {
         super.defineSynchedData(builder);
-        builder.define(CLIENT_ANGER_LEVEL, 0);
+        builder.define(Warden.CLIENT_ANGER_LEVEL, 0);
     }
 
     public int getClientAngerLevel() {
-        return this.entityData.get(CLIENT_ANGER_LEVEL);
+        return (Integer) this.entityData.get(Warden.CLIENT_ANGER_LEVEL);
     }
 
     private void syncClientAngerLevel() {
-        this.entityData.set(CLIENT_ANGER_LEVEL, this.getActiveAnger());
+        this.entityData.set(Warden.CLIENT_ANGER_LEVEL, this.getActiveAnger());
     }
 
     @Override
     public void tick() {
-        if (this.level() instanceof ServerLevel serverLevel) {
-            VibrationSystem.Ticker.tick(serverLevel, this.vibrationData, this.vibrationUser);
+        Level world = this.level();
+
+        if (world instanceof ServerLevel worldserver) {
+            VibrationSystem.Ticker.tick(worldserver, this.vibrationData, this.vibrationUser);
             if (this.isPersistenceRequired() || this.requiresCustomPersistence()) {
                 WardenAi.setDigCooldown(this);
             }
@@ -248,21 +246,18 @@
             if (this.tickCount % this.getHeartBeatDelay() == 0) {
                 this.heartAnimation = 10;
                 if (!this.isSilent()) {
-                    this.level()
-                        .playLocalSound(
-                            this.getX(), this.getY(), this.getZ(), SoundEvents.WARDEN_HEARTBEAT, this.getSoundSource(), 5.0F, this.getVoicePitch(), false
-                        );
+                    this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.WARDEN_HEARTBEAT, this.getSoundSource(), 5.0F, this.getVoicePitch(), false);
                 }
             }
 
             this.tendrilAnimationO = this.tendrilAnimation;
             if (this.tendrilAnimation > 0) {
-                this.tendrilAnimation--;
+                --this.tendrilAnimation;
             }
 
             this.heartAnimationO = this.heartAnimation;
             if (this.heartAnimation > 0) {
-                this.heartAnimation--;
+                --this.heartAnimation;
             }
 
             switch (this.getPose()) {
@@ -273,21 +268,23 @@
                     this.clientDiggingParticles(this.diggingAnimationState);
             }
         }
+
     }
 
     @Override
     protected void customServerAiStep() {
-        ServerLevel serverLevel = (ServerLevel)this.level();
-        serverLevel.getProfiler().push("wardenBrain");
-        this.getBrain().tick(serverLevel, this);
+        ServerLevel worldserver = (ServerLevel) this.level();
+
+        worldserver.getProfiler().push("wardenBrain");
+        this.getBrain().tick(worldserver, this);
         this.level().getProfiler().pop();
         super.customServerAiStep();
         if ((this.tickCount + this.getId()) % 120 == 0) {
-            applyDarknessAround(serverLevel, this.position(), this, 20);
+            Warden.applyDarknessAround(worldserver, this.position(), this, 20);
         }
 
         if (this.tickCount % 20 == 0) {
-            this.angerManagement.tick(serverLevel, this::canTargetEntity);
+            this.angerManagement.tick(worldserver, this::canTargetEntity);
             this.syncClientAngerLevel();
         }
 
@@ -306,39 +303,44 @@
         } else {
             super.handleEntityEvent(status);
         }
+
     }
 
     private int getHeartBeatDelay() {
-        float f = (float)this.getClientAngerLevel() / (float)AngerLevel.ANGRY.getMinimumAnger();
+        float f = (float) this.getClientAngerLevel() / (float) AngerLevel.ANGRY.getMinimumAnger();
+
         return 40 - Mth.floor(Mth.clamp(f, 0.0F, 1.0F) * 30.0F);
     }
 
     public float getTendrilAnimation(float tickDelta) {
-        return Mth.lerp(tickDelta, (float)this.tendrilAnimationO, (float)this.tendrilAnimation) / 10.0F;
+        return Mth.lerp(tickDelta, (float) this.tendrilAnimationO, (float) this.tendrilAnimation) / 10.0F;
     }
 
     public float getHeartAnimation(float tickDelta) {
-        return Mth.lerp(tickDelta, (float)this.heartAnimationO, (float)this.heartAnimation) / 10.0F;
+        return Mth.lerp(tickDelta, (float) this.heartAnimationO, (float) this.heartAnimation) / 10.0F;
     }
 
     private void clientDiggingParticles(AnimationState animationState) {
-        if ((float)animationState.getAccumulatedTime() < 4500.0F) {
-            RandomSource randomSource = this.getRandom();
-            BlockState blockState = this.getBlockStateOn();
-            if (blockState.getRenderShape() != RenderShape.INVISIBLE) {
-                for (int i = 0; i < 30; i++) {
-                    double d = this.getX() + (double)Mth.randomBetween(randomSource, -0.7F, 0.7F);
-                    double e = this.getY();
-                    double f = this.getZ() + (double)Mth.randomBetween(randomSource, -0.7F, 0.7F);
-                    this.level().addParticle(new BlockParticleOption(ParticleTypes.BLOCK, blockState), d, e, f, 0.0, 0.0, 0.0);
+        if ((float) animationState.getAccumulatedTime() < 4500.0F) {
+            RandomSource randomsource = this.getRandom();
+            BlockState iblockdata = this.getBlockStateOn();
+
+            if (iblockdata.getRenderShape() != RenderShape.INVISIBLE) {
+                for (int i = 0; i < 30; ++i) {
+                    double d0 = this.getX() + (double) Mth.randomBetween(randomsource, -0.7F, 0.7F);
+                    double d1 = this.getY();
+                    double d2 = this.getZ() + (double) Mth.randomBetween(randomsource, -0.7F, 0.7F);
+
+                    this.level().addParticle(new BlockParticleOption(ParticleTypes.BLOCK, iblockdata), d0, d1, d2, 0.0D, 0.0D, 0.0D);
                 }
             }
         }
+
     }
 
     @Override
     public void onSyncedDataUpdated(EntityDataAccessor<?> data) {
-        if (DATA_POSE.equals(data)) {
+        if (Warden.DATA_POSE.equals(data)) {
             switch (this.getPose()) {
                 case EMERGING:
                     this.emergeAnimationState.start(this.tickCount);
@@ -369,7 +371,7 @@
 
     @Override
     public Brain<Warden> getBrain() {
-        return (Brain<Warden>)super.getBrain();
+        return (Brain<Warden>) super.getBrain(); // CraftBukkit - decompile error
     }
 
     @Override
@@ -380,69 +382,85 @@
 
     @Override
     public void updateDynamicGameEventListener(BiConsumer<DynamicGameEventListener<?>, ServerLevel> callback) {
-        if (this.level() instanceof ServerLevel serverLevel) {
-            callback.accept(this.dynamicGameEventListener, serverLevel);
+        Level world = this.level();
+
+        if (world instanceof ServerLevel worldserver) {
+            callback.accept(this.dynamicGameEventListener, worldserver);
         }
+
     }
 
     @Contract("null->false")
     public boolean canTargetEntity(@Nullable Entity entity) {
-        if (entity instanceof LivingEntity livingEntity
-            && this.level() == entity.level()
-            && EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(entity)
-            && !this.isAlliedTo(entity)
-            && livingEntity.getType() != EntityType.ARMOR_STAND
-            && livingEntity.getType() != EntityType.WARDEN
-            && !livingEntity.isInvulnerable()
-            && !livingEntity.isDeadOrDying()
-            && this.level().getWorldBorder().isWithinBounds(livingEntity.getBoundingBox())) {
-            return true;
+        boolean flag;
+
+        if (entity instanceof LivingEntity entityliving) {
+            if (this.level() == entity.level() && EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(entity) && !this.isAlliedTo(entity) && entityliving.getType() != EntityType.ARMOR_STAND && entityliving.getType() != EntityType.WARDEN && !entityliving.isInvulnerable() && !entityliving.isDeadOrDying() && this.level().getWorldBorder().isWithinBounds(entityliving.getBoundingBox())) {
+                flag = true;
+                return flag;
+            }
         }
 
-        return false;
+        flag = false;
+        return flag;
     }
 
     public static void applyDarknessAround(ServerLevel world, Vec3 pos, @Nullable Entity entity, int range) {
-        MobEffectInstance mobEffectInstance = new MobEffectInstance(MobEffects.DARKNESS, 260, 0, false, false);
-        MobEffectUtil.addEffectToPlayersAround(world, entity, pos, (double)range, mobEffectInstance, 200);
+        MobEffectInstance mobeffect = new MobEffectInstance(MobEffects.DARKNESS, 260, 0, false, false);
+
+        MobEffectUtil.addEffectToPlayersAround(world, entity, pos, range, mobeffect, 200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WARDEN); // CraftBukkit - Add EntityPotionEffectEvent.Cause
     }
 
     @Override
     public void addAdditionalSaveData(CompoundTag nbt) {
         super.addAdditionalSaveData(nbt);
-        AngerManagement.codec(this::canTargetEntity)
-            .encodeStart(NbtOps.INSTANCE, this.angerManagement)
-            .resultOrPartial(LOGGER::error)
-            .ifPresent(angerNbt -> nbt.put("anger", angerNbt));
-        VibrationSystem.Data.CODEC
-            .encodeStart(NbtOps.INSTANCE, this.vibrationData)
-            .resultOrPartial(LOGGER::error)
-            .ifPresent(listenerData -> nbt.put("listener", listenerData));
+        DataResult<net.minecraft.nbt.Tag> dataresult = AngerManagement.codec(this::canTargetEntity).encodeStart(NbtOps.INSTANCE, this.angerManagement); // CraftBukkit - decompile error
+        Logger logger = Warden.LOGGER;
+
+        Objects.requireNonNull(logger);
+        dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> {
+            nbt.put("anger", nbtbase);
+        });
+        dataresult = VibrationSystem.Data.CODEC.encodeStart(NbtOps.INSTANCE, this.vibrationData);
+        logger = Warden.LOGGER;
+        Objects.requireNonNull(logger);
+        dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> {
+            nbt.put("listener", nbtbase);
+        });
     }
 
     @Override
     public void readAdditionalSaveData(CompoundTag nbt) {
         super.readAdditionalSaveData(nbt);
+        DataResult dataresult;
+        Logger logger;
+
         if (nbt.contains("anger")) {
-            AngerManagement.codec(this::canTargetEntity)
-                .parse(new Dynamic<>(NbtOps.INSTANCE, nbt.get("anger")))
-                .resultOrPartial(LOGGER::error)
-                .ifPresent(angerManager -> this.angerManagement = angerManager);
+            dataresult = AngerManagement.codec(this::canTargetEntity).parse(new Dynamic(NbtOps.INSTANCE, nbt.get("anger")));
+            logger = Warden.LOGGER;
+            Objects.requireNonNull(logger);
+            ((DataResult<AngerManagement>) dataresult).resultOrPartial(logger::error).ifPresent((angermanagement) -> { // CraftBukkit - decompile error
+                this.angerManagement = angermanagement;
+            });
             this.syncClientAngerLevel();
         }
 
         if (nbt.contains("listener", 10)) {
-            VibrationSystem.Data.CODEC
-                .parse(new Dynamic<>(NbtOps.INSTANCE, nbt.getCompound("listener")))
-                .resultOrPartial(LOGGER::error)
-                .ifPresent(listenerData -> this.vibrationData = listenerData);
+            dataresult = VibrationSystem.Data.CODEC.parse(new Dynamic(NbtOps.INSTANCE, nbt.getCompound("listener")));
+            logger = Warden.LOGGER;
+            Objects.requireNonNull(logger);
+            ((DataResult<VibrationSystem.Data>) dataresult).resultOrPartial(logger::error).ifPresent((vibrationsystem_a) -> { // CraftBukkit - decompile error
+                this.vibrationData = vibrationsystem_a;
+            });
         }
+
     }
 
     private void playListeningSound() {
         if (!this.hasPose(Pose.ROARING)) {
             this.playSound(this.getAngerLevel().getListeningSound(), 10.0F, this.getVoicePitch());
         }
+
     }
 
     public AngerLevel getAngerLevel() {
@@ -464,10 +482,20 @@
     @VisibleForTesting
     public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
         if (!this.isNoAi() && this.canTargetEntity(entity)) {
+            // Paper start - Add WardenAngerChangeEvent
+            int activeAnger = this.angerManagement.getActiveAnger(entity);
+            io.papermc.paper.event.entity.WardenAngerChangeEvent event = new io.papermc.paper.event.entity.WardenAngerChangeEvent((org.bukkit.entity.Warden) this.getBukkitEntity(), entity.getBukkitEntity(), activeAnger, Math.min(150, activeAnger + amount));
+            this.level().getCraftServer().getPluginManager().callEvent(event);
+            if (event.isCancelled()) {
+                return;
+            }
+            amount = event.getNewAnger() - activeAnger;
+            // Paper end - Add WardenAngerChangeEvent
             WardenAi.setDigCooldown(this);
-            boolean bl = !(this.getTarget() instanceof Player);
-            int i = this.angerManagement.increaseAnger(entity, amount);
-            if (entity instanceof Player && bl && AngerLevel.byAnger(i).isAngry()) {
+            boolean flag1 = !(this.getTarget() instanceof Player);
+            int j = this.angerManagement.increaseAnger(entity, amount);
+
+            if (entity instanceof Player && flag1 && AngerLevel.byAnger(j).isAngry()) {
                 this.getBrain().eraseMemory(MemoryModuleType.ATTACK_TARGET);
             }
 
@@ -475,6 +503,7 @@
                 this.playListeningSound();
             }
         }
+
     }
 
     public Optional<LivingEntity> getEntityAngryAt() {
@@ -498,7 +527,7 @@
         this.getBrain().setMemoryWithExpiry(MemoryModuleType.DIG_COOLDOWN, Unit.INSTANCE, 1200L);
         if (spawnReason == MobSpawnType.TRIGGERED) {
             this.setPose(Pose.EMERGING);
-            this.getBrain().setMemoryWithExpiry(MemoryModuleType.IS_EMERGING, Unit.INSTANCE, (long)WardenAi.EMERGE_DURATION);
+            this.getBrain().setMemoryWithExpiry(MemoryModuleType.IS_EMERGING, Unit.INSTANCE, (long) WardenAi.EMERGE_DURATION);
             this.playSound(SoundEvents.WARDEN_AGITATED, 5.0F, 1.0F);
         }
 
@@ -507,31 +536,36 @@
 
     @Override
     public boolean hurt(DamageSource source, float amount) {
-        boolean bl = super.hurt(source, amount);
+        boolean flag = super.hurt(source, amount);
+
         if (!this.level().isClientSide && !this.isNoAi() && !this.isDiggingOrEmerging()) {
             Entity entity = source.getEntity();
+
             this.increaseAngerAt(entity, AngerLevel.ANGRY.getMinimumAnger() + 20, false);
-            if (this.brain.getMemory(MemoryModuleType.ATTACK_TARGET).isEmpty()
-                && entity instanceof LivingEntity livingEntity
-                && (!source.isIndirect() || this.closerThan(livingEntity, 5.0))) {
-                this.setAttackTarget(livingEntity);
+            if (this.brain.getMemory(MemoryModuleType.ATTACK_TARGET).isEmpty() && entity instanceof LivingEntity) {
+                LivingEntity entityliving = (LivingEntity) entity;
+
+                if (!source.isIndirect() || this.closerThan(entityliving, 5.0D)) {
+                    this.setAttackTarget(entityliving);
+                }
             }
         }
 
-        return bl;
+        return flag;
     }
 
     public void setAttackTarget(LivingEntity target) {
         this.getBrain().eraseMemory(MemoryModuleType.ROAR_TARGET);
-        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, target);
+        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, target); // CraftBukkit - decompile error
         this.getBrain().eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
         SonicBoom.setCooldown(this, 200);
     }
 
     @Override
     public EntityDimensions getDefaultDimensions(Pose pose) {
-        EntityDimensions entityDimensions = super.getDefaultDimensions(pose);
-        return this.isDiggingOrEmerging() ? EntityDimensions.fixed(entityDimensions.width(), 1.0F) : entityDimensions;
+        EntityDimensions entitysize = super.getDefaultDimensions(pose);
+
+        return this.isDiggingOrEmerging() ? EntityDimensions.fixed(entitysize.width(), 1.0F) : entitysize;
     }
 
     @Override
@@ -557,12 +591,12 @@
 
     @Override
     protected PathNavigation createNavigation(Level world) {
-        return new GroundPathNavigation(this, world) {
+        return new GroundPathNavigation(this, world) { // CraftBukkit - decompile error
             @Override
             protected PathFinder createPathFinder(int range) {
                 this.nodeEvaluator = new WalkNodeEvaluator();
                 this.nodeEvaluator.setCanPassDoors(true);
-                return new PathFinder(this.nodeEvaluator, range) {
+                return new PathFinder(this.nodeEvaluator, range) { // CraftBukkit - decompile error
                     @Override
                     protected float distance(Node a, Node b) {
                         return a.distanceToXZ(b);
@@ -582,10 +616,13 @@
         return this.vibrationUser;
     }
 
-    class VibrationUser implements VibrationSystem.User {
+    private class VibrationUser implements VibrationSystem.User {
+
         private static final int GAME_EVENT_LISTENER_RANGE = 16;
         private final PositionSource positionSource = new EntityPositionSource(Warden.this, Warden.this.getEyeHeight());
 
+        VibrationUser() {}
+
         @Override
         public int getListenerRadius() {
             return 16;
@@ -608,35 +645,39 @@
 
         @Override
         public boolean canReceiveVibration(ServerLevel world, BlockPos pos, Holder<GameEvent> event, GameEvent.Context emitter) {
-            if (!Warden.this.isNoAi()
-                && !Warden.this.isDeadOrDying()
-                && !Warden.this.getBrain().hasMemoryValue(MemoryModuleType.VIBRATION_COOLDOWN)
-                && !Warden.this.isDiggingOrEmerging()
-                && world.getWorldBorder().isWithinBounds(pos)) {
-                if (emitter.sourceEntity() instanceof LivingEntity livingEntity && !Warden.this.canTargetEntity(livingEntity)) {
-                    return false;
+            if (!Warden.this.isNoAi() && !Warden.this.isDeadOrDying() && !Warden.this.getBrain().hasMemoryValue(MemoryModuleType.VIBRATION_COOLDOWN) && !Warden.this.isDiggingOrEmerging() && world.getWorldBorder().isWithinBounds(pos)) {
+                Entity entity = emitter.sourceEntity();
+                boolean flag;
+
+                if (entity instanceof LivingEntity) {
+                    LivingEntity entityliving = (LivingEntity) entity;
+
+                    if (!Warden.this.canTargetEntity(entityliving)) {
+                        flag = false;
+                        return flag;
+                    }
                 }
 
-                return true;
+                flag = true;
+                return flag;
             } else {
                 return false;
             }
         }
 
         @Override
-        public void onReceiveVibration(
-            ServerLevel world, BlockPos pos, Holder<GameEvent> event, @Nullable Entity sourceEntity, @Nullable Entity entity, float distance
-        ) {
+        public void onReceiveVibration(ServerLevel world, BlockPos pos, Holder<GameEvent> event, @Nullable Entity sourceEntity, @Nullable Entity entity, float distance) {
             if (!Warden.this.isDeadOrDying()) {
                 Warden.this.brain.setMemoryWithExpiry(MemoryModuleType.VIBRATION_COOLDOWN, Unit.INSTANCE, 40L);
-                world.broadcastEntityEvent(Warden.this, (byte)61);
+                world.broadcastEntityEvent(Warden.this, (byte) 61);
                 Warden.this.playSound(SoundEvents.WARDEN_TENDRIL_CLICKS, 5.0F, Warden.this.getVoicePitch());
-                BlockPos blockPos = pos;
+                BlockPos blockposition1 = pos;
+
                 if (entity != null) {
-                    if (Warden.this.closerThan(entity, 30.0)) {
+                    if (Warden.this.closerThan(entity, 30.0D)) {
                         if (Warden.this.getBrain().hasMemoryValue(MemoryModuleType.RECENT_PROJECTILE)) {
                             if (Warden.this.canTargetEntity(entity)) {
-                                blockPos = entity.blockPosition();
+                                blockposition1 = entity.blockPosition();
                             }
 
                             Warden.this.increaseAngerAt(entity);
@@ -652,10 +693,12 @@
 
                 if (!Warden.this.getAngerLevel().isAngry()) {
                     Optional<LivingEntity> optional = Warden.this.angerManagement.getActiveEntity();
+
                     if (entity != null || optional.isEmpty() || optional.get() == sourceEntity) {
-                        WardenAi.setDisturbanceLocation(Warden.this, blockPos);
+                        WardenAi.setDisturbanceLocation(Warden.this, blockposition1);
                     }
                 }
+
             }
         }
     }
