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.

[1.7.10] On Item right click - Get block and distance

Featured Replies

Posted

Is there some method to get the Block, coordinates and distance form player when we right click an item?

 

For example on a Pickaxe when a player right clicks it I need to know what block is he pointing at, the coordinates and the distance to that block from the player.

 

Not sure if is there some Vanilla item with this behavior I can take a look at.

 

Thanks a lot for any help ;)

 

  • Author

Thanks diesieben07 gonna take a look at that one ;)

 

I thought that only worked if the block was "in range" like the range when you place a block, I didn't know you can actually get the block and coordinates, no matter what the distance is ;)

 

Thanks one again.

  • Author

Ohhh then I think think it will work for what I need.

 

I think the Wither has something that "aims" to blocks at any distance. Not sure if that can be applied to a player when right clicking an item  ???

 

Maybe some other method...

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.