I'm trying to make a mod where if I type a specific message in chat, it will place a block where I'm looking. I'm using ClientChatEvent to get when the client sends a chat message, but I'm not sure how to get the block the player is looking at, or place a block as the player. Kind of like how Schematica does it, but only on the block the player is looking at (as if they were holding the block in their hand and right clicked).
Does anyone know how that could be accomplished?