Despite the @e, the following command seems to only affect players:
execute as @e[nbt={Dimension:"minecraft:overworld"}] run say hi
^Ignore the slash it keeps adding for some reason
This is likely because mobs lack a "dimension" tag for some reason, making it impossible to execute at ones in a specific dimension?
Comments 2
Thank you for your report!
We're tracking this issue as MC-190598, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Won't Fix, which means this is considered a bug but won't be fixed. The description of that ticket or the comments might explain the rationale. Please do not leave a comment on the linked ticket.
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
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Entities do not save that to NBT, entities are saved in files inside the entity folder, so they don't need it. This is not a bug.
Use "execute in <dimension> as @e[distance=0..] run say hi" or something similar; distance is a dimension-binding selector argument and prevents finding entities that are not in the execution dimension.