-
-
Notifications
You must be signed in to change notification settings - Fork 114
Updating @example sections for several EntityTag Mechanism's and Tags. #2813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| // @returns ElementTag | ||
| // @deprecated Use 'EntityTag.type' on MC 1.20+. | ||
| // @description | ||
| // Returns the entities type. NOTE: For NPC's it will say "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 not well written
| // Deprecated in favor of <@link tag EntityTag.type> on MC 1.20+, which returns entity type names as specified by Mojang (scripts using this may need an update when switching). | ||
| // @example | ||
| // # Describes the type of entity at the players cursor in the world. | ||
| // # For use in-game: /ex narrate <player.target.entity_type> |
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
| // Returns the type of the entity. | ||
| // @example | ||
| // # Checks if the entity that a player is looking at is also a player. | ||
| // # - if <player.target.type> == 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 a bad script, for multiple reasons. The if/else is silly, the target tag is used without a fallback
| // @example | ||
| // # Checks if the player's name is "mcmonkey". | ||
| // # For use in game: /ex narrate <player.name.matches[mcmonkey]> | ||
| // - if <player.name> == mcmonkey: |
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
| // @example | ||
| // # Narrates the linked player's eye location. | ||
| // # /ex narrate <player.eye_location> | ||
| // - narrate <player.eye_location> |
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.
|
Thanks for the feedback, I opened a thread on the discord. |
This PR adds some missing @example sections to various Mechanisms and Tags.
Tags:
Mechanisms: