Skip to content

Commit

Permalink
Add resource pack and readme, update default config for resource pack
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Feb 13, 2023
1 parent b25b75f commit 626cf61
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build
.idea/
*.zip
*.jar
!/resources/*.zip
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# ChessCraft
<!-- commented until a release ![release](https://img.shields.io/github/v/release/jpenilla/chesscraft?color=blue&label=version)-->
[![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) <!-- commented until a release ![release](https://img.shields.io/github/v/release/jpenilla/chesscraft?color=blue&label=version)--> [![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.

<details>
<summary>Development builds</summary>

> Development builds are available at https://link.link
</details>
## 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 <board_name> <facing>` 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.
Binary file added resources/ChessCraft_Resource_Pack.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions src/main/java/xyz/jpenilla/chesscraft/config/PieceOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ enum Mode {
final class ItemFrame implements PieceOptions {
private Material material = Material.PAPER;
private Map<PieceType, Double> 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<PieceType, Integer> whiteCustomModelData = Map.of(
PieceType.PAWN, 7,
Expand Down

0 comments on commit 626cf61

Please sign in to comment.