--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -67,36 +67,21 @@
 import org.joml.Vector3f;
 
 public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolotl.Variant>, Bucketable {
+
+    // CraftBukkit start - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
+    @Override
+    public int getDefaultMaxAirSupply() {
+        return Axolotl.AXOLOTL_TOTAL_AIR_SUPPLY;
+    }
+    // CraftBukkit end
     public static final int TOTAL_PLAYDEAD_TIME = 200;
-    protected static final ImmutableList<? extends SensorType<? extends Sensor<? super Axolotl>>> SENSOR_TYPES = ImmutableList.of(
-        SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_ADULT, SensorType.HURT_BY, SensorType.AXOLOTL_ATTACKABLES, SensorType.AXOLOTL_TEMPTATIONS
-    );
-    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(
-        MemoryModuleType.BREED_TARGET,
-        MemoryModuleType.NEAREST_LIVING_ENTITIES,
-        MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES,
-        MemoryModuleType.NEAREST_VISIBLE_PLAYER,
-        MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER,
-        MemoryModuleType.LOOK_TARGET,
-        MemoryModuleType.WALK_TARGET,
-        MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE,
-        MemoryModuleType.PATH,
-        MemoryModuleType.ATTACK_TARGET,
-        MemoryModuleType.ATTACK_COOLING_DOWN,
-        MemoryModuleType.NEAREST_VISIBLE_ADULT,
-        MemoryModuleType.HURT_BY_ENTITY,
-        MemoryModuleType.PLAY_DEAD_TICKS,
-        MemoryModuleType.NEAREST_ATTACKABLE,
-        MemoryModuleType.TEMPTING_PLAYER,
-        MemoryModuleType.TEMPTATION_COOLDOWN_TICKS,
-        MemoryModuleType.IS_TEMPTED,
-        MemoryModuleType.HAS_HUNTING_COOLDOWN,
-        MemoryModuleType.IS_PANICKING
-    );
+    protected static final ImmutableList<? extends SensorType<? extends Sensor<? super Axolotl>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_ADULT, SensorType.HURT_BY, SensorType.AXOLOTL_ATTACKABLES, SensorType.AXOLOTL_TEMPTATIONS);
+    // CraftBukkit - decompile error
+    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.<MemoryModuleType<?>>of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN, MemoryModuleType.IS_PANICKING});
     private static final EntityDataAccessor<Integer> DATA_VARIANT = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.INT);
     private static final EntityDataAccessor<Boolean> DATA_PLAYING_DEAD = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.BOOLEAN);
     private static final EntityDataAccessor<Boolean> FROM_BUCKET = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.BOOLEAN);
-    public static final double PLAYER_REGEN_DETECTION_RANGE = 20.0;
+    public static final double PLAYER_REGEN_DETECTION_RANGE = 20.0D;
     public static final int RARE_VARIANT_CHANCE = 1200;
     private static final int AXOLOTL_TOTAL_AIR_SUPPLY = 6000;
     public static final String VARIANT_TAG = "Variant";
@@ -125,9 +110,9 @@
     @Override
     protected void defineSynchedData(SynchedEntityData.Builder builder) {
         super.defineSynchedData(builder);
-        builder.define(DATA_VARIANT, 0);
-        builder.define(DATA_PLAYING_DEAD, false);
-        builder.define(FROM_BUCKET, false);
+        builder.define(Axolotl.DATA_VARIANT, 0);
+        builder.define(Axolotl.DATA_PLAYING_DEAD, false);
+        builder.define(Axolotl.FROM_BUCKET, false);
     }
 
     @Override
