Jump to content

Recommended Posts

Posted

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! :)

Posted

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...

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.