Skip to content

Commit

Permalink
reset: to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Dec 23, 2023
1 parent f831481 commit a0f8e50
Show file tree
Hide file tree
Showing 209 changed files with 346 additions and 176,009 deletions.
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
Empty file modified .github/images/better-fake-player.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/better-info.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/chat-style.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/death-log.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/display.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/download.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/main-stats.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/multi-obsidian-platform.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/pvp-toggle.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/resource-world.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/teleport-warmup.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/top-chunks.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/tpa.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified .github/images/works.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
159 changes: 136 additions & 23 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# SakuraWald-Fabric
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/src/main/resources/assets/sakurawald/icon.png" width="128" alt="mod icon">
# Fuji
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/src/main/resources/assets/fuji/icon.png" width="128" alt="mod icon">

This is a minecraft mod that provides many essential and useful modules for vanilla survival.
Fuji is a minecraft mod that provides many essential and useful modules for vanilla survival.

> This is a **server-side only** mod, but you can use it in a **single-player world**. (Yes, the single-player world also includes a logic-server)
> - For a server-maintainer: You only need to install this mod at the server-side, and the players don't need to install this mod at their client-side
> - For a player: You only need to install this mod at the client-side, and then you can use the modules in your single-player world.
# Feature
1. **Vanilla-Respect**: all the modules do the least change to the vanilla game (Never touch the game-logic).
Expand All @@ -12,15 +16,18 @@ This is a minecraft mod that provides many essential and useful modules for vani

# Modules

> _**By default, all the modules are disabled, and this mod does nothing to the vanilla game.**_
_**By default, all the modules are disabled, and this mod does nothing to the vanilla minecraft.**_

<details>
<summary>Click here to display all the modules</summary>

#### PvpModule
provides a command to toggle the pvp status. (/pvp [on/off/status/list])
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/pvp-toggle.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/pvp-toggle.gif" alt="module presentation gif">

#### ResourceWorldModule
create and manage auto-reset resource world for overworld, the_nether and the_end. (/rw [tp/delete/reset])
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/resource-world.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/resource-world.gif" alt="module presentation gif">

#### ChatModule
A simple chat system.
Expand All @@ -37,12 +44,12 @@ A simple chat system.
> - Insert "ender" -> enderchest display
> - Support MainStats placeholders
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/chat-style.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/display.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/chat-style.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/display.gif" alt="module presentation gif">

#### TopChunksModule
Provides a command /chunks to show the most laggy chunks in the server.
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/top-chunks.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/top-chunks.gif" alt="module presentation gif">

#### BetterFakePlayerModule
(Carpet required) provides some management for fake-player.
Expand All @@ -56,41 +63,42 @@ Provides a command /chunks to show the most laggy chunks in the server.
> - Every fake-player only lives for 12 hrs until you renew it (This avoids the fake-player to be a long-term laggy entity)
> - Type `/player renew` to renew the fake-player
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/better-fake-player.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/better-fake-player.gif" alt="module presentation gif">

#### BetterInfoModule
(Carpet required) provides /info entity and add nbt-query for /info block
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/better-info.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/better-info.gif" alt="module presentation gif">

#### TeleportWarmupModule
provides a teleport warmup for all player-teleport to avoid the abuse of teleport (Including damage-cancel, combat-cancel, distance-cancel).
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/teleport-warmup.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/teleport-warmup.gif" alt="module presentation gif">

#### SkinModule
provides /skin command, and even an option to use local random-skin for fake-player (This fixes a laggy operation when spawning new fake-player and fetching the skin from mojang server).

#### DeathLogModule
provides /deathlog command, which can log and restore the death-log for all players.
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/death-log.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/death-log.gif" alt="module presentation gif">

#### BackModule
provides /back command (Support smart-ignore by distance).

#### TpaModule
provides /tpa and /tpahere (Full gui support, and easy to understand messages).
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/tpa.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/tpa.gif" alt="module presentation gif">

#### WorksModule
provides /works command, some bit like /warp but this module provides a very powerful hopper and minecart-hopper counter for every technical player to sample their contraption.
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/works.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/works.gif" alt="module presentation gif">

#### WorldDownloaderModule
provides /download command for every player who wants to download the nearby chunks around him. (Including rate-limit and attack-protection. This command is safe to use, because everytime the command will copy the original-region-file into a temp-file, and only send the temp-file, which does nothing to the original-region-file)
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/download.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/download.gif" alt="module presentation gif">

#### MainStatsModule
This module sums up some basic stats, like: total_playtime, total_mined, total_placed, total_killed and total_moved (We call these 5 stats `MainStats`). You can use these placeholders in ChatStyleModule and DynamicMOTDModule
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/main-stats.gif" alt="module presentation gif">
This module sums up some basic stats, like: total_playtime, total_mined, total_placed, total_killed and total_moved (We call these 5 stats `MainStats`). You can use these placeholders in ChatStyleModule and MOTDModule

