-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
bugSomething isn't workingSomething isn't workingimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
CommandAPI version
8.6.1
Minecraft version
1.19.3
Are you shading the CommandAPI?
No
What I did
- Using this code:
new CommandAPICommand("fire")
.executesPlayer((player, args) -> {
System.out.println(player.getLocation());
player.launchProjectile(Arrow.class, player.getLocation().getDirection().multiply(2));
})
.register();
new CommandAPICommand("fire2")
.executesNative((sender, args) -> {
System.out.println(sender.getLocation());
((Player) sender.getCaller()).launchProjectile(Arrow.class, sender.getLocation().getDirection().multiply(2));
})
.register();
- Stand somewhere (and don't move)
- Run
/fire
- Run
/fire2
What actually happened
- Running
/fire
states the pitch (let's call thisA
) and yaw (let's call thisB
). An arrow fires in the direction the player is looking at - Running
/fire2
states the pitch as the valueB
and yaw as the valueA
. An arrow fires in some direction that isn't the direction the player is looking at
What should have happened
The pitch and yaw values should be identical between /fire
and /fire2
Server logs and CommandAPI config
[23:31:29 INFO]: Skepter issued server command: /fire
[23:31:29 INFO]: Location{world=CraftWorld{name=world},x=79.09897261112293,y=63.0,z=40.51354432320863,pitch=16.050339,yaw=138.16844}
[23:31:31 INFO]: Skepter issued server command: /fire2
[23:31:31 INFO]: Location{world=CraftWorld{name=world},x=79.09897261112293,y=63.0,z=40.51354432320863,pitch=138.16844,yaw=16.050339}
Other
Found by JabberJerry from this comment in the CommandAPI Discord.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release