prismarine-world icon indicating copy to clipboard operation
prismarine-world copied to clipboard

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

Open DatArnoGuy opened this issue 3 years ago • 1 comments

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 avatar Oct 31 '21 14:10 DatArnoGuy

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.

Karang avatar Oct 31 '21 15:10 Karang