Posted May 21, 201411 yr Hey guys, I'm using the xbox kinect, an oculus rift , and a hand joystick to create a complete virtual minecraft experience. So far, I have the oculus part done, and right now I'm in the kinect portion of my project. So far, I have steves arms rotate at my arms angle (Live rendering), as well as the ability to add any other capabilities using kinect data. But right now I'm having a huge issue, I wrote a piece of code that tells minecraft when to "break a block". It works since when i swing my arm the console prints ("Block broke").Now i want to actually break a block (or hit it as if i pressed left click on my mouse) and I cant seen to find how to activate the break block function without the use of the mouse (left click). In other words, minecraft receives the "break block" signal but does not know how to handle it. Do any of you know what this function is? Where it's found, and how I could implement it? After this is done, the oculus will be able to point to the block which you want to brake and you will simply need to swing your arm as if you were actually mining the block. Thanks!
May 22, 201411 yr On the client side: Look at PlayerControllerMP#clickBlock(x,y,z,side) By the way; this is called by both: Minecraft#func_147115_a(boolean) [private] and Minecraft#func_147116_af() [private] - the Minecraft method runTick calls these on left click... -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.