If a bat is resting on a block, and is scared by an approaching player it sometimes flies into the block above it.
To reproduce:
Create a 3x1x3 block platform. (Might need air on top)
Spawn a bat in the centre.
Approach the bat from the side or bellow (I doesn't always work if you come directly at it from the side.)
Expected behaviour: the bat flies away, but not into a block
Experienced behaviour: the bat flies into the block and takes damage.
Thank you for your report!
We're tracking this issue in MC-228589, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki