Minerdwarf222 / DwarfHighlighterMod_1.20.1

This is the 1.20.1 version of the DwarfHighlighterMod made specifically for adding features to the minecraft server "Monumenta".
1 stars 0 forks source link

Add a minesweeper helper #7

Open Minerdwarf222 opened 1 month ago

Minerdwarf222 commented 1 month ago

Look at adding a basic minesweeper helper for the minesweeper fishing minigame. All it should do it is mark the probabilities of a mine being there or not.

Broad steps:

  1. Detect if the minesweeper minigame is happening.
  2. Detect the current board size and state. This can be done via detecting the color of the particle in each box.
    • Red = Flag
    • Gray = 0
    • Blue = 1
    • Green = 2
    • Yellow/Orange = 3
  3. Using the detected board state, generate the probabilities of each free spot having a mine based on the clues given.
  4. Display the probabilities. Maybe by using glowing blocks where color represents it? (Red = mine, green = 100% safe, gradient?)
  5. Figure out a way to detect the total number of mines and use that as part of probabilities calculating to make it accurate.

The minesweeper minigame appears to occur directly above the fishing bobber.
So first throw a listener onto something related to the fishing bobber (Maybe catch?) then detect if there are particles above it every tick for a second or so.
If so detect if it is the minesweeper minigame by trying to detect if there is a grid board? Or some other defining easy to detect feature.
Then detect grid size and tile locations. Then go through each tile and detect what the state is. image Example of what a 4x4 minesweeper board looks like.

Minerdwarf222 commented 4 weeks ago

This is probably not allowed based on the feelings I get from what mods/tm have said about other things, but what mods don't know they don't know. :). (I'll probably just end up closing this and not adding it.)