Checking Tile Passable in front of Player?

Hello!
Right now, I'm looking to make a conditional branch for a common event to check if the tile specifically in front of the player.
From what I've seen, $game_player.passable?(x, y, d) is the best bet for this.
However, that requires a direction to be inserted manually, which would require four conditional branches instead of one.
Is there a good way to run a check of the tile directly in front of the player, no matter which direction they are facing?
$gamePlayer.direction() is what you're after.

Also $game_player.passable? is Ruby code, and it says you're using MV so I assume you need the Javascript. So the script call in its entirety would be

$gamePlayer.isMapPassable(x, y, $gamePlayer.direction())
$gamePlayer.direction() is what you're after.

Also $game_player.passable? is Ruby code, and it says you're using MV so I assume you need the Javascript. So the script call in its entirety would be

$gamePlayer.isMapPassable(x, y, $gamePlayer.direction())
Gotcha! That's weird, I was looking at the MV script call list, looks like some Ruby got mixed in there from old lists.
The final call would be
JavaScript:
$gamePlayer.isMapPassable($gamePlayer.x, $gamePlayer.y, $gamePlayer.direction())
Since the X and Y need to be defined.

Thanks for the help! You're a life saver!
Yeah, I only put x and y there in case you were using something other than the player's coordinates.

Original thread: https://forums.rpgmakerweb.com/threads/checking-tile-passable-in-front-of-player.138026/