Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
uses: gradle/actions/wrapper-validation@v5
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'microsoft'
java-version: 21
- name: Build
run: ./gradlew build
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Artifact
path: build/libs
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
# Fabric Coral

English | [中文](README_zh.md)

[![GitHub Action](https://github.com/UnknownBuild/Coral/workflows/Build/badge.svg)](https://github.com/UnknownBuild/Coral/actions/workflows/main.yaml)
[![GitHub Release](https://img.shields.io/github/v/release/UnknownBuild/Coral)](https://github.com/UnknownBuild/Coral/releases)

Coral 是 我的世界(Minecraft) 的一个工具及扩展模组,目前仅提供 Fabric 版本。
> English version is translated by tool.

Coral is a tool and extension mod for Minecraft, currently only available for Fabric version.

![coral](src/main/resources/assets/coral/icon.png)

## 功能
## Feature

Coral 为生存游戏提供了一系列工具与扩展,在不修改原版生存玩法的同时提供辅助功能,比如
Coral provides a series of tools and extensions for survival games, without modifying the vanilla survival game mode, such as

- 命令扩展:here(自身高亮)、player(玩家命令增强)、wru(询问位置);
- 辅助特性:睡觉提示、死亡提示等。
- Command Extensions: here(self highlight), player(player command enhancement), wru(ask for location);
- Auxiliary Features: sleep reminder, death reminder, etc.

Coral 适用于客户端版本和服务端版本,但部分特性仅生效于客户端或服务端。
Coral is applying for both client and server side, but some features only apply for client of server side.

## 安装与使用
## Install and use

Coral 模组的工作依赖于 Fabric
Coral relies on Fabric.

请阅读 [https://fabricmc.net/use/](https://fabricmc.net/use/) 安装好 Fabric,然后下载对应 Minecraft 版本的 Coral mods 文件夹。
Please read [https://fabricmc.net/use/](https://fabricmc.net/use/), install Fabric and download the corresponding version of Coral for Minecraft to folder mods.

以下为各个 Minecraft 版本的 Coral 最新版本和维护情况,更多版本可前往 [Release](https://github.com/UnknownBuild/Coral/releases/) 下载。
The followings are the latest versions and maintenance status of Coral for various Minecraft version. For more versions, please visit [Release](https://github.com/UnknownBuild/Coral/releases/) and download.

| Minecraft 版本 | Coral 最新版本 | 状态 |
|:------------:|:-----------------------------------------------------------------:|:----:|
| 1.21.x | v0.3.0 | 维护中 |
| 1.20.x 及更低版本 | [v0.2.2](https://github.com/UnknownBuild/Coral/releases/tag/v0.x) | 不再维护 |
| Minecraft Version | Coral Latest Version | Status |
|:--:|:--:|:--:|
| 1.21.9+ | [v0.4.0](https://github.com/UnknownBuild/Coral/releases/tag/v0.4.0) | Under Maintained |
| 1.21 ~ 1.21.8 | [v0.3.0](https://github.com/UnknownBuild/Coral/releases/tag/v0.3.0) | No Longer Maintained |
| 1.20.x and lower versions | [v0.2.2](https://github.com/UnknownBuild/Coral/releases/tag/v0.x) | No Longer Maintained |

Coral 可以通过配置文件启用或关闭特定功能,关于 Coral 的配置请阅读 [Coral配置指南](https://github.com/UnknownBuild/Coral/blob/master/docs/config_zh.md)
Coral can enable or disable specific features through config file. For the information on Coral configuration, please refer to [Coral Configuration Guides](https://github.com/UnknownBuild/Coral/blob/master/docs/config.md).

## 问题与建议
## Questions and suggestions

如果您对于 Coral 有任何问题反馈、建议或特性请求,请通过 [Issues](https://github.com/UnknownBuild/Coral/issues) 提交相关内容。
If you have any feedback, suggestions or feature requests, please contact use in [Issues](https://github.com/UnknownBuild/Coral/issues).

## 许可协议
## License

Coral 模组基于 [MIT License](https://github.com/UnknownBuild/Coral/blob/master/LICENSE) 开放源码。
Based on [MIT License](https://github.com/UnknownBuild/Coral/blob/master/LICENSE).
43 changes: 43 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Fabric Coral

[English](README.md) | 中文

[![GitHub Action](https://github.com/UnknownBuild/Coral/workflows/Build/badge.svg)](https://github.com/UnknownBuild/Coral/actions/workflows/main.yaml)
[![GitHub Release](https://img.shields.io/github/v/release/UnknownBuild/Coral)](https://github.com/UnknownBuild/Coral/releases)

Coral 是 我的世界(Minecraft) 的一个工具及扩展模组,目前仅提供 Fabric 版本。

![coral](src/main/resources/assets/coral/icon.png)

## 功能

Coral 为生存游戏提供了一系列工具与扩展,在不修改原版生存玩法的同时提供辅助功能,比如

- 命令扩展:here(自身高亮)、player(玩家命令增强)、wru(询问位置);
- 辅助特性:睡觉提示、死亡提示等。

Coral 适用于客户端版本和服务端版本,但部分特性仅生效于客户端或服务端。

## 安装与使用

Coral 模组的工作依赖于 Fabric。

请阅读 [https://fabricmc.net/use/](https://fabricmc.net/use/) 安装好 Fabric,然后下载对应 Minecraft 版本的 Coral 到 mods 文件夹。

以下为各个 Minecraft 版本的 Coral 最新版本和维护情况,更多版本可前往 [Release](https://github.com/UnknownBuild/Coral/releases/) 下载。

| Minecraft 版本 | Coral 最新版本 | 状态 |
|:--:|:--:|:--:|
| 1.21.9+ | [v0.4.0](https://github.com/UnknownBuild/Coral/releases/tag/v0.4.0) | 维护中 |
| 1.21 ~ 1.21.8 | [v0.3.0](https://github.com/UnknownBuild/Coral/releases/tag/v0.3.0) | 不再维护 |
| 1.20.x 及更低版本 | [v0.2.2](https://github.com/UnknownBuild/Coral/releases/tag/v0.x) | 不再维护 |

Coral 可以通过配置文件启用或关闭特定功能,关于 Coral 的配置请阅读 [Coral配置指南](https://github.com/UnknownBuild/Coral/blob/master/docs/config_zh.md) 。

## 问题与建议

如果您对于 Coral 有任何问题反馈、建议或特性请求,请通过 [Issues](https://github.com/UnknownBuild/Coral/issues) 提交相关内容。

## 许可协议

Coral 模组基于 [MIT License](https://github.com/UnknownBuild/Coral/blob/master/LICENSE) 开放源码。
28 changes: 14 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ plugins {
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

archivesBaseName = project.archives_base_name
version = "${project.mod_version}+${project.minecraft_version}" as Object
version = "${project.mod_version}+${project.minecraft_version}"
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
maven {
url 'https://maven.aliyun.com/nexus/content/groups/public'
Expand All @@ -24,19 +24,13 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API
Set<String> apiModules = ["fabric-api-base", "fabric-command-api-v2"]
apiModules.forEach {
include(modImplementation(fabricApi.module(it, project.fabric_version)))
}
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": inputs.properties.version
}
}

Expand All @@ -49,18 +43,24 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
inputs.property "archivesName", project.base.archivesName

from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
rename { "${it}_${inputs.properties.archivesName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
Expand Down
150 changes: 150 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Coral Configuration Guides

English | [中文](config_zh.md)

> English version is translated by tool.

Coral configuration file is written by Java Properties. If you are not familiar with Properties, we also provides some explanations below. The configuration file for Minecraft server also uses the Properties file.

## About configuration files

### Configuration path

The configuration file name for Coral must be coral.properties, and mod will read the configuration from the following path.

```
coral.properties
config/coral.properties
configs/coral.properties
```

The module requires only one configuration file. If there ere multiple configuration files in the above path, mod will not be able to start. If there are no custom configuration file, mod will use the default configuration.

### Configuration format

The configuration file is written by Java Properties, in the following format.

```properties
# Comments starting with sign '#', it can be used to write some text for recording or prompting purposes.
# All configurations exist in the form of <key>=<value>, where key is the configuration item and value is the value, for example
game=Minecraft
player.id=1
player.is_online=true
player.name=MegaShow
```

### Configuration References

Coral provides two preset configurations: default configuration and empty configuration.

- default: default configuration, enable most of Coral features.
- empty: empty configurations, disable all Coral features.

When using Coral, you can specify reference configurations through use keyword, and then add individual features according to your own needs.

```properties
use=empty
feature.xxx=true
```

### Translation and style

Most of Coral features require to display text information to players, and you can modify the language of text through configuration file.

```properties
language=en_us
```

Currently, Coral supports Simplified Chinese and English, default with English.

| Lanugage | Code |
|:----:|:-----:|
| Simplified Chinese | zh_cn |
| English | en_us |

If you are not satisfied with the language support, you can customize the language file.

```properties
language=zh_cn
language.path=config/lang.json
```

The above configuration will prioritize reading text information from config/lang.json. If it does not exist in the file, the default text will be read. Coral's default language file can be found in [sources](https://github.com/UnknownBuild/Coral/tree/master/src/main/resources/assets/coral/lang).

Coral uses the same style schema for different languages. If you are not satisfied with the default style, you can customize the style file.

```properties
style.path=config/style.json
```

Coral's default style file can be found in [sources](https://github.com/UnknownBuild/Coral/tree/master/src/main/resources/assets/coral/style.json).

## Command supports

### here

I am here. Give players their own highlight effect and broadcast their location to the world.

```
/here
```

This command only works on dedicated server or LAN mode, not support for single player mode.

| Configuration Item | Type | Default Value | Description |
|-----------------------|-----|------|-----------|
| command.here | boolean | true | enable this command |
| command.here.duration | integer | 30 | higlight effect duration (seconds) |

### player

Enhances player command, provides richer querying features.

After enables this feature, the server will create file coral_player.data in folder world/data. This file is used to store player online information and is only used to query command. Even if the file is deleted, it will not affect gaming.

```
/player list # List current online players, same as /list uuids, but supports clicks to copy uuid
/player listall # List all player on this server, some player's names will not be display
```

listall command requires the executing player to have level 3 or higher permissions.

| Configuration Item | Type | Default Value | Description |
|----------------|-----|------|---------|
| command.player | boolean | true | enable this command |

### wru

Where are you? Ask about player's location.

```
/wru <player>
```

This command only works on dedicated server or LAN mode, not support for single player mode.

| Configuration Item | Type | Default Value | Description |
|-------------|-----|------|---------|
| command.wru | boolean | true | enable this command |

## Feature supports

### call_sleep

Sleep now. When a player enters sleep status, broadcast a sleep request to the world to prompt other players to sleep.

This command only works on dedicated server or LAN mode, not support for single player mode.

| Configuration Item | Type | Default Value | Description |
|--------------------|-----|------|---------|
| feature.call_sleep | boolean | true | enable this feature |

### death_info

Come and pick up your things. When a player dies, broadcast the death location to the world.

This command works on all modes.

| Configuration Item | Type | Default Value | Description |
|--------------------|-----|------|---------|
| feature.death_info | boolean | true | enable this feature |
Loading