--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -68,7 +68,7 @@
 
     @Override
     public BehaviorController<Tadpole> getBrain() {
-        return super.getBrain();
+        return (BehaviorController<Tadpole>) super.getBrain(); // CraftBukkit - decompile error
     }
 
     @Override
@@ -233,8 +233,14 @@
                 }
 
                 frog.setPersistenceRequired();
+                // CraftBukkit start
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTransformEvent(this, frog, org.bukkit.event.entity.EntityTransformEvent.TransformReason.METAMORPHOSIS).isCancelled()) {
+                    this.setAge(0); // Sets the age to 0 for avoid a loop if the event is canceled
+                    return;
+                }
+                // CraftBukkit end
                 this.playSound(SoundEffects.TADPOLE_GROW_UP, 0.15F, 1.0F);
-                worldserver.addFreshEntityWithPassengers(frog);
+                worldserver.addFreshEntityWithPassengers(frog, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.METAMORPHOSIS); // CraftBukkit - add SpawnReason
                 this.discard();
             }
         }