@@ -153,37 +138,39 @@
 
     @Override
     public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData) {
-        boolean bl = false;
+        boolean flag = false;
+
         if (spawnReason == MobSpawnType.BUCKET) {
-            return entityData;
+            return (SpawnGroupData) entityData;
         } else {
-            RandomSource randomSource = world.getRandom();
+            RandomSource randomsource = world.getRandom();
+
             if (entityData instanceof Axolotl.AxolotlGroupData) {
-                if (((Axolotl.AxolotlGroupData)entityData).getGroupSize() >= 2) {
-                    bl = true;
+                if (((Axolotl.AxolotlGroupData) entityData).getGroupSize() >= 2) {
+                    flag = true;
                 }
             } else {
-                entityData = new Axolotl.AxolotlGroupData(
-                    Axolotl.Variant.getCommonSpawnVariant(randomSource), Axolotl.Variant.getCommonSpawnVariant(randomSource)
-                );
+                entityData = new Axolotl.AxolotlGroupData(new Axolotl.Variant[]{Axolotl.Variant.getCommonSpawnVariant(randomsource), Axolotl.Variant.getCommonSpawnVariant(randomsource)});
             }
 
-            this.setVariant(((Axolotl.AxolotlGroupData)entityData).getVariant(randomSource));
-            if (bl) {
+            this.setVariant(((Axolotl.AxolotlGroupData) entityData).getVariant(randomsource));
+            if (flag) {
                 this.setAge(-24000);
             }
 
-            return super.finalizeSpawn(world, difficulty, spawnReason, entityData);
+            return super.finalizeSpawn(world, difficulty, spawnReason, (SpawnGroupData) entityData);
         }
     }
 
     @Override
     public void baseTick() {
         int i = this.getAirSupply();
+
         super.baseTick();
         if (!this.isNoAi()) {
             this.handleAirSupply(i);
         }
+
     }
 
     protected void handleAirSupply(int air) {
@@ -196,26 +183,27 @@
         } else {
             this.setAirSupply(this.getMaxAirSupply());
         }
+
     }
 
     public void rehydrate() {
         int i = this.getAirSupply() + 1800;
+
         this.setAirSupply(Math.min(i, this.getMaxAirSupply()));
     }
 
     @Override
     public int getMaxAirSupply() {
-        return 6000;
+        return this.maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
     }
 
     @Override
     public Axolotl.Variant getVariant() {
-        return Axolotl.Variant.byId(this.entityData.get(DATA_VARIANT));
+        return Axolotl.Variant.byId((Integer) this.entityData.get(Axolotl.DATA_VARIANT));
     }
 
-    @Override
     public void setVariant(Axolotl.Variant variant) {
-        this.entityData.set(DATA_VARIANT, variant.getId());
+        this.entityData.set(Axolotl.DATA_VARIANT, variant.getId());
     }
 
     private static boolean useRareVariant(RandomSource random) {
@@ -233,36 +221,38 @@
     }
 
     public void setPlayingDead(boolean playingDead) {
-        this.entityData.set(DATA_PLAYING_DEAD, playingDead);
+        this.entityData.set(Axolotl.DATA_PLAYING_DEAD, playingDead);
     }
 
     public boolean isPlayingDead() {
-        return this.entityData.get(DATA_PLAYING_DEAD);
+        return (Boolean) this.entityData.get(Axolotl.DATA_PLAYING_DEAD);
     }
 
     @Override
     public boolean fromBucket() {
-        return this.entityData.get(FROM_BUCKET);
+        return (Boolean) this.entityData.get(Axolotl.FROM_BUCKET);
     }
 
     @Override
     public void setFromBucket(boolean fromBucket) {
-        this.entityData.set(FROM_BUCKET, fromBucket);
+        this.entityData.set(Axolotl.FROM_BUCKET, fromBucket);
     }
 
     @Nullable
     @Override
     public AgeableMob getBreedOffspring(ServerLevel world, AgeableMob entity) {
-        Axolotl axolotl = EntityType.AXOLOTL.create(world);
+        Axolotl axolotl = (Axolotl) EntityType.AXOLOTL.create(world);
+
         if (axolotl != null) {
-            Axolotl.Variant variant;
-            if (useRareVariant(this.random)) {
-                variant = Axolotl.Variant.getRareSpawnVariant(this.random);
+            Axolotl.Variant axolotl_variant;
+
+            if (Axolotl.useRareVariant(this.random)) {
+                axolotl_variant = Axolotl.Variant.getRareSpawnVariant(this.random);
             } else {
-                variant = this.random.nextBoolean() ? this.getVariant() : ((Axolotl)entity).getVariant();
+                axolotl_variant = this.random.nextBoolean() ? this.getVariant() : ((Axolotl) entity).getVariant();
             }
 
-            axolotl.setVariant(variant);
+            axolotl.setVariant(axolotl_variant);
             axolotl.setPersistenceRequired();
         }
 
@@ -282,23 +272,21 @@
     @Override
     protected void customServerAiStep() {
         this.level().getProfiler().push("axolotlBrain");
-        this.getBrain().tick((ServerLevel)this.level(), this);
+        this.getBrain().tick((ServerLevel) this.level(), this);
         this.level().getProfiler().pop();
         this.level().getProfiler().push("axolotlActivityUpdate");
         AxolotlAi.updateActivity(this);
         this.level().getProfiler().pop();
         if (!this.isNoAi()) {
             Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
-            this.setPlayingDead(optional.isPresent() && optional.get() > 0);
+
+            this.setPlayingDead(optional.isPresent() && (Integer) optional.get() > 0);
         }
+
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return Mob.createMobAttributes()
-            .add(Attributes.MAX_HEALTH, 14.0)
-            .add(Attributes.MOVEMENT_SPEED, 1.0)
-            .add(Attributes.ATTACK_DAMAGE, 2.0)
-            .add(Attributes.STEP_HEIGHT, 1.0);
+        return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 14.0D).add(Attributes.MOVEMENT_SPEED, 1.0D).add(Attributes.ATTACK_DAMAGE, 2.0D).add(Attributes.STEP_HEIGHT, 1.0D);
     }
 
     @Override
@@ -313,16 +301,10 @@
 
     @Override
     public boolean hurt(DamageSource source, float amount) {
-        float f = this.getHealth();
-        if (!this.level().isClientSide
-            && !this.isNoAi()
-            && this.level().random.nextInt(3) == 0
-            && ((float)this.level().random.nextInt(3) < amount || f / this.getMaxHealth() < 0.5F)
-            && amount < f
-            && this.isInWater()
-            && (source.getEntity() != null || source.getDirectEntity() != null)
-            && !this.isPlayingDead()) {
-            this.brain.setMemory(MemoryModuleType.PLAY_DEAD_TICKS, 200);
+        float f1 = this.getHealth();
+
+        if (!this.level().isClientSide && !this.isNoAi() && this.level().random.nextInt(3) == 0 && ((float) this.level().random.nextInt(3) < amount || f1 / this.getMaxHealth() < 0.5F) && amount < f1 && this.isInWater() && (source.getEntity() != null || source.getDirectEntity() != null) && !this.isPlayingDead()) {
+            this.brain.setMemory(MemoryModuleType.PLAY_DEAD_TICKS, (int) 200);
         }
 
         return super.hurt(source, amount);
@@ -340,19 +322,21 @@
 
     @Override
     public InteractionResult mobInteract(Player player, InteractionHand hand) {
-        return Bucketable.bucketMobPickup(player, hand, this).orElse(super.mobInteract(player, hand));
+        return (InteractionResult) Bucketable.bucketMobPickup(player, hand, this).orElse(super.mobInteract(player, hand));
     }
 
     @Override
     public void saveToBucketTag(ItemStack stack) {
         Bucketable.saveDefaultDataToBucketTag(this, stack);
-        CustomData.update(DataComponents.BUCKET_ENTITY_DATA, stack, nbt -> {
-            nbt.putInt("Variant", this.getVariant().getId());
-            nbt.putInt("Age", this.getAge());
-            Brain<?> brain = this.getBrain();
-            if (brain.hasMemoryValue(MemoryModuleType.HAS_HUNTING_COOLDOWN)) {
-                nbt.putLong("HuntingCooldown", brain.getTimeUntilExpiry(MemoryModuleType.HAS_HUNTING_COOLDOWN));
+        CustomData.update(DataComponents.BUCKET_ENTITY_DATA, stack, (nbttagcompound) -> {
+            nbttagcompound.putInt("Variant", this.getVariant().getId());
+            nbttagcompound.putInt("Age", this.getAge());
+            Brain<?> behaviorcontroller = this.getBrain();
+
+            if (behaviorcontroller.hasMemoryValue(MemoryModuleType.HAS_HUNTING_COOLDOWN)) {
+                nbttagcompound.putLong("HuntingCooldown", behaviorcontroller.getTimeUntilExpiry(MemoryModuleType.HAS_HUNTING_COOLDOWN));
             }
+
         });
     }
 
@@ -367,6 +351,7 @@
         if (nbt.contains("HuntingCooldown")) {
             this.getBrain().setMemoryWithExpiry(MemoryModuleType.HAS_HUNTING_COOLDOWN, true, nbt.getLong("HuntingCooldown"));
         }
+
     }
 
     @Override
@@ -385,31 +370,38 @@
     }
 
     public static void onStopAttacking(Axolotl axolotl, LivingEntity entity) {
-        Level level = axolotl.level();
+        Level world = axolotl.level();
+
         if (entity.isDeadOrDying()) {
-            DamageSource damageSource = entity.getLastDamageSource();
-            if (damageSource != null) {
-                Entity entity2 = damageSource.getEntity();
-                if (entity2 != null && entity2.getType() == EntityType.PLAYER) {
-                    Player player = (Player)entity2;
-                    List<Player> list = level.getEntitiesOfClass(Player.class, axolotl.getBoundingBox().inflate(20.0));
-                    if (list.contains(player)) {
-                        axolotl.applySupportingEffects(player);
+            DamageSource damagesource = entity.getLastDamageSource();
+
+            if (damagesource != null) {
+                Entity entity1 = damagesource.getEntity();
+
+                if (entity1 != null && entity1.getType() == EntityType.PLAYER) {
+                    Player entityhuman = (Player) entity1;
+                    List<Player> list = world.getEntitiesOfClass(Player.class, axolotl.getBoundingBox().inflate(20.0D));
+
+                    if (list.contains(entityhuman)) {
+                        axolotl.applySupportingEffects(entityhuman);
                     }
                 }
             }
         }
+
     }
 
     public void applySupportingEffects(Player player) {
-        MobEffectInstance mobEffectInstance = player.getEffect(MobEffects.REGENERATION);
-        if (mobEffectInstance == null || mobEffectInstance.endsWithin(2399)) {
-            int i = mobEffectInstance != null ? mobEffectInstance.getDuration() : 0;
+        MobEffectInstance mobeffect = player.getEffect(MobEffects.REGENERATION);
+
+        if (mobeffect == null || mobeffect.endsWithin(2399)) {
+            int i = mobeffect != null ? mobeffect.getDuration() : 0;
             int j = Math.min(2400, 100 + i);
-            player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this);
+
+            player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
         }
 
-        player.removeEffect(MobEffects.DIG_SLOWDOWN);
+        player.removeEffect(MobEffects.DIG_SLOWDOWN, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // Paper - Add missing effect cause
     }
 
     @Override
@@ -446,7 +438,7 @@
 
     @Override
     protected Brain.Provider<Axolotl> brainProvider() {
-        return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
+        return Brain.provider(Axolotl.MEMORY_TYPES, Axolotl.SENSOR_TYPES);
     }
 
     @Override
@@ -456,7 +448,7 @@
 
     @Override
     public Brain<Axolotl> getBrain() {
-        return (Brain<Axolotl>)super.getBrain();
+        return (Brain<Axolotl>) super.getBrain(); // CraftBukkit - decompile error
     }
 
     @Override
@@ -470,10 +462,11 @@
         if (this.isControlledByLocalInstance() && this.isInWater()) {
             this.moveRelative(this.getSpeed(), movementInput);
             this.move(MoverType.SELF, this.getDeltaMovement());
-            this.setDeltaMovement(this.getDeltaMovement().scale(0.9));
+            this.setDeltaMovement(this.getDeltaMovement().scale(0.9D));
         } else {
             super.travel(movementInput);
         }
+
     }
 
     @Override
@@ -483,6 +476,7 @@
         } else {
             super.usePlayerItem(player, hand, stack);
         }
+
     }
 
     @Override
@@ -496,60 +490,46 @@
         return this.getTargetFromBrain();
     }
 
-    public static boolean checkAxolotlSpawnRules(
-        EntityType<? extends LivingEntity> type, ServerLevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random
-    ) {
+    public static boolean checkAxolotlSpawnRules(EntityType<? extends LivingEntity> type, ServerLevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random) {
         return world.getBlockState(pos.below()).is(BlockTags.AXOLOTLS_SPAWNABLE_ON);
     }
 
-    public static class AxolotlGroupData extends AgeableMob.AgeableMobGroupData {
-        public final Axolotl.Variant[] types;
-
-        public AxolotlGroupData(Axolotl.Variant... variants) {
-            super(false);
-            this.types = variants;
-        }
+    private static class AxolotlMoveControl extends SmoothSwimmingMoveControl {
 
-        public Axolotl.Variant getVariant(RandomSource random) {
-            return this.types[random.nextInt(this.types.length)];
-        }
-    }
+        private final Axolotl axolotl;
 
-    class AxolotlLookControl extends SmoothSwimmingLookControl {
-        public AxolotlLookControl(final Axolotl axolotl, final int yawAdjustThreshold) {
-            super(axolotl, yawAdjustThreshold);
+        public AxolotlMoveControl(Axolotl axolotl) {
+            super(axolotl, 85, 10, 0.1F, 0.5F, false);
+            this.axolotl = axolotl;
         }
 
         @Override
         public void tick() {
-            if (!Axolotl.this.isPlayingDead()) {
+            if (!this.axolotl.isPlayingDead()) {
                 super.tick();
             }
+
         }
     }
 
-    static class AxolotlMoveControl extends SmoothSwimmingMoveControl {
-        private final Axolotl axolotl;
+    private class AxolotlLookControl extends SmoothSwimmingLookControl {
 
-        public AxolotlMoveControl(Axolotl axolotl) {
-            super(axolotl, 85, 10, 0.1F, 0.5F, false);
-            this.axolotl = axolotl;
+        public AxolotlLookControl(final Axolotl axolotl, final int i) {
+            super(axolotl, i);
         }
 
         @Override
         public void tick() {
-            if (!this.axolotl.isPlayingDead()) {
+            if (!Axolotl.this.isPlayingDead()) {
                 super.tick();
             }
+
         }
     }
 
     public static enum Variant implements StringRepresentable {
-        LUCY(0, "lucy", true),
-        WILD(1, "wild", true),
-        GOLD(2, "gold", true),
-        CYAN(3, "cyan", true),
-        BLUE(4, "blue", false);
+
+        LUCY(0, "lucy", true), WILD(1, "wild", true), GOLD(2, "gold", true), CYAN(3, "cyan", true), BLUE(4, "blue", false);
 
         private static final IntFunction<Axolotl.Variant> BY_ID = ByIdMap.continuous(Axolotl.Variant::getId, values(), ByIdMap.OutOfBoundsStrategy.ZERO);
         public static final Codec<Axolotl.Variant> CODEC = StringRepresentable.fromEnum(Axolotl.Variant::values);
@@ -557,10 +537,10 @@
         private final String name;
         private final boolean common;
 
-        private Variant(final int id, final String name, final boolean natural) {
-            this.id = id;
-            this.name = name;
-            this.common = natural;
+        private Variant(final int i, final String s, final boolean flag) {
+            this.id = i;
+            this.name = s;
+            this.common = flag;
         }
 
         public int getId() {
@@ -577,7 +557,7 @@
         }
 
         public static Axolotl.Variant byId(int id) {
-            return BY_ID.apply(id);
+            return (Axolotl.Variant) Axolotl.Variant.BY_ID.apply(id);
         }
 
         public static Axolotl.Variant getCommonSpawnVariant(RandomSource random) {
@@ -589,8 +569,27 @@
         }
 
         private static Axolotl.Variant getSpawnVariant(RandomSource random, boolean natural) {
-            Axolotl.Variant[] variants = Arrays.stream(values()).filter(variant -> variant.common == natural).toArray(Axolotl.Variant[]::new);
-            return Util.getRandom(variants, random);
+            Axolotl.Variant[] aaxolotl_variant = (Axolotl.Variant[]) Arrays.stream(values()).filter((axolotl_variant) -> {
+                return axolotl_variant.common == natural;
+            }).toArray((i) -> {
+                return new Axolotl.Variant[i];
+            });
+
+            return (Axolotl.Variant) Util.getRandom((Object[]) aaxolotl_variant, random);
+        }
+    }
+
+    public static class AxolotlGroupData extends AgeableMob.AgeableMobGroupData {
+
+        public final Axolotl.Variant[] types;
+
+        public AxolotlGroupData(Axolotl.Variant... variants) {
+            super(false);
+            this.types = variants;
+        }
+
+        public Axolotl.Variant getVariant(RandomSource random) {
+            return this.types[random.nextInt(this.types.length)];
         }
     }
 }
