June 8, 20196 yr To get the block activation from the block side (as opposed to the item side), for example if you're making a new block, then use onBlockActivated. See here. If you want to do it from the item side, use onItemRightClick. To get the block you're looking at you can use the client's (Minecraft.getInstance()) objectMouseOver field. If that doesn't have the block, you might have to get another field from objectMouseOver, probably a RayTraceResult (if I recall correctly). If you take this route you'll probably have to send the result from the client to the server using packets.
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.