This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Hackingroelz's profile picture

Detecting where the player is looking

Started by Hackingroelz, 16 March 2012 - 06:30 PM
Hackingroelz #1
Posted 16 March 2012 - 07:30 PM
Hello

I've been working on a peripheral that adds more ways to interact with the computer. The problem I'm having is that I can't find out how to detect where the player is looking. Could sombody please tell me if there is a way to detect this? Thanks in advance.
rerere284 #2
Posted 16 March 2012 - 08:42 PM
I know that in NBTedit, there is a variable for which way the player is facing in the same section as the player's velocity and position.
ComputerCraftFan11 #3
Posted 16 March 2012 - 08:46 PM
In the F3 menu, there is a variable called F that shows the direction your facing, you can try to make your peripheral get the value of F.
(it might be EntityPlayer.getF or something)
6677 #4
Posted 16 March 2012 - 11:03 PM
Not to direct traffic away from this forum but how about asking the guys on the main minecraft forum. Way more modders to help get the code snippet you need.
Casper7526 #5
Posted 17 March 2012 - 01:23 AM
I sorta agree with 6677 only because your not asking anything relating to peripherals, your asking a general minecraft modding question.