9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

[ci skip] Update docs (#66)

This commit is contained in:
XIAYM
2023-07-20 22:36:59 +08:00
committed by GitHub
parent 862338184b
commit 213617658f
4 changed files with 125 additions and 57 deletions

View File

@@ -3,4 +3,72 @@ Contributing to Leaves
**English** | [中文](https://github.com/LeavesMC/Leaves/blob/master/docs/CONTRIBUTING_cn.md)
TODO
We're glad that you want to contribute to our project!
In general, our review of pull requests is very lenient.
And if you can follow the rules below, we can complete the review faster.
## Please fork using your personal account
We regularly merge existing PRs.
If there're some small problems, we'll help you solve them by editing your PR.
But, if your PR is from a organization, we can NOT edit your PR, so we must merge your PR manually.
So, don't use orgnization accounts for fork!
See also [This issue](https://github.com/isaacs/github/issues/1681), and then you'll know why we can't edit PRs from organizations.
## Development Environment
Before coding, you need these softwares / tools as Dev Environment.
- `git`
- `JDK 17 or higher`
- We used Gradle's toolchains, so you can build Leaves using JRE 8. (When Gradle can't find JDK 17, it will download it automatically.)
If you're using Windows Operating System, you can use `WSL` to speed up building.
## Understanding "Patches"
Leaves uses as the same patching system as Paper,
and has been divided into two directories for the purpose of modifying different parts of it:
- `leaves-api` - Modifications to `Paper-API` / `Spigot-API` / `Bukkit`.
- `leaves-server` - Modifications to `Paper` / `Spigot` / `CraftBukkit`.
The patching system is based on git, and you can learn about it at here: <https://git-scm.com/docs/gittutorial>
If you have forked the main repository, then you should follow the steps below:
1. Clone your repository to local
2. Run Gradle's `applyPatches` task in your IDE or terminal (You can run `./gradlew applyPatches` directly in terminal.)
3. Enter `leaves-api` or `leaves-server` directory to carry out modifications.
BTW, `leaves-api` and `leaves-server` are not normal git repositories.
- Before applying patches, the base will point to unmodified source code.
- Every commit after the base is a patch.
- Only commits after the last commit of Paper will be considered Leaves' patches.
## Adding new patches
It's very easy to to add patches by following the steps below:
1. Modify the code of `leaves-api` and / or `leaves-server`
2. Add these changes to the local git repository (For example, `git add .`)
3. Commit these changes using `git commit -m <Commit Message>`
4. Run Gradle's task `rebuildPatches` to convert your commits to a new patch
5. Push your patches to your repository
After pushing, you can open a PR to submit your patches.
## Modifying patches
You can modify a existing patch by following the steps below:
1. Modify code at HEAD
2. Run `git commit -a --fixup <hash>` in your terminal to make a fix-up commit
- If you want to edit the commit message, replace `--fixup` with `--squash`.
3. Run `git rebase -i --autosquash base` to rebase automatically, then just type `:q` to close the confirm page
4. Run Gradle's task `rebuildPatches` to modify existing patches
5. Push and PR again

View File

@@ -3,70 +3,69 @@ Contributing to Leaves
[English](https://github.com/LeavesMC/Leaves/blob/master/docs/CONTRIBUTING.md) | **中文**
我们很开心您想为我们的项目做出共享。一般来说我们对PR的审核是十分宽松的
我们很开心您想为我们的项目做出贡献一般来说我们对PR的审核是十分宽松的
但是如果您可以遵守下列的规则,我们可以更快地完成审核。
## 使用个人账户进行fork
## 使用个人账户进行 Fork
我们会定期尝试合并已有的 PR如果有一些小问题会尝试帮您解决这些问题。
但是如果您使用了组织账号进行PR我们就不能对您的PR进行修改了。因此我们只能关闭你的PR然后进行手动合并
但是如果您使用了组织账号进行 PR我们就不能对您的 PR 进行修改了。因此我们只能关闭你的PR然后进行手动合并
所以,请不要使用组织账号进行fork
所以,请不要使用组织账号进行 Fork
您可以看看 [这个](https://github.com/isaacs/github/issues/1681) 来了解一下我们为什么无法修改组织账号的PR
您可以看看 [这个 Issue](https://github.com/isaacs/github/issues/1681) 来了解一下我们为什么无法修改组织账号的 PR
## 开发环境
在开始开发之前,您首先需要拥有以下软件作为开发环境
在开始开发之前,您首先需要拥有以下软件作为开发环境
- `git`
- Java17或更高版本的JDK
- 我们使用了Gradle的Toolchains这让你可以使用JRE8就进行构建。(Gradle在找不到JDK17的时候会自动下载)
- `JDK 17 或更高版本`
- 我们使用了 Gradle 的工具链,这让你可以使用 JRE 8 就进行构建。(Gradle 在找不到 JDK 17会自动下载)
如果你使用Windows系统进行开发那么你可以使用WSL来加速构建
如果你使用 Windows 系统进行开发,那么你可以使用 `WSL` 来加速构建
## 了解补丁
## 了解补丁Patches
Leaves使用和Paper一样的补丁系统并为了针对不同部分的修改分成了两个目录
Leaves 使用和 Paper 一样的补丁系统,并为了针对不同部分的修改分成了两个目录
- `leaves-api` - 对 `Paper-API`/`Spigot-API`/`Bukkit` 进行的修改
- `leaves-server` - 对 `Paper`/`Spigot`/`CraftBukkit` 进行的修改
- `leaves-api` - 对 `Paper-API` / `Spigot-API` / `Bukkit` 进行的修改
- `leaves-server` - 对 `Paper`/ `Spigot` / `CraftBukkit` 进行的修改
补丁系统是基于git的你可以在这里了解git的基本内容 <https://git-scm.com/docs/gittutorial>
补丁系统是基于 git 的,你可以在这里了解 git 的基本内容: <https://git-scm.com/docs/gittutorial>
如果你已经fork了主储存库那么下面你应该这么做
如果你已经 Fork 了主储存库,那么下面你应该这么做
1. 将你的仓库clone到本地
2. 在你的IDE终端内执行gradle`applyPatches`任务,如果是在终端内,你可以执行`./gradlew applyPatches`
3. 进入`leaves-server``leaves-api`进行修改
1. 将你的仓库 clone 到本地
2. 在你的 IDE终端 内执行 Gradle`applyPatches` 任务,如果是在终端内,你可以执行 `./gradlew applyPatches`
3. 进入 `leaves-api``leaves-server` 文件夹进行修改
`leaves-server``leaves-api`并不是正常的git仓库
By the way`leaves-api``leaves-server` 并不是正常的 git 仓库
- 在应用补丁前,基点将会指向未被更改的源码
- 在基点后的每一个提交都是一个补丁
- 只有在paper最后一个提交后的提交才会被视为leaves补丁
- 只有在 Paper 最后一个提交后的提交才会被视为 leaves 补丁
## 增加补丁
按照以下步骤增加一个补丁是非常简单的
按照以下步骤增加一个补丁是非常简单的
1.`leaves-server`或者/和`leaves-api`进行修改
2. 使用git添加你的修改比如`git add .`
3. 使用`git commit -m <提交信息>`进行提交
4. 运行gradle任务`rebuildPatches`将你的提交转化为一个补丁
5. 将你生成的补丁文件进行PR
1. `leaves-api` 或者 / 和 `leaves-server` 进行修改
2. 使用 git 添加你的修改,比如 `git add .`
3. 使用 `git commit -m <提交信息>` 进行提交
4. 运行 Gradle 任务 `rebuildPatches` 将你的提交转化为一个补丁
5. 将你生成的补丁文件进行推送。
这样做以后你就可以将你的补丁文件进行PR提交
这样做以后,你就可以将你的补丁文件进行 PR 提交
## 修改补丁
你可以使用以下方法来修改一个补丁的内容
你可以使用以下方法来修改一个补丁的内容
1. 在HEAD上直接进行修改
2. 使用`git commit -a --fixup <hash>`来进行一个更正提交
- 如果你想要更改提交信息,你也可以用`--squash`来代替`--fixup`
3. 使用`git rebase -i --autosquash base`来进行自动变基 你只需要输入`:q`来关闭确认页面即可
4. 运行gradle任务`rebuildPatches`来修改已被修改的补丁
5. 将修改后的补丁PR会次出储存库
1. HEAD 上直接进行修改
2. 使用 `git commit -a --fixup <hash>` 来进行一个更正提交
- 如果你想要更改提交信息,你也可以用 `--squash` 来代替 `--fixup`
3. 使用 `git rebase -i --autosquash base` 来进行自动变基你只需要输入 `:q` 来关闭确认页面即可
4. 运行 Gradle 任务 `rebuildPatches` 来修改已被修改的补丁
5. 将修改后的补丁 PR 发回储存库

View File

@@ -3,54 +3,55 @@ Leaves Modification
**English** | [中文](https://github.com/LeavesMC/Leaves/blob/master/docs/MODIFICATION_cn.md)
## Fix
## Fix (Makes it usable)
> All of it will don't have configuration
> All of them won't have configurations
- Gravity block duper
- Trading with the void
- Tripwire update when it being removed and not disarmed
- Tripwire updates when it being removed and not disarmed
## Modify
> All of it will have configuration
> All of them will have configuration
- Player can edit sign
- Snowball and egg can knockback player
- Fakeplayer support (like carpet) (command: /bot)
- Fakeplayer support (like carpet) (command: `/bot`, permission: `bukkit.command.bot`)
- Shears in dispenser can unlimited use
- Shears can rotate redstone equipment (like debug-stick)
- Budding Amethyst can push by piston
- Spectator don't get Advancement
- Spectators don't get Advancement
- Use stick and shift to ArmorStand can modify ArmorStand's arm status
- Remove Player Chat sign (can instead of NoChatReport Mod server side)
- Remove Player Chat sign (NoChatReport Mod server side)
- Instant BlockUpdater reintroduced
- Random flatten triangular distribution (like Carpet-TIS-Addition)
- Player operation limiter (can disable auto break bedrock mod)
- Renewable Elytra (on shulker kill phantom)
- Stackable ShulkerBox (empty)
- Player operation limiter (can make auto break bedrock mod unusable)
- Renewable Elytra (when shulker kill phantom)
- Stackable Empty Shulker Boxes
- MC Technical Survival Mode
- Return nether portal fix
- Extra Yggdrasil support
- Vanilla random
- Whether use Vanilla random
- Update suppression crash fixed
- Bedrock break list
- No feather falling trample
- Shared villager discounts
- Redstone wire dont connect if on trapdoor (as 1.20-)
- Despawn enderman with block
- Redstone wire doesn't connect if on trapdoor (as 1.20-)
- Despawn enderman with block in hand
- Creative fly no clip (need carpet mod and leaves-carpet protocol)
- Enchantment mending compatibility infinity
- Enchantment mending compatibility with infinity
- Shave snow layers
- Spawn ignore lc
- Mob spawn ignores lc
## Performance
> All of it will have configuration
> Powered by [Pufferfish](https://github.com/pufferfish-gg/Pufferfish)
- Optimize mob spawning (updating)
- Multithreaded Tracker (updating)
- Optimize mob spawning (updating, unavailable yet)
- Multithreaded Tracker (updating, unavailable yet)
- Fix Paper#6045
- Optimize entity coordinate key
- Optimize suffocation

View File

@@ -3,7 +3,7 @@ Leaves Modification
[English](https://github.com/LeavesMC/Leaves/blob/master/docs/MODIFICATION.md) | **中文**
## 修复
## 修复(使可用)
> 所有的修复内容都不会存在配置项
@@ -17,7 +17,7 @@ Leaves Modification
- 玩家可以编辑已经放置的告示牌
- 雪球和鸡蛋可以击退玩家
- 假人支持 (类似carpet) (指令为 /bot)
- 假人支持 (类似carpet) (指令为 `/bot`,权限为 `bukkit.command.bot`)
- 发射器里的剪刀可以无限使用
- 剪刀可以用来旋转红石原件 (类似调试棒)
- 紫水晶母岩可以被活塞推动