-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Re-enable the vector from location syntax #6180
Re-enable the vector from location syntax #6180
Conversation
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.
Minor syntax suggestions, looks great!
src/main/java/ch/njol/skript/expressions/ExprLocationFromVector.java
Outdated
Show resolved
Hide resolved
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.
Implementation looks good!, but I am not sure I see the point of this syntax...
Is this not what converters are for? I do see the benefit from being able to specify the yaw/pitch for the created location though. Not sure if that is enough justification
src/main/java/ch/njol/skript/expressions/ExprLocationFromVector.java
Outdated
Show resolved
Hide resolved
…r.java Co-authored-by: Patrick Miller <[email protected]>
Description
Re-enables the vector from location syntax. This makes several changes.
The previous pattern was slow and bad because it put two inputs directly next to each other and had no literal "keywords" in the pattern.
Changes:
toString
now contains the whole pattern.Previously, both a yaw and a pitch value had to be provided for them to be added, meaning you could specify
with yaw 10
but it would not be set if the pitch input happened to be null.This has been changed so if either are specified it will set the yaw and pitch (since that is what the user intended to happen) but a zero-value will be substituted for null.
If neither yaw nor pitch is provided it will return to the old behaviour.
Target Minecraft Versions: any
Requirements: none
Related Issues: none