--- a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
+++ b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
@@ -1,5 +1,6 @@
 package net.minecraft.world.entity.animal.horse;
 
+import java.util.Objects;
 import javax.annotation.Nullable;
 import net.minecraft.core.BlockPos;
 import net.minecraft.nbt.CompoundTag;
@@ -18,20 +19,22 @@
 import net.minecraft.world.entity.EntityType;
 import net.minecraft.world.entity.MobSpawnType;
 import net.minecraft.world.entity.Pose;
+import net.minecraft.world.entity.ai.attributes.AttributeInstance;
 import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
 import net.minecraft.world.entity.ai.attributes.Attributes;
 import net.minecraft.world.entity.animal.Animal;
 import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.LevelAccessor;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
+// CraftBukkit end
 
 public class SkeletonHorse extends AbstractHorse {
+
     private final SkeletonTrapGoal skeletonTrapGoal = new SkeletonTrapGoal(this);
     private static final int TRAP_MAX_LIFE = 18000;
-    private static final EntityDimensions BABY_DIMENSIONS = EntityType.SKELETON_HORSE
-        .getDimensions()
-        .withAttachments(EntityAttachments.builder().attach(EntityAttachment.PASSENGER, 0.0F, EntityType.SKELETON_HORSE.getHeight() - 0.03125F, 0.0F))
-        .scale(0.5F);
+    private static final EntityDimensions BABY_DIMENSIONS = EntityType.SKELETON_HORSE.getDimensions().withAttachments(EntityAttachments.builder().attach(EntityAttachment.PASSENGER, 0.0F, EntityType.SKELETON_HORSE.getHeight() - 0.03125F, 0.0F)).scale(0.5F);
     private boolean isTrap;
     public int trapTime;
 
@@ -40,25 +43,23 @@
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return createBaseHorseAttributes().add(Attributes.MAX_HEALTH, 15.0).add(Attributes.MOVEMENT_SPEED, 0.2F);
+        return createBaseHorseAttributes().add(Attributes.MAX_HEALTH, 15.0D).add(Attributes.MOVEMENT_SPEED, 0.20000000298023224D);
     }
 
-    public static boolean checkSkeletonHorseSpawnRules(
-        EntityType<? extends Animal> type, LevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random
-    ) {
-        return !MobSpawnType.isSpawner(reason)
-            ? Animal.checkAnimalSpawnRules(type, world, reason, pos, random)
-            : MobSpawnType.ignoresLightRequirements(reason) || isBrightEnoughToSpawn(world, pos);
+    public static boolean checkSkeletonHorseSpawnRules(EntityType<? extends Animal> type, LevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random) {
+        return !MobSpawnType.isSpawner(reason) ? Animal.checkAnimalSpawnRules(type, world, reason, pos, random) : MobSpawnType.ignoresLightRequirements(reason) || isBrightEnoughToSpawn(world, pos);
     }
 
     @Override
     protected void randomizeAttributes(RandomSource random) {
-        this.getAttribute(Attributes.JUMP_STRENGTH).setBaseValue(generateJumpStrength(random::nextDouble));
+        AttributeInstance attributemodifiable = this.getAttribute(Attributes.JUMP_STRENGTH);
+
+        Objects.requireNonNull(random);
+        attributemodifiable.setBaseValue(generateJumpStrength(random::nextDouble));
     }
 
     @Override
-    protected void addBehaviourGoals() {
-    }
+    protected void addBehaviourGoals() {}
 
     @Override
     protected SoundEvent getAmbientSound() {
@@ -82,7 +83,7 @@
                 return SoundEvents.SKELETON_HORSE_STEP_WATER;
             }
 
-            this.gallopSoundCounter++;
+            ++this.gallopSoundCounter;
             if (this.gallopSoundCounter > 5 && this.gallopSoundCounter % 3 == 0) {
                 return SoundEvents.SKELETON_HORSE_GALLOP_WATER;
             }
@@ -102,6 +103,7 @@
         } else {
             super.playSwimSound(Math.min(0.1F, volume * 25.0F));
         }
+
     }
 
     @Override
@@ -111,19 +113,21 @@
         } else {
             super.playJumpSound();
         }
+
     }
 
     @Override
     public EntityDimensions getDefaultDimensions(Pose pose) {
-        return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose);
+        return this.isBaby() ? SkeletonHorse.BABY_DIMENSIONS : super.getDefaultDimensions(pose);
     }
 
     @Override
     public void aiStep() {
         super.aiStep();
         if (this.isTrap() && this.trapTime++ >= 18000) {
-            this.discard();
+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
         }
+
     }
 
     @Override
@@ -157,13 +161,14 @@
             } else {
                 this.goalSelector.removeGoal(this.skeletonTrapGoal);
             }
+
         }
     }
 
     @Nullable
     @Override
     public AgeableMob getBreedOffspring(ServerLevel world, AgeableMob entity) {
-        return EntityType.SKELETON_HORSE.create(world);
+        return (AgeableMob) EntityType.SKELETON_HORSE.create(world);
     }
 
     @Override
