diff --git a/lib/plugins/ray_trace.js b/lib/plugins/ray_trace.js index 8dd7141c5..685d190fc 100644 --- a/lib/plugins/ray_trace.js +++ b/lib/plugins/ray_trace.js @@ -17,12 +17,7 @@ module.exports = (bot) => { } bot.blockAtCursor = (maxDistance = 256, matcher = null) => { - const { position, height, pitch, yaw } = bot.entity - - const eyePosition = position.offset(0, height, 0) - const viewDirection = getViewDirection(pitch, yaw) - - return bot.world.raycast(eyePosition, viewDirection, maxDistance, matcher) + return bot.blockAtEntityCursor(bot.entity, maxDistance, matcher) } bot.entityAtCursor = (maxDistance = 3.5) => {