Skip to content

Conversation

@Skullfurious
Copy link

This PR adds some missing @example sections to various Mechanisms and Tags.

Tags:

  • EntityTag.velocity
  • EntityTag.world
  • EntityTag.glowing
  • EntityTag.entity_type
  • EntityTag.type
  • EntityTag.name
  • EntityTag.eye_location

Mechanisms:

  • EntityTag Mechanism: velocity

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2026

CLA assistant check
All committers have signed the CLA.

// @returns ElementTag
// @deprecated Use 'EntityTag.type' on MC 1.20+.
// @description
// Returns the entities type. NOTE: For NPC's it will say "PLAYER".
Copy link
Member

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>
Copy link
Member

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:
Copy link
Member

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:
Copy link
Member

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>
Copy link
Member

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
Copy link
Author

Thanks for the feedback, I opened a thread on the discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants