/Minesweeper

Minecraft mod which causes the game to boot a moddable, pure-java version of Minesweeper instead of Minecraft.

Primary LanguageJavaMIT LicenseMIT

Minesweeper

A total conversion mod for Minecraft, which prevents Minecraft from launching and loads an extensible, pure-java version of Minesweeper instead.

License

Minesweeper is available under the MIT license. See the playsawdust Glow repository for Glow licensing.

Installation

  • Grab a release distribution from this repository, or if Modrinth have okayed it by the time you're reading this, from Modrinth.

  • In Prism or your launcher of choice, set up a Minecraft 1.20.4 instance

  • Install Fabric (the loader) into your instance but do not add Fabric API. If you do, Fabric-Loader will hopefully realize the problem and crash the game before it can start.

  • Place Minesweeper in the Mods folder as normal

  • That's it. Launch the instance and enjoy a soothing game of Minesweeper!

Minesweeper cooperates with Fabric-Loader to load any other mods in the instance. Which player profile you use doesn't matter - because Minesweeper is fully free and clear from Minecraft with no code used, we don't need to worry about licenses or online versus offline mode.

Modding tips

You can mod straight from a fabric-example-mod templated repository, as long as you add Minesweeper as a dependency and make sure to remove fabric-api and minecraft as dependencies. I'm sorry, there's no example-mod repo at this time.

There are a lot of red herrings in a fabric dev environment for Minesweeper modders, code that Minesweeper does not use. Here's a quick cheat sheet for what you can and can't use:

  • Minecraft-merged / net.minecraft classes: Do not touch these. Inadvertently classloading Bootstrap will crash the game. Most of the code in this jar will crash the game if used.
  • Blaze3D: Will likely crash the game
  • Joml: We do not use this but it won't crash anything
  • Brigadier: We do not use this but it won't crash anything
  • Log4j / Slf4j: We use slf4j for logging. These are safe to use.
  • asm and mixin: Minesweeper is fully compatible with these, and beyond the APIs that Minesweeper provides, mixin is expected to be the bedrock that enables modders to add functionality.
  • gson, guava, apache commons: we use some guava, all of these are safe to use
  • datafixerupper: Easy to crash with this one. If it comes from the datafixerupper-6.0.8 jar, it's safe. If it comes from the minecraft artifact, it's not safe.
  • fabric-loader: safe to use
  • lwjgl: Prefer glow classes, but everything here is safe to use if you clean up after yourself.
  • netty: safe to use
  • TinyEvents and Glow: These are core parts of Minesweeper's functionality. They are safe to use.