Inspiration

We like chess, we like minecraft. You probably shouldn't mix them but we did

What it does

Connects to a Lichess game in Minecraft by sending a challenge request to a hardcoded opponent. The board is reflected via mobs on a Minecraft recreation of a chess board with pieces being different mobs. Each turn, a sign GUI comes up asking you to input a move which updates the Lichess board as well as the Minecraft board.

How we built it

  • Make plugin via Spigot API
  • Import chariot Lichess API Java wrapper
  • Make /start command to send challenge request
  • Stream of events handles when game starts/move made etc
  • Ask user via a Sign GUI to input their move
  • Reflect all moves by representing mobs in a 8x8 minecraft chess board

Challenges we ran into

  • Java
  • Sorting out sync and async threads (the web code had to run on an async thread to the main Minecraft server thread, else it would crash, whereas the code to spawn mobs and such were forced to be on a sync thread. Jugging these were pain mostly due to our lack of competance)
  • Java
  • Docs were outdated for Chariot and there was little to no other examples of it being used
  • Java
  • Getting ratelimited constantly by Lichess

Accomplishments that we're proud of

  • Learning new APIs we haven't used before
  • Putting up with Java
  • Making a lichess interface in another game

What we learned

  • Java is pain
  • Async/sync code
  • New APIs regarding Lichess

What's next for LichessMC

  • Implementing actual error handling and input sanitisation because at the moment if you enter an invalid move you just straight up don't get an opportunity to try again and it breaks the entire code.
  • Make it so you can choose who to challenge in game; and also be able to queue up against random players.
  • Add handling & implementation for resignations & draws & chat messages
  • Change the mobs to be more distinctive of the sides & pieces, these were added quickly to just add functionality first.

TEAM 41

Built With

  • chariot
  • java
  • lichess
  • minecraft
  • spigot
Share this project:

Updates