Here's a small datapack to check if the player is holding a lodestone compass that's tracking a lodestone in the overworld. It unfortunately doesn't work since the predicate requires a pos component as well
Steps to reproduce:
Install the datapack
Place a lodestone in the overworld
Use a compass on it and hold it in your mainhand
Run /execute if predicate lodestone_dimension_match:holding_lodestone_compass
The nbt way of doing this was with "nbt": "{LodestoneDimension:\"minecraft:overworld\"}"
Linked issues
relates to 1
Attachments
Comments 6
Relates to MC-270707, I suppose.
The issue is that the predicate tests with component instead of predicates as mentioned in MC-270707. There is no predicate for a lodestone_tracker but that probably makes this a feature request.
Confirmed – leaving this open since this seems to break something that was possible before components were introduced (and I personally haven't found a way to replicate it in a different way, though it's possible I missed something).
I worked around it with a function that returns 1 or 0 based on the player data. I then used execute if function which was fine for my needs. That solution wouldn't work if you want to do this check in a json file
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
We do not have enough information to find the cause of this issue.
Please record a video of this happening and attach it to this report.
If you are on Windows, you can use
Windows
+Alt
+R
to open a built-in app for recording game footage.If you are on Mac (Mojave or later), you can use
Shift
+Command
+5
to open a built-in app for recording your screen.In case you don't have a program to record videos, we recommend using the free recording software OBS.
In case the resulting video file is too large to be uploaded to the bug tracker directly, please upload it elsewhere (e.g. as unlisted video on YouTube) and link to it here.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki