Compare commits
309 Commits
release-17
...
old/1.21.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd642eb8d6 | ||
|
|
22bcf63585 | ||
|
|
86b9aa41cc | ||
|
|
e55f818ab2 | ||
|
|
e54f3fcf11 | ||
|
|
3f15d7a684 | ||
|
|
851cab54e0 | ||
|
|
f63645c2fb | ||
|
|
8062ccb4ed | ||
|
|
c0d36db38d | ||
|
|
62f90e3fba | ||
|
|
2986abeee1 | ||
|
|
fc38239b61 | ||
|
|
cfe2db6181 | ||
|
|
8975d5676b | ||
|
|
3e1399c421 | ||
|
|
d110f25a23 | ||
|
|
7543f3adbd | ||
|
|
6a16940e2b | ||
|
|
5596d998c1 | ||
|
|
75fad4cd35 | ||
|
|
f476809251 | ||
|
|
269cbb507b | ||
|
|
54dfd7163a | ||
|
|
d975acec6b | ||
|
|
72565bec8e | ||
|
|
05215498c3 | ||
|
|
ae94d43098 | ||
|
|
8889a877d6 | ||
|
|
e915eadfad | ||
|
|
28ce30ec48 | ||
|
|
dd8042f88a | ||
|
|
54bc879a9e | ||
|
|
33701c1eca | ||
|
|
2028e19bf8 | ||
|
|
7a7a88a7bb | ||
|
|
8860cedaf7 | ||
|
|
527b6c7eaf | ||
|
|
e37f05bd87 | ||
|
|
dfb64f50db | ||
|
|
69d4f4bf86 | ||
|
|
64802e7e50 | ||
|
|
a313424212 | ||
|
|
fa3c15b4f3 | ||
|
|
393e079743 | ||
|
|
90d412bbf3 | ||
|
|
98cf5b2d13 | ||
|
|
32243963f5 | ||
|
|
72183c64b9 | ||
|
|
f7998d1955 | ||
|
|
58ddbf4dd6 | ||
|
|
3484117415 | ||
|
|
bff96101bb | ||
|
|
6b54d11f9c | ||
|
|
08a067e974 | ||
|
|
46433f7303 | ||
|
|
72415ee5f2 | ||
|
|
6d7683503c | ||
|
|
6a7a817c0d | ||
|
|
c531844986 | ||
|
|
e721df9890 | ||
|
|
44f2749fe5 | ||
|
|
451d2cc363 | ||
|
|
da6e51f141 | ||
|
|
acb774fbb8 | ||
|
|
ad01d8a450 | ||
|
|
45fe520135 | ||
|
|
2c85fd3304 | ||
|
|
443f09d9e7 | ||
|
|
1d63c3808d | ||
|
|
cbeb17c8e8 | ||
|
|
5557065f36 | ||
|
|
4f2deab03f | ||
|
|
b099cccffb | ||
|
|
c2f67d1f59 | ||
|
|
fd98985104 | ||
|
|
75f88071bc | ||
|
|
e6586daeaa | ||
|
|
305ff4d587 | ||
|
|
5a966df572 | ||
|
|
0d05ccbffc | ||
|
|
6d70d2180f | ||
|
|
15a9cac376 | ||
|
|
c3681a26f5 | ||
|
|
33812e0bc8 | ||
|
|
7ef7531cd3 | ||
|
|
d75427a54e | ||
|
|
9dbff3634b | ||
|
|
64df11da56 | ||
|
|
892269673e | ||
|
|
e5158825bf | ||
|
|
09d30a5d9f | ||
|
|
718927ee70 | ||
|
|
63e37b3633 | ||
|
|
6e591f2d3f | ||
|
|
34fef470e5 | ||
|
|
069250da59 | ||
|
|
4a3d274bda | ||
|
|
930ef33a61 | ||
|
|
ace7a1abe9 | ||
|
|
10ddca5626 | ||
|
|
da7a4324cd | ||
|
|
7c8614f897 | ||
|
|
151f97c9c7 | ||
|
|
225708db0a | ||
|
|
6bb6091980 | ||
|
|
f0c635282d | ||
|
|
14981765c5 | ||
|
|
386d064269 | ||
|
|
6123e40664 | ||
|
|
b5e0e31e3e | ||
|
|
0a8bd76ac3 | ||
|
|
e88cac21e4 | ||
|
|
040724b445 | ||
|
|
531a3bbe3e | ||
|
|
dd781d2610 | ||
|
|
4810a20e50 | ||
|
|
fac51e8b64 | ||
|
|
1cd33a9a1d | ||
|
|
b4737f1a07 | ||
|
|
ab38e33809 | ||
|
|
71243ee5e6 | ||
|
|
90e0b1b857 | ||
|
|
71e7a6f43f | ||
|
|
c655047139 | ||
|
|
ce17ed2020 | ||
|
|
e765830ef2 | ||
|
|
a21f3bab8a | ||
|
|
491c491ba6 | ||
|
|
4815251655 | ||
|
|
4fc2eec8b7 | ||
|
|
39a32b7ea3 | ||
|
|
5b5d1c1281 | ||
|
|
aede6b2591 | ||
|
|
d526550c66 | ||
|
|
8e50bc4b0c | ||
|
|
e25871e11c | ||
|
|
75f1875e4b | ||
|
|
f495171031 | ||
|
|
9b1303d849 | ||
|
|
cee005f2b9 | ||
|
|
6b4bc276a0 | ||
|
|
39728823f0 | ||
|
|
a479b3e02f | ||
|
|
e4ca876d98 | ||
|
|
38c2cfa282 | ||
|
|
3852ef88c4 | ||
|
|
03821dffe9 | ||
|
|
02143d8487 | ||
|
|
83e396bde6 | ||
|
|
bdc88bc21f | ||
|
|
2a7f161519 | ||
|
|
1338975cb7 | ||
|
|
07d5d1a905 | ||
|
|
1c4ffc2a14 | ||
|
|
e20a613029 | ||
|
|
fca7f237b6 | ||
|
|
1a296539b9 | ||
|
|
8170f1f246 | ||
|
|
e12e3db7ef | ||
|
|
04203941c1 | ||
|
|
33db373ae2 | ||
|
|
67b1959f31 | ||
|
|
f16785b526 | ||
|
|
d9b45e9b07 | ||
|
|
9d97d0d9bd | ||
|
|
71c863456f | ||
|
|
c33c06589f | ||
|
|
ec6ce69526 | ||
|
|
9686a72d0d | ||
|
|
90de54692c | ||
|
|
9a288453bc | ||
|
|
db8e9122cb | ||
|
|
63bd308315 | ||
|
|
707c138318 | ||
|
|
bcb9a051af | ||
|
|
2e182c5aaa | ||
|
|
62fab39558 | ||
|
|
0309438d9f | ||
|
|
e071249ed1 | ||
|
|
d4cbc57b49 | ||
|
|
dc0856ca65 | ||
|
|
b009259293 | ||
|
|
2008ba2d54 | ||
|
|
fad453c120 | ||
|
|
7b62b795ae | ||
|
|
e5292079fb | ||
|
|
e9b2902304 | ||
|
|
1b3cb0dc53 | ||
|
|
d1572993db | ||
|
|
1474b31ba5 | ||
|
|
11c340c828 | ||
|
|
9502ebf684 | ||
|
|
96ef8b9e4d | ||
|
|
9889ed9b5b | ||
|
|
db9b36463c | ||
|
|
1764af50d7 | ||
|
|
922c33171c | ||
|
|
3c625b1141 | ||
|
|
fa6429f5b6 | ||
|
|
ddc4aeedc0 | ||
|
|
63c63f844e | ||
|
|
0f0f925cb8 | ||
|
|
c0273a9343 | ||
|
|
326a88dca5 | ||
|
|
cb3099170e | ||
|
|
a2120f0c82 | ||
|
|
1c33d683c8 | ||
|
|
ff30483d2c | ||
|
|
3884819fff | ||
|
|
41df279b8b | ||
|
|
8730a4d0a5 | ||
|
|
c357668334 | ||
|
|
9cde439cce | ||
|
|
0290b04ffd | ||
|
|
d63b408e89 | ||
|
|
5efc27e381 | ||
|
|
4042f69c8d | ||
|
|
617172ab6c | ||
|
|
7737cd805a | ||
|
|
4c26d69762 | ||
|
|
078fbd108c | ||
|
|
318376a16f | ||
|
|
74c593fa04 | ||
|
|
c6c048c34f | ||
|
|
017f695244 | ||
|
|
ecbebeb403 | ||
|
|
5bf8a8124e | ||
|
|
3e35bff9a0 | ||
|
|
cb7a348e89 | ||
|
|
eea08a3ecd | ||
|
|
b49ad3f336 | ||
|
|
3ba3fe9814 | ||
|
|
2adeb25bff | ||
|
|
c93e0ff16a | ||
|
|
5c5d10ae4e | ||
|
|
057b293ed5 | ||
|
|
9c54aed53d | ||
|
|
a637a72412 | ||
|
|
8f116cc067 | ||
|
|
8b317976a9 | ||
|
|
986a3f4598 | ||
|
|
5671b24941 | ||
|
|
59b163d8fa | ||
|
|
67c03ea3ec | ||
|
|
d8856b5127 | ||
|
|
a76facf92e | ||
|
|
34162ce62e | ||
|
|
eea18dca7c | ||
|
|
f427c79af9 | ||
|
|
a3142d6319 | ||
|
|
3949e2feb5 | ||
|
|
514495bb90 | ||
|
|
60aa2f51c4 | ||
|
|
ff191c4cca | ||
|
|
8058507e4d | ||
|
|
ef2cf1d921 | ||
|
|
e1445c2d7d | ||
|
|
8c84468144 | ||
|
|
9e6a4071bb | ||
|
|
567c2be31a | ||
|
|
37621427cf | ||
|
|
8a64698c4e | ||
|
|
acf6e2df01 | ||
|
|
1f0f3fe45f | ||
|
|
9237ea8410 | ||
|
|
e622c64617 | ||
|
|
6ddb56dde7 | ||
|
|
d598e114a6 | ||
|
|
f6a1d5825f | ||
|
|
0c997c2e0c | ||
|
|
8c336c7e8e | ||
|
|
af9f9f76f3 | ||
|
|
ed191511cf | ||
|
|
f0e1e58914 | ||
|
|
6bf0230eb6 | ||
|
|
11623bf432 | ||
|
|
23e724232e | ||
|
|
4193f4b1aa | ||
|
|
bb4a0d5d54 | ||
|
|
4e89f2a271 | ||
|
|
5184e6e4c1 | ||
|
|
d644aad71e | ||
|
|
5e4f190507 | ||
|
|
b4836df2f1 | ||
|
|
aac53a4a99 | ||
|
|
6745278fd3 | ||
|
|
d890f1a3d8 | ||
|
|
7d176f7404 | ||
|
|
9b5e4e162c | ||
|
|
d96d3069d7 | ||
|
|
31ab8fd1f4 | ||
|
|
e97aefe2a7 | ||
|
|
a4f2120454 | ||
|
|
84f31480cb | ||
|
|
9937ef0e3b | ||
|
|
41b1677130 | ||
|
|
26154a8a1a | ||
|
|
1cc6619c3d | ||
|
|
472833fe85 | ||
|
|
257f3db70f | ||
|
|
d87eaf8a8b | ||
|
|
58818c543a | ||
|
|
170e37b1a8 | ||
|
|
fd6b333892 | ||
|
|
9d437f2fb7 | ||
|
|
0e3c7ce677 | ||
|
|
f8a60b0396 | ||
|
|
4aa7f613a7 |
40
.editorconfig
Normal file
40
.editorconfig
Normal file
@@ -0,0 +1,40 @@
|
||||
[*]
|
||||
charset=utf-8
|
||||
end_of_line=lf
|
||||
insert_final_newline=true
|
||||
indent_style=space
|
||||
indent_size=4
|
||||
ij_any_block_comment_add_space = false
|
||||
ij_any_block_comment_at_first_column = false
|
||||
ij_any_line_comment_at_first_column = false
|
||||
ij_any_line_comment_add_space = true
|
||||
max_line_length = 120
|
||||
ij_visual_guides = 16, 80
|
||||
|
||||
[*.tiny]
|
||||
indent_style=tab
|
||||
|
||||
[*.bat]
|
||||
end_of_line=crlf
|
||||
|
||||
[*.yml]
|
||||
indent_size=2
|
||||
ij_visual_guides = 8, 80
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace=false
|
||||
|
||||
[*.java]
|
||||
ij_continuation_indent_size = 4
|
||||
ij_java_class_count_to_use_import_on_demand = 999999
|
||||
ij_java_insert_inner_class_imports = false
|
||||
ij_java_names_count_to_use_import_on_demand = 999999
|
||||
ij_java_imports_layout = *,|,$*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
|
||||
[*-Server/src/main/resources/data/**/*.json]
|
||||
indent_size = 2
|
||||
|
||||
[paper-api-generator/generated/**/*.java]
|
||||
ij_java_imports_layout = $*,|,*
|
||||
7
.gitattributes
vendored
Normal file
7
.gitattributes
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
* text=auto eol=lf
|
||||
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
||||
*.bat text eol=crlf
|
||||
|
||||
*.jar binary
|
||||
BIN
.github/assets/logo.png
vendored
BIN
.github/assets/logo.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 176 KiB |
BIN
.github/assets/title.png
vendored
BIN
.github/assets/title.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 107 KiB |
107
.github/workflows/build.yml
vendored
107
.github/workflows/build.yml
vendored
@@ -1,107 +0,0 @@
|
||||
name: Build Plazma
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
ORG_NAME: PlazmaMC
|
||||
MC_VERSION: 1.19.4
|
||||
MAIN_BRANCH: ver/1.19.4
|
||||
DEBUG: 'false'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
base_jdk: [19]
|
||||
graal: [latest]
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout action
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Checkout pages
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: javadoc
|
||||
ref: gh-pages
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up GraalVM ${{ matrix.base_jdk }}
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT }}
|
||||
java-version: ${{ matrix.base_jdk }}
|
||||
version: ${{ matrix.graal }}
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Configure Git
|
||||
run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
|
||||
- name: Apply Patches
|
||||
run: ./gradlew applyPatches --stacktrace
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Create Reobf Jar
|
||||
run: ./gradlew createReobfPaperclipJar --stacktrace
|
||||
|
||||
- name: Create Mojmap Jar
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Update Javadoc
|
||||
continue-on-error: true
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
run: |
|
||||
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
||||
cd javadoc
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push
|
||||
|
||||
- name: Publish Packages
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
run: |
|
||||
export GITHUB_USERNAME=${{ env.ORG_NAME }}
|
||||
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
|
||||
./gradlew publish --stacktrace
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: env.DEBUG == 'true' || !startsWith(github.ref_name, 'ver/')
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artifacts
|
||||
path: |
|
||||
build/libs
|
||||
Plazma-API/build/docs/javadoc
|
||||
|
||||
- name: Get Release Number
|
||||
run: echo "RELEASE=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
- name: Release Artifacts
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
title: "Release #${{ env.RELEASE }}"
|
||||
automatic_release_tag: release-${{ env.RELEASE }}
|
||||
repo_token: "${{ secrets.GH_PAT }}"
|
||||
files: build/libs/*.jar
|
||||
prerelease: false
|
||||
|
||||
- name: Release Artifacts (Latest)
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
title: "Release #${{ env.RELEASE }}"
|
||||
automatic_release_tag: latest-${{ env.MC_VERSION }}
|
||||
repo_token: "${{ secrets.GH_PAT }}"
|
||||
files: build/libs/*.jar
|
||||
prerelease: false
|
||||
14
.github/workflows/close-invalid-prs.yml
vendored
14
.github/workflows/close-invalid-prs.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: Close invalid PRs
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && !startsWith(github.head_ref, 'ver/') }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
|
||||
20
.github/workflows/gradle.yml
vendored
20
.github/workflows/gradle.yml
vendored
@@ -2,28 +2,34 @@ name: Test Gradle build script
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
|
||||
branches: [ "ver/*", "dev/*", "feat/**/*" ]
|
||||
paths:
|
||||
- "*.kt"
|
||||
- "*.kts"
|
||||
- "*.toml"
|
||||
- "gradle-wrapper.*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
check:
|
||||
name: Test Gradle build script
|
||||
strategy:
|
||||
matrix:
|
||||
jdk: [19.0.2+7]
|
||||
java: ['temurin']
|
||||
jdk: [21]
|
||||
java: ['zulu']
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
if: "!contains(github.event.commits[0].message, '[CheckSkip]')"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout action
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
uses: gradle/actions/wrapper-validation@v4
|
||||
|
||||
- name: Set up JDK ${{ matrix.java }} ${{ matrix.jdk }}
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: ${{ matrix.java }}
|
||||
java-version: ${{ matrix.jdk }}
|
||||
|
||||
46
.github/workflows/javadocs.yml
vendored
46
.github/workflows/javadocs.yml
vendored
@@ -1,46 +0,0 @@
|
||||
name: Deploy Javadocs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["gh-pages"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
12
.github/workflows/release.yaml
vendored
Normal file
12
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
name: Release Plazma
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/*", "dev/*", "feat/**/*" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release Plazma (${{ github.ref_name }})
|
||||
uses: PlazmaMC/PlazmaBukkit/.github/workflows/global.yaml@main
|
||||
secrets: inherit
|
||||
36
.github/workflows/test.yml
vendored
36
.github/workflows/test.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Test build with Normal JDK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
jdk: [19.0.2+7]
|
||||
java: ['temurin']
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout action
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK ${{ matrix.java }} ${{ matrix.jdk }}
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: ${{ matrix.java }}
|
||||
java-version: ${{ matrix.jdk }}
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
|
||||
./gradlew applyPatches --stacktrace
|
||||
./gradlew build --stacktrace
|
||||
17
.gitignore
vendored
17
.gitignore
vendored
@@ -18,11 +18,16 @@ out/
|
||||
nbproject/
|
||||
nbactions.xml
|
||||
|
||||
# vscode
|
||||
.vscode/
|
||||
|
||||
# Gradle
|
||||
!gradle-wrapper.jar
|
||||
.gradle/
|
||||
build/
|
||||
*/build/
|
||||
run/
|
||||
javadoc/
|
||||
|
||||
# we use maven!
|
||||
build.xml
|
||||
@@ -33,7 +38,6 @@ target/
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
# various other potential build files
|
||||
build/
|
||||
bin/
|
||||
dist/
|
||||
manifest.mf
|
||||
@@ -48,12 +52,13 @@ manifest.mf
|
||||
# Linux temp files
|
||||
*~
|
||||
|
||||
# other stuff
|
||||
run/
|
||||
javadoc/
|
||||
|
||||
# Paperweight
|
||||
build-data/
|
||||
*-API
|
||||
*-MojangAPI
|
||||
*-Server
|
||||
*.jar
|
||||
paper-api-generator
|
||||
compare.txt
|
||||
*.patch
|
||||
!patches/**/*
|
||||
upstream
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
purpurCommit = bd5c4b67e6bdb6d2d6d67fd9bc63bbd99b24ab78
|
||||
pufferfishCommit = 751dfb0338e2c09519313ffaca04084dc3140b80
|
||||
13
FixupAPI.sh
13
FixupAPI.sh
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupAPI
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-API
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
|
||||
cd ../
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupServer
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-Server
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
|
||||
cd ../
|
||||
14
PatchAPI.sh
14
PatchAPI.sh
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PatchAPI <Patch Name>
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-API
|
||||
|
||||
git add .
|
||||
git commit -m $1
|
||||
|
||||
cd ../
|
||||
|
||||
./gradlew rebuildAPIPatches
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PatchServer <Patch Name>
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-Server
|
||||
|
||||
git add .
|
||||
git commit -m $1
|
||||
|
||||
cd ../
|
||||
|
||||
./gradlew rebuildServerPatches
|
||||
50
README.md
50
README.md
@@ -1,48 +1,24 @@
|
||||
<div align="center">
|
||||
|
||||

|
||||
[](https://github.com/PlazmaMC/Plazma)
|
||||
|
||||
### A Server Platform for Minecraft: Java Edition based on [Paper](https://github.com/PaperMC/Paper)
|
||||
|
||||
[](README.md)
|
||||
[](https://github.com/PlazmaMC/Plazma/actions/workflows/build.yml?query=branch:ver/1.19.4)
|
||||
[](https://github.com/PlazmaMC/AlwaysUpToDate/actions/workflows/plazma.yml)
|
||||
[](https://plazmamc.org/discord)
|
||||
[](LICENSE.md)
|
||||
[](https://plazmamc.org/downloads)
|
||||
|
||||
[](LICENSE)
|
||||
[](https://discord.gg/MmfC52K8A8)
|
||||
[](https://github.com/PlazmaMC/Plazma/releases/latest-1.19.4)
|
||||
[](https://plazmamc.org/downloads)
|
||||
[](https://github.com/PlazmaMC/Plazma/stargazers)
|
||||
[](https://github.com/PlazmaMC/Plazma/forks)
|
||||
[](https://github.com/PlazmaMC/Plazma/watchers)
|
||||
|
||||
[](https://github.com/PlazmaMC/Plazma/releases/tag/latest-1.19.4)
|
||||
[](https://github.com/PlazmaMC/Plazma/stargazers)
|
||||
[](https://github.com/PPlazmaMC/Plazma/network/members)
|
||||
[](https://github.com/PlazmaMC/Plazma/watchers)
|
||||
### [⬇️ Downloads](https://plazmamc.org/downloads)
|
||||
|
||||
</div>
|
||||
|
||||
## ⚠️ Warning
|
||||
- Plazma may cause **<u>unexpected problems</u>**, so **don't use** it in production server!
|
||||
[main]: https://github.com/PlazmaMC/PlazmaBukkit/blob/main/README.md
|
||||
|
||||
## 💬 About Plazma...
|
||||
- **Plazma** is created from the merger of **[Andromeda](https://github.com/TeamEarendel/Andromeda)** and **[Fusion](https://github.com/RuinedTechnologyUnify/Fusion)**
|
||||
- Compatible and effective patches from other bukkits and mods
|
||||
- We're always trying to keep it compatible and performance high.
|
||||
|
||||
## ⚙️ Features
|
||||
- **Based on [Paper](https://github.com/PaperMC/Paper)** - Most plugins of Bukkit, Craft Bukkit, Spigot, and Paper are available
|
||||
- **Including [Pufferfish](https://github.com/pufferfish-gg/Pufferfish) and [Purpur](https://github.com/PurpurMC/Purpur)** - Provides multiple optimizations and customizations
|
||||
|
||||
## ⬇️ Downloads
|
||||
- You can download the file from [Releases](https://github.com/PlazmaMC/Plazma/releases)
|
||||
- Direct latest download: [Click here](https://github.com/PlazmaMC/Plazma/releases/download/latest-1.19.4/plazma-paperclip-1.19.4-R0.1-SNAPSHOT-reobf.jar)
|
||||
- NOTE: If you don't know about Mojmap or Bundler, download `plazma-paperclip-*-reobf.jar`
|
||||
|
||||
## ⚖️ License
|
||||
- This project and all patches are licensed under the [MIT license](LICENSE.md) unless otherwise noted in the patch headers.
|
||||
|
||||
## 🌀 Sponsorship - Minecraft Development Dictionary (KOREAN)
|
||||
[](https://discord.gg/AZwXTA9Pgx)
|
||||
- 한글로 번역&정리된 Minecraft와 서드파티 버킷들의 소식들을 빠르게 만나볼 수 있습니다.
|
||||
- Skript와 Plugin등 서버 개발과 관련된 질문에 대한 답변을 받으실 수 있습니다.
|
||||
|
||||
## 📈 bStats
|
||||
[](https://bstats.org/plugin/server-implementation/Plazma/18047)
|
||||
> [!IMPORTANT]
|
||||
This is the branch for Plazma 1.21.2/3. If you want to know more about Plazma, please check the **[main branch][main]**.<br>
|
||||
이곳은 플라즈마의 1.21.2/3용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 분기][main]** 를 확인해주세요.
|
||||
|
||||
14
build-data/dev-imports.txt
Normal file
14
build-data/dev-imports.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
# You can use this file to import files from minecraft libraries into the project
|
||||
# format:
|
||||
# <artifactId> <fileName>
|
||||
# both fully qualified and a file based syntax are accepted for <fileName>:
|
||||
# authlib com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
||||
# datafixerupper com.mojang.datafixers.DataFixerBuilder
|
||||
# datafixerupper com/mojang/datafixers/util/Either.java
|
||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
|
||||
# mc_data chat_type/chat.json
|
||||
# mc_data dimension_type/overworld.json
|
||||
#
|
||||
213
build.gradle.kts
213
build.gradle.kts
@@ -1,111 +1,166 @@
|
||||
import io.papermc.paperweight.patcher.*
|
||||
import io.papermc.paperweight.util.*
|
||||
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
java
|
||||
`kotlin-dsl`
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.5.3"
|
||||
`always-up-to-date`
|
||||
alias(libs.plugins.shadow) apply false
|
||||
alias(libs.plugins.paperweight)
|
||||
}
|
||||
|
||||
val jdkVersion = property("jdkVersion").toString().toInt()
|
||||
kotlin.jvmToolchain(jdkVersion)
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/") {
|
||||
content {
|
||||
onlyForConfigurations(PAPERCLIP_CONFIG)
|
||||
}
|
||||
maven("https://repo.papermc.io/repository/maven-public/") { name = "papermc"
|
||||
content { onlyForConfigurations(configurations.paperclip.name) }
|
||||
}
|
||||
maven("https://repo.codemc.io/repository/maven-public/") { name = "codemc" }
|
||||
maven("https://jitpack.io") { name = "jitpack" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.605.2")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
remapper(libs.remapper)
|
||||
paperclip(libs.paperclip)
|
||||
decompiler(libs.decompiler)
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
val brandName: String by project
|
||||
val providerRepo: String by project
|
||||
paperweight {
|
||||
serverProject = project(":${brandName.lowercase()}-server")
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
remapRepo = "https://repo.papermc.io/repository/maven-public/"
|
||||
decompileRepo = "https://repo.papermc.io/repository/maven-public/"
|
||||
|
||||
useStandardUpstream("paper") {
|
||||
url = github("PaperMC", "Paper-archive")
|
||||
ref = providers.gradleProperty("paperCommit")
|
||||
|
||||
withStandardPatcher {
|
||||
baseName("Paper")
|
||||
|
||||
apiPatchDir.set(projectDir.resolve("patches/api"))
|
||||
apiOutputDir.set(projectDir.resolve("$brandName-API"))
|
||||
|
||||
serverPatchDir.set(projectDir.resolve("patches/server"))
|
||||
serverOutputDir.set(projectDir.resolve("$brandName-Server"))
|
||||
}
|
||||
|
||||
patchTasks.register("generatedApi") {
|
||||
isBareDirectory = true
|
||||
upstreamDirPath = "paper-api-generator/generated"
|
||||
patchDir = projectDir.resolve("patches/generated-api")
|
||||
outputDir = projectDir.resolve("paper-api-generator/generated")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
applyPatches {
|
||||
dependsOn("applyGeneratedApiPatches")
|
||||
}
|
||||
|
||||
rebuildPatches {
|
||||
dependsOn("rebuildGeneratedApiPatches")
|
||||
}
|
||||
|
||||
generateDevelopmentBundle {
|
||||
apiCoordinates.set("${project.group}:${brandName.lowercase()}-api")
|
||||
libraryRepositories.addAll(
|
||||
"https://repo1.maven.org/maven2/",
|
||||
"https://papermc.io/repo/repository/maven-public/",
|
||||
"https://repo.codemc.io/repository/maven-public/",
|
||||
"https://jitpack.io",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
publishing.publications.create<MavenPublication>("devBundle") {
|
||||
artifact(tasks.generateDevelopmentBundle) { artifactId = "dev-bundle" }
|
||||
}
|
||||
|
||||
val mavenUsername: String? by project
|
||||
val mavenPassword: String? by project
|
||||
allprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(jdkVersion))
|
||||
|
||||
publishing.repositories.maven("https://maven.pkg.github.com/$providerRepo") {
|
||||
name = "github"
|
||||
|
||||
credentials {
|
||||
username = mavenUsername ?: System.getenv("GRADLE_PROPERTY_MAVEN_USERNAME") ?: System.getenv("MAVEN_USERNAME")
|
||||
password = mavenPassword ?: System.getenv("GRADLE_PROPERTY_MAVEN_PASSWORD") ?: System.getenv("MAVEN_PASSWORD")
|
||||
}
|
||||
}
|
||||
|
||||
publishing.repositories.maven("https://repo.codemc.io/repository/maven-snapshots/") {
|
||||
name = "codemc"
|
||||
|
||||
credentials {
|
||||
username = mavenUsername ?: System.getenv("GRADLE_PROPERTY_MAVEN_USERNAME") ?: System.getenv("MAVEN_USERNAME")
|
||||
password = mavenPassword ?: System.getenv("GRADLE_PROPERTY_MAVEN_PASSWORD") ?: System.getenv("MAVEN_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
tasks.withType<ProcessResources> {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
minHeapSize = "2g"
|
||||
maxHeapSize = "2g"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://oss.sonatype.org/content/groups/public/")
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
|
||||
maven("https://repo.aikar.co/content/groups/aikar")
|
||||
maven("https://repo.md-5.net/content/repositories/releases/")
|
||||
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
||||
maven("https://jitpack.io")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven("https://repo.papermc.io/repository/maven-public/") { name = "papermc" }
|
||||
maven("https://repo.codemc.io/repository/maven-public/") { name = "codeme" }
|
||||
maven("https://jitpack.io") { name = "jitpack" }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
paperweight {
|
||||
serverProject.set(project(":plazma-server"))
|
||||
|
||||
remapRepo.set("https://maven.fabricmc.net/")
|
||||
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||
|
||||
usePaperUpstream(providers.gradleProperty("paperCommit")) {
|
||||
withPaperPatcher {
|
||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||
apiOutputDir.set(layout.projectDirectory.dir("Plazma-API"))
|
||||
|
||||
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
||||
serverOutputDir.set(layout.projectDirectory.dir("Plazma-Server"))
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release = jdkVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val upstreamTask = tasks.register("updateUpstream") {
|
||||
val tempDir = layout.cacheDir("updateUpstream");
|
||||
val file = "gradle.properties";
|
||||
withType<Javadoc> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
doFirst {
|
||||
val apiResponse = layout.cache.resolve("apiResponse.json");
|
||||
download.get().download("https://api.github.com/repos/PaperMC/Paper/commits/master", apiResponse);
|
||||
val latestCommit = gson.fromJson<paper.libs.com.google.gson.JsonObject>(apiResponse)["sha"].asString;
|
||||
withType<ProcessResources> {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
copy {
|
||||
from(file)
|
||||
into(tempDir)
|
||||
filter { line: String ->
|
||||
line.replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit")
|
||||
withType<Test> {
|
||||
testLogging {
|
||||
showStackTraces = true
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events(TestLogEvent.STANDARD_OUT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from(tempDir.file("gradle.properties"))
|
||||
into(project.file(file).parent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val paperRepoVal = property("paperRepo").toString()
|
||||
val paperBranch = property("paperBranch").toString()
|
||||
val purpurRepoVal = property("purpurRepo").toString()
|
||||
val purpurBranch = property("purpurBranch").toString()
|
||||
val pufferfishRepoVal = property("pufferfishRepo").toString()
|
||||
val pufferfishBranch = property("pufferfishBranch").toString()
|
||||
val isUsePufferfish = property("usePufferfish").toString().toBoolean()
|
||||
alwaysUpToDate {
|
||||
|
||||
paperRepo.set(paperRepoVal)
|
||||
paperRef.set(paperBranch)
|
||||
paperCommitName.set("paperCommit")
|
||||
|
||||
purpurRepo.set(purpurRepoVal)
|
||||
purpurRef.set(purpurBranch)
|
||||
purpurCommitName.set("purpurCommit")
|
||||
|
||||
pufferfishRepo.set(pufferfishRepoVal)
|
||||
pufferfishRef.set(pufferfishBranch)
|
||||
usePufferfish.set(isUsePufferfish)
|
||||
|
||||
}
|
||||
|
||||
31
buildSrc/build.gradle.kts
Normal file
31
buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,31 @@
|
||||
plugins {
|
||||
java
|
||||
`kotlin-dsl`
|
||||
id("com.gradleup.shadow") version "8.3.5"
|
||||
}
|
||||
|
||||
kotlin.jvmToolchain(21)
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
shadow("io.papermc.paperweight:paperweight-patcher:1.6.2-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
jar {
|
||||
finalizedBy(shadowJar)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("buildSrc.jar")
|
||||
configurations = listOf(project.configurations["shadow"])
|
||||
|
||||
exclude("META-INF/gradle-plugins/io.papermc.paperweight.patcher.properties")
|
||||
relocate("io.papermc.paperweight", "org.plazmamc.alwaysuptodate.internal.paperweight")
|
||||
minimize()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package org.plazmamc.alwaysuptodate
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.plazmamc.alwaysuptodate.tasks.*
|
||||
import org.plazmamc.alwaysuptodate.utils.CheckGitTask
|
||||
import org.plazmamc.alwaysuptodate.utils.configureTask
|
||||
import org.plazmamc.alwaysuptodate.utils.flatten
|
||||
import org.plazmamc.alwaysuptodate.utils.registerTask
|
||||
|
||||
class AlwaysUpToDate : Plugin<Project> {
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
|
||||
Git.checkForGit()
|
||||
|
||||
val extension = extensions.create("alwaysUpToDate", AlwaysUpToDateExtension::class.java)
|
||||
|
||||
val git = configureTask<CheckGitTask>("checkGitStatus", "Verify that Git is available")
|
||||
|
||||
fun generateTasks(
|
||||
upstream: String,
|
||||
provider: AlwaysUpToDateExtension.() -> Pair<Pair<Property<String>, Property<String>>, Property<String>>
|
||||
): Triple<TaskProvider<CheckUpstreamCommit>, TaskProvider<CreateCompareComment>, TaskProvider<CreateCompareComment>> {
|
||||
val i = registerTask<CheckUpstreamCommit>("check$upstream", "Check if the $upstream commit is up to date") {
|
||||
dependsOn(git)
|
||||
val (repo, ref, commitProperty) = extension.provider().flatten()
|
||||
this.repo.set(repo)
|
||||
this.ref.set(ref)
|
||||
this.commitPropertyName.set(commitProperty)
|
||||
}
|
||||
|
||||
val j = registerTask<CreateCompareComment>("compare$upstream", "Create a comment comparing the $upstream commit") {
|
||||
dependsOn(git)
|
||||
val (repo, ref, commitProperty) = extension.provider().flatten()
|
||||
this.repo.set(repo)
|
||||
this.ref.set(ref)
|
||||
this.commitPropertyName.set(commitProperty)
|
||||
this.clear.set(false)
|
||||
}
|
||||
|
||||
val k = registerTask<CreateCompareComment>(
|
||||
"cleanCompare$upstream",
|
||||
"Create a comment comparing the $upstream commit"
|
||||
) {
|
||||
dependsOn(git)
|
||||
val (repo, ref, commitProperty) = extension.provider().flatten()
|
||||
this.repo.set(repo)
|
||||
this.ref.set(ref)
|
||||
this.commitPropertyName.set(commitProperty)
|
||||
this.clear.set(true)
|
||||
}
|
||||
|
||||
return (i to j to k).flatten()
|
||||
}
|
||||
|
||||
val (checkPaper, comparePaper, cleanComparePaper) = generateTasks("Paper") { paperRepo to paperRef to paperCommitName }
|
||||
val (checkPurpur, comparePurpur, cleanComparePurpur) = generateTasks("Purpur") { purpurRepo to purpurRef to purpurCommitName }
|
||||
|
||||
registerTask<SimpleUpstreamUpdateTask>("updateUpstream", "Update the upstream commit") {
|
||||
dependsOn(git)
|
||||
repo.convention(extension.paperRepo)
|
||||
ref.convention(extension.paperRef)
|
||||
workDir.set(layout.projectDirectory)
|
||||
regex.convention("paperCommit = ")
|
||||
}
|
||||
|
||||
registerTask<PurpurUpdateTask>("updateImplementation", "Update the implementation") {
|
||||
dependsOn(git)
|
||||
workDir.set(layout.projectDirectory)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.plazmamc.alwaysuptodate
|
||||
|
||||
class AlwaysUpToDateException : Exception {
|
||||
constructor(message: String) : super(message)
|
||||
constructor(message: String, cause: Throwable?) : super(message, cause)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.plazmamc.alwaysuptodate
|
||||
|
||||
import org.gradle.api.provider.Property
|
||||
|
||||
interface AlwaysUpToDateExtension {
|
||||
|
||||
val paperRepo: Property<String>
|
||||
val paperRef: Property<String>
|
||||
|
||||
val purpurRepo: Property<String>
|
||||
val purpurRef: Property<String>
|
||||
|
||||
val pufferfishRepo: Property<String>
|
||||
val pufferfishRef: Property<String>
|
||||
val usePufferfish: Property<Boolean>
|
||||
|
||||
val paperCommitName: Property<String>
|
||||
val purpurCommitName: Property<String>
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||
import org.plazmamc.alwaysuptodate.utils.extension
|
||||
import org.plazmamc.alwaysuptodate.utils.flatten
|
||||
import org.plazmamc.alwaysuptodate.utils.git
|
||||
import org.plazmamc.alwaysuptodate.utils.property
|
||||
|
||||
abstract class CheckUpstreamCommit : Task() {
|
||||
|
||||
@get:Input
|
||||
abstract val repo: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val ref: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val commitPropertyName: Property<String>
|
||||
|
||||
override fun init(): Unit = with(project) {
|
||||
outputs.upToDateWhen { checkCommitFor { repo to ref to commitPropertyName } }
|
||||
|
||||
doLast {
|
||||
println(checkCommitFor { repo to ref to commitPropertyName })
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun Project.getLatest(repository: String, branch: String) =
|
||||
git("ls-remote", repository).readText()?.lines()
|
||||
?.first("[a-z0-9]{40}\trefs/heads/$branch".toRegex()::matches)?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest commit of $repository")
|
||||
|
||||
fun Project.checkCommitFor(block: AlwaysUpToDateExtension.() -> Pair<Pair<Property<String>, Property<String>>, Property<String>>): Boolean =
|
||||
extension.block().flatten().let { getLatest(extension { it.first }, extension { it.second }) == property { it.third } }
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.fromJson
|
||||
import io.papermc.paperweight.util.gson
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.utils.property
|
||||
import paper.libs.com.google.gson.JsonObject
|
||||
import java.net.URI
|
||||
|
||||
abstract class CreateCompareComment : Task() {
|
||||
|
||||
@get:Input
|
||||
abstract val clear: Property<Boolean>
|
||||
|
||||
@get:Input
|
||||
abstract val repo: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val ref: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val commitPropertyName: Property<String>
|
||||
|
||||
@TaskAction
|
||||
fun create() = with(project) {
|
||||
val builder = StringBuilder()
|
||||
val rawRepo = URI.create(repo.get()).path.substring(1)
|
||||
|
||||
if (clear.get() || !file("compare.txt").exists())
|
||||
builder.append("\n\nUpstream has released updates that appear to apply and compile correctly.")
|
||||
else
|
||||
builder.append(file("compare.txt").readText())
|
||||
|
||||
builder.append("\n\n[${rawRepo.split("/").last()} Changes]\n")
|
||||
|
||||
gson.fromJson<JsonObject>(
|
||||
URI.create("https://api.github.com/repos/$rawRepo/compare/${property { commitPropertyName }}...${ref.get()}").toURL().readText()
|
||||
)["commits"].asJsonArray.forEach { obj ->
|
||||
obj.asJsonObject.let {
|
||||
builder.append("$rawRepo@${it["sha"].asString.subSequence(0, 7)}: ${it["commit"].asJsonObject["message"].asString.split("\n")[0]}\n")
|
||||
}
|
||||
}
|
||||
file("compare.txt").writeText(builder.toString())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.path
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.utils.addCommit
|
||||
|
||||
abstract class GenerateMergedAPIPatch : Task() {
|
||||
|
||||
@get:InputDirectory
|
||||
abstract val inputDir: DirectoryProperty
|
||||
|
||||
@get:Internal
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
@get:Input
|
||||
abstract val commitTitle: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val author: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val license: Property<String>
|
||||
|
||||
@TaskAction
|
||||
fun generate() = with(workDir.path) {
|
||||
val dotGit = resolve(".git").toFile().also(java.io.File::deleteRecursively)
|
||||
|
||||
inputDir.path.toFile().copyRecursively(dotGit, overwrite = true)
|
||||
Git(this).addCommit("${commitTitle.get()}\n\n${license.get()}", "--author=${author.get()}")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.path
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.utils.addCommit
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
|
||||
abstract class GenerateMergedServerPatch : Task() {
|
||||
|
||||
@get:Internal
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
@get:Input
|
||||
abstract val commitTitle: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val author: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val license: Property<String>
|
||||
|
||||
@TaskAction
|
||||
fun generate() = with(workDir.path) {
|
||||
val dotGit = resolve(".git").toFile().also(java.io.File::deleteRecursively)
|
||||
|
||||
copySource(this)
|
||||
|
||||
val paper = resolve("../.gradle/caches/paperweight/upstreams/paper/Paper-Server")
|
||||
copySource(paper)
|
||||
|
||||
Git(paper).addCommit("Vanilla Sources", "--author=Automated <auto@mated.null>")
|
||||
|
||||
paper.resolve(".git").toFile().copyRecursively(dotGit, overwrite = true)
|
||||
Git(this).addCommit("${commitTitle.get()}\n\n${license.get()}", "--author=${author.get()}")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal fun copySource(dir: Path) = with(dir.resolve(".gradle/caches/paperweight/mc-dev-sources")) {
|
||||
val target = dir.resolve("src/main")
|
||||
resolve("net").toFile().copyRecursively(target.resolve("java/net").toFile(), overwrite = true)
|
||||
resolve("com").toFile().copyRecursively(target.resolve("java/com").toFile(), overwrite = true)
|
||||
resolve("data").toFile().copyRecursively(target.resolve("resources/data").toFile(), overwrite = true)
|
||||
resolve("assets").toFile().copyRecursively(target.resolve("resources/assets").toFile(), overwrite = true)
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.patcher.tasks.CheckoutRepo
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.cache
|
||||
import io.papermc.paperweight.util.path
|
||||
import io.papermc.paperweight.util.set
|
||||
import org.gradle.api.file.Directory
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.plazmamc.alwaysuptodate.utils.*
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
import java.util.*
|
||||
import kotlin.io.path.ExperimentalPathApi
|
||||
import kotlin.io.path.name
|
||||
import kotlin.io.path.walk
|
||||
|
||||
@Deprecated("It will soon be changed to be available for other upstreams.")
|
||||
abstract class PurpurUpdateTask : Task() {
|
||||
|
||||
private val pufferfishHeader = """
|
||||
Pufferfish
|
||||
Copyright (C) ${Calendar.getInstance().get(Calendar.YEAR)} Pufferfish Studios LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
""".trimIndent()
|
||||
private val pufferfishAuthor = "Kevin Raneri <kevin.raneri@gmail.com>"
|
||||
private val purpurHeader = """
|
||||
PurpurMC
|
||||
Copyright (C) ${Calendar.getInstance().get(Calendar.YEAR)} PurpurMC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
""".trimIndent()
|
||||
private val purpurAuthor = "granny <contact@granny.dev>"
|
||||
|
||||
@get:Internal
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val purpurDir: DirectoryProperty
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val pufferfishDir: DirectoryProperty
|
||||
|
||||
override fun init(): Unit = with(project) {
|
||||
val wd = layout.cache.resolve("alwaysUpToDate/update/purpur").also { it.toFile().deleteRecursively() }
|
||||
workDir.set(wd)
|
||||
|
||||
val compare =
|
||||
configureTask<CreateCompareComment>("createPurpurCompareComment", "Create Purpur Compare Comment") {
|
||||
clear.convention(true)
|
||||
repo.convention(extension.purpurRepo)
|
||||
ref.convention(extension.purpurRef)
|
||||
commitPropertyName.convention(extension.purpurCommitName)
|
||||
}
|
||||
|
||||
val paper = dependsOn<SimpleUpstreamUpdateTask>("updatePaper", "Update Paper") {
|
||||
outputs.upToDateWhen { checkCommitFor { repo to ref to paperCommitName } }
|
||||
dependsOn(compare)
|
||||
repo.convention(extension.paperRepo)
|
||||
ref.convention(extension.paperRef)
|
||||
regex.convention("paperCommit = ")
|
||||
workDir.set(layout.projectDirectory)
|
||||
}
|
||||
|
||||
fun checkout(
|
||||
name: String, repo: Provider<String>, ref: Provider<String>, regex: String, block: CheckoutRepo.() -> Unit
|
||||
): Pair<TaskProvider<CheckoutRepo>, Directory> {
|
||||
val updatePaper = configureTask<SimpleUpstreamUpdateTask>("update${name}Paper", "Update $name's Paper") {
|
||||
this.repo.convention(extension.paperRepo)
|
||||
this.ref.convention(extension.paperRef)
|
||||
this.regex.convention(regex)
|
||||
this.workDir.set(wd.resolve(name))
|
||||
}
|
||||
|
||||
val checkout = dependsOn<CheckoutRepo>("checkout$name", "Checkout $name") {
|
||||
this.dependsOn(paper)
|
||||
this.repoName.convention(name)
|
||||
this.url.convention(repo)
|
||||
this.ref.convention(ref)
|
||||
this.workDir.set(wd)
|
||||
|
||||
this.block()
|
||||
// this.finalizedBy(updatePaper)
|
||||
}
|
||||
|
||||
return checkout to checkout.flatMap { it.outputDir }.get()
|
||||
}
|
||||
|
||||
val (checkoutPufferfish, pufferfish) =
|
||||
checkout("Pufferfish", extension.pufferfishRepo, extension.pufferfishRef, "paperRef=") {
|
||||
onlyIf { extension { usePufferfish } }
|
||||
}
|
||||
val (checkoutPurpur, purpur) =
|
||||
checkout("Purpur", extension.purpurRepo, extension.purpurRef, "paperCommit = ") {}
|
||||
|
||||
pufferfishDir.set(pufferfish)
|
||||
purpurDir.set(purpur)
|
||||
|
||||
val preparePurpur = configureTask("preparePurpur", "Prepare Purpur Sources") {
|
||||
mustRunAfter(paper)
|
||||
dependsOn(checkoutPurpur)
|
||||
doLast { Gradle(purpur.path)("applyPatches").executeOut() }
|
||||
}
|
||||
val preparePufferfish = configureTask("preparePufferfish", "Prepare Pufferfish Sources") {
|
||||
onlyIf { extension { usePufferfish } }
|
||||
mustRunAfter(paper)
|
||||
dependsOn(checkoutPurpur, checkoutPufferfish)
|
||||
doLast {
|
||||
val base = pufferfish.path.resolve("patches").also { it.toFile().deleteRecursively() }
|
||||
val source = purpur.path.resolve("patches")
|
||||
source.resolve("server").copyPatch(base.resolve("server"), "Pufferfish-Server-Changes")
|
||||
source.resolve("api").copyPatch(base.resolve("api"), "Pufferfish-API-Changes")
|
||||
Gradle(pufferfish.path)("applyPatches").executeOut()
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn(preparePurpur, preparePufferfish)
|
||||
|
||||
val serverPatch =
|
||||
configureTask<GenerateMergedServerPatch>("generateMergedServerPatches", "Generate Merged Server Patch") {
|
||||
dependsOn(preparePurpur)
|
||||
if (!extension { usePufferfish }) {
|
||||
workDir.convention(purpur.dir("Purpur-Server"))
|
||||
commitTitle.convention("Purpur Server Changes")
|
||||
license.convention(purpurHeader)
|
||||
author.convention(purpurAuthor)
|
||||
return@configureTask
|
||||
}
|
||||
|
||||
dependsOn(preparePufferfish)
|
||||
workDir.convention(pufferfish.dir("pufferfish-server"))
|
||||
commitTitle.convention("Pufferfish Server Changes")
|
||||
license.convention(pufferfishHeader)
|
||||
author.convention(pufferfishAuthor)
|
||||
|
||||
doLast {
|
||||
val dotGit = pufferfish.dir("pufferfish-server/.git").path.toFile()
|
||||
|
||||
purpur.path.resolve("Purpur-Server").let {
|
||||
val purpurDotGit = it.resolve(".git").toFile().also(File::deleteRecursively)
|
||||
|
||||
copySource(it)
|
||||
dotGit.copyRecursively(purpurDotGit, overwrite = true)
|
||||
Git(it).addCommit("Purpur Server Changes\n\n$purpurHeader", "--author=$purpurAuthor")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val pufferfishAPIChanges = configureTask<GenerateMergedAPIPatch>(
|
||||
"generateMergedPufferfishAPIPatch",
|
||||
"Generate Merged Pufferfish API Patch"
|
||||
) {
|
||||
dependsOn(preparePufferfish)
|
||||
inputDir.convention(pufferfish.dir(".gradle/caches/paperweight/upstreams/paper/Paper-API/.git"))
|
||||
workDir.convention(pufferfish.dir("pufferfish-api"))
|
||||
commitTitle.convention("Pufferfish API Changes")
|
||||
license.convention(pufferfishHeader)
|
||||
author.convention(pufferfishAuthor)
|
||||
}
|
||||
|
||||
val apiPatch = configureTask<GenerateMergedAPIPatch>(
|
||||
"generateMergedAPIPatches",
|
||||
"Generate Merged API Patches"
|
||||
) {
|
||||
dependsOn(preparePurpur)
|
||||
if (extension { usePufferfish }) dependsOn(pufferfishAPIChanges)
|
||||
|
||||
workDir.convention(purpur.dir("Purpur-API"))
|
||||
commitTitle.convention("Purpur API Changes")
|
||||
license.convention(purpurHeader)
|
||||
author.convention(purpurAuthor)
|
||||
inputDir.convention(
|
||||
if (extension { usePufferfish }) pufferfish.dir("pufferfish-api/.git")
|
||||
else purpur.dir(".gradle/caches/paperweight/upstreams/paper/Paper-API/.git")
|
||||
)
|
||||
}
|
||||
|
||||
dependsOn("buildPatches", "Build Merged Patches") {
|
||||
dependsOn(serverPatch, apiPatch)
|
||||
doLast { Gradle(purpur.path)("rebuildPatches").executeOut() }
|
||||
}
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
fun update() = with(project) {
|
||||
val purpur = purpurDir.path
|
||||
val pufferfish = if (extension { usePufferfish }) pufferfishDir.path else null
|
||||
|
||||
val patches = purpur.resolve("patches")
|
||||
with(layout.projectDirectory.path.resolve("patches")) {
|
||||
patches.resolve("server").copyPatch( resolve("server"),
|
||||
if (pufferfish == null) "" else "Pufferfish-Server-Changes",
|
||||
"Purpur-Server-Changes"
|
||||
)
|
||||
|
||||
patches.resolve("api").copyPatch( resolve("api"),
|
||||
if (pufferfish == null) "" else "Pufferfish-API-Changes",
|
||||
"Purpur-API-Changes"
|
||||
)
|
||||
}
|
||||
|
||||
file("gradle.properties").let {
|
||||
it.writeText(
|
||||
it.readText().replace("purpurCommit = .*".toRegex(), "purpurCommit = ${Git(purpur).revParse()}")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalPathApi::class)
|
||||
private fun Path.copyPatch(to: Path, vararg name: String) = walk().sorted()
|
||||
.filter { entry -> name.filter { it != "" }.any { entry.name.endsWith("$it.patch") } }.map(Path::toFile)
|
||||
.forEachIndexed { count, patch ->
|
||||
patch.copyTo(
|
||||
to.resolve("${count + 1}".padStart(4, '0') + "-" + name.first { patch.name.substring(5) == "$it.patch" } + ".patch").toFile(),
|
||||
overwrite = true
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.path
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import org.plazmamc.alwaysuptodate.utils.dependsOn
|
||||
import org.plazmamc.alwaysuptodate.utils.extension
|
||||
|
||||
abstract class SimpleUpstreamUpdateTask : Task() {
|
||||
|
||||
@get:Input
|
||||
abstract val repo: Property<String>
|
||||
|
||||
@get:Input
|
||||
abstract val ref: Property<String>
|
||||
|
||||
@get:InputDirectory
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
@get:Input
|
||||
abstract val regex: Property<String>
|
||||
|
||||
override fun init(): Unit = with(project) {
|
||||
dependsOn<CreateCompareComment>("createCompareComment", "Create Paper Compare Comment") {
|
||||
onlyIf { !this@SimpleUpstreamUpdateTask.state.upToDate }
|
||||
clear.convention(false)
|
||||
repo.convention(extension.paperRepo)
|
||||
ref.convention(extension.paperRef)
|
||||
commitPropertyName.convention(extension.paperCommitName)
|
||||
}
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
fun update() = (Git(workDir.path)("ls-remote", repo.get()).readText()?.lines()
|
||||
?.filterNot("[a-z0-9]{40}\trefs/heads/${ref.get()}".toRegex()::matches)?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest commit")).let { commit ->
|
||||
workDir.file("gradle.properties").path.toFile().let {
|
||||
it.writeText(it.readText().replace("${regex.get()}.*".toRegex(), "${regex.get()}$commit"))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
|
||||
abstract class Task : DefaultTask() {
|
||||
|
||||
protected open fun init() {}
|
||||
|
||||
init {
|
||||
this.init()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.tasks.Task
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
val Git.path: Path
|
||||
get() = Git::class.java.getDeclaredField("repo").apply { isAccessible = true }.get(this) as Path
|
||||
|
||||
abstract class CheckGitTask : Task() {
|
||||
|
||||
@TaskAction
|
||||
fun checkGit() = Git.checkForGit()
|
||||
|
||||
}
|
||||
|
||||
fun Git.revParse(): String = this("rev-parse", "HEAD").captureOut(true).out.trim()
|
||||
|
||||
fun Git.addCommit(vararg args: String) {
|
||||
this("add", ".").executeSilently()
|
||||
this("commit", "-m", *args).executeSilently()
|
||||
this.wait()
|
||||
}
|
||||
|
||||
fun Git.wait() {
|
||||
val lockFile = path.resolve(".git/gc.pid")
|
||||
while (lockFile.exists()) {
|
||||
println("detected lockfile, waiting for it to be removed")
|
||||
Thread.sleep(1000)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
import io.papermc.paperweight.util.Command
|
||||
import io.papermc.paperweight.util.directory
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.notExists
|
||||
|
||||
class Gradle(private val repo: Path) {
|
||||
|
||||
init {
|
||||
if (repo.resolve("gradle").notExists())
|
||||
throw AlwaysUpToDateException("Git repository does not exist: $repo")
|
||||
}
|
||||
|
||||
operator fun invoke(vararg args: String): Command {
|
||||
val builder = ProcessBuilder(
|
||||
"java",
|
||||
"-cp",
|
||||
"gradle/wrapper/gradle-wrapper.jar",
|
||||
"org.gradle.wrapper.GradleWrapperMain",
|
||||
*args,
|
||||
"--no-daemon",
|
||||
"--stacktrace"
|
||||
).directory(repo)
|
||||
val command = builder.command()
|
||||
.joinToString(" ") { if (it.codePoints().anyMatch(Character::isWhitespace)) "\"$it\"" else it }
|
||||
|
||||
return try {
|
||||
Command(builder, command)
|
||||
} catch (e: Exception) {
|
||||
throw AlwaysUpToDateException("Failed to execute command: $command", e)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.configureTask
|
||||
import io.papermc.paperweight.util.path
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||
|
||||
private var extensionAccessor: AlwaysUpToDateExtension? = null
|
||||
set(value) {
|
||||
if (field != null) throw IllegalAccessException("ExtensionAccessor already initialized")
|
||||
field = value
|
||||
}
|
||||
|
||||
val Project.extension: AlwaysUpToDateExtension
|
||||
get() {
|
||||
if (extensionAccessor == null) extensionAccessor =
|
||||
project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
return extensionAccessor!!
|
||||
}
|
||||
|
||||
val Project.git: Git get() = Git(layout.projectDirectory.path)
|
||||
|
||||
fun <T> Project.extension(block: AlwaysUpToDateExtension.() -> Property<T>): T =
|
||||
extension.block().get()
|
||||
|
||||
fun Project.property(block: AlwaysUpToDateExtension.() -> Property<String>) =
|
||||
this.property(extension(block)) as String
|
||||
|
||||
inline fun <reified T : Task> Task.dependsOn(
|
||||
name: String,
|
||||
description: String,
|
||||
noinline block: T.() -> Unit = {}
|
||||
): TaskProvider<T> =
|
||||
project.configureTask<T>(name, description, block).also { this.dependsOn(it) }
|
||||
|
||||
@JvmName("dependsOnDefaultTask")
|
||||
fun Task.dependsOn(
|
||||
name: String,
|
||||
description: String,
|
||||
block: DefaultTask.() -> Unit = {}
|
||||
): TaskProvider<DefaultTask> =
|
||||
this.dependsOn<DefaultTask>(name, description, block)
|
||||
|
||||
inline fun <reified T : Task> Task.finalizedBy(
|
||||
name: String,
|
||||
description: String,
|
||||
noinline block: T.() -> Unit = {}
|
||||
): TaskProvider<T> =
|
||||
project.configureTask<T>(name, description, block).also { this.finalizedBy(it) }
|
||||
|
||||
@JvmName("finalizedByDefaultTask")
|
||||
fun Task.finalizedBy(
|
||||
name: String,
|
||||
description: String,
|
||||
block: DefaultTask.() -> Unit = {}
|
||||
): TaskProvider<DefaultTask> =
|
||||
this.finalizedBy<DefaultTask>(name, description, block)
|
||||
|
||||
inline fun <reified T : Task> Task.mustRunAfter(
|
||||
name: String,
|
||||
description: String,
|
||||
noinline block: T.() -> Unit = {}
|
||||
): TaskProvider<T> =
|
||||
project.configureTask<T>(name, description, block).also { this.mustRunAfter(it) }
|
||||
|
||||
@JvmName("mustRunAfterDefaultTask")
|
||||
fun Task.mustRunAfter(
|
||||
name: String,
|
||||
description: String,
|
||||
block: DefaultTask.() -> Unit = {}
|
||||
): TaskProvider<DefaultTask> =
|
||||
this.mustRunAfter<DefaultTask>(name, description, block)
|
||||
|
||||
inline fun <reified T : Task> Project.configureTask(
|
||||
name: String,
|
||||
description: String,
|
||||
noinline block: T.() -> Unit = {}
|
||||
): TaskProvider<T> =
|
||||
tasks.configureTask<T>(name) {
|
||||
this.group = "always up to date"
|
||||
this.description = description
|
||||
this.block()
|
||||
}
|
||||
|
||||
@JvmName("configureDefaultTask")
|
||||
fun Project.configureTask(
|
||||
name: String,
|
||||
description: String,
|
||||
block: DefaultTask.() -> Unit = {}
|
||||
): TaskProvider<DefaultTask> =
|
||||
this.configureTask<DefaultTask>(name, description, block)
|
||||
|
||||
inline fun <reified T : Task> Project.registerTask(
|
||||
name: String,
|
||||
description: String,
|
||||
crossinline block: T.() -> Unit = {}
|
||||
): TaskProvider<T> =
|
||||
tasks.register(name, T::class.java) {
|
||||
this.group = "always up to date"
|
||||
this.description = description
|
||||
this.block()
|
||||
}
|
||||
|
||||
@JvmName("registerDefaultTask")
|
||||
fun Project.registerTask(
|
||||
name: String,
|
||||
description: String,
|
||||
block: DefaultTask.() -> Unit = {}
|
||||
): TaskProvider<DefaultTask> =
|
||||
this.registerTask<DefaultTask>(name, description, block)
|
||||
@@ -0,0 +1,3 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
fun <A, B, C> Pair<Pair<A, B>, C>.flatten() = Triple(first.first, first.second, second)
|
||||
@@ -0,0 +1 @@
|
||||
implementation-class=org.plazmamc.alwaysuptodate.AlwaysUpToDate
|
||||
@@ -1,9 +1,29 @@
|
||||
group = org.plazmamc.plazma
|
||||
version = 1.19.4-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit = 7a96bf2095c72b6346efd8b784440747af396314
|
||||
|
||||
org.gradle.daemon = true
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
org.gradle.vfs.watch = false
|
||||
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true
|
||||
|
||||
paper.runMemoryGb = 8
|
||||
paper.runDisableWatchdog = true
|
||||
|
||||
group = org.plazmamc.plazma
|
||||
brandKey = plazmamc:plazma
|
||||
brandName = Plazma
|
||||
providerName = PlazmaMC
|
||||
providerRepo = PlazmaMC/PlazmaBukkit
|
||||
|
||||
version = 1.21.3-R0.1-SNAPSHOT
|
||||
mcVersion = 1.21.3
|
||||
jdkVersion = 21
|
||||
|
||||
paperRepo = https://github.com/PaperMC/Paper-archive
|
||||
paperBranch = ver/1.21.3
|
||||
purpurRepo = https://github.com/PurpurMC/Purpur
|
||||
purpurBranch = ver/1.21.3
|
||||
pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish
|
||||
pufferfishBranch = ver/1.21
|
||||
usePufferfish = false
|
||||
|
||||
paperCommit = da7138233f6392e791d790d1c3407414c855f9c2
|
||||
purpurCommit = 16ce24aa7eb08232030e4570e027f7baefa5f3f9
|
||||
|
||||
15
gradle/libs.versions.toml
Normal file
15
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[versions]
|
||||
shadow = "8.3.5"
|
||||
remapper = "0.10.3"
|
||||
paperclip = "3.0.3"
|
||||
paperweight = "1.7.4"
|
||||
decompiler = "1.10.1"
|
||||
|
||||
[libraries]
|
||||
paperclip = { group = "io.papermc", name = "paperclip", version.ref = "paperclip" }
|
||||
remapper = { group = "net.fabricmc", name = "tiny-remapper", version.ref="remapper" }
|
||||
decompiler = { group = "org.vineflower", name = "vineflower", version.ref = "decompiler" }
|
||||
|
||||
[plugins]
|
||||
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||
paperweight = { id = "io.papermc.paperweight.patcher", version.ref = "paperweight" }
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
31
gradlew
vendored
31
gradlew
vendored
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -83,10 +83,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
|
||||
20
gradlew.bat
vendored
20
gradlew.bat
vendored
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
||||
136
initDev
Executable file
136
initDev
Executable file
@@ -0,0 +1,136 @@
|
||||
#!/bin/bash
|
||||
# To initialize your development environment,
|
||||
# run below command in your terminal:
|
||||
# source ./initDev
|
||||
|
||||
PROJECT_DIR=$(pwd)
|
||||
|
||||
alias cl="clear;"
|
||||
|
||||
alias src="cd $PROJECT_DIR;"
|
||||
alias ca="cd $PROJECT_DIR/*-API || exit 1; vs;"
|
||||
alias cg="cd $PROJECT_DIR/paper-api-generator/generated || exit 1; vs;"
|
||||
alias cs="cd $PROJECT_DIR/*-Server || exit 1; vs;"
|
||||
|
||||
alias fa="ca __generate_fixup_patch"
|
||||
alias fg="cg __generate_fixup_patch"
|
||||
alias fs="cs __generate_fixup_patch"
|
||||
|
||||
alias gradle="./gradlew" # TODO: Paperweight will not work with Gradle 8.10.2
|
||||
alias gr="cd $PROJECT_DIR; gradle"
|
||||
alias grc="gr --no-rebuild"
|
||||
|
||||
alias ap="grc applyPatches"
|
||||
alias aap="grc applyAPIPatches"
|
||||
alias agp="grc applyGeneratedAPIPatches"
|
||||
alias asp="grc applyServerPatches"
|
||||
|
||||
alias aap!="rm -rf $PROJECT_DIR/*-API; aap"
|
||||
alias agp!="rm -rf $PROJECT_DIR/paper-api-generator/generated; agp"
|
||||
alias asp!="rm -rf $PROJECT_DIR/*-Server; asp"
|
||||
|
||||
alias aapa="ca vpa"
|
||||
alias aapc="ca vpc"
|
||||
alias aapc="ca vps"
|
||||
alias agpa="cg vpa"
|
||||
alias agpc="cg vpc"
|
||||
alias agpc="cg vps"
|
||||
alias aspa="cs vpa"
|
||||
alias aspc="cs vpc"
|
||||
alias aspc="cs vps"
|
||||
|
||||
alias rp="grc rebuildPatches"
|
||||
alias rap="grc rebuildAPIPatches"
|
||||
alias rgp="grc rebuildGeneratedAPIPatches"
|
||||
alias rsp="grc rebuildServerPatches"
|
||||
|
||||
alias mk="gr build"
|
||||
alias mko="gr createReobfPaperclipJar"
|
||||
alias mkm="gr createMojmapPaperclipJar"
|
||||
|
||||
|
||||
alias va="git add"
|
||||
alias va.="git add ."
|
||||
|
||||
alias vl="git log --oneline base..HEAD"
|
||||
|
||||
alias vr="git rebase --autosquash base"
|
||||
alias vra="git rebase --abort"
|
||||
alias vrc="va.; git rebase --continue"
|
||||
alias vrs="git rebase --skip"
|
||||
|
||||
alias vp="git am --show-current-patch"
|
||||
alias vpa="git am --abort"
|
||||
alias vpc="git am --continue"
|
||||
alias vps="git am --skip"
|
||||
|
||||
alias vm="git commit --fixup"
|
||||
alias vs="git status"
|
||||
|
||||
alias vc="git commit --verbose --no-interactive"
|
||||
alias vcn="vc --no-message"
|
||||
alias vcm="vc --message"
|
||||
|
||||
alias vca="git commit --verbose --no-interactive --all"
|
||||
alias vcan="git commit --verbose --no-interactive --all --no-message"
|
||||
alias vcam="git commit --verbose --no-interactive --all --message"
|
||||
|
||||
alias ve="git commit --verbose --no-interactive --amend"
|
||||
alias ven="ve --no-message"
|
||||
alias vem="ve --message"
|
||||
|
||||
alias vea="git commit --verbose --no-interactive --all --amend"
|
||||
alias vean="vea --no-message"
|
||||
alias veam="vea --message"
|
||||
|
||||
alias as="ca src"
|
||||
alias al="ca vl"
|
||||
alias ac="ca va.; vcm"
|
||||
alias am="ca vm"
|
||||
alias ae="ca ve"
|
||||
alias aea="ca vea"
|
||||
alias aean="ca vean"
|
||||
alias aeam="ca veam"
|
||||
|
||||
alias gs="cg src"
|
||||
alias gl="cg vl"
|
||||
alias gc="cg va.; vcm"
|
||||
alias gm="cg vm"
|
||||
alias ge="cg ve"
|
||||
alias gea="cg vea"
|
||||
alias gean="cg vean"
|
||||
alias geam="cg veam"
|
||||
|
||||
alias ss="cs src"
|
||||
alias sl="cs vl"
|
||||
alias sc="cs va.; vcm"
|
||||
alias sm="cs vm"
|
||||
alias se="cs ve"
|
||||
alias sea="cs vea"
|
||||
alias sean="cs vean"
|
||||
alias seam="cs veam"
|
||||
|
||||
function __generate_fixup_patch() {
|
||||
garg="."
|
||||
[[ "$1" == "-x" ]] && garg="--amend"
|
||||
|
||||
git add .
|
||||
git commit "$garg" -m "fixup"
|
||||
git format-patch -1
|
||||
mv 0001-fixup.patch ../ -f
|
||||
|
||||
cd ../
|
||||
}
|
||||
|
||||
# Commit Updated Upstream
|
||||
function cuu() {
|
||||
# shellcheck disable=SC2059
|
||||
printf "Updated Upstream ($1)$(/bin/cat compare.txt)" | git commit -F -
|
||||
}
|
||||
|
||||
git update-index --assume-unchanged ./build-data/dev-imports.txt
|
||||
|
||||
if [ ! -L "$PROJECT_DIR/upstream" ]; then
|
||||
grc applyPatches
|
||||
ln -dsf "$PROJECT_DIR/.gradle/caches/paperweight/upstreams/paper" "$PROJECT_DIR/upstream"
|
||||
fi
|
||||
47
libs/api.versions.toml
Normal file
47
libs/api.versions.toml
Normal file
@@ -0,0 +1,47 @@
|
||||
[versions]
|
||||
brigadier = "1.2.9"
|
||||
|
||||
guava = "33.3.1-jre"
|
||||
gson = "2.11.0"
|
||||
bungeechat = "1.20-R0.2-deprecated+build.19"
|
||||
|
||||
# snakeyaml
|
||||
joml = "1.10.8"
|
||||
json-simple = "1.1.1"
|
||||
|
||||
fastutil = "8.5.6"
|
||||
# adventure
|
||||
# log4j
|
||||
slf4j-api = "2.0.9"
|
||||
sentry = "5.4.0"
|
||||
|
||||
# asm
|
||||
# mvn
|
||||
|
||||
annotations = "24.1.0"
|
||||
checkerqual = "3.21.0"
|
||||
jspecify = "1.0.0"
|
||||
|
||||
|
||||
[libraries]
|
||||
brigadier = { group = "com.mojang", name = "brigadier", version.ref = "brigadier" }
|
||||
|
||||
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||
bungeechat = { group = "net.md-5", name = "bungeecord-chat", version.ref = "bungeechat" }
|
||||
|
||||
joml = { group = "org.joml", name = "joml", version.ref = "joml" }
|
||||
jsonsimple = { group = "com.googlecode.json-simple", name = "json-simple", version.ref = "json-simple" }
|
||||
|
||||
fastutil = { group = "it.unimi.dsi", name = "fastutil", version.ref = "fastutil" }
|
||||
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
|
||||
sentry = { group = "io.sentry", name = "sentry", version.ref = "sentry" }
|
||||
|
||||
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
|
||||
checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" }
|
||||
jspecify = { group = "org.jspecify", name = "jspecify", version.ref = "jspecify" }
|
||||
|
||||
|
||||
[bundles]
|
||||
api = [ "brigadier", "guava", "gson", "joml", "fastutil", "slf4j", "sentry", "jspecify" ]
|
||||
annotations = [ "annotations", "checkerqual" ]
|
||||
73
libs/common.versions.toml
Normal file
73
libs/common.versions.toml
Normal file
@@ -0,0 +1,73 @@
|
||||
[versions]
|
||||
adventure = "4.17.0"
|
||||
log4j = "2.19.0"
|
||||
asm = "9.7.1"
|
||||
|
||||
mvn = "3.9.6"
|
||||
mvn-resolver = "1.9.18"
|
||||
|
||||
commons-lang2 = "2.6"
|
||||
commons-lang3 = "3.12.0"
|
||||
|
||||
snakeyaml = "2.2"
|
||||
|
||||
junit = "1.10.0"
|
||||
junit-jupiter = "5.10.0"
|
||||
junit-pioneer = "2.2.0"
|
||||
|
||||
hamcrest = "2.2"
|
||||
mockito = "5.14.1"
|
||||
|
||||
[libraries]
|
||||
adventure-bom = { group = "net.kyori", name = "adventure-bom", version.ref = "adventure" }
|
||||
adventure-api = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" }
|
||||
adventure-minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }
|
||||
adventure-logger-slf4j = { group = "net.kyori", name = "adventure-text-logger-slf4j", version.ref = "adventure" }
|
||||
adventure-serializer-gson = { group = "net.kyori", name = "adventure-text-serializer-gson", version.ref = "adventure" }
|
||||
adventure-serializer-ansi = { group = "net.kyori", name = "adventure-text-serializer-ansi", version.ref = "adventure" }
|
||||
adventure-serializer-plain = { group = "net.kyori", name = "adventure-text-serializer-plain", version.ref = "adventure" }
|
||||
adventure-serializer-legacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" }
|
||||
|
||||
log4j = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
|
||||
log4j-api = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" }
|
||||
log4j-stream = { group = "org.apache.logging.log4j", name = "log4j-iostreams", version.ref = "log4j" }
|
||||
|
||||
asm = { group = "org.ow2.asm", name = "asm", version.ref = "asm" }
|
||||
asm-tree = { group = "org.ow2.asm", name = "asm-tree", version.ref = "asm" }
|
||||
asm-commons = { group = "org.ow2.asm", name = "asm-commons", version.ref = "asm" }
|
||||
|
||||
mvn = { group = "org.apache.maven", name = "maven-resolver-provider", version.ref = "mvn" }
|
||||
mvn-connector = { group = "org.apache.maven.resolver", name = "maven-resolver-connector-basic", version.ref = "mvn-resolver" }
|
||||
mvn-transport = { group = "org.apache.maven.resolver", name = "maven-resolver-transport-http", version.ref = "mvn-resolver" }
|
||||
|
||||
commons-lang2 = { group = "commons-lang", name = "commons-lang", version.ref = "commons-lang2" }
|
||||
commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commons-lang3" }
|
||||
|
||||
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
|
||||
|
||||
junit = { group = "org.junit.platform", name = "junit-platform-suite-engine", version.ref = "junit" }
|
||||
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
|
||||
junit-pioneer = { group = "org.junit-pioneer", name = "junit-pioneer", version.ref = "junit-pioneer" }
|
||||
|
||||
hamcrest = { group = "org.hamcrest", name = "hamcrest", version.ref = "hamcrest" }
|
||||
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
|
||||
|
||||
|
||||
[bundles]
|
||||
asm = [ "asm", "asm-commons" ]
|
||||
mvn = [ "mvn-connector", "mvn-transport" ]
|
||||
|
||||
test = [
|
||||
"junit-jupiter",
|
||||
"hamcrest",
|
||||
"mockito",
|
||||
"asm-tree"
|
||||
]
|
||||
adventure = [
|
||||
"adventure-api",
|
||||
"adventure-minimessage",
|
||||
"adventure-logger-slf4j",
|
||||
"adventure-serializer-gson",
|
||||
"adventure-serializer-plain",
|
||||
"adventure-serializer-legacy"
|
||||
]
|
||||
89
libs/server.versions.toml
Normal file
89
libs/server.versions.toml
Normal file
@@ -0,0 +1,89 @@
|
||||
[versions]
|
||||
jline = "3.27.1"
|
||||
tca = "1.3.0"
|
||||
# adventure
|
||||
# log4j
|
||||
netty = "4.1.97.Final"
|
||||
# asm
|
||||
configurate = "4.2.0-SNAPSHOT"
|
||||
# commons2
|
||||
sqlite = "3.46.1.3"
|
||||
mysql = "9.1.0"
|
||||
disruptor = "3.4.4"
|
||||
velocity = "3.3.0-SNAPSHOT"
|
||||
|
||||
# mvn
|
||||
|
||||
# snakeyaml
|
||||
simpleyaml = "1.8.4"
|
||||
|
||||
rhino = "1.7.14"
|
||||
upnp = "1.0"
|
||||
|
||||
classgraph = "4.8.47"
|
||||
# test (junit, hamcrest, mockito, asm-tree)
|
||||
srgutils = "1.0.9"
|
||||
art = "2.0.3"
|
||||
|
||||
rewriter = "0.0.3"
|
||||
spark-api = "0.1-20240720.200737-2"
|
||||
spark = "1.10.119-SNAPSHOT"
|
||||
|
||||
|
||||
[libraries]
|
||||
jline-ffm = { group = "org.jline", name = "jline-terminal-ffm", version.ref = "jline" }
|
||||
jline-jni = { group = "org.jline", name = "jline-terminal-jni", version.ref = "jline" }
|
||||
tca = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="tca" }
|
||||
# adventure
|
||||
# log4j
|
||||
netty-haproxy = { group = "io.netty", name = "netty-codec-haproxy", version.ref = "netty" }
|
||||
# asm
|
||||
configurate-yaml = { group = "org.spongepowered", name = "configurate-yaml", version.ref = "configurate" }
|
||||
# commons2
|
||||
sqlite = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqlite" }
|
||||
mysql = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysql" }
|
||||
disruptor = { group = "com.lmax", name = "disruptor", version.ref = "disruptor" }
|
||||
velocity-native = { group = "com.velocitypowered", name = "velocity-native", version.ref = "velocity" }
|
||||
|
||||
# snakeyaml
|
||||
simpleyaml = { group = "com.github.carleslc.Simple-YAML", name = "Simple-Yaml", version.ref = "simpleyaml" }
|
||||
|
||||
rhino-runtime = { group = "org.mozilla", name = "rhino-runtime", version.ref = "rhino" }
|
||||
rhino-engine = { group = "org.mozilla", name = "rhino-engine", version.ref = "rhino" }
|
||||
upnp = { group = "dev.omega24", name = "upnp4j", version.ref = "upnp" }
|
||||
|
||||
classgraph = { group = "io.github.classgraph", name = "classgraph", version.ref = "classgraph" }
|
||||
# test (junit, hamcrest, mockito, asm-tree)
|
||||
srgutils = { group = "net.neoforged", name = "srgutils", version.ref = "srgutils" }
|
||||
art = { group = "net.neoforged", name = "AutoRenamingTool", version.ref = "art" }
|
||||
|
||||
rewriter = { group = "io.papermc", name = "reflection-rewriter", version.ref = "rewriter" }
|
||||
rewriter-runtime = { group = "io.papermc", name = "reflection-rewriter-runtime", version.ref = "rewriter" }
|
||||
rewriter-proxy = { group = "io.papermc", name = "reflection-rewriter-proxy-generator", version.ref = "rewriter" }
|
||||
|
||||
spark-api = { group = "me.lucko", name = "spark-api", version.ref = "spark-api" }
|
||||
spark = { group = "me.lucko", name = "spark-paper", version.ref = "spark" }
|
||||
|
||||
|
||||
[bundles]
|
||||
runtime = [ "sqlite", "mysql", "disruptor" ]
|
||||
test = [ "classgraph" ]
|
||||
|
||||
implementation = [
|
||||
"jline-ffm",
|
||||
"jline-jni",
|
||||
"tca",
|
||||
"netty-haproxy",
|
||||
"configurate-yaml",
|
||||
"velocity-native",
|
||||
"rhino-runtime",
|
||||
"rhino-engine",
|
||||
"upnp",
|
||||
"srgutils",
|
||||
"art",
|
||||
"rewriter",
|
||||
"rewriter-runtime",
|
||||
"rewriter-proxy",
|
||||
"spark-api",
|
||||
"spark"
|
||||
]
|
||||
@@ -1,527 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 31 Mar 2023 07:18:37 +0000
|
||||
Subject: [PATCH] Pufferfish API Changes
|
||||
|
||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Copyright (C) 2023 Pufferfish Studios LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index cad12a2632b9ebb569280441c42869685db1f31a..b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -42,6 +42,7 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
api("org.apache.logging.log4j:log4j-api:2.17.1")
|
||||
api("org.slf4j:slf4j-api:1.8.0-beta4")
|
||||
+ api("io.sentry:sentry:5.4.0") // Pufferfish
|
||||
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
@@ -85,6 +86,13 @@ val generateApiVersioningFile by tasks.registering {
|
||||
}
|
||||
}
|
||||
|
||||
+// Pufferfish Start
|
||||
+tasks.withType<JavaCompile> {
|
||||
+ val compilerArgs = options.compilerArgs
|
||||
+ compilerArgs.add("--add-modules=jdk.incubator.vector")
|
||||
+}
|
||||
+// Pufferfish End
|
||||
+
|
||||
tasks.jar {
|
||||
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
||||
into("META-INF/maven/${project.group}/${project.name}")
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc90cefc4ee
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
|
||||
@@ -0,0 +1,161 @@
|
||||
+package gg.pufferfish.pufferfish.sentry;
|
||||
+
|
||||
+import com.google.gson.Gson;
|
||||
+import java.lang.reflect.Field;
|
||||
+import java.lang.reflect.Modifier;
|
||||
+import java.util.Map;
|
||||
+import java.util.TreeMap;
|
||||
+import org.apache.logging.log4j.ThreadContext;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.plugin.Plugin;
|
||||
+import org.bukkit.plugin.RegisteredListener;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public class SentryContext {
|
||||
+
|
||||
+ private static final Gson GSON = new Gson();
|
||||
+
|
||||
+ public static void setPluginContext(@Nullable Plugin plugin) {
|
||||
+ if (plugin != null) {
|
||||
+ ThreadContext.put("pufferfishsentry_pluginname", plugin.getName());
|
||||
+ ThreadContext.put("pufferfishsentry_pluginversion", plugin.getDescription().getVersion());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void removePluginContext() {
|
||||
+ ThreadContext.remove("pufferfishsentry_pluginname");
|
||||
+ ThreadContext.remove("pufferfishsentry_pluginversion");
|
||||
+ }
|
||||
+
|
||||
+ public static void setSenderContext(@Nullable CommandSender sender) {
|
||||
+ if (sender != null) {
|
||||
+ ThreadContext.put("pufferfishsentry_playername", sender.getName());
|
||||
+ if (sender instanceof Player player) {
|
||||
+ ThreadContext.put("pufferfishsentry_playerid", player.getUniqueId().toString());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void removeSenderContext() {
|
||||
+ ThreadContext.remove("pufferfishsentry_playername");
|
||||
+ ThreadContext.remove("pufferfishsentry_playerid");
|
||||
+ }
|
||||
+
|
||||
+ public static void setEventContext(Event event, RegisteredListener registration) {
|
||||
+ setPluginContext(registration.getPlugin());
|
||||
+
|
||||
+ try {
|
||||
+ // Find the player that was involved with this event
|
||||
+ Player player = null;
|
||||
+ if (event instanceof PlayerEvent) {
|
||||
+ player = ((PlayerEvent) event).getPlayer();
|
||||
+ } else {
|
||||
+ Class<? extends Event> eventClass = event.getClass();
|
||||
+
|
||||
+ Field playerField = null;
|
||||
+
|
||||
+ for (Field field : eventClass.getDeclaredFields()) {
|
||||
+ if (field.getType().equals(Player.class)) {
|
||||
+ playerField = field;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (playerField != null) {
|
||||
+ playerField.setAccessible(true);
|
||||
+ player = (Player) playerField.get(event);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (player != null) {
|
||||
+ setSenderContext(player);
|
||||
+ }
|
||||
+ } catch (Exception e) {} // We can't really safely log exceptions.
|
||||
+
|
||||
+ ThreadContext.put("pufferfishsentry_eventdata", GSON.toJson(serializeFields(event)));
|
||||
+ }
|
||||
+
|
||||
+ public static void removeEventContext() {
|
||||
+ removePluginContext();
|
||||
+ removeSenderContext();
|
||||
+ ThreadContext.remove("pufferfishsentry_eventdata");
|
||||
+ }
|
||||
+
|
||||
+ private static Map<String, String> serializeFields(Object object) {
|
||||
+ Map<String, String> fields = new TreeMap<>();
|
||||
+ fields.put("_class", object.getClass().getName());
|
||||
+ for (Field declaredField : object.getClass().getDeclaredFields()) {
|
||||
+ try {
|
||||
+ if (Modifier.isStatic(declaredField.getModifiers())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ String fieldName = declaredField.getName();
|
||||
+ if (fieldName.equals("handlers")) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ declaredField.setAccessible(true);
|
||||
+ Object value = declaredField.get(object);
|
||||
+ if (value != null) {
|
||||
+ fields.put(fieldName, value.toString());
|
||||
+ } else {
|
||||
+ fields.put(fieldName, "<null>");
|
||||
+ }
|
||||
+ } catch (Exception e) {} // We can't really safely log exceptions.
|
||||
+ }
|
||||
+ return fields;
|
||||
+ }
|
||||
+
|
||||
+ public static class State {
|
||||
+
|
||||
+ private Plugin plugin;
|
||||
+ private Command command;
|
||||
+ private String commandLine;
|
||||
+ private Event event;
|
||||
+ private RegisteredListener registeredListener;
|
||||
+
|
||||
+ public Plugin getPlugin() {
|
||||
+ return plugin;
|
||||
+ }
|
||||
+
|
||||
+ public void setPlugin(Plugin plugin) {
|
||||
+ this.plugin = plugin;
|
||||
+ }
|
||||
+
|
||||
+ public Command getCommand() {
|
||||
+ return command;
|
||||
+ }
|
||||
+
|
||||
+ public void setCommand(Command command) {
|
||||
+ this.command = command;
|
||||
+ }
|
||||
+
|
||||
+ public String getCommandLine() {
|
||||
+ return commandLine;
|
||||
+ }
|
||||
+
|
||||
+ public void setCommandLine(String commandLine) {
|
||||
+ this.commandLine = commandLine;
|
||||
+ }
|
||||
+
|
||||
+ public Event getEvent() {
|
||||
+ return event;
|
||||
+ }
|
||||
+
|
||||
+ public void setEvent(Event event) {
|
||||
+ this.event = event;
|
||||
+ }
|
||||
+
|
||||
+ public RegisteredListener getRegisteredListener() {
|
||||
+ return registeredListener;
|
||||
+ }
|
||||
+
|
||||
+ public void setRegisteredListener(RegisteredListener registeredListener) {
|
||||
+ this.registeredListener = registeredListener;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6d266ebf5e52745ad13e90e5754b524383fa9b29
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
@@ -0,0 +1,40 @@
|
||||
+package gg.pufferfish.pufferfish.simd;
|
||||
+
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
+import jdk.incubator.vector.FloatVector;
|
||||
+import jdk.incubator.vector.IntVector;
|
||||
+import jdk.incubator.vector.VectorSpecies;
|
||||
+
|
||||
+/**
|
||||
+ * Basically, java is annoying and we have to push this out to its own class.
|
||||
+ */
|
||||
+@Deprecated
|
||||
+public class SIMDChecker {
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static boolean canEnable(Logger logger) {
|
||||
+ try {
|
||||
+ if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19) {
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ SIMDDetection.testRun = true;
|
||||
+
|
||||
+ VectorSpecies<Integer> ISPEC = IntVector.SPECIES_PREFERRED;
|
||||
+ VectorSpecies<Float> FSPEC = FloatVector.SPECIES_PREFERRED;
|
||||
+
|
||||
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + ISPEC.vectorBitSize() + " bits (int)");
|
||||
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + FSPEC.vectorBitSize() + " bits (float)");
|
||||
+
|
||||
+ if (ISPEC.elementSize() < 2 || FSPEC.elementSize() < 2) {
|
||||
+ logger.log(Level.WARNING, "SIMD is not properly supported on this system!");
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ } catch (NoClassDefFoundError | Exception ignored) {} // Basically, we don't do anything. This lets us detect if it's not functional and disable it.
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..fd708554d6dab2ddcd24c3024330b8ebf9462111
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
@@ -0,0 +1,35 @@
|
||||
+package gg.pufferfish.pufferfish.simd;
|
||||
+
|
||||
+import java.util.logging.Logger;
|
||||
+
|
||||
+@Deprecated
|
||||
+public class SIMDDetection {
|
||||
+
|
||||
+ public static boolean isEnabled = false;
|
||||
+ public static boolean versionLimited = false;
|
||||
+ public static boolean testRun = false;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static boolean canEnable(Logger logger) {
|
||||
+ try {
|
||||
+ return SIMDChecker.canEnable(logger);
|
||||
+ } catch (NoClassDefFoundError | Exception ignored) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static int getJavaVersion() {
|
||||
+ // https://stackoverflow.com/a/2591122
|
||||
+ String version = System.getProperty("java.version");
|
||||
+ if(version.startsWith("1.")) {
|
||||
+ version = version.substring(2, 3);
|
||||
+ } else {
|
||||
+ int dot = version.indexOf(".");
|
||||
+ if(dot != -1) { version = version.substring(0, dot); }
|
||||
+ }
|
||||
+ version = version.split("-")[0]; // Azul is stupid
|
||||
+ return Integer.parseInt(version);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..20ec3b29b0cb4061cc89d635b3929ffe71008e22
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
|
||||
@@ -0,0 +1,83 @@
|
||||
+package gg.pufferfish.pufferfish.simd;
|
||||
+
|
||||
+import java.awt.Color;
|
||||
+import jdk.incubator.vector.FloatVector;
|
||||
+import jdk.incubator.vector.IntVector;
|
||||
+import jdk.incubator.vector.VectorMask;
|
||||
+import jdk.incubator.vector.VectorSpecies;
|
||||
+import org.bukkit.map.MapPalette;
|
||||
+
|
||||
+@Deprecated
|
||||
+public class VectorMapPalette {
|
||||
+
|
||||
+ private static final VectorSpecies<Integer> I_SPEC = IntVector.SPECIES_PREFERRED;
|
||||
+ private static final VectorSpecies<Float> F_SPEC = FloatVector.SPECIES_PREFERRED;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static void matchColorVectorized(int[] in, byte[] out) {
|
||||
+ int speciesLength = I_SPEC.length();
|
||||
+ int i;
|
||||
+ for (i = 0; i < in.length - speciesLength; i += speciesLength) {
|
||||
+ float[] redsArr = new float[speciesLength];
|
||||
+ float[] bluesArr = new float[speciesLength];
|
||||
+ float[] greensArr = new float[speciesLength];
|
||||
+ int[] alphasArr = new int[speciesLength];
|
||||
+
|
||||
+ for (int j = 0; j < speciesLength; j++) {
|
||||
+ alphasArr[j] = (in[i + j] >> 24) & 0xFF;
|
||||
+ redsArr[j] = (in[i + j] >> 16) & 0xFF;
|
||||
+ greensArr[j] = (in[i + j] >> 8) & 0xFF;
|
||||
+ bluesArr[j] = (in[i + j] >> 0) & 0xFF;
|
||||
+ }
|
||||
+
|
||||
+ IntVector alphas = IntVector.fromArray(I_SPEC, alphasArr, 0);
|
||||
+ FloatVector reds = FloatVector.fromArray(F_SPEC, redsArr, 0);
|
||||
+ FloatVector greens = FloatVector.fromArray(F_SPEC, greensArr, 0);
|
||||
+ FloatVector blues = FloatVector.fromArray(F_SPEC, bluesArr, 0);
|
||||
+ IntVector resultIndex = IntVector.zero(I_SPEC);
|
||||
+ VectorMask<Integer> modificationMask = VectorMask.fromLong(I_SPEC, 0xffffffff);
|
||||
+
|
||||
+ modificationMask = modificationMask.and(alphas.lt(128).not());
|
||||
+ FloatVector bestDistances = FloatVector.broadcast(F_SPEC, Float.MAX_VALUE);
|
||||
+
|
||||
+ for (int c = 4; c < MapPalette.colors.length; c++) {
|
||||
+ // We're using 32-bit floats here because it's 2x faster and nobody will know the difference.
|
||||
+ // For correctness, the original algorithm uses 64-bit floats instead. Completely unnecessary.
|
||||
+ FloatVector compReds = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getRed());
|
||||
+ FloatVector compGreens = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getGreen());
|
||||
+ FloatVector compBlues = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getBlue());
|
||||
+
|
||||
+ FloatVector rMean = reds.add(compReds).div(2.0f);
|
||||
+ FloatVector rDiff = reds.sub(compReds);
|
||||
+ FloatVector gDiff = greens.sub(compGreens);
|
||||
+ FloatVector bDiff = blues.sub(compBlues);
|
||||
+
|
||||
+ FloatVector weightR = rMean.div(256.0f).add(2);
|
||||
+ FloatVector weightG = FloatVector.broadcast(F_SPEC, 4.0f);
|
||||
+ FloatVector weightB = FloatVector.broadcast(F_SPEC, 255.0f).sub(rMean).div(256.0f).add(2.0f);
|
||||
+
|
||||
+ FloatVector distance = weightR.mul(rDiff).mul(rDiff).add(weightG.mul(gDiff).mul(gDiff)).add(weightB.mul(bDiff).mul(bDiff));
|
||||
+
|
||||
+ // Now we compare to the best distance we've found.
|
||||
+ // This mask contains a "1" if better, and a "0" otherwise.
|
||||
+ VectorMask<Float> bestDistanceMask = distance.lt(bestDistances);
|
||||
+ bestDistances = bestDistances.blend(distance, bestDistanceMask); // Update the best distances
|
||||
+
|
||||
+ // Update the result array
|
||||
+ // We also AND with the modification mask because we don't want to interfere if the alpha value isn't large enough.
|
||||
+ resultIndex = resultIndex.blend(c, bestDistanceMask.cast(I_SPEC).and(modificationMask)); // Update the results
|
||||
+ }
|
||||
+
|
||||
+ for (int j = 0; j < speciesLength; j++) {
|
||||
+ int index = resultIndex.lane(j);
|
||||
+ out[i + j] = (byte) (index < 128 ? index : -129 + (index - 127));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // For the final ones, fall back to the regular method
|
||||
+ for (; i < in.length; i++) {
|
||||
+ out[i] = MapPalette.matchColor(new Color(in[i], true));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index 3a9aaca2e76411a9c27f9f5e0f22d060d5a66d06..9584e245144b561b4f6745b2f26a4f69a6f92891 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.map;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
+import gg.pufferfish.pufferfish.simd.SIMDDetection; // Pufferfish
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Image;
|
||||
@@ -40,7 +41,7 @@ public final class MapPalette {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
- static final Color[] colors = {
|
||||
+ public static final Color[] colors = { // Pufferfish - public access
|
||||
c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0),
|
||||
c(89, 125, 39), c(109, 153, 48), c(127, 178, 56), c(67, 94, 29),
|
||||
c(174, 164, 115), c(213, 201, 140), c(247, 233, 163), c(130, 123, 86),
|
||||
@@ -211,9 +212,15 @@ public final class MapPalette {
|
||||
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());
|
||||
|
||||
byte[] result = new byte[temp.getWidth() * temp.getHeight()];
|
||||
+ // Pufferfish start
|
||||
+ if (!SIMDDetection.isEnabled) {
|
||||
for (int i = 0; i < pixels.length; i++) {
|
||||
result[i] = matchColor(new Color(pixels[i], true));
|
||||
}
|
||||
+ } else {
|
||||
+ gg.pufferfish.pufferfish.simd.VectorMapPalette.matchColorVectorized(pixels, result);
|
||||
+ }
|
||||
+ // Pufferfish end
|
||||
return result;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..bd4d1a40f53784662174d426533ef4b5433a15b7 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -584,7 +584,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
// Paper start
|
||||
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
|
||||
server.getLogger().log(Level.SEVERE, msg, ex);
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
|
||||
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerPluginEnableDisableException(msg, ex, plugin)));
|
||||
}
|
||||
// Paper end
|
||||
@@ -654,9 +656,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.setEventContext(event, registration); // Pufferfish
|
||||
// Paper start - error reporting
|
||||
String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName();
|
||||
server.getLogger().log(Level.SEVERE, msg, ex);
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.removeEventContext(); // Pufferfish
|
||||
if (!(event instanceof com.destroystokyo.paper.event.server.ServerExceptionEvent)) { // We don't want to cause an endless event loop
|
||||
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bacacd7ef6c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -336,7 +336,13 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(true);
|
||||
} catch (Throwable ex) {
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
|
||||
+ // Paper start - Disable plugins that fail to load
|
||||
+ this.server.getPluginManager().disablePlugin(jPlugin);
|
||||
+ return;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// Perhaps abort here, rather than continue going, but as it stands,
|
||||
@@ -361,7 +367,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(false);
|
||||
} catch (Throwable ex) {
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
|
||||
server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
|
||||
}
|
||||
|
||||
if (cloader instanceof PluginClassLoader) {
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 1758e8a89c85eea8c2161ddcb5b0e745151a1f5e..fe21d31b463317eb90d58cbca5f098958ca93938 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -48,6 +48,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
private io.papermc.paper.plugin.provider.classloader.PluginClassLoaderGroup classLoaderGroup; // Paper
|
||||
public io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext; // Paper
|
||||
|
||||
+ private boolean closed = false; // Pufferfish
|
||||
+
|
||||
static {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
}
|
||||
@@ -183,6 +185,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
throw new ClassNotFoundException(name);
|
||||
}
|
||||
|
||||
+ public boolean _airplane_hasClass(@NotNull String name) { return this.classes.containsKey(name); } // Pufferfish
|
||||
@Override
|
||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
|
||||
@@ -190,7 +193,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
}
|
||||
Class<?> result = classes.get(name);
|
||||
|
||||
- if (result == null) {
|
||||
+ if (result == null && !this.closed) { // Pufferfish
|
||||
String path = name.replace('.', '/').concat(".class");
|
||||
JarEntry entry = jar.getJarEntry(path);
|
||||
|
||||
@@ -237,6 +240,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
this.setClass(name, result); // Paper
|
||||
}
|
||||
|
||||
+ if (result == null) throw new ClassNotFoundException(name); // Pufferfish
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -251,6 +255,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
// Paper end
|
||||
super.close();
|
||||
} finally {
|
||||
+ this.closed = true; // Pufferfish
|
||||
jar.close();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
154
patches/api/0002-Use-Gradle-Version-Catalogs.patch
Normal file
154
patches/api/0002-Use-Gradle-Version-Catalogs.patch
Normal file
@@ -0,0 +1,154 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 14 Jan 2024 19:50:29 +0900
|
||||
Subject: [PATCH] Use Gradle Version Catalogs
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d8872448f1929cf 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,13 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
+/* // Plazma - Use Gradle Version Catalogs
|
||||
val annotationsVersion = "24.1.0"
|
||||
val bungeeCordChatVersion = "1.20-R0.2"
|
||||
val adventureVersion = "4.17.0"
|
||||
val slf4jVersion = "2.0.9"
|
||||
val log4jVersion = "2.17.1"
|
||||
+ */ // Plazma - Use Gradle Version Catalogs
|
||||
val apiAndDocs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -39,58 +41,30 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
|
||||
// Paper end - configure mockito agent that is needed in newer java versions
|
||||
|
||||
dependencies {
|
||||
- api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api
|
||||
- // api dependencies are listed transitively to API consumers
|
||||
- api("com.google.guava:guava:32.1.2-jre")
|
||||
- api("com.google.code.gson:gson:2.10.1")
|
||||
- // Paper start - adventure
|
||||
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.18") {
|
||||
- exclude("com.google.guava", "guava")
|
||||
- }
|
||||
- // Paper - adventure
|
||||
- api("org.yaml:snakeyaml:2.2")
|
||||
- api("org.joml:joml:1.10.5")
|
||||
- // Paper start
|
||||
- api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
- isTransitive = false // includes junit
|
||||
- }
|
||||
- api("it.unimi.dsi:fastutil:8.5.6")
|
||||
- apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||
- apiAndDocs("net.kyori:adventure-api")
|
||||
- apiAndDocs("net.kyori:adventure-text-minimessage")
|
||||
- apiAndDocs("net.kyori:adventure-text-serializer-gson")
|
||||
- apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
- apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
- apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
- api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
||||
- api("org.slf4j:slf4j-api:$slf4jVersion")
|
||||
- api("io.sentry:sentry:5.4.0") // Pufferfish
|
||||
-
|
||||
- implementation("org.ow2.asm:asm:9.7.1")
|
||||
- implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
- // Paper end
|
||||
-
|
||||
- api("org.apache.maven:maven-resolver-provider:3.9.6") // Paper - make API dependency for Paper Plugins
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
-
|
||||
- val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
|
||||
- compileOnly(annotations)
|
||||
- testCompileOnly(annotations)
|
||||
-
|
||||
- // Paper start - add checker
|
||||
- val checkerQual = "org.checkerframework:checker-qual:3.33.0"
|
||||
- compileOnlyApi(checkerQual)
|
||||
- testCompileOnly(checkerQual)
|
||||
- // Paper end
|
||||
- api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify
|
||||
-
|
||||
- testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
- testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
- testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
- testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ api(api.bundles.api)
|
||||
+ api(api.bungeechat) { exclude("com.google.guava", "guava") }
|
||||
+ api(common.snakeyaml)
|
||||
+ api(api.jsonsimple) { isTransitive = false }
|
||||
+ apiAndDocs(platform(common.adventure.bom))
|
||||
+ apiAndDocs(common.bundles.adventure)
|
||||
+ api(common.log4j.api)
|
||||
+
|
||||
+ implementation(common.bundles.asm)
|
||||
+
|
||||
+ api(common.mvn)
|
||||
+ compileOnly(common.bundles.mvn)
|
||||
+
|
||||
+ compileOnly(api.annotations)
|
||||
+ testCompileOnly(api.annotations)
|
||||
+
|
||||
+ compileOnlyApi(api.checkerqual)
|
||||
+ testCompileOnly(api.checkerqual)
|
||||
+
|
||||
+ testImplementation(common.commons.lang3)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ mockitoAgent(common.mockito) { isTransitive = false }
|
||||
+ // Plazma end
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -175,27 +149,25 @@ tasks.withType<Javadoc> {
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
- "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
- // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
|
||||
- // Paper start - add missing javadoc links
|
||||
- "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||
- "https://jspecify.dev/docs/api/",
|
||||
- // Paper end
|
||||
- // Paper start
|
||||
- "https://jd.advntr.dev/api/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/key/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
- "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
- "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
||||
- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
||||
- // Paper end
|
||||
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ "https://guava.dev/releases/${api.guava.orNull?.version}/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/${api.annotations.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.joml/joml/${api.joml.orNull?.version}/index.html",
|
||||
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/${api.gson.orNull?.version}",
|
||||
+ "https://jspecify.dev/docs/api/", //diff on change
|
||||
+ "https://jd.advntr.dev/api/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/key/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/text-minimessage/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/text-serializer-gson/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/text-serializer-legacy/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/text-serializer-plain/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://jd.advntr.dev/text-logger-slf4j/${common.adventure.api.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.mvn.connector.orNull?.version}",
|
||||
+ // Plazma end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
93
patches/api/0003-Fork-friendly-Rebranding.patch
Normal file
93
patches/api/0003-Fork-friendly-Rebranding.patch
Normal file
@@ -0,0 +1,93 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Tue, 14 May 2024 18:36:30 +0900
|
||||
Subject: [PATCH] Fork-friendly Rebranding
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..41d10421e1e79711e2e90ff2dc225bfd9cac9284 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
@@ -127,7 +127,7 @@ class TimingHandler implements Timing {
|
||||
while ((last = TIMING_STACK.removeLast()) != this) {
|
||||
last.timingDepth = 0;
|
||||
if ("Minecraft".equalsIgnoreCase(last.identifier.group)) {
|
||||
- Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to Paper unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)");
|
||||
+ Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)"); // Plazma - Fork-friendly Rebranding
|
||||
} else {
|
||||
Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to the plugin " + last.identifier.group + " (Look for errors above this in the logs) (" + last.identifier + " did not stopTiming)", new Throwable());
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index 7196594e07af19a14c320d77df893978525fe386..6ac3376f12df2ee3e0519ab8b5a0c8211350e550 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -33,6 +33,29 @@ public interface ServerBuildInfo {
|
||||
Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur");
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Fork-friendly Rebranding
|
||||
+ /**
|
||||
+ * The brand id for Plazma.
|
||||
+ */
|
||||
+ Key BRAND_PLAZMA_ID = Key.key("plazmamc", "plazma");
|
||||
+
|
||||
+ // For those who fork Plazma - please add the new branding key here
|
||||
+
|
||||
+ /**
|
||||
+ * The brand id of the server.
|
||||
+ */
|
||||
+ Key BRAND_ID = BRAND_PLAZMA_ID;
|
||||
+
|
||||
+ /**
|
||||
+ * Supported brands of the server.
|
||||
+ */
|
||||
+ java.util.List<Key> SUPPORTED_BRANDS = java.util.Arrays.asList(
|
||||
+ BRAND_PAPER_ID,
|
||||
+ BRAND_PURPUR_ID,
|
||||
+ BRAND_PLAZMA_ID
|
||||
+ );
|
||||
+ // Plazma end - Fork-friendly Rebranding
|
||||
+
|
||||
/**
|
||||
* Gets the {@code ServerBuildInfo}.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index c880d0010849ab733ad13bbd18fab3c864d0cf61..316317222a137c2781b9b0c38948912e9dd08c76 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -259,7 +259,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
// Purpur start
|
||||
int distance = getVersionFetcher().distance();
|
||||
final Component message = Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()),
|
||||
- ChatColor.parseMM("<grey>Current Purpur Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
|
||||
+ ChatColor.parseMM("<grey>Current " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()), // Plazma - Fork-friendly Rebranding
|
||||
// Purpur end
|
||||
msg
|
||||
);
|
||||
@@ -282,6 +282,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
}
|
||||
}
|
||||
|
||||
+ /* // Plazma - Fork-friendly Rebranding
|
||||
private static int getDistance(@NotNull String repo, @NotNull String hash) {
|
||||
try {
|
||||
BufferedReader reader = Resources.asCharSource(
|
||||
@@ -302,4 +303,5 @@ public class VersionCommand extends BukkitCommand {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java
|
||||
index 60e086be70529e0804280b24a2a3e7ae72d8d363..dcf1d53af919e94a6947bc3f81121bd4fad1a163 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/EventExecutor.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/EventExecutor.java
|
||||
@@ -54,7 +54,7 @@ public interface EventExecutor {
|
||||
if (m.getReturnType() != Void.TYPE) {
|
||||
final org.bukkit.plugin.java.JavaPlugin plugin = org.bukkit.plugin.java.JavaPlugin.getProvidingPlugin(m.getDeclaringClass());
|
||||
org.bukkit.Bukkit.getLogger().warning("@EventHandler method " + m.getDeclaringClass().getName() + (Modifier.isStatic(m.getModifiers()) ? '.' : '#') + m.getName()
|
||||
- + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of Paper."
|
||||
+ + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + "." // Plazma - Fork-friendly Rebranding
|
||||
+ " This should be reported to the developers of " + plugin.getPluginMeta().getDisplayName() + " (" + String.join(",", plugin.getPluginMeta().getAuthors()) + ')');
|
||||
}
|
||||
if (Modifier.isStatic(m.getModifiers())) {
|
||||
@@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@outlook.com>
|
||||
Date: Thu, 22 Dec 2022 20:29:45 +0900
|
||||
Subject: [PATCH] Bump Bungeecord Chat API to 1.19-R0.1-SNAPSHOT
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b5835fa536f90b7f88a5ee4df78733cf43e1cb23..42de5c470a2fbb1e0bc9b809c033e3afe30502fa 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -25,7 +25,7 @@ dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:31.1-jre")
|
||||
api("com.google.code.gson:gson:2.10")
|
||||
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
|
||||
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper // Plazma
|
||||
api("org.yaml:snakeyaml:1.33")
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
@@ -5,20 +5,20 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 730caafaf9629664ba125f3884559da76616f655..bea2e55c79541939756012963452ca0436d39782 100644
|
||||
index ddb1ff894910761a78b91a343f32e129f03a03c4..bebe4116e50f0b0f64f6bdbd3f05f0b998225435 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1968,6 +1968,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2295,6 +2295,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Paper end
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Plazma Configuration API
|
||||
+ @NotNull
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfiguration() {
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfig() {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
// Purpur start
|
||||
@NotNull
|
||||
public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig() {
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -1,34 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@outlook.com>
|
||||
Date: Fri, 6 Jan 2023 17:11:31 +0900
|
||||
Subject: [PATCH] Publish Packages
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 42de5c470a2fbb1e0bc9b809c033e3afe30502fa..c2c506afd44c7f14de51bd93004aa8a32ff2103e 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -155,3 +155,23 @@ tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+// Plazma start
|
||||
+publishing {
|
||||
+ repositories {
|
||||
+ maven {
|
||||
+ name = "githubPackage"
|
||||
+ url = uri("https://maven.pkg.github.com/PlazmaMC/Plazma")
|
||||
+
|
||||
+ credentials.username = System.getenv("GITHUB_USERNAME")
|
||||
+ credentials.password = System.getenv("GITHUB_TOKEN")
|
||||
+ }
|
||||
+
|
||||
+ publications {
|
||||
+ register<MavenPublication>("gpr") {
|
||||
+ from(components["java"])
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+// Plazma end
|
||||
26
patches/api/0005-Various-API-Tweaks.patch
Normal file
26
patches/api/0005-Various-API-Tweaks.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 May 2024 20:43:37 +0900
|
||||
Subject: [PATCH] Various API Tweaks
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java
|
||||
index 41eaa8159f8c028faa118300e95f6a0fb9cfe989..76a5381a959ae4e153dba291a362f3d58aeceac9 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/MaterialTags.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java
|
||||
@@ -584,6 +584,15 @@ public class MaterialTags {
|
||||
.add(material -> material.name().startsWith("DEEPSLATE_") && material.name().endsWith("_ORE"))
|
||||
.ensureSize("DEEPSLATE_ORES", 8).lock();
|
||||
|
||||
+ // Plazma start - Various API Tweaks
|
||||
+ /**
|
||||
+ * Covers the variants of stone ores.
|
||||
+ */
|
||||
+ public static final MaterialSetTag STONE_ORES = new MaterialSetTag(keyFor("stone_ores"))
|
||||
+ .add(material -> !material.name().startsWith("DEEPSLATE_") && !material.name().startsWith("NETHER_") && material.name().endsWith("_ORE"))
|
||||
+ .ensureSize("STONE_ORES", 8).lock();
|
||||
+ // Plazma end - Various API Tweaks
|
||||
+
|
||||
/**
|
||||
* Covers the variants of raw ore blocks.
|
||||
*/
|
||||
2520
patches/api/0006-Completely-remove-timings-implementations.patch
Normal file
2520
patches/api/0006-Completely-remove-timings-implementations.patch
Normal file
File diff suppressed because it is too large
Load Diff
342
patches/api/0007-Reduce-allocations.patch
Normal file
342
patches/api/0007-Reduce-allocations.patch
Normal file
@@ -0,0 +1,342 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 4 Nov 2024 16:04:55 +0900
|
||||
Subject: [PATCH] Reduce allocations
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java b/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
|
||||
index c89d6c4c38e2390cb11ffba182f8741d3726cfd1..2451f466ae6f953b01ad2cbaeac7d163f09f1c5c 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
|
||||
@@ -16,6 +16,17 @@ import org.jspecify.annotations.Nullable;
|
||||
@FunctionalInterface
|
||||
public interface BasicCommand {
|
||||
|
||||
+ // Plazma start - Reduce allocations
|
||||
+ /**
|
||||
+ * Executes the command with the given {@link CommandSourceStack} and arguments.
|
||||
+ *
|
||||
+ * @param commandSourceStack the commandSourceStack of the command
|
||||
+ */
|
||||
+ default void execute(CommandSourceStack commandSourceStack) {
|
||||
+ this.execute(commandSourceStack, org.plazmamc.plazma.constants.Null.STRING);
|
||||
+ }
|
||||
+ // Plazma end - Reduce allocations
|
||||
+
|
||||
/**
|
||||
* Executes the command with the given {@link CommandSourceStack} and arguments.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Fluid.java b/src/main/java/org/bukkit/Fluid.java
|
||||
index a3ff4fefaf50f3e99a69ba68cbe8e30c95dac5df..5bbecd907e222f9adcf726bccab63c9ef59f5c14 100644
|
||||
--- a/src/main/java/org/bukkit/Fluid.java
|
||||
+++ b/src/main/java/org/bukkit/Fluid.java
|
||||
@@ -10,6 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Represents a fluid type.
|
||||
*/
|
||||
public interface Fluid extends OldEnum<Fluid>, Keyed {
|
||||
+ Fluid[] EMPTY_ARRAY = new Fluid[0]; // Plazma - Reduce allocations
|
||||
|
||||
/**
|
||||
* No fluid.
|
||||
@@ -57,6 +58,6 @@ public interface Fluid extends OldEnum<Fluid>, Keyed {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Fluid[] values() {
|
||||
- return Lists.newArrayList(Registry.FLUID).toArray(new Fluid[0]);
|
||||
+ return Lists.newArrayList(Registry.FLUID).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
index 521f035409ee61a9ad73d39bec938f2938892570..6e53135579426cb677bf34a0813db8268d550428 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
@@ -15,6 +15,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Types of attributes which may be present on an {@link Attributable}.
|
||||
*/
|
||||
public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
||||
+ Attribute[] EMPTY_ARRAY = new Attribute[0]; // Plazma - Reduce allocations
|
||||
|
||||
/**
|
||||
* Maximum health of an Entity.
|
||||
@@ -170,6 +171,6 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Attribute[] values() {
|
||||
- return Lists.newArrayList(Registry.ATTRIBUTE).toArray(new Attribute[0]);
|
||||
+ return Lists.newArrayList(Registry.ATTRIBUTE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java
|
||||
index 464f8f81ba907a61588e4ab869e4f8269830195a..6d50664e76e6e7ed98ca7b311fdb368886ab65a8 100644
|
||||
--- a/src/main/java/org/bukkit/block/Biome.java
|
||||
+++ b/src/main/java/org/bukkit/block/Biome.java
|
||||
@@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* which can be accessed via {@link Registry#BIOME}.
|
||||
*/
|
||||
public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
||||
+ Biome[] EMPTY_ARRAY = new Biome[0]; // Plazma - Reduce allocations
|
||||
|
||||
Biome OCEAN = getBiome("ocean");
|
||||
Biome PLAINS = getBiome("plains");
|
||||
@@ -129,7 +130,7 @@ public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.transl
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Biome[] values() {
|
||||
- return Lists.newArrayList(Registry.BIOME).toArray(new Biome[0]);
|
||||
+ return Lists.newArrayList(Registry.BIOME).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
index 24b58ed80f3dd7c6b35bb18071000af845d18ba4..13ad0ba6320acd054a665d1749871a14cfd1a520 100644
|
||||
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
@@ -12,6 +12,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
+ PatternType[] EMPTY_ARRAY = new PatternType[0]; // Plazma - Reduce allocations
|
||||
+
|
||||
PatternType BASE = getType("base");
|
||||
PatternType SQUARE_BOTTOM_LEFT = getType("square_bottom_left");
|
||||
PatternType SQUARE_BOTTOM_RIGHT = getType("square_bottom_right");
|
||||
@@ -140,6 +142,6 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static PatternType[] values() {
|
||||
- return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(new PatternType[0]);
|
||||
+ return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index 74384a56eebbce41d431db2507c55eddbcf50a41..ef3afe91312de1d0fb38d985e0421ceae59d7e57 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -58,6 +58,19 @@ public abstract class Command {
|
||||
this.activeAliases = new ArrayList<String>(aliases);
|
||||
}
|
||||
|
||||
+ // Plazma start - Reduce allocations
|
||||
+ /**
|
||||
+ * Executes the command, returning its success
|
||||
+ *
|
||||
+ * @param sender Source object which is executing this command
|
||||
+ * @param commandLabel The alias of the command used
|
||||
+ * @return true if the command was successful, otherwise false
|
||||
+ */
|
||||
+ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel) {
|
||||
+ return this.execute(sender, commandLabel, org.plazmamc.plazma.constants.Null.STRING);
|
||||
+ }
|
||||
+ // Plazma end - Reduce allocations
|
||||
+
|
||||
/**
|
||||
* Executes the command, returning its success
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index a824ac90e78d3d7f90b01397270e54422d88e8b9..95df10ad8a53942de435cec7db57c1bb496097dc 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -15,6 +15,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
* The various type of enchantments that may be added to armour or weapons
|
||||
*/
|
||||
public abstract class Enchantment implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
|
||||
+ private static final Enchantment[] EMPTY_ARRAY = new Enchantment[0]; // Plazma - Reduce allocations
|
||||
+
|
||||
/**
|
||||
* Provides protection against environmental damage
|
||||
*/
|
||||
@@ -536,6 +538,6 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@NotNull
|
||||
@Deprecated(since = "1.20.3")
|
||||
public static Enchantment[] values() {
|
||||
- return Lists.newArrayList(Registry.ENCHANTMENT).toArray(new Enchantment[0]);
|
||||
+ return Lists.newArrayList(Registry.ENCHANTMENT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index fca4671c6976aee9e981ef344244f9322651d0c9..7dc1744fba576683155e7970832794c05ceff768 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -51,6 +51,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
* Represents the various different cat types there are.
|
||||
*/
|
||||
interface Type extends OldEnum<Type>, Keyed {
|
||||
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
|
||||
|
||||
Type TABBY = getType("tabby");
|
||||
Type BLACK = getType("black");
|
||||
@@ -89,7 +90,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Type[] values() {
|
||||
- return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
|
||||
+ return Lists.newArrayList(Registry.CAT_VARIANT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Frog.java b/src/main/java/org/bukkit/entity/Frog.java
|
||||
index f661a6b4797dd814a197e9245bcb2ddf2fca773f..58bf414cd753299abc54c45b3036d3fdbf9170dc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Frog.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Frog.java
|
||||
@@ -49,6 +49,7 @@ public interface Frog extends Animals {
|
||||
* Represents the variant of a frog - ie its color.
|
||||
*/
|
||||
interface Variant extends OldEnum<Variant>, Keyed {
|
||||
+ Variant[] EMPTY_ARRAY = new Variant[0]; // Plazma - Reduce allocations
|
||||
|
||||
/**
|
||||
* Temperate (brown-orange) frog.
|
||||
@@ -88,7 +89,7 @@ public interface Frog extends Animals {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Variant[] values() {
|
||||
- return Lists.newArrayList(Registry.FROG_VARIANT).toArray(new Variant[0]);
|
||||
+ return Lists.newArrayList(Registry.FROG_VARIANT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 9c722a762c88a88bb5ef18c3b9eab8b371360dac..127bc2aab7fb36df206d53f3e6042bb6c920878e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -170,6 +170,7 @@ public interface Villager extends AbstractVillager {
|
||||
* in.
|
||||
*/
|
||||
interface Type extends OldEnum<Type>, Keyed {
|
||||
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
|
||||
|
||||
Type DESERT = getType("desert");
|
||||
Type JUNGLE = getType("jungle");
|
||||
@@ -204,7 +205,7 @@ public interface Villager extends AbstractVillager {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Type[] values() {
|
||||
- return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(new Type[0]);
|
||||
+ return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +214,7 @@ public interface Villager extends AbstractVillager {
|
||||
* Villagers have different trading options depending on their profession,
|
||||
*/
|
||||
interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable {
|
||||
+ Profession[] EMPTY_ARRAY = new Profession[0]; // Plazma - Reduce allocations
|
||||
|
||||
Profession NONE = getProfession("none");
|
||||
/**
|
||||
@@ -311,7 +313,7 @@ public interface Villager extends AbstractVillager {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Profession[] values() {
|
||||
- return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
+ return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 7f5682c80ff25142e7c8fa14e03b4a62fc5c01d3..5fbcdf637b1e0162276e668d9ebe4a8648a29b8a 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -286,6 +286,7 @@ public final class MapCursor {
|
||||
* resource pack.
|
||||
*/
|
||||
public interface Type extends OldEnum<Type>, Keyed {
|
||||
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
|
||||
|
||||
Type PLAYER = getType("player");
|
||||
Type FRAME = getType("frame");
|
||||
@@ -387,7 +388,7 @@ public final class MapCursor {
|
||||
@NotNull
|
||||
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
|
||||
static Type[] values() {
|
||||
- return Lists.newArrayList(Registry.MAP_DECORATION_TYPE).toArray(new Type[0]);
|
||||
+ return Lists.newArrayList(Registry.MAP_DECORATION_TYPE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 2f8d3b7a5b25e323f892d2ec5eb7c3412a816ea4..22e358f7a83d84745c32ff9f04d79d51d8d92131 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -47,6 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@Deprecated(forRemoval = true) // Paper - This implementation may be replaced in a future version of Paper.
|
||||
// Plugins may still reflect into this class to modify permission logic for the time being.
|
||||
public final class SimplePluginManager implements PluginManager {
|
||||
+ public static final Plugin[] EMPTY_PLUGIN = new Plugin[0]; // Plazma - Reduce allocations
|
||||
private final Server server;
|
||||
private final Map<Pattern, PluginLoader> fileAssociations = new HashMap<Pattern, PluginLoader>();
|
||||
private final List<Plugin> plugins = new ArrayList<Plugin>();
|
||||
@@ -133,7 +134,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
this.server.getLogger().log(Level.SEVERE, "Plugin loading error!", e);
|
||||
}
|
||||
}
|
||||
- return pluginList.toArray(new Plugin[0]);
|
||||
+ return pluginList.toArray(EMPTY_PLUGIN); // Plazma - Reduce allocations
|
||||
}
|
||||
Preconditions.checkArgument(directory != null, "Directory cannot be null");
|
||||
Preconditions.checkArgument(directory.isDirectory(), "Directory must be a directory");
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index e4cfdc80c9e49fc7992183022bdf2f36aae0d95a..0cd7987e935e2b7ede759af3db9af04366930e19 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -19,6 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public abstract class PotionEffectType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable, io.papermc.paper.world.flag.FeatureDependant { // Paper - implement Translatable & feature flag API
|
||||
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
|
||||
+ private static final PotionEffectType[] EMPTY_ARRAY = new PotionEffectType[0]; // Plazma - Reduce allocations
|
||||
|
||||
/**
|
||||
* Increases movement speed.
|
||||
@@ -358,7 +359,7 @@ public abstract class PotionEffectType implements Keyed, Translatable, net.kyori
|
||||
@NotNull
|
||||
@Deprecated(since = "1.20.3")
|
||||
public static PotionEffectType[] values() {
|
||||
- return Lists.newArrayList(Registry.EFFECT).toArray(new PotionEffectType[0]);
|
||||
+ return Lists.newArrayList(Registry.EFFECT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Constants.java b/src/main/java/org/plazmamc/plazma/Constants.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..137f4f511998828476c2ac408a9a76289a44d071
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Constants.java
|
||||
@@ -0,0 +1,7 @@
|
||||
+package org.plazmamc.plazma;
|
||||
+
|
||||
+public interface Constants {
|
||||
+
|
||||
+ int[] ZERO_INT_ARRAY = new int[]{0};
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/constants/Null.java b/src/main/java/org/plazmamc/plazma/constants/Null.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6018a9230d0d92e23f09cc5b5cc042446bed9962
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/constants/Null.java
|
||||
@@ -0,0 +1,25 @@
|
||||
+package org.plazmamc.plazma.constants;
|
||||
+
|
||||
+import net.md_5.bungee.api.chat.BaseComponent;
|
||||
+import java.net.URL;
|
||||
+import java.util.concurrent.CompletableFuture;
|
||||
+import java.util.regex.Pattern;
|
||||
+
|
||||
+public interface Null {
|
||||
+
|
||||
+ byte[] BYTE = new byte[0];
|
||||
+ short[] SHORT = new short[0];
|
||||
+ int[] INT = new int[0];
|
||||
+ long[] LONG = new long[0];
|
||||
+
|
||||
+ Object[] OBJECT = new Object[0];
|
||||
+ String[] STRING = new String[0];
|
||||
+ URL[] URL = new URL[0];
|
||||
+ Pattern[] REGEX = new Pattern[0];
|
||||
+
|
||||
+ BaseComponent[] COMPONENT = new BaseComponent[0];
|
||||
+
|
||||
+ @SuppressWarnings("rawtypes")
|
||||
+ CompletableFuture[] FUTURE = new CompletableFuture[0];
|
||||
+
|
||||
+}
|
||||
24
patches/api/0008-Add-option-to-shoot-fireball.patch
Normal file
24
patches/api/0008-Add-option-to-shoot-fireball.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 14 Dec 2024 12:25:43 +0900
|
||||
Subject: [PATCH] Add option to shoot fireball
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
index 361db256296d776c27e601c923b2cdc61967122b..8a740bdd99b683255fdd7ebf81f28ceca8b030f8 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
@@ -224,6 +224,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
/**
|
||||
* When an entity is missing a SpawnReason
|
||||
*/
|
||||
- DEFAULT
|
||||
+ DEFAULT,
|
||||
+ // Plazma start - Option to shoot fireballs
|
||||
+ /*
|
||||
+ * When a player shoots a fire charge
|
||||
+ */
|
||||
+ FIRE_CHARGE,
|
||||
+ // Plazma end - Option to shoot fireballs
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <contact@granny.dev>
|
||||
Date: Thu, 18 Jan 2024 21:01:12 +0900
|
||||
Subject: [PATCH] Purpur Generated API Changes
|
||||
|
||||
PurpurMC
|
||||
Copyright (C) 2024 PurpurMC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
index 35dfd25f21ca67b7f4d69326500980f4a021ef49..a9816fbfa466b3fe3f82c19aeeeb564c660e4b6a 100644
|
||||
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -441,6 +441,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
|
||||
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);
|
||||
|
||||
+ // Purpur start
|
||||
+ GoalKey<Mob> MOB_HAS_RIDER = GoalKey.of(Mob.class, NamespacedKey.minecraft("has_rider"));
|
||||
+ GoalKey<AbstractHorse> HORSE_HAS_RIDER = GoalKey.of(AbstractHorse.class, NamespacedKey.minecraft("horse_has_rider"));
|
||||
+ GoalKey<Llama> LLAMA_HAS_RIDER = GoalKey.of(Llama.class, NamespacedKey.minecraft("llama_has_rider"));
|
||||
+ GoalKey<Phantom> FIND_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal"));
|
||||
+ GoalKey<Phantom> ORBIT_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal"));
|
||||
+ GoalKey<Drowned> DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager"));
|
||||
+ GoalKey<Zombie> ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager"));
|
||||
+ GoalKey<Wolf> AVOID_RABID_WOLF = GoalKey.of(Wolf.class, NamespacedKey.minecraft("avoid_rabid_wolf"));
|
||||
+ GoalKey<IronGolem> RECEIVE_FLOWER = GoalKey.of(IronGolem.class, NamespacedKey.minecraft("receive_flower"));
|
||||
+ // Purpur end
|
||||
+
|
||||
private static <T extends Mob> GoalKey<T> create(final String key, final Class<T> type) {
|
||||
return GoalKey.of(type, NamespacedKey.minecraft(key));
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
71
patches/server/0002-mc-dev-fixes.patch
Normal file
71
patches/server/0002-mc-dev-fixes.patch
Normal file
@@ -0,0 +1,71 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 2 Nov 2024 15:26:27 +0900
|
||||
Subject: [PATCH] mc dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/DebugCommand.java b/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
||||
index 06568cc308e06b16f43ec7facd5e2c4e36f3fee9..f8cdd6911fe9d6402455b7368d0e98c25e9511ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/DebugCommand.java
|
||||
@@ -271,5 +271,12 @@ public class DebugCommand {
|
||||
public void close() {
|
||||
IOUtils.closeQuietly((Writer)this.output);
|
||||
}
|
||||
+
|
||||
+ // Plazma start - Decompile fixes
|
||||
+ @Override
|
||||
+ public CommandSender getBukkitSender(final CommandSourceStack wrapper) {
|
||||
+ return wrapper.getBukkitSender();
|
||||
+ }
|
||||
+ // Plazma end - Decompile fixes
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/ReturnCommand.java b/src/main/java/net/minecraft/server/commands/ReturnCommand.java
|
||||
index 9f82ca1fee2a319d52a4106c3581f5e9a9554a9e..f5c7748117342dedd9d600881143c206e429fe5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/ReturnCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/ReturnCommand.java
|
||||
@@ -16,18 +16,18 @@ import net.minecraft.commands.execution.tasks.BuildContexts;
|
||||
import net.minecraft.commands.execution.tasks.FallthroughTask;
|
||||
|
||||
public class ReturnCommand {
|
||||
- public static <T extends ExecutionCommandSource<T>> void register(CommandDispatcher<T> dispatcher) {
|
||||
- dispatcher.register(
|
||||
- (LiteralArgumentBuilder<T>)LiteralArgumentBuilder.<ExecutionCommandSource>literal("return")
|
||||
- .requires(source -> source.hasPermission(2))
|
||||
- .then(
|
||||
- RequiredArgumentBuilder.<T, Integer>argument("value", IntegerArgumentType.integer())
|
||||
- .executes(new ReturnCommand.ReturnValueCustomExecutor<>())
|
||||
- )
|
||||
- .then(LiteralArgumentBuilder.<T>literal("fail").executes(new ReturnCommand.ReturnFailCustomExecutor<>()))
|
||||
- .then(LiteralArgumentBuilder.<T>literal("run").forward(dispatcher.getRoot(), new ReturnCommand.ReturnFromCommandCustomModifier<>(), false))
|
||||
+
|
||||
+ // Plazma start - Decompile fixes
|
||||
+ public static void register(CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher) {
|
||||
+ dispatcher.register(net.minecraft.commands.Commands.literal("return")
|
||||
+ .requires(source -> source.hasPermission(2))
|
||||
+ .then(net.minecraft.commands.Commands.argument("value", IntegerArgumentType.integer())
|
||||
+ .executes(new ReturnCommand.ReturnValueCustomExecutor<>()))
|
||||
+ .then(net.minecraft.commands.Commands.literal("fail").executes(new ReturnCommand.ReturnFailCustomExecutor<>()))
|
||||
+ .then(net.minecraft.commands.Commands.literal("run").forward(dispatcher.getRoot(), new ReturnCommand.ReturnFromCommandCustomModifier<>(), false))
|
||||
);
|
||||
}
|
||||
+ // Plazma end - Decompile fixes
|
||||
|
||||
static class ReturnFailCustomExecutor<T extends ExecutionCommandSource<T>> implements CustomCommandExecutor.CommandAdapter<T> {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java b/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java
|
||||
index 3fc1ec01e1a77a169ec762a23f15b97f040ce5f8..b5464708c1fa949e7df8aed71126ccad72d66ee3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java
|
||||
@@ -62,8 +62,8 @@ public class AllayAi {
|
||||
Activity.CORE,
|
||||
0,
|
||||
ImmutableList.of(
|
||||
- new Swim<>(0.8F),
|
||||
- new AnimalPanic(2.5F),
|
||||
+ new Swim<Allay>(0.8F), // Plazma - mc dev fixes
|
||||
+ new AnimalPanic<Allay>(2.5F), // Plazma - mc dev fixes
|
||||
new LookAtTargetSink(45, 90),
|
||||
new MoveToTargetSink(),
|
||||
new CountDownCooldownTicks(MemoryModuleType.LIKED_NOTEBLOCK_COOLDOWN_TICKS),
|
||||
19
patches/server/0003-Minor-code-optimizations.patch
Normal file
19
patches/server/0003-Minor-code-optimizations.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 13 Dec 2024 13:54:22 +0900
|
||||
Subject: [PATCH] Minor code optimizations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 34e8eb828be517d9ee3973597c74c5cac3d75c99..f8575f94a389d87d8043ae838720dbe2247235c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1697,7 +1697,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
Profiler.get().incrementCounter("getEntities");
|
||||
- List<Entity> list = Lists.newArrayList();
|
||||
+ //List<Entity> list = Lists.newArrayList(); // Plazma - minor optimizations
|
||||
|
||||
// Paper start - rewrite chunk system
|
||||
final List<Entity> ret = new java.util.ArrayList<>();
|
||||
@@ -1,390 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@outlook.com>
|
||||
Date: Wed, 21 Dec 2022 19:31:24 +0900
|
||||
Subject: [PATCH] Rebrand
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e..dc89b3a8956af69fa71a2bfa17c22aee6c5e9edf 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -7,7 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
- implementation(project(":purpur-api")) // Purpur
|
||||
+ implementation(project(":plazma-api")) // Purpur
|
||||
implementation("io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT") // Purpur
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
@@ -81,7 +81,7 @@ tasks.jar {
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur
|
||||
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma
|
||||
"Implementation-Vendor" to date, // Paper
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76098a79da 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur
|
||||
+ Metrics metrics = new Metrics("Plazma", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
@@ -603,7 +603,7 @@ public class Metrics {
|
||||
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("plazma_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Plazma
|
||||
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199f27babbd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -20,7 +20,7 @@ import java.util.stream.StreamSupport;
|
||||
public class PaperVersionFetcher implements VersionFetcher {
|
||||
private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
|
||||
// Purpur start
|
||||
- private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads";
|
||||
+ private static final String DOWNLOAD_PAGE = "https://github.com/PlazmaMC/Plazma/releases"; // Plazma
|
||||
private static int distance = -2; public int distance() { return distance; }
|
||||
// Purpur end
|
||||
private static @Nullable String mcVer;
|
||||
@@ -33,8 +33,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Component getVersionMessage(@Nonnull String serverVersion) {
|
||||
- String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
|
||||
- final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur
|
||||
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
|
||||
final Component history = getHistory();
|
||||
|
||||
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
||||
@@ -47,7 +47,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
String result = matcher.group();
|
||||
mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
|
||||
} else {
|
||||
- org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Purpur!"); // Purpur
|
||||
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Plazma!"); // Purpur // Plazma
|
||||
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
||||
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
|
||||
}
|
||||
@@ -57,6 +57,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
}
|
||||
|
||||
private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
|
||||
+ /* // Plazma - Disable CI Checking
|
||||
//int distance; // Purpur - use field
|
||||
try {
|
||||
int jenkinsBuild = Integer.parseInt(versionInfo);
|
||||
@@ -65,6 +66,11 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
versionInfo = versionInfo.replace("\"", "");
|
||||
distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
|
||||
}
|
||||
+ // Plazma start - Disable CI Checking
|
||||
+ */
|
||||
+ versionInfo = versionInfo.replace("\"", ""); // Plazma
|
||||
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo); // Plazma
|
||||
+ // Plazma end
|
||||
|
||||
switch (distance) {
|
||||
case -1:
|
||||
@@ -83,6 +89,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
}
|
||||
}
|
||||
|
||||
+ /* // Plazma - Disable CI Checking
|
||||
private static int fetchDistanceFromSiteApi(int jenkinsBuild, @Nullable String siteApiVersion) {
|
||||
if (siteApiVersion == null) { return -1; }
|
||||
try {
|
||||
@@ -102,6 +109,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Disable CI Checking
|
||||
|
||||
// Contributed by Techcable <Techcable@outlook.com> in GH-65
|
||||
private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index 3cb56595822799926a8141e60a42f5d1edfc6de5..19d1d136fc28d6c114f6bc44c6450d2df51c3cb9 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@Override
|
||||
protected LineReader buildReader(LineReaderBuilder builder) {
|
||||
builder
|
||||
- .appName("Purpur") // Purpur
|
||||
+ .appName("Plazma") // Purpur // Plazma
|
||||
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index b5b6657e52e4f7a630229bd3ba433438af293e22..c468733f44ccb3ff4ba3c20921a4ec52658f0689 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -35,7 +35,7 @@ public class CrashReport {
|
||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper
|
||||
this.title = message;
|
||||
this.exception = cause;
|
||||
- this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
||||
+ this.systemReport.setDetail("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -125,7 +125,7 @@ public class CrashReport {
|
||||
stringbuilder.append("---- Minecraft Crash Report ----\n");
|
||||
// Purpur start
|
||||
stringbuilder.append("// ");
|
||||
- stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!");
|
||||
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO PLAZMA INSTEAD!"); // Plazma
|
||||
// Purpur end
|
||||
stringbuilder.append("// ");
|
||||
stringbuilder.append(CrashReport.getErrorComment());
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index c6fa6bcd66d61359124a8426b919493c6ec43f06..e0eaa847526431ac58d00f18f0fca6b1ef9a79cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -81,6 +81,17 @@ public class Main {
|
||||
|
||||
@DontObfuscate
|
||||
public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
|
||||
+ // Plazma start - Branding
|
||||
+ System.out.println("""
|
||||
+ \033[38;2;236;61;151m┏\033[38;2;236;61;157m━\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┓\033[38;2;239;63;193m \033[38;2;239;64;200m┏\033[38;2;240;64;206m━\033[38;2;240;64;212m┓\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m \033[38;2;232;67;243m┏\033[38;2;227;67;244m━\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m━\033[38;2;205;69;245m┓\033[38;2;200;69;246m \033[38;2;195;69;246m┏\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┏\033[38;2;147;73;249m━\033[38;2;141;73;250m━\033[38;2;136;74;250m┓\033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m┏\033[38;2;109;76;252m━\033[38;2;104;76;252m━\033[38;2;99;77;252m┓\033[38;2;94;77;253m \033[38;2;88;77;253m┏\033[38;2;83;78;253m━\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m━\033[38;2;80;97;255m┓\033[38;2;80;103;255m\s
|
||||
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┏\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┓\033[38;2;239;63;187m┗\033[38;2;239;63;193m┓\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┏\033[38;2;232;67;243m┛\033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m┗\033[38;2;200;69;246m┓\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m┓\033[38;2;173;71;247m \033[38;2;168;71;248m \033[38;2;163;72;248m┏\033[38;2;157;72;249m┛\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m \033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m \033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┏\033[38;2;88;77;253m┛\033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m┗\033[38;2;80;103;255m┓
|
||||
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┗\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┛\033[38;2;239;63;187m┏\033[38;2;239;63;193m┛\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┗\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┛\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m \033[38;2;184;70;247m┏\033[38;2;179;70;247m┛\033[38;2;173;71;247m \033[38;2;168;71;248m┏\033[38;2;163;72;248m┛\033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┏\033[38;2;136;74;250m┓\033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m┏\033[38;2;109;76;252m┓\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┗\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┛\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
||||
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┏\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┛\033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m┏\033[38;2;184;70;247m┛\033[38;2;179;70;247m \033[38;2;173;71;247m┏\033[38;2;168;71;248m┛\033[38;2;163;72;248m \033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
||||
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┃\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┗\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┓\033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┃\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┃\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m┏\033[38;2;189;70;246m┛\033[38;2;184;70;247m \033[38;2;179;70;247m \033[38;2;173;71;247m┗\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m \033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m \033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┃\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┃\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
||||
+ \033[38;2;236;61;151m┗\033[38;2;236;61;157m━\033[38;2;237;62;163m┛\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┗\033[38;2;240;64;206m━\033[38;2;240;64;212m━\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┛\033[38;2;237;66;243m┗\033[38;2;232;67;243m━\033[38;2;227;67;244m┛\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┗\033[38;2;205;69;245m━\033[38;2;200;69;246m┛\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┛\033[38;2;152;72;249m┗\033[38;2;147;73;249m━\033[38;2;141;73;250m┛\033[38;2;136;74;250m \033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m \033[38;2;109;76;252m┗\033[38;2;104;76;252m━\033[38;2;99;77;252m┛\033[38;2;94;77;253m┗\033[38;2;88;77;253m━\033[38;2;83;78;253m┛\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┗\033[38;2;80;97;255m━\033[38;2;80;103;255m┛
|
||||
+ """);
|
||||
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so DO NOT USE it on a production server!");
|
||||
+ // Plazma end
|
||||
SharedConstants.tryDetectVersion();
|
||||
/* CraftBukkit start - Replace everything
|
||||
OptionParser optionparser = new OptionParser();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 46b9aed8ab46bd4bfdcf44a392ffc34e26da0f5f..62ccafc3df9e2d25dbe7e2ad9322f306f8df8061 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -930,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isSameThread()) {
|
||||
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PURPUR)"); // Purpur
|
||||
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PLAZMA)"); // Purpur // Plazma
|
||||
while (this.getRunningThread().isAlive()) {
|
||||
this.getRunningThread().stop();
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index c07918aa1ed2469ad7a76a0add60ab648ff7f421..d14e42612752ef1d5c37c492b62ed4a6d65c1e0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -51,7 +51,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
;
|
||||
}
|
||||
|
||||
- final JFrame jframe = new JFrame("Minecraft server");
|
||||
+ final JFrame jframe = new JFrame("Plazma"); // Plazma
|
||||
final MinecraftServerGui servergui = new MinecraftServerGui(server);
|
||||
|
||||
jframe.setDefaultCloseOperation(2);
|
||||
@@ -59,7 +59,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
jframe.pack();
|
||||
jframe.setLocationRelativeTo((Component) null);
|
||||
jframe.setVisible(true);
|
||||
- jframe.setName("Minecraft server"); // Paper
|
||||
+ jframe.setName("Plazma"); // Paper // Plazma
|
||||
|
||||
// Paper start - Add logo as frame image
|
||||
try {
|
||||
@@ -71,7 +71,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
jframe.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent windowevent) {
|
||||
if (!servergui.isClosing.getAndSet(true)) {
|
||||
- jframe.setTitle("Minecraft server - shutting down!");
|
||||
+ jframe.setTitle("Plazma - shutting down"); // Plazma
|
||||
server.halt(true);
|
||||
servergui.runFinalizers();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b8001bca2a33ec1e60566948a651400418a6e9e7..92b440b24c6b083f81837611d08fbd6773a2a6e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1041,7 +1041,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition);
|
||||
// Spigot start
|
||||
if (tickingblockentity == null) {
|
||||
- this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
||||
+ this.getCraftServer().getLogger().severe("Plazma has detected a null entity and has removed it, preventing a crash"); // Plazma
|
||||
tilesThisCycle--;
|
||||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d25f79db1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -113,7 +113,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
||||
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PLAZMA - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Plazma
|
||||
}
|
||||
|
||||
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bc1a2df0a7ddaf030917e4723994464d77e55d02..e59532dda47d0f9635b5393cb4ef0484fd6bb9ae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
- private final String serverName = "Purpur"; // Paper // Pufferfish // Purpur
|
||||
+ private final String serverName = "Plazma"; // Paper // Pufferfish // Purpur // Plazma
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index cf7ba8724ab68f6955b5ebfa1ba46c4397da32b3..54cbe906619a30b5f7b5dbb344eebf3452e1b200 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -883,7 +883,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return EntityCategory.WATER;
|
||||
}
|
||||
|
||||
- throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Purpur."); // Purpur
|
||||
+ throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Plazma."); // Purpur // Plazma
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 5402098dce0d64d3dceea51f248d7d366850a74f..c49bed43a34549936b5751678f2389c2d9a6e1ec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -504,7 +504,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
this.parsePending();
|
||||
} else {
|
||||
//this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
||||
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Purpur"); // Paper // Purpur
|
||||
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Plazma"); // Paper // Purpur // Plazma
|
||||
// We don't need to parse pending
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616d4e857c6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -8,22 +8,25 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public final class Versioning {
|
||||
- public static String getBukkitVersion() {
|
||||
- String result = "Unknown-Version";
|
||||
-
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.purpurmc.purpur/purpur-api/pom.properties"); // Pufferfish // Purpur
|
||||
+ // Plazma start
|
||||
+ public static String version = "Unknown-Version";
|
||||
+ static {
|
||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties");
|
||||
Properties properties = new Properties();
|
||||
|
||||
if (stream != null) {
|
||||
try {
|
||||
properties.load(stream);
|
||||
|
||||
- result = properties.getProperty("version");
|
||||
+ version = properties.getProperty("version");
|
||||
} catch (IOException ex) {
|
||||
- Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Bukkit version!", ex);
|
||||
+ Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Plazma version!", ex);
|
||||
}
|
||||
}
|
||||
+ }
|
||||
|
||||
- return result;
|
||||
+ public static String getBukkitVersion() {
|
||||
+ return version;
|
||||
}
|
||||
+ // Plazma end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 0bcbe1f07ff8e552d2abd6e432af5710005acc04..ac238eeea791180b66677870401c0b756f0db07b 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -227,7 +227,7 @@ public class PurpurConfig {
|
||||
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
|
||||
}
|
||||
|
||||
- public static String serverModName = "Purpur";
|
||||
+ public static String serverModName = "Plazma"; // Plazma
|
||||
private static void serverModName() {
|
||||
serverModName = getString("settings.server-mod-name", serverModName);
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index a810bfd3b8d6bd4d8f2ef8797e4281ae4fe8a67f..a7017a0f8326e307397d357774d39216e525bdd8 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -96,7 +96,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
|
||||
private WatchdogThread(long timeoutTime, boolean restart)
|
||||
{
|
||||
- super( "Watchdog Thread" ); // Purpur - use a generic name
|
||||
+ super( "Plazma Watchdog Thread" ); // Purpur - use a generic name // Plazma
|
||||
this.timeoutTime = timeoutTime;
|
||||
this.restart = restart;
|
||||
earlyWarningEvery = Math.min(io.papermc.paper.configuration.GlobalConfiguration.get().watchdog.earlyWarningEvery, timeoutTime); // Paper
|
||||
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
if (isLongTimeout) {
|
||||
// Paper end
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Purpur bug." ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Plazma bug." ); // Paper // Purpur // Plazma
|
||||
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
|
||||
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
|
||||
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
|
||||
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
|
||||
- log.log( Level.SEVERE, "If you are unsure or still think this is a Purpur bug, please report this to https://github.com/PurpurMC/Purpur/issues" ); // Purpur
|
||||
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Plazma bug, please report this to https://github.com/PlazmaMC/Plazma/issues" ); // Purpur // Plazma
|
||||
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
||||
- log.log( Level.SEVERE, "Purpur version: " + Bukkit.getServer().getVersion() ); // Purpur
|
||||
+ log.log( Level.SEVERE, "Plazma version: " + Bukkit.getServer().getVersion() ); // Purpur
|
||||
//
|
||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||
{
|
||||
@@ -185,12 +185,12 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
// Paper end
|
||||
} else
|
||||
{
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma
|
||||
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
|
||||
}
|
||||
// Paper end - Different message for short timeout
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Plazma!):" ); // Paper // Purpur // Plazma
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
||||
this.dumpTickingInfo(); // Paper - log detailed tick information
|
||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
@@ -206,7 +206,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
WatchdogThread.dumpThread( thread, log );
|
||||
}
|
||||
} else {
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma
|
||||
}
|
||||
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
130
patches/server/0004-Build-System-Changes.patch
Normal file
130
patches/server/0004-Build-System-Changes.patch
Normal file
@@ -0,0 +1,130 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 14 Jan 2024 19:51:19 +0900
|
||||
Subject: [PATCH] Build System Changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 77602e4445b1b45a17e5552ac6a769e0ed46ebc7..f021047331c7eb3dac7f0d56af73a9056ffe826b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -26,71 +26,34 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
|
||||
- // Paper start
|
||||
- implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
||||
- implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
|
||||
- implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
- implementation("net.kyori:adventure-text-serializer-ansi:4.17.0") // Keep in sync with adventureVersion from Paper-API build file
|
||||
- /*
|
||||
- Required to add the missing Log4j2Plugins.dat file from log4j-core
|
||||
- which has been removed by Mojang. Without it, log4j has to classload
|
||||
- all its classes to check if they are plugins.
|
||||
- Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||
- */
|
||||
- implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
|
||||
- log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
||||
- runtimeOnly(log4jPlugins.output)
|
||||
- alsoShade(log4jPlugins.output)
|
||||
- implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
|
||||
- // Paper end
|
||||
- implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
- implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
- implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
|
||||
- implementation("commons-lang:commons-lang:2.6")
|
||||
- runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
|
||||
- runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
|
||||
- runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
- // Paper start - Use Velocity cipher
|
||||
- implementation("com.velocitypowered:velocity-native:3.3.0-SNAPSHOT") {
|
||||
- isTransitive = false
|
||||
- }
|
||||
- // Paper end - Use Velocity cipher
|
||||
-
|
||||
- runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
- runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||
- runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
-
|
||||
- // Pufferfish start
|
||||
- implementation("org.yaml:snakeyaml:1.32")
|
||||
- implementation ("com.github.carleslc.Simple-YAML:Simple-Yaml:1.8.4") { // Purpur
|
||||
- exclude(group="org.yaml", module="snakeyaml")
|
||||
- }
|
||||
- // Pufferfish end
|
||||
-
|
||||
- implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||
- implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
||||
- implementation("dev.omega24:upnp4j:1.0") // Purpur
|
||||
-
|
||||
- testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
- testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
|
||||
- testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
- testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
|
||||
- testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
- testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
|
||||
- implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
|
||||
- implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
|
||||
- // Paper start - Remap reflection
|
||||
- val reflectionRewriterVersion = "0.0.3"
|
||||
- implementation("io.papermc:reflection-rewriter:$reflectionRewriterVersion")
|
||||
- implementation("io.papermc:reflection-rewriter-runtime:$reflectionRewriterVersion")
|
||||
- implementation("io.papermc:reflection-rewriter-proxy-generator:$reflectionRewriterVersion")
|
||||
- // Paper end - Remap reflection
|
||||
- // Paper start - spark
|
||||
- implementation("me.lucko:spark-api:0.1-20240720.200737-2")
|
||||
- implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT")
|
||||
- // Paper end - spark
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ implementation(server.bundles.implementation)
|
||||
+ implementation(common.adventure.serializer.ansi)
|
||||
+ implementation(common.log4j.stream)
|
||||
+
|
||||
+ implementation(common.log4j)
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j)
|
||||
+ runtimeOnly(log4jPlugins.output) // diff on change
|
||||
+ alsoShade(log4jPlugins.output) // diff on change
|
||||
+
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
+
|
||||
+ implementation(common.bundles.asm)
|
||||
+ implementation(common.commons.lang2)
|
||||
+ implementation(server.velocity.native) { isTransitive = false }
|
||||
+
|
||||
+ runtimeOnly(common.mvn)
|
||||
+ runtimeOnly(common.bundles.mvn)
|
||||
+
|
||||
+ implementation(common.snakeyaml)
|
||||
+ implementation(server.simpleyaml) { exclude(group="org.yaml", module="snakeyaml") }
|
||||
+
|
||||
+ testImplementation(server.classgraph)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(common.junit)
|
||||
+ mockitoAgent(common.mockito) { isTransitive = false }
|
||||
+ testImplementation(common.junit.pioneer)
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -118,14 +81,14 @@ tasks.jar {
|
||||
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
- "Implementation-Title" to "Purpur", // Pufferfish // Purpur
|
||||
+ "Implementation-Title" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
"Implementation-Version" to implementationVersion,
|
||||
"Implementation-Vendor" to date, // Paper
|
||||
- "Specification-Title" to "Purpur", // Pufferfish // Purpur
|
||||
+ "Specification-Title" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
"Specification-Version" to project.version,
|
||||
- "Specification-Vendor" to "Purpur Team", // Pufferfish // Purpur
|
||||
- "Brand-Id" to "purpurmc:purpur", // Pufferfish // Purpur
|
||||
- "Brand-Name" to "Purpur", // Pufferfish // Purpur
|
||||
+ "Specification-Vendor" to rootProject.providers.gradleProperty("providerName").get(), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
+ "Brand-Id" to rootProject.providers.gradleProperty("brandKey").get(), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
+ "Brand-Name" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
"Build-Number" to (build ?: ""),
|
||||
"Build-Time" to Instant.now().toString(),
|
||||
"Git-Branch" to gitBranch, // Paper
|
||||
@@ -1,430 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@gmail.com>
|
||||
Date: Fri, 10 Mar 2023 22:08:56 +0900
|
||||
Subject: [PATCH] Rebrand Logo
|
||||
|
||||
|
||||
diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png
|
||||
index a7d785f60c884ee4ee487cc364402d66c3dc2ecc..278de5d47a7802ab89d9ae39c1560ef87d6d6fc4 100644
|
||||
GIT binary patch
|
||||
literal 7999
|
||||
zcmbVRXIN9)nhw27Hx!i+1f?gG2%$>{>7YoHkOb)o5Fqp}ErNg)l_mnxqzWP+O`3v&
|
||||
zR275(A_yGm9bv*b9_P-?y)*Zj{XA>0wfB10SKhDeA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1,438 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 21 Dec 2022 19:31:24 +0900
|
||||
Subject: [PATCH] Fork-friendly Rebranding
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f021047331c7eb3dac7f0d56af73a9056ffe826b..41005f58fdd526907972185e728bbe1fa97171e9 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -25,7 +25,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
|
||||
// Paper end - configure mockito agent that is needed in newer java versions
|
||||
|
||||
dependencies {
|
||||
- implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
|
||||
+ implementation(project(":plazma-api")) // Pufferfish // Paper // Purpur // Plazma
|
||||
// Plazma start - Use Gradle Version Catalogs
|
||||
implementation(server.bundles.implementation)
|
||||
implementation(common.adventure.serializer.ansi)
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..8d5a52c5762c3d9b44dcdf00ae312e0bdc01fa1f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur
|
||||
+ Metrics metrics = new Metrics(io.papermc.paper.ServerBrandConstants.BRAND_NAME, serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
index 6d36fc6d8e22d9b68dea3830f6ecc8763184c343..6995627310de4911d87a2f93a723d6b93dc0612f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -36,7 +36,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
private static final int DISTANCE_ERROR = -1;
|
||||
private static final int DISTANCE_UNKNOWN = -2;
|
||||
// Purpur start
|
||||
- private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads";
|
||||
+ // private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads"; // Plazma - Fork-friendly Rebranding
|
||||
private static int distance = DISTANCE_UNKNOWN; public int distance() { return distance; }
|
||||
// Purpur end
|
||||
|
||||
@@ -52,7 +52,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
if (build.buildNumber().isEmpty() && build.gitCommit().isEmpty()) {
|
||||
updateMessage = text("You are running a development version without access to version information", color(0xFF5300));
|
||||
} else {
|
||||
- updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", build); // Purpur
|
||||
+ updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", build); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
final @Nullable Component history = this.getHistory();
|
||||
|
||||
@@ -63,8 +63,12 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
//int distance = DISTANCE_ERROR; // Purpur - use field
|
||||
|
||||
final OptionalInt buildNumber = build.buildNumber();
|
||||
- if (buildNumber.isPresent()) {
|
||||
- distance = fetchDistanceFromSiteApi(build, buildNumber.getAsInt());
|
||||
+ // Plazma start - TODO: CI Checking
|
||||
+ //noinspection PointlessBooleanExpression
|
||||
+ if (false && buildNumber.isPresent()) {
|
||||
+ throw new UnsupportedOperationException("Version fetching from CI is not supported yet");
|
||||
+ // distance = fetchDistanceFromSiteApi(build, buildNumber.getAsInt());
|
||||
+ // Plazma end - TODO: CI Checking
|
||||
} else {
|
||||
final Optional<String> gitBranch = build.gitBranch();
|
||||
final Optional<String> gitCommit = build.gitCommit();
|
||||
@@ -80,12 +84,13 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
default -> text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur
|
||||
.append(Component.newline())
|
||||
.append(text("Download the new version at: ")
|
||||
- .append(text(DOWNLOAD_PAGE, NamedTextColor.GOLD)
|
||||
+ .append(text(io.papermc.paper.ServerBrandConstants.DOWNLOAD_PAGE, NamedTextColor.GOLD) // Plazma - Fork-friendly Rebranding
|
||||
.hoverEvent(text("Click to open", NamedTextColor.WHITE))
|
||||
- .clickEvent(ClickEvent.openUrl(DOWNLOAD_PAGE))));
|
||||
+ .clickEvent(ClickEvent.openUrl(io.papermc.paper.ServerBrandConstants.DOWNLOAD_PAGE)))); // Plazma - Fork-friendly Rebranding
|
||||
};
|
||||
}
|
||||
|
||||
+ /* // Plazma - TODO: CI Checking
|
||||
private static int fetchDistanceFromSiteApi(final ServerBuildInfo build, final int jenkinsBuild) {
|
||||
try {
|
||||
try (final BufferedReader reader = Resources.asCharSource(
|
||||
@@ -105,6 +110,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
return DISTANCE_ERROR;
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - TODO: CI Checking
|
||||
|
||||
// Contributed by Techcable <Techcable@outlook.com> in GH-65
|
||||
private static int fetchDistanceFromGitHub(final String repo, final String branch, final String hash) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index 90b3526479320064378f2cde6c2f2b8e48a59ba6..21658c61ad091647d5421d1dbf892d03ca175c74 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -20,7 +20,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@Override
|
||||
protected LineReader buildReader(LineReaderBuilder builder) {
|
||||
builder
|
||||
- .appName("Purpur") // Purpur
|
||||
+ .appName(io.papermc.paper.ServerBrandConstants.BRAND_NAME) // Purpur // Plazma - Fork-friendly Rebranding
|
||||
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBrandConstants.java b/src/main/java/io/papermc/paper/ServerBrandConstants.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3af005ce2bbd30601917987d8c831db23c733ab8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBrandConstants.java
|
||||
@@ -0,0 +1,29 @@
|
||||
+package io.papermc.paper;
|
||||
+
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public interface ServerBrandConstants {
|
||||
+
|
||||
+ // Basic brand informations
|
||||
+ String BRAND_NAME = "Plazma";
|
||||
+ String RESOURCE_PATH = "META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties";
|
||||
+
|
||||
+ @Nullable
|
||||
+ String ASCII_LOGO = """
|
||||
+
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╗\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m╗\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m \033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m╗\033[38;2;142;54;148m \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m╗\033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m╗ \033[38;2;78;81;161m \033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m╗\033[38;2;56;91;166m\s
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m█\033[38;2;196;31;137m█\033[38;2;193;33;138m╗ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m╗ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m╔\033[38;2;116;65;153m╝ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m█\033[38;2;101;72;157m╗\033[38;2;97;73;157m \033[38;2;94;75;158m█\033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m╗
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╔\033[38;2;193;33;138m╝ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m \033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m╔\033[38;2;120;64;153m╝\033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m╔\033[38;2;104;71;156m█\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m█\033[38;2;91;76;159m╔\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m═\033[38;2;196;31;137m╝\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m╔\033[38;2;123;62;152m╝\033[38;2;120;64;153m \033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m╚\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m╔\033[38;2;91;76;159m╝\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m║\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m█\033[38;2;180;38;140m█\033[38;2;177;39;141m█\033[38;2;174;41;142m█\033[38;2;170;42;142m█\033[38;2;167;43;143m╗ \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m║\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m \033[38;2;101;72;157m╚\033[38;2;97;73;157m═\033[38;2;94;75;158m╝\033[38;2;91;76;159m \033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m║\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m╚\033[38;2;212;24;134m═\033[38;2;209;26;134m╝\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m╚\033[38;2;186;35;139m═\033[38;2;183;37;140m═\033[38;2;180;38;140m═\033[38;2;177;39;141m═\033[38;2;174;41;142m═\033[38;2;170;42;142m═\033[38;2;167;43;143m╝ \033[38;2;164;45;144m╚\033[38;2;161;46;144m═\033[38;2;158;47;145m╝\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m╚\033[38;2;145;53;148m═\033[38;2;142;54;148m╝ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m═\033[38;2;126;61;151m═\033[38;2;123;62;152m═\033[38;2;120;64;153m═\033[38;2;116;65;153m╝ \033[38;2;113;67;154m╚\033[38;2;110;68;155m═\033[38;2;107;69;155m╝\033[38;2;104;71;156m \033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m \033[38;2;88;77;159m╚\033[38;2;85;79;160m═\033[38;2;81;80;161m╝ \033[38;2;78;81;161m╚\033[38;2;75;83;162m═\033[38;2;72;84;163m╝\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m╚\033[38;2;59;90;165m═\033[38;2;56;91;166m╝\033[0m
|
||||
+ """;
|
||||
+
|
||||
+ // Support URLs
|
||||
+ String DOWNLOAD_PAGE = "https://plazmamc.org/downloads";
|
||||
+ String CONFIG_REFERENCE = "https://docs.plazmamc.org/plazma/administration/reference/configurations";
|
||||
+ String START_GUIDE = "https://docs.plazmamc.org/plazma/administration/getting-started";
|
||||
+ String USAGE_GUIDE = "https://docs.plazmamc.org/plazma/administration/getting-started/next-step";
|
||||
+ String SUPPORT_PAGE = "https://github.com/PlazmaMC/Plazma/issues";
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
index 3099c21ee589acf6edff5903a23673adf489024f..a337e2c9576fb70a8ee9082e9b69719c804b286e 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
@@ -30,10 +30,6 @@ public record ServerBuildInfoImpl(
|
||||
private static final String ATTRIBUTE_GIT_BRANCH = "Git-Branch";
|
||||
private static final String ATTRIBUTE_GIT_COMMIT = "Git-Commit";
|
||||
|
||||
- private static final String BRAND_PAPER_NAME = "Paper";
|
||||
- private static final String BRAND_PUFFERFISH_NAME = "Pufferfish"; // Purpur
|
||||
- private static final String BRAND_PURPUR_NAME = "Purpur"; // Purpur
|
||||
-
|
||||
private static final String BUILD_DEV = "DEV";
|
||||
|
||||
public ServerBuildInfoImpl() {
|
||||
@@ -44,9 +40,9 @@ public record ServerBuildInfoImpl(
|
||||
this(
|
||||
getManifestAttribute(manifest, ATTRIBUTE_BRAND_ID)
|
||||
.map(Key::key)
|
||||
- .orElse(BRAND_PURPUR_ID), // Purpur
|
||||
+ .orElse(BRAND_ID), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
|
||||
- .orElse(BRAND_PURPUR_NAME), // Purpur
|
||||
+ .orElse(ServerBrandConstants.BRAND_NAME), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
SharedConstants.getCurrentVersion().getId(),
|
||||
SharedConstants.getCurrentVersion().getName(),
|
||||
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
|
||||
@@ -63,7 +59,7 @@ public record ServerBuildInfoImpl(
|
||||
|
||||
@Override
|
||||
public boolean isBrandCompatible(final @NotNull Key brandId) {
|
||||
- return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID) || brandId.equals(BRAND_PUFFERFISH_ID); // Purpur
|
||||
+ return brandId.equals(this.brandId) || SUPPORTED_BRANDS.contains(brandId); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/Configurations.java b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
index 8cf720f08514e8e4f62f4ad196f1277bd761c6b2..cda2ca940e30506807a5d12b84dbf69529051e26 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
@@ -112,7 +112,7 @@ public abstract class Configurations<G, W> {
|
||||
loader.save(node);
|
||||
} catch (ConfigurateException ex) {
|
||||
if (ex.getCause() instanceof AccessDeniedException) {
|
||||
- LOGGER.warn("Could not save {}: Paper could not persist the full set of configuration settings in the configuration file. Any setting missing from the configuration file will be set with its default value in memory. Admins should make sure to review the configuration documentation at https://docs.papermc.io/paper/configuration for more details.", filename, ex);
|
||||
+ LOGGER.warn("Could not save {}: {} could not persist the full set of configuration settings in the configuration file. Any setting missing from the configuration file will be set with its default value in memory. Admins should make sure to review the configuration documentation at {} for more details.", filename, io.papermc.paper.ServerBrandConstants.BRAND_NAME, io.papermc.paper.ServerBrandConstants.CONFIG_REFERENCE, ex); // Plazma - Fork-friendly Rebranding
|
||||
} else throw ex;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index 710477ae27ebc5afdf0012ef0867d05efd293c24..3a5e7546c5cc1fcec880cece3f0d0b04ec23cc18 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -32,13 +32,13 @@ public class CrashReport {
|
||||
private boolean trackingStackTrace = true;
|
||||
private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0];
|
||||
private final SystemReport systemReport = new SystemReport();
|
||||
- private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!", ""); // Purpur - Rebrand
|
||||
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO " + io.papermc.paper.ServerBrandConstants.BRAND_NAME.toUpperCase() + " INSTEAD!", ""); // Purpur - Rebrand // Plazma - Fork-friendly Rebranding
|
||||
|
||||
public CrashReport(String message, Throwable cause) {
|
||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper
|
||||
this.title = message;
|
||||
this.exception = cause;
|
||||
- this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
||||
+ this.systemReport.setDetail(io.papermc.paper.ServerBrandConstants.BRAND_NAME + " CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index ecaec3c7b5768771b00c4c33d48a76ba22653a79..8f77566bef4b992013e3b65068cabe7ee1921951 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -108,6 +108,11 @@ public class Main {
|
||||
*/ // CraftBukkit end
|
||||
|
||||
try {
|
||||
+ // Plazma start - Fork-friendly Rebranding
|
||||
+ //noinspection ConstantValue
|
||||
+ if (io.papermc.paper.ServerBrandConstants.ASCII_LOGO != null)
|
||||
+ System.out.println(io.papermc.paper.ServerBrandConstants.ASCII_LOGO);
|
||||
+ // Plazma end - Fork-friendly Rebranding
|
||||
|
||||
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 23505b0f80d643d9ef569b49192f44e0373dfb5f..20f79bcd7613e426b6b1020f586773819f1ac9d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1280,7 +1280,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
LOGGER.info("*************************************************************************************");
|
||||
LOGGER.info("This is the first time you're starting this server.");
|
||||
LOGGER.info("It's recommended you read our 'Getting Started' documentation for guidance.");
|
||||
- LOGGER.info("View this and more helpful information here: https://docs.papermc.io/paper/next-steps");
|
||||
+ LOGGER.info("View this and more helpful information here: {}", io.papermc.paper.ServerBrandConstants.START_GUIDE); // Plazma - Fork-friendly Rebranding
|
||||
LOGGER.info("*************************************************************************************");
|
||||
}
|
||||
// Paper end - Add onboarding message for initial server start
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 7a442fb4cf78bcb1268359ee41a6de138edb76b6..193c62ed303d25558d78f1e8dfb655919335fdf6 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -779,7 +779,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.bukkit.plugin.Plugin[] plugins = this.server.getPluginManager().getPlugins();
|
||||
|
||||
result.append(this.server.getName());
|
||||
- result.append(" on Bukkit ");
|
||||
+ result.append(" on ").append(io.papermc.paper.ServerBrandConstants.BRAND_NAME).append(" "); // Plazma - Fork-friendly Rebranding
|
||||
result.append(this.server.getBukkitVersion());
|
||||
|
||||
if (plugins.length > 0 && this.server.getQueryPlugins()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index 05e16103af3fd276f0196ddf1a2e5b729b025c34..8f7e922ceca286b1a590181c301fbe9bff55c024 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -56,10 +56,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
public final boolean onlineMode = this.get("online-mode", true);
|
||||
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
||||
public final String serverIp = this.get("server-ip", "");
|
||||
- public final String serverName = this.get("server-name", "Unknown Server"); // Purpur
|
||||
+ public final String serverName = this.get("server-name", "A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
public final boolean pvp = this.get("pvp", true);
|
||||
public final boolean allowFlight = this.get("allow-flight", false);
|
||||
- public final String motd = this.get("motd", "A Minecraft Server");
|
||||
+ public final String motd = this.get("motd", "A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server"); // Plazma - Fork-friendly Rebranding
|
||||
public final String bugReportLink = this.get("bug-report-link", "");
|
||||
public final boolean forceGameMode = this.get("force-gamemode", false);
|
||||
public final boolean enforceWhitelist = this.get("enforce-whitelist", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index 8f74c2ec5252b6265549589310d742337c91cb2c..ecb5a046514e3cd448cbf633c728831b1eb5d30b 100644
|
||||
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -56,7 +56,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
;
|
||||
}
|
||||
|
||||
- final JFrame jframe = new JFrame("Purpur Minecraft server"); // Purpur
|
||||
+ final JFrame jframe = new JFrame(io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Minecraft server"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
final MinecraftServerGui servergui = new MinecraftServerGui(server);
|
||||
|
||||
jframe.setDefaultCloseOperation(2);
|
||||
@@ -64,7 +64,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
jframe.pack();
|
||||
jframe.setLocationRelativeTo((Component) null);
|
||||
jframe.setVisible(true);
|
||||
- jframe.setName("Purpur Minecraft server"); // Paper - Improve ServerGUI // Purpur
|
||||
+ jframe.setName(io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Minecraft server"); // Paper - Improve ServerGUI // Purpur // Plazma - Fork-friendly Rebranding
|
||||
|
||||
// Paper start - Improve ServerGUI
|
||||
try {
|
||||
@@ -76,7 +76,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
jframe.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent windowevent) {
|
||||
if (!servergui.isClosing.getAndSet(true)) {
|
||||
- jframe.setTitle("Purpur Minecraft server - shutting down!"); // Purpur
|
||||
+ jframe.setTitle(io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Minecraft server - shutting down!"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
server.halt(true);
|
||||
servergui.runFinalizers();
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
|
||||
// Paper start - Add onboarding message for initial server start
|
||||
private JComponent buildOnboardingPanel() {
|
||||
- String onboardingLink = "https://docs.papermc.io/paper/next-steps";
|
||||
+ String onboardingLink = io.papermc.paper.ServerBrandConstants.USAGE_GUIDE; // Plazma - Fork-friendly Rebranding
|
||||
JPanel jPanel = new JPanel();
|
||||
|
||||
javax.swing.JLabel jLabel = new javax.swing.JLabel("If you need help setting up your server you can visit:");
|
||||
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
index 4a96d914f8aa6f0c5f13fc85369a311f25835ac2..5b4285d6b37346bcea3bf072c6f00bd50c62e703 100644
|
||||
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
@@ -89,7 +89,7 @@ public class DamageSource {
|
||||
|
||||
public DamageSource customEventDamager(Entity entity) {
|
||||
if (this.directEntity != null) {
|
||||
- throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to Paper)");
|
||||
+ throw new IllegalStateException("Cannot set custom event damager when direct entity is already set (report a bug to " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + ")"); // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
DamageSource damageSource = this.cloneInstance();
|
||||
damageSource.customEventDamager = entity;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index cf0f3a14584b9280211f88808cb1ddfb10105ec5..fffe0091008339d438961f0d9f6f62ad6d31859f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -289,7 +289,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PURPUR - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Purpur
|
||||
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 430407b0cf06ba337c59cd576c7e40a8e5fe8229..75a062e1105c2f7cc631a6b8b201b0e08621e3c5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -143,7 +143,7 @@ public class Main {
|
||||
|
||||
this.acceptsAll(Main.asList("noconsole"), "Disables the console");
|
||||
|
||||
- this.acceptsAll(Main.asList("v", "version"), "Show the CraftBukkit Version");
|
||||
+ this.acceptsAll(Main.asList("v", "version"), "Show the " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Version"); // Plazma - Fork-friendly Rebranding
|
||||
|
||||
this.acceptsAll(Main.asList("demo"), "Demo mode");
|
||||
|
||||
@@ -194,7 +194,7 @@ public class Main {
|
||||
acceptsAll(asList("server-name"), "Name of the server")
|
||||
.withRequiredArg()
|
||||
.ofType(String.class)
|
||||
- .defaultsTo("Unknown Server")
|
||||
+ .defaultsTo("A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server") // Plazma - Fork-friendly Rebranding
|
||||
.describedAs("Name");
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 5e7b833fc9f37bc370c76e5c43e6c9919d6d20af..ddbda1491e5873be1b54f0a555cc5c675f4597d4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -491,7 +491,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
this.parsePending();
|
||||
} else {
|
||||
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
||||
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Purpur"); // Paper // Purpur
|
||||
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to " + io.papermc.paper.ServerBrandConstants.BRAND_NAME); // Paper // Purpur // Plazma - Fork-friendly Rebranding
|
||||
// We don't need to parse pending
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..e0414f59b7c5ef149d8e52ebf76dc3e46d9de4d3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
public static String getBukkitVersion() {
|
||||
String result = "Unknown-Version";
|
||||
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.purpurmc.purpur/purpur-api/pom.properties"); // Pufferfish // Purpur
|
||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream(io.papermc.paper.ServerBrandConstants.RESOURCE_PATH); // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
Properties properties = new Properties();
|
||||
|
||||
if (stream != null) {
|
||||
@@ -20,7 +20,7 @@ public final class Versioning {
|
||||
|
||||
result = properties.getProperty("version");
|
||||
} catch (IOException ex) {
|
||||
- Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Bukkit version!", ex);
|
||||
+ Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " version!", ex); // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index f51cc3de3ca935ef90f7f0e9dd0506b856fc55f3..d889d964067058762fcffab9945fe586ce8d2a07 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -155,14 +155,14 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
||||
if (isLongTimeout) {
|
||||
// Paper end
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Purpur bug." ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " bug." ); // Paper // Purpur // Plazma - Fork-friendly Rebranding
|
||||
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
|
||||
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
|
||||
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
|
||||
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
|
||||
- log.log( Level.SEVERE, "If you are unsure or still think this is a Purpur bug, please report this to https://github.com/PurpurMC/Purpur/issues" ); // Purpur
|
||||
+ log.log( Level.SEVERE, "If you are unsure or still think this is a " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " bug, please report this to " + io.papermc.paper.ServerBrandConstants.SUPPORT_PAGE ); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
||||
- log.log( Level.SEVERE, "Purpur version: " + Bukkit.getServer().getVersion() ); // Purpur
|
||||
+ log.log( Level.SEVERE, io.papermc.paper.ServerBrandConstants.BRAND_NAME + " version: " + Bukkit.getServer().getVersion() ); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
//
|
||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||
{
|
||||
@@ -184,12 +184,12 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
||||
// Paper end
|
||||
} else
|
||||
{
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO " + io.papermc.paper.ServerBrandConstants.BRAND_NAME.toUpperCase() + " - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
|
||||
}
|
||||
// Paper end - Different message for short timeout
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + "!):" ); // Paper // Purpur // Plazma - Fork-friendly Rebranding
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(MinecraftServer.getServer(), isLongTimeout); // Paper - rewrite chunk system
|
||||
this.dumpTickingInfo(); // Paper - log detailed tick information
|
||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
@@ -205,7 +205,7 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
||||
WatchdogThread.dumpThread( thread, log );
|
||||
}
|
||||
} else {
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 24 Mar 2023 23:54:51 +0900
|
||||
Subject: [PATCH] Add more metrics
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..067bcbcb81802a3a52ecff737ddf2c033696ecfb 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,12 +636,63 @@ public class Metrics {
|
||||
return map;
|
||||
}));
|
||||
|
||||
+ // Plazma start
|
||||
+ metrics.addCustomChart(new Metrics.DrilldownPie("datapacks", () -> {
|
||||
+ Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ int datapacks = Bukkit.getServer().getDatapackManager().getEnabledPacks().size();
|
||||
+ Map<String, Integer> entry = new HashMap<>();
|
||||
+ entry.put(String.valueOf(datapacks), 1);
|
||||
+
|
||||
+ if (datapacks == 0)
|
||||
+ map.put("0", entry);
|
||||
+ else if (datapacks <= 5)
|
||||
+ map.put("1-5", entry);
|
||||
+ else if (datapacks <= 10)
|
||||
+ map.put("6-10", entry);
|
||||
+ else if (datapacks <= 25)
|
||||
+ map.put("11-25", entry);
|
||||
+ else
|
||||
+ map.put("26+", entry);
|
||||
+
|
||||
+ return map;
|
||||
+ }));
|
||||
+
|
||||
+ List<Plugin> plugins = new ArrayList<>();
|
||||
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
+ if (plugin.isEnabled()) {
|
||||
+ plugins.add(plugin);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ metrics.addCustomChart(new Metrics.DrilldownPie("plugins", () -> {
|
||||
+ Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ int plugins1 = plugins.size();
|
||||
+ Map<String, Integer> entry = new HashMap<>();
|
||||
+ entry.put(String.valueOf(plugins1), 1);
|
||||
+
|
||||
+ if (plugins1 == 0)
|
||||
+ map.put("0", entry);
|
||||
+ else if (plugins1 <= 5)
|
||||
+ map.put("1-5", entry);
|
||||
+ else if (plugins1 <= 10)
|
||||
+ map.put("6-10", entry);
|
||||
+ else if (plugins1 <= 25)
|
||||
+ map.put("11-25", entry);
|
||||
+ else if (plugins1 <= 50)
|
||||
+ map.put("26-50", entry);
|
||||
+ else
|
||||
+ map.put("51+", entry);
|
||||
+
|
||||
+ return map;
|
||||
+ }));
|
||||
+ // Plazma end
|
||||
+
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
|
||||
// count legacy plugins
|
||||
int legacy = 0;
|
||||
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
+ for (Plugin plugin : plugins) { // Plazma
|
||||
if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
|
||||
legacy++;
|
||||
}
|
||||
3597
patches/server/0006-Rebrand-Logo.patch
Normal file
3597
patches/server/0006-Rebrand-Logo.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,490 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Tue, 7 Mar 2023 12:28:34 +0900
|
||||
Subject: [PATCH] Optimize Default Configurations
|
||||
|
||||
Original: YouHaveTrouble/minecraft-optimization, AkiraDevelopment/SimplyMC
|
||||
Copyright (C) 2023 YouHaveTrouble, AkiraDevelopment
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 62b2a3a44929b80b813bc24a33cd1f5049fecbb2..cea33db916f9fd828f3cb131a4b2ebdd16866649 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -211,7 +211,7 @@ public class PufferfishConfig {
|
||||
public static int maxProjectileLoadsPerTick;
|
||||
public static int maxProjectileLoadsPerProjectile;
|
||||
private static void projectileLoading() {
|
||||
- maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
|
||||
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 8, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma
|
||||
maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
|
||||
setComment("projectile", "Optimizes projectile settings");
|
||||
@@ -225,7 +225,7 @@ public class PufferfishConfig {
|
||||
public static int activationDistanceMod;
|
||||
|
||||
private static void dynamicActivationOfBrains() throws IOException {
|
||||
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Purpur // Plazma
|
||||
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
"This value determines how far away an entity has to be",
|
||||
"from the player to start being effected by DEAR.");
|
||||
@@ -233,7 +233,7 @@ public class PufferfishConfig {
|
||||
maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
|
||||
"This value defines how often in ticks, the furthest entity",
|
||||
"will get their pathfinders and behaviors ticked. 20 = 1s");
|
||||
- activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
|
||||
+ activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 7, // Plazma
|
||||
"This value defines how much distance modifies an entity's",
|
||||
"tick frequency. freq = (distanceToPlayer^2) / (2^value)",
|
||||
"If you want further away entities to tick less often, use 7.",
|
||||
@@ -269,16 +269,16 @@ public class PufferfishConfig {
|
||||
|
||||
public static boolean throttleInactiveGoalSelectorTick;
|
||||
private static void inactiveGoalSelectorThrottle() {
|
||||
- getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
|
||||
+ getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", !Boolean.getBoolean("Plazma.disableConfigOptimization"), // Purpur // Plazma
|
||||
"Throttles the AI goal selector in entity inactive ticks.",
|
||||
"This can improve performance by a few percent, but has minor gameplay implications.");
|
||||
}
|
||||
|
||||
|
||||
- public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableMethodProfiler = true; // Plazma
|
||||
public static boolean disableOutOfOrderChat;
|
||||
private static void miscSettings() {
|
||||
- disableMethodProfiler = getBoolean("misc.disable-method-profiler", true);
|
||||
+ //disableMethodProfiler = getBoolean("misc.disable-method-profiler", true); // Plazma
|
||||
disableOutOfOrderChat = getBoolean("misc.disable-out-of-order-chat", false);
|
||||
setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 6bf14183a3fcd2b3d166752ce33240d2ff1ffa7c..4398c1b992f53248bb13180d4a69e55c0e742387 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -114,7 +114,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Watchdog extends ConfigurationPart {
|
||||
public int earlyWarningEvery = 5000;
|
||||
- public int earlyWarningDelay = 10000;
|
||||
+ public int earlyWarningDelay = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10000 : 180000; // Plazma - Optimize Default Configurations
|
||||
}
|
||||
|
||||
public SpamLimiter spamLimiter;
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7a65d5262 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -84,15 +84,15 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class AntiXray extends ConfigurationPart {
|
||||
public boolean enabled = false;
|
||||
- public EngineMode engineMode = EngineMode.HIDE;
|
||||
+ public EngineMode engineMode = Boolean.getBoolean("Plazma.disableConfigOptimization") ? EngineMode.HIDE : EngineMode.OBFUSCATE; // Plazma - Optimize Default Configurations
|
||||
public int maxBlockHeight = 64;
|
||||
public int updateRadius = 2;
|
||||
public boolean lavaObscures = false;
|
||||
public boolean usePermission = false;
|
||||
- public List<String> hiddenBlocks = List.of("copper_ore", "deepslate_copper_ore", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore",
|
||||
- "coal_ore", "deepslate_coal_ore", "lapis_ore", "deepslate_lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "deepslate_diamond_ore",
|
||||
- "redstone_ore", "deepslate_redstone_ore", "clay", "emerald_ore", "deepslate_emerald_ore", "ender_chest"); // TODO update type to List<Block>
|
||||
- public List<String> replacementBlocks = List.of("stone", "oak_planks", "deepslate"); // TODO update type to List<Block>
|
||||
+ // Plazma start - Optimize Default Configurations
|
||||
+ public List<String> hiddenBlocks = List.of("air", "copper_ore", "deepslate_copper_ore", "raw_copper_block", "diamond_ore", "deepslate_diamond_ore", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore", "raw_iron_block", "lapis_ore", "deepslate_lapis_ore", "redstone_ore", "deepslate_redstone_ore"); // TODO update type to List<Block>
|
||||
+ public List<String> replacementBlocks = List.of("chest", "amethyst_block", "andesite", "budding_amethyst", "calcite", "coal_ore", "deepslate_coal_ore", "deepslate", "diorite", "dirt", "emerald_ore", "deepslate_emerald_ore", "granite", "gravel", "oak_planks", "smooth_basalt", "stone", "tuff"); // TODO update type to List<Block>
|
||||
+ // Plazma end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@MergeMap
|
||||
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
||||
@MergeMap
|
||||
- public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance())));
|
||||
+ public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), Boolean.getBoolean("Plazma.disableConfigOptimization") ? category.getDespawnDistance() : (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8))); // Plazma - Optimize Default Configurations
|
||||
|
||||
@ConfigSerializable
|
||||
public record DespawnRange(@Required int soft, @Required int hard) {
|
||||
@@ -317,7 +317,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Environment extends ConfigurationPart {
|
||||
public boolean disableThunder = false;
|
||||
public boolean disableIceAndSnow = false;
|
||||
- public boolean optimizeExplosions = false;
|
||||
+ public boolean optimizeExplosions = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
public boolean disableExplosionKnockback = false;
|
||||
public boolean generateFlatBedrock = false;
|
||||
public FrostedIce frostedIce;
|
||||
@@ -397,9 +397,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Collisions extends ConfigurationPart {
|
||||
public boolean onlyPlayersCollide = false;
|
||||
public boolean allowVehicleCollisions = true;
|
||||
- public boolean fixClimbingBypassingCrammingRule = false;
|
||||
+ public boolean fixClimbingBypassingCrammingRule = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
@RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class)
|
||||
- public int maxEntityCollisions = 8;
|
||||
+ public int maxEntityCollisions = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 2; // Plazma - Optimize Default Configurations
|
||||
public boolean allowPlayerCrammingDamage = false;
|
||||
}
|
||||
|
||||
@@ -407,18 +407,40 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Chunks extends ConfigurationPart {
|
||||
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
||||
- public int maxAutoSaveChunksPerTick = 24;
|
||||
+ public int maxAutoSaveChunksPerTick = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 24 : 8; // Plazma - Optimize Default Configurations
|
||||
public int fixedChunkInhabitedTime = -1;
|
||||
- public boolean preventMovingIntoUnloadedChunks = false;
|
||||
+ public boolean preventMovingIntoUnloadedChunks = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
public Duration delayChunkUnloadsBy = Duration.of("10s");
|
||||
public Reference2IntMap<EntityType<?>> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(BuiltInRegistries.ENTITY_TYPE.size()), map -> {
|
||||
- map.defaultReturnValue(-1);
|
||||
- map.put(EntityType.EXPERIENCE_ORB, -1);
|
||||
- map.put(EntityType.SNOWBALL, -1);
|
||||
- map.put(EntityType.ENDER_PEARL, -1);
|
||||
- map.put(EntityType.ARROW, -1);
|
||||
- map.put(EntityType.FIREBALL, -1);
|
||||
- map.put(EntityType.SMALL_FIREBALL, -1);
|
||||
+ // Plazma start - Optimize Default Configurations
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
|
||||
+ map.put(EntityType.AREA_EFFECT_CLOUD, 8);
|
||||
+ map.put(EntityType.ARROW, 16);
|
||||
+ map.put(EntityType.DRAGON_FIREBALL, 3);
|
||||
+ map.put(EntityType.EGG, 8);
|
||||
+ map.put(EntityType.ENDER_PEARL, 8);
|
||||
+ map.put(EntityType.EXPERIENCE_BOTTLE, 3);
|
||||
+ map.put(EntityType.EXPERIENCE_ORB, 16);
|
||||
+ map.put(EntityType.EYE_OF_ENDER, 8);
|
||||
+ map.put(EntityType.FIREBALL, 8);
|
||||
+ map.put(EntityType.FIREWORK_ROCKET, 8);
|
||||
+ map.put(EntityType.LLAMA_SPIT, 3);
|
||||
+ map.put(EntityType.POTION, 8);
|
||||
+ map.put(EntityType.SHULKER_BULLET, 8);
|
||||
+ map.put(EntityType.SMALL_FIREBALL, 8);
|
||||
+ map.put(EntityType.SNOWBALL, 8);
|
||||
+ map.put(EntityType.SPECTRAL_ARROW, 16);
|
||||
+ map.put(EntityType.TRIDENT, 16);
|
||||
+ map.put(EntityType.WITHER_SKULL, 4);
|
||||
+ } else {
|
||||
+ map.put(EntityType.EXPERIENCE_ORB, -1);
|
||||
+ map.put(EntityType.SNOWBALL, -1);
|
||||
+ map.put(EntityType.ENDER_PEARL, -1);
|
||||
+ map.put(EntityType.ARROW, -1);
|
||||
+ map.put(EntityType.FIREBALL, -1);
|
||||
+ map.put(EntityType.SMALL_FIREBALL, -1);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
});
|
||||
}
|
||||
|
||||
@@ -432,11 +454,30 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public TickRates tickRates;
|
||||
|
||||
public class TickRates extends ConfigurationPart {
|
||||
- public int grassSpread = 1;
|
||||
+ public int grassSpread = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 4; // Plazma - Optimize Default Configurations
|
||||
public int containerUpdate = 1;
|
||||
- public int mobSpawner = 1;
|
||||
- public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
||||
- public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "validatenearbypoi", -1));
|
||||
+ public int mobSpawner = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 2; // Plazma - Optimize Default Configurations
|
||||
+ // Plazma start - Optimize Default Configurations
|
||||
+ public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> {
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
|
||||
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 80);
|
||||
+ table.put(EntityType.VILLAGER, "nearestbedsensor", 80);
|
||||
+ table.put(EntityType.VILLAGER, "villagerbabiessensor", 40);
|
||||
+ table.put(EntityType.VILLAGER, "playersensor", 40);
|
||||
+ table.put(EntityType.VILLAGER, "nearestlivingentitysensor", 40);
|
||||
+ } else {
|
||||
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 40);
|
||||
+ }
|
||||
+ });
|
||||
+ public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> {
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
|
||||
+ table.put(EntityType.VILLAGER, "acquirepoi", 120);
|
||||
+ table.put(EntityType.VILLAGER, "validatenearbypoi", 60);
|
||||
+ } else {
|
||||
+ table.put(EntityType.VILLAGER, "validatenearbypoi", -1);
|
||||
+ }
|
||||
+ });
|
||||
+ // Plazma end
|
||||
}
|
||||
|
||||
@Setting(FeatureSeedsGeneration.FEATURE_SEEDS_KEY)
|
||||
@@ -458,9 +499,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Misc extends ConfigurationPart {
|
||||
public int lightQueueSize = 20;
|
||||
- public boolean updatePathfindingOnBlockUpdate = true;
|
||||
+ public boolean updatePathfindingOnBlockUpdate = Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
public boolean showSignClickCommandFailureMsgsToPlayer = false;
|
||||
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
|
||||
+ public RedstoneImplementation redstoneImplementation = Boolean.getBoolean("Plazma.disableConfigOptimization") ? RedstoneImplementation.VANILLA : RedstoneImplementation.ALTERNATE_CURRENT; // Plazma - Optimize Default Configurations
|
||||
public boolean disableEndCredits = false;
|
||||
public float maxLeashDistance = 10f;
|
||||
public boolean disableSprintInterruptionOnAttack = false;
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
index 24763d3d270c29c95e0b3e85111145234f660a62..18bc271a34ffba8c83743fef7eaf4a2c1a2bfdec 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
@@ -29,6 +29,7 @@ public class ArrowDespawnRate extends FallbackValue.Int {
|
||||
|
||||
@Override
|
||||
protected int fallback() {
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) return 100; // Plazma - Optimize Default Configurations
|
||||
return this.get(FallbackValue.SPIGOT_WORLD_CONFIG).arrowDespawnRate;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index e0eaa847526431ac58d00f18f0fca6b1ef9a79cd..214690b1531d8b25e9bddb54f630e0d9b3504f96 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -154,7 +154,7 @@ public class Main {
|
||||
File configFile = (File) optionset.valueOf("bukkit-settings");
|
||||
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
|
||||
configuration.options().copyDefaults(true);
|
||||
- configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
|
||||
+ configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream(Boolean.getBoolean("Plazma.disableConfigOptimization") ? "configurations/bukkit.yml" : "configurations/bukkit_optimized.yml"), Charsets.UTF_8))); // Plazma - Optimize Default Configurations
|
||||
configuration.save(configFile);
|
||||
|
||||
File commandFile = (File) optionset.valueOf("commands-settings");
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d76d390d0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -120,7 +120,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.levelName = this.get("level-name", "world");
|
||||
this.serverPort = this.get("server-port", 25565);
|
||||
this.announcePlayerAchievements = this.getLegacyBoolean("announce-player-achievements");
|
||||
- this.enableQuery = this.get("enable-query", false);
|
||||
+ this.enableQuery = this.get("enable-query", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Plazma - Optimize Default Configurations
|
||||
this.queryPort = this.get("query.port", 25565);
|
||||
this.enableRcon = this.get("enable-rcon", false);
|
||||
this.rconPort = this.get("rcon.port", 25575);
|
||||
@@ -129,15 +129,15 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.allowNether = this.get("allow-nether", true);
|
||||
this.spawnMonsters = this.get("spawn-monsters", true);
|
||||
this.useNativeTransport = this.get("use-native-transport", true);
|
||||
- this.enableCommandBlock = this.get("enable-command-block", false);
|
||||
- this.spawnProtection = this.get("spawn-protection", 16);
|
||||
+ this.enableCommandBlock = this.get("enable-command-block", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Plazma - Optimize Default Configurations
|
||||
+ this.spawnProtection = this.get("spawn-protection", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 0); // Plazma - Optimize Default Configurations
|
||||
this.opPermissionLevel = this.get("op-permission-level", 4);
|
||||
this.functionPermissionLevel = this.get("function-permission-level", 2);
|
||||
this.maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
|
||||
this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
|
||||
this.rateLimitPacketsPerSecond = this.get("rate-limit", 0);
|
||||
- this.viewDistance = this.get("view-distance", 10);
|
||||
- this.simulationDistance = this.get("simulation-distance", 10);
|
||||
+ this.viewDistance = this.get("view-distance", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 7); // Plazma - Optimize Default Configurations
|
||||
+ this.simulationDistance = this.get("simulation-distance", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 4); // Plazma - Optimize Default Configurations
|
||||
this.maxPlayers = this.get("max-players", 20);
|
||||
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
|
||||
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
||||
@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, 1, 29999984);
|
||||
}, 29999984);
|
||||
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag
|
||||
+ this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag // Plazma - Optimize Default Configurations
|
||||
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
||||
this.enableStatus = this.get("enable-status", true);
|
||||
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7b7c9c8aa1bb949b6076161f5b175941e407b9b6..5f06d41d74d769281a05d98db806172c92b88388 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -346,7 +346,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.configuration.options().copyDefaults(true);
|
||||
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
|
||||
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(Boolean.getBoolean("Plazma.disableConfigOptimization") ? "configurations/bukkit.yml" : "configurations/bukkit_optimized.yml"), Charsets.UTF_8))); // Plazma - Optimize Default Configurations
|
||||
ConfigurationSection legacyAlias = null;
|
||||
if (!this.configuration.isString("aliases")) {
|
||||
legacyAlias = this.configuration.getConfigurationSection("aliases");
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index ac238eeea791180b66677870401c0b756f0db07b..ce960bc620d84e56c4e7fc9b721fd45c4cfc4dac 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -49,7 +49,10 @@ public class PurpurConfig {
|
||||
+ "join us in our Discord guild.\n"
|
||||
+ "\n"
|
||||
+ "Website: https://purpurmc.org \n"
|
||||
- + "Docs: https://purpurmc.org/docs \n";
|
||||
+ // Plazma start
|
||||
+ + "Docs: https://purpurmc.org/docs \n"
|
||||
+ + "Vanilla Food Properties: https://gist.github.com/BillyGalbreath/4fdfba991bd020e814eabf5143e3b225 \n";
|
||||
+ // Plazma end
|
||||
private static File CONFIG_FILE;
|
||||
public static YamlConfiguration config;
|
||||
|
||||
@@ -237,7 +240,7 @@ public class PurpurConfig {
|
||||
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
||||
}
|
||||
|
||||
- public static boolean useAlternateKeepAlive = false;
|
||||
+ public static boolean useAlternateKeepAlive = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
private static void useAlternateKeepAlive() {
|
||||
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index d3f2002759ac4788feca1e62c90c2e64596eb2f2..47f2c8f23e318b89324bfcb1342dadc325f53afc 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -425,7 +425,7 @@ public class PurpurWorldConfig {
|
||||
public boolean playerInvulnerableWhileAcceptingResourcePack = false;
|
||||
public String playerDeathExpDropEquation = "expLevel * 7";
|
||||
public int playerDeathExpDropMax = 100;
|
||||
- public boolean teleportIfOutsideBorder = false;
|
||||
+ public boolean teleportIfOutsideBorder = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
public boolean teleportOnNetherCeilingDamage = false;
|
||||
public boolean totemOfUndyingWorksInInventory = false;
|
||||
public boolean playerFixStuckPortal = false;
|
||||
@@ -3026,7 +3026,7 @@ public class PurpurWorldConfig {
|
||||
public boolean zombieJockeyOnlyBaby = true;
|
||||
public double zombieJockeyChance = 0.05D;
|
||||
public boolean zombieJockeyTryExistingChickens = true;
|
||||
- public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
|
||||
+ public boolean zombieAggressiveTowardsVillagerWhenLagging = Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
|
||||
public boolean zombieBypassMobGriefing = false;
|
||||
public boolean zombieTakeDamageFromWater = false;
|
||||
public boolean zombieAlwaysDropExp = false;
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 5503ad6a93d331771a0e92c0da6adedf2ac81aff..0125edd56ff021c2c719965ff6eb921ba8c4935c 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -146,14 +146,14 @@ public class SpigotWorldConfig
|
||||
public double itemMerge;
|
||||
private void itemMerge()
|
||||
{
|
||||
- this.itemMerge = this.getDouble("merge-radius.item", 2.5 );
|
||||
+ this.itemMerge = this.getDouble("merge-radius.item", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 2.5 : 3.5 ); // Plazma - Optimize Default Configurations
|
||||
this.log( "Item Merge Radius: " + this.itemMerge );
|
||||
}
|
||||
|
||||
public double expMerge;
|
||||
private void expMerge()
|
||||
{
|
||||
- this.expMerge = this.getDouble("merge-radius.exp", 3.0 );
|
||||
+ this.expMerge = this.getDouble("merge-radius.exp", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 3.0 : 4.0 ); // Plazma - Optimize Default Configurations
|
||||
this.log( "Experience Merge Radius: " + this.expMerge );
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class SpigotWorldConfig
|
||||
public byte mobSpawnRange;
|
||||
private void mobSpawnRange()
|
||||
{
|
||||
- this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 8 ); // Paper - Vanilla
|
||||
+ this.mobSpawnRange = (byte) getInt( "mob-spawn-range", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 3 ); // Paper - Vanilla // Plazma - Optimize Default Configurations
|
||||
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
|
||||
}
|
||||
|
||||
@@ -203,26 +203,26 @@ public class SpigotWorldConfig
|
||||
this.log( "Item Despawn Rate: " + this.itemDespawnRate );
|
||||
}
|
||||
|
||||
- public int animalActivationRange = 32;
|
||||
- public int monsterActivationRange = 32;
|
||||
+ public int animalActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 16; // Plazma - Optimize Default Configurations
|
||||
+ public int monsterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 24; // Plazma - Optimize Default Configurations
|
||||
public int raiderActivationRange = 48;
|
||||
- public int miscActivationRange = 16;
|
||||
+ public int miscActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 8; // Plazma - Optimize Default Configurations
|
||||
// Paper start
|
||||
- public int flyingMonsterActivationRange = 32;
|
||||
- public int waterActivationRange = 16;
|
||||
- public int villagerActivationRange = 32;
|
||||
+ public int flyingMonsterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 48; // Plazma - Optimize Default Configurations
|
||||
+ public int waterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 8; // Plazma - Optimize Default Configurations
|
||||
+ public int villagerActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 16; // Plazma - Optimize Default Configurations
|
||||
public int wakeUpInactiveAnimals = 4;
|
||||
public int wakeUpInactiveAnimalsEvery = 60*20;
|
||||
- public int wakeUpInactiveAnimalsFor = 5*20;
|
||||
- public int wakeUpInactiveMonsters = 8;
|
||||
+ public int wakeUpInactiveAnimalsFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 40; // Plazma - Optimize Default Configurations
|
||||
+ public int wakeUpInactiveMonsters = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 4; // Plazma - Optimize Default Configurations
|
||||
public int wakeUpInactiveMonstersEvery = 20*20;
|
||||
- public int wakeUpInactiveMonstersFor = 5*20;
|
||||
- public int wakeUpInactiveVillagers = 4;
|
||||
+ public int wakeUpInactiveMonstersFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 60; // Plazma - Optimize Default Configurations
|
||||
+ public int wakeUpInactiveVillagers = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 4 : 1; // Plazma - Optimize Default Configurations
|
||||
public int wakeUpInactiveVillagersEvery = 30*20;
|
||||
- public int wakeUpInactiveVillagersFor = 5*20;
|
||||
- public int wakeUpInactiveFlying = 8;
|
||||
+ public int wakeUpInactiveVillagersFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 20; // Plazma - Optimize Default Configurations
|
||||
+ public int wakeUpInactiveFlying = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 1; // Plazma - Optimize Default Configurations
|
||||
public int wakeUpInactiveFlyingEvery = 10*20;
|
||||
- public int wakeUpInactiveFlyingFor = 5*20;
|
||||
+ public int wakeUpInactiveFlyingFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 60; // Plazma - Optimize Default Configurations
|
||||
public int villagersWorkImmunityAfter = 5*20;
|
||||
public int villagersWorkImmunityFor = 20;
|
||||
public boolean villagersActiveForPanic = true;
|
||||
@@ -293,7 +293,7 @@ public class SpigotWorldConfig
|
||||
{
|
||||
this.set( "ticks-per.hopper-check", 1 );
|
||||
}
|
||||
- this.hopperCheck = this.getInt( "ticks-per.hopper-check", 1 );
|
||||
+ this.hopperCheck = this.getInt( "ticks-per.hopper-check", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 8 ); // Plazma - Optimize Default Configurations
|
||||
this.hopperAmount = this.getInt( "hopper-amount", 1 );
|
||||
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
|
||||
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
|
||||
@@ -303,7 +303,7 @@ public class SpigotWorldConfig
|
||||
public int tridentDespawnRate;
|
||||
private void arrowDespawnRate()
|
||||
{
|
||||
- this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
|
||||
+ this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1200 : 300 ); // Plazma - Optimize Default Configurations
|
||||
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
|
||||
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
|
||||
}
|
||||
diff --git a/src/main/resources/configurations/bukkit_optimized.yml b/src/main/resources/configurations/bukkit_optimized.yml
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..eb33b0a19d6060f78d7ead7a2ad63b1b2581293d
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/configurations/bukkit_optimized.yml
|
||||
@@ -0,0 +1,45 @@
|
||||
+# This is the main configuration file for Bukkit.
|
||||
+# As you can see, there's actually not that much to configure without any plugins.
|
||||
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
|
||||
+# https://www.spigotmc.org/go/bukkit-yml
|
||||
+#
|
||||
+# If you need help on this file, feel free to join us on Discord or leave a message
|
||||
+# on the forums asking for advice.
|
||||
+#
|
||||
+# Discord: https://www.spigotmc.org/go/discord
|
||||
+# Forums: https://www.spigotmc.org/
|
||||
+# Bug tracker: https://www.spigotmc.org/go/bugs
|
||||
+
|
||||
+
|
||||
+settings:
|
||||
+ allow-end: true
|
||||
+ warn-on-overload: true
|
||||
+ permissions-file: permissions.yml
|
||||
+ update-folder: update
|
||||
+ plugin-profiling: false
|
||||
+ connection-throttle: 4000
|
||||
+ query-plugins: true
|
||||
+ deprecated-verbose: default
|
||||
+ shutdown-message: Server closed
|
||||
+ minimum-api: none
|
||||
+ use-map-color-cache: true
|
||||
+spawn-limits:
|
||||
+ monsters: 20
|
||||
+ animals: 5
|
||||
+ water-animals: 2
|
||||
+ water-ambient: 2
|
||||
+ water-underground-creature: 3
|
||||
+ axolotls: 3
|
||||
+ ambient: 1
|
||||
+chunk-gc:
|
||||
+ period-in-ticks: 400
|
||||
+ticks-per:
|
||||
+ animal-spawns: 400
|
||||
+ monster-spawns: 10
|
||||
+ water-spawns: 400
|
||||
+ water-ambient-spawns: 400
|
||||
+ water-underground-creature-spawns: 400
|
||||
+ axolotl-spawns: 400
|
||||
+ ambient-spawns: 400
|
||||
+ autosave: 6000
|
||||
+aliases: now-in-commands.yml
|
||||
1390
patches/server/0007-Plazma-Configurations.patch
Normal file
1390
patches/server/0007-Plazma-Configurations.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Thu, 23 Mar 2023 14:25:09 +0900
|
||||
Subject: [PATCH] ChunkSending Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 857ddc62dd9affbbebcd7cde8a6d675dbb5f68ae..8ba1c5b6731d43c02b415e4d79a20c1de0c03ad5 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -22,4 +22,12 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
public int version = CURRENT_VERSION;
|
||||
+
|
||||
+ public ChunkSending chunkSending;
|
||||
+ public class ChunkSending extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean enabled = true;
|
||||
+ public int maxChunksPerTick = 5;
|
||||
+
|
||||
+ }
|
||||
}
|
||||
140
patches/server/0008-Setup-basic-configuration-sections.patch
Normal file
140
patches/server/0008-Setup-basic-configuration-sections.patch
Normal file
@@ -0,0 +1,140 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 10:47:05 +0900
|
||||
Subject: [PATCH] Setup basic configuration sections
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index b638690d5cd2360444e6c525f97f634d8e1dc60e..35d5bd2f7dba1aa74547b6ae994bc84a56911bf2 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.objects.Reference2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
|
||||
import net.minecraft.Util;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+import org.spongepowered.configurate.objectmapping.meta.PostProcess;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,4 +28,55 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
int version = VERSION;
|
||||
|
||||
+ public Command command;
|
||||
+ public class Command extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Player player;
|
||||
+ public class Player extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Setting("world-generation")
|
||||
+ public WorldGeneration worldgen;
|
||||
+ public class WorldGeneration extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Entity entity;
|
||||
+ public class Entity extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ @PostProcess
|
||||
+ public void post() {
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public World world;
|
||||
+ public class World extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ @PostProcess
|
||||
+ public void post() {
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Structure structure;
|
||||
+ public class Structure extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Miscellaneous misc;
|
||||
+ public class Miscellaneous extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java
|
||||
index 25c0f5d28107b45677aa7b19bc0d5238512d9826..ac0f038de0ce5cf6df0b730af69d3229c3119eff 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java
|
||||
@@ -2,9 +2,12 @@ package org.plazmamc.plazma.configurations;
|
||||
|
||||
import org.spongepowered.configurate.NodePath;
|
||||
|
||||
+import static org.spongepowered.configurate.NodePath.path;
|
||||
+
|
||||
interface RemovedConfigurations {
|
||||
|
||||
NodePath[] WORLD_PATHS = {
|
||||
+ path("structure", "nether-portal")
|
||||
};
|
||||
|
||||
NodePath[] GLOBAL_PATHS = {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..c222d58520b655b54b8975ec226a4ba948691cd4 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -19,4 +19,44 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
int version = VERSION;
|
||||
|
||||
+ public Miscellaneous misc;
|
||||
+ public class Miscellaneous extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Entity entity;
|
||||
+ public class Entity extends ConfigurationPart {
|
||||
+
|
||||
+ public Phantom phantom;
|
||||
+ public class Phantom extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Structure structure;
|
||||
+ public class Structure extends ConfigurationPart {
|
||||
+
|
||||
+ public NetherPortal netherPortal;
|
||||
+ public class NetherPortal extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Block block;
|
||||
+ public class Block extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Item item;
|
||||
+ public class Item extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Thu, 23 Mar 2023 14:32:26 +0900
|
||||
Subject: [PATCH] Implement ChunkSending
|
||||
|
||||
Original: someaddons/chunksending
|
||||
Copyright (C) 2023 someaddons
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 904fcdeb7937d36208cc9a8d5eca9ef3a5b2cd9e..7f749579fe056a8436e6625204ae31f1fcc15f32 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -362,15 +362,14 @@ public class ChunkHolder {
|
||||
}
|
||||
|
||||
Object[] backingSet = players.getBackingSet();
|
||||
- for (int i = 0, len = backingSet.length; i < len; ++i) {
|
||||
- if (!(backingSet[i] instanceof ServerPlayer player)) {
|
||||
- continue;
|
||||
- }
|
||||
- if (!this.chunkMap.playerChunkManager.isChunkSent(player, this.pos.x, this.pos.z, onlyOnWatchDistanceEdge)) {
|
||||
- continue;
|
||||
- }
|
||||
+ // Plazma start - Implement ChunkSending
|
||||
+ for (Object o : backingSet) {
|
||||
+ if (!(o instanceof ServerPlayer player)
|
||||
+ || !this.chunkMap.playerChunkManager.isChunkSent(player, this.pos.x, this.pos.z, onlyOnWatchDistanceEdge)
|
||||
+ || (this.chunkMap.level.plazmaLevelConfiguration().chunkSending.enabled && player.attachToPending(pos, packet))) continue;
|
||||
player.connection.send(packet);
|
||||
}
|
||||
+ // Plazma end
|
||||
// Paper end - per player view distance
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8a4be66f967dfd6b57ab542ae9b06c840647486d..29c46144de1aad31b997ee5000114e6f33f1a1f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -728,8 +728,36 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
// Purpur end
|
||||
+ // Plazma start - Implement ChunkSending
|
||||
+ if (this.level.plazmaLevelConfiguration().chunkSending.enabled) {
|
||||
+ if (chunksToSend.isEmpty()) return;
|
||||
+
|
||||
+ if (disconnected) {
|
||||
+ chunksToSend.clear();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final List<java.util.Map.Entry<ChunkPos, List<Packet<?>>>> packets = new java.util.ArrayList<>(chunksToSend.entrySet());
|
||||
+ packets.sort(java.util.Comparator.comparingDouble(e -> e.getKey().getMiddleBlockPosition(getBlockY()).distSqr(blockPosition())));
|
||||
+
|
||||
+ for (int i = 0; i < packets.size() && i < this.level.plazmaLevelConfiguration().chunkSending.maxChunksPerTick; i++) {
|
||||
+ final java.util.Map.Entry<ChunkPos, List<Packet<?>>> entry = packets.get(i);
|
||||
+ for (final Packet<?> packet : entry.getValue()) {
|
||||
+ connection.send(packet);
|
||||
+ }
|
||||
+ chunksToSend.remove(entry.getKey());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
+ public boolean attachToPending(final ChunkPos pos, final Packet<?> packet) {
|
||||
+ final List<Packet<?>> packetList = chunksToSend.get(pos);
|
||||
+ if (packetList == null) return false;
|
||||
+ packetList.add(packet);
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
public void doTick() {
|
||||
try {
|
||||
if (valid && !this.isSpectator() || !this.touchingUnloadedChunk()) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
|
||||
@@ -2356,7 +2384,14 @@ public class ServerPlayer extends Player {
|
||||
return true; // Paper
|
||||
}
|
||||
|
||||
+ // Plazma start - Implement ChunkSending
|
||||
+ private final java.util.Map<ChunkPos, List<Packet<?>>> chunksToSend = java.util.Collections.synchronizedMap(new java.util.HashMap<>());
|
||||
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
|
||||
+ if (this.level.plazmaLevelConfiguration().chunkSending.enabled) {
|
||||
+ List<Packet<?>> packetList = chunksToSend.computeIfAbsent(chunkPos, k -> new java.util.ArrayList<>());
|
||||
+ packetList.add(chunkDataPacket);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
this.connection.send(chunkDataPacket);
|
||||
// Paper start
|
||||
if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){
|
||||
40
patches/server/0009-Warn-on-startup.patch
Normal file
40
patches/server/0009-Warn-on-startup.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 3 May 2024 19:50:32 +0900
|
||||
Subject: [PATCH] Warn on startup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 8f77566bef4b992013e3b65068cabe7ee1921951..65fd553887ed9eb9c26e036c8009179a7baf5380 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -113,6 +113,18 @@ public class Main {
|
||||
if (io.papermc.paper.ServerBrandConstants.ASCII_LOGO != null)
|
||||
System.out.println(io.papermc.paper.ServerBrandConstants.ASCII_LOGO);
|
||||
// Plazma end - Fork-friendly Rebranding
|
||||
+ // Plazma start - Warn on startup
|
||||
+ if (!org.plazmamc.plazma.Options.NO_WARN) {
|
||||
+ LOGGER.warn("Warning! " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
||||
+ if (io.papermc.paper.ServerBuildInfo.buildInfo().asString(io.papermc.paper.ServerBuildInfo.StringRepresentation.VERSION_FULL).contains("DEV")) {
|
||||
+ LOGGER.error("*********************** CAUTION ***********************");
|
||||
+ LOGGER.error("This version is a development version of {}.", io.papermc.paper.ServerBrandConstants.BRAND_NAME);
|
||||
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
|
||||
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
|
||||
+ LOGGER.error("*******************************************************");
|
||||
+ }
|
||||
+ }
|
||||
+ // Plazma end
|
||||
|
||||
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
index ca11bd22a65c8b9f4fffb1832ada8c519ab75b98..5d41bd4d4b86ca0c7c03d3ac6e75b3f1f1abe73b 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -6,5 +6,6 @@ import static java.lang.System.getProperty;
|
||||
public interface Options {
|
||||
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
+ boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 10:13:14 +0900
|
||||
Subject: [PATCH] Always agree EULA on development mode
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 41005f58fdd526907972185e728bbe1fa97171e9..746ad8087192931400256c8a1ef71e966eaf6b1a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -164,7 +164,7 @@ fun TaskContainer.registerRunTask(
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
vendor.set(JvmVendorSpec.JETBRAINS)
|
||||
})
|
||||
- jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
|
||||
+ jvmArgs("-DPlazma.DevelopmentEnvironment", "-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods") // Plazma - Always agree EULA on development mode
|
||||
|
||||
if (rootProject.childProjects["test-plugin"] != null) {
|
||||
val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 65fd553887ed9eb9c26e036c8009179a7baf5380..694b126df2c3d1d6fa40ee9731c28886caf1a4fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -179,6 +179,7 @@ public class Main {
|
||||
|
||||
// Spigot Start
|
||||
boolean eulaAgreed = Boolean.getBoolean( "com.mojang.eula.agree" );
|
||||
+ eulaAgreed = eulaAgreed || Boolean.getBoolean("Paper.pushPaperAssetsRoot"); // Plazma - Always agree EULA on development mode
|
||||
if ( eulaAgreed )
|
||||
{
|
||||
System.err.println( "You have used the Spigot command line EULA agreement flag." );
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@gmail.com>
|
||||
Date: Fri, 10 Mar 2023 20:35:27 +0900
|
||||
Subject: [PATCH] Console Log Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 6714947455c1e4c887a5f13ba1a3aeb57324ee0a..3c70653b720d3d55be199e000e89c627b90e65da 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -20,4 +20,10 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
public int version = CURRENT_VERSION;
|
||||
+
|
||||
+ public ConsoleLogs consoleLogs;
|
||||
+ public class ConsoleLogs extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
}
|
||||
98
patches/server/0011-Add-more-metrics.patch
Normal file
98
patches/server/0011-Add-more-metrics.patch
Normal file
@@ -0,0 +1,98 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 10:26:26 +0900
|
||||
Subject: [PATCH] Add more metrics
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 8d5a52c5762c3d9b44dcdf00ae312e0bdc01fa1f..48d33d4131af90eee35c9553898a2ac7ec5e2b7e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,38 +636,59 @@ public class Metrics {
|
||||
return map;
|
||||
}));
|
||||
|
||||
- metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
- Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ // Plazma start - Add more metrics information
|
||||
+ metrics.addCustomChart(new DrilldownPie("datapacks", () -> {
|
||||
+ int datapacks = Bukkit.getDatapackManager().getEnabledPacks().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(datapacks), 1);
|
||||
+
|
||||
+ if (datapacks == 0) return Collections.singletonMap("0", entry);
|
||||
+ else if (datapacks <= 5) return Collections.singletonMap("1-5", entry);
|
||||
+ else if (datapacks <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (datapacks <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (datapacks <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (datapacks <= 100) return Collections.singletonMap("51+", entry);
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDE2E", entry);
|
||||
+ }));
|
||||
|
||||
- // count legacy plugins
|
||||
- int legacy = 0;
|
||||
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
- if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
|
||||
- legacy++;
|
||||
- }
|
||||
- }
|
||||
+ metrics.addCustomChart(new DrilldownPie("plugins", () -> {
|
||||
+ int pluginCount = Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(Plugin::isEnabled).toList().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(pluginCount), 1);
|
||||
+
|
||||
+ if (pluginCount == 0) return Collections.singletonMap("0", entry);
|
||||
+ else if (pluginCount <= 5) return Collections.singletonMap("1-5", entry);
|
||||
+ else if (pluginCount <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (pluginCount <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (pluginCount <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (pluginCount <= 100) return Collections.singletonMap("51-100", entry);
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDE2E", entry);
|
||||
+ }));
|
||||
|
||||
- // insert real value as lower dimension
|
||||
- Map<String, Integer> entry = new HashMap<>();
|
||||
- entry.put(String.valueOf(legacy), 1);
|
||||
-
|
||||
- // create buckets as higher dimension
|
||||
- if (legacy == 0) {
|
||||
- map.put("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
- } else if (legacy <= 5) {
|
||||
- map.put("1-5", entry);
|
||||
- } else if (legacy <= 10) {
|
||||
- map.put("6-10", entry);
|
||||
- } else if (legacy <= 25) {
|
||||
- map.put("11-25", entry);
|
||||
- } else if (legacy <= 50) {
|
||||
- map.put("26-50", entry);
|
||||
- } else {
|
||||
- map.put("50+ \uD83D\uDE2D", entry); // :cry:
|
||||
- }
|
||||
+ metrics.addCustomChart(new DrilldownPie("disabled_plugins", () -> {
|
||||
+ int disabled = Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(it -> !it.isEnabled()).toList().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(disabled), 1);
|
||||
+
|
||||
+ if (disabled == 0) return Collections.singletonMap("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
+ else if (disabled <= 5) return Collections.singletonMap("1-5", entry);
|
||||
+ else if (disabled <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (disabled <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (disabled <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (disabled <= 100) return Collections.singletonMap("51-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
+ }));
|
||||
|
||||
- return map;
|
||||
+ metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
+ int legacy = (int) Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(p -> CraftMagicNumbers.isLegacy(p.getDescription())).count(); // Plazma
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(legacy), 1);
|
||||
+
|
||||
+ if (legacy == 0) return Collections.singletonMap("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
+ else if (legacy <= 5) return Collections.singletonMap("1-5", entry);
|
||||
+ else if (legacy <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (legacy <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (legacy <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (legacy <= 100) return Collections.singletonMap("51-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
}));
|
||||
+ // Plazma end - Add more metrics information
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@gmail.com>
|
||||
Date: Fri, 10 Mar 2023 21:45:37 +0900
|
||||
Subject: [PATCH] Console log tweaks
|
||||
|
||||
[Offine Warning Configuration Patch]
|
||||
Original by Irochi <me@irochi.moe>
|
||||
Licensed under the GPL 3.0
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
index 4d9bc4a62ebae0f3707900503576c64733de639f..20265e7c71c125bc5b77039f4901e230738e849f 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
@@ -353,7 +353,7 @@ public final class ChatProcessor {
|
||||
|
||||
private void sendToServer(final ChatType.Bound chatType, final @Nullable Function<Audience, net.minecraft.network.chat.Component> msgFunction) {
|
||||
final PlayerChatMessage toConsoleMessage = msgFunction == null ? ChatProcessor.this.message : ChatProcessor.this.message.withUnsignedContent(msgFunction.apply(ChatProcessor.this.server.console));
|
||||
- ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) ? null : "Not Secure");
|
||||
+ ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) || !org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableSecureChatMarker ? null : "Not Secure");
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 429ccd583ecd136a63862e94b8eb36b371e28d0f..efcee39cd7154493de04ca903edbd32b5901b191 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -179,16 +179,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
||||
- // Paper start - detect running as root
|
||||
- if (io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
|
||||
- DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
|
||||
- DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- }
|
||||
- // Paper end
|
||||
-
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -320,7 +310,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end
|
||||
- if (!this.usesAuthentication()) {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableOfflineWarnings && !this.usesAuthentication()) { // Plazma
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
// Spigot start
|
||||
@@ -333,9 +323,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
}
|
||||
// Spigot end
|
||||
- DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
+ DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the \"server.properties\" file or set \"console-logs.offline-warning\" to \"false\" in the \"plazma.yml\" file."); // Plazma
|
||||
}
|
||||
|
||||
+ // Plazma start - Moved down
|
||||
+ // Paper start - detect running as root
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableRootUserWarnings && io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
|
||||
+ DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
|
||||
+ DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Plazma end
|
||||
|
||||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1a288ebcaade0cc44c7d09478f4f2f8eee7a4269..916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1426,7 +1426,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
||||
// Paper end
|
||||
- boolean flag = this.verifyChatTrusted(message);
|
||||
+ boolean flag = this.verifyChatTrusted(message) || !org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableSecureChatMarker;
|
||||
|
||||
this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
|
||||
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 3c70653b720d3d55be199e000e89c627b90e65da..ba542542cbab63b0764d437049123a76ccaca716 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -24,6 +24,9 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public ConsoleLogs consoleLogs;
|
||||
public class ConsoleLogs extends ConfigurationPart {
|
||||
|
||||
+ public boolean enableOfflineWarnings = true;
|
||||
+ public boolean enableRootUserWarnings = true;
|
||||
+ public boolean enableSecureChatMarker = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
}
|
||||
591
patches/server/0012-Optimize-default-configurations.patch
Normal file
591
patches/server/0012-Optimize-default-configurations.patch
Normal file
@@ -0,0 +1,591 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 16:42:17 +0900
|
||||
Subject: [PATCH] Optimize default configurations
|
||||
|
||||
[REFERENCE]
|
||||
- YouHaveTrouble/minecraft-optimization
|
||||
- AkiraDevelopment/SimplyMC
|
||||
- YouHaveTrouble/minecraft-exploits-and-how-to-fix-them
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 411c81a88b8a008b2aaf0ca62fb7ffa1dd9e32a4..53dc2e3c22c5cb038b9a283112f265d362f187e3 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -61,7 +61,7 @@ public class PufferfishConfig {
|
||||
getString("info.version", "1.0");
|
||||
setComment("info",
|
||||
"Pufferfish Configuration",
|
||||
- "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host",
|
||||
+ // "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Sponsorblock
|
||||
"Join our Discord for support: https://discord.gg/reZw4vQV9H",
|
||||
"Download new builds at https://ci.pufferfish.host/job/Pufferfish");
|
||||
|
||||
@@ -216,7 +216,7 @@ public class PufferfishConfig {
|
||||
public static int maxProjectileLoadsPerTick;
|
||||
public static int maxProjectileLoadsPerProjectile;
|
||||
private static void projectileLoading() {
|
||||
- maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
|
||||
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", plazma.Config.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma - Optimize default configurations
|
||||
maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
|
||||
setComment("projectile", "Optimizes projectile settings");
|
||||
@@ -230,12 +230,12 @@ public class PufferfishConfig {
|
||||
public static int activationDistanceMod;
|
||||
|
||||
private static void dynamicActivationOfBrains() throws IOException {
|
||||
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", plazma.Config.optimize()); // Purpur // Plazma - Optimize default configurations
|
||||
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
"This value determines how far away an entity has to be",
|
||||
"from the player to start being effected by DEAR.");
|
||||
startDistanceSquared = startDistance * startDistance;
|
||||
- maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
|
||||
+ maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", plazma.Config.optimize() ? 7 : 8, // Plazma - Optimize default configurations
|
||||
"This value defines how often in ticks, the furthest entity",
|
||||
"will get their pathfinders and behaviors ticked. 20 = 1s");
|
||||
activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 17e23ca4dd2bbfba49ea00aa2b719a95feb931be..a8e75eaadfcc6c8b2503776d7de197f756712819 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -147,7 +147,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Watchdog extends ConfigurationPart {
|
||||
public int earlyWarningEvery = 5000;
|
||||
- public int earlyWarningDelay = 10000;
|
||||
+ public int earlyWarningDelay = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 180000 : 10000; // Plazma - Optimize default configurations
|
||||
}
|
||||
|
||||
public SpamLimiter spamLimiter;
|
||||
@@ -187,7 +187,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Commands commands;
|
||||
|
||||
public class Commands extends ConfigurationPart {
|
||||
- public boolean suggestPlayerNamesWhenNullTabCompletions = true;
|
||||
+ public boolean suggestPlayerNamesWhenNullTabCompletions = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean fixTargetSelectorTagCompletion = true;
|
||||
public boolean timeCommandAffectsAllWorlds = false;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public BookSize bookSize;
|
||||
|
||||
public class BookSize extends ConfigurationPart {
|
||||
- public IntOr.Disabled pageMax = new IntOr.Disabled(OptionalInt.of(2560)); // TODO this appears to be a duplicate setting with one above
|
||||
+ public IntOr.Disabled pageMax = new IntOr.Disabled(OptionalInt.of(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1024 : 2560)); // TODO this appears to be a duplicate setting with one above // Plazma - Optimize default configurations
|
||||
public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
|
||||
}
|
||||
public boolean resolveSelectorsInBooks = false;
|
||||
@@ -264,7 +264,15 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public class PacketLimiter extends ConfigurationPart {
|
||||
public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED);
|
||||
public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK);
|
||||
- public Map<Class<? extends Packet<?>>, PacketLimit> overrides = Map.of(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
|
||||
+ // Plazma start - Optimize default configurations
|
||||
+ public Map<Class<? extends Packet<?>>, PacketLimit> overrides = new java.util.HashMap<>() {{
|
||||
+ put(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
|
||||
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) {
|
||||
+ put(net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket.class, new PacketLimit(1.0, 15.0, PacketLimit.ViolateAction.DROP));
|
||||
+ put(net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
|
||||
+ }
|
||||
+ }};
|
||||
+ // Plazma end
|
||||
|
||||
@ConfigSerializable
|
||||
public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) {
|
||||
@@ -332,7 +340,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
executor.setMaximumPoolSize(_chatExecutorMaxSize);
|
||||
}
|
||||
}
|
||||
- public int maxJoinsPerTick = 5;
|
||||
+ public int maxJoinsPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3 : 5; // Plazma - Optimize default configurations
|
||||
public boolean fixEntityPositionDesync = true;
|
||||
public boolean loadPermissionsYmlBeforePlugins = true;
|
||||
@Constraints.Min(4)
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
index 82210667376fd466d5d4cdcb56b62f6165bd5cde..3c6e9ec236bfd851700ce7fae2599b725ec899eb 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -103,12 +103,32 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class AntiXray extends ConfigurationPart {
|
||||
public boolean enabled = false;
|
||||
- public EngineMode engineMode = EngineMode.HIDE;
|
||||
+ public EngineMode engineMode = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? EngineMode.OBFUSCATE_LAYER : EngineMode.HIDE; // Plazma - Optimize default configurations
|
||||
public int maxBlockHeight = 64;
|
||||
public int updateRadius = 2;
|
||||
- public boolean lavaObscures = false;
|
||||
+ public boolean lavaObscures = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean usePermission = false;
|
||||
- public List<Block> hiddenBlocks = List.of(
|
||||
+ // Plazma start - Optimize default configurations
|
||||
+ public List<Block> hiddenBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of(
|
||||
+ //<editor-fold desc="Anti-Xray Hidden Blocks" defaultstate="collapsed">
|
||||
+ Blocks.AIR,
|
||||
+ Blocks.COPPER_ORE,
|
||||
+ Blocks.DEEPSLATE_COPPER_ORE,
|
||||
+ Blocks.RAW_COPPER_BLOCK,
|
||||
+ Blocks.IRON_ORE,
|
||||
+ Blocks.DEEPSLATE_IRON_ORE,
|
||||
+ Blocks.RAW_IRON_BLOCK,
|
||||
+ Blocks.GOLD_ORE,
|
||||
+ Blocks.DEEPSLATE_GOLD_ORE,
|
||||
+ Blocks.RAW_GOLD_BLOCK,
|
||||
+ Blocks.REDSTONE_ORE,
|
||||
+ Blocks.DEEPSLATE_REDSTONE_ORE,
|
||||
+ Blocks.LAPIS_ORE,
|
||||
+ Blocks.DEEPSLATE_LAPIS_ORE,
|
||||
+ Blocks.DIAMOND_ORE,
|
||||
+ Blocks.DEEPSLATE_DIAMOND_ORE
|
||||
+ //</editor-fold>
|
||||
+ ) : List.of(
|
||||
//<editor-fold desc="Anti-Xray Hidden Blocks" defaultstate="collapsed">
|
||||
Blocks.COPPER_ORE,
|
||||
Blocks.DEEPSLATE_COPPER_ORE,
|
||||
@@ -135,7 +155,28 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
Blocks.ENDER_CHEST
|
||||
//</editor-fold>
|
||||
);
|
||||
- public List<Block> replacementBlocks = List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE);
|
||||
+ public List<Block> replacementBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of(
|
||||
+ //<editor-fold desc="Anti-Xray Replacement Blocks" defaultstate="collapsed">
|
||||
+ Blocks.CHEST,
|
||||
+ Blocks.AMETHYST_BLOCK,
|
||||
+ Blocks.ANDESITE,
|
||||
+ Blocks.BUDDING_AMETHYST,
|
||||
+ Blocks.CALCITE,
|
||||
+ Blocks.COAL_ORE,
|
||||
+ Blocks.DEEPSLATE_COAL_ORE,
|
||||
+ Blocks.DEEPSLATE,
|
||||
+ Blocks.DIORITE,
|
||||
+ Blocks.DIRT,
|
||||
+ Blocks.EMERALD_ORE,
|
||||
+ Blocks.GRANITE,
|
||||
+ Blocks.GRAVEL,
|
||||
+ Blocks.OAK_PLANKS,
|
||||
+ Blocks.SMOOTH_BASALT,
|
||||
+ Blocks.STONE,
|
||||
+ Blocks.TUFF
|
||||
+ //</editor-fold>
|
||||
+ ) : List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE);
|
||||
+ // Plazma end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,14 +198,14 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public ArmorStands armorStands;
|
||||
|
||||
public class ArmorStands extends ConfigurationPart {
|
||||
- public boolean doCollisionEntityLookups = true;
|
||||
- public boolean tick = true;
|
||||
+ public boolean doCollisionEntityLookups = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
|
||||
+ public boolean tick = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
|
||||
}
|
||||
|
||||
public Markers markers;
|
||||
|
||||
public class Markers extends ConfigurationPart {
|
||||
- public boolean tick = true;
|
||||
+ public boolean tick = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
}
|
||||
|
||||
public Sniffer sniffer;
|
||||
@@ -415,7 +456,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Environment extends ConfigurationPart {
|
||||
public boolean disableThunder = false;
|
||||
public boolean disableIceAndSnow = false;
|
||||
- public boolean optimizeExplosions = false;
|
||||
+ public boolean optimizeExplosions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean disableExplosionKnockback = false;
|
||||
public boolean generateFlatBedrock = false;
|
||||
public FrostedIce frostedIce;
|
||||
@@ -471,7 +512,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public Fixes fixes;
|
||||
|
||||
public class Fixes extends ConfigurationPart {
|
||||
- public boolean fixItemsMergingThroughWalls = false;
|
||||
+ public boolean fixItemsMergingThroughWalls = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean disableUnloadedChunkEnderpearlExploit = false;
|
||||
public boolean preventTntFromMovingInWater = false;
|
||||
public boolean splitOverstackedLoot = true;
|
||||
@@ -499,9 +540,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Collisions extends ConfigurationPart {
|
||||
public boolean onlyPlayersCollide = false;
|
||||
public boolean allowVehicleCollisions = true;
|
||||
- public boolean fixClimbingBypassingCrammingRule = false;
|
||||
+ public boolean fixClimbingBypassingCrammingRule = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
@RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class)
|
||||
- public int maxEntityCollisions = 8;
|
||||
+ public int maxEntityCollisions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 8; // Plazma - Optimize default configurations
|
||||
public boolean allowPlayerCrammingDamage = false;
|
||||
}
|
||||
|
||||
@@ -509,18 +550,41 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Chunks extends ConfigurationPart {
|
||||
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
||||
- public int maxAutoSaveChunksPerTick = 24;
|
||||
+ public int maxAutoSaveChunksPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 24; // Plazma - Optimize default configurations
|
||||
public int fixedChunkInhabitedTime = -1;
|
||||
- public boolean preventMovingIntoUnloadedChunks = false;
|
||||
+ public boolean preventMovingIntoUnloadedChunks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public Duration delayChunkUnloadsBy = Duration.of("10s");
|
||||
public Reference2IntMap<EntityType<?>> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(BuiltInRegistries.ENTITY_TYPE.size()), map -> {
|
||||
map.defaultReturnValue(-1);
|
||||
- map.put(EntityType.EXPERIENCE_ORB, -1);
|
||||
- map.put(EntityType.SNOWBALL, -1);
|
||||
- map.put(EntityType.ENDER_PEARL, -1);
|
||||
- map.put(EntityType.ARROW, -1);
|
||||
- map.put(EntityType.FIREBALL, -1);
|
||||
- map.put(EntityType.SMALL_FIREBALL, -1);
|
||||
+ // Plazma start - Optimize default configurations
|
||||
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) {
|
||||
+ map.put(EntityType.AREA_EFFECT_CLOUD, 8);
|
||||
+ map.put(EntityType.ARROW, 16);
|
||||
+ map.put(EntityType.DRAGON_FIREBALL, 3);
|
||||
+ map.put(EntityType.EGG, 8);
|
||||
+ map.put(EntityType.ENDER_PEARL, 8);
|
||||
+ map.put(EntityType.EXPERIENCE_BOTTLE, 3);
|
||||
+ map.put(EntityType.EXPERIENCE_ORB, 16);
|
||||
+ map.put(EntityType.EYE_OF_ENDER, 8);
|
||||
+ map.put(EntityType.FIREBALL, 8);
|
||||
+ map.put(EntityType.FIREWORK_ROCKET, 8);
|
||||
+ map.put(EntityType.LLAMA_SPIT, 3);
|
||||
+ map.put(EntityType.POTION, 8);
|
||||
+ map.put(EntityType.SHULKER_BULLET, 8);
|
||||
+ map.put(EntityType.SMALL_FIREBALL, 8);
|
||||
+ map.put(EntityType.SNOWBALL, 8);
|
||||
+ map.put(EntityType.SPECTRAL_ARROW, 16);
|
||||
+ map.put(EntityType.TRIDENT, 16);
|
||||
+ map.put(EntityType.WITHER_SKULL, 4);
|
||||
+ } else {
|
||||
+ map.put(EntityType.EXPERIENCE_ORB, -1);
|
||||
+ map.put(EntityType.SNOWBALL, -1);
|
||||
+ map.put(EntityType.ENDER_PEARL, -1);
|
||||
+ map.put(EntityType.ARROW, -1);
|
||||
+ map.put(EntityType.FIREBALL, -1);
|
||||
+ map.put(EntityType.SMALL_FIREBALL, -1);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
});
|
||||
public boolean flushRegionsOnSave = false;
|
||||
}
|
||||
@@ -535,9 +599,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public TickRates tickRates;
|
||||
|
||||
public class TickRates extends ConfigurationPart {
|
||||
- public int grassSpread = 1;
|
||||
+ public int grassSpread = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 1; // Plazma - Optimize default configurations
|
||||
public int containerUpdate = 1;
|
||||
- public int mobSpawner = 1;
|
||||
+ public int mobSpawner = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 1; // Plazma - Optimize default configurations
|
||||
public int wetFarmland = 1;
|
||||
public int dryFarmland = 1;
|
||||
public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
||||
@@ -571,9 +635,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Misc extends ConfigurationPart {
|
||||
public int lightQueueSize = 20;
|
||||
- public boolean updatePathfindingOnBlockUpdate = true;
|
||||
+ public boolean updatePathfindingOnBlockUpdate = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
|
||||
public boolean showSignClickCommandFailureMsgsToPlayer = false;
|
||||
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
|
||||
+ public RedstoneImplementation redstoneImplementation = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? RedstoneImplementation.ALTERNATE_CURRENT : RedstoneImplementation.VANILLA; // Plazma - Optimize default configurations
|
||||
public AlternateCurrentUpdateOrder alternateCurrentUpdateOrder = AlternateCurrentUpdateOrder.HORIZONTAL_FIRST_OUTWARD;
|
||||
public boolean disableEndCredits = false;
|
||||
public DoubleOr.Default maxLeashDistance = DoubleOr.Default.USE_DEFAULT;
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357d9c7d62a 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
|
||||
@@ -29,6 +29,7 @@ public class ArrowDespawnRate extends FallbackValue.Int {
|
||||
|
||||
@Override
|
||||
protected int fallback() {
|
||||
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) return 100; // Plazma - Optimize default configurations
|
||||
return this.get(FallbackValue.SPIGOT_WORLD_CONFIG).arrowDespawnRate;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 694b126df2c3d1d6fa40ee9731c28886caf1a4fc..822ecda5f4dc6cc8cd0cc4da577f27cdcc5c4967 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -164,7 +164,7 @@ public class Main {
|
||||
File configFile = (File) optionset.valueOf("bukkit-settings");
|
||||
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
|
||||
configuration.options().copyDefaults(true);
|
||||
- configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
|
||||
+ configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
|
||||
configuration.save(configFile);
|
||||
|
||||
File commandFile = (File) optionset.valueOf("commands-settings");
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index 8f7e922ceca286b1a590181c301fbe9bff55c024..3dd5c7441bb300ca17d717af37edbefb89db4b2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -132,14 +132,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.spawnMonsters = this.get("spawn-monsters", true);
|
||||
this.useNativeTransport = this.get("use-native-transport", true);
|
||||
this.enableCommandBlock = this.get("enable-command-block", false);
|
||||
- this.spawnProtection = this.get("spawn-protection", 16);
|
||||
+ this.spawnProtection = this.get("spawn-protection", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 0 : 16); // Plazma - Optimize default configurations
|
||||
this.opPermissionLevel = this.get("op-permission-level", 4);
|
||||
this.functionPermissionLevel = this.get("function-permission-level", 2);
|
||||
this.maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
|
||||
- this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
|
||||
+ this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 10000 : 1000000); // Plazma - Optimize default configurations
|
||||
this.rateLimitPacketsPerSecond = this.get("rate-limit", 0);
|
||||
- this.viewDistance = this.get("view-distance", 10);
|
||||
- this.simulationDistance = this.get("simulation-distance", 10);
|
||||
+ this.viewDistance = this.get("view-distance", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 10); // Plazma - Optimize default configurations
|
||||
+ this.simulationDistance = this.get("simulation-distance", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 10); // Plazma - Optimize default configurations
|
||||
this.maxPlayers = this.get("max-players", 20);
|
||||
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
|
||||
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
||||
@@ -147,7 +147,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, 1, 29999984);
|
||||
}, 29999984);
|
||||
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag
|
||||
+ this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Completely remove this setting
|
||||
this.regionFileComression = this.get("region-file-compression", "deflate");
|
||||
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
||||
this.enableStatus = this.get("enable-status", true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 655463a7d588ed88778d137b6fe5ac18951ff172..cc4762c13e21600b4c5e287a6fae9e6e472080b3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -449,7 +449,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.configuration.options().copyDefaults(true);
|
||||
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
|
||||
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
|
||||
ConfigurationSection legacyAlias = null;
|
||||
if (!this.configuration.isString("aliases")) {
|
||||
legacyAlias = this.configuration.getConfigurationSection("aliases");
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
index 5d41bd4d4b86ca0c7c03d3ac6e75b3f1f1abe73b..c608770ea0df26859a09b794e93292f4aa6881b4 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -7,5 +7,6 @@ public interface Options {
|
||||
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
+ boolean AGGRESSIVE = getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
|
||||
index 09053b4ccf268fd204c81dbb8d4f10fa9edcad5f..93f67f125b3674e645cfdae27e579e12d31a236e 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
|
||||
@@ -35,6 +35,15 @@ public class PlazmaConfigurations extends Configurations<GlobalConfiguration, Wo
|
||||
static final String WORLD_CONFIG_FILE_NAME = "plazma-world.yml";
|
||||
static final boolean OPTIMIZE = !Options.NO_OPTIMIZE;
|
||||
|
||||
+ static {
|
||||
+ if (Options.AGGRESSIVE) {
|
||||
+ LOGGER.warn("Aggressive configuration optimization is enabled. It can greatly affect gameplay.");
|
||||
+ } else if (OPTIMIZE) {
|
||||
+ LOGGER.warn("Default configuration optimization is enabled. It may have some impact on gameplay.");
|
||||
+ LOGGER.warn("To disable default configuration optimization, type \"-DPlazma.disableConfigOptimization\" before the -jar in the server startup command.");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
private static final String HEADER_START = """
|
||||
#### ENGLISH ####
|
||||
This is the %s configuration file for Plazma.
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 95cd1156766895546ef5574b33a60806bff08fa2..097f3c34d244b89e7dd9f8b6f2a3d8fdc67b36dc 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -244,7 +244,7 @@ public class PurpurConfig {
|
||||
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
||||
}
|
||||
|
||||
- public static boolean useAlternateKeepAlive = false;
|
||||
+ public static boolean useAlternateKeepAlive = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
private static void useAlternateKeepAlive() {
|
||||
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
}
|
||||
@@ -491,7 +491,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static boolean useUPnP = false;
|
||||
- public static boolean maxJoinsPerSecond = false;
|
||||
+ public static boolean maxJoinsPerSecond = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public static boolean kickForOutOfOrderChat = true;
|
||||
private static void networkSettings() {
|
||||
useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 57ddb4e6a464567cc67e09ce06218cc25af4ddf9..e55993e318b7f7292e22c4539bc2fd1447f67fa8 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -424,7 +424,7 @@ public class PurpurWorldConfig {
|
||||
public boolean idleTimeoutTargetPlayer = true;
|
||||
public String playerDeathExpDropEquation = "expLevel * 7";
|
||||
public int playerDeathExpDropMax = 100;
|
||||
- public boolean teleportIfOutsideBorder = false;
|
||||
+ public boolean teleportIfOutsideBorder = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean teleportOnNetherCeilingDamage = false;
|
||||
public boolean totemOfUndyingWorksInInventory = false;
|
||||
public boolean playerFixStuckPortal = false;
|
||||
@@ -3262,7 +3262,7 @@ public class PurpurWorldConfig {
|
||||
public boolean zombieJockeyOnlyBaby = true;
|
||||
public double zombieJockeyChance = 0.05D;
|
||||
public boolean zombieJockeyTryExistingChickens = true;
|
||||
- public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
|
||||
+ public boolean zombieAggressiveTowardsVillagerWhenLagging = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
|
||||
public boolean zombieBypassMobGriefing = false;
|
||||
public boolean zombieTakeDamageFromWater = false;
|
||||
public boolean zombieAlwaysDropExp = false;
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 2c408fa4abcbe1171c58aee8799c8cf7867d0f0a..aadad0a1e3c7e20b0ab97095ee6e6fb7dbfbd234 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -150,14 +150,14 @@ public class SpigotWorldConfig
|
||||
public double itemMerge;
|
||||
private void itemMerge()
|
||||
{
|
||||
- this.itemMerge = this.getDouble("merge-radius.item", 0.5 );
|
||||
+ this.itemMerge = this.getDouble("merge-radius.item", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3.5 : 0.5); // Plazma - Optimize default configurations
|
||||
this.log( "Item Merge Radius: " + this.itemMerge );
|
||||
}
|
||||
|
||||
public double expMerge;
|
||||
private void expMerge()
|
||||
{
|
||||
- this.expMerge = this.getDouble("merge-radius.exp", -1 );
|
||||
+ this.expMerge = this.getDouble("merge-radius.exp", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4.0 : -1); // Plazma - Optimize default configurations
|
||||
this.log( "Experience Merge Radius: " + this.expMerge );
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public class SpigotWorldConfig
|
||||
public byte mobSpawnRange;
|
||||
private void mobSpawnRange()
|
||||
{
|
||||
- this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 8 ); // Paper - Vanilla
|
||||
+ this.mobSpawnRange = (byte) getInt( "mob-spawn-range", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3 : 8 ); // Paper - Vanilla // Plazma - Optimize default configurations
|
||||
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
|
||||
}
|
||||
|
||||
@@ -207,27 +207,29 @@ public class SpigotWorldConfig
|
||||
this.log( "Item Despawn Rate: " + this.itemDespawnRate );
|
||||
}
|
||||
|
||||
- public int animalActivationRange = 32;
|
||||
- public int monsterActivationRange = 32;
|
||||
- public int raiderActivationRange = 64;
|
||||
- public int miscActivationRange = 16;
|
||||
- // Paper start
|
||||
- public int flyingMonsterActivationRange = 32;
|
||||
- public int waterActivationRange = 16;
|
||||
- public int villagerActivationRange = 32;
|
||||
- public int wakeUpInactiveAnimals = 4;
|
||||
- public int wakeUpInactiveAnimalsEvery = 60*20;
|
||||
- public int wakeUpInactiveAnimalsFor = 5*20;
|
||||
- public int wakeUpInactiveMonsters = 8;
|
||||
- public int wakeUpInactiveMonstersEvery = 20*20;
|
||||
- public int wakeUpInactiveMonstersFor = 5*20;
|
||||
- public int wakeUpInactiveVillagers = 4;
|
||||
- public int wakeUpInactiveVillagersEvery = 30*20;
|
||||
- public int wakeUpInactiveVillagersFor = 5*20;
|
||||
- public int wakeUpInactiveFlying = 8;
|
||||
- public int wakeUpInactiveFlyingEvery = 10*20;
|
||||
- public int wakeUpInactiveFlyingFor = 5*20;
|
||||
- public int villagersWorkImmunityAfter = 5*20;
|
||||
+ // Plazma start - Optimize default configurations
|
||||
+ public int animalActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 16 : 32;
|
||||
+ public int monsterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 24 : 32;
|
||||
+ public int raiderActivationRange = 64; // diff on changes
|
||||
+ public int miscActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 16;
|
||||
+ // Paper start // diff on changes
|
||||
+ public int flyingMonsterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 48 : 32;
|
||||
+ public int waterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 16;
|
||||
+ public int villagerActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 16 : 32;
|
||||
+ public int wakeUpInactiveAnimals = 4; // diff on changes
|
||||
+ public int wakeUpInactiveAnimalsEvery = 1200;
|
||||
+ public int wakeUpInactiveAnimalsFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 40 : 100;
|
||||
+ public int wakeUpInactiveMonsters = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 8;
|
||||
+ public int wakeUpInactiveMonstersEvery = 400;
|
||||
+ public int wakeUpInactiveMonstersFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 60 : 100;
|
||||
+ public int wakeUpInactiveVillagers = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1 : 4;
|
||||
+ public int wakeUpInactiveVillagersEvery = 600;
|
||||
+ public int wakeUpInactiveVillagersFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 20 : 100;
|
||||
+ public int wakeUpInactiveFlying = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1 : 8;
|
||||
+ public int wakeUpInactiveFlyingEvery = 200;
|
||||
+ public int wakeUpInactiveFlyingFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 60 : 100;
|
||||
+ public int villagersWorkImmunityAfter = 100;
|
||||
+ // Plazma end - Optimize default configurations
|
||||
public int villagersWorkImmunityFor = 20;
|
||||
public boolean villagersActiveForPanic = true;
|
||||
// Paper end
|
||||
@@ -299,7 +301,7 @@ public class SpigotWorldConfig
|
||||
{
|
||||
this.set( "ticks-per.hopper-check", 1 );
|
||||
}
|
||||
- this.hopperCheck = this.getInt( "ticks-per.hopper-check", 1 );
|
||||
+ this.hopperCheck = this.getInt( "ticks-per.hopper-check", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8: 1 ); // Plazma - Optimize default configurations
|
||||
this.hopperAmount = this.getInt( "hopper-amount", 1 );
|
||||
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
|
||||
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
|
||||
@@ -309,7 +311,7 @@ public class SpigotWorldConfig
|
||||
public int tridentDespawnRate;
|
||||
private void arrowDespawnRate()
|
||||
{
|
||||
- this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
|
||||
+ this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 300 : 1200 ); // Plazma - Optimize default configurations
|
||||
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
|
||||
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
|
||||
}
|
||||
diff --git a/src/main/resources/configurations/bukkit_optimized.yml b/src/main/resources/configurations/bukkit_optimized.yml
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..eb33b0a19d6060f78d7ead7a2ad63b1b2581293d
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/configurations/bukkit_optimized.yml
|
||||
@@ -0,0 +1,45 @@
|
||||
+# This is the main configuration file for Bukkit.
|
||||
+# As you can see, there's actually not that much to configure without any plugins.
|
||||
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
|
||||
+# https://www.spigotmc.org/go/bukkit-yml
|
||||
+#
|
||||
+# If you need help on this file, feel free to join us on Discord or leave a message
|
||||
+# on the forums asking for advice.
|
||||
+#
|
||||
+# Discord: https://www.spigotmc.org/go/discord
|
||||
+# Forums: https://www.spigotmc.org/
|
||||
+# Bug tracker: https://www.spigotmc.org/go/bugs
|
||||
+
|
||||
+
|
||||
+settings:
|
||||
+ allow-end: true
|
||||
+ warn-on-overload: true
|
||||
+ permissions-file: permissions.yml
|
||||
+ update-folder: update
|
||||
+ plugin-profiling: false
|
||||
+ connection-throttle: 4000
|
||||
+ query-plugins: true
|
||||
+ deprecated-verbose: default
|
||||
+ shutdown-message: Server closed
|
||||
+ minimum-api: none
|
||||
+ use-map-color-cache: true
|
||||
+spawn-limits:
|
||||
+ monsters: 20
|
||||
+ animals: 5
|
||||
+ water-animals: 2
|
||||
+ water-ambient: 2
|
||||
+ water-underground-creature: 3
|
||||
+ axolotls: 3
|
||||
+ ambient: 1
|
||||
+chunk-gc:
|
||||
+ period-in-ticks: 400
|
||||
+ticks-per:
|
||||
+ animal-spawns: 400
|
||||
+ monster-spawns: 10
|
||||
+ water-spawns: 400
|
||||
+ water-ambient-spawns: 400
|
||||
+ water-underground-creature-spawns: 400
|
||||
+ axolotl-spawns: 400
|
||||
+ ambient-spawns: 400
|
||||
+ autosave: 6000
|
||||
+aliases: now-in-commands.yml
|
||||
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 23 Mar 2023 21:18:47 +0900
|
||||
Subject: [PATCH] Player configuration section
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index ba542542cbab63b0764d437049123a76ccaca716..3590442906a3f1cf27f621a1e093c1c4cc0887ac 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -28,5 +28,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public boolean enableRootUserWarnings = true;
|
||||
public boolean enableSecureChatMarker = DO_OPTIMIZE;
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public Player player;
|
||||
+ public class Player extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 15 May 2024 16:13:17 +0900
|
||||
Subject: [PATCH] Add an option to apply the configuration to the vanilla
|
||||
default
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index a8e75eaadfcc6c8b2503776d7de197f756712819..99cf08bc17eec05463b300c0c9fd108cbfba1b8f 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -87,7 +87,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Component flyingVehicle = Component.translatable("multiplayer.disconnect.flying");
|
||||
}
|
||||
|
||||
- public Component noPermission = Component.text("I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.", NamedTextColor.RED);
|
||||
+ public Component noPermission = org.plazmamc.plazma.Options.VANILLAIZE ? Component.translatable("command.unknown.command") : Component.text("I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.", NamedTextColor.RED);
|
||||
public boolean useDisplayNameInQuitMessage = false;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cc4762c13e21600b4c5e287a6fae9e6e472080b3..76f255d12189ffe83426cc7aa85771d5c7cfb111 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -449,7 +449,19 @@ public final class CraftServer implements Server {
|
||||
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.configuration.options().copyDefaults(true);
|
||||
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
|
||||
+ // Plazma start - Add an option to apply the configuration to the vanilla default
|
||||
+ String configPath;
|
||||
+ if (org.plazmamc.plazma.Options.NO_OPTIMIZE) {
|
||||
+ if (org.plazmamc.plazma.Options.VANILLAIZE) configPath = "configurations/bukkit_vanillaized.yml";
|
||||
+ else configPath = "configurations/bukkit.yml";
|
||||
+ } else {
|
||||
+ if (org.plazmamc.plazma.Options.VANILLAIZE) configPath = "configurations/bukkit_optimized_vanillaized.yml";
|
||||
+ else configPath = "configurations/bukkit_optimized.yml";
|
||||
+ }
|
||||
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(
|
||||
+ new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(configPath), Charsets.UTF_8)
|
||||
+ )); // Plazma - Optimize default configurations
|
||||
+ // Plazma end - Add an option to apply the configuration to the vanilla default
|
||||
ConfigurationSection legacyAlias = null;
|
||||
if (!this.configuration.isString("aliases")) {
|
||||
legacyAlias = this.configuration.getConfigurationSection("aliases");
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
index c608770ea0df26859a09b794e93292f4aa6881b4..063b71b3043a69a90130a81686b6a5f1e5f22fd1 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -8,5 +8,7 @@ public interface Options {
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
boolean AGGRESSIVE = getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
|
||||
+ boolean VANILLAIZE = getBoolean("Plazma.vanillaize") && !AGGRESSIVE;
|
||||
+ boolean USE_VANILLA = getBoolean("Plazma.useVanillaConfiguration") && !AGGRESSIVE && NO_OPTIMIZE;
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 4dbb109d0526afee99b9190fc256585121aac9b5..3835a7aa3e3c60a6f50f1d6e781f280ea8a83fb3 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -193,8 +193,8 @@ public class SpigotConfig
|
||||
public static String whitelistMessage;
|
||||
public static String unknownCommandMessage;
|
||||
public static String serverFullMessage;
|
||||
- public static String outdatedClientMessage = "Outdated client! Please use {0}";
|
||||
- public static String outdatedServerMessage = "Outdated server! I\'m still on {0}";
|
||||
+ public static String outdatedClientMessage = org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.outdated_client>" : "Outdated client! Please use {0}";
|
||||
+ public static String outdatedServerMessage = org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.outdated_server>" : "Outdated server! I'm still on {0}";
|
||||
private static String transform(String s)
|
||||
{
|
||||
return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\\\n", "\n" );
|
||||
@@ -207,9 +207,9 @@ public class SpigotConfig
|
||||
SpigotConfig.set( "messages.outdated-server", SpigotConfig.outdatedServerMessage );
|
||||
}
|
||||
|
||||
- SpigotConfig.whitelistMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.whitelist", "You are not whitelisted on this server!" ) );
|
||||
- SpigotConfig.unknownCommandMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.unknown-command", "Unknown command. Type \"/help\" for help." ) );
|
||||
- SpigotConfig.serverFullMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.server-full", "The server is full!" ) );
|
||||
+ SpigotConfig.whitelistMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.whitelist", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.not_whitelisted>" : "You are not whitelisted on this server!" ) ); // Plazma - Add an option to apply the configuration to the vanilla default
|
||||
+ SpigotConfig.unknownCommandMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.unknown-command", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:command.unknown.command>" : "Unknown command. Type \"/help\" for help." ) );
|
||||
+ SpigotConfig.serverFullMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.server-full", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.server_full>" : "The server is full!" ) );
|
||||
SpigotConfig.outdatedClientMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.outdated-client", SpigotConfig.outdatedClientMessage ) );
|
||||
SpigotConfig.outdatedServerMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.outdated-server", SpigotConfig.outdatedServerMessage ) );
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class SpigotConfig
|
||||
SpigotConfig.timeoutTime = SpigotConfig.getInt( "settings.timeout-time", SpigotConfig.timeoutTime );
|
||||
SpigotConfig.restartOnCrash = SpigotConfig.getBoolean( "settings.restart-on-crash", SpigotConfig.restartOnCrash );
|
||||
SpigotConfig.restartScript = SpigotConfig.getString( "settings.restart-script", SpigotConfig.restartScript );
|
||||
- SpigotConfig.restartMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.restart", "Server is restarting" ) );
|
||||
+ SpigotConfig.restartMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.restart", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:disconnect.quitting>" : "Server is restarting" ) );
|
||||
SpigotConfig.commands.put( "restart", new RestartCommand( "restart" ) );
|
||||
// WatchdogThread.doStart( SpigotConfig.timeoutTime, SpigotConfig.restartOnCrash ); // Paper - moved to after paper config initialization
|
||||
}
|
||||
diff --git a/src/main/resources/configurations/bukkit_optimized_vanillaized.yml b/src/main/resources/configurations/bukkit_optimized_vanillaized.yml
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b7ed456b0172caebdf5b548052ff2ae688377020
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/configurations/bukkit_optimized_vanillaized.yml
|
||||
@@ -0,0 +1,45 @@
|
||||
+# This is the main configuration file for Bukkit.
|
||||
+# As you can see, there's actually not that much to configure without any plugins.
|
||||
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
|
||||
+# https://www.spigotmc.org/go/bukkit-yml
|
||||
+#
|
||||
+# If you need help on this file, feel free to join us on Discord or leave a message
|
||||
+# on the forums asking for advice.
|
||||
+#
|
||||
+# Discord: https://www.spigotmc.org/go/discord
|
||||
+# Forums: https://www.spigotmc.org/
|
||||
+# Bug tracker: https://www.spigotmc.org/go/bugs
|
||||
+
|
||||
+
|
||||
+settings:
|
||||
+ allow-end: true
|
||||
+ warn-on-overload: true
|
||||
+ permissions-file: permissions.yml
|
||||
+ update-folder: update
|
||||
+ plugin-profiling: false
|
||||
+ connection-throttle: 4000
|
||||
+ query-plugins: true
|
||||
+ deprecated-verbose: default
|
||||
+ shutdown-message: <lang:multiplayer.disconnect.server_shutdown>
|
||||
+ minimum-api: none
|
||||
+ use-map-color-cache: true
|
||||
+spawn-limits:
|
||||
+ monsters: 20
|
||||
+ animals: 5
|
||||
+ water-animals: 2
|
||||
+ water-ambient: 2
|
||||
+ water-underground-creature: 3
|
||||
+ axolotls: 3
|
||||
+ ambient: 1
|
||||
+chunk-gc:
|
||||
+ period-in-ticks: 400
|
||||
+ticks-per:
|
||||
+ animal-spawns: 400
|
||||
+ monster-spawns: 10
|
||||
+ water-spawns: 400
|
||||
+ water-ambient-spawns: 400
|
||||
+ water-underground-creature-spawns: 400
|
||||
+ axolotl-spawns: 400
|
||||
+ ambient-spawns: 400
|
||||
+ autosave: 6000
|
||||
+aliases: now-in-commands.yml
|
||||
diff --git a/src/main/resources/configurations/bukkit_vanillaized.yml b/src/main/resources/configurations/bukkit_vanillaized.yml
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..22fe392b9970bb82db293d638b0dd5727bd60e5a
|
||||
--- /dev/null
|
||||
+++ b/src/main/resources/configurations/bukkit_vanillaized.yml
|
||||
@@ -0,0 +1,45 @@
|
||||
+# This is the main configuration file for Bukkit.
|
||||
+# As you can see, there's actually not that much to configure without any plugins.
|
||||
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
|
||||
+# https://www.spigotmc.org/go/bukkit-yml
|
||||
+#
|
||||
+# If you need help on this file, feel free to join us on Discord or leave a message
|
||||
+# on the forums asking for advice.
|
||||
+#
|
||||
+# Discord: https://www.spigotmc.org/go/discord
|
||||
+# Forums: https://www.spigotmc.org/
|
||||
+# Bug tracker: https://www.spigotmc.org/go/bugs
|
||||
+
|
||||
+
|
||||
+settings:
|
||||
+ allow-end: true
|
||||
+ warn-on-overload: true
|
||||
+ permissions-file: permissions.yml
|
||||
+ update-folder: update
|
||||
+ plugin-profiling: false
|
||||
+ connection-throttle: 4000
|
||||
+ query-plugins: true
|
||||
+ deprecated-verbose: default
|
||||
+ shutdown-message: <lang:multiplayer.disconnect.server_shutdown>
|
||||
+ minimum-api: none
|
||||
+ use-map-color-cache: true
|
||||
+spawn-limits:
|
||||
+ monsters: 70
|
||||
+ animals: 10
|
||||
+ water-animals: 5
|
||||
+ water-ambient: 20
|
||||
+ water-underground-creature: 5
|
||||
+ axolotls: 5
|
||||
+ ambient: 15
|
||||
+chunk-gc:
|
||||
+ period-in-ticks: 600
|
||||
+ticks-per:
|
||||
+ animal-spawns: 400
|
||||
+ monster-spawns: 1
|
||||
+ water-spawns: 1
|
||||
+ water-ambient-spawns: 1
|
||||
+ water-underground-creature-spawns: 1
|
||||
+ axolotl-spawns: 1
|
||||
+ ambient-spawns: 1
|
||||
+ autosave: 6000
|
||||
+aliases: now-in-commands.yml
|
||||
@@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 23 Mar 2023 21:20:20 +0900
|
||||
Subject: [PATCH] Add option to allow any usernames
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index f719f8aafe7c75e2ef8fcb05f556a8d6bd94b9a0..06ff5dd9e39e2be8dd8397a764813111019ceaed 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -239,7 +239,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@Override
|
||||
public void handleHello(ServerboundHelloPacket packet) {
|
||||
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", new Object[0]);
|
||||
- Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]);
|
||||
+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.allowAnyUsername) Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]); // Plazma
|
||||
// Paper start - validate usernames
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation) {
|
||||
if (!this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation && !validateUsername(packet.name())) {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 3590442906a3f1cf27f621a1e093c1c4cc0887ac..b9a04a8042f1bedaeb27681f84f9e2df7cf1794d 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -33,7 +33,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Player player;
|
||||
public class Player extends ConfigurationPart {
|
||||
|
||||
-
|
||||
+ public boolean allowAnyUsername = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 23 Mar 2023 21:35:15 +0900
|
||||
Subject: [PATCH] Add permission to bypass reducedDebugInfo gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d..0615c92894f42ccc320a5a6f5e6c5289a2dee5f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -268,7 +268,7 @@ public abstract class PlayerList {
|
||||
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player);
|
||||
GameRules gamerules = worldserver1.getGameRules();
|
||||
boolean flag = gamerules.getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN);
|
||||
- boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
||||
+ boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) || !player.getBukkitEntity().hasPermission("plazma.bypass-reduced-debug-info-gamerule"); // Plazma
|
||||
|
||||
// Spigot - view distance
|
||||
playerconnection.send(new ClientboundLoginPacket(player.getId(), worlddata.isHardcore(), player.gameMode.getGameModeForPlayer(), player.gameMode.getPreviousGameModeForPlayer(), this.server.levelKeys(), this.synchronizedRegistries, worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), this.getMaxPlayers(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetSendDistance(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetTickViewDistance(), flag1, !flag, worldserver1.isDebug(), worldserver1.isFlat(), player.getLastDeathLocation())); // Paper - replace old player chunk management
|
||||
@@ -1293,7 +1293,7 @@ public abstract class PlayerList {
|
||||
player.getEntityData().refresh(player); // CraftBukkkit - SPIGOT-7218: sync metadata
|
||||
player.connection.send(new ClientboundSetCarriedItemPacket(player.getInventory().selected));
|
||||
// CraftBukkit start - from GameRules
|
||||
- int i = player.level.getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;
|
||||
+ int i = player.level.getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) && !player.getBukkitEntity().hasPermission("plazma.bypass-reduced-debug-info-gamerule") ? 22 : 23; // Plazma
|
||||
player.connection.send(new ClientboundEntityEventPacket(player, (byte) i));
|
||||
float immediateRespawn = player.level.getGameRules().getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F;
|
||||
player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, immediateRespawn));
|
||||
91
patches/server/0014-Tweak-console-logging.patch
Normal file
91
patches/server/0014-Tweak-console-logging.patch
Normal file
@@ -0,0 +1,91 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 10:40:49 +0900
|
||||
Subject: [PATCH] Tweak console logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d4a9b187b01c63342d9b05b5c29bb1d199deed6c..38752c9ba1726e3c38dd758287a920bc476ef88a 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -194,16 +194,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
||||
- // Paper start - detect running as root
|
||||
- if (io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
|
||||
- DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
|
||||
- DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- }
|
||||
- // Paper end - detect running as root
|
||||
-
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -235,6 +225,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
+ // Paper start - detect running as root // Plazma - Tweak console logging (moved down)
|
||||
+ if (io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
|
||||
+ DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
|
||||
+ DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ }
|
||||
+ // Paper end - detect running as root
|
||||
this.server.spark.enableEarlyIfRequested(); // Paper - spark
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
@@ -335,6 +334,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.offlineWarnings && !(io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.onlineMode)) // Plazma - Tweak console logging
|
||||
if (!this.usesAuthentication()) {
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
@@ -348,7 +348,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
}
|
||||
// Spigot end
|
||||
- DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
+ DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file or set \"console-logs.offline-warnings\" to \"false\" in the config/plazma-global.yml file."); // Plazma - Tweak console logging
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 16999fa20c3621e016d1b0fadfb76f2fe03a2a69..8d7d050f12df83931bbb32f1832d7fcbc06317da 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1426,6 +1426,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public
|
||||
+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.notSecurePrefix) return true; // Plazma - Tweak console logging
|
||||
return message.hasSignature() && !message.hasExpiredServer(Instant.now());
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 35d5bd2f7dba1aa74547b6ae994bc84a56911bf2..e153370e617e63a8e497036c93ea55dfe851bc6e 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -79,4 +79,14 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
}
|
||||
|
||||
+
|
||||
+ public ConsoleLogs consoleLogs;
|
||||
+ public class ConsoleLogs extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean offlineWarnings = true;
|
||||
+ public boolean rootUserWarnings = true;
|
||||
+ public boolean notSecurePrefix = true;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 13 Dec 2024 13:08:37 +0900
|
||||
Subject: [PATCH] Add missing Pufferfish configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
index 9ef53608f1608e88de7a7b3e96b43d8d2b4230ae..8500ac473581b90036578d66243c5313e2ce3ddf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
@@ -161,11 +161,13 @@ public class Armadillo extends Animal {
|
||||
return ArmadilloAi.makeBrain(this.brainProvider().makeBrain(dynamic));
|
||||
}
|
||||
|
||||
+ private int behaviorTick; // Plazma - Add missing pufferfish configurations
|
||||
@Override
|
||||
protected void customServerAiStep(ServerLevel world) {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("armadilloBrain");
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
||||
((Brain<Armadillo>) this.brain).tick(world, this); // CraftBukkit - decompile error
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.push("armadilloActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index dbce71f45c008da883b6d244a06343d83ae25e7e..d2f0b14a0014802605b601e62d0eebddf06d3737 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -152,6 +152,7 @@ public class Camel extends AbstractHorse {
|
||||
return pose == Pose.SITTING ? Camel.SITTING_DIMENSIONS.scale(this.getAgeScale()) : super.getDefaultDimensions(pose);
|
||||
}
|
||||
|
||||
+ private int behaviorTick = 0; // Plazma - Add missing pufferfish configurations
|
||||
@Override
|
||||
protected void customServerAiStep(ServerLevel world) {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
@@ -159,6 +160,7 @@ public class Camel extends AbstractHorse {
|
||||
gameprofilerfiller.push("camelBrain");
|
||||
Brain<Camel> behaviorcontroller = (Brain<Camel>) this.getBrain(); // CraftBukkit - decompile error
|
||||
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
||||
behaviorcontroller.tick(world, this);
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.push("camelActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 464a16df15d8759d66f94ad080d1ea28b3f6474c..6061cd4fc38fef0895571ab767e495d5755f9fc8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -493,11 +493,13 @@ public class Sniffer extends Animal {
|
||||
return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES);
|
||||
}
|
||||
|
||||
+ private int behaviorTick; // Plazma - Add missing pufferfish configurations
|
||||
@Override
|
||||
protected void customServerAiStep(ServerLevel world) {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("snifferBrain");
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
||||
this.getBrain().tick(world, this);
|
||||
gameprofilerfiller.popPush("snifferActivityUpdate");
|
||||
SnifferAi.updateActivity(this);
|
||||
@@ -1,251 +1,246 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 00:52:11 +0900
|
||||
Subject: [PATCH] Add missing purpur configuration options
|
||||
Subject: [PATCH] Add missing Purpur configuration options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index e95540122ae6a486ce12a5f50fb4d2d073239554..86c9b549e3e75adf9bd5562c4c8d303cf2080e45 100644
|
||||
index 0a173040c56fea6d8f83998b7c66aa8daaf648f2..16b98cad477d7af2d9534cc189aae43a5adc8d58 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -154,6 +154,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
|
||||
@@ -160,6 +160,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.allayMaxHealth);
|
||||
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.allayScale);
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.allayTakeDamageFromWater;
|
||||
+ return level().purpurConfig.allayTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.allayAlwaysDropExp;
|
||||
+ return level().purpurConfig.allayAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.allayMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
protected Brain.Provider<Allay> brainProvider() {
|
||||
return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 31922ac1139f34e0da61a719e3645c1aaa188890..94536f25980cf642edbfcf0c3d338a0172e0b77f 100644
|
||||
index d2f0b14a0014802605b601e62d0eebddf06d3737..459a45f82c42b346a66bb1954e155a0970dcc30f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -90,6 +90,23 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@@ -96,6 +96,18 @@ public class Camel extends AbstractHorse {
|
||||
public int getPurpurBreedTime() {
|
||||
return this.level().purpurConfig.camelBreedingTicks;
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean dismountsUnderwater() {
|
||||
+ return level.purpurConfig.useDismountsUnderwaterTag ? super.dismountsUnderwater() : !level.purpurConfig.camelRidableInWater;
|
||||
+ }
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.camelTakeDamageFromWater;
|
||||
+ return level().purpurConfig.camelTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.camelAlwaysDropExp;
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
super.addAdditionalSaveData(nbt);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index c355aaed76663d37a5da8b2f49f9808828b4ef9b..dcc1b75361fe9eb250e3946e54454253a8f0e788 100644
|
||||
index 02581f47d1ca58c2b8abffc478adf48343585c8b..bd04af6311ca64d81c8829e731ac39a6486ee789 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -145,6 +145,23 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -163,6 +163,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
||||
public float getJumpPower() {
|
||||
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.frogTakeDamageFromWater;
|
||||
+ return level().purpurConfig.frogTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.frogAlwaysDropExp;
|
||||
+ return level().purpurConfig.frogAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.frogMaxHealth);
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
@Override
|
||||
protected Brain.Provider<Frog> brainProvider() {
|
||||
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
public int getPurpurBreedTime() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
index aadc6743deb195ac3368548a75be641ffd3da404..90314f86e17ac7756f8211519fc5cde5a411677d 100644
|
||||
index 7e92e8c4fec36c8838604f17cf366cc80e82b19b..1b0e80ae62b5c5d4e1fcac71b90f83f12fe4878a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
@@ -89,6 +89,23 @@ public class Tadpole extends AbstractFish {
|
||||
@@ -93,6 +93,23 @@ public class Tadpole extends AbstractFish {
|
||||
protected void registerGoals() {
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.tadpoleTakeDamageFromWater;
|
||||
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.tadpoleAlwaysDropExp;
|
||||
+ return level().purpurConfig.tadpoleAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.tadpoleMaxHealth);
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
protected PathNavigation createNavigation(Level world) {
|
||||
return new WaterBoundPathNavigation(this, world);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 6e7c0e95b27c41bf12da1beb3458830ce27c6029..24de1e98661541f36715c59de1487959fb53b4db 100644
|
||||
index 6061cd4fc38fef0895571ab767e495d5755f9fc8..0bc7856065fdc599890f18f5a4e2f6c2b3d94ba7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -108,6 +108,18 @@ public class Sniffer extends Animal {
|
||||
@@ -116,6 +116,18 @@ public class Sniffer extends Animal {
|
||||
public int getPurpurBreedTime() {
|
||||
return this.level().purpurConfig.snifferBreedingTicks;
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.snifferTakeDamageFromWater;
|
||||
+ return level().purpurConfig.snifferTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.snifferAlwaysDropExp;
|
||||
+ return level().purpurConfig.snifferAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
// CraftBukkit start - SPIGOT-7295: moved from constructor to appropriate location
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 69e5b4b6c8d5725bc2fb7cd819219e4ff9df45bd..41301ad56fbcbe0f13447bd3b515d15bf58554c4 100644
|
||||
index 5a62fe9c4f0cee9e8b4a48564f76afec609335b1..79b090030b716029cc4cfc8bf9d81af0b2202313 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -146,6 +146,23 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
|
||||
@@ -151,6 +151,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level.purpurConfig.wardenTakeDamageFromWater;
|
||||
+ return level().purpurConfig.wardenTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level.purpurConfig.wardenAlwaysDropExp;
|
||||
+ return level().purpurConfig.wardenAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.wardenMaxHealth);
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getAddEntityPacket() {
|
||||
return new ClientboundAddEntityPacket(this, this.hasPose(Pose.EMERGING) ? 1 : 0);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
index 3a720375c3daa961a34363f78c2c51d301c3fa06..90bd114feb0924669e61f92f301cdcf7f69405a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
@@ -41,7 +41,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
public ChestBoat(EntityType<? extends Boat> type, Level world) {
|
||||
super(type, world);
|
||||
@Override
|
||||
@@ -305,7 +322,7 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("wardenBrain");
|
||||
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing Purpur configurations
|
||||
this.getBrain().tick(world, this);
|
||||
gameprofilerfiller.pop();
|
||||
super.customServerAiStep(world);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
index 1f4cc08e84a23213bb9786ea09ad77caeec2d336..f888f1dd2e3c228b0a370fe920b63d547bbba571 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
@@ -46,7 +46,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
|
||||
|
||||
public AbstractChestBoat(EntityType<? extends AbstractChestBoat> type, Level world, Supplier<Item> itemSupplier) {
|
||||
super(type, world, itemSupplier);
|
||||
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur config options
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur configuration options
|
||||
}
|
||||
|
||||
public ChestBoat(Level world, double d0, double d1, double d2) {
|
||||
@@ -160,7 +160,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
@Override
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
- return 27;
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma - Add missing purpur config options
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma - Add missing purpur configuration options
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index ce960bc620d84e56c4e7fc9b721fd45c4cfc4dac..57534bdf23b8373078a5f39c930cdb1defd31416 100644
|
||||
index 097f3c34d244b89e7dd9f8b6f2a3d8fdc67b36dc..3f4c94aada930e55dfe6a2dd6f3bfb51b2276b0d 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -327,6 +327,7 @@ public class PurpurConfig {
|
||||
@@ -331,6 +331,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
+ public static int chestBoatRows = 3; // Plazma - Add missing purpur config options
|
||||
+ public static int chestBoatRows = 3; // Plazma - Add missing purpur configuration options
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
public static boolean cryingObsidianValidForPortalFrame = false;
|
||||
@@ -367,6 +368,7 @@ public class PurpurConfig {
|
||||
@@ -373,6 +374,7 @@ public class PurpurConfig {
|
||||
case 1 -> 9;
|
||||
default -> 27;
|
||||
});
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma - Add missing purpur config options
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma - Add missing purpur configuration options
|
||||
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
|
||||
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
|
||||
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 47f2c8f23e318b89324bfcb1342dadc325f53afc..eae616d7b0a318253725ef5bd3891f34b9d9b493 100644
|
||||
index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e94cfd6841 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1084,7 +1084,15 @@ public class PurpurWorldConfig {
|
||||
public boolean allayRidableInWater = true;
|
||||
@@ -1135,7 +1135,13 @@ public class PurpurWorldConfig {
|
||||
public boolean allayControllable = true;
|
||||
public List<String> allayRespectNBT = new ArrayList<>();
|
||||
public double allayMaxHealth = 20.0D;
|
||||
public double allayScale = 1.0D;
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+ public double allayMaxHealth = 20.0D;
|
||||
+ public boolean allayTakeDamageFromWater = false;
|
||||
+ public boolean allayAlwaysDropExp = false;
|
||||
private void allaySettings() {
|
||||
+ allayMaxHealth = getDouble("mobs.allay.max-health", allayMaxHealth);
|
||||
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
|
||||
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||
@@ -1195,7 +1203,15 @@ public class PurpurWorldConfig {
|
||||
public double camelJumpStrengthMax = 0.42D;
|
||||
@@ -1290,7 +1296,13 @@ public class PurpurWorldConfig {
|
||||
public double camelMovementSpeedMin = 0.09D;
|
||||
public double camelMovementSpeedMax = 0.09D;
|
||||
public int camelBreedingTicks = 6000;
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+ public boolean camelRidableInWater = false;
|
||||
+ public boolean camelTakeDamageFromWater = false;
|
||||
+ public boolean camelAlwaysDropExp = false;
|
||||
private void camelSettings() {
|
||||
+ camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
||||
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
||||
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
|
||||
camelJumpStrengthMin = getDouble("mobs.camel.attributes.jump_strength.min", camelJumpStrengthMin);
|
||||
@@ -1622,7 +1638,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1755,7 +1767,15 @@ public class PurpurWorldConfig {
|
||||
public boolean frogControllable = true;
|
||||
public float frogRidableJumpHeight = 0.65F;
|
||||
public int frogBreedingTicks = 6000;
|
||||
@@ -257,13 +252,13 @@ index 47f2c8f23e318b89324bfcb1342dadc325f53afc..eae616d7b0a318253725ef5bd3891f34
|
||||
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
|
||||
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
|
||||
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
||||
@@ -2573,7 +2597,13 @@ public class PurpurWorldConfig {
|
||||
public boolean snifferControllable = true;
|
||||
@@ -2767,7 +2787,13 @@ public class PurpurWorldConfig {
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
public double snifferScale = 1.0D;
|
||||
public int snifferBreedingTicks = 6000;
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+ public boolean snifferTakeDamageFromWater = false;
|
||||
@@ -271,11 +266,11 @@ index 47f2c8f23e318b89324bfcb1342dadc325f53afc..eae616d7b0a318253725ef5bd3891f34
|
||||
private void snifferSettings() {
|
||||
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
|
||||
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
|
||||
@@ -2672,7 +2702,15 @@ public class PurpurWorldConfig {
|
||||
@@ -2875,7 +2901,15 @@ public class PurpurWorldConfig {
|
||||
public boolean tadpoleRidable = false;
|
||||
public boolean tadpoleRidableInWater = true;
|
||||
public boolean tadpoleControllable = true;
|
||||
@@ -287,11 +282,11 @@ index 47f2c8f23e318b89324bfcb1342dadc325f53afc..eae616d7b0a318253725ef5bd3891f34
|
||||
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
|
||||
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
|
||||
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
||||
@@ -2882,7 +2920,15 @@ public class PurpurWorldConfig {
|
||||
@@ -3107,7 +3141,15 @@ public class PurpurWorldConfig {
|
||||
public boolean wardenRidable = false;
|
||||
public boolean wardenRidableInWater = true;
|
||||
public boolean wardenControllable = true;
|
||||
@@ -303,7 +298,7 @@ index 47f2c8f23e318b89324bfcb1342dadc325f53afc..eae616d7b0a318253725ef5bd3891f34
|
||||
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
|
||||
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
|
||||
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
|
||||
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
|
||||
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);
|
||||
@@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 00:04:41 +0900
|
||||
Subject: [PATCH] Structure Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 8ba1c5b6731d43c02b415e4d79a20c1de0c03ad5..4ee9f3ca88e89a8dcbfe6c807036386ef679da0a 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -30,4 +30,21 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public int maxChunksPerTick = 5;
|
||||
|
||||
}
|
||||
+
|
||||
+ public Structure structure;
|
||||
+ public class Structure extends ConfigurationPart {
|
||||
+
|
||||
+ public Portal portal;
|
||||
+ public class Portal extends ConfigurationPart {
|
||||
+
|
||||
+ public NetherPortal netherPortal;
|
||||
+ public class NetherPortal extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 11:27:51 +0900
|
||||
Subject: [PATCH] Add option to change nether portal size
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
index acdff7b4a00d563739fd301c3633a266875296fa..1266aaf4bfcf53aa16d7b9bd697a0c483d3218a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
@@ -113,7 +113,7 @@ public class PortalShape {
|
||||
private static int calculateWidth(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
|
||||
int i = PortalShape.getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection, blocks); // CraftBukkit
|
||||
|
||||
- return i >= 2 && i <= 21 ? i : 0;
|
||||
+ return i >= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.width.min() && i <= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.width.max() ? i : 0; // Plazma - Configurable nether portal size
|
||||
}
|
||||
|
||||
private static int getDistanceUntilEdgeAboveFrame(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
|
||||
@@ -146,7 +146,7 @@ public class PortalShape {
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
int j = PortalShape.getDistanceUntilTop(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, mutableint, blocks); // CraftBukkit
|
||||
|
||||
- return j >= 3 && j <= 21 && PortalShape.hasTopFrame(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, j, blocks) ? j : 0; // CraftBukkit
|
||||
+ return j >= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.height.min() && j <= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.height.max() && PortalShape.hasTopFrame(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, j, blocks) ? j : 0; // Craftbukkit // Plazma - Configurable nether portal size
|
||||
}
|
||||
|
||||
private static boolean hasTopFrame(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockPos.MutableBlockPos blockposition_mutableblockposition, int i, int j, BlockStateListPopulator blocks) { // CraftBukkit
|
||||
@@ -200,7 +200,7 @@ public class PortalShape {
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
- return this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
||||
+ return this.width >= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.width.min() && this.width <= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.width.max() && this.height >= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.height.min() && this.height <= org.plazmamc.plazma.configurations.GlobalConfiguration.get().structure.netherPortal.height.max(); // Plazma - Configurable nether portal size
|
||||
}
|
||||
|
||||
// CraftBukkit start - return boolean, add entity
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index e153370e617e63a8e497036c93ea55dfe851bc6e..11d386d3e134b1994302c4e026b6a11c46336522 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -70,6 +70,26 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Structure structure;
|
||||
public class Structure extends ConfigurationPart {
|
||||
|
||||
+ public NetherPortal netherPortal;
|
||||
+ public class NetherPortal extends ConfigurationPart {
|
||||
+
|
||||
+ public Width width;
|
||||
+ public class Width extends ConfigurationPart {
|
||||
+
|
||||
+ int min = 2; public int min() { return Math.max(this.min, 1); }
|
||||
+ int max = 21; public int max() { return Math.max(this.min, this.max); }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Height height;
|
||||
+ public class Height extends ConfigurationPart {
|
||||
+
|
||||
+ int min = 3; public int min() { return Math.max(this.min, 2); }
|
||||
+ int max = 21; public int max() { return Math.max(this.min, this.max); }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index c222d58520b655b54b8975ec226a4ba948691cd4..c703237d46b114227cf0d5cdff2e033839bc5f57 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -36,17 +36,6 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
|
||||
}
|
||||
|
||||
- public Structure structure;
|
||||
- public class Structure extends ConfigurationPart {
|
||||
-
|
||||
- public NetherPortal netherPortal;
|
||||
- public class NetherPortal extends ConfigurationPart {
|
||||
-
|
||||
-
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-
|
||||
public Block block;
|
||||
public class Block extends ConfigurationPart {
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 00:10:52 +0900
|
||||
Subject: [PATCH] Configurable nether portal size
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
index e7554ec800f321e4e34c926c53f2375a8c3aa979..677f546cee0ebda24a6e77cb5fedd41078c7fff4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
@@ -100,7 +100,7 @@ public class PortalShape {
|
||||
private int calculateWidth() {
|
||||
int i = this.getDistanceUntilEdgeAboveFrame(this.bottomLeft, this.rightDir);
|
||||
|
||||
- return i >= 2 && i <= 21 ? i : 0;
|
||||
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.max() ? i : 0; // Plazma
|
||||
}
|
||||
|
||||
private int getDistanceUntilEdgeAboveFrame(BlockPos pos, Direction direction) {
|
||||
@@ -133,7 +133,7 @@ public class PortalShape {
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
int i = this.getDistanceUntilTop(blockposition_mutableblockposition);
|
||||
|
||||
- return i >= 3 && i <= 21 && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0;
|
||||
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.max() && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0; // Plazma
|
||||
}
|
||||
|
||||
private boolean hasTopFrame(BlockPos.MutableBlockPos pos, int height) {
|
||||
@@ -187,7 +187,7 @@ public class PortalShape {
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
- return this.bottomLeft != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
||||
+ return this.bottomLeft != null && this.width >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.min() && this.width <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.max() && this.height >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.min() && this.height <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.max(); // Plazma
|
||||
}
|
||||
|
||||
// CraftBukkit start - return boolean
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 4ee9f3ca88e89a8dcbfe6c807036386ef679da0a..1cf5344d3ade76f6c24c7ea68d98b02e0dc62001 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -40,7 +40,43 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public NetherPortal netherPortal;
|
||||
public class NetherPortal extends ConfigurationPart {
|
||||
|
||||
+ public Size size;
|
||||
+ public class Size extends ConfigurationPart {
|
||||
|
||||
+ public Width width;
|
||||
+ public Height height;
|
||||
+
|
||||
+ public class Width extends ConfigurationPart {
|
||||
+
|
||||
+ int min = 2;
|
||||
+ int max = 21;
|
||||
+
|
||||
+ public int min() {
|
||||
+ return Math.max(this.min, 1);
|
||||
+ }
|
||||
+
|
||||
+ public int max() {
|
||||
+ return Math.max(this.min, this.max);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public class Height extends ConfigurationPart {
|
||||
+
|
||||
+ int min = 3;
|
||||
+ int max = 21;
|
||||
+
|
||||
+ public int min() {
|
||||
+ return Math.max(this.min, 2);
|
||||
+ }
|
||||
+
|
||||
+ public int max() {
|
||||
+ return Math.max(this.min, this.max);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
33
patches/server/0018-Apply-various-optimizations.patch
Normal file
33
patches/server/0018-Apply-various-optimizations.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 22:11:15 +0900
|
||||
Subject: [PATCH] Apply various optimizations
|
||||
|
||||
[REFERENCE PATCHES]
|
||||
Akarin - Swaps the predicate order of collision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index aa171a1afb9800e6ec84f6b4f1b28e44177752f7..eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2309,8 +2309,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
+ if (entity.noPhysics || this.noPhysics) return; // Plazma - Swaps the predicate order of collision
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
- if (!entity.noPhysics && !this.noPhysics) {
|
||||
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma - Swaps the predicate order of collision
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
@@ -2338,8 +2339,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
entity.push(d0, 0.0D, d1);
|
||||
}
|
||||
}
|
||||
-
|
||||
- }
|
||||
+ //} // Plazma - Swaps the predicate order of collision
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 19:52:12 +0900
|
||||
Subject: [PATCH] Misc configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index b9a04a8042f1bedaeb27681f84f9e2df7cf1794d..1e979bb87ec743e87909927a517692da38e7b18f 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -35,5 +35,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public boolean allowAnyUsername = false;
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public Misc misc;
|
||||
+ public class Misc extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 1cf5344d3ade76f6c24c7ea68d98b02e0dc62001..9416ce600d46fad167befe8d42f9a1a7d891a37f 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -82,5 +82,12 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public Misc misc;
|
||||
+ public class Misc extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 12:07:06 +0900
|
||||
Subject: [PATCH] Do not load chunks to spawn phantom
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 27eb9a365006884c85603dc6d9dd8eee009c98b3..958a48d05aba8e500c7b19a466dcca6fea8a8bcc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -70,6 +70,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
|
||||
if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper - Ability to control player's insomnia and phantoms
|
||||
BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21));
|
||||
+ if (!world.plazmaConfig().entity.phantom.loadChunksToSpawn && !world.hasChunkAt(blockposition1)) continue; // Plazma - Do not load chunks to spawn phantom
|
||||
BlockState iblockdata = world.getBlockState(blockposition1);
|
||||
FluidState fluid = world.getFluidState(blockposition1);
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index c703237d46b114227cf0d5cdff2e033839bc5f57..a976e2b960a5f3b7ecf6e42afcb1dd3bd140b8bd 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -31,6 +31,7 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
public Phantom phantom;
|
||||
public class Phantom extends ConfigurationPart {
|
||||
|
||||
+ public boolean loadChunksToSpawn = !OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 20:02:59 +0900
|
||||
Subject: [PATCH] Reduce create random instance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
index 591163d8f8300b084ac734800efee902c4def958..d74401ca3182145d136ad668704f5c043b163317 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
@@ -65,7 +65,7 @@ public class SpreadPlayersCommand {
|
||||
if (maxY < j) {
|
||||
throw SpreadPlayersCommand.ERROR_INVALID_MAX_HEIGHT.create(maxY, j);
|
||||
} else {
|
||||
- RandomSource randomsource = RandomSource.create();
|
||||
+ RandomSource randomsource = worldserver.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? worldserver.getRandom() : RandomSource.create(); // Plazma
|
||||
double d0 = (double) (center.x - maxRange);
|
||||
double d1 = (double) (center.y - maxRange);
|
||||
double d2 = (double) (center.x + maxRange);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 29c46144de1aad31b997ee5000114e6f33f1a1f7..c6d860687f6a1c286c286bb64ac4eed75a88f0c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -403,7 +403,7 @@ public class ServerPlayer extends Player {
|
||||
long l = k * k;
|
||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||
int j1 = this.getCoprime(i1);
|
||||
- int k1 = RandomSource.create().nextInt(i1);
|
||||
+ int k1 = (worldserver.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? worldserver.getRandom() : RandomSource.create()).nextInt(i1); // Plazma
|
||||
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
@@ -440,7 +440,7 @@ public class ServerPlayer extends Player {
|
||||
long l = k * k;
|
||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||
int j1 = this.getCoprime(i1);
|
||||
- int k1 = RandomSource.create().nextInt(i1);
|
||||
+ int k1 = (world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create()).nextInt(i1);
|
||||
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
index 1ef089dbf83de35d875c00efdf468c397be56978..dc111e0d1e7303c56cd12fa83be3ff85ab989e1b 100644
|
||||
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
+++ b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||
@@ -349,7 +349,7 @@ public class QueryThreadGs4 extends GenericThread {
|
||||
this.identBytes[2] = bs[5];
|
||||
this.identBytes[3] = bs[6];
|
||||
this.ident = new String(this.identBytes, StandardCharsets.UTF_8);
|
||||
- this.challenge = RandomSource.create().nextInt(16777216);
|
||||
+ this.challenge = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceCreateRandomInstance ? java.util.concurrent.ThreadLocalRandom.current().nextInt(16777216) : RandomSource.create().nextInt(16777216); // Plazma
|
||||
this.challengeBytes = String.format(Locale.ROOT, "\t%s%d\u0000", this.ident, this.challenge).getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index d77410588a1c10d8ac902f21a8bd7e35f74fecd2..95bf0537d7793391eae9dd67655dc0189eb047df 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -80,7 +80,7 @@ public class FishingHook extends Projectile {
|
||||
|
||||
private FishingHook(EntityType<? extends FishingHook> type, Level world, int luckOfTheSeaLevel, int lureLevel) {
|
||||
super(type, world);
|
||||
- this.syncronizedRandom = RandomSource.create();
|
||||
+ this.syncronizedRandom = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
|
||||
this.openWater = true;
|
||||
this.currentState = FishingHook.FishHookState.FLYING;
|
||||
this.noCulling = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
index 879c3bb661e24b9682b654def57c2800f4f8ca92..4c465466543e51ff1e8343d3af7ee31a8b04b839 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -110,7 +110,7 @@ public class Raid {
|
||||
|
||||
public Raid(int id, ServerLevel world, BlockPos pos) {
|
||||
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
|
||||
- this.random = RandomSource.create();
|
||||
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
|
||||
this.waveSpawnPos = Optional.empty();
|
||||
this.id = id;
|
||||
this.level = world;
|
||||
@@ -124,7 +124,7 @@ public class Raid {
|
||||
|
||||
public Raid(ServerLevel world, CompoundTag nbt) {
|
||||
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
|
||||
- this.random = RandomSource.create();
|
||||
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
|
||||
this.waveSpawnPos = Optional.empty();
|
||||
this.level = world;
|
||||
this.id = nbt.getInt("Id");
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
index 69ae671be07b1928e778399551991777829e432a..e39ac3557c7abd6081ae25df71d0fd134c9cc342 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
@@ -94,7 +94,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
|
||||
}
|
||||
// Purpur end
|
||||
};
|
||||
- this.random = RandomSource.create();
|
||||
+ this.random = playerInventory.player.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? playerInventory.player.getRandom() : RandomSource.create(); // Plazma
|
||||
this.enchantmentSeed = DataSlot.standalone();
|
||||
this.costs = new int[3];
|
||||
this.enchantClue = new int[]{-1, -1, -1};
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 4beaedc5ec3562df62a7a9e6b2f40728bd933044..62c1b93ef872a40832ae6c223e99409aba2427db 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -81,7 +81,7 @@ public class Explosion {
|
||||
}
|
||||
|
||||
public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType) {
|
||||
- this.random = RandomSource.create();
|
||||
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
|
||||
this.toBlow = new ObjectArrayList();
|
||||
this.hitPlayers = Maps.newHashMap();
|
||||
this.level = world;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 058449f24eb3260dc230dad2a0b4c552d0b7f40e..cf0ad841267cac84ed058dee6cdd62a835325feb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -125,7 +125,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public final Thread thread;
|
||||
private final boolean isDebug;
|
||||
private int skyDarken;
|
||||
- protected int randValue = RandomSource.create().nextInt();
|
||||
+ protected int randValue = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceCreateRandomInstance ? java.util.concurrent.ThreadLocalRandom.current().nextInt() : RandomSource.create().nextInt(); // Plazma
|
||||
protected final int addend = 1013904223;
|
||||
protected float oRainLevel;
|
||||
public float rainLevel;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 43ca8471d7d4d2d561cba7e2a952a16ed200a961..2260ddd570e40ce97c6a14de99afa550d9686178 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -369,7 +369,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
}
|
||||
|
||||
private static void spawnGatewayPortal(ServerLevel world, BlockPos pos, EndGatewayConfiguration config) {
|
||||
- Feature.END_GATEWAY.place(config, world, world.getChunkSource().getGenerator(), RandomSource.create(), pos);
|
||||
+ Feature.END_GATEWAY.place(config, world, world.getChunkSource().getGenerator(), (world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create()), pos); // Plazma
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index e9eb32469a5c03f7a3677ef50fd4541c1ed662ad..75665373c291faaea1cbf5f54c3634fdb042556c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -411,7 +411,7 @@ public class EndDragonFight {
|
||||
this.level.registryAccess().registry(Registries.CONFIGURED_FEATURE).flatMap((registry) -> {
|
||||
return registry.getHolder(EndFeatures.END_GATEWAY_DELAYED);
|
||||
}).ifPresent((reference) -> {
|
||||
- reference.value().place(this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), pos);
|
||||
+ reference.value().place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create()), pos); // Plazma
|
||||
});
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ public class EndDragonFight {
|
||||
this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
|
||||
}
|
||||
// Paper end
|
||||
- endPodiumFeature.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation);
|
||||
+ endPodiumFeature.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create()), this.portalLocation); // Plazma
|
||||
}
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java b/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
|
||||
index 9e9ac64764cf0a84e25e75d8d6f516cde6047284..2d197a7de77657a19b1b527c0aa53ef9918eb15f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
|
||||
@@ -202,7 +202,7 @@ public class LootContext {
|
||||
} else {
|
||||
RandomSource randomSource = this.random;
|
||||
if (randomSource == null) {
|
||||
- randomSource = RandomSource.create();
|
||||
+ randomSource = this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create();
|
||||
}
|
||||
|
||||
MinecraftServer minecraftServer = this.level.getServer();
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 1e979bb87ec743e87909927a517692da38e7b18f..66436d4eb66b5a71f18b7db359ab1d63bbac74c0 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -40,7 +40,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Misc misc;
|
||||
public class Misc extends ConfigurationPart {
|
||||
|
||||
-
|
||||
+ public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 9416ce600d46fad167befe8d42f9a1a7d891a37f..2836447cf43e145d1fc1d24f6d054be49e9a14d9 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -87,7 +87,7 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public Misc misc;
|
||||
public class Misc extends ConfigurationPart {
|
||||
|
||||
-
|
||||
+ public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 12:16:14 +0900
|
||||
Subject: [PATCH] Add option to disable moved to quickly check for specific
|
||||
players
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9ae16e24013ea5664d4ea6d52ed7dd188404890f..91f161d27a45174b6f3c31440eea46ff81185203 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1695,7 +1695,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
+ // Plazma start - Add option to bypass moved to quickly check
|
||||
private boolean shouldCheckPlayerMovement(boolean elytra) {
|
||||
+ return (!this.player.getBukkitEntity().hasPermission("plazma.bypass-moved-to-quickly-check") || !(org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.checkSpectatorMovedToQuickly && this.player.isSpectator())) && shouldCheckPlayerMovement0(elytra);
|
||||
+ }
|
||||
+
|
||||
+ private boolean shouldCheckPlayerMovement0(boolean elytra) {
|
||||
+ // Plazma end - Add option to bypass moved to quickly check
|
||||
if (this.isSingleplayerOwner()) {
|
||||
return false;
|
||||
} else if (this.player.isChangingDimension()) {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 11d386d3e134b1994302c4e026b6a11c46336522..93d746b0e7f263b36a66864834445cb41e5e2cee 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -37,6 +37,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Player player;
|
||||
public class Player extends ConfigurationPart {
|
||||
|
||||
+ public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 20:38:21 +0900
|
||||
Subject: [PATCH] Entity Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 2836447cf43e145d1fc1d24f6d054be49e9a14d9..f560db0cd544c96264ebad8af3ed3dd8379bab1b 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -90,4 +90,21 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
+
|
||||
+ public Entity entity;
|
||||
+ public class Entity extends ConfigurationPart {
|
||||
+
|
||||
+ public Monster monster;
|
||||
+ public class Monster extends ConfigurationPart {
|
||||
+
|
||||
+ public Phantom phantom;
|
||||
+ public class Phantom extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
}
|
||||
63
patches/server/0021-Configurable-cave-lava-sea-level.patch
Normal file
63
patches/server/0021-Configurable-cave-lava-sea-level.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Tue, 7 Nov 2023 15:32:24 +0900
|
||||
Subject: [PATCH] Configurable cave lava sea level
|
||||
|
||||
This patch also fix MC-237017.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
index 3f39d6c786d9dfdd9ad591e08ff05fcbb41a1df6..0346fd4ab7095d66c0eef5a440afbc7a8ba52466 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -71,14 +71,14 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
|
||||
}
|
||||
|
||||
private static Aquifer.FluidPicker createFluidPicker(NoiseGeneratorSettings settings) {
|
||||
- Aquifer.FluidStatus aquifer_b = new Aquifer.FluidStatus(-54, Blocks.LAVA.defaultBlockState());
|
||||
- int i = settings.seaLevel();
|
||||
- Aquifer.FluidStatus aquifer_b1 = new Aquifer.FluidStatus(i, settings.defaultFluid());
|
||||
- Aquifer.FluidStatus aquifer_b2 = new Aquifer.FluidStatus(DimensionType.MIN_Y * 2, Blocks.AIR.defaultBlockState());
|
||||
-
|
||||
- return (j, k, l) -> {
|
||||
- return k < Math.min(-54, i) ? aquifer_b : aquifer_b1;
|
||||
- };
|
||||
+ // Plazma start - Configurable default lava sea level
|
||||
+ int i = org.plazmamc.plazma.configurations.GlobalConfiguration.get().worldgen.lavaSea.startLevel;
|
||||
+ int j = settings.seaLevel();
|
||||
+ Aquifer.FluidStatus aquifer1 = new Aquifer.FluidStatus(i, org.plazmamc.plazma.configurations.GlobalConfiguration.get().worldgen.lavaSea.seaBlock());
|
||||
+ Aquifer.FluidStatus aquifer2 = new Aquifer.FluidStatus(j, settings.defaultFluid());
|
||||
+
|
||||
+ return (x, y, z) -> y < Math.min(i, j) ? aquifer1 : aquifer2;
|
||||
+ // Plazma end - Configurable default lava sea level
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 93d746b0e7f263b36a66864834445cb41e5e2cee..0b59a3a36c86948877cb8cb875dc114e9f9d284a 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -45,6 +45,24 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public WorldGeneration worldgen;
|
||||
public class WorldGeneration extends ConfigurationPart {
|
||||
|
||||
+ public LavaSea lavaSea;
|
||||
+ public class LavaSea extends ConfigurationPart {
|
||||
+
|
||||
+ public int startLevel = -54;
|
||||
+ String seaBlock = "default";
|
||||
+
|
||||
+ public net.minecraft.world.level.block.state.BlockState seaBlock() {
|
||||
+ if (this.seaBlock.equalsIgnoreCase("default")) return net.minecraft.world.level.block.Blocks.LAVA.defaultBlockState();
|
||||
+ return net.minecraft.core.registries.BuiltInRegistries.BLOCK
|
||||
+ .getOptional(net.minecraft.resources.ResourceLocation.tryParse(this.seaBlock))
|
||||
+ .orElseGet(() -> {
|
||||
+ PlazmaConfigurations.LOGGER.warn("Invalid custom sea level block: {}, defaulting to lava", this.seaBlock);
|
||||
+ return net.minecraft.world.level.block.Blocks.LAVA;
|
||||
+ })
|
||||
+ .defaultBlockState();
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 20:42:23 +0900
|
||||
Subject: [PATCH] Various Optimizations
|
||||
|
||||
[ORIGINAL PATCHES]
|
||||
0007 - Avoid double I/O operation on load player file (Akarin)
|
||||
0008 - Don't trigger Lootable Refresh for non player interaction
|
||||
(Akarin)
|
||||
0011 - Swaps the predicate order of collision (Akarin)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3c10c719f6172161a2dcc6592a0a1492e9b3d7c1..d64f188257c135e2a4af07e28ff8f912c80eac03 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1991,8 +1991,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
+ if (entity.noPhysics && this.noPhysics) return; // Plazma
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
- if (!entity.noPhysics && !this.noPhysics) {
|
||||
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
@@ -2021,7 +2022,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
|
||||
- }
|
||||
+ //} // Plazma
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index 6d62cc8fb347ccafd51df05896e616995990f005..c26e4795afd0bd450d304f4528d0b8e4cfa761ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -70,6 +70,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
}
|
||||
|
||||
public void unpackLootTable(@Nullable Player player) {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.doNotTriggerLootTableRefreshForNonPlayerInteraction && player == null) return; // Plazma
|
||||
if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper
|
||||
LootTable lootTable = this.level.getServer().getLootTables().get(this.lootTable);
|
||||
if (player instanceof ServerPlayer) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index f55c50f6637a4f930b15565d6ac82bb4f27b9059..9c4e65a67bda331625a0891be10495eaae5f3f5e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -73,6 +73,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
|
||||
if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper
|
||||
BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21));
|
||||
+ if (world.plazmaLevelConfiguration().entity.monster.phantom.doNotLoadChunksToSpawn && world.hasChunkAt(blockposition1)) continue; // Plazma
|
||||
BlockState iblockdata = world.getBlockState(blockposition1);
|
||||
FluidState fluid = world.getFluidState(blockposition1);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 36af81f0957d17e170d229059c66f4eb4539dfeb..039c952f0c157cba6e79fa9b976958bd1763a922 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -56,7 +56,8 @@ public class PlayerDataStorage {
|
||||
File file = new File(this.playerDir, player.getStringUUID() + ".dat");
|
||||
// Spigot Start
|
||||
boolean usingWrongFile = false;
|
||||
- if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
||||
+ boolean normalFile = file.exists() && file.isFile(); // Plazma - Avoid double I/O operation
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && !normalFile ) // Paper - Check online mode first // Plazma - Avoid double I/O operation
|
||||
{
|
||||
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||||
if ( file.exists() )
|
||||
@@ -67,7 +68,7 @@ public class PlayerDataStorage {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
- if (file.exists() && file.isFile()) {
|
||||
+ if (normalFile) { // Plazma - Avoid double I/O operation
|
||||
nbttagcompound = NbtIo.readCompressed(file);
|
||||
}
|
||||
// Spigot Start
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 66436d4eb66b5a71f18b7db359ab1d63bbac74c0..87a85fb1cd9a19541df04a5d1c457d86cf7f68eb 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -41,6 +41,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public class Misc extends ConfigurationPart {
|
||||
|
||||
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
|
||||
+ public boolean doNotTriggerLootTableRefreshForNonPlayerInteraction = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index f560db0cd544c96264ebad8af3ed3dd8379bab1b..80ee8293d73ecdb1a942ca88f1aa00813d600849 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -100,7 +100,7 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public Phantom phantom;
|
||||
public class Phantom extends ConfigurationPart {
|
||||
|
||||
-
|
||||
+ public boolean doNotLoadChunksToSpawn = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 20:46:40 +0900
|
||||
Subject: [PATCH] Add configuration to disable moved to quickly check for
|
||||
spectators
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ae3c1bd67c144fe971d4df6df2ca171b431b6fc5..dee076d1e6e30f108a79565546182b4751737baa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1534,7 +1534,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (!this.player.isChangingDimension() && (!this.player.getLevel().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
||||
|
||||
- if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
+ if (!(this.player.getLevel().plazmaLevelConfiguration().misc.checkSpectatorMovedToQuickly && this.player.isSpectator()) && d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // Plazma
|
||||
// CraftBukkit end
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d7, d8, d9});
|
||||
this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot());
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
index 80ee8293d73ecdb1a942ca88f1aa00813d600849..e6c22ab535ab8fecaadbf06d4982440fd5863f17 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||
@@ -88,6 +88,7 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||
public class Misc extends ConfigurationPart {
|
||||
|
||||
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
|
||||
+ public boolean checkSpectatorMovedToQuickly = DO_OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
36
patches/server/0022-Configurable-entity-sensor-tick.patch
Normal file
36
patches/server/0022-Configurable-entity-sensor-tick.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 Nov 2023 11:36:08 +0900
|
||||
Subject: [PATCH] Configurable entity sensor tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 7ca12a1128661ea36e2e33cda204c7d2df55a21c..331a75fee26e3fe2532e8661db282a0c207ddf9b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -951,10 +951,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("sensing");
|
||||
- this.sensing.tick();
|
||||
+ //this.sensing.tick(); // Plazma - moved down
|
||||
gameprofilerfiller.pop();
|
||||
int i = this.tickCount + this.getId();
|
||||
|
||||
+ if (i % this.level().plazmaConfig().entity.sensorTick == 0) this.sensing.tick(); // Plazma - Configurable entity sensor tick
|
||||
if (i % 2 != 0 && this.tickCount > 1) {
|
||||
gameprofilerfiller.push("targetSelector");
|
||||
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index a976e2b960a5f3b7ecf6e42afcb1dd3bd140b8bd..9e408d6c1826d36a935b3e382e8eb0283f3d1580 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -28,6 +28,8 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
public Entity entity;
|
||||
public class Entity extends ConfigurationPart {
|
||||
|
||||
+ public int sensorTick = 1;
|
||||
+
|
||||
public Phantom phantom;
|
||||
public class Phantom extends ConfigurationPart {
|
||||
|
||||
@@ -1,471 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 25 Mar 2023 21:50:25 +0900
|
||||
Subject: [PATCH] Apply faster random
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
|
||||
index e5ea9f27a1936ed9e329e74317c91c5df89b9fbd..7e7a4d872983cd2efdc575bc33353f94d73cc641 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
|
||||
@@ -13,7 +13,7 @@ import java.util.UUID;
|
||||
|
||||
public class PaperLootableInventoryData {
|
||||
|
||||
- private static final Random RANDOM = new Random();
|
||||
+ private static final Random RANDOM = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
|
||||
|
||||
private long lastFill = -1;
|
||||
private long nextRefill = -1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index abf904a1d0dc7a5943cdba540c2b76eb0577954d..62507bb72288a01f15068aaaee5ae40f0655112c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -694,7 +694,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
|
||||
// CraftBukkit start
|
||||
if (world.generator != null) {
|
||||
- Random rand = new Random(world.getSeed());
|
||||
+ Random rand = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); rand.setSeed(world.getSeed()); // Plazma
|
||||
org.bukkit.Location spawn = world.generator.getFixedSpawnLocation(world.getWorld(), rand);
|
||||
|
||||
if (spawn != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c6a3b59c65466f9f2b16cefe0059a6e5dd84044c..a3499de4efb45f598b3fae796618531164e0b209 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -226,7 +226,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
- private static final Random rand = new Random();
|
||||
+ private static final Random rand = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
|
||||
|
||||
public CraftWorld(ServerLevel world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {
|
||||
this.world = world;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index d1c7ab67cba881d96b7a5e9220130d86d0514304..6018c5332410a5a0db29f35c0b4cb628df07f596 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -15,7 +15,7 @@ import org.bukkit.inventory.meta.FireworkMeta;
|
||||
|
||||
public class CraftFirework extends CraftProjectile implements Firework {
|
||||
|
||||
- private final Random random = new Random();
|
||||
+ private final Random random = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
|
||||
//private CraftItemStack item; // Paper - Remove usage, not accurate representation of current item.
|
||||
|
||||
public CraftFirework(CraftServer server, FireworkRocketEntity entity) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
index a9673a804d597599c35c83f4f245510c83005328..202ac2b0d96b870ce853959da89e82a4949ca585 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
@@ -48,7 +48,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
private final net.minecraft.world.level.chunk.ChunkGenerator delegate;
|
||||
private final ChunkGenerator generator;
|
||||
private final ServerLevel world;
|
||||
- private final Random random = new Random();
|
||||
+ private final Random random = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
|
||||
private boolean newApi;
|
||||
private boolean implementBaseHeight = true;
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Random.java b/src/main/java/org/plazmamc/plazma/Random.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e72e96be3938bdcc1ae1aa94f7465f644e1b3e16
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Random.java
|
||||
@@ -0,0 +1,394 @@
|
||||
+package org.plazmamc.plazma;
|
||||
+
|
||||
+/**
|
||||
+ + This is a faster implementation of java.util.Random
|
||||
+ + Code from <a href="https://gist.github.com/Xyene/4637619">...</a> by Xyene
|
||||
+ + Licensed unser GNU LGPL v3.0
|
||||
+ + <p>
|
||||
+ * A random number generator based on the simple and fast xor-shift pseudo
|
||||
+ * random number generator (RNG) specified in:
|
||||
+ * Marsaglia, George. (2003). Xorshift RNGs.
|
||||
+ * <a href="http://www.jstatsoft.org/v08/i14/xorshift.pdf">...</a>
|
||||
+ * Translated from:
|
||||
+ * <a href="http://www.codeproject.com/Articles/9187/A-fast-equivalent-for-System-Random">...</a>.
|
||||
+ */
|
||||
+@SuppressWarnings("SuspiciousNameCombination")
|
||||
+public class Random extends java.util.Random {
|
||||
+ final double REAL_UNIT_INT = 1.0 / (0x7FFFFFFFL);
|
||||
+ final double REAL_UNIT_UINT = 1.0 / (0xFFFFFFFFL);
|
||||
+ final long Y = 842502087L, Z = 3579807591L, W = 273326509L;
|
||||
+ long x, y, z, w;
|
||||
+
|
||||
+ public Random() {
|
||||
+ seed((int) System.currentTimeMillis());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSeed(long seed) {
|
||||
+ seed((int) seed);
|
||||
+ }
|
||||
+
|
||||
+ public void seed(int seed) {
|
||||
+ // The only stipulation stated for the xorshift RNG is that at least one of
|
||||
+ // the seeds x,y,z,w is non-zero. We fulfill that requirement by only allowing
|
||||
+ // resetting of the x seed
|
||||
+ x = seed;
|
||||
+ y = Y;
|
||||
+ z = Z;
|
||||
+ w = W;
|
||||
+ }
|
||||
+
|
||||
+ long boolBuffer;
|
||||
+ int boolBufferBits = 0;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean nextBoolean() {
|
||||
+ if (boolBufferBits == 0) {
|
||||
+ boolBuffer = nextUInt();
|
||||
+ boolBufferBits = 32;
|
||||
+ }
|
||||
+ boolBuffer >>= 1;
|
||||
+ boolean bit = (boolBuffer & 1) == 0;
|
||||
+ --boolBufferBits;
|
||||
+ return bit;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void nextBytes(byte[] buffer) {
|
||||
+ // Fill up the bulk of the buffer in chunks of 4 bytes at a time.
|
||||
+ long x = this.x, y = this.y, z = this.z, w = this.w;
|
||||
+ int i = 0;
|
||||
+ long t;
|
||||
+ for (int bound = buffer.length - 3; i < bound; ) {
|
||||
+ // Generate 4 bytes.
|
||||
+ // Increased performance is achieved by generating 4 random bytes per loop.
|
||||
+ // Also note that no mask needs to be applied to zero out the higher order bytes before
|
||||
+ // casting because the cast ignores thos bytes. Thanks to Stefan Trosch黷z for pointing this out.
|
||||
+ t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
|
||||
+
|
||||
+ buffer[i++] = (byte) w;
|
||||
+ buffer[i++] = (byte) (w >> 8);
|
||||
+ buffer[i++] = (byte) (w >> 16);
|
||||
+ buffer[i++] = (byte) (w >> 24);
|
||||
+ }
|
||||
+
|
||||
+ // Fill up any remaining bytes in the buffer.
|
||||
+ if (i < buffer.length) {
|
||||
+ // Generate 4 bytes.
|
||||
+ t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
|
||||
+
|
||||
+ buffer[i++] = (byte) w;
|
||||
+ if (i < buffer.length) {
|
||||
+ buffer[i++] = (byte) (w >> 8);
|
||||
+ if (i < buffer.length) {
|
||||
+ buffer[i++] = (byte) (w >> 16);
|
||||
+ if (i < buffer.length) {
|
||||
+ buffer[i] = (byte) (w >> 24);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ this.x = x;
|
||||
+ this.y = y;
|
||||
+ this.z = z;
|
||||
+ this.w = w;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public double nextDouble() {
|
||||
+ long t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+
|
||||
+ // Here we can gain a 2x speed improvement by generating a value that can be cast to
|
||||
+ // an int instead of the more easily available uint. If we then explicitly cast to an
|
||||
+ // int the compiler will then cast the int to a double to perform the multiplication,
|
||||
+ // this final cast is a lot faster than casting from a uint to a double. The extra cast
|
||||
+ // to an int is very fast (the allocated bits remain the same) and so the overall effect
|
||||
+ // of the extra cast is a significant performance improvement.
|
||||
+ //
|
||||
+ // Also note that the loss of one bit of precision is equivalent to what occurs within
|
||||
+ // System.Random.
|
||||
+ return (REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))));
|
||||
+ }
|
||||
+
|
||||
+ public double random() {
|
||||
+ return nextDouble();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public float nextFloat() {
|
||||
+ return (float) nextDouble();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int nextInt() {
|
||||
+ long t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+ return (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int nextInt(int upperBound) {
|
||||
+ if (upperBound < 0)
|
||||
+ throw new IllegalArgumentException("upperBound must be >=0");
|
||||
+
|
||||
+ long t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+
|
||||
+ return (int) ((REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * upperBound);
|
||||
+ }
|
||||
+
|
||||
+ public int nextInt(int lowerBound, int upperBound) {
|
||||
+ if (lowerBound > upperBound)
|
||||
+ throw new IllegalArgumentException("upperBound must be >=lowerBound");
|
||||
+
|
||||
+ long t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+
|
||||
+ // The explicit int cast before the first multiplication gives better performance.
|
||||
+ // See comments in NextDouble.
|
||||
+ int range = upperBound - lowerBound;
|
||||
+ if (range < 0) {
|
||||
+ // If range is <0 then an overflow has occured and must resort to using long integer arithmetic instead (slower).
|
||||
+ // We also must use all 32 bits of precision, instead of the normal 31, which again is slower.
|
||||
+ return lowerBound + (int) ((REAL_UNIT_UINT * (double) (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))) * (double) ((long) upperBound - (long) lowerBound));
|
||||
+ }
|
||||
+ // 31 bits of precision will suffice if range<=int.MaxValue. This allows us to cast to an int and gain
|
||||
+ // a little more performance.
|
||||
+ return lowerBound + (int) ((REAL_UNIT_INT * (double) (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * (double) range);
|
||||
+ }
|
||||
+
|
||||
+ public long nextUInt() {
|
||||
+ long t = (x ^ (x << 11));
|
||||
+ x = y;
|
||||
+ y = z;
|
||||
+ z = w;
|
||||
+ return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))) & (0xFFFFFFFFL);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public long nextLong() {
|
||||
+ return nextUInt() << 32 + nextUInt();
|
||||
+ }
|
||||
+
|
||||
+ double gaussNext;
|
||||
+ boolean hasGaussNext;
|
||||
+ final double TWOPI = Math.PI * 2;
|
||||
+
|
||||
+ /**
|
||||
+ * Get a random number in the range [min, max) or [min, max] depending on rounding.
|
||||
+ *
|
||||
+ * @param min Low bound
|
||||
+ * @param max High bound
|
||||
+ * @return A uniformly distributed double
|
||||
+ */
|
||||
+ public double uniform(double min, double max) {
|
||||
+ return min + (max - min) * nextDouble();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Triangular distribution.
|
||||
+ * <p/>
|
||||
+ * Continuous distribution bounded by given lower and upper limits,
|
||||
+ * and having a given mode value in-between.
|
||||
+ * http://en.wikipedia.org/wiki/Triangular_distribution
|
||||
+ *
|
||||
+ * @param low Low bound
|
||||
+ * @param high High bound
|
||||
+ * @param mode Mode
|
||||
+ * @return A number from the triangular distribution specified
|
||||
+ */
|
||||
+ public double triangular(int low, int high, int mode) {
|
||||
+ double u = nextDouble();
|
||||
+ double c = (mode - low) / (high - low);
|
||||
+ if (u > c) {
|
||||
+ u = 1.0 - u;
|
||||
+ c = 1.0 - c;
|
||||
+ int k = low;
|
||||
+ low = high;
|
||||
+ high = k;
|
||||
+ }
|
||||
+ return low + (high - low) * Math.sqrt(u * c);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gaussian distribution, mean is 0 and standard deviation is 1.
|
||||
+ * <p/>
|
||||
+ * mu is the mean, and sigma is the standard deviation.
|
||||
+ *
|
||||
+ * @return A double in Gaussian distribution
|
||||
+ */
|
||||
+ public double gauss() {
|
||||
+ return nextGaussian();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gaussian distribution, with user-specified mean and standard deviation.
|
||||
+ * <p/>
|
||||
+ * mu is the mean, and sigma is the standard deviation.
|
||||
+ *
|
||||
+ * @return A double in Gaussian distribution
|
||||
+ */
|
||||
+ public double gauss(double mu, double sigma) {
|
||||
+ return mu + sigma * nextGaussian();
|
||||
+ }
|
||||
+
|
||||
+ public double gaussUnsigned(double mu, double sigma) {
|
||||
+ double out = gauss(mu, sigma);
|
||||
+ return out > 1 ? out : 1;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Log normal distribution.
|
||||
+ * <p/>
|
||||
+ * If you take the natural logarithm of this distribution, you'll get a
|
||||
+ * normal distribution with mean mu and standard deviation sigma.
|
||||
+ * mu can have any value, and sigma must be greater than zero.
|
||||
+ *
|
||||
+ * @param mu Mean
|
||||
+ * @param sigma Standard deviation
|
||||
+ * @return A number from the log normal distribution specified
|
||||
+ */
|
||||
+ public double logNormal(double mu, double sigma) {
|
||||
+ return Math.exp(gauss(mu, sigma));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Exponential distribution.
|
||||
+ * <p/>
|
||||
+ * lambda is 1.0 divided by the desired mean. It should be
|
||||
+ * nonzero. Returned values range from 0 to positive infinity
|
||||
+ * if lambda is positive, and from negative infinity to 0
|
||||
+ * if lambda is negative.
|
||||
+ *
|
||||
+ * @param lambda A non-zero value
|
||||
+ */
|
||||
+ public double exponential(double lambda) {
|
||||
+ return -Math.log(1.0 - random()) / lambda;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Circular data distribution.
|
||||
+ * <p/>
|
||||
+ * If kappa is equal to zero, this distribution reduces
|
||||
+ * to a uniform random angle over the range 0 to 2*pi.
|
||||
+ *
|
||||
+ * @param mu the mean angle, expressed in radians between 0 and 2*pi.
|
||||
+ * @param kappa the concentration parameter, which must be greater than or
|
||||
+ * equal to zero.
|
||||
+ * @return A number from the circular data distribution specified
|
||||
+ */
|
||||
+ public double circularData(double mu, double kappa) {
|
||||
+ if (kappa <= 1e-6)
|
||||
+ return TWOPI * nextDouble();
|
||||
+
|
||||
+ double a = 1.0 + Math.sqrt(1.0 + 4.0 * kappa * kappa);
|
||||
+ double b = (a - Math.sqrt(2.0 * a)) / (2.0 * kappa);
|
||||
+ double r = (1.0 + b * b) / (2.0 * b);
|
||||
+ double u1, u2, u3, f, c, z, theta = 0;
|
||||
+
|
||||
+ while (true) {
|
||||
+ u1 = nextDouble();
|
||||
+
|
||||
+ z = Math.cos(Math.PI * u1);
|
||||
+ f = (1.0 + r * z) / (r + z);
|
||||
+ c = kappa * (r - f);
|
||||
+
|
||||
+ u2 = nextDouble();
|
||||
+
|
||||
+ if (u2 < c * (2.0 - c) || u2 <= c * Math.exp(1.0 - c))
|
||||
+ break;
|
||||
+
|
||||
+ u3 = nextDouble();
|
||||
+ if (u3 > 0.5)
|
||||
+ theta = (mu % TWOPI) + Math.acos(f);
|
||||
+ else
|
||||
+ theta = (mu % TWOPI) - Math.acos(f);
|
||||
+ }
|
||||
+ return theta;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ final double LOG4 = Math.log(4);
|
||||
+ final double SG_MAGICCONST = 1.0 + Math.log(4.5);
|
||||
+
|
||||
+ /**
|
||||
+ * Gamma distribution. Not the gamma function!
|
||||
+ * Conditions on the parameters are alpha > 0 and beta > 0.
|
||||
+ * <p/>
|
||||
+ * The probability distribution function is:
|
||||
+ * pdf(x) = (x ** (alpha - 1) * math.exp(-x / beta)) / (math.gamma(alpha) * beta ** alpha)
|
||||
+ *
|
||||
+ * @param alpha Alpha
|
||||
+ * @param beta Beta
|
||||
+ * @return A number from the gamma distribution specified
|
||||
+ */
|
||||
+ public double gamma(double alpha, double beta) {
|
||||
+ if (alpha <= 0.0 || beta <= 0.0)
|
||||
+ throw new IllegalArgumentException("alpha and beta must be > 0.0");
|
||||
+
|
||||
+ if (alpha > 1.0) {
|
||||
+ double ainv = Math.sqrt(2.0 * alpha - 1.0);
|
||||
+ double bbb = alpha - LOG4;
|
||||
+ double ccc = alpha + ainv;
|
||||
+ double u1, u2, v, x, z, r;
|
||||
+
|
||||
+ while (true) {
|
||||
+ u1 = random();
|
||||
+ if (!(1e-7 < u1 && u1 < .9999999))
|
||||
+ continue;
|
||||
+ u2 = 1.0 - random();
|
||||
+ v = Math.log(u1 / (1.0 - u1)) / ainv;
|
||||
+ x = alpha * Math.exp(v);
|
||||
+ z = u1 * u1 * u2;
|
||||
+ r = bbb + ccc * v - x;
|
||||
+ if (r + SG_MAGICCONST - 4.5 * z >= 0.0 || r >= Math.log(z))
|
||||
+ return x * beta;
|
||||
+ }
|
||||
+ } else if (alpha == 1.0) {
|
||||
+ // exponential(1)
|
||||
+ double u;
|
||||
+ u = random();
|
||||
+ while (u <= 1e-7)
|
||||
+ u = random();
|
||||
+ return -Math.log(u) * beta;
|
||||
+ } else {
|
||||
+ // alpha is between 0 and 1 (exclusive)
|
||||
+ // Uses ALGORITHM GS of Statistical Computing -Kennedy & Gentle
|
||||
+
|
||||
+ double u, b, p, x, u1;
|
||||
+ while (true) {
|
||||
+ u = random();
|
||||
+ b = (Math.E + alpha) / Math.E;
|
||||
+ p = b * u;
|
||||
+ if (p <= 1.0)
|
||||
+ x = Math.pow(p, (1.0 / alpha));
|
||||
+ else
|
||||
+ x = -Math.log((b - p) / alpha);
|
||||
+ u1 = random();
|
||||
+ if (p > 1.0) {
|
||||
+ if (u1 <= Math.pow(x, (alpha - 1.0)))
|
||||
+ break;
|
||||
+ } else if (u1 <= Math.exp(-x))
|
||||
+ break;
|
||||
+ }
|
||||
+ return x * beta;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user