InteractBlockEvent event.getTargetBlock()

So i noticed that this method only works up to 5 blocks away, after that it just returns a minecraft:log with the coords of 0. Is this a bug?

How would you be interacting with a block farther than 5 blocks away?

Really I’m not. I just need the block location the cursor is pointing at whether it be 1 or 100 blocks away when player right clicks holding a specific itemstack This was the closest thing I could find that might do that. Any other suggestions?

You might try ray tracing

That’s exactly what I was looking for. Thanks.

1 Like