Skip to content
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

Ability to get the "exact" targeted block #5612

Closed
1 task done
APickledWalrus opened this issue Apr 17, 2023 · 0 comments
Closed
1 task done

Ability to get the "exact" targeted block #5612

APickledWalrus opened this issue Apr 17, 2023 · 0 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@APickledWalrus
Copy link
Member

Suggestion

ExprTargetedBlock should be enhanced to support the getTargetBlockExact method as well.
e.g. [:exact] targeted block [of %players%]

https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#getTargetBlockExact(int,org.bukkit.FluidCollisionMode)
Not sure how we would want to handle FluidCollisionMode

"Good First Issue" instructions:
To implement this, simply add a new parse tag to the pattern. A parse tag allows us to determine when a specific part of a pattern has been used. For example, given [:exact] targeted block [of %players%], this pattern has a parse tag ("exact") for the "exact" part of the pattern (that's what the : does). In the init method, one can check parseResult.hasTag("exact") to see if the user used that keyword. Then, the differentiation on what method to perform can be handled in the get method.

Why?

The exact targeted block takes block forms into account, meaning users can get the block a user is looking at through the gap of some other block.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@APickledWalrus APickledWalrus added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). good first issue An issue that would be good for a first-time contributor to make a PR for labels Apr 17, 2023
@sovdeeth sovdeeth added the PR available Issues which have a yet-to-be merged PR resolving it label May 7, 2024
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

2 participants