--- a/net/minecraft/world/effect/OozingMobEffect.java
+++ b/net/minecraft/world/effect/OozingMobEffect.java
@@ -15,6 +15,7 @@
 import net.minecraft.world.level.Level;
 
 class OozingMobEffect extends MobEffect {
+
     private static final int RADIUS_TO_CHECK_SLIMES = 2;
     public static final int SLIME_SIZE = 2;
     private final ToIntFunction<RandomSource> spawnedCount;
@@ -32,34 +33,40 @@
     @Override
     public void onMobRemoved(LivingEntity entity, int amplifier, Entity.RemovalReason reason) {
         if (reason == Entity.RemovalReason.KILLED) {
-            int i = this.spawnedCount.applyAsInt(entity.getRandom());
-            Level level = entity.level();
-            int j = level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING);
-            int k = numberOfSlimesToSpawn(j, OozingMobEffect.NearbySlimes.closeTo(entity), i);
+            int j = this.spawnedCount.applyAsInt(entity.getRandom());
+            Level world = entity.level();
+            int k = world.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING);
+            int l = OozingMobEffect.numberOfSlimesToSpawn(k, OozingMobEffect.NearbySlimes.closeTo(entity), j);
 
-            for (int l = 0; l < k; l++) {
-                this.spawnSlimeOffspring(entity.level(), entity.getX(), entity.getY() + 0.5, entity.getZ());
+            for (int i1 = 0; i1 < l; ++i1) {
+                this.spawnSlimeOffspring(entity.level(), entity.getX(), entity.getY() + 0.5D, entity.getZ());
             }
+
         }
     }
 
     private void spawnSlimeOffspring(Level world, double x, double y, double z) {
-        Slime slime = EntityType.SLIME.create(world);
-        if (slime != null) {
-            slime.setSize(2, true);
-            slime.moveTo(x, y, z, world.getRandom().nextFloat() * 360.0F, 0.0F);
-            world.addFreshEntity(slime);
+        Slime entityslime = (Slime) EntityType.SLIME.create(world);
+
+        if (entityslime != null) {
+            entityslime.setSize(2, true);
+            entityslime.moveTo(x, y, z, world.getRandom().nextFloat() * 360.0F, 0.0F);
+            world.addFreshEntity(entityslime, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT); // CraftBukkit
         }
     }
 
     @FunctionalInterface
     protected interface NearbySlimes {
+
         int count(int limit);
 
         static OozingMobEffect.NearbySlimes closeTo(LivingEntity entity) {
-            return limit -> {
-                List<Slime> list = new ArrayList<>();
-                entity.level().getEntities(EntityType.SLIME, entity.getBoundingBox().inflate(2.0), slime -> slime != entity, list, limit);
+            return (i) -> {
+                List<Slime> list = new ArrayList();
+
+                entity.level().getEntities(EntityType.SLIME, entity.getBoundingBox().inflate(2.0D), (entityslime) -> {
+                    return entityslime != entity;
+                }, list, i);
                 return list.size();
             };
         }
