diff --git a/paper-server/nms-patches/net/minecraft/world/entity/animal/frog/Tadpole.patch b/paper-server/nms-patches/net/minecraft/world/entity/animal/frog/Tadpole.patch new file mode 100644 index 0000000000..d3af9c52b8 --- /dev/null +++ b/paper-server/nms-patches/net/minecraft/world/entity/animal/frog/Tadpole.patch @@ -0,0 +1,27 @@ +--- 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 getBrain() { +- return super.getBrain(); ++ return (BehaviorController) super.getBrain(); // CraftBukkit - decompile error + } + + @Override +@@ -232,8 +232,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(); + } +