Block placement system like roblox bedwars

What Do You Wanna Achieve?
Well, I wanna achieve somewhat exactly block placement system like roblox bedwars. They got:

  • Prediction for the next block
  • Front Bridge
  • Side Bridge

If someone can explain how to do it that would be appreciated (or write of of the code )