-
-
Notifications
You must be signed in to change notification settings - Fork 111
Updating @example sections for several EntityTag Mechanism's and Tags. - #2813
Updating @example sections for several EntityTag Mechanism's and Tags. #2813Skullfurious wants to merge 8 commits into
Conversation
CLA assistant check
All committers have signed the CLA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not well written
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not need every example doc to tell you about the /ex command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bad script, for multiple reasons. The if/else is silly, the target tag is used without a fallback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actively violating one of the basic points in the Denizen beginner's guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just narrating tags is not a very good example usage
Entity.world and velocity had examples that weren't very useable in their generated form.
Skullfurious
commented
Feb 3, 2026
Thanks for the feedback, I opened a thread on the discord.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I'd put that in the meta, that's more of an implementation detail Mojang could change whenever they feel like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe label this as "going upwards"/"moving upwards" or something like that, this might be a bit misleading as it's not an actual jumping check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this an example on the velocity tag? If anything it should be on the mechanism - also that constructor shouldn't be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a few other tags that had examples using the adjust command as well. I believe in this case the generated example was not very usable since it was
- teleport <player> <player.velocity>
If you have a better example I could definitely change it. I was under the impression just using narrate was not a good example script as well.
Would something like this be better?
- if <player.velocity.y.is_more_than[0]>:
- narrate "Player is ascending!"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize you could just pass in the raw values of value:0,1,0 haha I thought you had to pass a location tag explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you test examples in-game to verify they work as expected, I.e. in this case I believe this will error because LocationTag.facing requires a parameter & returns a boolean.
Although you can just remove that entire destination arg here I believe? Keep the example as simple as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, I had debug off. I'll avoid doing that in the future. Thanks for catching that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...the name of the world that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowercase H here I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, just seen this after my previous comment. I was going down the list replying.
I'll fix that now but I was curious if there was a reason why it's a bad idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag only exists to allow operators outside of the if command. The if command already can do - if <player.velocity.y> > 0: as the syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is also bad regardless, // Note: Does not accurately calculate player clientside movement velocity. player should not be used as an example on the velocity tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem to track the vertical movement correctly just not the X and Y after my testing. Do you think I should use context.entity instead of player?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deprecated, is there any reason you're adding back the meta?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly because I ran into an issue with EntityTag.type also throwing a deprecated error on NPC's and figured I would just document the behaviour since EntityTag.entity_type behaves differently than EntityTag.type (which says NPC).
I will remove it in the next commit!
This PR adds some missing @example sections to various Mechanisms and Tags.
Tags:
Mechanisms: