diff --git a/.gitignore b/.gitignore index f65e7f4..91c3927 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build .idea/ *.zip *.jar +!/resources/*.zip diff --git a/README.md b/README.md index d4327e8..1c66290 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,38 @@ # ChessCraft - -[![actions](https://github.com/jpenilla/chesscraft/workflows/build/badge.svg?branch=master)](https://github.com/jpenilla/chesscraft/actions) +![license](https://img.shields.io/github/license/jpenilla/chesscraft) [![actions](https://github.com/jpenilla/chesscraft/workflows/build/badge.svg?branch=master)](https://github.com/jpenilla/chesscraft/actions) + +ChessCraft is a Paper plugin that adds in-world chess matches against other players and chess engines. +With ChessCraft, players can challenge each other to intense chess battles in a Minecraft environment. + +## Features + +- In-world chess matches, reminiscent of life-size chess boards. +- Pieces: Supports both custom models through a resource pack (linked below), and using textured player heads for resource pack free use. +- Automatic downloading of the correct Stockfish (chess engine powering ChessCraft) executable for your platform. + +## Download + +Downloads can be obtained from the [releases](https://github.com/jpenilla/chesscraft/releases) section. + +
+Development builds + +> Development builds are available at https://link.link +
+ +## Installation + +To install ChessCraft, simply drop the plugin into your Paper server's `plugins` folder. +The configuration can be adjusted at `plugins/ChessCraft/config.yml`. + +By default, ChessCraft will be configured for use with a resource pack containing custom models for chess pieces. +It can be downloaded [here](https://github.com/jpenilla/chesscraft/raw/master/resources/ChessCraft_Resource_Pack.zip). You can either have your players manually install it, or set it as your server resource pack/merge its contents into your existing server resource pack. + +## Usage + +First, you must create a chessboard by standing at the desired location for the southwest corner of the board and using the `/chess create_board ` command. + +Then, use the `/chess challenge player|cpu` commands to challenge an opponent. That's all! Now you can right-click the pieces to start making moves! + +Chess boards will not automatically place or remove blocks from the world (besides the pieces if configured to use block pieces), they will only manage pieces. This is to allow +building your chess board in any way you like. However, the `/chess set_checkerboard` command can be used to automatically place blocks for a standard board. diff --git a/resources/ChessCraft_Resource_Pack.zip b/resources/ChessCraft_Resource_Pack.zip new file mode 100644 index 0000000..2357d79 Binary files /dev/null and b/resources/ChessCraft_Resource_Pack.zip differ diff --git a/src/main/java/xyz/jpenilla/chesscraft/config/PieceOptions.java b/src/main/java/xyz/jpenilla/chesscraft/config/PieceOptions.java index bb6146f..333963e 100644 --- a/src/main/java/xyz/jpenilla/chesscraft/config/PieceOptions.java +++ b/src/main/java/xyz/jpenilla/chesscraft/config/PieceOptions.java @@ -54,12 +54,12 @@ enum Mode { final class ItemFrame implements PieceOptions { private Material material = Material.PAPER; private Map heightOffsets = Map.of( - PieceType.PAWN, -10.0D / 16.0D, - PieceType.BISHOP, -3.0D / 16.0D, - PieceType.KNIGHT, -7.0D / 16.0D, - PieceType.ROOK, -10.0D / 16.0D, - PieceType.QUEEN, -1.0D / 16.0D, - PieceType.KING, 0.0D + PieceType.PAWN, -13.0D / 16.0D, + PieceType.BISHOP, -4.0D / 16.0D, + PieceType.KNIGHT, -10.0D / 16.0D, + PieceType.ROOK, -12.0D / 16.0D, + PieceType.QUEEN, -4.0D / 16.0D, + PieceType.KING, -1.0D / 16.0D ); private Map whiteCustomModelData = Map.of( PieceType.PAWN, 7,