Links
Tags
Creators
Details
Licensed MIT
Published 2 months ago
Updated 2 months ago
All versions
0.1.0
Release
Villager Connect Four 0.1.02 months ago 94
Compatibility
Minecraft: Java Edition
26.2
Platform
Fabric
Supported environments
Client and server
Required content
Any compatible version
Changes
Initial release.
Added
- Connect Four button on every villager's trade screen - challenge any villager to a full game.
- The villager drops first, and plays yellow. Connect Four is a solved game: on the standard 7×6 board whoever moves first can force a win. Giving the villager that side is what makes the top of the difficulty ladder a genuine wall rather than merely a strong opponent, and it is the one place this mod deliberately departs from its Villager Chess and Villager Checkers siblings.
- Difficulty scales with the villager's trading level, and each level thinks differently rather than just deeper: Novice drops almost at random → Apprentice takes the win in front of it and blocks yours → Journeyman never plays into a loss and works with double threats → Expert understands odd/even threat parity → Master has solved the game.
first-player=playerinconfig/villagerconnectfour.propertieshands you the first move and therefore the theoretically winning side - the sanctioned way past an unbeatable Master. Your colour follows the turn order, so this also makes you yellow.board-sizeaccepts boards from4x4up to8x7. Sizes other than 7×6 change the game's value rather than just its scale - several smaller boards are draws with perfect play, so a Master can be held on them.- Column-based input with a ghost disc hanging over the column under the cursor, discs that fall and settle, and a full column that flashes red with a dull note rather than silently ignoring the click.
- The winning four are outlined and the rest of the board dims, so a win is visible rather than inferred.
- Losing to a Master while it has the first move explains itself: the end banner points at the
first-playersetting instead of leaving the defeat looking arbitrary. - Abandon handling: walking more than 16 blocks away, the villager dying, or disconnecting abandons the game; closing the board resigns.
- From-scratch pure-Java engine (negamax + alpha-beta + iterative deepening) running on a background thread, built on two bitboards packed into a single
longwith a sentinel row per column so four-in-a-row is found by shift-and with no edge masking. - Scores are measured in discs on the board rather than plies from the search root, which makes them absolute facts about a position - so one transposition table is shared by every game on the server and a Master's knowledge compounds across a game instead of starting cold each move.
- Fully server-authoritative: the server owns all game state; clients send a column and nothing else.
- Board, discs, holes and highlights are drawn procedurally rather than from a sprite sheet, so the board stays crisp at every size and the mod ships no textures.
- The trade-screen button stacks below other Villager Games mods' buttons instead of overlapping them, and sizes itself to its label.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:J7P8wJSr:yaNzXbQD"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:J7P8wJSr:yaNzXbQD"
}

