Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.