Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a8f64da64 | |||
| c4cf85160e | |||
| 49e92a5c41 | |||
| a9f3c2c291 | |||
| c619486da9 | |||
| 5cd355881a | |||
| 5a28a619b7 | |||
| 9b5f3e1bd9 | |||
| 132ee404d4 | |||
| 0e10a8e8b0 | |||
| 24e68fb203 | |||
| 141c226294 | |||
| 1049012aff | |||
| 302825cc7e | |||
| d806e4a423 | |||
| 952c4321d9 | |||
| dd7ef6701a | |||
| 43036f971c | |||
| 25ce58c40d |
@@ -35,7 +35,7 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set Up JDK
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v5.7.0
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 25
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||

|
||||
|
||||
[English](./README_EN.md) | **中文**
|
||||
[English](./README_EN.md) | **中文(简体)** | [中文(繁體)](./README_ZH_TW.md)
|
||||
</div>
|
||||
|
||||
---
|
||||
@@ -34,7 +34,6 @@
|
||||
- morninggloryclip.useMojangSource 强制服务端使用mojang源下载文件
|
||||
- morninggloryclip.enable.mixin 启用服务器插件的mixin支持
|
||||
|
||||
|
||||
## 📥 下载
|
||||
|
||||
### 稳定版本
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||

|
||||
|
||||
**English** | [中文](./README.md)
|
||||
**English** | [中文(简体)](./README.md) | [中文(繁體)](./README_ZH_TW.md)
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
<div align="center">
|
||||
<img src="./public/image/lophine/lophine3.png" alt="Lophine Logo" width="300">
|
||||
|
||||
# Lophine
|
||||
|
||||
*Lophine 是一個基於 Folia 的 fork,具備許多好用的最佳化與可設定的原版特性,目標是在 Folia 上實現更多生電向的內容(完整生電支援請使用 Fabric)*
|
||||
|
||||

