Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World.raycast through mineflayer doesn't return lever but block behind it #87

Open
DatArnoGuy opened this issue Oct 31, 2021 · 1 comment

Comments

@DatArnoGuy
Copy link

Mineflayer does use bot.world.raycast(eyePosition, viewDirection, maxDistance, matcher) to get block which bot is looking in function bloctAtCursor. The problem is raycaster doesnt seem to get right block is target is lever. This is maybe the case with other non-full blocks, i haven't tested them. Full blocks work very well.

It would be nice to get way to raycast also non-full blocks.

@DatArnoGuy DatArnoGuy changed the title World.raycast through mineflayer doest return lever but block behind it World.raycast through mineflayer doesn't return lever but block behind it Oct 31, 2021
@Karang
Copy link
Contributor

Karang commented Oct 31, 2021

This is a data issue. There is 2 types of shapes in minecraft: interaction and physic, we only have the second one in mcData so that is what we use for both, but as you noticed there are some differences. The fix would be to extract the interaction shapes and expose them in mcData. There is an issue about this somewhere, but I can't find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants