-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Adds <ViveCraftPlayerTag.rotation[head/left/right]>
tag for Vivecraft
#434
base: master
Are you sure you want to change the base?
Conversation
rotation = (float[]) object.getPlayer().getMetadata("righthand.rot").get(0).value(); | ||
break; | ||
default: | ||
attribute.echoError("Attribute must be 'head', 'left' or 'right'"); |
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.
LGTM, just one nitpick - don't think Attribute
is right here? can probably say input
, input part
, or format it like Invalid player part specified, must be 'head', 'left', or 'right'.
or something like that
return null; | ||
} | ||
if (rotation == null) { | ||
attribute.echoError("Location is not valid. Did a plugin overwrite the data?"); |
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.
In this case it's rotation, not location
switch (input.toString()) { | ||
case "head": | ||
rotation = (float[]) object.getPlayer().getMetadata("head.rot").get(0).value(); | ||
break; |
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.
Can use the modern switch syntax here
Requested by Behr long ago in a voice call.
<ViveCraftPlayerTag.rotation[head/left/right]>
tag with a QuaternionTag output.position
tag.