|
||||
[](LICENSE.md)
|
||||
[](https://github.com/LophineLabs/Lophine/issues)
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
[English](./README_EN.md) | [中文(簡體)](./README.md) | **中文(繁體)**
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## ✨ 核心特性
|
||||
|
||||
- 🔧 **可設定的原版特性** - 彈性調整遊戲機制,以符合不同伺服器的需求
|
||||
- 📊 **Tpsbar 支援** - 即時顯示伺服器 TPS 狀態
|
||||
- 🐛 **Folia Bug 修復** - 針對 Folia 已知問題的專項修復
|
||||
- 💾 **多種存檔格式支援** - 支援 linear 與 b_linear(linear 重新實作)存檔格式
|
||||
- 🔬 **生電功能強化** - 在 Folia 上實現更多生電內容(完整生電請使用 Fabric)
|
||||
- 🛠️ **更多實用功能** - 持續新增有用的伺服器功能
|
||||
|
||||
### 額外啟動參數
|
||||
|
||||
- morninggloryclip.useMojangSource 強制伺服器端使用 Mojang 官方來源下載檔案
|
||||
- morninggloryclip.enable.mixin 為伺服器插件啟用 mixin 支援
|
||||
|
||||
## 📥 下載
|
||||
|
||||
### 穩定版本
|
||||
所有正式發布版本都可以在 [Releases](https://github.com/LophineLabs/Lophine/releases) 頁面找到。
|
||||
|
||||
### 開發版本
|
||||
如果你想搶先體驗最新功能,可以照下面的步驟自行建置。
|
||||
|
||||
### 建置步驟
|
||||
|
||||
```bash
|
||||
# Clone 這個專案
|
||||
git clone https://github.com/LophineLabs/Lophine.git
|
||||
cd Lophine
|
||||
|
||||
# 套用 patch 並建置 Paperclip JAR
|
||||
./gradlew applyAllPatches && ./gradlew createPaperclipJar
|
||||
```
|
||||
|
||||
建置完成後,你可以在 `lophine-server/build/libs` 目錄中找到產生的 JAR 檔案。
|
||||
|
||||
## 🔌 API 使用
|
||||
|
||||
### Gradle 設定
|
||||
|
||||
```kotlin
|
||||
repositories {
|
||||
maven {
|
||||
url = "https://repo.bacteriawa.com/repository/maven-public/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("fun.bm.lophine:lophine-api:26.2.build.+")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
||||
}
|
||||
```
|
||||
|
||||
### Maven 設定
|
||||
|
||||
```xml
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>repository</id>
|
||||
<url>https://repo.bacteriawa.com/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>fun.bm.lophine</groupId>
|
||||
<artifactId>lophine-api</artifactId>
|
||||
<version>[26.2.build,)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
|
||||
## 💬 社群與支援
|
||||
|
||||
> 如果你對這個專案有興趣,或有任何問題,歡迎隨時來問我們。
|
||||
|
||||
### 加入我們的社群
|
||||
|
||||
- **QQ 群**: [1020403749](https://qm.qq.com/cgi-bin/qm/qr?k=y_MA9UaN7PM9e9J1LIs9Eea3LK8C0h6J&jump_from=webapi&authKey=ap5f8MlbeezXYtnmpnT5ZOFljDuOyV6OAb2PIcViQ+Ilr60Ycq63FDDTsJOZDYtj)
|
||||
- **Discord**: [點我加入](https://discord.gg/UXSgPZczcy)
|
||||
|
||||
### 取得協助
|
||||
|
||||
- 📋 [提交 Issue](https://github.com/LophineLabs/Lophine/issues)
|
||||
- 💬 [GitHub Discussions](https://github.com/LophineLabs/Lophine/discussions)
|
||||
- 📖 [專案文件](./docs/)
|
||||
|
||||
## 🐛 問題回報
|
||||
|
||||
當你遇到任何問題時,歡迎來問我們,我們會盡力協助解決。請記得:
|
||||
|
||||
- 📝 **清楚描述問題** - 詳細說明問題的具體狀況
|
||||
- 📋 **提供完整記錄檔** - 附上錯誤記錄與相關設定資訊
|
||||
- 🔍 **環境資訊** - 說明伺服器版本、插件清單等環境細節
|
||||
- 🔄 **重現步驟** - 如果可以,請提供重現問題的具體步驟
|
||||
|
||||
## 🤝 貢獻程式碼
|
||||
|
||||
我們歡迎社群貢獻!詳細的貢獻指南請參考:
|
||||
|
||||
- 📖 [貢獻指南(English)](./docs/CONTRIBUTING_EN.md)
|
||||
- 📖 [貢獻指南(簡體中文)](./docs/CONTRIBUTING.md)
|
||||
- 📖 [貢獻指南(繁體中文)](./docs/CONTRIBUTING_ZH_TW.md)
|
||||
- 📖 [貢獻指南(日本語)](./docs/CONTRIBUTING_JP.md)
|
||||
|
||||
## 📊 專案統計
|
||||
|
||||
### BStats 資料
|
||||
|
||||

|
||||
|
||||
## ⭐ 給我們一個 Star 吧!
|
||||
|
||||
> 你給的每一個免費 ⭐Star,都是我們前進的動力。
|
||||
@@ -1,7 +1,7 @@
|
||||
为Lophine贡献代码
|
||||
===============
|
||||
|
||||
[English](./CONTRIBUTING_EN.md) | **中文**
|
||||
[English](./CONTRIBUTING_EN.md) | **中文(简体)** | [中文(繁體)](./CONTRIBUTING_ZH_TW.md) | [日本語](./CONTRIBUTING_JP.md)
|
||||
|
||||
我们很开心您想为我们的项目做出贡献!一般来说,我们对PR的审核是十分宽松的;
|
||||
但是如果您可以遵守下列的规则,我们可以更快地完成审核。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Contributing to Lophine
|
||||
=======================
|
||||
|
||||
**English** | [中文](./CONTRIBUTING.md)
|
||||
**English** | [中文(简体)](./CONTRIBUTING.md) | [中文(繁體)](./CONTRIBUTING_ZH_TW.md) | [日本語](./CONTRIBUTING_JP.md)
|
||||
|
||||
We're glad that you want to contribute to our project!
|
||||
In general, our review of pull requests is very lenient.
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
Lophine への貢献
|
||||
===============
|
||||
|
||||
[English](./CONTRIBUTING_EN.md) | [中文(簡體)](./CONTRIBUTING.md) | [中文(繁體)](./CONTRIBUTING_ZH_TW.md) | **日本語**
|
||||
|
||||
Lophine プロジェクトに貢献していただき、ありがとうございます!一般的に、PR(プルリクエスト)のレビュー基準は比較的緩やかです。
|
||||
以下のルールに従っていただければ、よりスムーズにレビューを進めることができます。
|
||||
|
||||
## 個人アカウントでフォークしてください
|
||||
|
||||
定期的に既存の PR をマージしています。軽微な問題であれば、こちらで直接修正したうえでマージする場合があります。
|
||||
|
||||
しかし、組織(Organization)アカウントでフォークしたリポジトリから作成された PR の場合、直接変更を加えることができないため、一度クローズしてから手動で再マージする必要が生じます。
|
||||
|
||||
そのため、**組織アカウントを使用してこのプロジェクトをフォークしないでください**。
|
||||
|
||||
組織アカウントの PR に直接変更を加えられない理由については、[こちらの Issue](https://github.com/isaacs/github/issues/1681) をご参照ください。
|
||||
|
||||
## 開発環境
|
||||
|
||||
コードを書き始める前に、以下の開発ツールと環境を準備する必要があります。
|
||||
|
||||
- `git`
|
||||
- `JDK 25` またはそれ以降のバージョン
|
||||
|
||||
注意: 作業を開始する前に、OS および Git で長いパス(Long Path)のサポートを有効にしてください。一部のプラットフォームの設定手順は以下をご参照ください。
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## パッチ(Patch)システムについて
|
||||
|
||||
Lophine は Folia と同じパッチシステムを採用しており、修正箇所に応じて以下の 2 つのディレクトリに分かれています。
|
||||
|
||||
- `lophine-api` - `Folia-API` / `Paper-API` / `Spigot-API` / `Bukkit-API` をベースにした修正。
|
||||
- `lophine-server` - Minecraft のバニラサーバーの既存ロジックに対する修正。
|
||||
|
||||
このパッチシステムは Git をベースに動作します。Git の基本操作についてはこちらをご覧ください:<https://git-scm.com/docs/gittutorial>
|
||||
|
||||
メインのリポジトリをフォークしたら、以下の手順に従って操作してください:
|
||||
|
||||
1. フォークしたリポジトリをローカルにクローンします。
|
||||
2. お使いの IDE またはターミナルで Gradle の `applyAllPatches` タスクを実行します。ターミナルで行う場合は、直接 `./gradlew applyAllPatches` を実行できます。
|
||||
3. 実行が完了すると、リポジトリのルートディレクトリに `lophine-api` と `lophine-server`、`folia-api` と `folia-server`、`paper-api` と `paper-server` の各ディレクトリが生成されます。
|
||||
4. リポジトリのルートディレクトリ下にある対応する `*-api` と `*-server` フォルダに移動し、そこで修正を行います。
|
||||
|
||||
上記各フォルダの簡単な説明は以下の通りです。より詳細な説明は[こちら](https://github.com/Toffikk/paperweight-examples/blob/18241979c88068d5b061d95ad69c98ecb201c246/README.md)をご参照ください:
|
||||
|
||||
1. API 部分
|
||||
|
||||
- `lophine-api`:新規 API の追加や変更はここで行ってください。
|
||||
- `folia-api`:Folia API に対する修正はここで行ってください。
|
||||
- `paper-api`:Paper API / Spigot API / Bukkit API に対する修正はここで行ってください。
|
||||
|
||||
2. Server 部分
|
||||
|
||||
- `lophine-server`:Minecraft のバニラサーバーに対する修正、および新規作成したファイルはすべてこのフォルダに配置してください。
|
||||
- `folia-server`:Folia Server に対する修正はここで行ってください。
|
||||
- `paper-server`:Paper サーバーのロジックに基づく修正はここで行ってください。
|
||||
|
||||
なお、リポジトリのルートディレクトリにある `*-api` と `*-server` は通常の Git リポジトリではありません:
|
||||
|
||||
- パッチを適用する前は、ベース(Base)は未修正のソースコードを指しています。
|
||||
- ベース以降のすべてのコミットが、1 つのパッチとして扱われます。
|
||||
- Folia の最後のコミット以降に追加されたコミットのみが、Lophine のパッチとして扱われます。
|
||||
|
||||
## 新規パッチの追加
|
||||
|
||||
新しいパッチを追加するのは非常に簡単です。以下の手順に従ってください:
|
||||
|
||||
1. `*-api` と `*-server` 内でコードを変更します。
|
||||
2. Git を使用して変更をステージングエリアに追加します(例:`git add .`。新しく作成したファイルを同時に追加しないでください)。
|
||||
3. `git commit -m <コミットメッセージ>` を実行してコミットします。
|
||||
4. Gradle タスク `fixupPaperApiFilePatches` を実行し、新しく作成されたファイルに対応するパッチファイルを生成します(注意:実行が完了する前にコミットしないでください)。
|
||||
5. Gradle タスク `rebuildAllServerPatches` を実行し、コミットをパッチに変換します。
|
||||
6. 生成されたパッチファイルを Git にコミットし、プッシュします。
|
||||
|
||||
上記の手順が完了したら、これらのパッチファイルを元に PR を作成して提出できます。
|
||||
|
||||
## パッチの修正
|
||||
|
||||
既存のパッチを修正する場合は、以下の手順に従ってください:
|
||||
|
||||
1. HEAD で直接修正を行います。
|
||||
2. `git commit -a --fixup <hash>` を実行して、fixup コミットを作成します(Lophine で新しく作成したファイルの変更を一緒にコミットしないでください)。
|
||||
- コミットメッセージも同時に変更したい場合は、`--fixup` の代わりに `--squash` を使用してください。
|
||||
3. `git rebase -i --autosquash base` を実行して、fixup コミットを自動的にまとめます。エディタが開いたら、`:q` と入力して終了します。
|
||||
4. Gradle タスク `fixupPaperApiFilePatches` を実行し、Lophine で新しく作成したファイルのパッチを再生成します(注意:実行が完了する前にコミットしないでください)。
|
||||
5. Gradle タスク `rebuildAllServerPatches` を実行し、修正を既存のパッチに反映させます。
|
||||
6. 修正したパッチを再度プッシュし、PR を更新します。
|
||||
|
||||
## 設定項目に対するローカライズされたコメントサポートの提供
|
||||
|
||||
1. `lophine-server/src/main/resources/assets/lophine/lang` ディレクトリ下に、対応する言語のファイルを作成または修正し、各言語に対応したコメントを追加します。
|
||||
- ファイル名は <https://minecraft.wiki/w/Language> ページに記載されている言語コード(例:`en_us`、`zh_cn`、`zh_hk`、`zh_tw`、`ja_jp` など)に従って命名してください。ファイル形式は `json` です。
|
||||
2. Gradle タスク `sortLangKeys` を実行し、修正した言語ファイルのキーの内容を並べ替えます。
|
||||
3. `git commit -m <コミットメッセージ>` を実行してコミットします。
|
||||
4. 修正したファイルをプッシュします。
|
||||
|
||||
上記の手順が完了したら、修正した内容を元に PR を作成して提出できます。
|
||||
@@ -0,0 +1,100 @@
|
||||
為 Lophine 貢獻程式碼
|
||||
===============
|
||||
|
||||
[English](./CONTRIBUTING_EN.md) | [中文(簡體)](./CONTRIBUTING.md) | **中文(繁體)** | [日本語](./CONTRIBUTING_JP.md)
|
||||
|
||||
很高興你願意為這個專案貢獻!一般來說,我們對 PR 的審核標準相當寬鬆;
|
||||
如果你可以照著下面的規則來,我們就能更快完成審核。
|
||||
|
||||
## 請使用個人帳號進行 Fork
|
||||
|
||||
我們會定期嘗試合併現有的 PR,如果內容有一些小問題,我們會直接幫你修改後合併。
|
||||
|
||||
但如果你的 PR 是用組織(organization)帳號 fork 出來的,我們就沒辦法直接修改你的 PR,只能先關閉、再手動合併一次。
|
||||
|
||||
所以,請不要用組織帳號來 fork 這個專案!
|
||||
|
||||
你可以參考[這個 Issue](https://github.com/isaacs/github/issues/1681),了解為什麼我們沒辦法直接修改組織帳號的 PR。
|
||||
|
||||
## 開發環境
|
||||
|
||||
在開始寫程式之前,你需要先準備好以下開發工具與環境:
|
||||
|
||||
- `git`
|
||||
- `JDK 25` 或更新版本
|
||||
|
||||
特別提醒:動手之前,請先在你的作業系統與 Git 裡啟用長路徑(long path)支援,以下是部分平台的設定說明。
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## 認識 Patch(補丁)系統
|
||||
|
||||
Lophine 沿用了和 Folia 相同的 patch 系統,並依照修改的部分分成了兩個目錄:
|
||||
|
||||
- `lophine-api` - 基於 `Folia-API` / `Paper-API` / `Spigot-API` / `Bukkit-API` 所做出的修改。
|
||||
- `lophine-server` - 針對 Minecraft 原版伺服器既有邏輯所做的修改。
|
||||
|
||||
這套 patch 系統是以 git 為基礎運作的,你可以在這裡了解 git 的基本操作:<https://git-scm.com/docs/gittutorial>
|
||||
|
||||
如果你已經 fork 了主要的 repository,接下來請照以下步驟操作:
|
||||
|
||||
1. 把你 fork 出來的 repository clone 到本機;
|
||||
2. 在你的 IDE 或終端機(terminal)裡執行 Gradle 的 `applyAllPatches` 任務;如果是在終端機裡,可以直接執行 `./gradlew applyAllPatches`;
|
||||
3. 執行完成後,repository 的根目錄下應該會出現以下幾組目錄: `lophine-api` 與 `lophine-server`、`folia-api` 與 `folia-server` 以及 `paper-api` 與 `paper-server`(以下統稱為 `*-api` 與 `*-server`);
|
||||
4. 進入 repository 根目錄下對應的 `*-api` 與 `*-server` 資料夾,在裡面進行修改。
|
||||
|
||||
以下是對上述各個資料夾的簡單說明,更詳細的說明可以參考[這裡](https://github.com/Toffikk/paperweight-examples/blob/18241979c88068d5b061d95ad69c98ecb201c246/README.md):
|
||||
|
||||
1. API 部分
|
||||
|
||||
- `lophine-api`:新增 API 的修改請放在這裡
|
||||
- `folia-api`:針對 Folia API 的修改請放在這個資料夾
|
||||
- `paper-api`:對於 Paper API / Spigot API / Bukkit API 的修改請放在這個資料夾
|
||||
|
||||
2. Server 部分
|
||||
|
||||
- `lophine-server`:針對 Minecraft 原版伺服器的修改、以及新增的檔案,都請放在這個資料夾
|
||||
- `folia-server`:針對 folia-server 的修改請放在這個資料夾
|
||||
- `paper-server`:根據 Paper 伺服器邏輯的修改請放在這個資料夾
|
||||
|
||||
順帶一提,repository 根目錄下的 `*-api` 與 `*-server` 並不是一般的 git repository:
|
||||
|
||||
- 在套用 patch 之前,base(基準點)指向的是未經修改的原始程式碼;
|
||||
- base 之後的每一個 commit,都會被視為一個 patch;
|
||||
- 只有在 Folia 最後一個 commit 之後的 commit,才會被視為是 Lophine 的 patch。
|
||||
|
||||
## 新增 Patch
|
||||
|
||||
依照以下步驟新增一個 patch 非常簡單:
|
||||
|
||||
1. 在 `*-api` 與 `*-server` 裡進行修改;
|
||||
2. 用 git 把你的修改加入暫存區,例如執行 `git add .`(請不要把新建立的檔案一併加入);
|
||||
3. 執行 `git commit -m <提交訊息>` 進行 commit;
|
||||
4. 執行 Gradle 任務 `fixupPaperApiFilePatches`,用於新建立的檔案產生對應的 patch 檔(注意:執行完之前先不要 commit);
|
||||
5. 執行 Gradle 任務 `rebuildAllServerPatches`,用於把你的 commit 轉換成一個 patch;
|
||||
6. 把產生出來的 patch 檔 push 上去。
|
||||
|
||||
完成以上步驟後,你就可以拿這些 patch 檔開 PR 提交了。
|
||||
|
||||
## 修改 Patch
|
||||
|
||||
你可以用以下方法來修改一個既有 patch 的內容:
|
||||
|
||||
1. 直接在 HEAD 上進行修改;
|
||||
2. 執行 `git commit -a --fixup <hash>` ,做一個 fixup commit(請不要把 Lophine 新建立的檔案的修改一併 commit 進去);
|
||||
- 如果你想順便修改 commit 訊息,可以用 `--squash` 取代 `--fixup`。
|
||||
3. 執行 `git rebase -i --autosquash base` ,進行自動 rebase,接著只要輸入 `:q` 關掉確認頁面即可;
|
||||
4. 執行 Gradle 任務 `fixupPaperApiFilePatches`,用於重新產生 Lophine 新建立檔案的 patch(注意:執行完之前先不要 commit);
|
||||
5. 執行 Gradle 任務 `rebuildAllServerPatches`,把修改套用到既有的 patch 上;
|
||||
6. 把修改後的 patch 重新 push 回去,再開一次 PR。
|
||||
|
||||
## 為設定項目提供本地化的注解支援
|
||||
|
||||
1. 在 `lophine-server/src/main/resources/assets/lophine/lang` 目錄下新增或修改對應語言的檔案,加入本地化的注解;
|
||||
- 檔名請依照 <https://minecraft.wiki/w/Language> 頁面上列出的語言代碼來命名,例如 `en_us`、`zh_cn`、`zh_hk`、`zh_tw`,檔案格式為 `json`;
|
||||
2. 執行 Gradle 任務 `sortLangKeys`,把你修改的語言檔內容重新排序;
|
||||
3. 執行 `git commit -m <提交訊息>` 進行 commit;
|
||||
4. 把你修改的檔案 push 上去。
|
||||
|
||||
完成以上步驟後,你就可以拿修改後的內容開 PR 提交了。
|
||||
+1
-1
@@ -9,7 +9,7 @@ release=true
|
||||
# true for push to repo, false for skip push repo, auto for detect by release value
|
||||
pushRepo=auto
|
||||
|
||||
foliaRef=e48800d446d2bdeb24a8d31d671554440687e846
|
||||
foliaRef=24c5c95dc45e02caff98a97ed6ffee7565523464
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/folia-api/build.gradle.kts
|
||||
+++ b/folia-api/build.gradle.kts
|
||||
@@ -53,6 +_,7 @@
|
||||
@@ -68,6 +_,7 @@
|
||||
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
||||
api("org.slf4j:slf4j-api:$slf4jVersion")
|
||||
api("com.mojang:brigadier:1.3.10")
|
||||
@@ -8,7 +8,16 @@
|
||||
|
||||
// Deprecate bungeecord-chat in favor of adventure
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
|
||||
@@ -105,17 +_,21 @@
|
||||
@@ -109,7 +_,7 @@
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
|
||||
|
||||
// checkstyle
|
||||
- checkstyle(project(":folia-checkstyle"))
|
||||
+ //checkstyle(project(":folia-checkstyle"))
|
||||
}
|
||||
|
||||
val generatedDir: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
|
||||
@@ -123,17 +_,21 @@
|
||||
java {
|
||||
srcDir(generatedDir)
|
||||
srcDir(file("../paper-api/src/main/java"))
|
||||
@@ -30,7 +39,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,3 +_,19 @@
|
||||
@@ -277,3 +_,19 @@
|
||||
tasks.check {
|
||||
dependsOn(scanJarForBadCalls)
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Rebrand to Lophine
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index 652ff54e7c50412503725d628bfe72ed03059790..1727ea0b873ee4f9a86cca62eac6dc3a5063b4e6 100644
|
||||
index 4e099b584c3435ba1ebce492011d35ae1ac0cdf8..ed558bea1f939ab902d3c45417573fba83307abc 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -19,6 +19,17 @@ public interface ServerBuildInfo {
|
||||
@@ -17,6 +17,17 @@ public interface ServerBuildInfo {
|
||||
*/
|
||||
Key BRAND_PAPER_ID = Key.key("papermc", "paper");
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Luminol Config System
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index fb5ca3ab0ddba433a39e65572beeb955b50d6f72..a139182704a5f147661816d08907be8a7f8f7dde 100644
|
||||
index 067d901c69a54c4b6ae5a00488f0dacc5fde7961..209d1968f4bff3b33785fd8bfbeea5ae231e581a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2776,6 +2776,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2774,6 +2774,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
||||
// Paper end - API to check if the server is sleeping
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 28 Jun 2026 16:40:49 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:25:33 +0800
|
||||
Subject: [PATCH] KioCG Chunk API
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ index d873b78f6935a23ff8f6092b80968267b182cc0f..b4323370859dd4d9e86614484cdb9d2e
|
||||
+ long getChunkHotAvg(); // KioCG
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7a719d31fbc7633a9bb87ea97338190ee3a6047a..b79b9a2ad108c0488d3cc3862f72985059bb4988 100644
|
||||
index 65e83e171ab4c514662b9344e08f7065fa9efaa1..274af6397b5f7c0b6787e2669de80e54858950a2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -4020,4 +4020,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
default ObjectContents asObjectContents() {
|
||||
return this.getPlayerProfile().asObjectContents();
|
||||
}
|
||||
@@ -4050,4 +4050,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* clearing any fixed pose in the process.
|
||||
*/
|
||||
void unsetFixedPose();
|
||||
+
|
||||
+ long getNearbyChunkHot(); // KioCG
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Tick regions api
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index c66cd17fd037b73d8ff04dd2ed328ca25e8b0f1a..b86cd3b37ec3fd63f34acd6bf17f6a91c24b5038 100644
|
||||
index bf2f7c4959f9f2cd43bbd4d4310e7eedf10cf892..bccb33456d84384bd90887822e16cbad65986106 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4708,4 +4708,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4719,4 +4719,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ As part of: Leaves (https://github.com/HyacinthHaru/Leaves/blob/90080d238e2fcfc1
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 8a24b84db656da4cec59e9bccac306467c8155b0..0ac1e049fad85de8365380b03e60d915ee643f16 100644
|
||||
index 325d797766de527268eb18bcf9db594ca3a0c519..e922a0eefb03db5e33f3306aaea558b6ed61b42a 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3046,4 +3046,10 @@ public final class Bukkit {
|
||||
@@ -3045,4 +3045,10 @@ public final class Bukkit {
|
||||
public static void restart() {
|
||||
server.restart();
|
||||
}
|
||||
@@ -23,10 +23,10 @@ index 8a24b84db656da4cec59e9bccac306467c8155b0..0ac1e049fad85de8365380b03e60d915
|
||||
+ // Leaves end - Feature API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a139182704a5f147661816d08907be8a7f8f7dde..a8c262064e4058f786c62c333130c4cac0ce4b66 100644
|
||||
index 209d1968f4bff3b33785fd8bfbeea5ae231e581a..ac19fd1b6b8e48313c79d9fb26c3df50f67b64b8 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2782,6 +2782,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2780,6 +2780,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
me.earthme.luminol.api.config.LuminolConfigBuilder getLuminolConfigBuilder();
|
||||
// Luminol end - Luminol Config API
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] World load/unload APIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a8c262064e4058f786c62c333130c4cac0ce4b66..3c92440fbef6e6970cd800e0038a625a775eda9a 100644
|
||||
index ac19fd1b6b8e48313c79d9fb26c3df50f67b64b8..c037307f926d64bac3b51a91aa61f63d0357770c 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -775,6 +775,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -8,10 +8,10 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 0ac1e049fad85de8365380b03e60d915ee643f16..a747fbe107dcc134558ca8ecfbe30e81245a5742 100644
|
||||
index e922a0eefb03db5e33f3306aaea558b6ed61b42a..7120bbea89c1c240b09562c73833f21a9980886f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3052,4 +3052,15 @@ public final class Bukkit {
|
||||
@@ -3051,4 +3051,15 @@ public final class Bukkit {
|
||||
return server.getFeatureManager();
|
||||
}
|
||||
// Leaves end - Feature API
|
||||
@@ -28,10 +28,10 @@ index 0ac1e049fad85de8365380b03e60d915ee643f16..a747fbe107dcc134558ca8ecfbe30e81
|
||||
+ // Leaves end - Bot API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3c92440fbef6e6970cd800e0038a625a775eda9a..c8fc95a85b162cc71aa8dada8f87f4fe6f5dad12 100644
|
||||
index c037307f926d64bac3b51a91aa61f63d0357770c..6c91cabdcacf7a9bf6421fbb7d52aa17516100f8 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2827,4 +2827,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2825,4 +2825,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
double @Nullable [] getRegionTPS(@NotNull World world, int chunkX, int chunkZ);
|
||||
// Folia end - region TPS API
|
||||
|
||||
@@ -8,10 +8,10 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a747fbe107dcc134558ca8ecfbe30e81245a5742..b09a90f8187a15ddaa15f231f46f51f2b1d2c1ed 100644
|
||||
index 7120bbea89c1c240b09562c73833f21a9980886f..b114df0dde2e5bede7bb2956359fdd4ca25ac3da 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3063,4 +3063,10 @@ public final class Bukkit {
|
||||
@@ -3062,4 +3062,10 @@ public final class Bukkit {
|
||||
return server.getBotManager();
|
||||
}
|
||||
// Leaves end - Bot API
|
||||
@@ -23,10 +23,10 @@ index a747fbe107dcc134558ca8ecfbe30e81245a5742..b09a90f8187a15ddaa15f231f46f51f2
|
||||
+ // Leaves end - Photographer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index c8fc95a85b162cc71aa8dada8f87f4fe6f5dad12..5e4da280f7bed1084ebc2814d23901ad072e116d 100644
|
||||
index 6c91cabdcacf7a9bf6421fbb7d52aa17516100f8..e6295c4bb86286aa893b55b77ddbfb2f63fdd05c 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2836,4 +2836,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2834,4 +2834,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull org.leavesmc.leaves.entity.bot.BotManager getBotManager();
|
||||
// Leaves end - Bot API
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
@@ -103,10 +_,14 @@
|
||||
main {
|
||||
java { srcDir("../paper-server/src/main/java"); srcDir("../paper-server/src/generated/java") }
|
||||
java { srcDir("../paper-server/src/main/java") }
|
||||
resources { srcDir("../paper-server/src/main/resources") }
|
||||
+ java { srcDir("../folia-server/src/main/java") }
|
||||
+ resources { srcDir("../folia-server/src/main/resources") }
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Wed, 12 Aug 2026 03:44:13 +0800
|
||||
Subject: [PATCH] Set Lophine logo
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/gui/MinecraftServerGui.java b/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index 79518cbca7760f710130509d93d27fb017d67159..05d17e35803adacb6efb594ad90d6254f4a1b09c 100644
|
||||
--- a/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -58,7 +58,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
// Paper start - Improve ServerGUI
|
||||
frame.setName("Minecraft server");
|
||||
try {
|
||||
- frame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("folia-logo.png"))));
|
||||
+ frame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("lophine-logo.png"))));
|
||||
} catch (java.io.IOException ignore) {
|
||||
}
|
||||
// Paper end - Improve ServerGUI
|
||||
+3
-3
@@ -5,7 +5,7 @@ Subject: [PATCH] Luminol Config System
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index e2939cc39a8c103e4c4d7b01d39b5546486e4fbc..a557d488e4e289a61aeb9aed0cc133a0a7ce8f8c 100644
|
||||
index 693ce1c23c7be6406eda22da57aa4a1b86a08f5f..4385488983a7544eb6d9193d913dc55294f4620d 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -110,6 +110,7 @@ public class Main {
|
||||
@@ -17,10 +17,10 @@ index e2939cc39a8c103e4c4d7b01d39b5546486e4fbc..a557d488e4e289a61aeb9aed0cc133a0
|
||||
Bootstrap.bootStrap();
|
||||
Bootstrap.validate();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 6f13870a1b463049dd37cf1c65d0bdecfc35b5c4..a49c46eb7df50fc3c5587a2c3668ab6edc887107 100644
|
||||
index be15a671e0b39b455cd5983f4b90f8f3022a2ebc..56d26866cb8f413684e62558e5609b273efb8552 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1169,6 +1169,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1168,6 +1168,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ca.spottedleaf.moonrise.common.util.MoonriseCommon.haltExecutors();
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
+1
-10
@@ -5,7 +5,7 @@ Subject: [PATCH] Correct player respawn place
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 57f93d978fe48fdf6e77b7bfb9f1de060e1a8524..924d5f3236d9ba9836f39fc844392099df9cd25c 100644
|
||||
index 16f49ae6736c475207f31392307e280ec06edbc3..a2e40bc7a15ba0663314a288f4a9b3ec3a39dc4d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -511,8 +511,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -43,12 +43,3 @@ index 57f93d978fe48fdf6e77b7bfb9f1de060e1a8524..924d5f3236d9ba9836f39fc844392099
|
||||
if (inChunk == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -1997,7 +2009,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
if (newLevel.dimension() == lastDimension) {
|
||||
- this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit
|
||||
+ this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit // Luminol - Correct player respawn place
|
||||
this.connection.resetPosition();
|
||||
transition.postTeleportTransition().onTransition(this);
|
||||
return this;
|
||||
+1
-1
@@ -57,7 +57,7 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..ea2f45964fb8c617f90938597c230b50
|
||||
+ public void moonrise$write(final io.anonymous.anonymous.data.RegionFile regionFile) throws IOException; // Anonymous - Configurable region file format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index a49c46eb7df50fc3c5587a2c3668ab6edc887107..c74f76b46259204b33b69ad08bb03c81b8b36961 100644
|
||||
index 56d26866cb8f413684e62558e5609b273efb8552..dd63f14cf6b857202146348b2242673af1883cb7 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -986,10 +986,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
+1
-1
@@ -6,7 +6,7 @@ Subject: [PATCH] Do not enable any debug subscriptions
|
||||
Really this would really crash the server by accident when the operators used F3 + J or toggled the debug synchronizer
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 924d5f3236d9ba9836f39fc844392099df9cd25c..fe34f2e648df9fd1174522baa5913976104b8d04 100644
|
||||
index a2e40bc7a15ba0663314a288f4a9b3ec3a39dc4d..216c9263999f05c36fb4c5598b41ff70e5759f5e 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -3483,7 +3483,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
+2
-2
@@ -8,10 +8,10 @@ Inspired by https://github.com/CraftCanvasMC/Canvas/blob/ver/1.21.8/canvas-serve
|
||||
but Canvas loses its main thread checks so fixed that btw
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index 40b4eeb561a91264b9ab6ddc49cb8a93daae84a4..97f4c546663fb19558246366a3d8d77f2b9327ef 100644
|
||||
index 77c4670868a95dc7b13461dfa67af34b0a3c329a..111789b4aca281dd1899dfbcc4e7e0ca36d74b51 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -290,13 +290,14 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -299,13 +299,14 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
// Paper start
|
||||
@Override
|
||||
public void disconnectAsync(final net.minecraft.network.DisconnectionDetails disconnectionInfo) {
|
||||
+4
-4
@@ -6,7 +6,7 @@ Subject: [PATCH] Fix riding statistics desync
|
||||
Referred to: https://github.com/CraftCanvasMC/Canvas/commit/057175b0c10d5a4d1d9059fd9d077750c32633b2
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index fe34f2e648df9fd1174522baa5913976104b8d04..fee4749c7938779f63155297bf9c7aeb0ca21709 100644
|
||||
index 216c9263999f05c36fb4c5598b41ff70e5759f5e..6c2196726a0669bddda456a089aeec0d9d9bdfa3 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2516,7 +2516,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -19,10 +19,10 @@ index fe34f2e648df9fd1174522baa5913976104b8d04..fee4749c7938779f63155297bf9c7aeb
|
||||
int distance = Math.round((float)Math.sqrt(dx * dx + dy * dy + dz * dz) * 100.0F);
|
||||
Entity vehicle = this.getVehicle();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 07310ae30817fc88227355739074615969b48184..47eef926f57053ace7ea140261570c4970822062 100644
|
||||
index 75dabd3e7b6077b5ae8ee30048786442742b93f9..6fa3ac9a37dafa166d8e70aaf4ec369db0792200 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4198,7 +4198,13 @@ public abstract class Entity
|
||||
@@ -4200,7 +4200,13 @@ public abstract class Entity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ index 07310ae30817fc88227355739074615969b48184..47eef926f57053ace7ea140261570c49
|
||||
java.util.ArrayDeque<EntityTreeNode> queue = new java.util.ArrayDeque<>();
|
||||
queue.add(this);
|
||||
|
||||
@@ -4211,14 +4217,24 @@ public abstract class Entity
|
||||
@@ -4213,14 +4219,24 @@ public abstract class Entity
|
||||
|
||||
for (EntityTreeNode passenger : passengers) {
|
||||
queue.add(passenger);
|
||||
+4
-4
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix entity portal-teleport speed
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index c6434ff2e5c211887c2e98c8462a49e0e1cb5b21..534f103234eb92571c664cbcfea4ce4e990d3ea8 100644
|
||||
index 35ab432bbd59aba80a6eaca1769e6aa82c8a7e46..6950fa2462353f30ee02e1d0091cfcf289f63939 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1492,7 +1492,27 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -46,10 +46,10 @@ index c6434ff2e5c211887c2e98c8462a49e0e1cb5b21..534f103234eb92571c664cbcfea4ce4e
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
profiler.pop();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 47eef926f57053ace7ea140261570c4970822062..7953b7ece0b5e3f41e85252cdfd8e400fab212ae 100644
|
||||
index 6fa3ac9a37dafa166d8e70aaf4ec369db0792200..bb02a5d2e752c7a3f0aba9ff115f3df61b9e141a 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -387,6 +387,7 @@ public abstract class Entity
|
||||
@@ -388,6 +388,7 @@ public abstract class Entity
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
@@ -57,7 +57,7 @@ index 47eef926f57053ace7ea140261570c4970822062..7953b7ece0b5e3f41e85252cdfd8e400
|
||||
|
||||
public void inactiveTick() {
|
||||
}
|
||||
@@ -3595,6 +3596,7 @@ public abstract class Entity
|
||||
@@ -3597,6 +3598,7 @@ public abstract class Entity
|
||||
} else {
|
||||
if (this.portalProcess == null || !this.portalProcess.isSamePortal(portal)) {
|
||||
this.portalProcess = new PortalProcessor(portal, pos.immutable());
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix player auto saving ignores interval
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index fee4749c7938779f63155297bf9c7aeb0ca21709..5668906866917f7bb6088ae16146d917d2b840b0 100644
|
||||
index 6c2196726a0669bddda456a089aeec0d9d9bdfa3..0802483484015fd92dec211aae9fd33e45621f74 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -208,7 +208,7 @@ import org.slf4j.Logger;
|
||||
+6
-6
@@ -6,7 +6,7 @@ Subject: [PATCH] Force disable builtin spark plugin
|
||||
The spark passed down from paper has some memory leaking issue, so we fully removed it from the code to prevent that memory leaking issue.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67b5bcb079 100644
|
||||
index dd63f14cf6b857202146348b2242673af1883cb7..88ccf32b3c1b3506fb76be5ae520168b6b167aa3 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -672,8 +672,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -29,7 +29,7 @@ index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67
|
||||
this.server.disablePlugins();
|
||||
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
|
||||
}
|
||||
@@ -1352,7 +1352,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1351,7 +1351,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.statusIcon = this.loadStatusIcon().orElse(null);
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
@@ -38,7 +38,7 @@ index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67
|
||||
// Folia start - region threading
|
||||
if (true) {
|
||||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().init(); // Folia - region threading - only after loading worlds
|
||||
@@ -1666,7 +1666,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1665,7 +1665,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.emptyTicks >= emptyTickThreshold) {
|
||||
@@ -47,7 +47,7 @@ index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67
|
||||
if (this.emptyTicks == emptyTickThreshold) {
|
||||
LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhenEmptySeconds());
|
||||
this.autoSave();
|
||||
@@ -1685,7 +1685,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1684,7 +1684,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - avoid issues with certain tasks not processing during sleep
|
||||
//this.server.spark.executeMainThreadTasks(); // Paper - spark // Folia - region threading
|
||||
this.tickConnection();
|
||||
@@ -56,7 +56,7 @@ index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1698,7 +1698,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1697,7 +1697,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
};
|
||||
// Folia end - region threading
|
||||
|
||||
@@ -65,7 +65,7 @@ index c74f76b46259204b33b69ad08bb03c81b8b36961..cc8364891a5d2196e8809479db984b67
|
||||
new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper - Server Tick Events // Folia - region threading
|
||||
// Folia start - region threading
|
||||
if (region != null) {
|
||||
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1784,7 +1784,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = scheduledEnd - endTime; // Folia - region ticking
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent((int)io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(), ((double)(endTime - startTime) / 1000000D), remaining).callEvent(); // Folia - region ticking
|
||||
// Paper end - Server Tick Events
|
||||
+5
-5
@@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleprotAsync calls in move events
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc6451dc50 100644
|
||||
index c86b1fd5e200c478d178be32791b6e8c960d47e2..9be6d486082d344fb91fd74207eee83ca2f8e869 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -730,7 +730,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -18,7 +18,7 @@ index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc
|
||||
|
||||
// If the event is cancelled we move the player back to their old location.
|
||||
if (event.isCancelled()) {
|
||||
@@ -1740,7 +1742,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1741,7 +1743,9 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
Location oldTo = to.clone();
|
||||
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
||||
@@ -29,10 +29,10 @@ index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc
|
||||
// If the event is cancelled we move the player back to their old location.
|
||||
if (event.isCancelled()) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 7953b7ece0b5e3f41e85252cdfd8e400fab212ae..343e4bb41acfab4e50729aa5dbe2a071dac376a3 100644
|
||||
index bb02a5d2e752c7a3f0aba9ff115f3df61b9e141a..33b6f6c0316af44e47370a55e3515df4e3b706b6 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4476,12 +4476,25 @@ public abstract class Entity
|
||||
@@ -4478,12 +4478,25 @@ public abstract class Entity
|
||||
teleportTarget.cause(), teleportFlags, teleportComplete
|
||||
);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ index 3fcd534cee1f605a710ffc43eff4b5106c7dd40c..9b887b40236a212de513e3ceece1abfe
|
||||
this.lastLocation = vehicle.getLocation();
|
||||
// CraftBukkit end
|
||||
diff --git a/net/minecraft/world/entity/vehicle/minecart/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/minecart/AbstractMinecart.java
|
||||
index 5ad77636d0681d1f0341cff4482ba6ad52f3583b..0ae8b5222c5f2f608af352cbaa866c493dd065aa 100644
|
||||
index 30b99d9d0944399e6f3a74c4310cbf8f15cc5adc..9a414d8a1a2e95f2843d8f6e65cf5ad0b742bb26 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/minecart/AbstractMinecart.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/minecart/AbstractMinecart.java
|
||||
@@ -318,7 +318,9 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
+4
-4
@@ -5,10 +5,10 @@ Subject: [PATCH] Sync dragon part when teleportation or firstly created
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..75c36cbf86e56d4993169688a13f22ccef555d92 100644
|
||||
index aa53138b3670a8337b639472a6ab5ce46702ff76..ed27b73e787782f328906b2a061feeca25d42a24 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
@@ -97,6 +97,7 @@ public final class ServerEntityLookup extends EntityLookup {
|
||||
@@ -93,6 +93,7 @@ public final class ServerEntityLookup extends EntityLookup {
|
||||
if (entity instanceof ThrownEnderpearl enderpearl) {
|
||||
this.addEnderPearl(CoordinateUtils.getChunkKey(enderpearl.chunkPosition()), enderpearl.getId()); // Folia - region threading
|
||||
}
|
||||
@@ -17,10 +17,10 @@ index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..75c36cbf86e56d4993169688a13f22cc
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 343e4bb41acfab4e50729aa5dbe2a071dac376a3..c04917f31585d9d670cc98cda8eb36187f4261d7 100644
|
||||
index 33b6f6c0316af44e47370a55e3515df4e3b706b6..8585068ce8a01b9fb90135f7bf3b35bb1647396a 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4460,6 +4460,7 @@ public abstract class Entity
|
||||
@@ -4462,6 +4462,7 @@ public abstract class Entity
|
||||
Entity copy = this.getType().create(destination, EntitySpawnReason.DIMENSION_TRAVEL);
|
||||
copy.restoreFrom(this);
|
||||
copy.transform(pos, yaw, pitch, velocity);
|
||||
+2
-2
@@ -8,10 +8,10 @@ On folia, entity usually cannot move out of the tickregion, but sometimes it act
|
||||
Reference from : https://github.com/KaiijuMC/Kaiiju/blob/ver/1.20.1/patches/server/0040-Teleport-async-if-we-cannot-move-entity-off-main.patch
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index c04917f31585d9d670cc98cda8eb36187f4261d7..9270b887448023b6ace2e7fae6b632755ce90600 100644
|
||||
index 8585068ce8a01b9fb90135f7bf3b35bb1647396a..3ea74b0ee3527c109b3491a5fa3b5bdd26214292 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1163,6 +1163,19 @@ public abstract class Entity
|
||||
@@ -1164,6 +1164,19 @@ public abstract class Entity
|
||||
this.moveStartZ = this.getZ();
|
||||
this.moveVector = delta;
|
||||
}
|
||||
+16
-16
@@ -228,7 +228,7 @@ index 5a72fa0d72bfdb927293abe921c57f6ae964a6ec..f8344f640f119e3865f2718d1abd0ede
|
||||
|
||||
private void uncaughtException(final Thread thread, final Throwable thr) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index cc8364891a5d2196e8809479db984b67b5bcb079..7c67a8a6cf83ab80d3a8b37c5ff03e7a56497bc9 100644
|
||||
index 88ccf32b3c1b3506fb76be5ae520168b6b167aa3..8bc18bf35537d5bbf2dacef34886b9a95d44a340 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -236,7 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -240,7 +240,7 @@ index cc8364891a5d2196e8809479db984b67b5bcb079..7c67a8a6cf83ab80d3a8b37c5ff03e7a
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running = true;
|
||||
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
@@ -2034,14 +2034,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2047,14 +2047,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -258,7 +258,7 @@ index cc8364891a5d2196e8809479db984b67b5bcb079..7c67a8a6cf83ab80d3a8b37c5ff03e7a
|
||||
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
||||
newLevels.remove(level.dimension());
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 534f103234eb92571c664cbcfea4ce4e990d3ea8..c4d9d890db784d376b876d70f0468df6edb75168 100644
|
||||
index 6950fa2462353f30ee02e1d0091cfcf289f63939..def5d4ce012dba5f819680d671235173467bfe7a 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,6 +221,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -275,7 +275,7 @@ index 534f103234eb92571c664cbcfea4ce4e990d3ea8..c4d9d890db784d376b876d70f0468df6
|
||||
// CraftBukkit start
|
||||
private final ResourceKey<LevelStem> typeKey;
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 5668906866917f7bb6088ae16146d917d2b840b0..4efbd0f840d74a3d96b28d38e48cba72d5c6fb9b 100644
|
||||
index 0802483484015fd92dec211aae9fd33e45621f74..4c9915087798f6548bb22574051c7b0b5aed7732 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1694,7 +1694,30 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -322,10 +322,10 @@ index 5668906866917f7bb6088ae16146d917d2b840b0..4efbd0f840d74a3d96b28d38e48cba72
|
||||
}
|
||||
);
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b584878f765 100644
|
||||
index 111789b4aca281dd1899dfbcc4e7e0ca36d74b51..2d3b0243f061aeaa979ddfc89c0361ecc29edcde 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -210,8 +210,23 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -219,8 +219,23 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
|
||||
this.switchToMain = serverPlayer;
|
||||
// now the connection responsibility is transferred to the region
|
||||
@@ -350,7 +350,7 @@ index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b58
|
||||
world.moonrise$getChunkTaskScheduler().scheduleTickingState(
|
||||
chunkPos.x(), chunkPos.z(), net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING, true,
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGHER,
|
||||
@@ -223,9 +238,15 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -232,9 +247,15 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
);
|
||||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().taskQueue.queueTickTaskQueue(
|
||||
world, chunkPos.x(), chunkPos.z(), () -> {
|
||||
@@ -367,7 +367,7 @@ index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b58
|
||||
);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/config/PrepareSpawnTask.java b/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
index 48f51b0f94df3e59c9410129489c63a4287bc0bc..2682f8702785b1e501748a308c5e394b8b664428 100644
|
||||
index 9fad06eda81b4c2c1889a9cfa7a6948e7ee01862..854f8954ccfd8c34c9f9c91fd1805260f9b429b5 100644
|
||||
--- a/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
+++ b/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
@@ -104,6 +104,16 @@ public class PrepareSpawnTask implements ConfigurationTask {
|
||||
@@ -429,10 +429,10 @@ index 48f51b0f94df3e59c9410129489c63a4287bc0bc..2682f8702785b1e501748a308c5e394b
|
||||
private final Vec2 spawnAngle;
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101dbe6353246 100644
|
||||
index 3ea74b0ee3527c109b3491a5fa3b5bdd26214292..ccbd1760c66c86971cec7a89442a647267f4a2f6 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -392,6 +392,9 @@ public abstract class Entity
|
||||
@@ -393,6 +393,9 @@ public abstract class Entity
|
||||
public void inactiveTick() {
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -442,7 +442,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
// CraftBukkit end
|
||||
|
||||
// Paper start
|
||||
@@ -4538,6 +4541,17 @@ public abstract class Entity
|
||||
@@ -4540,6 +4543,17 @@ public abstract class Entity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
// TODO any events that can modify go HERE
|
||||
|
||||
// check for same region
|
||||
@@ -4556,6 +4570,14 @@ public abstract class Entity
|
||||
@@ -4558,6 +4572,14 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
for (EntityTreeNode entity : passengerTree.getFullTree()) {
|
||||
@@ -475,7 +475,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
entity.root.teleportSyncSameRegion(pos, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
@@ -4571,8 +4593,8 @@ public abstract class Entity
|
||||
@@ -4573,8 +4595,8 @@ public abstract class Entity
|
||||
// performs add/remove from world logic which will also perform add/remove tracker logic
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -4589,7 +4611,7 @@ public abstract class Entity
|
||||
@@ -4591,7 +4613,7 @@ public abstract class Entity
|
||||
node.root = node.root.transformForAsyncTeleport(destination, pos, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4868,6 +4890,13 @@ public abstract class Entity
|
||||
@@ -4870,6 +4892,13 @@ public abstract class Entity
|
||||
ca.spottedleaf.moonrise.common.util.CoordinateUtils.getChunkX(initialPosition),
|
||||
ca.spottedleaf.moonrise.common.util.CoordinateUtils.getChunkZ(initialPosition)
|
||||
);
|
||||
@@ -509,7 +509,7 @@ index 9270b887448023b6ace2e7fae6b632755ce90600..66ddbdb130867a508ba161a570d101db
|
||||
|
||||
// first, remove entity/passengers from world
|
||||
EntityTreeNode passengerTree = this.detachPassengers();
|
||||
@@ -4925,6 +4954,10 @@ public abstract class Entity
|
||||
@@ -4927,6 +4956,10 @@ public abstract class Entity
|
||||
if (info.postTeleportTransition() != null) {
|
||||
info.postTeleportTransition().onTransition(teleported);
|
||||
}
|
||||
+18
-6
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Tue, 21 Apr 2026 01:41:14 +0800
|
||||
Date: Sat, 8 Aug 2026 01:27:42 +0800
|
||||
Subject: [PATCH] Kaiiju: Entity tick and removal limiter
|
||||
|
||||
Co-authored by: Xymb <xymb@endcrystal.me>
|
||||
@@ -8,19 +8,19 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e
|
||||
Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index cb15cfbc684ae9e9d9634886f707c2df10063139..f32d118e1e925b2155cef3fcdcb1e194c541e242 100644
|
||||
index c8f13da82c55cc5c1fe1c922a87e3eccb1117937..981458f6697a79dbc9fc8cf41c088c98e556c6dd 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -354,6 +354,7 @@ public final class RegionizedWorldData {
|
||||
@@ -349,6 +349,7 @@ public final class RegionizedWorldData {
|
||||
private final IteratorSafeOrderedReferenceSet<Mob> navigatingMobs = new IteratorSafeOrderedReferenceSet<>();
|
||||
public final ReferenceList<Entity> trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public final ReferenceList<Entity> trackerUnloadedEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public ReferenceList<Entity> trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public boolean iteratingTrackerEntities;
|
||||
+ public final dev.kaiijumc.kaiiju.KaiijuEntityThrottler entityThrottler = new dev.kaiijumc.kaiiju.KaiijuEntityThrottler(); // Kaiiju
|
||||
|
||||
// block ticking
|
||||
private final ObjectLinkedOpenHashSet<BlockEventData> blockEvents = new ObjectLinkedOpenHashSet<>();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index c4d9d890db784d376b876d70f0468df6edb75168..0641b98ef3298eb682ceae83f60b730f3bf90103 100644
|
||||
index def5d4ce012dba5f819680d671235173467bfe7a..1c01ec9597c47b7296f498a897f1fd2333c8c4d4 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -917,6 +917,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -53,3 +53,15 @@ index c4d9d890db784d376b876d70f0468df6edb75168..0641b98ef3298eb682ceae83f60b730f
|
||||
} finally { foliaProfiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ENTITY_TICK); } // Folia - profiler
|
||||
if (this.paperConfig().unsupportedSettings.ticking.blockEntities) { // Paper - option to disable ticking
|
||||
profiler.popPush("blockEntities");
|
||||
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||
index 6efaa78faca15c7a48bdffb24480d1bac29f3ba8..31619890f1bd4f458b6f9a31fac8cefaafe09e8e 100644
|
||||
--- a/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/net/minecraft/world/entity/EntityType.java
|
||||
@@ -73,6 +73,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
||||
private final float spawnDimensionsScale;
|
||||
private final FeatureFlagSet requiredFeatures;
|
||||
private final boolean allowedInPeaceful;
|
||||
+ public volatile dev.kaiijumc.kaiiju.KaiijuEntityLimits.EntityLimit entityLimit;
|
||||
|
||||
public static Identifier getKey(final EntityType<?> type) {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(type);
|
||||
+5
-5
@@ -8,10 +8,10 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e
|
||||
Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 66ddbdb130867a508ba161a570d101dbe6353246..df82f900580ad1b71960eab890a7a6215f578421 100644
|
||||
index ccbd1760c66c86971cec7a89442a647267f4a2f6..58c65c3b1d425c6566313ba34588d9d16f66c52d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4676,15 +4676,19 @@ public abstract class Entity
|
||||
@@ -4678,15 +4678,19 @@ public abstract class Entity
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
@@ -35,7 +35,7 @@ index 66ddbdb130867a508ba161a570d101dbe6353246..df82f900580ad1b71960eab890a7a621
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL,
|
||||
TeleportTransition.PassengerTeleportationMode.POSITION_RIDER
|
||||
@@ -4700,11 +4704,15 @@ public abstract class Entity
|
||||
@@ -4702,11 +4706,15 @@ public abstract class Entity
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
BlockPos adjustedSpawn = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, spawnPos);
|
||||
@@ -53,7 +53,7 @@ index 66ddbdb130867a508ba161a570d101dbe6353246..df82f900580ad1b71960eab890a7a621
|
||||
false, false,
|
||||
Relative.union(Relative.DELTA, Relative.ROTATION),
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
@@ -4885,6 +4893,10 @@ public abstract class Entity
|
||||
@@ -4887,6 +4895,10 @@ public abstract class Entity
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 66ddbdb130867a508ba161a570d101dbe6353246..df82f900580ad1b71960eab890a7a621
|
||||
Vec3 initialPosition = this.position();
|
||||
ChunkPos initialPositionChunk = new ChunkPos(
|
||||
ca.spottedleaf.moonrise.common.util.CoordinateUtils.getChunkX(initialPosition),
|
||||
@@ -4959,9 +4971,14 @@ public abstract class Entity
|
||||
@@ -4961,9 +4973,14 @@ public abstract class Entity
|
||||
destination.levelUnloadStateLock.releaseRead();
|
||||
// Luminol end
|
||||
|
||||
+14
-14
@@ -1,14 +1,14 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 28 Jun 2026 19:58:46 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:29:57 +0800
|
||||
Subject: [PATCH] Async protocol switching optimization
|
||||
|
||||
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index 40f54536422fa38bd84017fc634808016b4de58b..ecaa296f576c5c90fda89e0406d6552628ef5de3 100644
|
||||
index c3922310ef1fce26eca60793b75bcb480683778a..8144de362b03ce63334765791701cec724776f42 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -1067,4 +1067,127 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -1108,4 +1108,127 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
}
|
||||
// Paper end - Optimize network
|
||||
@@ -137,10 +137,10 @@ index 40f54536422fa38bd84017fc634808016b4de58b..ecaa296f576c5c90fda89e0406d65526
|
||||
+
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43d18e3774 100644
|
||||
index 2d3b0243f061aeaa979ddfc89c0361ecc29edcde..e074fe9eb6a1e6cb30b7de522fcac673dcb81960 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -188,8 +188,9 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -197,8 +197,9 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
public void handleConfigurationFinished(final ServerboundFinishConfigurationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.server.packetProcessor());
|
||||
this.finishCurrentTask(JoinWorldTask.TYPE);
|
||||
@@ -151,7 +151,7 @@ index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43
|
||||
try {
|
||||
PlayerList playerList = this.server.getPlayerList();
|
||||
if (playerList.getPlayer(this.gameProfile.id()) != null) {
|
||||
@@ -256,6 +257,18 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -265,6 +266,18 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
LOGGER.error("Couldn't place player in world", e);
|
||||
this.disconnect(DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
@@ -171,10 +171,10 @@ index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0c5fb17e7cce18eac68183cc3b5de6fc6451dc50..1ea8e03a4dc39486505d21bff1d15cb2339cafc2 100644
|
||||
index 9be6d486082d344fb91fd74207eee83ca2f8e869..40b409ad07eaa03473712ba83bc4ccd9a5c0f932 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2901,7 +2901,13 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2902,7 +2902,13 @@ public class ServerGamePacketListenerImpl
|
||||
} // Folia end - rewrite login process - move connection ownership to global region
|
||||
this.waitingForSwitchToConfig = true; // Folia - rewrite login process - fix bad ordering of this field write - moved down
|
||||
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
||||
@@ -188,7 +188,7 @@ index 0c5fb17e7cce18eac68183cc3b5de6fc6451dc50..1ea8e03a4dc39486505d21bff1d15cb2
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3786,12 +3792,26 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3787,12 +3793,26 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
final ServerConfigurationPacketListenerImpl listener = new ServerConfigurationPacketListenerImpl(this.server, this.connection, this.createCookie(this.player.clientInformation())); // Paper
|
||||
@@ -216,10 +216,10 @@ index 0c5fb17e7cce18eac68183cc3b5de6fc6451dc50..1ea8e03a4dc39486505d21bff1d15cb2
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index f2329d1a9d9d4bf4c9d771e25e54f2f9ef65a76c..deee051c103f9797f4612e06c12f293ec54724ac 100644
|
||||
index 95787d6d29ddb8dca78506bb2a115fa612fdaa29..841acc9fb6f0ca219c908812d20831aba0630126 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -435,12 +435,30 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -439,12 +439,30 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
public void handleLoginAcknowledgement(final ServerboundLoginAcknowledgedPacket packet) {
|
||||
net.minecraft.network.protocol.PacketUtils.ensureRunningOnSameThread(packet, this, this.server.packetProcessor()); // CraftBukkit
|
||||
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet");
|
||||
@@ -253,12 +253,12 @@ index f2329d1a9d9d4bf4c9d771e25e54f2f9ef65a76c..deee051c103f9797f4612e06c12f293e
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index e7579a9873362317dd82b63306cf650af9472574..53449af103c1774f68cb0c296d47e7032e4e3843 100644
|
||||
index 259eb7574841b1b885093b534440f8a40db4e8e2..2975a879320faed5f6591489f86d3f909072cbaa 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -237,9 +237,11 @@ public abstract class PlayerList {
|
||||
// only after setting the connection listener to game type, add the connection to this regions list
|
||||
level.getCurrentWorldData().connections.add(connection);
|
||||
level.getCurrentWorldData().addConnection(player);
|
||||
// Folia end - rewrite login process
|
||||
+ if (!me.earthme.luminol.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Luminol - Async protocol switch // we will run async switch once these main thread logics became done
|
||||
connection.setupInboundProtocol(
|
||||
+2
-2
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for server mod name
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 7c67a8a6cf83ab80d3a8b37c5ff03e7a56497bc9..b2823c71ecb5e1f7a3c4c5b9f691d4cdb5419db3 100644
|
||||
index 8bc18bf35537d5bbf2dacef34886b9a95d44a340..daf45761bdc88848ba81b7595b5abd5635dfd607 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2072,7 +2072,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2085,7 +2085,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config for vanilla random
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index df82f900580ad1b71960eab890a7a6215f578421..39f2b44846c02796a3671a5dec75b7b34d8c488e 100644
|
||||
index 58c65c3b1d425c6566313ba34588d9d16f66c52d..708bd774bdf535be82358bd6f4c7f8b0538285e3 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -298,7 +298,7 @@ public abstract class Entity
|
||||
+2
-2
@@ -19,10 +19,10 @@ index 9b1dcfadd6d5ae868b087a18983d03e8bb86b56a..21f2b9866e1cf36421e10a945fb6fbaa
|
||||
DefaultGameModeCommands.register(this.dispatcher);
|
||||
//DialogCommand.register(this.dispatcher, context); // Folia - region threading - TODO
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index b2823c71ecb5e1f7a3c4c5b9f691d4cdb5419db3..a82cafadf2136d30ae7bca172062713a651373ac 100644
|
||||
index daf45761bdc88848ba81b7595b5abd5635dfd607..b9ff4628421ba0c5bdaec13c9dc1b35e8d194d92 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2415,6 +2415,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2428,6 +2428,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.reloadResources(packsToEnable, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN);
|
||||
}
|
||||
|
||||
+7
-7
@@ -17,10 +17,10 @@ index 52dcbcf64c3a510d4a4524b7d0ee226d9a73511d..051d601e7e809518e8d82ae4ae325905
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index a82cafadf2136d30ae7bca172062713a651373ac..e43aa6daa8d4465764348be5b82be5f163ef0819 100644
|
||||
index b9ff4628421ba0c5bdaec13c9dc1b35e8d194d92..ff6809944c2dd8a2cc7c11a8b05b0f7c17b5fb4c 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1743,7 +1743,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1742,7 +1742,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Folia end - region threading
|
||||
//this.tickCount++; // Folia - region threading
|
||||
//this.tickRateManager.tick(); // Folia - region threading
|
||||
@@ -68,7 +68,7 @@ index a82cafadf2136d30ae7bca172062713a651373ac..e43aa6daa8d4465764348be5b82be5f1
|
||||
this.lastServerStatus = nano;
|
||||
this.status = this.buildServerStatus();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 0641b98ef3298eb682ceae83f60b730f3bf90103..cea4bc7036dfd8777c151a0dd811fc13579d6501 100644
|
||||
index 1c01ec9597c47b7296f498a897f1fd2333c8c4d4..015f0521aa65201fab990177867d10e0ea0611d4 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1491,6 +1491,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -106,7 +106,7 @@ index 0641b98ef3298eb682ceae83f60b730f3bf90103..cea4bc7036dfd8777c151a0dd811fc13
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4efbd0f840d74a3d96b28d38e48cba72d5c6fb9b..8e4bbb224d036cf9f33667aec57bbc339c9e8377 100644
|
||||
index 4c9915087798f6548bb22574051c7b0b5aed7732..21733beb07c0df3cf6872ce84a07e85dfe5ee3e9 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -441,7 +441,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -183,10 +183,10 @@ index f03fa06c0ba56f7f5e1e45bc1568a490751efde3..eee1c14249addbf4714df733870da974
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 39f2b44846c02796a3671a5dec75b7b34d8c488e..fe0208815dbf53855d47956925b817570f6ae5b0 100644
|
||||
index 708bd774bdf535be82358bd6f4c7f8b0538285e3..dc2a7aa39f6aa9ec6b5cfbce3bfec71e9c458dcb 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -6479,4 +6479,6 @@ public abstract class Entity
|
||||
@@ -6486,4 +6486,6 @@ public abstract class Entity
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end
|
||||
@@ -258,7 +258,7 @@ index f79353aa58b03d00839e4e95d1fd2480a635a592..0a43947bcc9f505ad9bc4d54c564709c
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 2eb5fc819e2e17c69de87f8aa1a99e02bc5a62d5..a4bc767b799c050ce07a3685f655b4ba947d2466 100644
|
||||
index 5ffcf20d06f8a0cc0394347d8ef4cfa1e89ebab2..a26025ec6c3c6fe84bfc598176a6d4ff49de4a41 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -170,6 +170,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
+7
-7
@@ -6,7 +6,7 @@ Subject: [PATCH] Add config to enable tick command
|
||||
only freeze/unfreeze/step/query/rate can run when enabled
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e83122ccfdbd1 100644
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..a96da8ab0d8ca8241df79fbfca33f3e6072db367 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -239,6 +239,11 @@ public final class RegionizedServer {
|
||||
@@ -14,7 +14,7 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e8312
|
||||
private void globalTick(final long tickCount) {
|
||||
++this.tickCount;
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ MinecraftServer.getServer().tickRateManager().tick();
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
@@ -41,12 +41,12 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e8312
|
||||
|
||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||
- if (world.tickTime) {
|
||||
+ if ((!me.earthme.luminol.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command
|
||||
+ if ((!fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command // Lophine - redirect
|
||||
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
||||
}
|
||||
}
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533d9d5bc1b 100644
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..ae424c8931a2f82c6c8d4ddd8422a2c142a77a95 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
||||
@@ -92,7 +92,7 @@ index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533
|
||||
// next start isn't updated until the end of this tick
|
||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ MinecraftServer.getServer().tickRateManager().endTickWork();
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
@@ -100,7 +100,7 @@ index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533
|
||||
this.scheduler.regionFailed(this, false, thr);
|
||||
// regionFailed will schedule a shutdown, so we should avoid letting this region tick further
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 21f2b9866e1cf36421e10a945fb6fbaa251009ed..aa7931c9b6dc3bba2c8dfecff8df2db302ad905b 100644
|
||||
index 21f2b9866e1cf36421e10a945fb6fbaa251009ed..409fcc5e95ca453fee7d3bd0375c910d79b507e6 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -259,7 +259,11 @@ public class Commands {
|
||||
@@ -109,7 +109,7 @@ index 21f2b9866e1cf36421e10a945fb6fbaa251009ed..aa7931c9b6dc3bba2c8dfecff8df2db3
|
||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||
- //TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
+3
-3
@@ -8,10 +8,10 @@ is for Anarchy servers or Crystal PVP servers this allows them to pvp
|
||||
without stopping the item mid animation.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1ea8e03a4dc39486505d21bff1d15cb2339cafc2..a2146662c8ec83f62547bcd813c0e4dcb10efc07 100644
|
||||
index 40b409ad07eaa03473712ba83bc4ccd9a5c0f932..95715be85fe2d35d219a496f6677732833d6b345 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2186,7 +2186,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2187,7 +2187,9 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.sendSpawnProtectionMessage(pos);
|
||||
} else if (this.awaitingPositionFromClient == null && (level.mayInteract(this.player, pos) || passthroughSignInteraction)) {
|
||||
// Paper end - Allow using signs inside spawn protection
|
||||
@@ -21,7 +21,7 @@ index 1ea8e03a4dc39486505d21bff1d15cb2339cafc2..a2146662c8ec83f62547bcd813c0e4dc
|
||||
InteractionResult interactionResult = this.player.gameMode.useItemOn(this.player, level, itemStack, hand, blockHit);
|
||||
if (interactionResult.consumesAction()) {
|
||||
CriteriaTriggers.ANY_BLOCK_USE.trigger(this.player, blockHit.getBlockPos(), itemStack);
|
||||
@@ -2385,9 +2387,13 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2386,9 +2388,13 @@ public class ServerGamePacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+7
-7
@@ -5,7 +5,7 @@ Subject: [PATCH] Add missing teleportation event APIs for folia
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8e4bbb224d036cf9f33667aec57bbc339c9e8377..4397f77d0169a3eefd347d3097657de4f6d37ef8 100644
|
||||
index 21733beb07c0df3cf6872ce84a07e85dfe5ee3e9..055911982349bab23ba8d6c88f06c01456a86167 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1803,6 +1803,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -19,10 +19,10 @@ index 8e4bbb224d036cf9f33667aec57bbc339c9e8377..4397f77d0169a3eefd347d3097657de4
|
||||
);
|
||||
});
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index fe0208815dbf53855d47956925b817570f6ae5b0..90b5d7806af8913735c4105b6e347bfdb78094e0 100644
|
||||
index dc2a7aa39f6aa9ec6b5cfbce3bfec71e9c458dcb..23dc3a2c0c124d842cf23e35b4a5d079d5d523da 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4553,6 +4553,31 @@ public abstract class Entity
|
||||
@@ -4555,6 +4555,31 @@ public abstract class Entity
|
||||
// Luminol end
|
||||
|
||||
// TODO any events that can modify go HERE
|
||||
@@ -54,7 +54,7 @@ index fe0208815dbf53855d47956925b817570f6ae5b0..90b5d7806af8913735c4105b6e347bfd
|
||||
|
||||
// check for same region
|
||||
if (destination == this.level()
|
||||
@@ -4671,6 +4696,17 @@ public abstract class Entity
|
||||
@@ -4673,6 +4698,17 @@ public abstract class Entity
|
||||
case END: {
|
||||
if (destination.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.END) {
|
||||
BlockPos targetPos = ServerLevel.END_SPAWN_POINT;
|
||||
@@ -72,7 +72,7 @@ index fe0208815dbf53855d47956925b817570f6ae5b0..90b5d7806af8913735c4105b6e347bfd
|
||||
// need to load chunks so we can create the platform
|
||||
destination.moonrise$loadChunksAsync(
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
@@ -4698,6 +4734,17 @@ public abstract class Entity
|
||||
@@ -4700,6 +4736,17 @@ public abstract class Entity
|
||||
);
|
||||
} else {
|
||||
BlockPos spawnPos = destination.getRespawnData().pos();
|
||||
@@ -90,7 +90,7 @@ index fe0208815dbf53855d47956925b817570f6ae5b0..90b5d7806af8913735c4105b6e347bfd
|
||||
// need to load chunk for heightmap
|
||||
destination.moonrise$loadChunksAsync(
|
||||
spawnPos, 0,
|
||||
@@ -4755,7 +4802,17 @@ public abstract class Entity
|
||||
@@ -4757,7 +4804,17 @@ public abstract class Entity
|
||||
WorldBorder destinationBorder = destination.getWorldBorder();
|
||||
double dimensionScale = net.minecraft.world.level.dimension.DimensionType.getTeleportationScale(origin.dimensionType(), destination.dimensionType());
|
||||
BlockPos targetPos = destination.getWorldBorder().clampToBounds(this.getX() * dimensionScale, this.getY(), this.getZ() * dimensionScale);
|
||||
@@ -108,7 +108,7 @@ index fe0208815dbf53855d47956925b817570f6ae5b0..90b5d7806af8913735c4105b6e347bfd
|
||||
ca.spottedleaf.concurrentutil.completable.CallbackCompletable<BlockUtil.FoundRectangle> portalFound
|
||||
= new ca.spottedleaf.concurrentutil.completable.CallbackCompletable<>();
|
||||
|
||||
@@ -4892,6 +4949,15 @@ public abstract class Entity
|
||||
@@ -4894,6 +4951,15 @@ public abstract class Entity
|
||||
if (!this.canPortalAsync(destination, takePassengers)) {
|
||||
return false;
|
||||
}
|
||||
+8
-8
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Portal rate limiter
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b4066861dc79d64 100644
|
||||
index 981458f6697a79dbc9fc8cf41c088c98e556c6dd..4dbbe03d949811bf6140a35faa5e8cee8f7e28f0 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -157,6 +157,10 @@ public final class RegionizedWorldData {
|
||||
@@ -154,6 +154,10 @@ public final class RegionizedWorldData {
|
||||
for (final ChunkHolder chunkHolder : from.chunkHoldersToBroadcast) {
|
||||
into.chunkHoldersToBroadcast.add(chunkHolder);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -322,6 +326,12 @@ public final class RegionizedWorldData {
|
||||
@@ -316,6 +320,12 @@ public final class RegionizedWorldData {
|
||||
into.chunkHoldersToBroadcast.add(chunkHolder);
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
}
|
||||
};
|
||||
|
||||
@@ -343,6 +353,35 @@ public final class RegionizedWorldData {
|
||||
@@ -338,6 +348,35 @@ public final class RegionizedWorldData {
|
||||
return this.isHandlingTick;
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
// this is copy on write to allow packet processing to iterate safely
|
||||
private final CopyOnWriteArrayList<ServerPlayer> localPlayers = new CopyOnWriteArrayList<>();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index e43aa6daa8d4465764348be5b82be5f163ef0819..f4274e844018992bba7c32d2146198efc034631e 100644
|
||||
index ff6809944c2dd8a2cc7c11a8b05b0f7c17b5fb4c..fe1b70edb24e2ded42f8ca1f5ddfbae7151b147a 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1973,6 +1973,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1978,6 +1978,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = level.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
||||
profiler.push(() -> level + " " + level.dimension().identifier());
|
||||
profiler.push("tick");
|
||||
@@ -82,7 +82,7 @@ index e43aa6daa8d4465764348be5b82be5f163ef0819..f4274e844018992bba7c32d2146198ef
|
||||
|
||||
try {
|
||||
foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler
|
||||
@@ -1987,6 +1990,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1992,6 +1995,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
profiler.pop();
|
||||
profiler.pop();
|
||||
regionizedWorldData.explosionDensityCache.clear(); // Paper - Optimize explosions // Folia - region threading
|
||||
@@ -93,7 +93,7 @@ index e43aa6daa8d4465764348be5b82be5f163ef0819..f4274e844018992bba7c32d2146198ef
|
||||
//this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked // Folia - region threading
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index cea4bc7036dfd8777c151a0dd811fc13579d6501..402e2f01f2b3a8e9ce5c818f07581b4dab38fc26 100644
|
||||
index 015f0521aa65201fab990177867d10e0ea0611d4..adde187ad84ad75047096736de6e51ef81897d61 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1536,8 +1536,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
+4
-4
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config for waypoint restoration
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index aa7931c9b6dc3bba2c8dfecff8df2db302ad905b..c67ea715f02086e5a39cc5832ccdc0b32199db93 100644
|
||||
index 409fcc5e95ca453fee7d3bd0375c910d79b507e6..5a5f7f7fefacaa0d77ec389d6eb332eff519496a 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -267,7 +267,7 @@ public class Commands {
|
||||
@@ -18,10 +18,10 @@ index aa7931c9b6dc3bba2c8dfecff8df2db302ad905b..c67ea715f02086e5a39cc5832ccdc0b3
|
||||
WorldBorderCommand.register(this.dispatcher);
|
||||
if (JvmProfiler.INSTANCE.isAvailable()) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index f4274e844018992bba7c32d2146198efc034631e..42ee15c813761702031d5a63f0d080b135be2e0f 100644
|
||||
index fe1b70edb24e2ded42f8ca1f5ddfbae7151b147a..35aa8df4aecd91387997f01c258f0d549dfba0f8 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3127,8 +3127,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -3140,8 +3140,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
level.players().forEach(playerx -> playerx.connection.send(packet)); // Paper - per-world game rules
|
||||
} else if (rule == GameRules.LOCATOR_BAR) {
|
||||
// this.getAllLevels().forEach(level -> { // Paper - per-world game rules
|
||||
@@ -33,7 +33,7 @@ index f4274e844018992bba7c32d2146198efc034631e..42ee15c813761702031d5a63f0d080b1
|
||||
level.players().forEach(waypointManager::updatePlayer);
|
||||
} else {
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 402e2f01f2b3a8e9ce5c818f07581b4dab38fc26..a1c3f3e5c7c3f32e0bdead33ebd72c7601295291 100644
|
||||
index adde187ad84ad75047096736de6e51ef81897d61..303233dcb0b33bf874fd71ee953565886e990138 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -690,7 +690,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
+1
-1
@@ -63,7 +63,7 @@ index 7927769cf9bccb892745f4d1390eb83b2861d1bb..414c21345879f589fb61130180d0ca60
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index a1c3f3e5c7c3f32e0bdead33ebd72c7601295291..85eed61919b3c2ef93943e1c1b50fbcbca6fb319 100644
|
||||
index 303233dcb0b33bf874fd71ee953565886e990138..1024e68e1e3344b02c6e37c501a4ac989f486463 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -639,6 +639,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
+1
-1
@@ -9,7 +9,7 @@ As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40
|
||||
Licensed under: MIT (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40279a7a65f0fde47503b6/licenses/MIT.txt)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 53449af103c1774f68cb0c296d47e7032e4e3843..a8f051e6aff31a723a3ba59842fac3a43f4911fe 100644
|
||||
index 2975a879320faed5f6591489f86d3f909072cbaa..d1683d4853f0d0190d9eae31706c99001229c026 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1294,22 +1294,26 @@ public abstract class PlayerList {
|
||||
+2
-2
@@ -8,10 +8,10 @@ This is a part of Leaf(https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94
|
||||
Original license: https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94f686ef32f0eea1ec7323f78d5/LICENSE.md
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 2d5d4170e1f45ae9113c37623b4066861dc79d64..48fea9051efe038a823d7c2c9ae3bf28078f2fcc 100644
|
||||
index 4dbbe03d949811bf6140a35faa5e8cee8f7e28f0..ab607bcc767068c89bf034013652102c232d35a9 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -457,6 +457,7 @@ public final class RegionizedWorldData {
|
||||
@@ -452,6 +452,7 @@ public final class RegionizedWorldData {
|
||||
public final PathTypeCache pathTypesByPosCache = new PathTypeCache();
|
||||
public final List<LevelChunk> temporaryChunkTickList = new java.util.ArrayList<>();
|
||||
public final Set<ChunkHolder> chunkHoldersToBroadcast = new ReferenceLinkedOpenHashSet<>();
|
||||
+4
-4
@@ -8,7 +8,7 @@ A part of Leaf(https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39ef
|
||||
License: https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39efa4702370c2576b3fc/LICENSE.md
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 42ee15c813761702031d5a63f0d080b135be2e0f..1736816e26c255645d62696814cd539ee1ffed8d 100644
|
||||
index 35aa8df4aecd91387997f01c258f0d549dfba0f8..908cff4caa1457e07d809fb793d00d367ae42320 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -217,7 +217,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -21,7 +21,7 @@ index 42ee15c813761702031d5a63f0d080b135be2e0f..1736816e26c255645d62696814cd539e
|
||||
private final List<Runnable> tickables = Lists.newArrayList();
|
||||
// Paper - per-level GameRules
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index deee051c103f9797f4612e06c12f293ec54724ac..911fb0912c7bc6ab0e29c03a21c6bddb248bbc0a 100644
|
||||
index 841acc9fb6f0ca219c908812d20831aba0630126..74f79cf51c4ff2dcda53054863a26725953d2b09 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -167,11 +167,20 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -63,7 +63,7 @@ index deee051c103f9797f4612e06c12f293ec54724ac..911fb0912c7bc6ab0e29c03a21c6bddb
|
||||
|
||||
gameprofile = ServerLoginPacketListenerImpl.this.callPlayerPreLoginEvents(gameprofile); // Paper - Add more fields to AsyncPlayerPreLoginEvent
|
||||
ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.name(), gameprofile.id());
|
||||
@@ -341,7 +359,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -345,7 +363,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
server.getPluginManager().callEvent(asyncEvent);
|
||||
profile = asyncEvent.getPlayerProfile();
|
||||
profile.complete(true); // Paper - setPlayerProfileAPI
|
||||
@@ -86,7 +86,7 @@ index 7443744e3f256983e52a1cefcaf66082e4a46a7b..b7553611723f7120c66e1f3e51d89df2
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index a8f051e6aff31a723a3ba59842fac3a43f4911fe..2939aa1ecd68504424198dd7c90c71c6c1aa4c80 100644
|
||||
index d1683d4853f0d0190d9eae31706c99001229c026..a98c9b287885e2c353cf75dbb7f004cf67c0d802 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -134,6 +134,7 @@ public abstract class PlayerList {
|
||||
+1
-1
@@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18
|
||||
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/villager/Villager.java b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
index f649c46cc9a34e646f8da3244866c6e011d30aa3..10715e891205eadd3774dc349c52963606ce1ab7 100644
|
||||
index 0869ecb4b7fe07efa33d521bef2f525955bd3c30..3fa0ca479922a7c55625c5e7bcd25065210ea44e 100644
|
||||
--- a/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
@@ -190,6 +190,53 @@ public class Villager extends AbstractVillager implements VillagerDataHolder, Re
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Fri, 1 May 2026 21:47:48 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:31:30 +0800
|
||||
Subject: [PATCH] Pufferfish: Reduce projectile chunk loading
|
||||
|
||||
A part of Pufferfish(https://github.com/Pufferfish-gg/Pufferfish)
|
||||
@@ -9,10 +9,10 @@ Original patch: https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/puffer
|
||||
Original license(GPL-3.0): https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/PATCH-LICENSE
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 48fea9051efe038a823d7c2c9ae3bf28078f2fcc..c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc 100644
|
||||
index ab607bcc767068c89bf034013652102c232d35a9..0bf23b7ceacf7d962270cb513abce050670c172e 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -339,6 +339,10 @@ public final class RegionizedWorldData {
|
||||
@@ -333,6 +333,10 @@ public final class RegionizedWorldData {
|
||||
|
||||
private RegionizedServer.WorldLevelData tickData;
|
||||
|
||||
@@ -21,8 +21,8 @@ index 48fea9051efe038a823d7c2c9ae3bf28078f2fcc..c9f2d54be6f0699c2bf922c66ba0bafc
|
||||
+ public long pufferfish$loadedTick = 0L;
|
||||
+ // Luminol end
|
||||
// connections
|
||||
public final List<Connection> connections = new ArrayList<>();
|
||||
|
||||
private static final Connection[] EMPTY_CONNECTION_ARRAY = new Connection[0];
|
||||
private final ReferenceList<Connection> connections = new ReferenceList<>(EMPTY_CONNECTION_ARRAY);
|
||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 721e3b083846fd363a31311196bc4c681969215c..81aafd64cc80038eaafba059373db3682afb8c2c 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+5
-5
@@ -5,7 +5,7 @@ Subject: [PATCH] Leaves: Disable packet limit
|
||||
|
||||
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index ecaa296f576c5c90fda89e0406d6552628ef5de3..d2e9d46bbd9ee4ce45419b11499d7a7bc50f0219 100644
|
||||
index 8144de362b03ce63334765791701cec724776f42..63c78d8dbfdcfb908100052e36d75ffce8c9d613 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -258,8 +258,8 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -20,7 +20,7 @@ index ecaa296f576c5c90fda89e0406d6552628ef5de3..d2e9d46bbd9ee4ce45419b11499d7a7b
|
||||
synchronized (PACKET_LIMIT_LOCK) {
|
||||
if (this.allPacketCounts != null) {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca5623111e98e51 100644
|
||||
index 95715be85fe2d35d219a496f6677732833d6b345..1bd8ae7e1250a56cff636b010c371144adbb7ad0 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -892,7 +892,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -32,7 +32,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
||||
return;
|
||||
}
|
||||
@@ -2128,6 +2128,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2129,6 +2129,7 @@ public class ServerGamePacketListenerImpl
|
||||
private long lastLimitedPacket = -1;
|
||||
|
||||
private boolean checkLimit(long timestamp) {
|
||||
@@ -40,7 +40,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
if (!io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold.enabled()) {
|
||||
return true;
|
||||
}
|
||||
@@ -2694,6 +2695,8 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2695,6 +2696,8 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
// Spigot start - spam exclusions
|
||||
private void detectRateSpam(final TickThrottler throttler, final String message) {
|
||||
@@ -49,7 +49,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
||||
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
|
||||
if (exclude != null && message.startsWith(exclude)) {
|
||||
@@ -3492,7 +3495,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3493,7 +3496,7 @@ public class ServerGamePacketListenerImpl
|
||||
@Override
|
||||
public void handlePlaceRecipe(final ServerboundPlaceRecipePacket packet) {
|
||||
// Paper start - auto recipe limit
|
||||
+27
-16
@@ -9,10 +9,10 @@ Origin patch link: https://github.com/LeavesMC/Leaves/blob/master/leaves-server/
|
||||
Origin license: https://github.com/LeavesMC/Leaves/blob/master/LICENSE.md
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index a858cb658af70f07614fa1f4d9e8a3435d5c161f..4c9d0bcd8820b250b51c06fff4531021ab57d408 100644
|
||||
index a858cb658af70f07614fa1f4d9e8a3435d5c161f..95f0b3276137cb9d1fc296e97cc25a08a5200c95 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -281,36 +281,55 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -281,36 +281,67 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
ItemStack movedItem = origItemStack;
|
||||
final int originalItemCount = origItemStack.getCount();
|
||||
final int movedItemCount = Math.min(level.spigotConfig.hopperAmount, originalItemCount);
|
||||
@@ -32,21 +32,19 @@ index a858cb658af70f07614fa1f4d9e8a3435d5c161f..4c9d0bcd8820b250b51c06fff4531021
|
||||
+ movedItem = callPullMoveEvent(hopper, container, movedItem);
|
||||
+ if (movedItem == null) { // cancelled
|
||||
+ origItemStack.setCount(originalItemCount);
|
||||
+ container.setChanged(); // keep parity with vanilla: source inv always marked changed
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ movedItem = origItemStack.copy();
|
||||
+ final ItemStack remainingItem = addItem(container, hopper, container.removeItem(i, movedItemCount), null);
|
||||
+ final int toRemove = Math.min(movedItem.getCount(), container.getItem(i).getCount());
|
||||
+ final ItemStack remainingItem = addItem(container, hopper, container.removeItem(i, toRemove), null);
|
||||
+ final int remainingItemCount = remainingItem.getCount();
|
||||
+ if (remainingItem.isEmpty()) {
|
||||
+ container.setChanged();
|
||||
return true;
|
||||
}
|
||||
- }
|
||||
+ container.setItem(i, movedItem);
|
||||
+ } else {
|
||||
+ container.setChanged(); // original logic always marks source inv as changed even if no move happens.
|
||||
+ movedItem.setCount(movedItemCount);
|
||||
|
||||
-
|
||||
- final ItemStack remainingItem = addItem(container, hopper, movedItem, null);
|
||||
- final int remainingItemCount = remainingItem.getCount();
|
||||
- if (remainingItemCount != movedItemCount) {
|
||||
@@ -54,6 +52,24 @@ index a858cb658af70f07614fa1f4d9e8a3435d5c161f..4c9d0bcd8820b250b51c06fff4531021
|
||||
- origItemStack.setCount(originalItemCount);
|
||||
- if (!origItemStack.isEmpty()) {
|
||||
- origItemStack.setCount(originalItemCount - movedItemCount + remainingItemCount);
|
||||
+ if (remainingItemCount != toRemove) {
|
||||
+ IGNORE_TILE_UPDATES.set(true); // Folia - region threading
|
||||
+ container.setItem(i, remainingItem);
|
||||
+ IGNORE_TILE_UPDATES.set(false); // Folia - region threading
|
||||
+ container.setChanged();
|
||||
+ return true;
|
||||
}
|
||||
-
|
||||
IGNORE_TILE_UPDATES.set(true); // Folia - region threading
|
||||
- container.setItem(i, origItemStack);
|
||||
+ container.setItem(i, remainingItem);
|
||||
IGNORE_TILE_UPDATES.set(false); // Folia - region threading
|
||||
container.setChanged();
|
||||
- return true;
|
||||
+ } else {
|
||||
+ container.setChanged(); // original logic always marks source inv as changed even if no move happens.
|
||||
+ movedItem.setCount(movedItemCount);
|
||||
+
|
||||
+ if (!worldData.skipPullModeEventFire) {
|
||||
+ movedItem = callPullMoveEvent(hopper, container, movedItem);
|
||||
+ if (movedItem == null) { // cancelled
|
||||
@@ -63,13 +79,8 @@ index a858cb658af70f07614fa1f4d9e8a3435d5c161f..4c9d0bcd8820b250b51c06fff4531021
|
||||
+ // site for IMIE did not exhibit the same behavior
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
- IGNORE_TILE_UPDATES.set(true); // Folia - region threading
|
||||
- container.setItem(i, origItemStack);
|
||||
- IGNORE_TILE_UPDATES.set(false); // Folia - region threading
|
||||
- container.setChanged();
|
||||
- return true;
|
||||
+ }
|
||||
+
|
||||
+ final ItemStack remainingItem = addItem(container, hopper, movedItem, null);
|
||||
+ final int remainingItemCount = remainingItem.getCount();
|
||||
+ if (remainingItemCount != movedItemCount) {
|
||||
+18
-18
@@ -9,7 +9,7 @@ Origin patch link: https://github.com/LeavesMC/Leaves/blob/master/leaves-server/
|
||||
Origin license: https://github.com/LeavesMC/Leaves/blob/master/LICENSE.md
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9c930ac97 100644
|
||||
index 0bf23b7ceacf7d962270cb513abce050670c172e..9820d2e18cbcb5fbc07fe57dd93101809ed2727d 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -65,6 +65,10 @@ import java.util.Set;
|
||||
@@ -56,7 +56,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
// connections
|
||||
for (final Connection conn : from.connections) {
|
||||
into.connections.add(conn);
|
||||
@@ -114,16 +144,22 @@ public final class RegionizedWorldData {
|
||||
@@ -111,16 +141,22 @@ public final class RegionizedWorldData {
|
||||
from.fluidLevelTicks.merge(into.fluidLevelTicks, fromRedstoneTimeOffset);
|
||||
|
||||
// tile entity ticking
|
||||
@@ -83,7 +83,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
if (tileEntity != null) {
|
||||
tileEntity.updateTicks(fromTickOffset, fromRedstoneTimeOffset);
|
||||
}
|
||||
@@ -167,6 +203,37 @@ public final class RegionizedWorldData {
|
||||
@@ -164,6 +200,37 @@ public final class RegionizedWorldData {
|
||||
public void split(final RegionizedWorldData from, final int chunkToRegionShift,
|
||||
final Long2ReferenceOpenHashMap<RegionizedWorldData> regionToData,
|
||||
final ReferenceOpenHashSet<RegionizedWorldData> dataSet) {
|
||||
@@ -121,7 +121,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
// connections
|
||||
for (final Connection conn : from.connections) {
|
||||
final ServerPlayer player = conn.getPlayer();
|
||||
@@ -243,8 +310,9 @@ public final class RegionizedWorldData {
|
||||
@@ -237,8 +304,9 @@ public final class RegionizedWorldData {
|
||||
from.fluidLevelTicks.split(chunkToRegionShift, levelTicksFluidRegionData);
|
||||
|
||||
// tile entity ticking
|
||||
@@ -133,7 +133,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
final int chunkX = pos.getX() >> 4;
|
||||
final int chunkZ = pos.getZ() >> 4;
|
||||
|
||||
@@ -254,8 +322,9 @@ public final class RegionizedWorldData {
|
||||
@@ -248,8 +316,9 @@ public final class RegionizedWorldData {
|
||||
} // else: when a chunk unloads, it does not actually _remove_ the tile entity from the list, it just gets
|
||||
// marked as removed. So if there is no section, it's probably removed!
|
||||
}
|
||||
@@ -145,7 +145,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
final int chunkX = pos.getX() >> 4;
|
||||
final int chunkZ = pos.getZ() >> 4;
|
||||
|
||||
@@ -488,6 +557,11 @@ public final class RegionizedWorldData {
|
||||
@@ -483,6 +552,11 @@ public final class RegionizedWorldData {
|
||||
public final io.papermc.paper.redstone.RedstoneWireTurbo turbo;
|
||||
// Environment attribute system
|
||||
public Reference2ObjectOpenHashMap<EnvironmentAttribute<?>, EnvironmentAttributeSystem.ValueSampler<?>> attributeSamplers;
|
||||
@@ -240,7 +240,7 @@ index 6e08d50794c4af4405f3e164a3fd46f376b3f78f..dd2d0940eece3e85078e574f66f71a4c
|
||||
|
||||
int getContainerSize();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 90b5d7806af8913735c4105b6e347bfdb78094e0..0ba8f401c9cd0e15187b4faee78667c543fded92 100644
|
||||
index 23dc3a2c0c124d842cf23e35b4a5d079d5d523da..5c2a2bc340f41fab8c1399b89708b41d0e4c670d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -324,7 +324,7 @@ public abstract class Entity
|
||||
@@ -252,7 +252,7 @@ index 90b5d7806af8913735c4105b6e347bfdb78094e0..0ba8f401c9cd0e15187b4faee78667c5
|
||||
private final VecDeltaCodec packetPositionCodec = new VecDeltaCodec();
|
||||
public boolean needsSync;
|
||||
public boolean syncPosition;
|
||||
@@ -4471,11 +4471,13 @@ public abstract class Entity
|
||||
@@ -4473,11 +4473,13 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
protected Entity transformForAsyncTeleport(ServerLevel destination, Vec3 pos, Float yaw, Float pitch, Vec3 velocity) {
|
||||
@@ -266,7 +266,7 @@ index 90b5d7806af8913735c4105b6e347bfdb78094e0..0ba8f401c9cd0e15187b4faee78667c5
|
||||
if (copy instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Luminol - Sync dragon part when teleportation or firstly created
|
||||
// vanilla code used to call remove _after_ copying, and some stuff is required to be after copy - so add hook here
|
||||
// for example, clearing of inventory after switching dimensions
|
||||
@@ -6151,8 +6153,29 @@ public abstract class Entity
|
||||
@@ -6153,8 +6155,29 @@ public abstract class Entity
|
||||
this.setBoundingBox(this.makeBoundingBox());
|
||||
}
|
||||
// Paper end - Block invalid positions and bounding box
|
||||
@@ -1573,7 +1573,7 @@ index 6109d8da984b398bb1eb6cd6ab9a55f0511a615c..1109013d0d321f96a11fc4eb437aecaf
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c3846185470ce4 100644
|
||||
index 95f0b3276137cb9d1fc296e97cc25a08a5200c95..019a320abd6d671e7df99ed9628ad021142be0f7 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -27,8 +27,29 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
@@ -1660,7 +1660,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -406,6 +447,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -418,6 +459,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
private static void applyCooldown(final Hopper hopper) {
|
||||
if (hopper instanceof HopperBlockEntity blockEntity && blockEntity.getLevel() != null) {
|
||||
blockEntity.setCooldown(blockEntity.getLevel().spigotConfig.hopperTransfer);
|
||||
@@ -1668,7 +1668,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,12 +491,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -461,12 +503,20 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
// Paper end - Perf: Optimize Hoppers
|
||||
|
||||
private static boolean ejectItems(final Level level, final BlockPos blockPos, final HopperBlockEntity self) {
|
||||
@@ -1690,7 +1690,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
if (isFullContainer(container, direction)) {
|
||||
return false;
|
||||
}
|
||||
@@ -510,13 +560,21 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -522,13 +572,21 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
io.papermc.paper.threadedregions.RegionizedWorldData worldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData(); // Folia - region threading
|
||||
BlockPos blockPos = BlockPos.containing(hopper.getLevelX(), hopper.getLevelY() + 1.0, hopper.getLevelZ());
|
||||
BlockState blockState = level.getBlockState(blockPos);
|
||||
@@ -1716,7 +1716,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -527,7 +585,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -539,7 +597,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
&& blockState.isCollisionShapeFullBlock(level, blockPos)
|
||||
&& !blockState.is(BlockTags.DOES_NOT_BLOCK_HOPPERS);
|
||||
if (!isBlocked) {
|
||||
@@ -1725,7 +1725,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
if (addItem(hopper, entity)) {
|
||||
return true;
|
||||
}
|
||||
@@ -649,7 +707,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -661,7 +719,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
|
||||
// CraftBukkit start
|
||||
private static @Nullable Container runHopperInventorySearchEvent(
|
||||
@@ -1734,7 +1734,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
org.bukkit.craftbukkit.block.CraftBlock hopper,
|
||||
org.bukkit.craftbukkit.block.CraftBlock searchLocation,
|
||||
org.bukkit.event.inventory.HopperInventorySearchEvent.ContainerType containerType
|
||||
@@ -775,6 +833,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -787,6 +845,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
}
|
||||
|
||||
public void setCooldown(final int time) {
|
||||
@@ -1754,7 +1754,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
this.cooldownTime = time;
|
||||
}
|
||||
|
||||
@@ -794,6 +865,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -806,6 +877,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@Override
|
||||
protected void setItems(final NonNullList<ItemStack> items) {
|
||||
this.items = items;
|
||||
@@ -1762,7 +1762,7 @@ index 4c9d0bcd8820b250b51c06fff4531021ab57d408..18e6dd47b0525531bae56e0ab3c38461
|
||||
}
|
||||
|
||||
public static void entityInside(final Level level, final BlockPos pos, final BlockState blockState, final Entity entity, final HopperBlockEntity hopper) {
|
||||
@@ -808,4 +880,758 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -820,4 +892,758 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
protected AbstractContainerMenu createMenu(final int containerId, final Inventory inventory) {
|
||||
return new HopperMenu(containerId, inventory, this);
|
||||
}
|
||||
+3
-3
@@ -8,7 +8,7 @@ As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/f553c53e4230aa032e54
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb9df22ed1 100644
|
||||
index 1bd8ae7e1250a56cff636b010c371144adbb7ad0..6b0856e836f041aa8bfe274d0444d6ce3165b1ce 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -644,7 +644,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -29,7 +29,7 @@ index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb
|
||||
fail = true;
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", vehicle.getPlainTextName(), this.player.getPlainTextName(), Math.sqrt(movedDist));
|
||||
}
|
||||
@@ -1614,7 +1614,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1615,7 +1615,7 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
if (this.shouldCheckPlayerMovement(isFallFlying)) {
|
||||
float metersPerTick = isFallFlying ? 300.0F : 100.0F;
|
||||
@@ -38,7 +38,7 @@ index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb
|
||||
// CraftBukkit end
|
||||
// Paper start - Add fail move event
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
|
||||
@@ -1675,7 +1675,8 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1676,7 +1676,8 @@ public class ServerGamePacketListenerImpl
|
||||
zDist = targetZ - this.player.getZ();
|
||||
movedDist = xDist * xDist + yDist * yDist + zDist * zDist;
|
||||
boolean movedWrongly = false; // Paper - Add fail move event; rename
|
||||
+2
-2
@@ -8,7 +8,7 @@ As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/4ade1001e4dd19c47d95
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EnderDragonFight.java b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..3388bf5d2cff00b397af1dd7b9ab93669985b35c 100644
|
||||
index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..7c68effb78bcb17ca64e043f87d6449f90b1b0a7 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
@@ -317,7 +317,67 @@ public class EnderDragonFight extends SavedData {
|
||||
@@ -21,7 +21,7 @@ index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..3388bf5d2cff00b397af1dd7b9ab9366
|
||||
+ private int cachePortalOriginIteratorY = -1;
|
||||
+
|
||||
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
||||
+ if (me.earthme.luminol.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.optimizedDragonRespawn) { // Lophine - redirect
|
||||
+ int i, j;
|
||||
+ for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
||||
+ for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
||||
+3
-3
@@ -10,10 +10,10 @@ VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 0ba8f401c9cd0e15187b4faee78667c543fded92..ae0504263666103a588b6855cb27304582c38938 100644
|
||||
index 5c2a2bc340f41fab8c1399b89708b41d0e4c670d..16e4d2f3193080c177d7ceb225fa9637b3ec1842 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1155,8 +1155,14 @@ public abstract class Entity
|
||||
@@ -1156,8 +1156,14 @@ public abstract class Entity
|
||||
private double moveStartY;
|
||||
private double moveStartZ;
|
||||
// Paper end - detailed watchdog information
|
||||
@@ -28,7 +28,7 @@ index 0ba8f401c9cd0e15187b4faee78667c543fded92..ae0504263666103a588b6855cb273045
|
||||
final Vec3 originalMovement = delta; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -5645,6 +5651,11 @@ public abstract class Entity
|
||||
@@ -5647,6 +5653,11 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
public final void setBoundingBox(final AABB bb) {
|
||||
+1
-1
@@ -57,7 +57,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 85eed61919b3c2ef93943e1c1b50fbcbca6fb319..3fda5043937af3d66ab44c41b7e76822a3ddf53b 100644
|
||||
index 1024e68e1e3344b02c6e37c501a4ac989f486463..2e84df044e65d2f145a190d1bbbb7de205d85e77 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1059,7 +1059,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
+4
-4
@@ -20,10 +20,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index ae0504263666103a588b6855cb27304582c38938..92cb0b1722bd5bcf9996c3f6b9b62c980b70e229 100644
|
||||
index 16e4d2f3193080c177d7ceb225fa9637b3ec1842..e3dd3a2e0e38eef886ecc46750c54e83756f4bde 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2441,8 +2441,8 @@ public abstract class Entity
|
||||
@@ -2442,8 +2442,8 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
public void push(final Entity entity) {
|
||||
@@ -31,5 +31,5 @@ index ae0504263666103a588b6855cb27304582c38938..92cb0b1722bd5bcf9996c3f6b9b62c98
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
- if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
|
||||
double xa = entity.getX() - this.getX();
|
||||
double za = entity.getZ() - this.getZ();
|
||||
// Paper start - Add EntityCollideWithEntity Event
|
||||
if (io.papermc.paper.event.entity.EntityCollideWithEntityEvent.getHandlerList().getRegisteredListeners().length != 0 &&
|
||||
+2
-2
@@ -7,10 +7,10 @@ License: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://github.com/GaleMC/Gale
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 92cb0b1722bd5bcf9996c3f6b9b62c980b70e229..43e07a3c98e80f874f55411beac39e215ffdc3cf 100644
|
||||
index e3dd3a2e0e38eef886ecc46750c54e83756f4bde..9d2e62c4c5cd0668a9083c7af9abed96b4589f7f 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1302,8 +1302,17 @@ public abstract class Entity
|
||||
@@ -1303,8 +1303,17 @@ public abstract class Entity
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user