<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/main-stats.gif" alt="module presentation gif">

#### NewbieWelcomeModule
This module broadcasts a welcome-message and random teleport the new player and sets its respawn location.
Expand All @@ -100,6 +108,7 @@ Yeah, you know what this module does. (Use this module to avoid some heavy-comma

#### MotdModule
A simple MOTD that supports fancy and random motd, and supports some placeholders like MainStats
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/motd.gif" alt="module presentation gif">

#### HeadModule
provides /head command to buy player heads.
Expand All @@ -125,9 +134,9 @@ provides options to bypass some annoyed things.
#### OpProtectModule
auto deop an op-player when he leaves the server.

#### MultiObsidianPlatform
#### MultiObsidianPlatformModule
makes every EnderPortal generate its own Obsidian Platform (Up to 128 in survival-mode, you can even use creative-mode to build more Ender Portal and more ObsidianPlatform. Please note that: all the obsidian-platform are vanilla-respect, which means they have the SAME chunk-layout and the SAME behaviour as vanilla obsidian-platform which locates in (100,50,0))
<img src="https://github.com/SakuraWald/sakurawald-fabric/raw/master/.github/images/multi-obsidian-platform.gif" alt="module presentation gif">
<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/multi-obsidian-platform.gif" alt="module presentation gif">

#### StrongerPlayerListModule
a fix patch for ServerWorld#PlayerList, to avoid CME in player-list (e.g. sometimes tick-entity and tick-block-entity will randomly crash the server because of player-list CME)
Expand Down Expand Up @@ -158,7 +167,7 @@ where you can add schedule jobs by cron expression, set the random command-list
> If `left_trigger_times` < 0, then it means infinity times.
#### ConfigModule
provides `/sakurawald reload` to reload configs.
provides `/fuji reload` to reload configs.

#### TestModule
provides `/test` command only for test purpose. (Disable this by default, and you don't need to enable this unless you know what you are doing)
Expand Down Expand Up @@ -191,7 +200,7 @@ provides `/afk` command to set your afk status and auto-afk
#### SuicideModule
provides `/suicide` command.

#### CommandInteractive
#### CommandInteractiveModule
provides interactive sign command. You can insert `//` plus commands in any sign, and then right-click it to execute the command quickly.

- If the sign contains `//`, then you must press `shift` to edit this sign
Expand All @@ -202,8 +211,66 @@ provides interactive sign command. You can insert `//` plus commands in any sign
#### SeenModule
provides `/seen` command.

#### MoreModule
provides `/more` command.

#### ExtinguishModule
provides `/extinguish` command.

#### HomeModule
provides `/home` command.

#### PingModule
provides `/ping` command.

#### SystemMessageModule
This module hijacks the vanilla system-message so that you can modify any system-message you want.
(Actually, you can hijack almost all the language messages in the vanilla `en_us.json` language file)
The system messages including:
- Player join and leave server message
- Player advancement message
- Player death message
- Player command feedback
- Player white-list message
- ...

<img src="https://github.com/SakuraWald/fuji-fabric/raw/1.20.2/.github/images/system_message.gif" alt="module presentation gif">

#### EnderChestModule
provides `/enderchest` command.

#### WorkbenchModule
provides `/workbench` command.

#### EnchantmentModule
provides `/enchantment` command.

#### GrindStoneModule
provides `/grindstone` command.

#### StoneCutterModule
provides `/stonecutter` command.

#### AnvilModule
provides `/anvil` command.

#### BedModule
provides `/bed` command.

</details>

# Config
All the config files are inside `config/sakurawald/` directory.

### What is the format of config files?
To make the config files more `readable` and `transparent`, we use `.json` as the config file format.
We try our best to avoid the usage of `.dat` format
(The vanilla minecraft data file format which needs an NBTExplorer to view and edit).

### Where are the config files?
All the config files are inside `config/fuji/` directory so
that you don't need to find out where the config files are.

### How to update to a newer version?
Normally, the newer version will generate missing configuration keys automatically, but if this doesn't work, you can delete the old config file and restart the server to let the newer version generate the default config file.

# Permission
Expand All @@ -218,3 +285,49 @@ For JVM, we recommended GraalVM, which performs better than OpenJDK.
> Here are the JVM arguments we optimized for GraalVM (Reference from papermc and graalvm manual):
>
> java -Xms16G -Xmx16G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:+UseLargePages -XX:+UseTransparentHugePages -XX:+EnableDynamicAgentLoading -Djava.io.tmpdir=/tmp -jar server.jar --nogui
# Diagnosis
By default, this mod will output its `debug messages` into `logs/debug.log` so that you can know what this mod is doing.
You can add `-Dfuji.level="INFO"` to change the logger level.

# Build from source
This mod is written on linux environment, but there are no native-method calls, so you can compile it on any platform.

Clone the source:
```shell
$ git clone https://github.com/SakuraWald/fuji-fabric.git
```
Change the working-directory:
```shell
$ cd fuji-fabric
```
Compile the source:
```shell
$ ./gradlew build
```

# FAQ
### What is `cron expression`?

Cron expression is an easy and powerful language used to define when a job should be triggered.
You can learn more and generate a cron expression from the generator: https://www.freeformatter.com/cron-expression-generator-quartz.html

### This mod failed to mixin the server at server-startup stage, what should I do?

This mod need `fabric-api` mod to work, so make sure you have installed `fabric-api` mod.

Before you enable `BetterFakePlayerModule`, you need to install `carpet` mod.

Before you enable `ProfilerMoudle`, you need to install `spark` mod.

### How can I report bugs or suggest new features?

You can create an issue at the project's `github` page.

# Thanks
At the early stage of this project, we reference some source and ideas from the following projects:
1. https://www.zrips.net/cmi/
2. https://essentialsx.net/
3. https://modrinth.com/mod/essential-commands
4. https://modrinth.com/mod/skinrestorer
5. https://modrinth.com/mod/headindex
13 changes: 9 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.google.gson.JsonParser

plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish'
Expand All @@ -24,9 +26,9 @@ loom {
// fix: adventure mod error in runServer()
// splitEnvironmentSourceSets()

accessWidenerPath = file("src/main/resources/sakurawald.accesswidener")
accessWidenerPath = file("src/main/resources/fuji.accesswidener")
mods {
"sakurawald" {
"fuji" {
sourceSet sourceSets.main
}
}
Expand Down Expand Up @@ -61,7 +63,6 @@ dependencies {
include(implementation "net.kyori:adventure-text-serializer-plain:${project.adventure_api_version}")

include(implementation group: 'org.apache.commons', name: 'commons-compress', version: "${project.apache_commons_compression_version}")

include(implementation group: 'commons-io', name: 'commons-io', version: "${project.apache_commons_io_version}")

include(implementation group: 'org.quartz-scheduler', name: 'quartz', version: "${project.quartz_version}")
Expand Down Expand Up @@ -123,7 +124,7 @@ modrinth {
versionNumber = "$mod_version"
versionType = "release"
uploadFile = remapJar
gameVersions = ["1.20.1"]
gameVersions = ["1.20.2"]
loaders = ["fabric"]
dependencies {
required.project "fabric-api"
Expand All @@ -133,3 +134,7 @@ modrinth {
syncBodyFrom = rootProject.file("README.md").text
}
tasks.modrinth.dependsOn(tasks.modrinthSyncBody)
tasks.register('replaceReadme') {
// todo
}
tasks.modrinthSyncBody.dependsOn(tasks.replaceReadme)
Empty file modified clean-gradle-cache.sh
100644 → 100755
Empty file.
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ org.gradle.parallel=true
# Fabric Properties
minecraft_version=1.20.1
loader_version=0.14.22
fabric_version=0.87.0+1.20.1

# Mod Properties
mod_version=1.0.9
maven_group=fun.sakurawald
archives_base_name=sakurawald
mod_version=1.1.8
maven_group=io.github.sakurawald
archives_base_name=fuji

# Dependencies
fabric_version=0.87.0+1.20.1
mixin_extras_version=0.2.0-beta.8
fabric_permissions_version=0.2-SNAPSHOT
carpet_core_version=1.20-1.4.112+v230608
gson_version=2.10.1
lombok_version=1.18.30
sgui_version=1.2.2+1.20
adventure_api_version=4.14.0

spark_version=0.1-SNAPSHOT
adventure_platform_fabric_version=5.9.0
sgui_version=1.2.2+1.20
fabric_permissions_version=0.2-SNAPSHOT
mixin_extras_version=0.2.0-beta.8
apache_commons_compression_version=1.24.0
apache_commons_io_version=2.14.0
spark_version=0.1-SNAPSHOT
gson_version=2.10.1
lombok_version=1.18.30
quartz_version=2.5.0-rc1
reflections_version=0.10.2
javaassist_version=3.29.2-GA

javaassist_version=3.29.2-GA
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Empty file.
6 changes: 0 additions & 6 deletions src/main/java/assets/sakurawald/Cat.java

This file was deleted.

40 changes: 0 additions & 40 deletions src/main/java/io/github/sakurawald/ServerMain.java

This file was deleted.

Loading

0 comments on commit a0f8e50

Please sign in to comment.