Compare commits
120 Commits
old/1.20.2
...
ver/1.20.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -8,6 +8,8 @@ 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 = 80
|
||||
|
||||
[*.tiny]
|
||||
indent_style=tab
|
||||
@@ -30,10 +32,7 @@ ij_java_imports_layout = *,|,$*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
|
||||
[test-plugin/**/*.java]
|
||||
ij_java_use_fq_class_names = false
|
||||
|
||||
[Paper-Server/src/main/resources/data/**/*.json]
|
||||
[*-Server/src/main/resources/data/**/*.json]
|
||||
indent_size = 2
|
||||
|
||||
[paper-api-generator/generated/**/*.java]
|
||||
|
||||
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
|
||||
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@@ -4,8 +4,10 @@ on:
|
||||
push:
|
||||
branches: [ "ver/*", "dev/*", "feat/**/*" ]
|
||||
paths:
|
||||
- "*.kt"
|
||||
- "*.kts"
|
||||
- "*.toml"
|
||||
- "gradle-wrapper.*"
|
||||
- "*.gradle.*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
82
.github/workflows/release.yml
vendored
82
.github/workflows/release.yml
vendored
@@ -1,39 +1,55 @@
|
||||
name: Release Plazma (1.20.2)
|
||||
name: Release Plazma (1.20.6)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/*", "dev/*", "feat/**/*" ]
|
||||
paths:
|
||||
- "**.patch"
|
||||
- "patches/server/**.patch"
|
||||
- "patches/api/**.patch"
|
||||
- "gradle.properties"
|
||||
- "release.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
ORG_NAME: PlazmaMC
|
||||
MC_VERSION: 1.20.2
|
||||
MAIN_BRANCH: ver/1.20.1
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release Plazma
|
||||
strategy:
|
||||
matrix:
|
||||
base_jdk: [17]
|
||||
base_jdk: [21]
|
||||
os: [ubuntu-22.04]
|
||||
|
||||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Variables
|
||||
id: setup
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: echo "VERSION=${BRANCH##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout javadocs
|
||||
uses: actions/checkout@v4
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
continue-on-error: true
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
ref: ${{ env.VERSION }}
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
path: javadoc
|
||||
ref: main
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout javadocs
|
||||
uses: actions/checkout@v4
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
path: jdmain
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
@@ -49,6 +65,10 @@ jobs:
|
||||
- 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: Get Release Number
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
run: echo "BUILD_NUMBER=$(git ls-remote --tags origin | grep "build/${{ env.VERSION }}" | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
- name: Apply Patches
|
||||
run: ./gradlew applyPatches --stacktrace
|
||||
|
||||
@@ -62,40 +82,42 @@ jobs:
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Update Javadoc
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
continue-on-error: true
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
run: |
|
||||
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
||||
if [ ! -d "javadoc" ]; then
|
||||
SUBMODULE_ADD=true
|
||||
mkdir javadoc && cd javadoc
|
||||
git init && git branch -m ${{ env.VERSION }}
|
||||
git remote add origin https://github.com/PlazmaMC/Javadocs
|
||||
fi
|
||||
|
||||
cp -rf Plazma-API/build/docs/javadoc/* javadoc/
|
||||
cd javadoc
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push -f origin ${{ env.VERSION }}
|
||||
|
||||
cd ../jdmain
|
||||
if [ $SUBMODULE_ADD = true ]; then
|
||||
git submodule add -b ${{ env.VERSION }} https://github.com/PlazmaMC/Javadocs ${{ env.VERSION }}
|
||||
fi
|
||||
git submodule update
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push
|
||||
|
||||
- name: Publish Packages
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
run: |
|
||||
export GITHUB_USERNAME=${{ env.ORG_NAME }}
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
./gradlew publish --stacktrace
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: "!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
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
run: echo "RELEASE=$(git ls-remote --tags origin | grep "build/${{ env.MC_VERSION }}" | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
- name: Release Artifacts
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}"
|
||||
tag_name: build/${{ env.MC_VERSION }}/${{ env.RELEASE }}
|
||||
name: "Build #${{ env.BUILD_NUMBER }} for ${{ env.VERSION }}"
|
||||
tag_name: "build/${{ env.VERSION }}/${{ env.BUILD_NUMBER }}"
|
||||
target_commitish: ${{ github.ref_name }}
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
@@ -105,8 +127,8 @@ jobs:
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}"
|
||||
tag_name: build/${{ env.MC_VERSION }}/latest
|
||||
name: "Build #${{ env.BUILD_NUMBER }} for ${{ env.VERSION }}"
|
||||
tag_name: "build/${{ github.ref_name }}/latest"
|
||||
target_commitish: ${{ github.ref_name }}
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
@@ -116,8 +138,8 @@ jobs:
|
||||
if: startsWith(github.ref_name, 'dev/')
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
name: "Development Build for ${{ env.MC_VERSION }}"
|
||||
tag_name: build/${{ env.MC_VERSION }}/latest
|
||||
name: "Development Build for ${{ env.VERSION }}"
|
||||
tag_name: build/${{ env.VERSION }}/latest
|
||||
target_commitish: ${{ github.ref_name }}
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -23,6 +23,8 @@ nbactions.xml
|
||||
.gradle/
|
||||
build/
|
||||
*/build/
|
||||
run/
|
||||
javadoc/
|
||||
|
||||
# we use maven!
|
||||
build.xml
|
||||
@@ -47,12 +49,12 @@ manifest.mf
|
||||
# Linux temp files
|
||||
*~
|
||||
|
||||
# other stuff
|
||||
run/
|
||||
javadoc/
|
||||
|
||||
# Paperweight
|
||||
build-data/
|
||||
*-API
|
||||
*-MojangAPI
|
||||
*-Server
|
||||
*.jar
|
||||
paper-api-generator
|
||||
compare.txt
|
||||
*.patch
|
||||
!patches/**/*
|
||||
|
||||
36
README.md
36
README.md
@@ -4,35 +4,21 @@
|
||||
|
||||
### A Server Platform for Minecraft: Java Edition based on [Paper](https://github.com/PaperMC/Paper)
|
||||
|
||||
[](https://discord.gg/MmfC52K8A8)
|
||||
[](https://github.com/PlazmaMC/Plazma/actions/workflows/build.yml?query=branch:ver/1.20.2)
|
||||
[](https://github.com/PlazmaMC/Plazma/releases/build/1.20.2/latest)
|
||||
[](https://plazmamc.org/discord)
|
||||
[](LICENSE.md)
|
||||
[](https://plazmamc.org/downloads)
|
||||
|
||||
[](LICENSE)
|
||||
[](https://github.com/PlazmaMC/Plazma/releases)
|
||||
[](https://github.com/PlazmaMC/Plazma/stargazers)
|
||||
[](https://github.com/PPlazmaMC/Plazma/network/members)
|
||||
[](https://github.com/PlazmaMC/Plazma/watchers)
|
||||
[](https://plazmamc.org/downloads)
|
||||
[](https://github.com/PlazmaMC/Plazma/stargazers)
|
||||
[](https://github.com/PlazmaMC/Plazma/forks)
|
||||
[](https://github.com/PlazmaMC/Plazma/watchers)
|
||||
|
||||
### [⬇️ Downloads](https://plazmamc.org/downloads)
|
||||
|
||||
</div>
|
||||
|
||||
[main]: https://github.com/PlazmaMC/Plazma
|
||||
|
||||
> [!IMPORTANT]
|
||||
This is the branch for Plazma 1.20.2. If you want to know more about Plazma, please check the **[main branch][main]**.<br>
|
||||
이곳은 플라즈마의 1.20.2용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 브랜치][main]** 를 확인해주세요.
|
||||
|
||||
## ⬇️ Downloads
|
||||
> [!NOTE]
|
||||
If you don't know about Mojmap or Bundler, download **Reobf Paperclip**<br>
|
||||
Mojmap 또는 Bundler에 대해 잘 알지 못한다면, **Reobf Paperclip**을 사용하세요
|
||||
|
||||
<!--- LINKS --->
|
||||
[paperReobf]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.2/latest/plazma-paperclip-1.20.2-R0.1-SNAPSHOT-reobf.jar
|
||||
[paperMojmap]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.2/latest/plazma-paperclip-1.20.2-R0.1-SNAPSHOT-mojmap.jar
|
||||
[bundlerReobf]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.2/latest/plazma-bundler-1.20.2-R0.1-SNAPSHOT-reobf.jar
|
||||
[bundlerMojmap]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.2/latest/plazma-bundler-1.20.2-R0.1-SNAPSHOT-mojmap.jar
|
||||
|
||||
| **Reobf Paperclip (Default)** | Mojmap Paperclip | Reobf Bundler | Mojmap Bundler |
|
||||
|:-----------------------------:|:-----------------------:|:------------------------:|:-------------------------:|
|
||||
| [Download][paperReobf] | [Download][paperMojmap] | [Download][bundlerReobf] | [Download][bundlerMojmap] |
|
||||
This is the branch for Plazma 1.20.6. If you want to know more about Plazma, please check the **[main branch][main]**.<br>
|
||||
이곳은 플라즈마의 1.20.6용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 분기][main]** 를 확인해주세요.
|
||||
|
||||
@@ -12,4 +12,3 @@
|
||||
# mc_data chat_type/chat.json
|
||||
# mc_data dimension_type/overworld.json
|
||||
#
|
||||
|
||||
|
||||
142
build.gradle.kts
142
build.gradle.kts
@@ -1,6 +1,5 @@
|
||||
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
||||
|
||||
group = "org.plazmamc.plazma"
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
java
|
||||
@@ -11,16 +10,16 @@ plugins {
|
||||
alias(libs.plugins.paperweight)
|
||||
}
|
||||
|
||||
kotlin.jvmToolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
val jdkVersion = property("jdkVersion").toString().toInt()
|
||||
val providerRepo = property("providerRepo").toString()
|
||||
val brandName = property("brandName").toString()
|
||||
|
||||
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/") {
|
||||
content { onlyForConfigurations(configurations.paperclip.name) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,35 +33,28 @@ allprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(jdkVersion))
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "githubPackage"
|
||||
url = uri("https://maven.pkg.github.com/PlazmaMC/Plazma")
|
||||
publishing.repositories.maven("https://maven.pkg.github.com/$providerRepo") {
|
||||
name = "githubPackage"
|
||||
url = uri("https://maven.pkg.github.com/$providerRepo")
|
||||
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_USERNAME")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
|
||||
publications.register<MavenPublication>("gpr") {
|
||||
from(components["java"])
|
||||
}
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_USERNAME")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.compilerArgs.addAll(listOf("--add-modules=jdk.incubator.vector", "-Xmaxwarns", "1"))
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
options.release = jdkVersion
|
||||
options.compilerArgs.addAll(listOf(
|
||||
"--add-modules=jdk.incubator.vector",
|
||||
"-Xmaxwarns", "1"
|
||||
))
|
||||
}
|
||||
|
||||
withType<Javadoc> {
|
||||
@@ -74,58 +66,100 @@ subprojects {
|
||||
}
|
||||
|
||||
withType<Test> {
|
||||
minHeapSize = "2g"
|
||||
maxHeapSize = "2g"
|
||||
testLogging {
|
||||
showStackTraces = true
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events(TestLogEvent.STANDARD_OUT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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://papermc.io/repo/repository/maven-public/")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
paperweight {
|
||||
serverProject.set(project(":plazma-server"))
|
||||
serverProject = project(":${brandName.lowercase()}-server")
|
||||
|
||||
remapRepo.set("https://maven.fabricmc.net/")
|
||||
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||
remapRepo = "https://repo.papermc.io/repository/maven-public/"
|
||||
decompileRepo = "https://repo.papermc.io/repository/maven-public/"
|
||||
|
||||
usePaperUpstream(providers.gradleProperty("paperCommit")) {
|
||||
withPaperPatcher {
|
||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||
apiOutputDir.set(layout.projectDirectory.dir("Plazma-API"))
|
||||
apiPatchDir.set(projectDir.resolve("patches/api"))
|
||||
apiOutputDir.set(projectDir.resolve("$brandName-API"))
|
||||
|
||||
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
||||
serverOutputDir.set(layout.projectDirectory.dir("Plazma-Server"))
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
alwaysUpToDate {
|
||||
paperRepository.set("https://github.com/PaperMC/Paper")
|
||||
paperBranch.set("master")
|
||||
purpurRepository.set("https://github.com/PurpurMC/Purpur")
|
||||
purpurBranch.set("ver/1.20.4")
|
||||
pufferfishRepository.set("https://github.com/pufferfish-gg/Pufferfish")
|
||||
pufferfishBranch.set("ver/1.20")
|
||||
|
||||
paperRepo.set("https://github.com/PaperMC/Paper")
|
||||
paperRef.set("master")
|
||||
paperCommitName.set("paperCommit")
|
||||
|
||||
purpurRepo.set("https://github.com/PlazmaMC/Purpur")
|
||||
purpurRef.set("ver/1.20.6")
|
||||
purpurCommitName.set("purpurCommit")
|
||||
|
||||
pufferfishRepo.set("https://github.com/PlazmaMC/Pufferfish")
|
||||
pufferfishRef.set("ver/1.20")
|
||||
usePufferfish.set(true)
|
||||
|
||||
}
|
||||
|
||||
tasks {
|
||||
applyPatches {
|
||||
dependsOn("applyGeneratedApiPatches")
|
||||
}
|
||||
|
||||
rebuildPatches {
|
||||
dependsOn("rebuildGeneratedApiPatches")
|
||||
}
|
||||
|
||||
generateDevelopmentBundle {
|
||||
apiCoordinates.set("org.plazmamc.plazma:plazma-api")
|
||||
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
||||
apiCoordinates.set("${project.group}:${brandName.lowercase()}-api")
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
"https://maven.pkg.github.com/$providerRepo",
|
||||
"https://papermc.io/repo/repository/maven-public/"
|
||||
)
|
||||
}
|
||||
|
||||
clean {
|
||||
doLast {
|
||||
listOf(
|
||||
".gradle/caches",
|
||||
"$brandName-API",
|
||||
"$brandName-Server",
|
||||
"paper-api-generator",
|
||||
"run",
|
||||
|
||||
// remove dev environment files
|
||||
"0001-fixup.patch",
|
||||
"compare.txt"
|
||||
).forEach {
|
||||
projectDir.resolve(it).deleteRecursively()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.create<MavenPublication>("devBundle") {
|
||||
artifact(tasks.generateDevelopmentBundle) { artifactId = "dev-bundle" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ kotlin.jvmToolchain {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
shadow("io.papermc.paperweight:paperweight-patcher:1.5.11-SNAPSHOT")
|
||||
shadow("io.papermc.paperweight:paperweight-patcher:1.6.2-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
@@ -1,15 +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> {
|
||||
|
||||
override fun apply(target: Project) {
|
||||
target.extensions.create("alwaysUpToDate", AlwaysUpToDateExtension::class.java)
|
||||
target.tasks.register("updatePaper", PaperUpdateTask::class.java)
|
||||
target.tasks.register("updatePurpur", PurpurUpdateTask::class.java)
|
||||
@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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,13 +4,17 @@ import org.gradle.api.provider.Property
|
||||
|
||||
interface AlwaysUpToDateExtension {
|
||||
|
||||
val paperRepository: Property<String>
|
||||
val paperBranch: Property<String>
|
||||
val paperRepo: Property<String>
|
||||
val paperRef: Property<String>
|
||||
|
||||
val pufferfishRepository: Property<String>
|
||||
val pufferfishBranch: Property<String>
|
||||
val purpurRepo: Property<String>
|
||||
val purpurRef: Property<String>
|
||||
|
||||
val purpurRepository: Property<String>
|
||||
val purpurBranch: 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)
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||
import org.plazmamc.alwaysuptodate.utils.pathIO
|
||||
import java.io.File
|
||||
|
||||
abstract class PaperUpdateTask : Task() {
|
||||
|
||||
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
private val regex = "[a-z0-9]{40}\trefs/heads/${property.paperBranch}".toRegex()
|
||||
private val git = Git(project.pathIO)
|
||||
|
||||
override fun init() {
|
||||
outputs.upToDateWhen { check() }
|
||||
}
|
||||
|
||||
private fun check(): Boolean {
|
||||
val latestCommit = git("ls-remote", property.paperRepository.get()).readText()?.lines()
|
||||
?.filterNot { regex.matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Paper commit")
|
||||
val currentCommit = project.properties["paperCommit"] as String
|
||||
|
||||
return currentCommit == latestCommit
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
fun update() {
|
||||
if (check()) return
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun updatePaperCommit(repo: String, branch: String, properties: File) {
|
||||
val latestCommit = Git(properties.parentFile.toPath())("ls-remote", repo).readText()?.lines()
|
||||
?.filterNot { "[a-z0-9]{40}\trefs/heads/$branch".toRegex().matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Paper commit")
|
||||
|
||||
properties.writeText(properties.readText().replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit"))
|
||||
}
|
||||
@@ -1,24 +1,31 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.*
|
||||
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.kotlin.dsl.get
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||
import org.plazmamc.alwaysuptodate.utils.Gradle
|
||||
import org.plazmamc.alwaysuptodate.utils.addCommit
|
||||
import org.plazmamc.alwaysuptodate.utils.clone
|
||||
import org.plazmamc.alwaysuptodate.utils.pathIO
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.plazmamc.alwaysuptodate.utils.*
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.createDirectories
|
||||
import kotlin.io.path.exists
|
||||
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 property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
private val pufferfishCommit = """
|
||||
private val pufferfishHeader = """
|
||||
Pufferfish
|
||||
Copyright (C) 2024 Pufferfish Studios LLC
|
||||
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
|
||||
@@ -33,9 +40,10 @@ abstract class PurpurUpdateTask : Task() {
|
||||
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 purpurCommit = """
|
||||
private val pufferfishAuthor = "Kevin Raneri <kevin.raneri@gmail.com>"
|
||||
private val purpurHeader = """
|
||||
PurpurMC
|
||||
Copyright (C) 2024 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
|
||||
@@ -55,103 +63,192 @@ abstract class PurpurUpdateTask : Task() {
|
||||
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>"
|
||||
|
||||
override fun init() {
|
||||
outputs.upToDateWhen { check() }
|
||||
}
|
||||
@get:Internal
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
private fun check(): Boolean {
|
||||
val regex = "[a-z0-9]{40}\trefs/heads/${property.purpurBranch}".toRegex()
|
||||
val latestCommit = Git(project.pathIO)("ls-remote", property.purpurRepository.get()).readText()?.lines()
|
||||
?.filterNot { regex.matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Purpur commit")
|
||||
val currentCommit = project.properties["purpurCommit"] as String
|
||||
@get:OutputDirectory
|
||||
abstract val purpurDir: DirectoryProperty
|
||||
|
||||
return currentCommit == latestCommit
|
||||
@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<out Task>, 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 updatePaper 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 = ") {
|
||||
dependsOn(checkoutPufferfish)
|
||||
}
|
||||
|
||||
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() {
|
||||
if (check()) return
|
||||
Git.checkForGit()
|
||||
fun update() = with(project) {
|
||||
val purpur = purpurDir.path
|
||||
val pufferfish = if (extension { usePufferfish }) pufferfishDir.path else null
|
||||
|
||||
val dir = project.layout.cache.resolve("AlwaysUpToDate/UpdatePurpur")
|
||||
if (dir.exists()) dir.toFile().deleteRecursively()
|
||||
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"
|
||||
)
|
||||
|
||||
dir.createDirectories()
|
||||
|
||||
val git = Git(dir)
|
||||
val pufferfish = git.clone("Pufferfish", property.pufferfishRepository.get(), property.pufferfishBranch.get(), dir)
|
||||
val purpur = git.clone("Purpur", property.purpurRepository.get(), property.purpurBranch.get(), dir)
|
||||
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), pufferfish.resolve("gradle.properties").toFile())
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), purpur.resolve("gradle.properties").toFile())
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||
|
||||
val purpurGradle = Gradle(purpur)
|
||||
val purpurPatches = purpur.resolve("patches").also {
|
||||
val puffefishPatches = pufferfish.resolve("patches").also { that -> that.toFile().deleteRecursively() }
|
||||
copyPatch(it.resolve("server"), puffefishPatches.resolve("server"), "0001-Pufferfish-Server-Changes.patch")
|
||||
copyPatch(it.resolve("api"), puffefishPatches.resolve("api"), "0001-Pufferfish-API-Changes.patch")
|
||||
patches.resolve("api").copyPatch( resolve("api"),
|
||||
if (pufferfish == null) "" else "Pufferfish-API-Changes",
|
||||
"Purpur-API-Changes"
|
||||
)
|
||||
}
|
||||
|
||||
Gradle(pufferfish)("applyPatches").executeOut()
|
||||
purpurGradle("applyPatches").executeOut()
|
||||
|
||||
pufferfish.resolve("pufferfish-server").also {
|
||||
val dotGit = it.resolve(".git").toFile()
|
||||
dotGit.deleteRecursively()
|
||||
copySource(it)
|
||||
|
||||
val paper = pufferfish.resolve(".gradle/caches/paperweight/upstreams/paper/Paper-Server")
|
||||
copySource(paper)
|
||||
Git(paper)("add", ".").executeOut()
|
||||
Git(paper)("commit", "-m", "Vanilla Sources", "--author=Vanilla <auto@mated.null>").executeOut()
|
||||
paper.resolve(".git").toFile().copyRecursively(dotGit, overwrite = true)
|
||||
|
||||
Git(it).addCommit("Pufferfish Server Changes\n\n$pufferfishCommit", "--author=Kevin Raneri <kevin.raneri@gmail.com>")
|
||||
|
||||
val server = purpur.resolve("Purpur-Server")
|
||||
copySource(server)
|
||||
dotGit.copyRecursively(server.resolve(".git").toFile().also { that -> that.deleteRecursively() }, overwrite = true)
|
||||
Git(server).addCommit("Purpur Server Changes\n\n$purpurCommit", "--author=granny <contact@granny.dev>")
|
||||
}
|
||||
|
||||
with(purpur.resolve("Purpur-API")) {
|
||||
pufferfish.resolve("pufferfish-api/.git").toFile()
|
||||
.copyRecursively(resolve(".git").toFile().also { it.deleteRecursively() }, overwrite = true)
|
||||
Git(this).addCommit("Purpur API Changes\n\n$purpurCommit", "--author=granny <contact@granny.dev>")
|
||||
}
|
||||
|
||||
purpurGradle("rebuildPatches").executeOut()
|
||||
project.layout.projectDirectory.path.resolve("patches").also {
|
||||
with(purpurPatches.resolve("server")) {
|
||||
val target = it.resolve("server")
|
||||
copyPatch(this, target, "0001-Pufferfish-Server-Changes.patch")
|
||||
copyPatch(this, target, "0002-Purpur-Server-Changes.patch")
|
||||
}
|
||||
|
||||
with(purpurPatches.resolve("api")) {
|
||||
val target = it.resolve("api")
|
||||
copyPatch(this, target, "0001-Pufferfish-API-Changes.patch")
|
||||
copyPatch(this, target, "0002-Purpur-API-Changes.patch")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private 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("data").toFile().copyRecursively(target.resolve("resources/data").toFile(), overwrite = true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyPatch(from: Path, to: Path, name: String) {
|
||||
with(from.resolve(name)) {
|
||||
if (exists()) toFile().copyTo(to.resolve(name).toFile(), overwrite = true)
|
||||
else from.toFile().walk().filter { it.name.endsWith(name.substring(4)) }.first().copyTo(to.resolve(name).toFile(), overwrite = true)
|
||||
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.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"))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,8 +4,7 @@ import org.gradle.api.DefaultTask
|
||||
|
||||
abstract class Task : DefaultTask() {
|
||||
|
||||
protected open fun init() {
|
||||
}
|
||||
protected open fun init() {}
|
||||
|
||||
init {
|
||||
this.init()
|
||||
|
||||
@@ -1,18 +1,33 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.plazmamc.alwaysuptodate.tasks.Task
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.notExists
|
||||
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.clone(name: String, uri: String, branch: String, dir: Path): Path {
|
||||
val target = dir.resolve(name)
|
||||
this("clone", "--depth", "1", "--branch", branch, uri, target.toString()).executeSilently(silenceErr = true)
|
||||
if (target.notExists()) throw AlwaysUpToDateException("Failed to clone repository")
|
||||
return target
|
||||
}
|
||||
|
||||
fun Git.revParse(): String = this("rev-parse", "HEAD").captureOut(true).out.trim()
|
||||
|
||||
fun Git.addCommit(vararg args: String) {
|
||||
this("add", ".").executeSilently(silenceErr = true)
|
||||
this("commit", "-m", *args).executeSilently(silenceErr = true)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,17 @@ class Gradle(private val repo: Path) {
|
||||
}
|
||||
|
||||
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 }
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
@@ -1,7 +1,3 @@
|
||||
package org.plazmamc.alwaysuptodate.utils
|
||||
|
||||
import io.papermc.paperweight.util.path
|
||||
import org.gradle.api.Project
|
||||
import java.nio.file.Path
|
||||
|
||||
val Project.pathIO: Path get() = layout.projectDirectory.path
|
||||
fun <A, B, C> Pair<Pair<A, B>, C>.flatten() = Triple(first.first, first.second, second)
|
||||
|
||||
13
fxapi
13
fxapi
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupAPI
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-API
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
|
||||
cd ../
|
||||
13
fxsrv
13
fxsrv
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupServer
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-Server
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
|
||||
cd ../
|
||||
@@ -1,11 +1,29 @@
|
||||
version = 1.20.2-R0.1-SNAPSHOT
|
||||
mcVersion = 1.20.2
|
||||
|
||||
paperCommit = 931781c220b98dde0159c9a3c8dce06c3b2b1e13
|
||||
purpurCommit = c46cb7ef66675e00a48e20c40febed7ff914f35d
|
||||
pufferfishCommit = bc89152d4cd4bb0f9644da2fe10774df4cc25661
|
||||
|
||||
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.20.6-R0.1-SNAPSHOT
|
||||
mcVersion = 1.20.6
|
||||
jdkVersion = 21
|
||||
|
||||
paperRepo = https://github.com/PaperMC/Paper
|
||||
paperBranch = master
|
||||
purpurRepo = https://github.com/PlazmaMC/Purpur
|
||||
purpurBranch = ver/1.20.6
|
||||
pufferfishRepo = https://github.com/PlazmaMC/Pufferfish
|
||||
pufferfishBranch = ver/1.20
|
||||
usePufferfish = true
|
||||
|
||||
paperCommit = bd5867a96f792f0eb32c1d249bb4bbc1d8338d14
|
||||
purpurCommit = 0cbff64ea99f0878244431477d21d9faa14b768f
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[versions]
|
||||
shadow = "8.1.1"
|
||||
paperweight = "1.5.10"
|
||||
paperweight = "1.7.1"
|
||||
paperclip = "3.0.3"
|
||||
decompiler = "2.0.627.2"
|
||||
remapper = "0.3.0:fat"
|
||||
decompiler = "1.10.1"
|
||||
remapper = "0.10.1"
|
||||
|
||||
[libraries]
|
||||
remapper = { group = "net.fabricmc", name = "tiny-remapper", version.ref="remapper" }
|
||||
decompiler = { group = "net.minecraftforge", name = "forgeflower", version.ref = "decompiler" }
|
||||
decompiler = { group = "org.vineflower", name = "vineflower", version.ref = "decompiler" }
|
||||
paperclip = { group = "io.papermc", name = "paperclip", version.ref = "paperclip" }
|
||||
|
||||
[plugins]
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
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
|
||||
|
||||
|
||||
59
initDev
Normal file
59
initDev
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# To initialize your development environment,
|
||||
# run below command in your terminal:
|
||||
# source ./initDev
|
||||
|
||||
export PROJECT_DIR=$(pwd)
|
||||
|
||||
alias api="cd $PROJECT_DIR/*-API"
|
||||
alias srv="cd $PROJECT_DIR/*-Server"
|
||||
|
||||
alias ap="./gradlew --no-rebuild applyPatches"
|
||||
alias aap="./gradlew --no-rebuild applyAPIPatches"
|
||||
alias agp="./gradlew --no-rebuild applyGeneratedAPIPatches"
|
||||
alias asp="./gradlew --no-rebuild applyServerPatches"
|
||||
|
||||
alias rp="./gradlew --no-rebuild rebuildPatches"
|
||||
alias rap="./gradlew --no-rebuild rebuildAPIPatches"
|
||||
alias rgp="./gradlew --no-rebuild rebuildGeneratedAPIPatches"
|
||||
alias rsp="./gradlew --no-rebuild rebuildServerPatches"
|
||||
|
||||
alias lg="git log --oneline base..HEAD"
|
||||
alias rc="git rebase --autosquash -i base"
|
||||
alias rcc="git rebase --continue"
|
||||
|
||||
# generate Fixup patches for Server
|
||||
function fs() {
|
||||
cd ./*-Server || exit 1
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
mv 0001-fixup.patch ../
|
||||
|
||||
cd ../
|
||||
}
|
||||
|
||||
# generate Fixup patches for API
|
||||
function fa() {
|
||||
cd ./*-API || exit 1
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
mv 0001-fixup.patch ../
|
||||
|
||||
cd ../
|
||||
}
|
||||
|
||||
# ReApply Server Patches
|
||||
function rasp() {
|
||||
rm -rf ./*-Server
|
||||
./gradlew applyServerPatches
|
||||
}
|
||||
|
||||
# Commit Updated Upstream
|
||||
function cuu() {
|
||||
# shellcheck disable=SC2059
|
||||
printf "Updated Upstream ($1)$(/bin/cat compare.txt)" | git commit -F -
|
||||
}
|
||||
@@ -5,8 +5,9 @@ guava = "32.1.2-jre"
|
||||
sentry = "5.4.0"
|
||||
fastutil = "8.5.6"
|
||||
findbugs = "1.3.9"
|
||||
slf4j-api = "1.8.0-beta4"
|
||||
bungeechat = "1.20-R0.1-deprecated+build.14"
|
||||
slf4j-api = "2.0.9"
|
||||
brigadier = "1.2.9"
|
||||
bungeechat = "1.20-R0.2"
|
||||
json-simple = "1.1.1"
|
||||
annotations = "24.0.1"
|
||||
checkerqual = "3.21.0"
|
||||
@@ -18,6 +19,7 @@ guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||
sentry = { group = "io.sentry", name = "sentry", version.ref = "sentry" }
|
||||
fastutil = { group = "it.unimi.dsi", name = "fastutil", version.ref = "fastutil" }
|
||||
findbugs = { group = "com.google.code.findbugs", name = "jsr305", version.ref = "findbugs" }
|
||||
brigadier = { group = "com.mojang", name = "brigadier", version.ref = "brigadier" }
|
||||
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
|
||||
bungeechat = { group = "net.md-5", name = "bungeecord-chat", version.ref = "bungeechat" }
|
||||
jsonsimple = { group = "com.googlecode.json-simple", name = "json-simple", version.ref = "json-simple" }
|
||||
@@ -25,5 +27,5 @@ annotations = { group = "org.jetbrains", name = "annotations", version.ref = "an
|
||||
checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" }
|
||||
|
||||
[bundles]
|
||||
api = [ "guava", "gson", "bungeechat", "joml", "fastutil", "slf4j-api", "sentry" ]
|
||||
api = [ "guava", "gson", "joml", "fastutil", "slf4j-api", "sentry", "brigadier" ]
|
||||
annotations = [ "annotations", "checkerqual" ]
|
||||
|
||||
@@ -5,11 +5,11 @@ mockito = "5.5.0"
|
||||
jupiter = "5.10.0"
|
||||
hamcrest = "2.2"
|
||||
snakeyaml = "2.2"
|
||||
adventure = "4.14.0"
|
||||
adventure = "4.17.0"
|
||||
commons-lang2 = "2.6"
|
||||
commons-lang3 = "3.12.0"
|
||||
maven-provider = "3.8.5"
|
||||
maven-resolver = "1.7.3"
|
||||
maven-provider = "3.9.6"
|
||||
maven-resolver = "1.9.18"
|
||||
|
||||
[libraries]
|
||||
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
|
||||
@@ -40,6 +40,6 @@ adventure-serializer-legacy = { group = "net.kyori", name = "adventure-text-seri
|
||||
|
||||
[bundles]
|
||||
asm = [ "asm-head", "asm-commons" ]
|
||||
test = [ "jupiter", "hamcrest", "mockito" ]
|
||||
test = [ "jupiter", "hamcrest", "mockito", "asm-tree" ]
|
||||
maven = [ "maven-connector", "maven-transport" ]
|
||||
adventure = [ "adventure-api", "adventure-slf4j", "adventure-minimessage", "adventure-serializer-gson", "adventure-serializer-plain", "adventure-serializer-legacy" ]
|
||||
|
||||
@@ -1,24 +1,36 @@
|
||||
[versions]
|
||||
art = "2.0.3"
|
||||
tca = "1.3.0"
|
||||
upnp = "1.0"
|
||||
ansi = "1.0.3"
|
||||
jansi = "3.21.0"
|
||||
rhino = "1.7.14"
|
||||
mysql = "8.1.0"
|
||||
mysql = "8.2.0"
|
||||
flare = "34637f3f87"
|
||||
sqlite = "3.42.0.1"
|
||||
pioneer = "2.2.0"
|
||||
haproxy = "4.1.97.Final"
|
||||
rewriter = "0.0.1"
|
||||
srgutils = "1.0.9"
|
||||
velocity = "3.1.2-SNAPSHOT"
|
||||
disruptor = "3.4.4"
|
||||
simpleyaml = "1.8.4"
|
||||
classgraph = "4.8.47"
|
||||
mapping-io = "0.5.0"
|
||||
configurate = "4.2.0-SNAPSHOT"
|
||||
terminal-appender = "1.3.0"
|
||||
|
||||
[libraries]
|
||||
art = { group = "net.neoforged", name = "AutoRenamingTool", version.ref = "art" }
|
||||
tca = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="tca" }
|
||||
ansi = { group = "net.kyori", name = "ansi", version.ref = "ansi" }
|
||||
upnp = { group = "dev.omega24", name = "upnp4j", version.ref = "upnp" }
|
||||
mysql = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysql" }
|
||||
jansi = { group = "org.jline", name = "jline-terminal-jansi", version.ref = "jansi" }
|
||||
flare = { group = "com.github.technove", name = "flare", version.ref = "flare" }
|
||||
sqlite = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqlite" }
|
||||
pioneer = { group = "org.junit-pioneer", name = "junit-pioneer", version.ref = "pioneer" }
|
||||
haproxy = { group = "io.netty", name = "netty-codec-haproxy", version.ref = "haproxy" }
|
||||
srgutils = { group = "net.neoforged", name = "srgutils", version.ref = "srgutils" }
|
||||
velocity = { group = "com.velocitypowered", name = "velocity-native", version.ref = "velocity" }
|
||||
disruptor = { group = "com.lmax", name = "disruptor", version.ref = "disruptor" }
|
||||
mappingio = { group = "net.fabricmc", name = "mapping-io", version.ref = "mapping-io" }
|
||||
@@ -28,8 +40,12 @@ configurate = { group = "org.spongepowered", name = "configurate-yaml", version.
|
||||
|
||||
rhino-engine = { group = "org.mozilla", name = "rhino-engine", version.ref = "rhino" }
|
||||
rhino-runtime = { group = "org.mozilla", name = "rhino-runtime", version.ref = "rhino" }
|
||||
terminal-appender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="terminal-appender" }
|
||||
|
||||
rewriter = { group = "io.papermc", name = "reflection-rewriter", version.ref = "rewriter" }
|
||||
rewriter-runtime = { group = "io.papermc", name = "reflection-rewriter-runtime", version.ref = "rewriter" }
|
||||
rewriter-generator = { group = "io.papermc", name = "reflection-rewriter-proxy-generator", version.ref = "rewriter" }
|
||||
|
||||
[bundles]
|
||||
runtime = [ "sqlite", "mysql", "disruptor" ]
|
||||
implementation = [ "jansi", "terminal-appender", "ansi", "haproxy", "configurate", "mappingio", "rhino-engine", "rhino-runtime" ]
|
||||
implementation = [ "jansi", "tca", "ansi", "upnp", "haproxy", "configurate", "mappingio", "rhino-engine", "rhino-runtime", "srgutils", "art", "rewriter", "rewriter-runtime", "rewriter-generator", "flare" ]
|
||||
test = [ "classgraph", "pioneer" ]
|
||||
|
||||
14
mkapi
14
mkapi
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PatchAPI <Patch Name>
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-API
|
||||
|
||||
git add .
|
||||
git commit -m $1
|
||||
|
||||
cd ../
|
||||
|
||||
./gradlew rebuildAPIPatches
|
||||
14
mksrv
14
mksrv
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PatchServer <Patch Name>
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-Server
|
||||
|
||||
git add .
|
||||
git commit -m $1
|
||||
|
||||
cd ../
|
||||
|
||||
./gradlew rebuildServerPatches
|
||||
@@ -1,10 +1,10 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Date: Sun, 26 Nov 2023 23:32:01 +0000
|
||||
Date: Sun, 2 Jun 2024 23:04:51 +0000
|
||||
Subject: [PATCH] Pufferfish API Changes
|
||||
|
||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Copyright (C) 2023 Pufferfish Studios LLC
|
||||
Pufferfish
|
||||
Copyright (C) 2024 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
|
||||
@@ -20,18 +20,18 @@ 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 e827ee211e3c65dc68ac5867fd8476639df63645..b9c75a190dbd7a90ac5ef0fbc6e6fe34806acc4e 100644
|
||||
index fd39ed209b20c927054b8482c400beeeeab460a3..1336685fde70c4a88a1fb591cdfcd781a8f06d0b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -47,6 +47,7 @@ dependencies {
|
||||
@@ -52,6 +52,7 @@ dependencies {
|
||||
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.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
@@ -106,6 +107,13 @@ val generateApiVersioningFile by tasks.registering {
|
||||
implementation("org.ow2.asm:asm:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
@@ -130,6 +131,13 @@ val generateApiVersioningFile by tasks.registering {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,6 +388,24 @@ index 0000000000000000000000000000000000000000..ae2464920c9412ac90b819a540ee58be
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index 9df9d09aa477d4cd3c496ba0933c816df1ef0964..ad81341bdd1eb73554cd24f27ac5d655d89db791 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -17,6 +17,13 @@ public interface ServerBuildInfo {
|
||||
* The brand id for Paper.
|
||||
*/
|
||||
Key BRAND_PAPER_ID = Key.key("papermc", "paper");
|
||||
+
|
||||
+ // Pufferfish start
|
||||
+ /**
|
||||
+ * The brand id for Paper.
|
||||
+ */
|
||||
+ Key BRAND_PUFFERFISH_ID = Key.key("pufferfishgg", "pufferfish");
|
||||
+ // Pufferfish end
|
||||
|
||||
/**
|
||||
* Gets the {@code ServerBuildInfo}.
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index c80faa079eca1564847070f0338fc98024639829..e632d51d3487eb4807243b6705999ad124466bf5 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -426,10 +444,10 @@ index c80faa079eca1564847070f0338fc98024639829..e632d51d3487eb4807243b6705999ad1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index fc2dae69165776d08274e34a69962cc70445f411..899d67fa782fac639fe7fb096e05c551d75bd647 100644
|
||||
index 07a9c9e254188c251165ca84c8e961fccda01175..5dc64d8c9aeae612fd31af0673f3530a9e777dfc 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 {
|
||||
@@ -596,7 +596,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
// Paper start
|
||||
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
|
||||
@@ -439,7 +457,7 @@ index fc2dae69165776d08274e34a69962cc70445f411..899d67fa782fac639fe7fb096e05c551
|
||||
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 {
|
||||
@@ -666,9 +668,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
@@ -480,7 +498,7 @@ index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bac
|
||||
|
||||
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 f9b57b872780aa6b9b959494874b57c7a8ff0c53..90953bfc81168068a281be4d2d3942d5e7dd69ff 100644
|
||||
index 7e4f7cb2afbc145e532285c793573ad107bc3033..12449e18180d604e9cbbc744da74a8b222a18e1f 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -50,6 +50,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 26 Nov 2023 23:37:25 +0000
|
||||
From: granny <contact@granny.dev>
|
||||
Date: Sun, 2 Jun 2024 23:06:07 +0000
|
||||
Subject: [PATCH] Purpur API Changes
|
||||
|
||||
Original: PurpurMC
|
||||
Copyright (C) 2023 PurpurMC
|
||||
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
|
||||
@@ -25,10 +25,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b9c75a190dbd7a90ac5ef0fbc6e6fe34806acc4e..41d7b75e904b94073dfcd12b776a7759a963b66f 100644
|
||||
index 1336685fde70c4a88a1fb591cdfcd781a8f06d0b..7aa138f7123dcfb7d1d9ae9efcf2359522f5d2fd 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -126,6 +126,8 @@ tasks.jar {
|
||||
@@ -150,6 +150,8 @@ tasks.jar {
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
@@ -168,29 +168,6 @@ index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9
|
||||
return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS,
|
||||
new ArrayList<String>(TIMINGS_SUBCOMMANDS.size()));
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
index 0c4dbb9ef63fa8575b5546239443cb2bd91ba847..b347224c223569297ee67ac630a710fdf28748ea 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -198,6 +198,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<Mob> CLIMB_ON_TOP_OF_POWDER_SNOW = GoalKey.of(Mob.class, NamespacedKey.minecraft("climb_on_top_of_powder_snow"));
|
||||
GoalKey<Wolf> WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic"));
|
||||
|
||||
+ // 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
|
||||
+
|
||||
/**
|
||||
* @deprecated removed in 1.20.2
|
||||
*/
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
|
||||
index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48cc50fad5b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
|
||||
@@ -208,11 +185,42 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c
|
||||
class DummyVersionFetcher implements VersionFetcher {
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
index ab5fea0b03224bf249352ce340e94704ff713345..3441cdad70da1bd523c5933b1a914688718c2657 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
@@ -15,7 +15,7 @@ public class SIMDChecker {
|
||||
@Deprecated
|
||||
public static boolean canEnable(Logger logger) {
|
||||
try {
|
||||
- if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19) {
|
||||
+ if (SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21) {
|
||||
return false;
|
||||
} else {
|
||||
SIMDDetection.testRun = true;
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index ad81341bdd1eb73554cd24f27ac5d655d89db791..fe23268c418cccbd45caf2870f7931cfed978d28 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -25,6 +25,13 @@ public interface ServerBuildInfo {
|
||||
Key BRAND_PUFFERFISH_ID = Key.key("pufferfishgg", "pufferfish");
|
||||
// Pufferfish end
|
||||
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * The brand id for Purpur.
|
||||
+ */
|
||||
+ Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur");
|
||||
+ // Purpur end
|
||||
+
|
||||
/**
|
||||
* Gets the {@code ServerBuildInfo}.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 4863d9f21f0a0f11974be85360edc587ffd7eab3..8ea42a1f07df756bf504609d2bbff578f20bb808 100644
|
||||
index 9a219b255b63f10005fc68faacb771dd32f61ac2..83b979fbb8c0dd64f0a19feef654af2b165bd603 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2832,4 +2832,127 @@ public final class Bukkit {
|
||||
@@ -2913,4 +2913,127 @@ public final class Bukkit {
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@@ -431,12 +439,12 @@ index 918a045165cdcde264bc24082b7afebb407271de..687d11619379aead7f665d4a5f8f8bcc
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 7ca70b269e15e818e61a9329e2775789abb4bc73..aa9ca3e33903747a455ad0949387684ce4b917af 100644
|
||||
index 7509b61dfdc0a6675256970cb850b08f9e814580..c1986ca90c3adb81daca4f72b62cda65e5465bff 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -11054,4 +11054,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public boolean isEnabledByFeature(@NotNull World world) {
|
||||
return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
|
||||
@@ -5733,4 +5733,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
return Registry.BLOCK.get(material.key);
|
||||
}
|
||||
+
|
||||
+ // Purpur start
|
||||
@@ -476,13 +484,13 @@ index 7ca70b269e15e818e61a9329e2775789abb4bc73..aa9ca3e33903747a455ad0949387684c
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
index bce07d84cafca677bb6fad78c21b82097f06430c..4ef0fa4f1ef72bb784674671473c6a322acadecc 100644
|
||||
index 30298a629b39bd43ce14b414fc697b2dfcbea89c..ce00af9121de7a910aaea4e0685a06d4cf31b4e3 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -522,4 +522,114 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@@ -557,4 +557,106 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
*/
|
||||
@Nullable
|
||||
public Location getLastDeathLocation();
|
||||
public Location getLocation();
|
||||
+
|
||||
+ // Purpur start - OfflinePlayer API
|
||||
+ /**
|
||||
@@ -550,14 +558,6 @@ index bce07d84cafca677bb6fad78c21b82097f06430c..4ef0fa4f1ef72bb784674671473c6a32
|
||||
+ public float getWalkSpeed();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the entity's current position
|
||||
+ *
|
||||
+ * @return a new copy of Location containing the position of this offline player
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location getLocation();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleport implementation.
|
||||
+ *
|
||||
+ * @param destination
|
||||
@@ -595,10 +595,10 @@ index bce07d84cafca677bb6fad78c21b82097f06430c..4ef0fa4f1ef72bb784674671473c6a32
|
||||
+ // Purpur end - OfflinePlayer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index f1fa97d12f97baf97beb92ca0719cf3cf906b225..dd99f53e3d559685a4b3a454a9e607c310fc6aff 100644
|
||||
index 49d2547fcdaf779e284f513e58c1ac2ae3000bda..916db0d6096338c4f1b8707048eb38b50a2b027d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2190,6 +2190,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2257,6 +2257,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -617,7 +617,7 @@ index f1fa97d12f97baf97beb92ca0719cf3cf906b225..dd99f53e3d559685a4b3a454a9e607c3
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -2473,4 +2485,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2546,4 +2558,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
|
||||
// Paper end - Folia region threading API
|
||||
@@ -724,10 +724,10 @@ index f1fa97d12f97baf97beb92ca0719cf3cf906b225..dd99f53e3d559685a4b3a454a9e607c3
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 567a36a4887da8994c9170e2885aa8cc357efa0c..405d60bd2c99ba741d2614b16f4bda5da48a0387 100644
|
||||
index 97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e..83a5b68c785a88594e6e3824ed282844086f7f1a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4235,6 +4235,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4249,6 +4249,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public DragonBattle getEnderDragonBattle();
|
||||
|
||||
@@ -844,10 +844,10 @@ index 739911cda33b373f99df627a3a378b37d7d461aa..51e78c22cd021722b963fe31d1d9175d
|
||||
* Add an entity to the block.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71dfcb0e66d 100644
|
||||
index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..fdedac32544be6534288c8ba28abe7f5c4c56f3b 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -143,6 +143,19 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -152,6 +152,19 @@ public class SimpleCommandMap implements CommandMap {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71d
|
||||
// Paper start - Plugins do weird things to workaround normal registration
|
||||
if (target.timings == null) {
|
||||
target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
|
||||
@@ -150,10 +163,10 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -159,10 +172,10 @@ public class SimpleCommandMap implements CommandMap {
|
||||
// Paper end
|
||||
|
||||
try {
|
||||
@@ -882,7 +882,7 @@ index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71d
|
||||
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index fd5d9881abfd930bb883120f018f76dc78b62b14..d3dadad49df09e85c724c93e8cc88da2c985e9b4 100644
|
||||
index fd5d9881abfd930bb883120f018f76dc78b62b14..3d29c47ac0620af82d990faf5dfc266c6f0235f1 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -214,7 +214,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -904,7 +904,7 @@ index fd5d9881abfd930bb883120f018f76dc78b62b14..d3dadad49df09e85c724c93e8cc88da2
|
||||
+ // Purpur start
|
||||
+ int distance = getVersionFetcher().distance();
|
||||
+ final Component message = Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()),
|
||||
+ ChatColor.parseMM("<grey>Current: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
|
||||
+ ChatColor.parseMM("<grey>Current Purpur Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
|
||||
+ // Purpur end
|
||||
msg
|
||||
);
|
||||
@@ -977,10 +977,10 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c
|
||||
// Paper start
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 9e3cb75536ae260dc898ab9dafbc1d98398782bc..ed9627dff9a33524da546c46e1d1be71ae1d1e0c 100644
|
||||
index 725ef320f929d5e3d141c1ed3246d73a7d741f31..2d12c70b0baa50504619c8e37881a11a56d7df2c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -1063,4 +1063,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -1159,4 +1159,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@NotNull String getScoreboardEntryName();
|
||||
// Paper end - entity scoreboard name
|
||||
@@ -1062,7 +1062,7 @@ index 655e37cb3a09610a3f3df805d6dcad17d722da62..09fd716c8fc9ea34a1cbf87bcbe22df0
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
|
||||
index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a710da952 100644
|
||||
index bcc6ba95bd21c7972865838c636a03f50b6c1f1a..c3fcd8dd7dbb1e1a18e17c014c1e641149ea5960 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Item.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Item.java
|
||||
@@ -153,4 +153,62 @@ public interface Item extends Entity, io.papermc.paper.entity.Frictional { // Pa
|
||||
@@ -1129,30 +1129,16 @@ index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index a599ed2795ba1baf2cbb465d1c7145580c27e1ea..298acbfb93663e40e627f6a47d51fd87a1551feb 100644
|
||||
index b777e530122549455dcce6fac8d4a151c1c0af42..61a046584acf48693489ff551a0dd4c4b16af9ff 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1243,4 +1243,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1447,4 +1447,27 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setBodyYaw(float bodyYaw);
|
||||
// Paper end
|
||||
// Paper end - body yaw API
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * Gets the distance (in blocks) this entity can safely fall without taking damage
|
||||
+ *
|
||||
+ * @return Safe fall distance
|
||||
+ */
|
||||
+ float getSafeFallDistance();
|
||||
+
|
||||
+ /**
|
||||
+ * Set the distance (in blocks) this entity can safely fall without taking damage
|
||||
+ *
|
||||
+ * @param safeFallDistance Safe fall distance
|
||||
+ */
|
||||
+ void setSafeFallDistance(float safeFallDistance);
|
||||
+
|
||||
+ /**
|
||||
+ * Play item break animation for the item in specified equipment slot
|
||||
+ *
|
||||
+ * @param slot Equipment slot to play break animation for
|
||||
@@ -1200,10 +1186,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 47fcfa2a3358766dfda2efc9bbcf5b50e3f2f7c1..eea83040ff15ea7c9bf97a45f5557294b309b4c8 100644
|
||||
index 6c327a07bf8a6aa11a2d7dad12b2830acc539484..d057743b8f6a463434c1f76398c7a98614b19d47 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3366,4 +3366,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3806,4 +3806,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -1397,13 +1383,13 @@ index 14543c2238b45c526dd9aebea2aa5c22f5df54dc..5312daf33405704c74e2c9e109754285
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
index 84db38388bf7a58e66d6cd29620b4fe64b0a897e..82ebd99549ce9f9e6427a50cef424e9007735708 100644
|
||||
index 4b84c04675775e2a606630b00de8afe51665cebc..ccbaf40a3131f477b4be2264401ad893725c1162 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wolf.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
@@ -69,4 +69,20 @@ public interface Wolf extends Tameable, Sittable, io.papermc.paper.entity.Collar
|
||||
* @param interested Whether the wolf is interested
|
||||
*/
|
||||
public void setInterested(boolean interested);
|
||||
@@ -112,4 +112,20 @@ public interface Wolf extends Tameable, Sittable, io.papermc.paper.entity.Collar
|
||||
return variant;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
@@ -1421,6 +1407,20 @@ index 84db38388bf7a58e66d6cd29620b4fe64b0a897e..82ebd99549ce9f9e6427a50cef424e90
|
||||
+ public void setRabid(boolean rabid);
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
|
||||
index 446b3ffd5caca5344be1c250475679834cd0d4a2..3da8d3d8925cd7a111c0c357bceecfd3a801c8eb 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
|
||||
@@ -303,7 +303,8 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
WORLD_BORDER,
|
||||
/**
|
||||
* Damage caused when an entity contacts a block such as a Cactus,
|
||||
- * Dripstone (Stalagmite) or Berry Bush.
|
||||
+ * Dripstone (Stalagmite) or Berry Bush. (Stonecutters too if you
|
||||
+ * have the Stonecutter damage Purpur feature enabled)
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java b/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
index c9f395064656dd0126410eb3c6e197baa450c063..13156a12e5df50cdc1e465dc0bd9d94108275629 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
@@ -1439,10 +1439,10 @@ index c9f395064656dd0126410eb3c6e197baa450c063..13156a12e5df50cdc1e465dc0bd9d941
|
||||
* When a player gets bad omen after killing a patrol captain.
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index cbce826add9dc2b3187c7bea00c27b785d7517df..3a98de6407d9a6307f89c207be1f09e639385ebe 100644
|
||||
index 59b375569a75cb1e1f7c610f96078e102ec0d3ed..a3f74891abbdc51dbbddaeb511f2754e0603c904 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -151,7 +151,7 @@ public enum InventoryType {
|
||||
@@ -166,7 +166,7 @@ public enum InventoryType {
|
||||
SMITHING_NEW(4, "Upgrade Gear"),
|
||||
;
|
||||
|
||||
@@ -1468,32 +1468,13 @@ index c60be4fd24c7fdf65251dd6169e5e1ac3b588d95..569deccd2f1cf21da9b5906433ac493c
|
||||
+ boolean canDoUnsafeEnchants();
|
||||
+
|
||||
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 0217f98a74140bbae454d467de27c12b6060ca75..fba5b867ea9de36b45ef25c2a93fc436701bb3d9 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -355,4 +355,14 @@ public interface ItemFactory {
|
||||
*/
|
||||
@NotNull ItemStack enchantWithLevels(@NotNull ItemStack itemStack, @org.jetbrains.annotations.Range(from = 1, to = 30) int levels, boolean allowTreasure, @NotNull java.util.Random random);
|
||||
// Paper end - enchantWithLevels API
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * Returns the lines of text shown when hovering over an item
|
||||
+ * @param itemStack The ItemStack
|
||||
+ * @param advanced Whether advanced tooltips are shown
|
||||
+ * @return the list of Components
|
||||
+ */
|
||||
+ @NotNull java.util.List<net.kyori.adventure.text.@NotNull Component> getHoverLines(@NotNull ItemStack itemStack, boolean advanced);
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 36e3fbc727cd748aa138f52976154ba32954cd87..9ecfc504df089a74add168cd5a8376d7d6b8ea0e 100644
|
||||
index c64413a6740b604282984dea2a8430a6e7478d68..5c609d916e2d2f08ba90ebd23f13c5c9a14bc73c 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -19,6 +19,17 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -1507,15 +1488,14 @@ index 36e3fbc727cd748aa138f52976154ba32954cd87..9ecfc504df089a74add168cd5a8376d7
|
||||
+import org.bukkit.inventory.meta.Repairable;
|
||||
+import org.bukkit.persistence.PersistentDataContainer;
|
||||
+import org.bukkit.persistence.PersistentDataHolder;
|
||||
+import com.destroystokyo.paper.Namespaced;
|
||||
+// Purpur end
|
||||
|
||||
/**
|
||||
* Represents a stack of items.
|
||||
@@ -1005,4 +1017,635 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return type.isAir() || amount <= 0;
|
||||
@@ -1079,4 +1090,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player);
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - expose itemstack tooltip lines
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
@@ -1997,67 +1977,6 @@ index 36e3fbc727cd748aa138f52976154ba32954cd87..9ecfc504df089a74add168cd5a8376d7
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the collection of namespaced keys that the item can destroy in {@link org.bukkit.GameMode#ADVENTURE}
|
||||
+ *
|
||||
+ * @return Set of {@link com.destroystokyo.paper.Namespaced}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public java.util.Set<Namespaced> getDestroyableKeys() {
|
||||
+ return getItemMeta().getDestroyableKeys();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the collection of namespaced keys that the item can destroy in {@link org.bukkit.GameMode#ADVENTURE}
|
||||
+ *
|
||||
+ * @param canDestroy Collection of {@link com.destroystokyo.paper.Namespaced}
|
||||
+ */
|
||||
+ public void setDestroyableKeys(@NotNull Collection<Namespaced> canDestroy) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ itemMeta.setDestroyableKeys(canDestroy);
|
||||
+ setItemMeta(itemMeta);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the collection of namespaced keys that the item can be placed on in {@link org.bukkit.GameMode#ADVENTURE}
|
||||
+ *
|
||||
+ * @return Set of {@link com.destroystokyo.paper.Namespaced}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public java.util.Set<Namespaced> getPlaceableKeys() {
|
||||
+ return getItemMeta().getPlaceableKeys();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the set of namespaced keys that the item can be placed on in {@link org.bukkit.GameMode#ADVENTURE}
|
||||
+ *
|
||||
+ * @param canPlaceOn Collection of {@link com.destroystokyo.paper.Namespaced}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public void setPlaceableKeys(@NotNull Collection<Namespaced> canPlaceOn) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ itemMeta.setPlaceableKeys(canPlaceOn);
|
||||
+ setItemMeta(itemMeta);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks for the existence of any keys that the item can be placed on
|
||||
+ *
|
||||
+ * @return true if this item has placeable keys
|
||||
+ */
|
||||
+ public boolean hasPlaceableKeys() {
|
||||
+ return hasItemMeta() && getItemMeta().hasPlaceableKeys();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks for the existence of any keys that the item can destroy
|
||||
+ *
|
||||
+ * @return true if this item has destroyable keys
|
||||
+ */
|
||||
+ public boolean hasDestroyableKeys() {
|
||||
+ return hasItemMeta() && getItemMeta().hasDestroyableKeys();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Repairs this item by 1 durability
|
||||
+ */
|
||||
+ public void repair() {
|
||||
@@ -2102,7 +2021,7 @@ index 36e3fbc727cd748aa138f52976154ba32954cd87..9ecfc504df089a74add168cd5a8376d7
|
||||
+ public boolean damage(int amount, boolean ignoreUnbreaking) {
|
||||
+ Damageable damageable = (Damageable) getItemMeta();
|
||||
+ if (amount > 0) {
|
||||
+ int unbreaking = getEnchantLevel(Enchantment.DURABILITY);
|
||||
+ int unbreaking = getEnchantLevel(Enchantment.UNBREAKING);
|
||||
+ int reduce = 0;
|
||||
+ for (int i = 0; unbreaking > 0 && i < amount; ++i) {
|
||||
+ if (reduceDamage(java.util.concurrent.ThreadLocalRandom.current(), unbreaking)) {
|
||||
@@ -2137,19 +2056,10 @@ index 36e3fbc727cd748aa138f52976154ba32954cd87..9ecfc504df089a74add168cd5a8376d7
|
||||
+ }
|
||||
+ return random.nextInt(unbreaking + 1) > 0;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the lines of text shown when hovering over the item
|
||||
+ * @param advanced Whether advanced tooltips are shown
|
||||
+ * @return the list of Components
|
||||
+ */
|
||||
+ public @NotNull List<net.kyori.adventure.text.@NotNull Component> getHoverLines(boolean advanced) {
|
||||
+ return Bukkit.getItemFactory().getHoverLines(this, advanced);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
index 523818cbb0d6c90481ec97123e7fe0e2ff4eea14..bfeb8171a723d84b94bfaacd8aaf7d4d48ecd051 100644
|
||||
index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..5ec7d9dab1935bb743e3264d9f7390795fd9f55c 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
@@ -10,6 +10,7 @@ import java.util.function.Predicate;
|
||||
@@ -2160,7 +2070,7 @@ index 523818cbb0d6c90481ec97123e7fe0e2ff4eea14..bfeb8171a723d84b94bfaacd8aaf7d4d
|
||||
|
||||
/**
|
||||
* Represents a potential item match within a recipe. All choices within a
|
||||
@@ -150,6 +151,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -180,6 +181,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
public static class ExactChoice implements RecipeChoice {
|
||||
|
||||
private List<ItemStack> choices;
|
||||
@@ -2168,7 +2078,7 @@ index 523818cbb0d6c90481ec97123e7fe0e2ff4eea14..bfeb8171a723d84b94bfaacd8aaf7d4d
|
||||
|
||||
public ExactChoice(@NotNull ItemStack stack) {
|
||||
this(Arrays.asList(stack));
|
||||
@@ -194,6 +196,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -229,6 +231,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
|
||||
@Override
|
||||
public boolean test(@NotNull ItemStack t) {
|
||||
@@ -2176,7 +2086,7 @@ index 523818cbb0d6c90481ec97123e7fe0e2ff4eea14..bfeb8171a723d84b94bfaacd8aaf7d4d
|
||||
for (ItemStack match : choices) {
|
||||
if (t.isSimilar(match)) {
|
||||
return true;
|
||||
@@ -203,6 +206,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -238,6 +241,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2246,10 +2156,10 @@ index 301e82369603f3dd6e6c1bd380da4bacacd7ef6c..0c6ca7588fb3d6b6497ddf032fe75e5c
|
||||
/**
|
||||
* This class was not meant to be constructed explicitly
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a0a9ec796 100644
|
||||
index c66252802c51174bc26f266cb5cdecdd856ff220..97f580fccd06a8db5f592a53c8b95a7a6159adac 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
@@ -65,6 +65,7 @@ public class LibraryLoader
|
||||
@@ -68,6 +68,7 @@ public class LibraryLoader
|
||||
@Override
|
||||
public void transferStarted(@NotNull TransferEvent event) throws TransferCancelledException
|
||||
{
|
||||
@@ -2257,7 +2167,7 @@ index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a
|
||||
logger.log( Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
|
||||
}
|
||||
} );
|
||||
@@ -80,6 +81,7 @@ public class LibraryLoader
|
||||
@@ -94,6 +95,7 @@ public class LibraryLoader
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -2265,7 +2175,7 @@ index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a
|
||||
logger.log( Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[]
|
||||
{
|
||||
java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), desc.getLibraries().size() // Paper - use configured log prefix
|
||||
@@ -118,6 +120,7 @@ public class LibraryLoader
|
||||
@@ -144,6 +146,7 @@ public class LibraryLoader
|
||||
}
|
||||
|
||||
jarFiles.add( url );
|
||||
@@ -2273,200 +2183,6 @@ index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a
|
||||
logger.log( Level.INFO, "[{0}] Loaded library {1}", new Object[]
|
||||
{
|
||||
java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), file // Paper - use configured log prefix
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf235eba7e89 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
@@ -32,12 +32,14 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
private static final String AMBIENT = "ambient";
|
||||
private static final String PARTICLES = "has-particles";
|
||||
private static final String ICON = "has-icon";
|
||||
+ private static final String KEY = "namespacedKey"; // Purpur
|
||||
private final int amplifier;
|
||||
private final int duration;
|
||||
private final PotionEffectType type;
|
||||
private final boolean ambient;
|
||||
private final boolean particles;
|
||||
private final boolean icon;
|
||||
+ @Nullable private final NamespacedKey key; // Purpur
|
||||
|
||||
/**
|
||||
* Creates a potion effect.
|
||||
@@ -50,6 +52,36 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
* @param icon the icon status, see {@link PotionEffect#hasIcon()}
|
||||
*/
|
||||
public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) {
|
||||
+ // Purpur start
|
||||
+ this(type, duration, amplifier, ambient, particles, icon, null);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Create a potion effect.
|
||||
+ * @param duration measured in ticks, see {@link
|
||||
+ * PotionEffect#getDuration()}
|
||||
+ * @param amplifier the amplifier, see {@link PotionEffect#getAmplifier()}
|
||||
+ * @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
|
||||
+ * @param particles the particle status, see {@link PotionEffect#hasParticles()}
|
||||
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
|
||||
+ */
|
||||
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, @Nullable NamespacedKey key) {
|
||||
+ this(type, duration, amplifier, ambient, particles, particles, key);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a potion effect.
|
||||
+ * @param type effect type
|
||||
+ * @param duration measured in ticks, see {@link
|
||||
+ * PotionEffect#getDuration()}
|
||||
+ * @param amplifier the amplifier, see {@link PotionEffect#getAmplifier()}
|
||||
+ * @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
|
||||
+ * @param particles the particle status, see {@link PotionEffect#hasParticles()}
|
||||
+ * @param icon the icon status, see {@link PotionEffect#hasIcon()}
|
||||
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
|
||||
+ */
|
||||
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable NamespacedKey key) {
|
||||
+ // Purpur end
|
||||
Preconditions.checkArgument(type != null, "effect type cannot be null");
|
||||
this.type = type;
|
||||
this.duration = duration;
|
||||
@@ -57,6 +89,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this.ambient = ambient;
|
||||
this.particles = particles;
|
||||
this.icon = icon;
|
||||
+ this.key = key; // Purpur - add key
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,36 +137,43 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
* @param map the map to deserialize from
|
||||
*/
|
||||
public PotionEffect(@NotNull Map<String, Object> map) {
|
||||
- this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
||||
+ this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), getKey(map)); // Purpur - getKey
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@NotNull
|
||||
public PotionEffect withType(@NotNull PotionEffectType type) {
|
||||
- return new PotionEffect(type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
@NotNull
|
||||
public PotionEffect withDuration(int duration) {
|
||||
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
@NotNull
|
||||
public PotionEffect withAmplifier(int amplifier) {
|
||||
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
@NotNull
|
||||
public PotionEffect withAmbient(boolean ambient) {
|
||||
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
@NotNull
|
||||
public PotionEffect withParticles(boolean particles) {
|
||||
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
@NotNull
|
||||
public PotionEffect withIcon(boolean icon) {
|
||||
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Purpur start
|
||||
+ @NotNull
|
||||
+ public PotionEffect withKey(@Nullable NamespacedKey key) {
|
||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@NotNull
|
||||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
||||
PotionEffectType effect;
|
||||
@@ -166,17 +206,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return def;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Nullable
|
||||
+ private static NamespacedKey getKey(@NotNull Map<?, ?> map) {
|
||||
+ Object key = map.get(KEY);
|
||||
+ if (key instanceof String stringKey) {
|
||||
+ return NamespacedKey.fromString(stringKey);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
@NotNull
|
||||
public Map<String, Object> serialize() {
|
||||
- return ImmutableMap.<String, Object>builder()
|
||||
+ // Purpur start - add key, don't serialize if null.
|
||||
+ ImmutableMap.Builder<String, Object> builder = ImmutableMap.<String, Object>builder()
|
||||
.put(TYPE, type.getKey().toString())
|
||||
.put(DURATION, duration)
|
||||
.put(AMPLIFIER, amplifier)
|
||||
.put(AMBIENT, ambient)
|
||||
.put(PARTICLES, particles)
|
||||
- .put(ICON, icon)
|
||||
- .build();
|
||||
+ .put(ICON, icon);
|
||||
+ if(key != null) {
|
||||
+ builder.put(KEY, key.toString());
|
||||
+ }
|
||||
+ return builder.build();
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,7 +256,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return false;
|
||||
}
|
||||
PotionEffect that = (PotionEffect) obj;
|
||||
- return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon;
|
||||
+ return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && this.key == that.key; // Purpur - add key
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,6 +352,24 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return icon;
|
||||
}
|
||||
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * @return if the key isn't the default namespacedKey
|
||||
+ */
|
||||
+ public boolean hasKey() {
|
||||
+ return key != null;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return the key attached to the potion
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public NamespacedKey getKey() {
|
||||
+ return key;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 1;
|
||||
@@ -310,6 +384,6 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
- return type.getName() + (ambient ? ":(" : ":") + duration + "t-x" + amplifier + (ambient ? ")" : "");
|
||||
+ return type.getName() + (ambient ? ":(" : ":") + duration + "t-x" + amplifier + (ambient ? ")" : "") + (hasKey() ? "(" + key + ")" : ""); // Purpur - add key if not null
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/util/permissions/CommandPermissions.java
|
||||
index 7763d6101ac61900db1e2310966b99584539fd0e..d5a42707d365ffd72532bbb1a59a1ca7145f9918 100644
|
||||
--- a/src/main/java/org/bukkit/util/permissions/CommandPermissions.java
|
||||
@@ -2993,10 +2709,10 @@ index 0000000000000000000000000000000000000000..519809eab5d926dc7b0a7bad5d446d0d
|
||||
+}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/event/PreBlockExplodeEvent.java b/src/main/java/org/purpurmc/purpur/event/PreBlockExplodeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..32602b398ede24a35ed8a996faa2b23455615a7b
|
||||
index 0000000000000000000000000000000000000000..8ea97ddceedb7c719e8a50a0dd8f3f0919ca1647
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/event/PreBlockExplodeEvent.java
|
||||
@@ -0,0 +1,54 @@
|
||||
@@ -0,0 +1,53 @@
|
||||
+package org.purpurmc.purpur.event;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
@@ -3005,7 +2721,6 @@ index 0000000000000000000000000000000000000000..32602b398ede24a35ed8a996faa2b234
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockExplodeEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+import java.util.Collections;
|
||||
+
|
||||
+/**
|
||||
@@ -3016,8 +2731,8 @@ index 0000000000000000000000000000000000000000..32602b398ede24a35ed8a996faa2b234
|
||||
+ private boolean cancelled;
|
||||
+ private final float yield;
|
||||
+
|
||||
+ public PreBlockExplodeEvent(@NotNull final Block what, final float yield, @Nullable BlockState explodedBlockState) {
|
||||
+ super(what, Collections.emptyList(), yield, explodedBlockState);
|
||||
+ public PreBlockExplodeEvent(@NotNull final Block what, final float yield, @NotNull BlockState explodedBlockState) {
|
||||
+ super(what, explodedBlockState, Collections.emptyList(), yield);
|
||||
+ this.yield = yield;
|
||||
+ this.cancelled = false;
|
||||
+ }
|
||||
@@ -3918,60 +3633,6 @@ index 0000000000000000000000000000000000000000..eebb5d124456b8209d1b8e8cc4cb772d
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java b/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c0da73d2ea83a6055e34894ba1c7506fc8667712
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java
|
||||
@@ -0,0 +1,48 @@
|
||||
+package org.purpurmc.purpur.event.packet;
|
||||
+
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an item is about to be written to a packet.
|
||||
+ */
|
||||
+public class NetworkItemSerializeEvent extends Event {
|
||||
+ private ItemStack itemStack;
|
||||
+
|
||||
+ public NetworkItemSerializeEvent(@NotNull ItemStack itemStack) {
|
||||
+ super(!org.bukkit.Bukkit.isPrimaryThread());
|
||||
+ this.itemStack = itemStack;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return The item that is about to be serialized. Not mutable
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public ItemStack getItemStack() {
|
||||
+ return itemStack;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the item that will be serialized.
|
||||
+ *
|
||||
+ * @param itemStack The item
|
||||
+ */
|
||||
+ public void setItemStack(@Nullable ItemStack itemStack) {
|
||||
+ this.itemStack = itemStack;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/event/player/PlayerBookTooLargeEvent.java b/src/main/java/org/purpurmc/purpur/event/player/PlayerBookTooLargeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c88394336bc9ab0f66a2af24d393f4a176a234d5
|
||||
@@ -4124,7 +3785,7 @@ index 12946bd55fcf7c40d39081779a7fa30049ee6165..9c2d605c50cbf9aefa56ec209df9f6ce
|
||||
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 88f1ca89fa640a686231b8eec87e70419b2d73ef..d6b91c49a267c89d7df2ddee7ccfe64675d117be 100644
|
||||
index 057dc3ebea3516863dda24252fe05d344c16fab3..5b341346cb9582ad5a0bb77a0d4046d8527797a3 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -47,6 +47,10 @@ public class AnnotationTest {
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
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] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 41d7b75e904b94073dfcd12b776a7759a963b66f..96974f191c13424d72839d85dfa2a6c29b9f4d1d 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,13 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
+/* // Plazma - Use libs.versions.toml
|
||||
val annotationsVersion = "24.0.1"
|
||||
val bungeeCordChatVersion = "1.20-R0.1"
|
||||
val adventureVersion = "4.14.0"
|
||||
val slf4jVersion = "1.8.0-beta4"
|
||||
val log4jVersion = "2.17.1"
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
val apiAndDocs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -28,15 +30,39 @@ configurations.api {
|
||||
|
||||
dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
api("com.google.guava:guava:32.1.2-jre")
|
||||
api("com.google.code.gson:gson:2.10.1")
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
|
||||
api("org.yaml:snakeyaml:2.2")
|
||||
api("org.joml:joml:1.10.5")
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
// Paper start
|
||||
- api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
+ api(api.jsonsimple) { // Plazma - Use libs.versions.toml
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
+ // Plazma start
|
||||
+ implementation(common.bundles.asm)
|
||||
+
|
||||
+ compileOnly(api.findbugs)
|
||||
+ compileOnly(common.bundles.maven)
|
||||
+
|
||||
+ compileOnly(api.annotations)
|
||||
+ compileOnlyApi(api.checkerqual)
|
||||
+ testCompileOnly(api.bundles.annotations)
|
||||
+
|
||||
+ testImplementation(common.asm.tree)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(common.commons.lang3)
|
||||
+
|
||||
+ api(api.bundles.api)
|
||||
+ api(common.snakeyaml)
|
||||
+ api(common.log4j.api)
|
||||
+ api(common.maven.provider)
|
||||
+ apiAndDocs(platform(common.adventure.bom))
|
||||
+ apiAndDocs(common.bundles.adventure)
|
||||
+ /*
|
||||
+ // Plazma end
|
||||
api("it.unimi.dsi:fastutil:8.5.6")
|
||||
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||
apiAndDocs("net.kyori:adventure-api")
|
||||
@@ -73,6 +99,7 @@ dependencies {
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -133,25 +160,27 @@ 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
|
||||
+ // Plazma start - Use libs.versions.toml
|
||||
+ "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}/", // 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://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}",
|
||||
// Paper end
|
||||
// Paper start
|
||||
- "https://jd.advntr.dev/api/$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/",
|
||||
+ "https://jd.advntr.dev/api/${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.slf4j/slf4j-api/${api.slf4j.api.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
|
||||
// Paper end
|
||||
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.provider.orNull?.version}", // Paper
|
||||
+ // Plazma end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
142
patches/api/0003-Use-Gradle-Version-Catalogs.patch
Normal file
142
patches/api/0003-Use-Gradle-Version-Catalogs.patch
Normal file
@@ -0,0 +1,142 @@
|
||||
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 7aa138f7123dcfb7d1d9ae9efcf2359522f5d2fd..67324689a65e8ed65c9d27c9b50073488c235c51 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))
|
||||
@@ -27,56 +29,31 @@ configurations.api {
|
||||
}
|
||||
|
||||
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")
|
||||
- implementation("org.ow2.asm:asm-commons:9.7")
|
||||
- // 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
|
||||
-
|
||||
- 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.11.0")
|
||||
- testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
+
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ implementation(common.bundles.asm)
|
||||
+
|
||||
+ api(api.bundles.api)
|
||||
+ api(common.snakeyaml)
|
||||
+ api(common.log4j.api)
|
||||
+ api(common.maven.provider)
|
||||
+ api(api.jsonsimple) { isTransitive = false }
|
||||
+ api(api.bungeechat) { exclude("com.google.guava", "guava") }
|
||||
+ apiAndDocs(platform(common.adventure.bom))
|
||||
+ apiAndDocs(common.bundles.adventure)
|
||||
+
|
||||
+ compileOnly(common.bundles.maven)
|
||||
+ compileOnly(api.annotations)
|
||||
+ compileOnlyApi(api.checkerqual)
|
||||
+
|
||||
+ testImplementation(common.asm.tree)
|
||||
+ testImplementation(common.commons.lang3)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+
|
||||
+ testCompileOnly(api.annotations)
|
||||
+ testCompileOnly(api.checkerqual)
|
||||
+ // Plazma end
|
||||
+
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -157,25 +134,16 @@ 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",
|
||||
- // Paper end
|
||||
- // Paper start
|
||||
- "https://jd.advntr.dev/api/$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://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.api.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.maven.connector.orNull?.version}",
|
||||
+ // Plazma end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
120
patches/api/0004-Rebrand.patch
Normal file
120
patches/api/0004-Rebrand.patch
Normal file
@@ -0,0 +1,120 @@
|
||||
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] Rebrand
|
||||
|
||||
|
||||
diff --git a/MIT.txt b/MIT.txt
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..67d405764ed68083d0164b1af0eabc0af7f6efea
|
||||
--- /dev/null
|
||||
+++ b/MIT.txt
|
||||
@@ -0,0 +1,21 @@
|
||||
+The MIT License (MIT)
|
||||
+
|
||||
+Copyright (c) 2024 Paper Contributors
|
||||
+
|
||||
+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/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..3b3bcfa6fa2dbcc7fef899cc7570da097437ab3a 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)");
|
||||
} 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 fe23268c418cccbd45caf2870f7931cfed978d28..bcf09f735e98f8bbce7c7dfab802ad20e2f17548 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -32,6 +32,29 @@ public interface ServerBuildInfo {
|
||||
Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur");
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - 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 - 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 3d29c47ac0620af82d990faf5dfc266c6f0235f1..0dd22efb7f318867d0f099e336505d2830883745 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -258,7 +258,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()),
|
||||
// Purpur end
|
||||
msg
|
||||
);
|
||||
@@ -281,6 +281,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(
|
||||
@@ -301,4 +302,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())) {
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index dd99f53e3d559685a4b3a454a9e607c310fc6aff..3a3713573ba37530449f9254c0a7205530c9737a 100644
|
||||
index ec8b9b2cbe65838a194281f7d76d0e17defc5211..0062b2d4dc7a64d1e4da240bf8dc5b428eb242ee 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2202,6 +2202,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2269,6 +2269,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Plazma Configuration API
|
||||
+ @NotNull
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfig() {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 28 Sep 2023 12:21:36 +0900
|
||||
Subject: [PATCH] Implement No Chat Reports
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
|
||||
index 2eb13c049fa917d41fa9ad17fdec9ec4c33701a8..5d50f83a76affc74f989870ca1bc8d7a75f3b2ba 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
|
||||
@@ -215,6 +215,8 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
* Fallback cause
|
||||
*/
|
||||
UNKNOWN,
|
||||
+
|
||||
+ NCR_NOT_INSTALLED, // Plazma - Implement No Chat Reports
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
26
patches/api/0006-Various-API-Tweaks.patch
Normal file
26
patches/api/0006-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 be212b4fbeabab32a4dab6ae554768c368efaa88..2c08e2000fc1c2cfaae9b82c57c0f2a5079311f1 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.
|
||||
*/
|
||||
@@ -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 069f2668f5229b0368b796e65eef1648fba0a097..9b991201a2f6cc9feccccf7f4e7bcded64117764 100644
|
||||
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
|
||||
@@ -442,6 +442,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
|
||||
+
|
||||
/**
|
||||
* Removed in 1.20.2
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,78 +0,0 @@
|
||||
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 f083d422678f5fd21825439944af888fbdc9bf3c..e30b51ed329f0c66a2329da45996ef0fc0db8ffb 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,6 +19,7 @@ dependencies {
|
||||
exclude("io.papermc.paper", "paper-api")
|
||||
}
|
||||
// Purpur end
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
@@ -46,9 +47,32 @@ dependencies {
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
// Paper start - Use Velocity cipher
|
||||
- implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
|
||||
+ // Plazma start - Use libs.versions.toml
|
||||
+ */
|
||||
+ implementation(common.snakeyaml)
|
||||
+ implementation(common.bundles.asm)
|
||||
+ implementation(common.commons.lang2)
|
||||
+ implementation(common.adventure.serializer.ansi)
|
||||
+ implementation(common.log4j.core)
|
||||
+ implementation(common.log4j.iostreams)
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||
+ runtimeOnly(log4jPlugins.output)
|
||||
+ alsoShade(log4jPlugins.output)
|
||||
+
|
||||
+ implementation(server.ansi)
|
||||
+ implementation(server.bundles.implementation)
|
||||
+ implementation(server.velocity) {
|
||||
+ // Plazma end
|
||||
isTransitive = false
|
||||
}
|
||||
+
|
||||
+ runtimeOnly(common.bundles.maven)
|
||||
+ runtimeOnly(common.maven.provider)
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
+
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(server.classgraph)
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
// Paper end
|
||||
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
@@ -57,19 +81,22 @@ dependencies {
|
||||
|
||||
// Pufferfish start
|
||||
implementation("org.yaml:snakeyaml:1.32")
|
||||
- implementation ("com.github.carleslc.Simple-YAML:Simple-Yaml:1.8.4") {
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
+ implementation(server.simpleyaml) { // Plazma - Use libs.versions.toml
|
||||
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("org.mozilla:rhino-runtime:1.7.14") // Purpur // Plazma - Use libs.versions.toml
|
||||
+ //implementation("org.mozilla:rhino-engine:1.7.14") // Purpur // Plazma - Use libs.versions.toml
|
||||
implementation("dev.omega24:upnp4j:1.0") // Purpur
|
||||
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
}
|
||||
|
||||
val craftbukkitPackageVersion = "1_20_R2" // Paper
|
||||
98
patches/server/0003-Use-Gradle-Version-Catalogs.patch
Normal file
98
patches/server/0003-Use-Gradle-Version-Catalogs.patch
Normal file
@@ -0,0 +1,98 @@
|
||||
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] Use Gradle Version Catalogs
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 4c4d242475c5229e9cdae69fcc328d52af6df4b8..c2a0dd63fe700484ac9473733b10615375d7c2b4 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -14,65 +14,29 @@ val alsoShade: Configuration by configurations.creating
|
||||
|
||||
dependencies {
|
||||
implementation(project(":purpur-api")) // Pufferfish // Purpur
|
||||
- // Paper start
|
||||
- implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
- 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")
|
||||
- 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.45.3.0")
|
||||
- runtimeOnly("com.mysql:mysql-connector-j:8.3.0")
|
||||
- runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
- // Paper start - Use Velocity cipher
|
||||
- implementation("com.velocitypowered:velocity-native:3.1.2-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 ("me.carleslc.Simple-YAML:Simple-Yaml:1.8.4") {
|
||||
- exclude(group="org.yaml", module="snakeyaml")
|
||||
- }
|
||||
- // Pufferfish end
|
||||
- implementation("com.github.technove:Flare:34637f3f87") // Pufferfish - flare
|
||||
-
|
||||
- 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.hamcrest:hamcrest:2.2")
|
||||
- testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
- testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
- 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.1"
|
||||
- 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
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ implementation(common.snakeyaml)
|
||||
+ implementation(common.asm.commons)
|
||||
+ implementation(common.log4j.core)
|
||||
+ implementation(common.log4j.iostreams)
|
||||
+ implementation(common.commons.lang2)
|
||||
+ implementation(common.adventure.serializer.ansi)
|
||||
+ implementation(server.velocity) { isTransitive = false }
|
||||
+ implementation(server.simpleyaml) { exclude(group="org.yaml", module="snakeyaml") }
|
||||
+ implementation(server.bundles.implementation)
|
||||
+
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||
+ alsoShade(log4jPlugins.output) // Plazma - Diff on patch
|
||||
+ runtimeOnly(log4jPlugins.output) // Plazma - Diff on patch
|
||||
+
|
||||
+ runtimeOnly(common.maven.provider)
|
||||
+ runtimeOnly(common.bundles.maven)
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
+
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(server.bundles.test)
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
}
|
||||
|
||||
paperweight {
|
||||
498
patches/server/0004-Fork-friendly-Rebranding.patch
Normal file
498
patches/server/0004-Fork-friendly-Rebranding.patch
Normal file
@@ -0,0 +1,498 @@
|
||||
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 732670587ecf0877be2493f67baade9c27b88f2b..54a30184392815a01f20b8fc841690e4ae5b3cc6 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
val alsoShade: Configuration by configurations.creating
|
||||
|
||||
dependencies {
|
||||
- implementation(project(":purpur-api")) // Pufferfish // Purpur
|
||||
+ implementation(project(":${rootProject.providers.gradleProperty("brandName").get().lowercase()}-api")) // Pufferfish // Purpur // Plazma - Fork-friendly Rebranding
|
||||
|
||||
// Plazma start - Use Gradle Version Catalogs
|
||||
implementation(common.snakeyaml)
|
||||
@@ -63,14 +63,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", // Purpur
|
||||
+ "Implementation-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Rebrand // Plazma - Fork-friendly Rebranding
|
||||
"Implementation-Version" to implementationVersion,
|
||||
"Implementation-Vendor" to date, // Paper
|
||||
- "Specification-Title" to "Purpur", // Purpur
|
||||
+ "Specification-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
"Specification-Version" to project.version,
|
||||
- "Specification-Vendor" to "Purpur Team", // Purpur
|
||||
- "Brand-Id" to "purpurmc:purpur", // Purpur
|
||||
- "Brand-Name" to "Purpur", // 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(), // Purpur // Plazma - Fork-friendly Rebranding
|
||||
"Build-Number" to (build ?: ""),
|
||||
"Build-Time" to Instant.now().toString(),
|
||||
"Git-Branch" to gitBranch, // Paper
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..81b204c03b3c9a997f00fd423daa963757cb0daf 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.ServerBuildInfo.buildInfo().brandName(), 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 3cb56595822799926a8141e60a42f5d1edfc6de5..70d6e514870b5cdf529eb067137a5c1579d3de1e 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(io.papermc.paper.ServerBuildInfo.buildInfo().brandName()) // 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..af534fb15be2be3e5b4258c522e0e6c967c2bb1c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBrandConstants.java
|
||||
@@ -0,0 +1,33 @@
|
||||
+package io.papermc.paper;
|
||||
+
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public enum ServerBrandConstants {;
|
||||
+
|
||||
+ // Basic brand informations
|
||||
+ public static final String BRAND_NAME = "Plazma";
|
||||
+ public static final String RESOURCE_PATH = "META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties";
|
||||
+
|
||||
+ @Nullable
|
||||
+ public static final 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
|
||||
+ public static final String DOWNLOAD_PAGE = "https://plazmamc.org/downloads";
|
||||
+ public static final String CONFIG_REFERENCE = "https://docs.plazmamc.org/plazma/administration/reference/configurations";
|
||||
+ public static final String START_GUIDE = "https://docs.plazmamc.org/plazma/administration/getting-started";
|
||||
+ public static final String USAGE_GUIDE = "https://docs.plazmamc.org/plazma/administration/getting-started/next-step";
|
||||
+ public static final String SUPPORT_PAGE = "https://github.com/PlazmaMC/Plazma/issues";
|
||||
+
|
||||
+ // DO NOT MODIFY BELOW
|
||||
+ public static final String BRAND_LCASE = BRAND_NAME.toLowerCase();
|
||||
+ public static final String BRAND_UCASE = BRAND_NAME.toUpperCase();
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
index a27797afd0dc262a72dbd7906c6f00641619c7eb..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"; // Pufferfish
|
||||
- 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); // 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 96142deb42700f888ea08689ab62c27ef2b881fd..62b602450a53cfebf08f839b505d0e965aff6e20 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
@@ -114,7 +114,12 @@ 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);
|
||||
+ // Plazma start - Fork-friendly Rebranding
|
||||
+ 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.ServerBuildInfo.buildInfo().brandName(), io.papermc.paper.ServerBrandConstants.CONFIG_REFERENCE, ex);
|
||||
+ // Plazma end - 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 c366d84518979e842a6f10f969a5951539ecac93..4a885298859a0dff663d12075c82b42b48cce2ef 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -37,7 +37,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(io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -127,7 +127,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 %s INSTEAD!".formatted(io.papermc.paper.ServerBrandConstants.BRAND_UCASE)); // Plazma - Fork-friendly Rebranding
|
||||
// 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 0f7d6da8685716604f0749d4f5b60730a44cde73..4911a6d25d12eb9d2b263aeb9b7f521ff828397a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -107,6 +107,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
|
||||
|
||||
@@ -178,7 +183,7 @@ public class Main {
|
||||
if (awtException != null) {
|
||||
Main.LOGGER.error("You are using a headless JRE distribution.");
|
||||
Main.LOGGER.error("This distribution is missing certain graphic libraries that the Minecraft server needs to function.");
|
||||
- Main.LOGGER.error("For instructions on how to install the non-headless JRE, see https://docs.papermc.io/misc/java-install");
|
||||
+ Main.LOGGER.error("For instructions on how to install the non-headless JRE, see {}", io.papermc.paper.ServerBrandConstants.START_GUIDE); // Plazma - Fork-friendly Rebranding
|
||||
Main.LOGGER.error("");
|
||||
Main.LOGGER.error(awtException);
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4c192b138810650ca0ab5e5d4f2407c0dc3d9fd0..468cb5034f7648e6ef39b1961298f592535aad88 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -960,7 +960,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 {})", io.papermc.paper.ServerBrandConstants.BRAND_UCASE); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
while (this.getRunningThread().isAlive()) {
|
||||
this.getRunningThread().stop();
|
||||
try {
|
||||
@@ -1181,7 +1181,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 fd88dfafcec517a29e3320ce147516ce2ccb2dc9..6d3f61a05c4d4ad20e62175eb0331bc31b5d6807 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -796,7 +796,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.ServerBuildInfo.buildInfo().brandName()).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 842f382de43df5d5c321422372ec30ccdd7859d7..09aa0c9ec7d66ff82167c035481e5fcccf8618de 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -56,12 +56,12 @@ 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.ServerBuildInfo.buildInfo().brandName() + " Server"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
public final boolean spawnAnimals = this.get("spawn-animals", true);
|
||||
public final boolean spawnNpcs = this.get("spawn-npcs", true);
|
||||
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.ServerBuildInfo.buildInfo().brandName() + " Server"); // Plazma - Fork-friendly Rebranding
|
||||
public final boolean forceGameMode = this.get("force-gamemode", false);
|
||||
public final boolean enforceWhitelist = this.get("enforce-whitelist", false);
|
||||
public final Difficulty difficulty;
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index 8f74c2ec5252b6265549589310d742337c91cb2c..f8e8966fe8909f209969637e7ed708e689c41f1d 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.ServerBuildInfo.buildInfo().brandName() + " 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.ServerBuildInfo.buildInfo().brandName() + " 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.ServerBuildInfo.buildInfo().brandName() + " 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 1ce1235cbbf23fe975c85a0f713280b433459951..24934c84a6ca3a74784b63ebeadb9457aebd39c0 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.ServerBuildInfo.buildInfo().brandName() + ")"); // 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 1090b7e36e3c1c105bc36135b82751c651f237d4..a5b3f9309393fd54c0aec2918410b331b306684d 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
|
||||
@@ -157,7 +157,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 {} - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", io.papermc.paper.ServerBuildInfo.buildInfo().brandName()); // 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 549d01337e9a89b356287567db101de383d45c9c..90d6650aa37247f3907f6bcf2fe5201cac4e05ea 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
|
||||
}
|
||||
@@ -259,7 +259,7 @@ public class Main {
|
||||
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
||||
boolean isOldVersion = javaVersion < 61.0;
|
||||
if (!skip && isOldVersion) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 21. Check your Java version with the command 'java -version'. For more info see https://docs.papermc.io/misc/java-install");
|
||||
+ System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 21. Check your Java version with the command 'java -version'. For more info see " + io.papermc.paper.ServerBrandConstants.START_GUIDE); // Plazma - Fork-friendly Rebranding
|
||||
return;
|
||||
}
|
||||
String javaVersionName = System.getProperty("java.version");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index ca8ae8e1c51b937dac916e0b0dc94b5e2e61efeb..e3af3ba8f34626e54cdd931601fd3ec40618a061 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -503,7 +503,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 {}" + io.papermc.paper.ServerBuildInfo.buildInfo().brandName()); // Paper // Purpur
|
||||
// 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..e8f7250f366bf9407ffd6d2ce53fd68a3753f97c 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.ServerBuildInfo.buildInfo().brandName() + " 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 a353eb9f45af7b7f9bfd92a4a89403335b841840..e221edfd8837f82642de584ecadf47bafc598b38 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -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 " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " 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.ServerBuildInfo.buildInfo().brandName() + " 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.ServerBuildInfo.buildInfo().brandName() + " version: " + Bukkit.getServer().getVersion() ); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
//
|
||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||
{
|
||||
@@ -184,12 +184,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 " + io.papermc.paper.ServerBrandConstants.BRAND_UCASE + " - 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.ServerBuildInfo.buildInfo().brandName() + "!):" ); // Paper // Purpur // Plazma - Fork-friendly Rebranding
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(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 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 " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma - Fork-friendly Rebranding
|
||||
}
|
||||
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
@@ -1,60 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Tue, 30 May 2023 12:12:29 +0900
|
||||
Subject: [PATCH] MC Dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
index 733134401fcba393053c7a2dfa1d0d44f8f79ff5..79fba35fc74723529bff7d8fdcca7de6407fb5ad 100644
|
||||
--- a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
+++ b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
@@ -71,14 +71,14 @@ public class LeavesFix extends DataFix {
|
||||
return this.fixTypeEverywhereTyped("Leaves fix", type, (typed) -> {
|
||||
return typed.updateTyped(opticFinder, (typedx) -> {
|
||||
int[] is = new int[]{0};
|
||||
- Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed) -> {
|
||||
- Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed.getAllTyped(opticFinder3).stream().map((typedx) -> {
|
||||
- return new LeavesFix.LeavesSection(typedx, this.getInputSchema());
|
||||
+ Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed2x) -> { // Plazma - decompile fix
|
||||
+ Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed2x.getAllTyped(opticFinder3).stream().map((typedx2) -> { // Plazma - decompile fix
|
||||
+ return new LeavesFix.LeavesSection(typedx2, this.getInputSchema()); // Plazma - decompile fix
|
||||
}).collect(Collectors.toMap(LeavesFix.Section::getIndex, (leavesSection) -> {
|
||||
return leavesSection;
|
||||
})));
|
||||
if (int2ObjectMap.values().stream().allMatch(LeavesFix.Section::isSkippable)) {
|
||||
- return typed;
|
||||
+ return typed2x; // Plazma - decompile fix
|
||||
} else {
|
||||
List<IntSet> list = Lists.newArrayList();
|
||||
|
||||
@@ -134,8 +134,8 @@ public class LeavesFix extends DataFix {
|
||||
}
|
||||
}
|
||||
|
||||
- return typed.updateTyped(opticFinder3, (typedx) -> {
|
||||
- return int2ObjectMap.get(typedx.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx);
|
||||
+ return typed.updateTyped(opticFinder3, (typedx2) -> { // Plazma - decompile fix
|
||||
+ return int2ObjectMap.get(typedx2.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx2); // Plazma - decompile fix
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -298,8 +298,8 @@ public class LeavesFix extends DataFix {
|
||||
throw new IllegalStateException("Block state type is not what was expected.");
|
||||
} else {
|
||||
Optional<List<Pair<String, Dynamic<?>>>> optional = typed.getOptional(this.paletteFinder);
|
||||
- this.palette = optional.map((list) -> {
|
||||
- return list.stream().map(Pair::getSecond).collect(Collectors.toList());
|
||||
+ this.palette = (List) optional.map((list) -> { // Plazma - decompile fix
|
||||
+ return (List) list.stream().map(Pair::getSecond).collect(Collectors.toList()); // Plazma - decompile fix
|
||||
}).orElse(ImmutableList.of());
|
||||
Dynamic<?> dynamic = typed.get(DSL.remainderFinder());
|
||||
this.index = dynamic.get("Y").asInt(0);
|
||||
@@ -321,7 +321,7 @@ public class LeavesFix extends DataFix {
|
||||
public Typed<?> write(Typed<?> typed) {
|
||||
return this.isSkippable() ? typed : typed.update(DSL.remainderFinder(), (dynamic) -> {
|
||||
return dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw())));
|
||||
- }).set(this.paletteFinder, this.palette.stream().map((dynamic) -> {
|
||||
+ }).set(this.paletteFinder, (List) this.palette.stream().map((dynamic) -> { // Plazma - decompile fix
|
||||
return Pair.of(References.BLOCK_STATE.typeName(), dynamic);
|
||||
}).collect(Collectors.toList()));
|
||||
}
|
||||
465
patches/server/0005-Rebrand-Logo.patch
Normal file
465
patches/server/0005-Rebrand-Logo.patch
Normal file
@@ -0,0 +1,465 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
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 8b924977b7886df9ab8790b1e4ff9b1c04a2af45..efa53bcb692650396b2e71b62243a15dd95aa096 100644
|
||||
GIT binary patch
|
||||
literal 7439
|
||||
zcmbt(c{G&$-~ZV65M{|Sl&u=G8D_@5Q?^h^su{B|wi#xOL1ZXGS}fT`c1ndJB74fd
|
||||
zWJ?-EWtT#ven<Cx_r0IzJooqaJ<oHUbDeXY&-Hr0U+>rZdc8lNKdxvy8*?FkX?_3z
|
||||
zAY^G_Vh;cS40dl`ZU6vKLh_ve004Xxi!)RJK>gtE&Bn;rrvm^y5R#)4&B@vdjU#)j
|
||||
zWAS8Hf;z*S0@%HD^cfT^&XYg`x)R(-KDvs_wa*oSB)qQTX@oVznqo|FCs_pf5gdYS
|
||||
z9C1OOI22w{Uk|9mKr_54-UJ#J$nf^^p`sbOiof!reW>W&Ww0Xf7lh`it7y1O2z0Wx
|
||||
z0~(Y42tX}$C<q6EK!92(buFwG76#Wm3WPymP%s1uhQdG)2pWb!!yv#vFGW3|jvt<g
|
||||
zwl^{RlgtlK)Kzq+(I{vzI3OTEJpisw_HzS6Q79A`0t3TfAU`}2L=E(zVHqGF>cPJ<
|
||||
zm=LHqKN5vTBKrV$Gh$uI{xn@h#lJLoQ+}uQq5jz?9N8Ppz*4|ab;z!!Ut;mN-#CiD
|
||||
zpVu#PJPu6oB6t&gXjCv%9r_zfaVOKrRCn?}r2hT-zYs9IDc07%IsV65yuE)@P-&)g
|
||||
z+P_Cr9Rn!@uswlF_V>dPOz8w4+QD5l6tuA)0ZSwMIg-g<e|;&tze)xg8v|hwC<>^0
|
||||
zn&g8g2T;}i7DF(>(g?bWFbE6|g1|vgh$9S&M!?Vr=n)7C4T1atwI<_9#K7NBja?`l
|
||||
z`U{FcL;fq2K*Qp(H0=KujK`sgWIt~#O;?fRjdde{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UDFNP<{vgF`ivNrY!#|!D3|%nvN;axyiKQdEH}n|UAvW!JH2@P
|
||||
z6TzqIA6}zL<{b4pMQp)4ffz(REKD*y3@}3^xF7ui{>6upo0Tm&dOIrt&>JXx_VQrn
|
||||
z?-nhZdK!u;m!%$urT+S%i$tA>aj?l1`%j#jH%{|kdYyAos^NAM25jH<6TePW$nes=
|
||||
z1!HeZ;$v}XEv4u4(RnINU~U}<DXJ9z?(o<cCd#Ts`xxm<Y#vf|sb4vLXez4MX3R3~
|
||||
z`Lh=&>A*?<y`}>wwCqU9m|k--nxsx^vf5AeRn$pVh?0Mnuc`C!uLu2;Vg{7)wfw`U
|
||||
zX;*Wa;BHUq-TwcZ=lb=LAJ!W;9=uX-aQwln)6svvPf%SQ<1JdhQIPpzpQJ_KDid+%
|
||||
z!(xv_|7G`-+M9p4uk#~(Mx)cG<|di_EPs|%wf~Qb+;nQM%q9N4&z7FNB6Z+G+^+MR
|
||||
zj)|=QD8BER{dSeRdtd$LH*1N?VC!qI+*y}-;)|d<d&<cw#iye6@8<LL%{>!tvt|0N
|
||||
zm5Vlct%>!zH1~C#{PXnRXO%R17-p8ep7o3QUvcWms)tYH$`9TvKIF>&@BVzZ?VI=h
|
||||
zpErH+ydwvGOs@R*Hs)&kpXVngrCvTXb;0-d@xj~oPM7_l|L;HY`3dlY6p$IBU;poR
|
||||
XXyugpZ1#qMfq}u()z4*}Q$iB}^Bg|U
|
||||
|
||||
@@ -1,430 +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 e30b51ed329f0c66a2329da45996ef0fc0db8ffb..d91928799014596de519d1a1b3f1bb0a80ac925c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating
|
||||
|
||||
dependencies {
|
||||
// Purpur start
|
||||
- implementation(project(":purpur-api"))
|
||||
+ implementation(project(":plazma-api"))
|
||||
implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
||||
exclude("io.papermc.paper", "paper-api")
|
||||
}
|
||||
@@ -120,7 +120,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
|
||||
"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 ed3527612315e6e0649182ce4e1ae2834b0918a9..ae02c029f0169d30a34d4a4e65ea6cb4fa498111 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 ec268189b19b6fa5c4521f96ce211a531db35ec5..ce45a93fe835fd1ea4411c78df430aaa903c83c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -108,6 +108,18 @@ public class Main {
|
||||
*/ // CraftBukkit end
|
||||
|
||||
try {
|
||||
+ // 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┛
|
||||
+ """);
|
||||
+ if (org.plazmamc.plazma.Options.iKnowWhatIAmDoing)
|
||||
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
||||
+ // Plazma end
|
||||
// Paper start
|
||||
if (Boolean.getBoolean("Paper.isRunDev")) {
|
||||
net.minecraft.server.packs.VanillaPackResourcesBuilder.developmentConfig = builder -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b61c4d1ebb9c15a7ecd7bec5eb864851c053fb7e..b4d5bca6e3a39186a988098fb5d4cae97a776e79 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -913,7 +913,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/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index cda4544ae96a4fcb5c6c4483df67a59f1b53fd27..fe82a20efb2b130a568bc06aec5b86d3082062a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -58,7 +58,7 @@ 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", "Plazma Server"); // Purpur // Plazma
|
||||
public final boolean spawnAnimals = this.get("spawn-animals", true);
|
||||
public final boolean spawnNpcs = this.get("spawn-npcs", true);
|
||||
public final boolean pvp = this.get("pvp", true);
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index be7b3fe2dc84493dcde9e185717b0b7c7c2e9822..cfdaa744ff40c8a171ca9b36b305b326fc57c32c 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("Plazma Minecraft server"); // Purpur // Plazma
|
||||
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 // Purpur
|
||||
+ jframe.setName("Plazma Minecraft server"); // Paper // Purpur // Plazma
|
||||
|
||||
// Paper start - Add logo as frame image
|
||||
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("Plazma Minecraft server - shutting down!"); // Purpur // 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 25540a7f5631acd856726cdb44bace9be7dab401..36a1ac09bec7b4139d1cd44e6ecda72fc30fa8c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1323,7 +1323,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.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 db571f658f636cdda1dcdbaffa0c4da67fae11ad..0ba8a251bf1f5a7a6f27823686bf0d636feba769 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
|
||||
@@ -153,7 +153,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 a8a887236c68567816badc0620833755c84a4b03..09c292e22788fdf48b639265f24595e14aceba7a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -269,7 +269,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/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index d41f9c4a3c992b5dadacb4fcb1107235fff79fa8..49d0cd1275c6bf5165e4880dc322bc93ad3848f3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -141,7 +141,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 Plazma Version"); // Plazma - Rebranding
|
||||
|
||||
this.acceptsAll(Main.asList("demo"), "Demo mode");
|
||||
|
||||
@@ -192,7 +192,7 @@ public class Main {
|
||||
acceptsAll(asList("server-name"), "Name of the server")
|
||||
.withRequiredArg()
|
||||
.ofType(String.class)
|
||||
- .defaultsTo("Unknown Server")
|
||||
+ .defaultsTo("Plazma Server") // Plazma - Rebranding
|
||||
.describedAs("Name");
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 9c94fd78cbd0d3ef0c4dd3678262126b6ed2847b..653ba98a1b69f25b781f8794c7d2ae8c5445cfa6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -912,7 +912,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 7902c649a54fccbb13531c01e052df87ec4a424a..e8f50fdd7791fa8acc6eccdef40349845696b357 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -501,7 +501,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/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a858b7ddef7f6877c0b92f4150e0dd37bea121aa
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -0,0 +1,7 @@
|
||||
+package org.plazmamc.plazma;
|
||||
+
|
||||
+public interface Options {
|
||||
+
|
||||
+ boolean iKnowWhatIAmDoing = Boolean.getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 3633574e112f217b412217dd243a631dc4e9c40c..d0d31002562e728fa1a6c9bc81baa4534f11d365 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -231,7 +231,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 5fc8cc40ab627eba0b2110c73d31af213a935733..969ac1b2f824af361beec4afa00b15f13f6868ce 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -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 // Plazma
|
||||
//
|
||||
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, "------------------------------" );
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,333 +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 518591dd83289e041a16e2c2e7d7e7640d4b2e1b..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>0wfB10SKhDeA3M(2P@9RKhaLa`FzM=On387I
|
||||
z(?Ls3x|ce8PLU=$tj<ku06;?Ebdcc-ReS*eY6oX?OPr;_H8>LEE`dN{9MBSYcPt4F
|
||||
z04S>9u?VCq8V7Pf-*)y;0<Si;f<ewGCGZVd1Bd}u9qr_-6X1n53otZC2Dl>SQD7Bi
|
||||
zkRl#V65x);AwYO{HxF+(UJ3lCTsUcc`dShU`V)e4RRXJ>Dg;>?7=zR?UTBc41WX(W
|
||||
zm5~Kqk(YqNq-Esg#XwRJsGKB3P7*3D4u!#GAaE%u(60+j(&mM7gqvz;{nABxQUW{S
|
||||
za9Fscq@SOkgrBqo#_P5uR9;?Q5+WrjB_&Qmh<p2c;1GCm4{w3LC1{|%kzUSNoHND)
|
||||
zbSe?yfbqd8fk~GB<$^o*w^$GFUo?>jlf)yil28fAsY`zXQOMsotdE!5pUP24Nwgc<
|
||||
z9qobhCSjq!u~;Vz4&&{F`4^&pZ~qqsBx(%|e(U(Bwz#|hR^g4)^d-6Ri;#bc_BQv&
|
||||
zq9sky-WVS*BwEv#WTwEWH(0p37aD=Xc$s4`Zhr^L_-~Uz>guO~kq2GA;p~CJ_<0Ne
|
||||
z!x^*&0*6)tOF^Wh#UZ4qLCmF~a9Jt1EL0RC4~Ibhf*N2@&W`^76DkFVK;bgd{{>3Q
|
||||
z8WaMD_&>oY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v3NP2%#IeX=+W7Ni#8IjoTpc(!3<Z^&wgraQ+Ie66!#M2gbtQ34Uz6O<}jO*XaM8g
|
||||
z6C;4cj!mOQ|J||_)bfCXJ$~f0tTvCt3sM@w#~JVwVq5y+y(mvHNdc`$`Um)5h0U2x
|
||||
z)Mu{QO70#@WOQ8uNn4C0bVBT<?z(@Eo(2Ew(3$a-w+Ab}7*^JBmw<FTZ2pMaB)izF
|
||||
zgR1AVZ@axD<4}7I2AeCsuJwt>T*dt7!EX8Vl<I;?FO50vnpx1YTJ1jCX)(4)Nj{N%
|
||||
zQ849yy&@&j=J^g(>AzQq6uvFcs%W{$71OuAvW8Wpseg+*PVYLv?WMN=C|H@$;E<?2
|
||||
zy{V$HT%SB%FYRPvzJD%)C7_fo`ov>_S5fVp$L;GyupU7jZ$kfvC58X?uLqEZijH!v
|
||||
HqBZh=dic2S
|
||||
|
||||
@@ -5,10 +5,18 @@ 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 69c4d9cb0532621018f6cd99916c409fc150ab7e..5875aae8d7d0146ef9903d8b4bc2b673a615fd98 100644
|
||||
index d8006ae086c18a4ef43906d516eba0d5fd397f5f..57d29f8f3bc89529db9ee8f6dc3fffdbd4a03ceb 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -23,4 +23,23 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -3,6 +3,7 @@ package org.plazmamc.plazma.configurations;
|
||||
import io.papermc.paper.configuration.Configuration;
|
||||
import io.papermc.paper.configuration.ConfigurationPart;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+import org.spongepowered.configurate.objectmapping.meta.PostProcess;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
|
||||
@SuppressWarnings({"CanBeFinal", "FieldCanBeLocal", "FieldMayBeFinal", "InnerClassMayBeStatic"})
|
||||
@@ -23,4 +24,43 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
int version = VERSION;
|
||||
|
||||
@@ -25,6 +33,26 @@ index 69c4d9cb0532621018f6cd99916c409fc150ab7e..5875aae8d7d0146ef9903d8b4bc2b673
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ 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 Miscellaneous misc;
|
||||
+ public class Miscellaneous extends ConfigurationPart {
|
||||
+
|
||||
@@ -33,10 +61,10 @@ index 69c4d9cb0532621018f6cd99916c409fc150ab7e..5875aae8d7d0146ef9903d8b4bc2b673
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 842fb520a2d638aaa5bd0a7198190dbe3ecbe14c..a372b5be3b1da5868d3766a8ba58997a48118581 100644
|
||||
index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..8dce68cf7769fcd5ea03be32621ccb6bab174697 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -19,4 +19,32 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -19,4 +19,38 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@Setting(Configuration.VERSION_FIELD)
|
||||
int version = VERSION;
|
||||
|
||||
@@ -67,5 +95,11 @@ index 842fb520a2d638aaa5bd0a7198190dbe3ecbe14c..a372b5be3b1da5868d3766a8ba58997a
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public Block block;
|
||||
+ public class Block extends ConfigurationPart {
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
937
patches/server/0008-Port-SparklyPaper-patches.patch
Normal file
937
patches/server/0008-Port-SparklyPaper-patches.patch
Normal file
@@ -0,0 +1,937 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 25 Jan 2024 17:13:09 +0900
|
||||
Subject: [PATCH] Port SparklyPaper patches
|
||||
|
||||
SparklyPower
|
||||
Copyright (C) 2024 SparklyPower
|
||||
|
||||
Based on commit: 29212936a832106c4d68e2a2017acbea2fdd3cc4
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/MSPTCommand.java b/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
index 8b5293b0c696ef21d0101493ffa41b60bf0bc86b..03be23690a94a14d7343526acad67ccf53b85c70 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
@@ -78,6 +78,47 @@ public final class MSPTCommand extends Command {
|
||||
)
|
||||
)
|
||||
);
|
||||
+
|
||||
+ // Plazma start - Port SparklyPaper patches; Track World specific MSPT
|
||||
+ sender.sendMessage(text());
|
||||
+ sender.sendMessage(text().content("World tick times ").color(GOLD)
|
||||
+ .append(text().color(YELLOW)
|
||||
+ .append(
|
||||
+ text("("),
|
||||
+ text("avg", GRAY),
|
||||
+ text("/"),
|
||||
+ text("min", GRAY),
|
||||
+ text("/"),
|
||||
+ text("max", GRAY),
|
||||
+ text(")")
|
||||
+ )
|
||||
+ ).append(
|
||||
+ text(" from last 5s"),
|
||||
+ text(",", GRAY),
|
||||
+ text(" 10s"),
|
||||
+ text(",", GRAY),
|
||||
+ text(" 1m"),
|
||||
+ text(":", YELLOW)
|
||||
+ )
|
||||
+ );
|
||||
+ for (net.minecraft.server.level.ServerLevel level: server.getAllLevels()) {
|
||||
+ List<Component> worldTimes = new ArrayList<>();
|
||||
+ worldTimes.addAll(eval(level.tickTimes5s.getTimes()));
|
||||
+ worldTimes.addAll(eval(level.tickTimes10s.getTimes()));
|
||||
+ worldTimes.addAll(eval(level.tickTimes60s.getTimes()));
|
||||
+
|
||||
+ sender.sendMessage(text().content("◴ " + level.getWorld().getName() + ": ").color(GOLD)
|
||||
+ .append(text().color(GRAY)
|
||||
+ .append(
|
||||
+ worldTimes.get(0), SLASH, worldTimes.get(1), SLASH, worldTimes.get(2), text(", ", YELLOW),
|
||||
+ worldTimes.get(3), SLASH, worldTimes.get(4), SLASH, worldTimes.get(5), text(", ", YELLOW),
|
||||
+ worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8)
|
||||
+ )
|
||||
+ )
|
||||
+ );
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Track World specific MSPT
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java b/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
|
||||
index 62484ebf4550b05182f693a3180bbac5d5fd906d..8b39c463b90db2d4faa33471ddce65f775908f2f 100644
|
||||
--- a/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
|
||||
+++ b/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
|
||||
@@ -41,6 +41,7 @@ public final class EntityScheduler {
|
||||
|
||||
private long tickCount = 0L;
|
||||
private static final long RETIRED_TICK_COUNT = -1L;
|
||||
+ private static final net.minecraft.server.MinecraftServer SERVER = net.minecraft.server.MinecraftServer.getServer();
|
||||
private final Object stateLock = new Object();
|
||||
private final Long2ObjectOpenHashMap<List<ScheduledTask>> oneTimeDelayed = new Long2ObjectOpenHashMap<>();
|
||||
|
||||
@@ -61,14 +62,15 @@ public final class EntityScheduler {
|
||||
* @throws IllegalStateException If the scheduler is already retired.
|
||||
*/
|
||||
public void retire() {
|
||||
+ final Entity thisEntity = this.entity.getHandleRaw(); // Plazma - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
synchronized (this.stateLock) {
|
||||
if (this.tickCount == RETIRED_TICK_COUNT) {
|
||||
throw new IllegalStateException("Already retired");
|
||||
}
|
||||
this.tickCount = RETIRED_TICK_COUNT;
|
||||
+ SERVER.entitiesWithScheduledTasks.remove(thisEntity); // Plazma - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
}
|
||||
|
||||
- final Entity thisEntity = this.entity.getHandleRaw();
|
||||
|
||||
// correctly handle and order retiring while running executeTick
|
||||
for (int i = 0, len = this.currentlyExecuting.size(); i < len; ++i) {
|
||||
@@ -124,9 +126,12 @@ public final class EntityScheduler {
|
||||
if (this.tickCount == RETIRED_TICK_COUNT) {
|
||||
return false;
|
||||
}
|
||||
- this.oneTimeDelayed.computeIfAbsent(this.tickCount + Math.max(1L, delay), (final long keyInMap) -> {
|
||||
- return new ArrayList<>();
|
||||
- }).add(task);
|
||||
+ // Plazma start - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
+ SERVER.entitiesWithScheduledTasks.add(this.entity.getHandleRaw());
|
||||
+ this.oneTimeDelayed.computeIfAbsent(
|
||||
+ this.tickCount + Math.max(1L, delay), (final long keyInMap) -> new ArrayList<>()
|
||||
+ ).add(task);
|
||||
+ // Plazma end - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -143,6 +148,12 @@ public final class EntityScheduler {
|
||||
TickThread.ensureTickThread(thisEntity, "May not tick entity scheduler asynchronously");
|
||||
final List<ScheduledTask> toRun;
|
||||
synchronized (this.stateLock) {
|
||||
+ // Plazma start - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
+ if (this.currentlyExecuting.isEmpty() && this.oneTimeDelayed.isEmpty()) {
|
||||
+ SERVER.entitiesWithScheduledTasks.remove(thisEntity);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
if (this.tickCount == RETIRED_TICK_COUNT) {
|
||||
throw new IllegalStateException("Ticking retired scheduler");
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/util/player/NearbyPlayers.java b/src/main/java/io/papermc/paper/util/player/NearbyPlayers.java
|
||||
index f164256d59b761264876ca0c85f812d101bfd5de..deaeb134c47da8710afa747bf980bd00aab846d6 100644
|
||||
--- a/src/main/java/io/papermc/paper/util/player/NearbyPlayers.java
|
||||
+++ b/src/main/java/io/papermc/paper/util/player/NearbyPlayers.java
|
||||
@@ -106,6 +106,13 @@ public final class NearbyPlayers {
|
||||
return chunk == null ? null : chunk.players[type.ordinal()];
|
||||
}
|
||||
|
||||
+ // Plazma start - Port SparklyPaper patches; Cache coordinate key used for nearby players when ticking chunks
|
||||
+ public ReferenceList<ServerPlayer> getPlayers(final long nearbyCoordKey, final NearbyMapType type) {
|
||||
+ final TrackedChunk chunk = this.byChunk.get(nearbyCoordKey);
|
||||
+ return chunk == null ? null : chunk.players[type.ordinal()];
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Cache coordinate key used for nearby players when ticking chunks
|
||||
+
|
||||
public ReferenceList<ServerPlayer> getPlayersByChunk(final int chunkX, final int chunkZ, final NearbyMapType type) {
|
||||
final TrackedChunk chunk = this.byChunk.get(CoordinateUtils.getChunkKey(chunkX, chunkZ));
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 79ee153cd3c7bd3b2f34e7d30f70be5080cfa3c6..2452dae1e55165bd8c49c4670e3f2adb523de5da 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -321,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
|
||||
public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
|
||||
+ public final Set<Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // Plazma - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -1739,17 +1740,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
// Paper start - Folia scheduler API
|
||||
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
||||
- getAllLevels().forEach(level -> {
|
||||
- for (final Entity entity : level.getEntityLookup().getAllCopy()) { // Paper - rewrite chunk system
|
||||
- if (entity.isRemoved()) {
|
||||
- continue;
|
||||
- }
|
||||
- final org.bukkit.craftbukkit.entity.CraftEntity bukkit = entity.getBukkitEntityRaw();
|
||||
- if (bukkit != null) {
|
||||
- bukkit.taskScheduler.executeTick();
|
||||
- }
|
||||
- }
|
||||
- });
|
||||
+ // Plazma start - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
+ for (final Entity entity: entitiesWithScheduledTasks) {
|
||||
+ if (entity.isRemoved()) continue;
|
||||
+
|
||||
+ final org.bukkit.craftbukkit.entity.CraftEntity bukkit = entity.getBukkitEntityRaw();
|
||||
+ //noinspection ConstantValue
|
||||
+ if (bukkit != null) bukkit.taskScheduler.executeTick();
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
//this.profiler.push("commandFunctions"); // Purpur
|
||||
@@ -1816,7 +1815,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
+ // Plazma start - Port SparklyPaper patches; Track World specific MSPT
|
||||
+ long before = Util.getNanos();
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
+ long after = Util.getNanos() - before;
|
||||
+
|
||||
+ worldserver.tickTimes5s.add(this.tickCount, after);
|
||||
+ worldserver.tickTimes10s.add(this.tickCount, after);
|
||||
+ worldserver.tickTimes60s.add(this.tickCount, after);
|
||||
+ // Plazma end - Port SparklyPaper patches; Track World specific MSPT
|
||||
// Paper start
|
||||
for (final io.papermc.paper.chunk.SingleThreadChunkRegionManager regionManager : worldserver.getChunkSource().chunkMap.regionManagers) {
|
||||
regionManager.recalculateRegions();
|
||||
@@ -2595,7 +2602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
- //if (gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
||||
+ //if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 6cbbe9c692068edee7e66f85081ec95b8dd12101..3a2acbdcfb64dff5ecb686ba7ea405b488e6eca9 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -224,6 +224,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
+ net.sparklypower.sparklypaper.HalloweenManager.startSyncEpochTask(); // Plazma - Port SparklyPaper patches; Optimize Spooky Season
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 4b8776e760cca21e558c8fcb1e0e8d07c3589490..dd1a38488802080f961f87b73dfbb8229fb69e99 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1439,7 +1439,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end - Configurable entity tracking range by Y
|
||||
|
||||
// CraftBukkit start - respect vanish API
|
||||
- if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { // Paper - only consider hits
|
||||
+ if (flag && !player.getBukkitEntity().chunkMapCanSee(this.entity.getBukkitEntity())) { // Paper - only consider hits // Plazma - Port SparklyPaper patches; Optimize canSee check
|
||||
flag = false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 5eb7bcf492ee354ef775cd8d09c7ca2bdfeb7ce2..697cb18bce2f2470a0a2347ba6709e1449b360fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -615,7 +615,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
// Paper start - optimise chunk tick iteration
|
||||
com.destroystokyo.paper.util.maplist.ReferenceList<ServerPlayer> playersNearby
|
||||
- = nearbyPlayers.getPlayers(chunkcoordintpair, io.papermc.paper.util.player.NearbyPlayers.NearbyMapType.SPAWN_RANGE);
|
||||
+ = nearbyPlayers.getPlayers(chunk1.nearbyPlayersCoordinateKey, io.papermc.paper.util.player.NearbyPlayers.NearbyMapType.SPAWN_RANGE);
|
||||
if (playersNearby == null) {
|
||||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index e16dcb7f60bc3cf2cbef4674b23f12e1e5bd59d3..c3a4fcf600e72f9e95e9df673619ce37d0480cca 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -78,6 +78,7 @@ public class ServerEntity {
|
||||
private List<SynchedEntityData.DataValue<?>> trackedDataValues;
|
||||
// CraftBukkit start
|
||||
public final Set<ServerPlayerConnection> trackedPlayers; // Purpur - private -> public
|
||||
+ public static boolean skipSqrWhenNoDeltaChanges = false; // Plazma - SparklyPaper port; Skip distanceToSqr if the delta movement hasn't changed
|
||||
|
||||
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
|
||||
this.trackedPlayers = trackedPlayers;
|
||||
@@ -217,12 +218,15 @@ public class ServerEntity {
|
||||
|
||||
if ((this.trackDelta || this.entity.hasImpulse || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) && this.tickCount > 0) {
|
||||
Vec3 vec3d1 = this.entity.getDeltaMovement();
|
||||
- double d0 = vec3d1.distanceToSqr(this.ap);
|
||||
-
|
||||
- if (d0 > 1.0E-7D || d0 > 0.0D && vec3d1.lengthSqr() == 0.0D) {
|
||||
- this.ap = vec3d1;
|
||||
- this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.ap));
|
||||
+ // Plazma start - SparklyPaper port; Skip distanceToSqr if the delta movement hasn't changed
|
||||
+ if (!skipSqrWhenNoDeltaChanges && vec3d1 != this.ap) {
|
||||
+ double d0 = vec3d1.distanceToSqr(this.ap);
|
||||
+ if (d0 > 1.0E-7D || d0 > 0.0D && vec3d1.lengthSqr() == 0.0D) {
|
||||
+ this.ap = vec3d1;
|
||||
+ this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.ap));
|
||||
+ }
|
||||
}
|
||||
+ // Plazma end - SparklyPaper port; Skip distanceToSqr if the delta movement hasn't changed
|
||||
}
|
||||
|
||||
if (packet1 != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5456d2ded6f6e75c48868147e5a2dde5eb23bec8..e2de0c343098d65d830f27b4f80c3f8a9f18a7ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -233,6 +233,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
|
||||
public boolean hasRidableMoveEvent = false; // Purpur
|
||||
|
||||
+ // Plazma start - Port SparklyPaper patches; Track World specific MSPT
|
||||
+ public final MinecraftServer.TickTimes tickTimes5s = new MinecraftServer.TickTimes(100);
|
||||
+ public final MinecraftServer.TickTimes tickTimes10s = new MinecraftServer.TickTimes(200);
|
||||
+ public final MinecraftServer.TickTimes tickTimes60s = new MinecraftServer.TickTimes(1200);
|
||||
+ // Plazma end - Port SparklyPaper patches; Track World specific MSPT
|
||||
+
|
||||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
index f890738d3bb9fb5e70a9d323c6cec97f9948f9cf..eb3fc1af68768383d524cf0f50c4f4b304b9d5ca 100644
|
||||
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
@@ -90,12 +90,14 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
this.dirty.add(stat);
|
||||
}
|
||||
|
||||
+ /* // Plazma - Port SparklyPaper patches; Skip dirty stats copy when requesting player stats
|
||||
private Set<Stat<?>> getDirty() {
|
||||
Set<Stat<?>> set = Sets.newHashSet(this.dirty);
|
||||
|
||||
this.dirty.clear();
|
||||
return set;
|
||||
}
|
||||
+ */ // Plazma - Port SparklyPaper patches; Skip dirty stats copy when requesting player stats
|
||||
|
||||
public void parseLocal(DataFixer dataFixer, String json) {
|
||||
try {
|
||||
@@ -243,7 +245,7 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
|
||||
public void sendStats(ServerPlayer player) {
|
||||
Object2IntMap<Stat<?>> object2intmap = new Object2IntOpenHashMap();
|
||||
- Iterator iterator = this.getDirty().iterator();
|
||||
+ Iterator<Stat<?>> iterator = this.dirty.iterator(); // Plazma - SparklyPaper port; Skip dirty stats copy when requesting player stats
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Stat<?> statistic = (Stat) iterator.next();
|
||||
@@ -251,6 +253,7 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
object2intmap.put(statistic, this.getValue(statistic));
|
||||
}
|
||||
|
||||
+ this.dirty.clear(); // Plazma - SparklyPaper port; Skip dirty stats copy when requesting player stats
|
||||
player.connection.send(new ClientboundAwardStatsPacket(object2intmap));
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
index a70255995f380a9b0f7057cb5cb820f7655b93fc..2bffc790496fd9b09516d0d908b5319c9dbb1c63 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -306,7 +306,7 @@ public class Bat extends AmbientCreature {
|
||||
int i = world.getMaxLocalRawBrightness(pos);
|
||||
byte b0 = 4;
|
||||
|
||||
- if (Bat.isHalloweenSeason(world.getMinecraftWorld())) { // Purpur
|
||||
+ if (isSpookySeason(world.getMinecraftWorld())) { // Purpur // Plazma - Port SparklyPaper patches; Optimize Spooky Season
|
||||
b0 = 7;
|
||||
} else if (random.nextBoolean()) {
|
||||
return false;
|
||||
@@ -320,7 +320,25 @@ public class Bat extends AmbientCreature {
|
||||
private static boolean isSpookySeason = false;
|
||||
private static final int ONE_HOUR = 20 * 60 * 60;
|
||||
private static int lastSpookyCheck = -ONE_HOUR;
|
||||
- public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur
|
||||
+
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize Spooky Season
|
||||
+ private static boolean isSpookySeason(Level level) {
|
||||
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize)
|
||||
+ return net.sparklypower.sparklypaper.HalloweenManager.isSpookySeason()
|
||||
+ || net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
||||
+ return isHalloween();
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isHalloweenSeason(Level level) {
|
||||
+ if (level.purpurConfig.forceHalloweenSeason) return true;
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.spookyOptimize)
|
||||
+ return net.sparklypower.sparklypaper.HalloweenManager.isHalloween();
|
||||
+ return isHalloween();
|
||||
+ }
|
||||
+
|
||||
+ @SuppressWarnings("RedundantExplicitChronoField")
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize Spooky Season
|
||||
private static boolean isHalloween() {
|
||||
if (net.minecraft.server.MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) {
|
||||
LocalDate localdate = LocalDate.now();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 608390ed36710a419de1542b80340dd3fcc7299c..043f068345ca3c50209c1c3cc1feb6277a3da61a 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -268,11 +268,13 @@ public class MapItem extends ComplexItem {
|
||||
}
|
||||
}
|
||||
|
||||
+ public static boolean skipTickWhenCraftNotPresent = false; // Plazma - SparklyPaper port; Skip map item ticking if the craft map renderer is not present
|
||||
@Override
|
||||
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) {
|
||||
if (!world.isClientSide) {
|
||||
MapItemSavedData mapItemSavedData = getSavedData(stack, world);
|
||||
if (mapItemSavedData != null) {
|
||||
+ if (skipTickWhenCraftNotPresent && mapItemSavedData.mapView.getRenderers().stream().noneMatch(mapRenderer -> mapRenderer.getClass() == org.bukkit.craftbukkit.map.CraftMapRenderer.class)) return; // Plazma - SparklyPaper port; Skip map item ticking if the craft map renderer is not present
|
||||
if (entity instanceof Player player) {
|
||||
mapItemSavedData.tickCarriedBy(player, stack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index df73867ee5682fb966b69dd85da61a6928d8dab3..5712ab081e9534f60248caaceea44445ff855e30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1339,6 +1339,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
boolean flag = this.tickRateManager().runsNormally();
|
||||
|
||||
int tilesThisCycle = 0;
|
||||
+ int shouldTickBlocksAtLastResult = -1; // Plazma - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
+ long shouldTickBlocksAtChunkPos = 0; // Plazma - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - Fix MC-117075; use removeAll
|
||||
toRemove.add(null); // Paper - Fix MC-117075
|
||||
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
@@ -1351,14 +1353,28 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
tilesThisCycle--;
|
||||
toRemove.add(tickingblockentity); // Paper - Fix MC-117075; use removeAll
|
||||
// Spigot end
|
||||
- } else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
|
||||
- tickingblockentity.tick();
|
||||
- // Paper start - execute chunk tasks during tick
|
||||
- if ((this.tileTickPosition & 7) == 0) {
|
||||
- MinecraftServer.getServer().executeMidTickTasks();
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
+ } else if (flag) {
|
||||
+ long chunkPos = tickingblockentity.getChunkCoordinateKey();
|
||||
+ boolean shouldTick;
|
||||
+ if (shouldTickBlocksAtChunkPos == chunkPos && shouldTickBlocksAtLastResult != -1)
|
||||
+ shouldTick = shouldTickBlocksAtLastResult == 1;
|
||||
+ else {
|
||||
+ shouldTick = this.shouldTickBlocksAt(chunkPos);
|
||||
+ shouldTickBlocksAtLastResult = shouldTick ? 1 : 0;
|
||||
+ shouldTickBlocksAtChunkPos = chunkPos;
|
||||
+ }
|
||||
+
|
||||
+ if (shouldTick) {
|
||||
+ tickingblockentity.tick();
|
||||
+ // Paper start - execute chunk tasks during tick
|
||||
+ if ((this.tileTickPosition & 7) == 0) {
|
||||
+ MinecraftServer.getServer().executeMidTickTasks();
|
||||
+ }
|
||||
+ // Paper end - execute chunk tasks during tick
|
||||
}
|
||||
- // Paper end - execute chunk tasks during tick
|
||||
}
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
}
|
||||
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
index 5a190834baef60c7b61074393f8856a933902d81..366ae05a060b5b12b85521a4b8aed1907f3f044a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
@@ -77,35 +77,57 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
|
||||
|
||||
@Override
|
||||
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||
- if (world.getRawBrightness(pos, 0) >= 9) {
|
||||
- int i = this.getAge(state);
|
||||
-
|
||||
- if (i < this.getMaxAge()) {
|
||||
- float f = CropBlock.getGrowthSpeed(this, world, pos);
|
||||
-
|
||||
- // Spigot start
|
||||
- int modifier;
|
||||
- if (this == Blocks.BEETROOTS) {
|
||||
- modifier = world.spigotConfig.beetrootModifier;
|
||||
- } else if (this == Blocks.CARROTS) {
|
||||
- modifier = world.spigotConfig.carrotModifier;
|
||||
- } else if (this == Blocks.POTATOES) {
|
||||
- modifier = world.spigotConfig.potatoModifier;
|
||||
- // Paper start - Fix Spigot growth modifiers
|
||||
- } else if (this == Blocks.TORCHFLOWER_CROP) {
|
||||
- modifier = world.spigotConfig.torchFlowerModifier;
|
||||
- // Paper end - Fix Spigot growth modifiers
|
||||
- } else {
|
||||
- modifier = world.spigotConfig.wheatModifier;
|
||||
- }
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize Farm checks
|
||||
+ if (world.getRawBrightness(pos, 0) < 9) return;
|
||||
+
|
||||
+ int age = this.getAge(state);
|
||||
+ if (age >= this.getMaxAge()) return;
|
||||
+
|
||||
+ final int modifier;
|
||||
+ if (this == Blocks.BEETROOTS) {
|
||||
+ modifier = world.spigotConfig.beetrootModifier;
|
||||
+ } else if (this == Blocks.CARROTS) {
|
||||
+ modifier = world.spigotConfig.carrotModifier;
|
||||
+ } else if (this == Blocks.POTATOES) {
|
||||
+ modifier = world.spigotConfig.potatoModifier;
|
||||
+ } else if (this == Blocks.TORCHFLOWER_CROP) {
|
||||
+ modifier = world.spigotConfig.torchFlowerModifier;
|
||||
+ } else {
|
||||
+ modifier = world.spigotConfig.wheatModifier;
|
||||
+ }
|
||||
|
||||
- if (random.nextFloat() < (modifier / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
- // Spigot end
|
||||
- CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(i + 1), 2); // CraftBukkit
|
||||
- }
|
||||
+ if (world.plazmaConfig().block.optimizeFarmCheck.enabled) {
|
||||
+ BlockPos current = pos.below();
|
||||
+ BlockState currentState = world.getBlockState(current);
|
||||
+
|
||||
+ boolean moist;
|
||||
+ float growthSpeed;
|
||||
+ if (currentState.is(Blocks.FARMLAND) && currentState.getValue(FarmBlock.MOISTURE) > 0) {
|
||||
+ moist = true;
|
||||
+ growthSpeed = world.plazmaConfig().block.optimizeFarmCheck.growthSpeed.moist;
|
||||
+ } else {
|
||||
+ moist = false;
|
||||
+ growthSpeed = world.plazmaConfig().block.optimizeFarmCheck.growthSpeed.normal;
|
||||
}
|
||||
+
|
||||
+ if (world.plazmaConfig().block.optimizeFarmCheck.skipMiddleAgingStageForCrops) {
|
||||
+ growthSpeed = growthSpeed / getMaxAge();
|
||||
+ age = getMaxAge() - 1;
|
||||
+ }
|
||||
+
|
||||
+ if (random.nextFloat() >= (modifier / (100.0f * Math.floor((25.0F / growthSpeed) + 1)))) return;
|
||||
+ if (!CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(age + 1), 2)) return;
|
||||
+ if (!moist || age + 1 != this.getMaxAge() || FarmBlock.isNearWater(world, current)) return;
|
||||
+
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, current, currentState.setValue(FarmBlock.MOISTURE, 0), 2);
|
||||
+ return;
|
||||
}
|
||||
|
||||
+ float growthSpeed = CropBlock.getGrowthSpeed(this, world, pos);
|
||||
+
|
||||
+ if (random.nextFloat() < (modifier / (100.0f * Math.floor((25.0F / growthSpeed) + 1))))
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(age + 1), 2);
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize Farm checks
|
||||
}
|
||||
|
||||
public void growCrops(Level world, BlockPos pos, BlockState state) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
index d0ec0722496ed931b48c4e7076fddbb1ed36e111..b91afbc90c138ebb7f8722934f59f953642196c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||
@@ -92,7 +92,19 @@ public class FarmBlock extends Block {
|
||||
|
||||
@Override
|
||||
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||
- int i = (Integer) state.getValue(FarmBlock.MOISTURE);
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize Farm checks
|
||||
+ int i = state.getValue(FarmBlock.MOISTURE);
|
||||
+ if (world.plazmaConfig().block.optimizeFarmCheck.enabled) {
|
||||
+ if (i != 0) return;
|
||||
+
|
||||
+ if (isNearWater(world, pos))
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, pos, state.setValue(MOISTURE, 7), 2);
|
||||
+ else
|
||||
+ turnToDirt(null, state, world, pos);
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize Farm checks
|
||||
if (i > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
||||
if (i == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
||||
|
||||
@@ -167,7 +179,7 @@ public class FarmBlock extends Block {
|
||||
return world.getBlockState(pos.above()).is(BlockTags.MAINTAINS_FARMLAND);
|
||||
}
|
||||
|
||||
- private static boolean isNearWater(LevelReader world, BlockPos pos) {
|
||||
+ static boolean isNearWater(LevelReader world, BlockPos pos) { // Plazma - AT (private -> package)
|
||||
// Paper start - Perf: remove abstract block iteration
|
||||
int xOff = pos.getX();
|
||||
int yOff = pos.getY();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/StemBlock.java b/src/main/java/net/minecraft/world/level/block/StemBlock.java
|
||||
index 924d80eb41d9a71d1e521c40742557251cf51832..4a30e1e6eac4b0e3dc2147a74e73e05fa76f5db2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/StemBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/StemBlock.java
|
||||
@@ -72,38 +72,82 @@ public class StemBlock extends BushBlock implements BonemealableBlock {
|
||||
|
||||
@Override
|
||||
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||
- if (world.getRawBrightness(pos, 0) >= 9) {
|
||||
- float f = CropBlock.getGrowthSpeed(this, world, pos);
|
||||
-
|
||||
- if (random.nextFloat() < ((this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
- int i = (Integer) state.getValue(StemBlock.AGE);
|
||||
-
|
||||
- if (i < 7) {
|
||||
- state = (BlockState) state.setValue(StemBlock.AGE, i + 1);
|
||||
- CraftEventFactory.handleBlockGrowEvent(world, pos, state, 2); // CraftBukkit
|
||||
- } else {
|
||||
- Direction enumdirection = Direction.Plane.HORIZONTAL.getRandomDirection(random);
|
||||
- BlockPos blockposition1 = pos.relative(enumdirection);
|
||||
- BlockState iblockdata1 = world.getBlockState(blockposition1.below());
|
||||
-
|
||||
- if (world.getBlockState(blockposition1).isAir() && (iblockdata1.is(Blocks.FARMLAND) || iblockdata1.is(BlockTags.DIRT))) {
|
||||
- Registry<Block> iregistry = world.registryAccess().registryOrThrow(Registries.BLOCK);
|
||||
- Optional<Block> optional = iregistry.getOptional(this.fruit);
|
||||
- Optional<Block> optional1 = iregistry.getOptional(this.attachedStem);
|
||||
-
|
||||
- if (optional.isPresent() && optional1.isPresent()) {
|
||||
- // CraftBukkit start
|
||||
- if (!CraftEventFactory.handleBlockGrowEvent(world, blockposition1, ((Block) optional.get()).defaultBlockState())) {
|
||||
- return;
|
||||
- }
|
||||
- // CraftBukkit end
|
||||
- world.setBlockAndUpdate(pos, (BlockState) ((Block) optional1.get()).defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, enumdirection));
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize Farm checks
|
||||
+ if (world.getRawBrightness(pos, 0) < 9) return;
|
||||
+
|
||||
+ int modifier = this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier;
|
||||
+
|
||||
+ if (world.plazmaConfig().block.optimizeFarmCheck.enabled) {
|
||||
+ final BlockPos current = pos.below();
|
||||
+ final BlockState currentState = world.getBlockState(current);
|
||||
+
|
||||
+ final boolean moist;
|
||||
+ final float growthSpeed;
|
||||
+ if (currentState.is(Blocks.FARMLAND) && currentState.getValue(FarmBlock.MOISTURE) > 0) {
|
||||
+ moist = true;
|
||||
+ growthSpeed = world.plazmaConfig().block.optimizeFarmCheck.growthSpeed.moist;
|
||||
+ } else {
|
||||
+ moist = false;
|
||||
+ growthSpeed = world.plazmaConfig().block.optimizeFarmCheck.growthSpeed.normal;
|
||||
}
|
||||
|
||||
+ if (random.nextFloat() >= (modifier / (100.0f * Math.floor((25.0F / growthSpeed) + 1)))) return;
|
||||
+
|
||||
+ int age = state.getValue(AGE);
|
||||
+
|
||||
+ if (age < 7) {
|
||||
+ CraftEventFactory.handleMoistureChangeEvent(world, pos, state.setValue(AGE, age + 1), 2);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
|
||||
+ BlockPos pos1 = pos.relative(direction);
|
||||
+ BlockState state1 = world.getBlockState(pos1.below());
|
||||
+
|
||||
+ if (!world.getBlockState(pos1).isAir() || (!state1.is(Blocks.FARMLAND) && !state1.is(BlockTags.DIRT)))
|
||||
+ return;
|
||||
+
|
||||
+ Registry<Block> registry = world.registryAccess().registryOrThrow(Registries.BLOCK);
|
||||
+ Optional<Block> fruit = registry.getOptional(this.fruit);
|
||||
+ Optional<Block> stem = registry.getOptional(this.attachedStem);
|
||||
+
|
||||
+ if (fruit.isEmpty() || stem.isEmpty()) return;
|
||||
+ if (!CraftEventFactory.handleBlockGrowEvent(world, pos1, fruit.get().defaultBlockState())) return;
|
||||
+ if (moist && !FarmBlock.isNearWater(world, current))
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, current, currentState.setValue(FarmBlock.MOISTURE, 0), 2);
|
||||
+
|
||||
+ world.setBlockAndUpdate(pos, stem.get().defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, direction));
|
||||
+ return;
|
||||
}
|
||||
+
|
||||
+ float f = CropBlock.getGrowthSpeed(this, world, pos);
|
||||
+
|
||||
+ if (random.nextFloat() >= (modifier / (100.0f * Math.floor((25.0F / f) + 1)))) return;
|
||||
+
|
||||
+ int age = state.getValue(StemBlock.AGE);
|
||||
+
|
||||
+ if (age < 7) {
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, pos, state.setValue(StemBlock.AGE, age + 1), 2);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
|
||||
+ BlockPos pos1 = pos.relative(direction);
|
||||
+ BlockState state1 = world.getBlockState(pos1.below());
|
||||
+
|
||||
+ if (!world.getBlockState(pos1).isAir() || (!state1.is(Blocks.FARMLAND) && !state1.is(BlockTags.DIRT))) return;
|
||||
+
|
||||
+ Registry<Block> registry = world.registryAccess().registryOrThrow(Registries.BLOCK);
|
||||
+ Optional<Block> fruit = registry.getOptional(this.fruit);
|
||||
+ Optional<Block> stem = registry.getOptional(this.attachedStem);
|
||||
+
|
||||
+ if (fruit.isEmpty() || stem.isEmpty()) return;
|
||||
+
|
||||
+ if (!CraftEventFactory.handleBlockGrowEvent(world, pos1, fruit.get().defaultBlockState()))
|
||||
+ return;
|
||||
+
|
||||
+ world.setBlockAndUpdate(pos, stem.get().defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, direction));
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize Farm checks
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
|
||||
index 28e3b73507b988f7234cbf29c4024c88180d0aef..6239c171ca996f3f5c23060f728a62236bc8b6d5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
|
||||
@@ -10,4 +10,6 @@ public interface TickingBlockEntity {
|
||||
BlockPos getPos();
|
||||
|
||||
String getType();
|
||||
+
|
||||
+ long getChunkCoordinateKey(); // Plazma - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 1aac95b03a9e2e37c24f2a30bcb259c1424e1c78..e7c0c36fd3455c0536e98259b46dbcc952d90e01 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -66,6 +66,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
protected volatile boolean unsaved;
|
||||
private volatile boolean isLightCorrect;
|
||||
protected final ChunkPos chunkPos; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
|
||||
+ public final long nearbyPlayersCoordinateKey; // Plazma - Port SparklyPaper patches; Cache coordinate key used for nearby players when ticking chunks
|
||||
private long inhabitedTime;
|
||||
/** @deprecated */
|
||||
@Nullable
|
||||
@@ -140,6 +141,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
// Paper end - rewrite light engine
|
||||
this.locX = pos.x; this.locZ = pos.z; // Paper - reduce need for field lookups
|
||||
this.chunkPos = pos; this.coordinateKey = ChunkPos.asLong(locX, locZ); // Paper - cache long key
|
||||
+ this.nearbyPlayersCoordinateKey = io.papermc.paper.util.CoordinateUtils.getChunkKey(locX, locZ); // Plazma - Port SparklyPaper patches; Cache coordinate key used for nearby players when ticking chunks
|
||||
this.upgradeData = upgradeData;
|
||||
this.levelHeightAccessor = heightLimitView;
|
||||
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index ab4dd0c8b4b17ff1b54c06b72dc8b3caba430fe2..e026dc9ed15284f55cdd4bc99c0718aba6d2e8c6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -75,6 +75,8 @@ public class LevelChunk extends ChunkAccess {
|
||||
public String getType() {
|
||||
return "<null>";
|
||||
}
|
||||
+
|
||||
+ @Override public long getChunkCoordinateKey() { return 0; } // Plazma - Port SparklyPaper patches; Optimize tickingBlockEntities
|
||||
};
|
||||
private final Map<BlockPos, LevelChunk.RebindableTickingBlockEntityWrapper> tickersInLevel;
|
||||
public boolean loaded;
|
||||
@@ -1101,7 +1103,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
|
||||
private <T extends BlockEntity> TickingBlockEntity createTicker(T blockEntity, BlockEntityTicker<T> blockEntityTicker) {
|
||||
- return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker);
|
||||
+ return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker, this.coordinateKey); // Plazma - Port SparklyPaper patches; Optimize TickingBlockEntity
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
@@ -1152,17 +1154,21 @@ public class LevelChunk extends ChunkAccess {
|
||||
public String toString() {
|
||||
return String.valueOf(this.ticker) + " <wrapped>";
|
||||
}
|
||||
+
|
||||
+ @Override public long getChunkCoordinateKey() { return this.ticker.getChunkCoordinateKey(); } // Plazma - Port SparklyPaper patches; Optimize TickingBlockEntity
|
||||
}
|
||||
|
||||
private class BoundTickingBlockEntity<T extends BlockEntity> implements TickingBlockEntity {
|
||||
|
||||
+ private final long chunkCoordinateKey; // Plazma - Port SparklyPaper patches; Optimize TickingBlockEntity
|
||||
private final T blockEntity;
|
||||
private final BlockEntityTicker<T> ticker;
|
||||
private boolean loggedInvalidBlockState;
|
||||
|
||||
- BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker) {
|
||||
+ BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker, long chunkCoordinateKey) {
|
||||
this.blockEntity = (T) tileentity; // CraftBukkit - decompile error
|
||||
this.ticker = blockentityticker;
|
||||
+ this.chunkCoordinateKey = chunkCoordinateKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1230,5 +1236,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
return "Level ticker for " + s + "@" + String.valueOf(this.getPos());
|
||||
}
|
||||
+
|
||||
+ @Override public long getChunkCoordinateKey() { return this.chunkCoordinateKey; } // Plazma - Port SparklyPaper patches; Optimize TickingBlockEntity
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f8c26e26025d7a7b5489ed5b3274ba734db27a1d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
|
||||
@@ -0,0 +1,78 @@
|
||||
+package net.sparklypower.sparklypaper;
|
||||
+
|
||||
+import com.mojang.logging.LogUtils;
|
||||
+import it.unimi.dsi.fastutil.Pair;
|
||||
+import net.minecraft.world.level.Level;
|
||||
+import org.slf4j.Logger;
|
||||
+import java.time.LocalDateTime;
|
||||
+import java.time.Month;
|
||||
+import java.time.ZoneOffset;
|
||||
+import java.util.concurrent.CountDownLatch;
|
||||
+import java.util.concurrent.Executors;
|
||||
+import java.util.concurrent.ScheduledExecutorService;
|
||||
+import java.util.concurrent.ScheduledFuture;
|
||||
+import java.util.concurrent.TimeUnit;
|
||||
+import java.util.concurrent.atomic.AtomicBoolean;
|
||||
+
|
||||
+import static org.plazmamc.plazma.configurations.GlobalConfiguration.get;
|
||||
+
|
||||
+public class HalloweenManager {
|
||||
+
|
||||
+ private static final Logger LOGGER = LogUtils.getClassLogger();
|
||||
+ private static final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor(factory -> {
|
||||
+ Thread thread = new Thread(factory);
|
||||
+ thread.setName("halloween-timer-updater");
|
||||
+ thread.setPriority(1);
|
||||
+ return thread;
|
||||
+ });
|
||||
+
|
||||
+ private static ScheduledFuture<?> future;
|
||||
+ private static Pair<Long, Long> spookyEpoch;
|
||||
+ private static Pair<Long, Long> halloweenEpoch;
|
||||
+
|
||||
+ private static long getEpochMillisAtDate(Month month, int day, boolean start) {
|
||||
+ LocalDateTime now = LocalDateTime.now();
|
||||
+ LocalDateTime target = LocalDateTime.of(
|
||||
+ now.getYear(), month, day, start ? 0 : 23, start ? 0 : 59, start ? 0 : 59, start ? 0 : 999_999_999
|
||||
+ );
|
||||
+
|
||||
+ if (now.isAfter(target)) target = target.plusYears(1);
|
||||
+ return target.atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli();
|
||||
+ }
|
||||
+
|
||||
+ private static void syncEpoch() {
|
||||
+ LOGGER.info("Updating Spooky Season and Halloween epoch...");
|
||||
+ spookyEpoch = Pair.of(
|
||||
+ getEpochMillisAtDate(Month.OCTOBER, 20, true),
|
||||
+ getEpochMillisAtDate(Month.NOVEMBER, 3, false)
|
||||
+ );
|
||||
+ halloweenEpoch = Pair.of(
|
||||
+ getEpochMillisAtDate(Month.OCTOBER, 31, true),
|
||||
+ getEpochMillisAtDate(Month.OCTOBER, 31, false)
|
||||
+ );
|
||||
+ LOGGER.info("Successfully updated Spooky Season and Halloween epoch");
|
||||
+ }
|
||||
+
|
||||
+ public static void syncConfiguration() {
|
||||
+ if (get().entity.spookyOptimize && future == null) {
|
||||
+ startSyncEpochTask();
|
||||
+ } else if (!get().entity.spookyOptimize && future != null) {
|
||||
+ future.cancel(true);
|
||||
+ future = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void startSyncEpochTask() {
|
||||
+ if (!get().entity.spookyOptimize) return;
|
||||
+ future = EXECUTOR.scheduleAtFixedRate(HalloweenManager::syncEpoch, 0, 90, TimeUnit.DAYS);
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isSpookySeason() {
|
||||
+ return spookyEpoch.first() <= System.currentTimeMillis() && System.currentTimeMillis() <= spookyEpoch.second();
|
||||
+ }
|
||||
+
|
||||
+ public static boolean isHalloween() {
|
||||
+ return halloweenEpoch.first() <= System.currentTimeMillis() && System.currentTimeMillis() <= halloweenEpoch.second();
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 241340a6d66f17f2a31fb03ff0dfab121b856368..a6cf73d104e66971a61ac979d4a6d58a97478613 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -976,7 +976,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void sendMultiBlockChange(final Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges) {
|
||||
if (this.getHandle().connection == null) return;
|
||||
|
||||
- Map<SectionPos, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<net.minecraft.world.level.block.state.BlockState>> sectionMap = new HashMap<>();
|
||||
+ Map<SectionPos, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<net.minecraft.world.level.block.state.BlockState>> sectionMap = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(); // Plazma - Port SparklyPaper patches; Optimize canSee checks
|
||||
|
||||
for (Map.Entry<? extends io.papermc.paper.math.Position, BlockData> entry : blockChanges.entrySet()) {
|
||||
BlockData blockData = entry.getValue();
|
||||
@@ -2237,9 +2237,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public boolean canSee(org.bukkit.entity.Entity entity) {
|
||||
- return this.equals(entity) || entity.isVisibleByDefault() ^ this.invertedVisibilityEntities.containsKey(entity.getUniqueId()); // SPIGOT-7312: Can always see self
|
||||
+ return this.equals(entity) || this.chunkMapCanSee(entity); // SPIGOT-7312: Can always see self // Plazma - Port SparklyPaper patches; Optimize canSee check
|
||||
}
|
||||
|
||||
+ // Plazma start - Port SparklyPaper patches; Optimize canSee check (The check in ChunkMap#updatePlayer already rejects if it is the same entity, so we don't need to check it twice, especially because CraftPlayer's equals check is a bit expensive)
|
||||
+ public boolean chunkMapCanSee(org.bukkit.entity.Entity entity) {
|
||||
+ return entity.isVisibleByDefault() ^ (!invertedVisibilityEntities.isEmpty() && this.invertedVisibilityEntities.containsKey(entity.getUniqueId()));
|
||||
+ }
|
||||
+ // Plazma end - Port SparklyPaper patches; Optimize canSee check
|
||||
+
|
||||
public boolean canSeePlayer(UUID uuid) {
|
||||
org.bukkit.entity.Entity entity = this.getServer().getPlayer(uuid);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
|
||||
index 8149b9c51b78eb5c689b7218a2ca3aab60e73bcf..b9a303f6280a2f6ad3616da152922a4f4a504281 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
|
||||
@@ -145,7 +145,7 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public boolean isCached() {
|
||||
+ public synchronized boolean isCached() { // Plazma - Fix concurrency issues when using "imageToBytes" in multiple threads
|
||||
return this.cached || (!this.running.get() && this.initCache().isDone());
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 57d29f8f3bc89529db9ee8f6dc3fffdbd4a03ceb..73dd69941a004b4a2ec244f28d8683e9bdb0a445 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -40,9 +40,12 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Entity entity;
|
||||
public class Entity extends ConfigurationPart {
|
||||
|
||||
+ boolean skipSqrWhenNoDeltaChanges = OPTIMIZE;
|
||||
+ public boolean spookyOptimize = OPTIMIZE;
|
||||
|
||||
@PostProcess
|
||||
public void post() {
|
||||
+ net.minecraft.server.level.ServerEntity.skipSqrWhenNoDeltaChanges = this.skipSqrWhenNoDeltaChanges;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,9 +53,11 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public World world;
|
||||
public class World extends ConfigurationPart {
|
||||
|
||||
+ boolean skipTickWhenCraftNotPresent = OPTIMIZE;
|
||||
|
||||
@PostProcess
|
||||
public void post() {
|
||||
+ net.minecraft.world.item.MapItem.skipTickWhenCraftNotPresent = this.skipTickWhenCraftNotPresent;
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 8dce68cf7769fcd5ea03be32621ccb6bab174697..069a9f8504c74d939b1df569f082cc7bd33d9cfc 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -49,7 +49,22 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
|
||||
public Block block;
|
||||
public class Block extends ConfigurationPart {
|
||||
-
|
||||
+
|
||||
+ public OptimizeFarmCheck optimizeFarmCheck;
|
||||
+ public class OptimizeFarmCheck extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean enabled = OPTIMIZE;
|
||||
+ public boolean skipMiddleAgingStageForCrops = true;
|
||||
+
|
||||
+ public GrowthSpeed growthSpeed;
|
||||
+ public class GrowthSpeed extends ConfigurationPart {
|
||||
+
|
||||
+ public int normal = 1;
|
||||
+ public int moist = 4;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Always agree EULA on development mode
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index ce45a93fe835fd1ea4411c78df430aaa903c83c3..9b8bdffbbfe45c6712d0f4da3643424fa94fc69e 100644
|
||||
index 4911a6d25d12eb9d2b263aeb9b7f521ff828397a..29eef278940cab33a1f5f168f66ab2b80f0d60ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -178,6 +178,7 @@ public class Main {
|
||||
@@ -166,6 +166,7 @@ public class Main {
|
||||
|
||||
// Spigot Start
|
||||
boolean eulaAgreed = Boolean.getBoolean( "com.mojang.eula.agree" );
|
||||
+ eulaAgreed = eulaAgreed || Boolean.getBoolean("Paper.isRunDev"); // Plazma
|
||||
+ 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." );
|
||||
|
||||
@@ -5,14 +5,16 @@ 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..f006c867ad0765e0f52a629729ab131acec5c2fc 100644
|
||||
index 81b204c03b3c9a997f00fd423daa963757cb0daf..67e299893b7e1a64ab2962d79c2434dad189eed5 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,16 +636,52 @@ public class Metrics {
|
||||
@@ -636,38 +636,59 @@ public class Metrics {
|
||||
return map;
|
||||
}));
|
||||
|
||||
+ // Plazma start
|
||||
- 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);
|
||||
@@ -22,13 +24,19 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ 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 return Collections.singletonMap("50+", entry);
|
||||
+ else if (datapacks <= 100) return Collections.singletonMap("51+", entry);
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDE2E", entry);
|
||||
+ }));
|
||||
+
|
||||
+ List<Plugin> plugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).toList();
|
||||
+
|
||||
|
||||
- // 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 = (int) plugins.stream().filter(Plugin::isEnabled).count();
|
||||
+ 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);
|
||||
@@ -36,11 +44,30 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ 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 return Collections.singletonMap("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 = (int) plugins.stream().filter(java.util.function.Predicate.not(Plugin::isEnabled)).count();
|
||||
+ 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:
|
||||
@@ -48,22 +75,24 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ 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("50-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else if (disabled <= 100) return Collections.singletonMap("51-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
+ }));
|
||||
+ // Plazma end
|
||||
|
||||
- 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);
|
||||
+
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ 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
|
||||
}
|
||||
|
||||
// count legacy plugins
|
||||
- int legacy = 0;
|
||||
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
- if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
|
||||
- legacy++;
|
||||
- }
|
||||
- }
|
||||
+ int legacy = (int) plugins.stream().filter(p -> CraftMagicNumbers.isLegacy(p.getDescription())).count(); // Plazma
|
||||
|
||||
// insert real value as lower dimension
|
||||
Map<String, Integer> entry = new HashMap<>();
|
||||
}
|
||||
|
||||
@@ -9,49 +9,48 @@ Subject: [PATCH] Optimize default configurations
|
||||
- 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 9ca1494497ae53e56b1f81fda51b0b8bd02a6d03..97b1366d25537d68469e95ac101b1b8cf9fdc997 100644
|
||||
index cba3d725245223c5d9e8e59dcceec61f0acc1b85..63af4c9e2bc662e08ebf858d84933b3e4e3b92cb 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -64,7 +64,7 @@ public class PufferfishConfig {
|
||||
@@ -72,7 +72,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 - Nope
|
||||
+ // "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");
|
||||
|
||||
@@ -211,7 +211,7 @@ public class PufferfishConfig {
|
||||
@@ -227,7 +227,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", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma - Optimize default configurations
|
||||
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
|
||||
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 {
|
||||
@@ -241,12 +241,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", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()); // Purpur // Plazma - Optimize default configurations
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()); // Purpur
|
||||
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,
|
||||
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", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 8,
|
||||
"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", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 8, // Plazma - Optimize default configurations
|
||||
"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.",
|
||||
@@ -253,8 +253,18 @@ public class PufferfishConfig {
|
||||
activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
|
||||
@@ -269,8 +269,18 @@ public class PufferfishConfig {
|
||||
public static Map<String, Integer> projectileTimeouts;
|
||||
private static void projectileTimeouts() {
|
||||
// Set some defaults
|
||||
- getInt("entity_timeouts.SNOWBALL", -1);
|
||||
- getInt("entity_timeouts.LLAMA_SPIT", -1);
|
||||
+ // Plazma start - Optimize default configurations
|
||||
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) {
|
||||
+ getInt("entity_timeouts.ARROW", 200);
|
||||
@@ -60,18 +59,18 @@ index 9ca1494497ae53e56b1f81fda51b0b8bd02a6d03..97b1366d25537d68469e95ac101b1b8c
|
||||
+ getInt("entity_timeouts.SNOWBALL", 200);
|
||||
+ getInt("entity_timeouts.LLAMA_SPIT", 200);
|
||||
+ } else {
|
||||
+ // Plazma end
|
||||
getInt("entity_timeouts.SNOWBALL", -1);
|
||||
getInt("entity_timeouts.LLAMA_SPIT", -1);
|
||||
+ } // Plazma
|
||||
+ getInt("entity_timeouts.SNOWBALL", -1);
|
||||
+ getInt("entity_timeouts.LLAMA_SPIT", -1);
|
||||
+ }
|
||||
+ // Plazma end - Optimize default configurations
|
||||
setComment("entity_timeouts",
|
||||
"These values define a entity's maximum lifespan. If an",
|
||||
"entity is in this list and it has survived for longer than",
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3ec767e36d 100644
|
||||
index 32035e37b39ba42232fea948166e7c1d4d06190c..8445a0b25d647b2c1f9a44f849084cdec0842e18 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -155,7 +155,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -167,7 +167,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Watchdog extends ConfigurationPart {
|
||||
public int earlyWarningEvery = 5000;
|
||||
@@ -80,7 +79,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3e
|
||||
}
|
||||
|
||||
public SpamLimiter spamLimiter;
|
||||
@@ -193,7 +193,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -207,7 +207,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Commands commands;
|
||||
|
||||
public class Commands extends ConfigurationPart {
|
||||
@@ -89,7 +88,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3e
|
||||
public boolean fixTargetSelectorTagCompletion = true;
|
||||
public boolean timeCommandAffectsAllWorlds = false;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -256,7 +256,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public BookSize bookSize;
|
||||
|
||||
public class BookSize extends ConfigurationPart {
|
||||
@@ -98,7 +97,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3e
|
||||
public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
|
||||
}
|
||||
public boolean resolveSelectorsInBooks = false;
|
||||
@@ -253,7 +253,15 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -267,7 +267,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);
|
||||
@@ -115,7 +114,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3e
|
||||
|
||||
@ConfigSerializable
|
||||
public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) {
|
||||
@@ -321,7 +329,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -335,7 +343,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
executor.setMaximumPoolSize(_chatExecutorMaxSize);
|
||||
}
|
||||
}
|
||||
@@ -125,7 +124,7 @@ index a6f58b3457b7477015c5c6d969e7d83017dd3fa1..85e56d726eb7780811e0a990e1ef7d3e
|
||||
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 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced85101f6e 100644
|
||||
index efc91ff91827872c62b8bd060282549ccdcf67dd..1d926378887b9e42f1827e958f506be3e27d5ab5 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -96,12 +96,32 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -142,24 +141,24 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
- 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>
|
||||
+ //<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,
|
||||
@@ -170,7 +169,7 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
);
|
||||
- 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 Hidden Blocks" defaultstate="collapsed">
|
||||
+ //<editor-fold desc="Anti-Xray Replacement Blocks" defaultstate="collapsed">
|
||||
+ Blocks.CHEST,
|
||||
+ Blocks.AMETHYST_BLOCK,
|
||||
+ Blocks.ANDESITE,
|
||||
@@ -194,14 +193,14 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,14 +193,14 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -151,14 +192,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.aggressiveOptimize; // Plazma - Optimize default configurations
|
||||
+ public boolean tick = !org.plazmamc.plazma.Options.aggressiveOptimize; // Plazma - Optimize default configurations
|
||||
+ 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;
|
||||
@@ -212,16 +211,16 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
}
|
||||
|
||||
public Sniffer sniffer;
|
||||
@@ -182,7 +223,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -181,7 +222,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(), org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8 : category.getDespawnDistance()))); // Plazma - Optimize default configurations
|
||||
@MergeMap
|
||||
public Reference2IntMap<MobCategory> ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
||||
|
||||
@ConfigSerializable
|
||||
public record DespawnRange(@Required int soft, @Required int hard) {
|
||||
@@ -381,7 +422,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -382,7 +423,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Environment extends ConfigurationPart {
|
||||
public boolean disableThunder = false;
|
||||
public boolean disableIceAndSnow = false;
|
||||
@@ -230,7 +229,7 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
public boolean disableExplosionKnockback = false;
|
||||
public boolean generateFlatBedrock = false;
|
||||
public FrostedIce frostedIce;
|
||||
@@ -433,7 +474,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -434,7 +475,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public Fixes fixes;
|
||||
|
||||
public class Fixes extends ConfigurationPart {
|
||||
@@ -239,7 +238,7 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
public boolean disableUnloadedChunkEnderpearlExploit = true;
|
||||
public boolean preventTntFromMovingInWater = false;
|
||||
public boolean splitOverstackedLoot = true;
|
||||
@@ -460,9 +501,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -462,9 +503,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Collisions extends ConfigurationPart {
|
||||
public boolean onlyPlayersCollide = false;
|
||||
public boolean allowVehicleCollisions = true;
|
||||
@@ -251,7 +250,7 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
public boolean allowPlayerCrammingDamage = false;
|
||||
}
|
||||
|
||||
@@ -470,18 +511,41 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -472,18 +513,41 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Chunks extends ConfigurationPart {
|
||||
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
||||
@@ -301,7 +300,7 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
});
|
||||
public boolean flushRegionsOnSave = false;
|
||||
}
|
||||
@@ -496,9 +560,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -498,9 +562,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public TickRates tickRates;
|
||||
|
||||
public class TickRates extends ConfigurationPart {
|
||||
@@ -313,12 +312,12 @@ index 071d3877e386a0c7c4d2f2e8ddd06e0765c49d0d..79e2a6806311c402e481c5b29cbd3ced
|
||||
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));
|
||||
@@ -525,9 +589,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -534,9 +598,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.aggressiveOptimize; // Plazma - Optimize default configurations
|
||||
+ 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
|
||||
@@ -338,10 +337,10 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 9b8bdffbbfe45c6712d0f4da3643424fa94fc69e..84eca01450db5b737c676cab2439d041141c323d 100644
|
||||
index 29eef278940cab33a1f5f168f66ab2b80f0d60ce..b4d47c53bb2a5c75e9f69506dbd69a8817f368dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -163,7 +163,7 @@ public class Main {
|
||||
@@ -151,7 +151,7 @@ public class Main {
|
||||
File configFile = (File) optionset.valueOf("bukkit-settings");
|
||||
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
|
||||
configuration.options().copyDefaults(true);
|
||||
@@ -351,7 +350,7 @@ index 9b8bdffbbfe45c6712d0f4da3643424fa94fc69e..84eca01450db5b737c676cab2439d041
|
||||
|
||||
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 fe82a20efb2b130a568bc06aec5b86d3082062a3..8dddcacec38bf2d5d79ce7fc0f26a2cced5d271d 100644
|
||||
index 09aa0c9ec7d66ff82167c035481e5fcccf8618de..3ed078e33a99e4cc7b536ab6590ef939ac2966db 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -377,16 +376,16 @@ index fe82a20efb2b130a568bc06aec5b86d3082062a3..8dddcacec38bf2d5d79ce7fc0f26a2cc
|
||||
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 = this.get("sync-chunk-writes", Boolean.getBoolean("Paper.enable-sync-chunk-writes")); // Paper - hide behind flag // Plazma - Optimize default configurations
|
||||
- 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);
|
||||
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 6537ae98dc4086f2b6668810425f80c19ef57734..da483bdf81efa62b36b6a10dacc7821b43dd18b7 100644
|
||||
index 02037da80f2f3cada359bbe0f58160fd15761b77..8de087636686b78c12bc1c293258713ff7dddff0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -433,7 +433,7 @@ public final class CraftServer implements Server {
|
||||
@@ -428,7 +428,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.configuration.options().copyDefaults(true);
|
||||
@@ -396,18 +395,38 @@ index 6537ae98dc4086f2b6668810425f80c19ef57734..da483bdf81efa62b36b6a10dacc7821b
|
||||
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 a858b7ddef7f6877c0b92f4150e0dd37bea121aa..eab5ea835a524482f8cc043c7be190a835335ed2 100644
|
||||
index 5942d0997f07bd51d934dac32cd349792a10643e..40a6ef72b4d495140c486c0880fdc5fc1a32931c 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -3,5 +3,6 @@ package org.plazmamc.plazma;
|
||||
@@ -5,5 +5,6 @@ import static java.lang.Boolean.getBoolean;
|
||||
public interface Options {
|
||||
|
||||
boolean iKnowWhatIAmDoing = Boolean.getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
+ boolean aggressiveOptimize = Boolean.getBoolean("Plazma.aggressiveOptimize");
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
+ boolean AGGRESSIVE = Boolean.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 d0d31002562e728fa1a6c9bc81baa4534f11d365..f9f7664e4a6a4e24dcb3b8da0a807a984a698429 100644
|
||||
index cdb4d9a76640fbf0fa202d7b70f5c2bc7005a84b..0a8d1f2b33257a371abb97a3a88af1f89ee46e24 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -49,6 +49,7 @@ public class PurpurConfig {
|
||||
@@ -437,10 +456,10 @@ index d0d31002562e728fa1a6c9bc81baa4534f11d365..f9f7664e4a6a4e24dcb3b8da0a807a98
|
||||
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 b9d1117885a8dd15f207e55ce5e402d8cefe0226..9cb79d203b6ec345d719cd488d2cce8f877fe2bd 100644
|
||||
index 6717941d18dbd6871b4613106b9787063e11722f..b6a6a74dfd00a4536258c8693048c9d1ac4df435 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 {
|
||||
@@ -433,7 +433,7 @@ public class PurpurWorldConfig {
|
||||
public boolean idleTimeoutTargetPlayer = true;
|
||||
public String playerDeathExpDropEquation = "expLevel * 7";
|
||||
public int playerDeathExpDropMax = 100;
|
||||
@@ -449,7 +468,7 @@ index b9d1117885a8dd15f207e55ce5e402d8cefe0226..9cb79d203b6ec345d719cd488d2cce8f
|
||||
public boolean teleportOnNetherCeilingDamage = false;
|
||||
public boolean totemOfUndyingWorksInInventory = false;
|
||||
public boolean playerFixStuckPortal = false;
|
||||
@@ -3070,7 +3070,7 @@ public class PurpurWorldConfig {
|
||||
@@ -3135,7 +3135,7 @@ public class PurpurWorldConfig {
|
||||
public boolean zombieJockeyOnlyBaby = true;
|
||||
public double zombieJockeyChance = 0.05D;
|
||||
public boolean zombieJockeyTryExistingChickens = true;
|
||||
@@ -459,7 +478,7 @@ index b9d1117885a8dd15f207e55ce5e402d8cefe0226..9cb79d203b6ec345d719cd488d2cce8f
|
||||
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 f9b8e2bc039f1a37e47f84909c8785f3ef530284..576e82d2cf933b307b7374b60d864e98be4afcb2 100644
|
||||
index 1cf6d4f854d89c515e48e1fb365eb95ff9340765..7d1ae99e83dc6511838092c3ab6e0fd5f39faabc 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -150,14 +150,14 @@ public class SpigotWorldConfig
|
||||
|
||||
@@ -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 8445a0b25d647b2c1f9a44f849084cdec0842e18..86822868e47b269891a71fdc04371b1e28a2752e 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -89,7 +89,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 8de087636686b78c12bc1c293258713ff7dddff0..60da66fea37f8b9f68a543ff6cdb844a32d654ad 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -428,7 +428,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 40a6ef72b4d495140c486c0880fdc5fc1a32931c..3e0e67c089e269d0bccd4a0d2de5ac1ac515997e 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -6,5 +6,7 @@ public interface Options {
|
||||
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
boolean AGGRESSIVE = Boolean.getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
|
||||
+ boolean VANILLAIZE = Boolean.getBoolean("Plazma.vanillaize") && !AGGRESSIVE;
|
||||
+ boolean USE_VANILLA = Boolean.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 6c2a3813e7d63d57f07a8fa2edbb9d231221d818..15f05cd16a9867da95dd1fcdaeeb134553f651d1 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -197,8 +197,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" );
|
||||
@@ -211,9 +211,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 ) );
|
||||
}
|
||||
@@ -227,7 +227,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,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 10:49:05 +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 3dcccca8ede9b203c24ba29b2020a583297b895c..dd707019fb9b2c46d706311862fea91b84793ff9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -160,6 +160,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]);
|
||||
+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.allowAnyUsername) // Plazma - Add option to allow any usernames
|
||||
Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]);
|
||||
// Paper start - validate usernames
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation) {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 51413e828500792cc493b836bb1460a394ff4f75..c85f1a01c951f85c2347eba18a896e87c4c8b368 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -26,6 +26,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Player player;
|
||||
public class Player extends ConfigurationPart {
|
||||
|
||||
+ public boolean allowAnyUsername = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,24 +4,11 @@ Date: Sun, 5 Nov 2023 10:40:49 +0900
|
||||
Subject: [PATCH] Tweak console logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
index e4fd372a1d585887287253a02531cd192929377b..6624fb97404c3032d60167e3fb108dcfcd066784 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
@@ -355,7 +355,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, (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.notSecurePrefix || ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage)) ? null : "Not Secure"); // Plazma - 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 00fbcb941fe393197619762722eb51d62fb073c2..770b959d9e51ef0645415d5a0d7d79b7031abd66 100644
|
||||
index 3a2acbdcfb64dff5ecb686ba7ea405b488e6eca9..c48f42815314e2fb106b0dff5f38a9e5c3498632 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -180,16 +180,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -193,16 +193,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\"");
|
||||
}
|
||||
|
||||
@@ -33,24 +20,16 @@ index 00fbcb941fe393197619762722eb51d62fb073c2..770b959d9e51ef0645415d5a0d7d79b7
|
||||
- DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- }
|
||||
- // Paper end
|
||||
- // Paper end - detect running as root
|
||||
-
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -319,6 +309,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 (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.offlineWarnings) // 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.");
|
||||
@@ -335,6 +326,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
+ // Plazma - Moved down - Tweak console logging
|
||||
@@ -226,6 +216,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
net.sparklypower.sparklypaper.HalloweenManager.startSyncEpochTask(); // Plazma - Port SparklyPaper patches; Optimize Spooky Season
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
+ // Plazma - Tweak console logging; Moved down
|
||||
+ // Paper start - detect running as root
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.rootUserWarnings && io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
@@ -59,28 +38,45 @@ index 00fbcb941fe393197619762722eb51d62fb073c2..770b959d9e51ef0645415d5a0d7d79b7
|
||||
+ DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Plazma end
|
||||
+ // Paper end - detect running as root
|
||||
+ // Plazma end - Tweak console logging
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
this.getProfileCache().save(false); // Paper
|
||||
@@ -333,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.");
|
||||
@@ -346,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
|
||||
}
|
||||
|
||||
|
||||
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 182acaad79e14e5e120094916a0d295a4584de7a..e8de78f8b7c90a719e10c483991f45a7886256be 100644
|
||||
index b863f6fe65c796a1d3102cc3eddb5d6c5becd3ac..c36ebab552c480d34e7fd48a45f0a320a97b9677 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1462,6 +1462,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);
|
||||
+ flag = flag || org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.notSecurePrefix; // Plazma - Tweak console logging
|
||||
@@ -1497,6 +1497,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());
|
||||
}
|
||||
|
||||
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 5875aae8d7d0146ef9903d8b4bc2b673a615fd98..51413e828500792cc493b836bb1460a394ff4f75 100644
|
||||
index 73dd69941a004b4a2ec244f28d8683e9bdb0a445..e725f6e8205976a7b137aefb98b874cf4ae14893 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -42,4 +42,13 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -68,4 +68,13 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ 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 c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1ab5c51aae 100644
|
||||
index 569f42645a7730451944fbbd6b96910493feeca5..a14d2ec3b8c89045916b95da5ce2a18d1e866bcf 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
|
||||
@@ -150,6 +150,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
@@ -13,7 +13,7 @@ index c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1a
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.allayTakeDamageFromWater;
|
||||
@@ -28,20 +28,20 @@ index c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1a
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.allayMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 cd9129bb5049c13f08c58b8581d511b59a5bb1b5..bcc3458afac5ece9637df63b9d02c445aa0a4ef9 100644
|
||||
index 24a1663cf1cd3f888981a13907811b55bdbf6133..fdc3aa9672077787e841d240fe1e690dcd9ca321 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
|
||||
@@ -95,6 +95,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
@@ -93,6 +93,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
public int getPurpurBreedTime() {
|
||||
return this.level().purpurConfig.camelBreedingTicks;
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.camelTakeDamageFromWater;
|
||||
@@ -51,20 +51,20 @@ index cd9129bb5049c13f08c58b8581d511b59a5bb1b5..bcc3458afac5ece9637df63b9d02c445
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration optionsurpur end
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 9417ce67cc231d5bfa6813f78ec27196eed423c8..4e471e4a259a64c44da5ab450f0137691428ff6a 100644
|
||||
index 4c861b18fbfbae3cb2f1e3563393cfcf4005591c..651f30b4fb02dc03fabad34b62d7d86fa0889754 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
|
||||
@@ -136,6 +136,23 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -160,6 +160,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
||||
public float getJumpPower() {
|
||||
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.frogTakeDamageFromWater;
|
||||
@@ -79,20 +79,20 @@ index 9417ce67cc231d5bfa6813f78ec27196eed423c8..4e471e4a259a64c44da5ab450f013769
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // 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 6b012bea26e8ef0c04571f43da67f6e108188830..7c816b879d47a1b8a480f4237d1ff0e11df4c98e 100644
|
||||
index 64d0e2edf0e47bfe3bc5fbdbabac26c494110467..e077a0bffedd0bb11c9ab5eb507451a0cf6317ea 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
|
||||
@@ -87,6 +87,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
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
|
||||
@@ -107,20 +107,20 @@ index 6b012bea26e8ef0c04571f43da67f6e108188830..7c816b879d47a1b8a480f4237d1ff0e1
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad..795c93352dfa69fad0e034a8377eceb6dc1e81da 100644
|
||||
index 21bdcbd51d9f440e0734750b40cefa4c08cdaf5f..a2cc1efaa621861828b007759536ac49d7e3646e 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
|
||||
@@ -106,6 +106,18 @@ public class Sniffer extends Animal {
|
||||
public boolean isControllable() {
|
||||
return level().purpurConfig.snifferControllable;
|
||||
@@ -119,6 +119,18 @@ public class Sniffer extends Animal {
|
||||
public int getPurpurBreedTime() {
|
||||
return this.level().purpurConfig.snifferBreedingTicks;
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.snifferTakeDamageFromWater;
|
||||
@@ -130,20 +130,20 @@ index dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad..795c93352dfa69fad0e034a8377eceb6
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.snifferAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 5e66c2bd3807619cadee5b7081d93d21886e2806..66d47c1613532189e761c0f48d893652c17fe240 100644
|
||||
index 722e1fed4b333958e95a847b27cfc67d04f13263..16891921341f8967c9115f415f91ec379fcd5b0c 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 VibrationSystem {
|
||||
@@ -147,6 +147,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
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.wardenTakeDamageFromWater;
|
||||
@@ -158,41 +158,47 @@ index 5e66c2bd3807619cadee5b7081d93d21886e2806..66d47c1613532189e761c0f48d893652
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 d70c1206df96b03c031399049a65e6a765d80347..e885d2f21cfbf1fd1c61b29e34f3f51a9decfe88 100644
|
||||
index e0aec3b3e04d603dc208029554f981c6b9e6b43e..337702c8042d44d4be6be1341023d0779cfaa580 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
|
||||
@@ -45,12 +45,12 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
|
||||
public ChestBoat(EntityType<? extends Boat> type, Level world) {
|
||||
super(type, world);
|
||||
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma
|
||||
+ 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
|
||||
super(EntityType.CHEST_BOAT, world);
|
||||
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur configuration options
|
||||
this.setPos(d0, d1, d2);
|
||||
this.xo = d0;
|
||||
this.yo = d1;
|
||||
@@ -170,7 +170,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
- return 27;
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma
|
||||
+ 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 f9f7664e4a6a4e24dcb3b8da0a807a984a698429..22e74b716d29ecfe75bd49234bef861cd97cb79e 100644
|
||||
index 0a8d1f2b33257a371abb97a3a88af1f89ee46e24..dace438eac55b33b9318dfd9f8706883bab64971 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -329,6 +329,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
+ public static int chestBoatRows = 3; // Plazma
|
||||
+ 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;
|
||||
@@ -200,18 +206,18 @@ index f9f7664e4a6a4e24dcb3b8da0a807a984a698429..22e74b716d29ecfe75bd49234bef861c
|
||||
case 1 -> 9;
|
||||
default -> 27;
|
||||
});
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma
|
||||
+ 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 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73e18405c6 100644
|
||||
index b6a6a74dfd00a4536258c8693048c9d1ac4df435..182e8c3f9a631a98576b2efb63371d57f9f5f25f 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1115,7 +1115,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1178,7 +1178,15 @@ public class PurpurWorldConfig {
|
||||
public boolean allayRidable = false;
|
||||
public boolean allayRidableInWater = true;
|
||||
public boolean allayControllable = true;
|
||||
public List<String> allayRespectNBT = new ArrayList<>();
|
||||
+ // Plazma start - Add missing purpur config options
|
||||
+ public double allayMaxHealth = 20.0D;
|
||||
+ public boolean allayTakeDamageFromWater = false;
|
||||
@@ -220,27 +226,25 @@ index 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73
|
||||
+ 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);
|
||||
@@ -1234,7 +1242,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1295,7 +1303,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);
|
||||
@@ -1662,7 +1678,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1723,7 +1737,15 @@ public class PurpurWorldConfig {
|
||||
public boolean frogControllable = true;
|
||||
public float frogRidableJumpHeight = 0.65F;
|
||||
public int frogBreedingTicks = 6000;
|
||||
@@ -252,11 +256,11 @@ index 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73
|
||||
+ 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);
|
||||
@@ -2617,7 +2641,13 @@ public class PurpurWorldConfig {
|
||||
@@ -2676,7 +2698,13 @@ public class PurpurWorldConfig {
|
||||
public boolean snifferControllable = true;
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
public int snifferBreedingTicks = 6000;
|
||||
@@ -266,11 +270,11 @@ index 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73
|
||||
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);
|
||||
@@ -2716,7 +2746,15 @@ public class PurpurWorldConfig {
|
||||
@@ -2775,7 +2803,15 @@ public class PurpurWorldConfig {
|
||||
public boolean tadpoleRidable = false;
|
||||
public boolean tadpoleRidableInWater = true;
|
||||
public boolean tadpoleControllable = true;
|
||||
@@ -282,11 +286,11 @@ index 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73
|
||||
+ 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);
|
||||
@@ -2926,7 +2964,15 @@ public class PurpurWorldConfig {
|
||||
@@ -2991,7 +3027,15 @@ public class PurpurWorldConfig {
|
||||
public boolean wardenRidable = false;
|
||||
public boolean wardenRidableInWater = true;
|
||||
public boolean wardenControllable = true;
|
||||
@@ -298,7 +302,7 @@ index 9cb79d203b6ec345d719cd488d2cce8f877fe2bd..fc30f2dcf7227f7cd087b2e5b8d3dc73
|
||||
+ 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);
|
||||
|
||||
2883
patches/server/0015-Completely-remove-Mojang-Profiler.patch
Normal file
2883
patches/server/0015-Completely-remove-Mojang-Profiler.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@ 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 e7554ec800f321e4e34c926c53f2375a8c3aa979..fc3c0ea41563995b1b115271cda4e9ca76245c4e 100644
|
||||
index afe6b2170846273b41b694aa53dca4c31bf78b3f..52043e451ca0641c93205aac62aba5427625b81f 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 {
|
||||
@@ -99,7 +99,7 @@ public class PortalShape {
|
||||
private int calculateWidth() {
|
||||
int i = this.getDistanceUntilEdgeAboveFrame(this.bottomLeft, this.rightDir);
|
||||
|
||||
@@ -17,7 +17,7 @@ index e7554ec800f321e4e34c926c53f2375a8c3aa979..fc3c0ea41563995b1b115271cda4e9ca
|
||||
}
|
||||
|
||||
private int getDistanceUntilEdgeAboveFrame(BlockPos pos, Direction direction) {
|
||||
@@ -133,7 +133,7 @@ public class PortalShape {
|
||||
@@ -132,7 +132,7 @@ public class PortalShape {
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
int i = this.getDistanceUntilTop(blockposition_mutableblockposition);
|
||||
|
||||
@@ -26,7 +26,7 @@ index e7554ec800f321e4e34c926c53f2375a8c3aa979..fc3c0ea41563995b1b115271cda4e9ca
|
||||
}
|
||||
|
||||
private boolean hasTopFrame(BlockPos.MutableBlockPos pos, int height) {
|
||||
@@ -187,7 +187,7 @@ public class PortalShape {
|
||||
@@ -186,7 +186,7 @@ public class PortalShape {
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
@@ -36,7 +36,7 @@ index e7554ec800f321e4e34c926c53f2375a8c3aa979..fc3c0ea41563995b1b115271cda4e9ca
|
||||
|
||||
// CraftBukkit start - return boolean
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index a372b5be3b1da5868d3766a8ba58997a48118581..d79410cc8b6054e5d3297b3e768fb232f97062e4 100644
|
||||
index 069a9f8504c74d939b1df569f082cc7bd33d9cfc..b5b4229ccdecd63bd3e689e8247e44341d7c30cc 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -42,6 +42,21 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -1,930 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 17:52:52 +0900
|
||||
Subject: [PATCH] Completely remove Mojang Profiler
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 389322d3ca9b1f3789271936a7e6c60bd7c27893..6ca87960654becdc7fd7d9b8465a140c0db2b8b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -113,16 +113,16 @@ import net.minecraft.util.Unit;
|
||||
import net.minecraft.util.datafix.DataFixers;
|
||||
import net.minecraft.util.profiling.EmptyProfileResults;
|
||||
import net.minecraft.util.profiling.ProfileResults;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.profiling.ResultField;
|
||||
-import net.minecraft.util.profiling.SingleTickProfiler;
|
||||
+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.profiling.jfr.JvmProfiler;
|
||||
import net.minecraft.util.profiling.jfr.callback.ProfiledDuration;
|
||||
-import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder;
|
||||
-import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder;
|
||||
-import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder;
|
||||
-import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider;
|
||||
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
|
||||
+//import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove profiler
|
||||
+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove profiler
|
||||
+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove profiler
|
||||
+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove profiler
|
||||
+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
|
||||
import net.minecraft.world.Difficulty;
|
||||
import net.minecraft.world.RandomSequences;
|
||||
@@ -214,11 +214,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public LevelStorageSource.LevelStorageAccess storageSource;
|
||||
public final PlayerDataStorage playerDataStorage;
|
||||
private final List<Runnable> tickables = Lists.newArrayList();
|
||||
- private MetricsRecorder metricsRecorder;
|
||||
- private ProfilerFiller profiler;
|
||||
- private Consumer<ProfileResults> onMetricsRecordingStopped;
|
||||
- private Consumer<Path> onMetricsRecordingFinished;
|
||||
- private boolean willStartRecordingMetrics;
|
||||
+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove profiler
|
||||
+ //private ProfilerFiller profiler; // Plazma - Completely remove profiler
|
||||
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove profiler
|
||||
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove profiler
|
||||
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove profiler
|
||||
@Nullable
|
||||
private MinecraftServer.TimeProfiler debugCommandProfiler;
|
||||
private boolean debugCommandProfilerDelayStart;
|
||||
@@ -2302,10 +2302,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
+ /* // Plazma - Completely remove profiler
|
||||
public ProfilerFiller getProfiler() {
|
||||
if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
||||
return this.profiler;
|
||||
}
|
||||
+ */ // Plazma - Completely remove profiler
|
||||
|
||||
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
||||
|
||||
@@ -2542,6 +2544,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ /* // Plazma - Completely remove profiler
|
||||
private void startMetricsRecordingTick() {
|
||||
if (false && this.willStartRecordingMetrics) { // Purpur
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
@@ -2557,6 +2560,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//this.metricsRecorder.startTick(); // Purpur
|
||||
//this.profiler.startTick(); // Purpur
|
||||
}
|
||||
+ */ // Plazma - Completely remove profiler
|
||||
|
||||
private void endMetricsRecordingTick() {
|
||||
//this.profiler.endTick(); // Purpur
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||
index 8189c549edd14a351fc5e75be23da7378bbd3532..8c44b54aa6b3db4f52d0d6ad7f3d341f11b293f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
||||
import net.minecraft.util.GsonHelper;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.level.storage.loot.LootDataManager;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
|
||||
this.lootData = conditionManager;
|
||||
}
|
||||
|
||||
- protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager, ProfilerFiller profiler) {
|
||||
+ protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove profiler
|
||||
Builder<ResourceLocation, AdvancementHolder> builder = ImmutableMap.builder();
|
||||
|
||||
prepared.forEach((minecraftkey, jsonelement) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
index 975422a57b83a31e63a600bb4ff9c4e2baaf6da7..6783dc11a321c244296e84223c51cd1a489a9b96 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.Resource;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
@@ -62,7 +62,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove profiler
|
||||
CompletableFuture<Map<ResourceLocation, List<TagLoader.EntryWithSource>>> completableFuture = CompletableFuture.supplyAsync(() -> {
|
||||
return this.tagsLoader.load(manager);
|
||||
}, prepareExecutor);
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
index 097ac55028d66ef9ab430ff5dd103db6e3b99fc7..2993e9f326c43ef3f06d5e332899f9fad1f03718 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.commands.FunctionInstantiationException;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.level.GameRules;
|
||||
|
||||
public class ServerFunctionManager {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 3771caa73b0b41428f3d629aca1f562df7bcfaff..a88f6bbed191b6fd3ef2da625df45520331cf7d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.server.network.ServerPlayerConnection;
|
||||
import net.minecraft.util.CsvOutput;
|
||||
import net.minecraft.util.Mth;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.thread.BlockableEventLoop;
|
||||
import net.minecraft.util.thread.ProcessorHandle;
|
||||
import net.minecraft.util.thread.ProcessorMailbox;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 43a46feb5fb4bf23d71bc4f6c08caa93b1959ffc..16c2db8fbfcaf15efb94c04e1bb2508e85812690 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.util.VisibleForDebug;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.thread.BlockableEventLoop;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiManager;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e46207a250a5456589da06fd5fad2a385ef7d4a5..9301ec8142fbf5c5112cac75aef1b8e35737ce43 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -77,7 +77,7 @@ import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.ProgressListener;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.util.Unit;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.valueproviders.IntProvider;
|
||||
import net.minecraft.util.valueproviders.UniformInt;
|
||||
import net.minecraft.world.DifficultyInstance;
|
||||
@@ -694,15 +694,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - Async-Anti-Xray - Pass executor // Plazma
|
||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), /*minecraftserver::getProfiler,*/ false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - Async-Anti-Xray - Pass executor // Plazma // Plazma - Completely remove profiler
|
||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
// CraftBukkit end
|
||||
this.players = Lists.newArrayList();
|
||||
this.entityTickList = new EntityTickList();
|
||||
- this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier());
|
||||
- this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier());
|
||||
+ this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded); //, this.getProfilerSupplier()); // Plazma - Completely remove profiler
|
||||
+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded); //, this.getProfilerSupplier()); // Plazma - Completely remove profiler
|
||||
this.navigatingMobs = new ObjectOpenHashSet();
|
||||
this.blockEvents = new ObjectLinkedOpenHashSet();
|
||||
this.blockEventsToReschedule = new ArrayList(64);
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
index 828196decc89e7e03f88c4a3208ee1ab2bb69242..c0088e0e566abb928c8dcd6f819d82cc1122589b 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java
|
||||
@@ -2,10 +2,10 @@ package net.minecraft.server.packs.resources;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
|
||||
public interface PreparableReloadListener {
|
||||
- CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor);
|
||||
+ CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor); // Plazma - Completely remove profiler
|
||||
|
||||
default String getName() {
|
||||
return this.getClass().getSimpleName();
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
index 7383c7d3820dce06108eaafd236a7c6c06a10a42..4e1f4e026cd7c566468a58b2ea232d5dee80b86f 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
|
||||
@@ -3,11 +3,11 @@ package net.minecraft.server.packs.resources;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import net.minecraft.util.Unit;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
|
||||
public interface ResourceManagerReloadListener extends PreparableReloadListener {
|
||||
@Override
|
||||
- default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove profiler
|
||||
return synchronizer.wait(Unit.INSTANCE).thenRunAsync(() -> {
|
||||
//applyProfiler.startTick(); // Purpur
|
||||
//applyProfiler.push("listener"); // Purpur
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
||||
index 9cc09f0415a09299102dbcf022326944368ea033..2e9e63f3ee6268cafa3b90666cf31019e7341dbb 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
|
||||
@@ -11,7 +11,7 @@ import java.util.Map;
|
||||
import net.minecraft.resources.FileToIdConverter;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.GsonHelper;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public abstract class SimpleJsonResourceReloadListener extends SimplePreparableReloadListener<Map<ResourceLocation, JsonElement>> {
|
||||
@@ -25,7 +25,7 @@ public abstract class SimpleJsonResourceReloadListener extends SimplePreparableR
|
||||
}
|
||||
|
||||
@Override
|
||||
- protected Map<ResourceLocation, JsonElement> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
|
||||
+ protected Map<ResourceLocation, JsonElement> prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Profiler
|
||||
Map<ResourceLocation, JsonElement> map = new HashMap<>();
|
||||
scanDirectory(resourceManager, this.directory, this.gson, map);
|
||||
return map;
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
index 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..7de117e0464a24da632d134870554fd11e1b87ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java
|
||||
@@ -2,19 +2,19 @@ package net.minecraft.server.packs.resources;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
|
||||
public abstract class SimplePreparableReloadListener<T> implements PreparableReloadListener {
|
||||
@Override
|
||||
- public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove profiler
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
- return this.prepare(manager, prepareProfiler);
|
||||
+ return this.prepare(manager/*, prepareProfiler*/); // Plazma - Completely remove profiler
|
||||
}, prepareExecutor).thenCompose(synchronizer::wait).thenAcceptAsync((prepared) -> {
|
||||
- this.apply(prepared, manager, applyProfiler);
|
||||
+ this.apply(prepared, manager/*, applyProfiler*/); // Plazma - Completely remove profiler
|
||||
}, applyExecutor);
|
||||
}
|
||||
|
||||
- protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler);
|
||||
+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove profiler
|
||||
|
||||
- protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler);
|
||||
+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove profiler
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
||||
index de2ecc7c69fb870f843f60596115866214267ee4..05a731dec4aec1d3cf61a761bda018cc8c46afde 100644
|
||||
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
||||
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java
|
||||
@@ -26,7 +26,7 @@ public class SimpleReloadInstance<S> implements ReloadInstance {
|
||||
|
||||
public static SimpleReloadInstance<Void> of(ResourceManager manager, List<PreparableReloadListener> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage) {
|
||||
return new SimpleReloadInstance<>(prepareExecutor, applyExecutor, manager, reloaders, (synchronizer, resourceManager, reloader, prepare, apply) -> {
|
||||
- return reloader.reload(synchronizer, resourceManager, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE, prepareExecutor, apply);
|
||||
+ return reloader.reload(synchronizer, resourceManager/*, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE*/, prepareExecutor, apply); // Plazma - Completely remove Profiler
|
||||
}, initialStage);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/tags/TagManager.java b/src/main/java/net/minecraft/tags/TagManager.java
|
||||
index 60ed9413c32d91ce33583cc24998d08869d07a23..67c0d8f7294e18c7b2107b82219bc106608a21f0 100644
|
||||
--- a/src/main/java/net/minecraft/tags/TagManager.java
|
||||
+++ b/src/main/java/net/minecraft/tags/TagManager.java
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
|
||||
public class TagManager implements PreparableReloadListener {
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, String> CUSTOM_REGISTRY_DIRECTORIES = Map.of(Registries.BLOCK, "tags/blocks", Registries.ENTITY_TYPE, "tags/entity_types", Registries.FLUID, "tags/fluids", Registries.GAME_EVENT, "tags/game_events", Registries.ITEM, "tags/items");
|
||||
@@ -35,7 +35,7 @@ public class TagManager implements PreparableReloadListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager/*, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler*/, Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove profiler
|
||||
List<? extends CompletableFuture<? extends TagManager.LoadResult<?>>> list = this.registryAccess.registries().map((registry) -> {
|
||||
return this.createLoader(manager, prepareExecutor, registry);
|
||||
}).toList();
|
||||
diff --git a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
||||
deleted file mode 100644
|
||||
index c6c30d99399c5cde2b0ec2f320d81d952b422d78..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java
|
||||
+++ /dev/null
|
||||
@@ -1,208 +0,0 @@
|
||||
-package net.minecraft.util.profiling;
|
||||
-
|
||||
-import com.google.common.collect.Lists;
|
||||
-import com.google.common.collect.Maps;
|
||||
-import com.mojang.logging.LogUtils;
|
||||
-import it.unimi.dsi.fastutil.longs.LongArrayList;
|
||||
-import it.unimi.dsi.fastutil.longs.LongList;
|
||||
-import it.unimi.dsi.fastutil.objects.Object2LongMap;
|
||||
-import it.unimi.dsi.fastutil.objects.Object2LongMaps;
|
||||
-import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
|
||||
-import it.unimi.dsi.fastutil.objects.ObjectArraySet;
|
||||
-import java.time.Duration;
|
||||
-import java.util.List;
|
||||
-import java.util.Map;
|
||||
-import java.util.Set;
|
||||
-import java.util.function.IntSupplier;
|
||||
-import java.util.function.LongSupplier;
|
||||
-import java.util.function.Supplier;
|
||||
-import javax.annotation.Nullable;
|
||||
-import net.minecraft.Util;
|
||||
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
||||
-import org.apache.commons.lang3.tuple.Pair;
|
||||
-import org.slf4j.Logger;
|
||||
-
|
||||
-public class ActiveProfiler implements ProfileCollector {
|
||||
- private static final long WARNING_TIME_NANOS = Duration.ofMillis(100L).toNanos();
|
||||
- private static final Logger LOGGER = LogUtils.getLogger();
|
||||
- private final List<String> paths = Lists.newArrayList();
|
||||
- private final LongList startTimes = new LongArrayList();
|
||||
- private final Map<String, ActiveProfiler.PathEntry> entries = Maps.newHashMap();
|
||||
- private final IntSupplier getTickTime;
|
||||
- private final LongSupplier getRealTime;
|
||||
- private final long startTimeNano;
|
||||
- private final int startTimeTicks;
|
||||
- private String path = "";
|
||||
- private boolean started;
|
||||
- @Nullable
|
||||
- private ActiveProfiler.PathEntry currentEntry;
|
||||
- private final boolean warn;
|
||||
- private final Set<Pair<String, MetricCategory>> chartedPaths = new ObjectArraySet<>();
|
||||
-
|
||||
- public ActiveProfiler(LongSupplier timeGetter, IntSupplier tickGetter, boolean checkTimeout) {
|
||||
- this.startTimeNano = timeGetter.getAsLong();
|
||||
- this.getRealTime = timeGetter;
|
||||
- this.startTimeTicks = tickGetter.getAsInt();
|
||||
- this.getTickTime = tickGetter;
|
||||
- this.warn = checkTimeout;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void startTick() {
|
||||
- if (this.started) {
|
||||
- LOGGER.error("Profiler tick already started - missing endTick()?");
|
||||
- } else {
|
||||
- this.started = true;
|
||||
- this.path = "";
|
||||
- this.paths.clear();
|
||||
- //this.push("root"); // Purpur
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void endTick() {
|
||||
- if (!this.started) {
|
||||
- LOGGER.error("Profiler tick already ended - missing startTick()?");
|
||||
- } else {
|
||||
- //this.pop(); // Purpur
|
||||
- this.started = false;
|
||||
- if (!this.path.isEmpty()) {
|
||||
- LOGGER.error("Profiler tick ended before path was fully popped (remainder: '{}'). Mismatched push/pop?", LogUtils.defer(() -> {
|
||||
- return ProfileResults.demanglePath(this.path);
|
||||
- }));
|
||||
- }
|
||||
-
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void push(String location) {
|
||||
- if (!this.started) {
|
||||
- LOGGER.error("Cannot push '{}' to profiler if profiler tick hasn't started - missing startTick()?", (Object)location);
|
||||
- } else {
|
||||
- if (!this.path.isEmpty()) {
|
||||
- this.path = this.path + "\u001e";
|
||||
- }
|
||||
-
|
||||
- this.path = this.path + location;
|
||||
- this.paths.add(this.path);
|
||||
- this.startTimes.add(Util.getNanos());
|
||||
- this.currentEntry = null;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void push(Supplier<String> locationGetter) {
|
||||
- //this.push(locationGetter.get()); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void markForCharting(MetricCategory type) {
|
||||
- this.chartedPaths.add(Pair.of(this.path, type));
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void pop() {
|
||||
- if (!this.started) {
|
||||
- LOGGER.error("Cannot pop from profiler if profiler tick hasn't started - missing startTick()?");
|
||||
- } else if (this.startTimes.isEmpty()) {
|
||||
- LOGGER.error("Tried to pop one too many times! Mismatched push() and pop()?");
|
||||
- } else {
|
||||
- long l = Util.getNanos();
|
||||
- long m = this.startTimes.removeLong(this.startTimes.size() - 1);
|
||||
- this.paths.remove(this.paths.size() - 1);
|
||||
- long n = l - m;
|
||||
- ActiveProfiler.PathEntry pathEntry = this.getCurrentEntry();
|
||||
- pathEntry.accumulatedDuration += n;
|
||||
- ++pathEntry.count;
|
||||
- pathEntry.maxDuration = Math.max(pathEntry.maxDuration, n);
|
||||
- pathEntry.minDuration = Math.min(pathEntry.minDuration, n);
|
||||
- if (this.warn && n > WARNING_TIME_NANOS) {
|
||||
- LOGGER.warn("Something's taking too long! '{}' took aprox {} ms", LogUtils.defer(() -> {
|
||||
- return ProfileResults.demanglePath(this.path);
|
||||
- }), LogUtils.defer(() -> {
|
||||
- return (double)n / 1000000.0D;
|
||||
- }));
|
||||
- }
|
||||
-
|
||||
- this.path = this.paths.isEmpty() ? "" : this.paths.get(this.paths.size() - 1);
|
||||
- this.currentEntry = null;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void popPush(String location) {
|
||||
- //this.pop(); // Purpur
|
||||
- //this.push(location); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void popPush(Supplier<String> locationGetter) {
|
||||
- //this.pop(); // Purpur
|
||||
- //this.push(locationGetter); // Purpur
|
||||
- }
|
||||
-
|
||||
- private ActiveProfiler.PathEntry getCurrentEntry() {
|
||||
- if (this.currentEntry == null) {
|
||||
- this.currentEntry = this.entries.computeIfAbsent(this.path, (k) -> {
|
||||
- return new ActiveProfiler.PathEntry();
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- return this.currentEntry;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void incrementCounter(String marker, int num) {
|
||||
- this.getCurrentEntry().counters.addTo(marker, (long)num);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void incrementCounter(Supplier<String> markerGetter, int num) {
|
||||
- this.getCurrentEntry().counters.addTo(markerGetter.get(), (long)num);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public ProfileResults getResults() {
|
||||
- return new FilledProfileResults(this.entries, this.startTimeNano, this.startTimeTicks, this.getRealTime.getAsLong(), this.getTickTime.getAsInt());
|
||||
- }
|
||||
-
|
||||
- @Nullable
|
||||
- @Override
|
||||
- public ActiveProfiler.PathEntry getEntry(String name) {
|
||||
- return this.entries.get(name);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Set<Pair<String, MetricCategory>> getChartedPaths() {
|
||||
- return this.chartedPaths;
|
||||
- }
|
||||
-
|
||||
- public static class PathEntry implements ProfilerPathEntry {
|
||||
- long maxDuration = Long.MIN_VALUE;
|
||||
- long minDuration = Long.MAX_VALUE;
|
||||
- long accumulatedDuration;
|
||||
- long count;
|
||||
- final Object2LongOpenHashMap<String> counters = new Object2LongOpenHashMap<>();
|
||||
-
|
||||
- @Override
|
||||
- public long getDuration() {
|
||||
- return this.accumulatedDuration;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public long getMaxDuration() {
|
||||
- return this.maxDuration;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public long getCount() {
|
||||
- return this.count;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Object2LongMap<String> getCounters() {
|
||||
- return Object2LongMaps.unmodifiable(this.counters);
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
||||
deleted file mode 100644
|
||||
index 863343a87fe34d72f04af89d75268b477b2adc7a..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java
|
||||
+++ /dev/null
|
||||
@@ -1,116 +0,0 @@
|
||||
-package net.minecraft.util.profiling;
|
||||
-
|
||||
-import java.util.function.Supplier;
|
||||
-import net.minecraft.util.profiling.metrics.MetricCategory;
|
||||
-
|
||||
-public interface ProfilerFiller {
|
||||
- String ROOT = "root";
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void startTick();
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void endTick();
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void push(String location);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void push(Supplier<String> locationGetter);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void pop();
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void popPush(String location);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void popPush(Supplier<String> locationGetter);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void markForCharting(MetricCategory type);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- default void incrementCounter(String marker) {
|
||||
- //this.incrementCounter(marker, 1); // Purpur
|
||||
- }
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void incrementCounter(String marker, int num);
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- default void incrementCounter(Supplier<String> markerGetter) {
|
||||
- //this.incrementCounter(markerGetter, 1); // Purpur
|
||||
- }
|
||||
-
|
||||
- @io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
- void incrementCounter(Supplier<String> markerGetter, int num);
|
||||
-
|
||||
- static ProfilerFiller tee(final ProfilerFiller a, final ProfilerFiller b) {
|
||||
- if (a == InactiveProfiler.INSTANCE) {
|
||||
- return b;
|
||||
- } else {
|
||||
- return b == InactiveProfiler.INSTANCE ? a : new ProfilerFiller() {
|
||||
- @Override
|
||||
- public void startTick() {
|
||||
- //a.startTick(); // Purpur
|
||||
- //b.startTick(); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void endTick() {
|
||||
- //a.endTick(); // Purpur
|
||||
- //b.endTick(); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void push(String location) {
|
||||
- //a.push(location); // Purpur
|
||||
- //b.push(location); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void push(Supplier<String> locationGetter) {
|
||||
- //a.push(locationGetter); // Purpur
|
||||
- //b.push(locationGetter); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void markForCharting(MetricCategory type) {
|
||||
- //a.markForCharting(type); // Purpur
|
||||
- //b.markForCharting(type); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void pop() {
|
||||
- //a.pop(); // Purpur
|
||||
- //b.pop(); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void popPush(String location) {
|
||||
- //a.popPush(location); // Purpur
|
||||
- //b.popPush(location); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void popPush(Supplier<String> locationGetter) {
|
||||
- //a.popPush(locationGetter); // Purpur
|
||||
- //b.popPush(locationGetter); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void incrementCounter(String marker, int num) {
|
||||
- //a.incrementCounter(marker, num); // Purpur
|
||||
- //b.incrementCounter(marker, num); // Purpur
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void incrementCounter(Supplier<String> markerGetter, int num) {
|
||||
- //a.incrementCounter(markerGetter, num); // Purpur
|
||||
- //b.incrementCounter(markerGetter, num); // Purpur
|
||||
- }
|
||||
- };
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 80c03bd4e5d7e20bb8a4e14af5620f5c57a05fd4..aeae6117b398b84d5c8ecaa175a72867416ff166 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -147,8 +147,8 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.class);
|
||||
this.restrictCenter = BlockPos.ZERO;
|
||||
this.restrictRadius = -1.0F;
|
||||
- this.goalSelector = new GoalSelector(world.getProfilerSupplier());
|
||||
- this.targetSelector = new GoalSelector(world.getProfilerSupplier());
|
||||
+ this.goalSelector = new GoalSelector(); //world.getProfilerSupplier()); // Plazma - Completely remove profiler
|
||||
+ this.targetSelector = new GoalSelector(); //world.getProfilerSupplier()); // Plazma - Completely remove profiler
|
||||
this.lookControl = new org.purpurmc.purpur.controller.LookControllerWASD(this); // Purpur
|
||||
this.moveControl = new org.purpurmc.purpur.controller.MoveControllerWASD(this); // Purpur
|
||||
this.jumpControl = new JumpControl(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index 02978315bc2b828cc603ce7478408f3f82c249c2..4f9b19c45afd6b26833ba892a90d3a9559d5d859 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -11,7 +11,7 @@ import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class GoalSelector {
|
||||
@@ -29,7 +29,7 @@ public class GoalSelector {
|
||||
};
|
||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||
private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||
- private final Supplier<ProfilerFiller> profiler;
|
||||
+ //private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove profiler
|
||||
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
|
||||
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
|
||||
private int tickCount;
|
||||
@@ -37,9 +37,11 @@ public class GoalSelector {
|
||||
private int curRate;
|
||||
private static final Goal.Flag[] GOAL_FLAG_VALUES = Goal.Flag.values(); // Paper - remove streams from pathfindergoalselector
|
||||
|
||||
+ /* // Plazma - Completely remove profiler
|
||||
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
||||
this.profiler = profiler;
|
||||
}
|
||||
+ */ // Plazma - Completely remove profiler
|
||||
|
||||
public void addGoal(int priority, Goal goal) {
|
||||
this.availableGoals.add(new WrappedGoal(priority, goal));
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
index 388363948595247471fa4c3c6801fc493d61c0d0..6851ee45b5b41cf549a8aed14d95545b0d120414 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -31,7 +31,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
||||
import net.minecraft.util.GsonHelper;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -51,7 +51,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
super(RecipeManager.GSON, "recipes");
|
||||
}
|
||||
|
||||
- protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager, ProfilerFiller profiler) {
|
||||
+ protected void apply(Map<ResourceLocation, JsonElement> prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Profiler
|
||||
this.hasErrors = false;
|
||||
// CraftBukkit start - SPIGOT-5667 make sure all types are populated and mutable
|
||||
Map<RecipeType<?>, Object2ObjectLinkedOpenHashMap<ResourceLocation, RecipeHolder<?>>> map1 = Maps.newHashMap();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index af4eb54d99b67d059534e5e55e952aa41bb87bc7..412dd103bad498c3c93b7a3ab98f834944d514eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.util.AbortableIterationConsumer;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.DifficultyInstance;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.damagesource.DamageSources;
|
||||
@@ -137,7 +137,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private final ResourceKey<DimensionType> dimensionTypeId;
|
||||
private final Holder<DimensionType> dimensionTypeRegistration;
|
||||
public final WritableLevelData levelData;
|
||||
- private final Supplier<ProfilerFiller> profiler;
|
||||
+ //private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove profiler
|
||||
public final boolean isClientSide;
|
||||
private final WorldBorder worldBorder;
|
||||
private final BiomeManager biomeManager;
|
||||
@@ -262,7 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
//protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI
|
||||
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Plazma
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, /*Supplier<ProfilerFiller> supplier,*/ boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Plazma //- Completely remove profiler
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||
this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma
|
||||
@@ -279,7 +279,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
// CraftBukkit end
|
||||
- this.profiler = supplier;
|
||||
+ //this.profiler = supplier; // Plazma - Completely remove profiler
|
||||
this.levelData = worlddatamutable;
|
||||
this.dimensionTypeRegistration = holder;
|
||||
this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> {
|
||||
@@ -1833,6 +1833,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ /* // Plazma - Completely remove profiler
|
||||
public ProfilerFiller getProfiler() {
|
||||
if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur
|
||||
return (ProfilerFiller) this.profiler.get();
|
||||
@@ -1841,6 +1842,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public Supplier<ProfilerFiller> getProfilerSupplier() {
|
||||
return this.profiler;
|
||||
}
|
||||
+ */ // Plazma - Completely remove profiler
|
||||
|
||||
@Override
|
||||
public BiomeManager getBiomeManager() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
index 0f1025495237aebe30132ace0832aa5718d6f9bb..0226280bbdb9d63831d93f980ee117da1eac08aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
@@ -155,7 +155,9 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
return this.level.getHeight();
|
||||
}
|
||||
|
||||
+ /* // Plazma - Completely remove profiler
|
||||
public ProfilerFiller getProfiler() {
|
||||
return this.level.getProfiler();
|
||||
}
|
||||
+ */ // Plazma - Completely remove profiler
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 66656c4cf157228c9f52b33b358713ef0172f9ff..a8a360b794cec35b9f7ab137aaf35fba1d610f26 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
||||
import net.minecraft.server.level.FullChunkStatus;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -455,7 +455,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
|
||||
if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) {
|
||||
- ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
+ //ProfilerFiller gameprofilerfiller = this.level.getProfiler(); // Plazma - Completely remove profiler
|
||||
|
||||
//gameprofilerfiller.push("updateSkyLightSources"); // Purpur
|
||||
// Paper - starlight - remove skyLightSources
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
index a8af51a25b0f99c3a64d9150fdfcd6b818aa7581..b9689131a7a46b46c0b75b86f2bb163d7de74921 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
@@ -12,7 +12,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.util.profiling.metrics.MetricCategory;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.level.PathNavigationRegion;
|
||||
@@ -44,7 +44,7 @@ public class PathFinder {
|
||||
map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getGoal(pos.getX(), pos.getY(), pos.getZ()), pos));
|
||||
}
|
||||
// Paper end
|
||||
- Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier);
|
||||
+ Path path = this.findPath(/*world.getProfiler(), */node, map, followRange, distance, rangeMultiplier); // Plazma - Completely remove profiler
|
||||
this.nodeEvaluator.done();
|
||||
return path;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class PathFinder {
|
||||
|
||||
@Nullable
|
||||
// Paper start - optimize collection
|
||||
- private Path findPath(ProfilerFiller profiler, Node startNode, List<Map.Entry<Target, BlockPos>> positions, float followRange, int distance, float rangeMultiplier) {
|
||||
+ private Path findPath(/*ProfilerFiller profiler, */Node startNode, List<Map.Entry<Target, BlockPos>> positions, float followRange, int distance, float rangeMultiplier) { // Plazma - Completely remove profiler
|
||||
//profiler.push("find_path"); // Purpur
|
||||
//profiler.markForCharting(MetricCategory.PATH_FINDING); // Purpur
|
||||
// Set<Target> set = positions.keySet();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
index 08f5239d5eea9133340ec9e1a3a7d8d5e792ced0..ad306d5d69b2bd6ac4ddbdd13dd0a34c9c4cc4f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import org.bukkit.craftbukkit.CraftLootTable;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
@@ -36,7 +36,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv
|
||||
public LootDataManager() {}
|
||||
|
||||
@Override
|
||||
- public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
+ public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, /*ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler,*/ Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove profiler
|
||||
Map<LootDataType<?>, Map<ResourceLocation, ?>> map = new HashMap();
|
||||
CompletableFuture<?>[] acompletablefuture = (CompletableFuture[]) LootDataType.values().map((lootdatatype) -> {
|
||||
return LootDataManager.scheduleElementParse(lootdatatype, manager, prepareExecutor, map);
|
||||
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
index 0043c0087896a6df6910b0500da37d84b287c901..17a5928afade7e477cda34365dc8c72c52a6b758 100644
|
||||
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.core.Vec3i;
|
||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove profiler
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
return ScheduledTick.INTRA_TICK_DRAIN_ORDER.compare(a.peek(), b.peek());
|
||||
};
|
||||
private final LongPredicate tickCheck;
|
||||
- private final Supplier<ProfilerFiller> profiler;
|
||||
+ //private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove profiler
|
||||
private final Long2ObjectMap<LevelChunkTicks<T>> allContainers = new Long2ObjectOpenHashMap<>();
|
||||
private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), (map) -> {
|
||||
map.defaultReturnValue(Long.MAX_VALUE);
|
||||
@@ -48,9 +48,9 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
|
||||
};
|
||||
|
||||
- public LevelTicks(LongPredicate tickingFutureReadyPredicate, Supplier<ProfilerFiller> profilerGetter) {
|
||||
+ public LevelTicks(LongPredicate tickingFutureReadyPredicate/*, Supplier<ProfilerFiller> profilerGetter*/) { // Plazma - Completely remove profiler
|
||||
this.tickCheck = tickingFutureReadyPredicate;
|
||||
- this.profiler = profilerGetter;
|
||||
+ //this.profiler = profilerGetter; // Plazma - Completely remove profiler
|
||||
}
|
||||
|
||||
public void addContainer(ChunkPos pos, LevelChunkTicks<T> scheduler) {
|
||||
@@ -88,7 +88,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
public void tick(long time, int maxTicks, BiConsumer<BlockPos, T> ticker) {
|
||||
//ProfilerFiller profilerFiller = this.profiler.get(); // Purpur
|
||||
//profilerFiller.push("collect"); // Purpur
|
||||
- this.collectTicks(time, maxTicks, null); // Purpur
|
||||
+ this.collectTicks(time, maxTicks); // Purpur // Plazma - Completely remove profiler
|
||||
//profilerFiller.popPush("run"); // Purpur
|
||||
//profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size()); // Purpur
|
||||
this.runCollectedTicks(ticker);
|
||||
@@ -97,7 +97,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
|
||||
//profilerFiller.pop(); // Purpur
|
||||
}
|
||||
|
||||
- private void collectTicks(long time, int maxTicks, ProfilerFiller profiler) {
|
||||
+ private void collectTicks(long time, int maxTicks/*, ProfilerFiller profiler*/) { // Plazma - Completely remove profiler
|
||||
this.sortContainersToTick(time);
|
||||
//profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
|
||||
this.drainContainers(time, maxTicks);
|
||||
@@ -5,23 +5,22 @@ Subject: [PATCH] Reduce create random instance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6ca87960654becdc7fd7d9b8465a140c0db2b8b9..cda99102949ae9d722c347e0dd610dfff625b5b8 100644
|
||||
index 703e3720cf28c669000b663cba56b070ac4ed96a..4782f19409d300fbcaa952ae0dd6a0577ade5f7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -228,7 +228,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private ServerStatus status;
|
||||
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable
|
||||
private ServerStatus.Favicon statusIcon;
|
||||
- private final RandomSource random;
|
||||
+ private final RandomSource random; public RandomSource random() { return this.random; } // Plazma - expose random
|
||||
private final RandomSource random;
|
||||
+ public static RandomSource random() { return getServer().random; } // Plazma - Expose random
|
||||
public final DataFixer fixerUpper;
|
||||
private String localIp;
|
||||
private int port;
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
index f5bc3497831877e0c2b7dc1cbd8abe3a67d7695b..e27867a95d49531507de63be09604d476a0e43e5 100644
|
||||
index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046edd340a82 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 {
|
||||
@@ -66,7 +66,7 @@ public class SpreadPlayersCommand {
|
||||
if (maxY < j) {
|
||||
throw SpreadPlayersCommand.ERROR_INVALID_MAX_HEIGHT.create(maxY, j);
|
||||
} else {
|
||||
@@ -31,10 +30,10 @@ index f5bc3497831877e0c2b7dc1cbd8abe3a67d7695b..e27867a95d49531507de63be09604d47
|
||||
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 7b72be8dcaf3fc5c7151c847faa2dfc75ef9eeb7..9a818c8f1450d31d29fd72cda45a14eec9034615 100644
|
||||
index 4a29e90ff2a0fe9c5be094400d79ab89e61c437d..582cdbb7e2f25cdc533721e45a89ae15a8b05b8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -449,7 +449,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -483,7 +483,7 @@ public class ServerPlayer extends Player {
|
||||
long l = k * k;
|
||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||
int j1 = this.getCoprime(i1);
|
||||
@@ -43,7 +42,7 @@ index 7b72be8dcaf3fc5c7151c847faa2dfc75ef9eeb7..9a818c8f1450d31d29fd72cda45a14ee
|
||||
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
@@ -486,7 +486,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -520,7 +520,7 @@ public class ServerPlayer extends Player {
|
||||
long l = k * k;
|
||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||
int j1 = this.getCoprime(i1);
|
||||
@@ -53,46 +52,46 @@ index 7b72be8dcaf3fc5c7151c847faa2dfc75ef9eeb7..9a818c8f1450d31d29fd72cda45a14ee
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index dd707019fb9b2c46d706311862fea91b84793ff9..05ef30ecdb68d1d254246431e7d5cecf9a38427e 100644
|
||||
index 3b4fadb37eafb2f7b0ce4d6b276d2fdaa8287521..ba041288f9619870ab08c2956262d35eed85b44b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -70,7 +70,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -91,7 +91,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
this.serverId = "";
|
||||
this.server = server;
|
||||
this.connection = connection;
|
||||
- this.challenge = Ints.toByteArray(RandomSource.create().nextInt());
|
||||
+ this.challenge = Ints.toByteArray((org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? server.random() : RandomSource.create()).nextInt()); // Plazma - Reduce create random instance
|
||||
+ this.challenge = Ints.toByteArray((org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? MinecraftServer.random() : RandomSource.create()).nextInt()); // Plazma - Reduce create random instance
|
||||
this.transferred = transferred;
|
||||
}
|
||||
|
||||
@Override
|
||||
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..832c3fa9f6f6706c48d5744e15d3c748edafe8a4 100644
|
||||
index 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..c0fad810538ede0f248898db2e68625b96e56c16 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 {
|
||||
@@ -341,7 +341,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.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create()).nextInt(16777216); // Plazma - Reduce create random instance
|
||||
+ this.challenge = (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.create()).nextInt(16777216); // Plazma - Reduce create random instance
|
||||
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/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
index fe3ab3d388f0481fb0db06b7f730f868dbf8e8a5..57d4eec19146f2ec36c8f99a4c77f2a20aa7cd09 100644
|
||||
index 3fac11bf02652b5f51f30f99bdf516504467d0d2..9d939624756e8a7a07a787f9807f095c5033b234 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.util.RandomSource;
|
||||
|
||||
public class ShufflingList<U> implements Iterable<U> {
|
||||
public final List<ShufflingList.WeightedEntry<U>> entries; // Paper - public
|
||||
protected final List<ShufflingList.WeightedEntry<U>> entries;
|
||||
- private final RandomSource random = RandomSource.create();
|
||||
+ private final RandomSource random = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma
|
||||
private final boolean isUnsafe; // Paper
|
||||
+ private final RandomSource random = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.create(); // Plazma - Reduce create random instance
|
||||
private final boolean isUnsafe; // Paper - Fix Concurrency issue in ShufflingList during worldgen
|
||||
|
||||
public ShufflingList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
||||
index 7094701d213c73ba47ace806962244c10fdf4dda..590c26307374edd65a2e22de18d12f34addcef64 100644
|
||||
index 09a7b418ddf564c0be13297f7c216db2e7ae1578..703006eb5df8099c4f51cdb4e41f95cacfbe43a6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType;
|
||||
@@ -100,25 +99,25 @@ index 7094701d213c73ba47ace806962244c10fdf4dda..590c26307374edd65a2e22de18d12f34
|
||||
|
||||
public abstract class Sensor<E extends LivingEntity> {
|
||||
- private static final RandomSource RANDOM = RandomSource.createThreadSafe();
|
||||
+ private static final RandomSource RANDOM = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.createThreadSafe(); // Plazma - Reduce create random instance
|
||||
+ private static final RandomSource RANDOM = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.createThreadSafe(); // Plazma - Reduce create random instance
|
||||
private static final int DEFAULT_SCAN_RATE = 20;
|
||||
protected static final int TARGETING_RANGE = 16;
|
||||
private static final TargetingConditions TARGET_CONDITIONS = TargetingConditions.forNonCombat().range(16.0D);
|
||||
private static final TargetingConditions TARGET_CONDITIONS = TargetingConditions.forNonCombat().range(16.0);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
index ece82743df21f0b776382821ad75dee96d0a0748..44db438185d1ffb1adea09ba5f1cf4515a113700 100644
|
||||
index 3d792957f27fd4bdfad8d76262a8e2a2012bf35f..71539b5910692489cad6f78ac90f3aabc4e58236 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
@@ -32,7 +32,7 @@ public class AngerManagement {
|
||||
@@ -33,7 +33,7 @@ public class AngerManagement {
|
||||
@VisibleForTesting
|
||||
protected static final int MAX_ANGER = 150;
|
||||
private static final int DEFAULT_ANGER_DECREASE = 1;
|
||||
- private int conversionDelay = Mth.randomBetweenInclusive(RandomSource.create(), 0, 2);
|
||||
+ private int conversionDelay = Mth.randomBetweenInclusive((org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create()), 0, 2); // Plazma - Reduce create random instance
|
||||
+ private int conversionDelay = Mth.randomBetweenInclusive((org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.create()), 0, 2); // Plazma - Reduce create random instance
|
||||
int highestAnger;
|
||||
private static final Codec<Pair<UUID, Integer>> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create((instance) -> {
|
||||
return instance.group(UUIDUtil.CODEC.fieldOf("uuid").forGetter(Pair::getFirst), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("anger").forGetter(Pair::getSecond)).apply(instance, Pair::of);
|
||||
private static final Codec<Pair<UUID, Integer>> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
index a5443f92786427c42092aec8350e7ab37704db7a..0383c9e75a12c5832cf69daf14b8037365c43cfb 100644
|
||||
index 96e9fce5f9084737d2fcf4deb83305733b480179..43da8ea227b2b01d6975a3f4f209099d350386f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
@@ -32,7 +32,7 @@ public class WanderingTraderSpawner implements CustomSpawner {
|
||||
@@ -126,15 +125,15 @@ index a5443f92786427c42092aec8350e7ab37704db7a..0383c9e75a12c5832cf69daf14b80373
|
||||
private static final int SPAWN_ONE_IN_X_CHANCE = 10;
|
||||
private static final int NUMBER_OF_SPAWN_ATTEMPTS = 10;
|
||||
- private final RandomSource random = RandomSource.create();
|
||||
+ private final RandomSource random = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma - reduce create random instace
|
||||
+ private final RandomSource random = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.create(); // Plazma - reduce create random instace
|
||||
private final ServerLevelData serverLevelData;
|
||||
private int tickDelay;
|
||||
private int spawnDelay;
|
||||
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 a2093158e57d5f43c4afa66386481b82b3c4c3c4..2b75115caf82b9c4ccdd813b98af569e80ac2629 100644
|
||||
index 7dd5e0b935d98d552c916f8412569ff4aa0e9b04..4d0f209df602f017500c1d56423fa482423f9702 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -86,7 +86,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -87,7 +87,7 @@ public class FishingHook extends Projectile {
|
||||
|
||||
private FishingHook(EntityType<? extends FishingHook> type, Level world, int luckOfTheSeaLevel, int lureLevel) {
|
||||
super(type, world);
|
||||
@@ -144,10 +143,10 @@ index a2093158e57d5f43c4afa66386481b82b3c4c3c4..2b75115caf82b9c4ccdd813b98af569e
|
||||
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 eaa2943b667967f93f28d9d794d702fdaeb670ec..689a4ee7b3f136b14e8e56709cac7d2da89c8efd 100644
|
||||
index fdff9788eaf663be79214b2ca491f0f0444f6136..de50b06f13df481fa59e1abe16d5181b8124b427 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -109,7 +109,7 @@ public class Raid {
|
||||
@@ -118,7 +118,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);
|
||||
@@ -156,7 +155,7 @@ index eaa2943b667967f93f28d9d794d702fdaeb670ec..689a4ee7b3f136b14e8e56709cac7d2d
|
||||
this.waveSpawnPos = Optional.empty();
|
||||
this.id = id;
|
||||
this.level = world;
|
||||
@@ -123,7 +123,7 @@ public class Raid {
|
||||
@@ -132,7 +132,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);
|
||||
@@ -166,10 +165,10 @@ index eaa2943b667967f93f28d9d794d702fdaeb670ec..689a4ee7b3f136b14e8e56709cac7d2d
|
||||
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 d604b7ec46f08993647979ed220a84842e3fe325..b0b6580a08b15dbfc542ee1fd9e5b6737f8af004 100644
|
||||
index 6d28f1097caa3e37c2917eb401018ebf48c13a39..9397f1fa3b53423deabbedc6f7bb0f98d68c89a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
@@ -97,7 +97,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
|
||||
@@ -96,7 +96,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
|
||||
}
|
||||
// Purpur end
|
||||
};
|
||||
@@ -179,23 +178,23 @@ index d604b7ec46f08993647979ed220a84842e3fe325..b0b6580a08b15dbfc542ee1fd9e5b673
|
||||
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 ef9b1687dd2dfda5398523140aecc678b4690642..130a41387a2546b31019ad918849b2c283ed09d9 100644
|
||||
index 0022263a41b74fc339c5a5629aee3cd2cd05c5ae..0b553c9e90b53cdf84b14a5d5d20dc3cf1ffb44f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -82,7 +82,7 @@ public class Explosion {
|
||||
@@ -93,7 +93,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) {
|
||||
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, ParticleOptions particle, ParticleOptions emitterParticle, Holder<SoundEvent> soundEvent) {
|
||||
- this.random = RandomSource.create();
|
||||
+ this.random = world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||
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 412dd103bad498c3c93b7a3ab98f834944d514eb..7a7f417c2a0af73a35297274b8ddd6ac581901ae 100644
|
||||
index 0a0ab76144aa7d0970638924878f1eb130b2e3e3..a2ffd16c9351c484f0163f19f9352cd643f9b437 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -124,16 +124,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -121,16 +121,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public final Thread thread;
|
||||
private final boolean isDebug;
|
||||
private int skyDarken;
|
||||
@@ -211,27 +210,14 @@ index 412dd103bad498c3c93b7a3ab98f834944d514eb..7a7f417c2a0af73a35297274b8ddd6ac
|
||||
@Deprecated
|
||||
- private final RandomSource threadSafeRandom = RandomSource.createThreadSafe();
|
||||
+ private final RandomSource threadSafeRandom = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? random : RandomSource.createThreadSafe(); // Plazma - Reduce create random instace
|
||||
private final ResourceKey<DimensionType> dimensionTypeId;
|
||||
private final Holder<DimensionType> dimensionTypeRegistration;
|
||||
public final WritableLevelData levelData;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java
|
||||
index b7370e64fd0d50e8725d7d5afc30af2e8bc8455d..9ec2a60c8240f7a3e4cd7944d070156dbf55ac2c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantmentTableBlockEntity.java
|
||||
@@ -22,7 +22,7 @@ public class EnchantmentTableBlockEntity extends BlockEntity implements Nameable
|
||||
public float rot;
|
||||
public float oRot;
|
||||
public float tRot;
|
||||
- private static final RandomSource RANDOM = RandomSource.create();
|
||||
+ private static final RandomSource RANDOM = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||
private Component name;
|
||||
private int lapis = 0; // Purpur
|
||||
|
||||
// private final Supplier<ProfilerFiller> profiler; // Plazma - Completely remove Mojang's Profiler
|
||||
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 7291e4056b8e46ab59b71818388ac55fbb12993f..b847f59c5d3e0d7ccb22eaa5d9068082db5ba9a4 100644
|
||||
index fb9611866671880fc7a1a969da928b8f2ad15269..44962ecedf724e941e59913188afe4cfad252fc8 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
|
||||
@@ -368,7 +368,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -357,7 +357,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
}
|
||||
|
||||
private static void spawnGatewayPortal(ServerLevel world, BlockPos pos, EndGatewayConfiguration config) {
|
||||
@@ -241,33 +227,33 @@ index 7291e4056b8e46ab59b71818388ac55fbb12993f..b847f59c5d3e0d7ccb22eaa5d9068082
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
index f8cd23fb6ea7909b8f30bd21d3f2c7bcc483ef21..3a4044271e23faf4c5271237aba700103f6df830 100644
|
||||
index a6b6e5ea191c0e2cd7a2e4f01b89d8af40a83c1b..19769ac9fa688969fd2db7c9a5e92eaadac124c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
@@ -221,7 +221,7 @@ public class ChunkGeneratorStructureState {
|
||||
@@ -224,7 +224,7 @@ public class ChunkGeneratorStructureState {
|
||||
List<CompletableFuture<ChunkPos>> list = new ArrayList(j);
|
||||
int k = placement.spread();
|
||||
HolderSet<Biome> holderset = placement.preferredBiomes();
|
||||
- RandomSource randomsource = RandomSource.create();
|
||||
+ RandomSource randomsource = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||
+ RandomSource randomsource = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.random() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||
|
||||
// Paper start
|
||||
// Paper start - Add missing structure set seed configs
|
||||
if (this.conf.strongholdSeed != null && structureSetEntry.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java b/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
|
||||
index 18fce94f0d4b9d28e3afec61c7578f672973a71f..c98d65c146213bdf530916b8ec371e0b0b8f23e7 100644
|
||||
index 7bbe93966fa00b7001da53bf2f22f4d942b7cc22..6c5eececc83571b0f60e7f672ed185e1d262e99c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
|
||||
@@ -62,7 +62,7 @@ public enum DragonRespawnAnimation {
|
||||
@@ -81,7 +81,7 @@ public enum DragonRespawnAnimation {
|
||||
world.explode((Entity) null, (double) ((float) worldgenender_spike.getCenterX() + 0.5F), (double) worldgenender_spike.getHeight(), (double) ((float) worldgenender_spike.getCenterZ() + 0.5F), 5.0F, Level.ExplosionInteraction.BLOCK);
|
||||
SpikeConfiguration worldgenfeatureendspikeconfiguration = new SpikeConfiguration(true, ImmutableList.of(worldgenender_spike), new BlockPos(0, 128, 0));
|
||||
|
||||
world.explode((Entity)null, (double)((float)endSpike.getCenterX() + 0.5F), (double)endSpike.getHeight(), (double)((float)endSpike.getCenterZ() + 0.5F), 5.0F, Level.ExplosionInteraction.BLOCK);
|
||||
SpikeConfiguration spikeConfiguration = new SpikeConfiguration(true, ImmutableList.of(endSpike), new BlockPos(0, 128, 0));
|
||||
- Feature.END_SPIKE.place(spikeConfiguration, world, world.getChunkSource().getGenerator(), RandomSource.create(), new BlockPos(endSpike.getCenterX(), 45, endSpike.getCenterZ()));
|
||||
+ Feature.END_SPIKE.place(spikeConfiguration, world, world.getChunkSource().getGenerator(), (world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create()), new BlockPos(endSpike.getCenterX(), 45, endSpike.getCenterZ())); // Plazma - Reduce create random instance
|
||||
- Feature.END_SPIKE.place(worldgenfeatureendspikeconfiguration, world, world.getChunkSource().getGenerator(), RandomSource.create(), new BlockPos(worldgenender_spike.getCenterX(), 45, worldgenender_spike.getCenterZ()));
|
||||
+ Feature.END_SPIKE.place(worldgenfeatureendspikeconfiguration, world, world.getChunkSource().getGenerator(), (world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create()), new BlockPos(worldgenender_spike.getCenterX(), 45, worldgenender_spike.getCenterZ())); // Plazma - Reduce create random instance
|
||||
}
|
||||
} else if (bl) {
|
||||
fight.setRespawnStage(SUMMONING_DRAGON);
|
||||
} else if (flag1) {
|
||||
fight.setRespawnStage(SUMMONING_DRAGON); // CraftBukkit - decompile error
|
||||
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 c1ff2e15bc5da1a642872ac0fdcdc457e8abb063..c8b29f79725bb9ccec5b48476e242609a452402c 100644
|
||||
index 18a1b4325cac81b040596071dab99ef9bf6f3142..ab492b184a4ecdefc423823fc72abd800b71f016 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
|
||||
@@ -472,7 +472,7 @@ public class EndDragonFight {
|
||||
@@ -275,21 +261,21 @@ index c1ff2e15bc5da1a642872ac0fdcdc457e8abb063..c8b29f79725bb9ccec5b48476e242609
|
||||
return iregistry.getHolder(EndFeatures.END_GATEWAY_DELAYED);
|
||||
}).ifPresent((holder_c) -> {
|
||||
- ((ConfiguredFeature) holder_c.value()).place(this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), pos);
|
||||
+ ((ConfiguredFeature) holder_c.value()).place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), pos); // Plazma - Reduce create random instace
|
||||
+ holder_c.value().place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), pos); // Plazma - Reduce create random instace
|
||||
});
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ public class EndDragonFight {
|
||||
this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Prevent "softlocked" exit portal generation
|
||||
- if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation)) {
|
||||
+ if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), this.portalLocation)) { // Plazma - Reduce create random instace
|
||||
int i = Mth.positiveCeilDiv(4, 16);
|
||||
|
||||
this.level.getChunkSource().chunkMap.waitForLightBeforeSending(new ChunkPos(this.portalLocation), i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index c13cdbaf7abdf120a3969f8e887b4c3b78989c9c..5bb9bfbad85a115bf32955c2abc89edc2e7a6e43 100644
|
||||
index 95e35c223f2ad9b6de6749544abd68de71e4f1ab..492e0c1d00e8098d9a974f46c087a404ec67764e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -14,11 +14,12 @@ import org.bukkit.inventory.meta.FireworkMeta;
|
||||
@@ -304,13 +290,13 @@ index c13cdbaf7abdf120a3969f8e887b4c3b78989c9c..5bb9bfbad85a115bf32955c2abc89edc
|
||||
super(server, entity);
|
||||
+ this.random = this.getHandle().level().plazmaConfig().misc.reduceRandom ? this.getHandle().level().getRandom() : net.minecraft.util.RandomSource.create(); // Plazma - Reduce create random instance
|
||||
|
||||
// Paper Start - Expose firework item directly
|
||||
// Paper start - Expose firework item directly
|
||||
// ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index c85f1a01c951f85c2347eba18a896e87c4c8b368..d88208cb454d1042440803c817d99c5dcb775330 100644
|
||||
index e725f6e8205976a7b137aefb98b874cf4ae14893..dad5379066140b1eadab0a283cc7d8c019d8f4b6 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -40,6 +40,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -65,6 +65,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Miscellaneous misc;
|
||||
public class Miscellaneous extends ConfigurationPart {
|
||||
|
||||
@@ -320,7 +306,7 @@ index c85f1a01c951f85c2347eba18a896e87c4c8b368..d88208cb454d1042440803c817d99c5d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index d79410cc8b6054e5d3297b3e768fb232f97062e4..e9850b634c4e9bbebea6534690632b067b69b0b6 100644
|
||||
index b5b4229ccdecd63bd3e689e8247e44341d7c30cc..33544c734798d9fa1954c7806420f1e0b3653898 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -22,6 +22,7 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -7,26 +7,27 @@ Subject: [PATCH] Apply various optimizations
|
||||
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 a13e6d41584a55e3e17d55d568b23f48082750ef..23eb620351ee08cac97e0408f1fc6cee33f036d0 100644
|
||||
index f7201a74f66892c9d93616e9afb99d9499f0cdbc..3a9d8e64d0a02a40a89cd82e014ed1bebcd6b8b3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2139,8 +2139,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2209,8 +2209,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
|
||||
+ 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 - moved up
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
|
||||
+ //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();
|
||||
@@ -2169,7 +2170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2238,8 +2239,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
entity.push(d0, 0.0D, d1);
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
- }
|
||||
+ //} // Plazma
|
||||
+ //} // Plazma - Swaps the predicate order of collision
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
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] Don't load chunks to spawn phantom
|
||||
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 f74c5eda91a3d521763ec7bc33f23e0c62458cc2..49a8a81c586908278d1e3cbd51dea307540f28ec 100644
|
||||
index 04f67f7b43d2f461c776c76614dc3e5f060aea63..b3fe0dd152b3e2e1b83b4ec2270d387e6117ec1c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -71,6 +71,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
@@ -70,6 +70,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
|
||||
if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper
|
||||
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
|
||||
+ 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 e9850b634c4e9bbebea6534690632b067b69b0b6..036c0b12553ae203e8c73d44dc2e3d625b812af5 100644
|
||||
index 33544c734798d9fa1954c7806420f1e0b3653898..b83a1058484e3d4d46f91d659f795f59d7087b72 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -32,6 +32,7 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -6,25 +6,25 @@ Subject: [PATCH] Add option to disable moved to quickly check for specific
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a7e82f95db5c6c054175192f019072006a3ef31f..21def42f813f00c9fbc9c920b9ba61efc5928ef6 100644
|
||||
index 176e54f1c5f4feb98bee8876c304f6e248909e9c..2133251cc2ee2e50f0b830c9f5123d3d9e7a6430 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1439,6 +1439,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
||||
@@ -1469,6 +1469,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
|
||||
+ if (!this.player.getBukkitEntity().hasPermission("plazma.bypass-moved-to-quickly-check") || !(org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.checkSpectatorMovedToQuickly && this.player.isSpectator())) // Plazma - Options to bypass moved to quickly check
|
||||
if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !flag)) {
|
||||
float f2 = flag ? 300.0F : 100.0F;
|
||||
|
||||
+ if (!this.player.getBukkitEntity().hasPermission("plazma.bypass-moved-to-quickly-check") || !(org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.checkSpectatorMovedToQuickly && this.player.isSpectator())) // Plazma
|
||||
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
// CraftBukkit end
|
||||
// Paper start - Add fail move event
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index c687f448761a591900ae5ebad9c8dfca572e9b31..f3cf7634a5fd470e7fb295ae1f88e14f0c4a0d1d 100644
|
||||
index dad5379066140b1eadab0a283cc7d8c019d8f4b6..b6c5fc90654a9d89d4c70948124be6ae66c86cdf 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Player player;
|
||||
public class Player extends ConfigurationPart {
|
||||
|
||||
public boolean allowAnyUsername = false;
|
||||
+ public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 22:13:07 +0900
|
||||
Subject: [PATCH] Avoid double I/O operation on load player file
|
||||
|
||||
|
||||
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..b4b74bff0579b919266e91464b36c9381342b677 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 isNormalFile = file.exists() && file.isFile(); // Plazma - Avoid double I/O operation
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && isNormalFile ) // 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 (isNormalFile) { // Plazma - Avoid double I/O operation
|
||||
nbttagcompound = NbtIo.readCompressed(file);
|
||||
}
|
||||
// Spigot Start
|
||||
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 8ce870a5341a61fbbaf42021ef7f7f615a6a3e09..6650f74b01285c1dba8243ca11dbde06419a90e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -72,14 +72,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 b6c5fc90654a9d89d4c70948124be6ae66c86cdf..ae6b4ee0add2de0b7568424abeab1bd441653bcb 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -35,6 +35,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(new net.minecraft.resources.ResourceLocation(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,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 12:03:06 +0900
|
||||
Subject: [PATCH] Don't refresh LootTable for non player interaction
|
||||
|
||||
|
||||
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 02364a148b347e3669275553004391e31d77c0b5..cd2d3707c8e4a313ad15958b2f926be6e05bcd4d 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 (player == null && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.refreshLootTableForNonPlayerInteraction) return; // Plazma
|
||||
if (this.level != null && this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - don't unpack loot table if not in world
|
||||
LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable);
|
||||
if (player instanceof ServerPlayer) {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index d88208cb454d1042440803c817d99c5dcb775330..c687f448761a591900ae5ebad9c8dfca572e9b31 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -42,6 +42,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public boolean reduceRandom = OPTIMIZE;
|
||||
public boolean ignoreThreadSafeRandom = false;
|
||||
+ public boolean refreshLootTableForNonPlayerInteraction = !OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,25 +3,27 @@ From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 22:35:19 +0900
|
||||
Subject: [PATCH] Ignore useless entity packets
|
||||
|
||||
[REFERENCE]
|
||||
- PurpurMC/Purpur
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index c6ef510d335b8baea58c4491853414a52a06b66b..e2dcdc9f317a4ab1a9b30e482607dc041abb7035 100644
|
||||
index c3a4fcf600e72f9e95e9df673619ce37d0480cca..2b4d3db901784a82e1ed91520a5e3d1fb8ca6b3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -200,6 +200,8 @@ public class ServerEntity {
|
||||
@@ -214,6 +214,8 @@ public class ServerEntity {
|
||||
flag4 = true;
|
||||
flag5 = true;
|
||||
}
|
||||
+
|
||||
+ if (this.level.plazmaConfig().entity.ignoreUselessPackets && isUselessPacket(packet1)) packet1 = null; // Plazma
|
||||
+ if (this.level.plazmaConfig().entity.ignoreUselessPackets && isUselessPacket(packet1)) packet1 = null; // Plazma - Ignore useless entity packets
|
||||
}
|
||||
|
||||
if ((this.trackDelta || this.entity.hasImpulse || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) && this.tickCount > 0) {
|
||||
@@ -272,6 +274,19 @@ public class ServerEntity {
|
||||
@@ -297,6 +299,19 @@ public class ServerEntity {
|
||||
});
|
||||
}
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Ignore useless entity packets
|
||||
+ private boolean isUselessPacket(@Nullable Packet<?> packet) {
|
||||
+ if (!(packet instanceof ClientboundMoveEntityPacket p)) return false;
|
||||
+ if (p instanceof ClientboundMoveEntityPacket.Pos)
|
||||
@@ -32,13 +34,13 @@ index c6ef510d335b8baea58c4491853414a52a06b66b..e2dcdc9f317a4ab1a9b30e482607dc04
|
||||
+ return p.getXa() == 0 && p.getYa() == 0 && p.getZa() == 0 && p.getxRot() == 0 && p.getyRot() == 0;
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Ignore useless entity packets
|
||||
+
|
||||
public void removePairing(ServerPlayer player) {
|
||||
this.entity.stopSeenByPlayer(player);
|
||||
player.connection.send(new ClientboundRemoveEntitiesPacket(new int[]{this.entity.getId()}));
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 036c0b12553ae203e8c73d44dc2e3d625b812af5..909a74c19501d9440f3d2435b6514d738efcfc05 100644
|
||||
index b83a1058484e3d4d46f91d659f795f59d7087b72..9debf554deb5b7aa021502ff7d600905f56fa25c 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -29,6 +29,8 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -5,23 +5,24 @@ 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 aeae6117b398b84d5c8ecaa175a72867416ff166..c9df97eebe3635009737be83a28f36d291fcce79 100644
|
||||
index 05c41e1c2f4a1c714dc842dc019acda46fc41e7b..ba6295ce11236c7eadaeaa042482d6cec0945bd1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -936,10 +936,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
}
|
||||
// Paper end
|
||||
//this.level().getProfiler().push("sensing"); // Purpur
|
||||
@@ -997,10 +997,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||
//ProfilerFiller gameprofilerfiller = this.level().getProfiler(); // Purpur
|
||||
|
||||
//gameprofilerfiller.push("sensing"); // Purpur
|
||||
- this.sensing.tick();
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
int i = this.level().getServer().getTickCount() + this.getId();
|
||||
+ //this.sensing.tick(); // Plazma - Moved down
|
||||
//gameprofilerfiller.pop(); // Purpur
|
||||
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) {
|
||||
//this.level().getProfiler().push("targetSelector"); // Purpur
|
||||
//gameprofilerfiller.push("targetSelector"); // Purpur
|
||||
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 909a74c19501d9440f3d2435b6514d738efcfc05..b036b54d551c892cc48d0a6816382bce5e38efd4 100644
|
||||
index 9debf554deb5b7aa021502ff7d600905f56fa25c..dceb5b2cec5f0c20be74d892e8cab98823d2f59a 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -30,6 +30,7 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -1,152 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 28 Sep 2023 11:47:50 +0900
|
||||
Subject: [PATCH] Implement No Chat Reports
|
||||
|
||||
Implemented: 62fbdef42dfbfec551d8324b7084c4ccf248bab7
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
index 40f51062624161892c780ddae05e22859e2cd021..b0b515b8ebeffe25a760d7d6faa87cbc1a585b2d 100644
|
||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
@@ -139,9 +139,13 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
public <T> void writeJsonWithCodec(Codec<T> codec, T value) {
|
||||
DataResult<JsonElement> dataresult = codec.encodeStart(JsonOps.INSTANCE, value);
|
||||
|
||||
- this.writeUtf(FriendlyByteBuf.GSON.toJson((JsonElement) Util.getOrThrow(dataresult, (s) -> {
|
||||
- return new EncoderException("Failed to encode: " + s + " " + value);
|
||||
- })));
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ JsonElement element = Util.getOrThrow(dataresult, s -> new EncoderException("Failed to encode: " + s + " " + value));
|
||||
+ if (codec == net.minecraft.network.protocol.status.ServerStatus.CODEC
|
||||
+ && org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.queryData())
|
||||
+ element.getAsJsonObject().addProperty("preventsChatReports", true);
|
||||
+ this.writeUtf(GSON.toJson(element));
|
||||
+ // Plazma end
|
||||
}
|
||||
|
||||
public <T> void writeId(IdMap<T> registry, T value) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..4f0d6ac849dda74c9180fa03d97d389cc4554b46 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
@@ -24,4 +24,13 @@ public record ServerboundChatCommandPacket(String command, Instant timeStamp, lo
|
||||
public void handle(ServerGamePacketListener listener) {
|
||||
listener.handleChatCommand(this);
|
||||
}
|
||||
+
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ @Override
|
||||
+ public ArgumentSignatures argumentSignatures() {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled)
|
||||
+ return ArgumentSignatures.EMPTY;
|
||||
+ return this.argumentSignatures;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..b32e17ef1d7d65f2e3cf4fb5471d8182b3ba892f 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
@@ -25,4 +25,12 @@ public record ServerboundChatPacket(String message, Instant timeStamp, long salt
|
||||
public void handle(ServerGamePacketListener listener) {
|
||||
listener.handleChat(this);
|
||||
}
|
||||
+
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ @Override
|
||||
+ public @Nullable MessageSignature signature() {
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled) return null;
|
||||
+ return this.signature;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
index 9d6db4a378036559efab91c8b7dcf2a6b0c2cce6..4d9f73add791cef03cc7aeaf1598a73c2195809a 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
@@ -16,6 +16,15 @@ public record ServerboundChatSessionUpdatePacket(RemoteChatSession.Data chatSess
|
||||
|
||||
@Override
|
||||
public void handle(ServerGamePacketListener listener) {
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.requireModInstallation()) {
|
||||
+ ((net.minecraft.server.network.ServerGamePacketListenerImpl) listener).disconnect(
|
||||
+ net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.requireModInstallation.message),
|
||||
+ org.bukkit.event.player.PlayerKickEvent.Cause.NCR_NOT_INSTALLED
|
||||
+ );
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
listener.handleChatSessionUpdate(this);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 770b959d9e51ef0645415d5a0d7d79b7031abd66..82670c8bc74cbb208a91cec433498b823e86ce2e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -682,6 +682,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@Override
|
||||
public boolean enforceSecureProfile() {
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled) return false; // Plazma - Implement No Chat Reports
|
||||
// Paper start - fix secure profile with proxy online mode
|
||||
return dedicatedserverproperties.enforceSecureProfile
|
||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index b19c59a87d4136da583a0b687f6b27fef3456f09..b54372c32845d2bc340951c0ea88d480efc1dd6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -262,6 +262,13 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
}
|
||||
|
||||
public void send(Packet<?> packet, @Nullable PacketSendListener callbacks) {
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.convertToSystemMessage()
|
||||
+ && packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket p) {
|
||||
+ this.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(null, Component.Serializer.toJson(p.chatType().resolve(this.player.level().registryAccess()).get().decorate(p.unsignedContent() != null ? p.unsignedContent() : Component.literal(p.body().content()))), false), null);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
// CraftBukkit start
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e8de78f8b7c90a719e10c483991f45a7886256be..0ff64fc50768a4bed9c871fed1089753912b89d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1493,6 +1493,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled) return true; // Plazma - Implement No Chat Reports
|
||||
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 f3cf7634a5fd470e7fb295ae1f88e14f0c4a0d1d..5dafbe4ca74071e25ce79128ca08c7bfebb778d5 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -56,4 +56,22 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
}
|
||||
|
||||
+ public NoChatReports noChatReports;
|
||||
+ public class NoChatReports extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean enabled = false;
|
||||
+ boolean queryData = true; public boolean queryData() { return this.enabled && this.queryData; }
|
||||
+ boolean convertToSystemMessage = true; public boolean convertToSystemMessage() { return this.enabled && this.convertToSystemMessage; }
|
||||
+ public boolean requireModInstallation() { return this.enabled && this.requireModInstallation.enabled; }
|
||||
+
|
||||
+ public RequireModInstallation requireModInstallation;
|
||||
+ public class RequireModInstallation extends ConfigurationPart {
|
||||
+
|
||||
+ boolean enabled = false;
|
||||
+ public String message = "You do not have No Chat Reports, and this server is configured to require it on client!";
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Variable entity wakeup duration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index b036b54d551c892cc48d0a6816382bce5e38efd4..459cba838468b95547b2a515c497fcbb7bd45718 100644
|
||||
index dceb5b2cec5f0c20be74d892e8cab98823d2f59a..bc35244533621436e3c0fb871edf7834ad937f81 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -39,6 +39,20 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -30,7 +30,7 @@ index b036b54d551c892cc48d0a6816382bce5e38efd4..459cba838468b95547b2a515c497fcbb
|
||||
|
||||
public Structure structure;
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 0b03dae85e6008283e68b07fa438daccf0e4f5fa..5b981300a8addb85fce32b814dfe70cb2bc4beb3 100644
|
||||
index 56e52b16b419c882440a15947f037ae1a902bc70..583647f6c9ca0fb092f30c97693bd548f692dfd3 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -68,29 +68,36 @@ public class ActivationRange
|
||||
@@ -42,35 +42,35 @@ index 0b03dae85e6008283e68b07fa438daccf0e4f5fa..5b981300a8addb85fce32b814dfe70cb
|
||||
+ if (deviation == 0) return duration;
|
||||
+ return (int) Math.min(Integer.MAX_VALUE, Math.max(1, Math.round(duration * (1 + deviation * random.nextGaussian()))));
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Variable entity wakeup duration
|
||||
private static int checkInactiveWakeup(Entity entity) {
|
||||
Level world = entity.level();
|
||||
SpigotWorldConfig config = world.spigotConfig;
|
||||
+ org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig = world.plazmaConfig(); // Plazma
|
||||
+ org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig = world.plazmaConfig(); // Plazma - Variable entity wakeup duration
|
||||
long inactiveFor = MinecraftServer.currentTick - entity.activatedTick;
|
||||
if (entity.activationType == ActivationType.VILLAGER) {
|
||||
if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
|
||||
world.wakeupInactiveRemainingVillagers--;
|
||||
- return config.wakeUpInactiveVillagersFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveVillagersFor, plazmaConfig.entity.wakeUpDurationVariance.villager()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveVillagersFor, plazmaConfig.entity.wakeUpDurationVariance.villager()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.ANIMAL) {
|
||||
if (inactiveFor > config.wakeUpInactiveAnimalsEvery && world.wakeupInactiveRemainingAnimals > 0) {
|
||||
world.wakeupInactiveRemainingAnimals--;
|
||||
- return config.wakeUpInactiveAnimalsFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveAnimalsFor, plazmaConfig.entity.wakeUpDurationVariance.animal()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveAnimalsFor, plazmaConfig.entity.wakeUpDurationVariance.animal()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.FLYING_MONSTER) {
|
||||
if (inactiveFor > config.wakeUpInactiveFlyingEvery && world.wakeupInactiveRemainingFlying > 0) {
|
||||
world.wakeupInactiveRemainingFlying--;
|
||||
- return config.wakeUpInactiveFlyingFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveFlyingFor, plazmaConfig.entity.wakeUpDurationVariance.flying()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveFlyingFor, plazmaConfig.entity.wakeUpDurationVariance.flying()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.MONSTER || entity.activationType == ActivationType.RAIDER) {
|
||||
if (inactiveFor > config.wakeUpInactiveMonstersEvery && world.wakeupInactiveRemainingMonsters > 0) {
|
||||
world.wakeupInactiveRemainingMonsters--;
|
||||
- return config.wakeUpInactiveMonstersFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveMonstersFor, plazmaConfig.entity.wakeUpDurationVariance.monster()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveMonstersFor, plazmaConfig.entity.wakeUpDurationVariance.monster()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
@@ -17,7 +17,7 @@ index 57d0cd3ad6f972e986c72a57f1a6e36003f190c2..50d97c5ab33f33b81dbafd7cf42da5af
|
||||
|
||||
public ZeroCollidingReferenceStateTable(final StateHolder<?, ?> state, final Map<Property<?>, Comparable<?>> this_map) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
index 5f285d190186a2ff5a61d05070593e1d633dd79a..669c42f1598e2a06bb0b95aa0bc413911346f3ff 100644
|
||||
index 45744d86e9582a93a0cec26009deea091080fbbe..5dd9473c55a08a775aa406901a0e54ef6f63837a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
@@ -114,6 +114,12 @@ public abstract class StateHolder<O, S> {
|
||||
@@ -29,7 +29,7 @@ index 5f285d190186a2ff5a61d05070593e1d633dd79a..669c42f1598e2a06bb0b95aa0bc41391
|
||||
+ if (ret == null) throw new IllegalArgumentException("Cannot set property " + property + " to " + value + " on " + this.owner + ", it is not an allowed value");
|
||||
+ return ret;
|
||||
+ /*
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Optimise state lookup more
|
||||
Comparable<?> comparable = this.values.get(property);
|
||||
if (comparable != null && !comparable.equals(value)) {
|
||||
S object = this.neighbours.get(property, value);
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 Nov 2023 10:39:01 +0900
|
||||
Subject: [PATCH] Improve biome temperature cache
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..642fd0e06f9ab53b4ef2cafe1dc3321a3fd7ee9e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -67,7 +67,7 @@ public final class Biome {
|
||||
private final MobSpawnSettings mobSettings;
|
||||
private final BiomeSpecialEffects specialEffects;
|
||||
// Pufferfish start - use our cache
|
||||
- private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> {
|
||||
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> { // Plazma - Improve biome temperature cache
|
||||
return Util.make(() -> {
|
||||
/*
|
||||
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
|
||||
@@ -125,7 +125,7 @@ public final class Biome {
|
||||
public float getTemperature(BlockPos blockPos) {
|
||||
long l = blockPos.asLong();
|
||||
// Pufferfish start
|
||||
- gg.airplane.structs.Long2FloatAgingCache cache = this.temperatureCache.get();
|
||||
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - Improve biome temperature cache
|
||||
float f = cache.getValue(l);
|
||||
if (!Float.isNaN(f)) {
|
||||
return f;
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Suppress errors from dirty attributes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index e2dcdc9f317a4ab1a9b30e482607dc041abb7035..085dfb2cf8596f5f0be4b1bf9a3cbe1a0e9b2967 100644
|
||||
index 2b4d3db901784a82e1ed91520a5e3d1fb8ca6b3e..b66a56ea65cb323953278f80d210473f9f571722 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -395,7 +395,8 @@ public class ServerEntity {
|
||||
@@ -415,7 +415,8 @@ public class ServerEntity {
|
||||
}
|
||||
|
||||
if (this.entity instanceof LivingEntity) {
|
||||
@@ -18,7 +18,7 @@ index e2dcdc9f317a4ab1a9b30e482607dc041abb7035..085dfb2cf8596f5f0be4b1bf9a3cbe1a
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
// CraftBukkit start - Send scaled max health
|
||||
@@ -406,7 +407,7 @@ public class ServerEntity {
|
||||
@@ -426,7 +427,7 @@ public class ServerEntity {
|
||||
this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index e2dcdc9f317a4ab1a9b30e482607dc041abb7035..085dfb2cf8596f5f0be4b1bf9a3cbe1a
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 459cba838468b95547b2a515c497fcbb7bd45718..b1293935e55fcb1c45224e5bda9be8d1045ff4e8 100644
|
||||
index bc35244533621436e3c0fb871edf7834ad937f81..a9c8a5918184a2ea364261e279edf7169ae270c7 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 {
|
||||
@@ -1,29 +1,29 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Tue, 5 Dec 2023 13:29:28 +0900
|
||||
Subject: [PATCH] Add Entity spawn deadlock timer
|
||||
Subject: [PATCH] Add entity spawn deadlock timer
|
||||
|
||||
[REFERENCE]
|
||||
- AbsolemJackdaw/FixMySpawnR
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 914564a528c360f352927e7681ab2e31ed365b21..090643e977257a097a99a3f54d1d73b995cfd82a 100644
|
||||
index 967af8771ff8564c715d89f4b4b69b16c25add59..2ac5fb585636523787e05edaa58a4fa34a39ef28 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -46,6 +46,8 @@ public abstract class BaseSpawner {
|
||||
@@ -50,6 +50,8 @@ public abstract class BaseSpawner {
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
private int tickDelay = 0; // Paper
|
||||
+ private int blockExistsTick = 0; // Plazma - Implement FixMySpawnR
|
||||
+ private boolean blockLockedByTime = false; // Plazma - Implement FixMySpawnR
|
||||
// Paper start - ported from 1.20.3 Fix MC-259321
|
||||
static <B, T extends B> net.minecraft.world.level.entity.EntityTypeTest<B, T> forExactClass(Class<T> clazz) {
|
||||
return new net.minecraft.world.level.entity.EntityTypeTest<>() {
|
||||
@@ -97,6 +99,17 @@ public abstract class BaseSpawner {
|
||||
private int tickDelay = 0; // Paper - Configurable mob spawner tick rate
|
||||
+ private int blockExistsTick = 0; // Plazma - Add entity spawn deadlock timer
|
||||
+ private boolean blockLockedByTime = false; // Plazma - Add entity spawn deadlock timer
|
||||
|
||||
public BaseSpawner() {}
|
||||
|
||||
@@ -85,6 +87,17 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
|
||||
public void serverTick(ServerLevel world, BlockPos pos) {
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
+ // Plazma start - Add entity spawn deadlock timer
|
||||
+ if (world.plazmaConfig().entity.spawnDeadlockTimer.enabled) {
|
||||
+ if (!this.blockLockedByTime) {
|
||||
+ if (this.blockExistsTick > world.plazmaConfig().entity.spawnDeadlockTimer.timerTimeout)
|
||||
@@ -33,35 +33,35 @@ index 914564a528c360f352927e7681ab2e31ed365b21..090643e977257a097a99a3f54d1d73b9
|
||||
+
|
||||
+ if (blockLockedByTime && world.getBestNeighborSignal(pos) > 0) return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add entity spawn deadlock timer
|
||||
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
|
||||
// Paper start - Configurable mob spawner tick rate
|
||||
if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||
@@ -301,6 +314,12 @@ public abstract class BaseSpawner {
|
||||
if (nbt.contains("SpawnRange", 99)) {
|
||||
@@ -290,6 +303,13 @@ public abstract class BaseSpawner {
|
||||
this.spawnRange = nbt.getShort("SpawnRange");
|
||||
}
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
|
||||
+ // Plazma start - Add entity spawn deadlock timer
|
||||
+ if (nbt.contains("Plazma.SpawnerTicks", 99)) {
|
||||
+ this.blockExistsTick = nbt.getInt("Plazma.SpawnerTicks");
|
||||
+ this.blockLockedByTime = nbt.getBoolean("Plazma.SpawnerLocked");
|
||||
+ }
|
||||
+ // Plazma end
|
||||
|
||||
+ // Plazma end - Add entity spawn deadlock timer
|
||||
+
|
||||
this.displayEntity = null;
|
||||
}
|
||||
@@ -330,6 +349,9 @@ public abstract class BaseSpawner {
|
||||
|
||||
@@ -318,6 +338,8 @@ public abstract class BaseSpawner {
|
||||
}));
|
||||
}
|
||||
|
||||
+ nbt.putInt("Plazma.SpawnerTicks", this.blockExistsTick); // Plazma - Implement FixMySpawnR
|
||||
+ nbt.putBoolean("Plazma.SpawnerLocked", this.blockLockedByTime); // Plazma - Implement FixMySpawnR
|
||||
+
|
||||
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).result().orElseThrow());
|
||||
+ nbt.putInt("Plazma.SpawnerTicks", this.blockExistsTick); // Plazma - Add entity spawn deadlock timer
|
||||
+ nbt.putBoolean("Plazma.SpawnerLocked", this.blockLockedByTime); // Plazma - Add entity spawn deadlock timer
|
||||
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).getOrThrow());
|
||||
return nbt;
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index b1293935e55fcb1c45224e5bda9be8d1045ff4e8..e5e0b0f0bd3b2249dc1db029682b8957b0addcac 100644
|
||||
index a9c8a5918184a2ea364261e279edf7169ae270c7..ffbe18cd212fda0a67d13cb5ccf32068670988aa 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
@@ -54,6 +54,14 @@ public class WorldConfigurations extends ConfigurationPart {
|
||||
@@ -1,57 +0,0 @@
|
||||
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 58609a0911c4e32b6f80f050cd3d23f70ad75b1b..2db6c1b9530b4b082ef6f6ec17c542ba8ad7fa5f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -72,6 +72,15 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
|
||||
}
|
||||
|
||||
private static Aquifer.FluidPicker createFluidPicker(NoiseGeneratorSettings settings) {
|
||||
+ // Plazma start
|
||||
+ if (true) {
|
||||
+ org.plazmamc.plazma.configurations.GlobalConfiguration config = org.plazmamc.plazma.configurations.GlobalConfiguration.get();
|
||||
+ return (x, y, z) -> new Aquifer.FluidStatus(
|
||||
+ config.worldgen.caveLavaSeaLevel.useCustomSeaLevel ? config.worldgen.caveLavaSeaLevel.customSeaLevel : settings.seaLevel(),
|
||||
+ config.worldgen.caveLavaSeaLevel.customSeaLevel(settings)
|
||||
+ );
|
||||
+ }
|
||||
+ // Plazma end
|
||||
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());
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 5dafbe4ca74071e25ce79128ca08c7bfebb778d5..3cfb9357d0c61e84488c2c60f073fa12df942b8e 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -35,6 +35,25 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public WorldGeneration worldgen;
|
||||
public class WorldGeneration extends ConfigurationPart {
|
||||
|
||||
+ public CaveLavaSeaLevel caveLavaSeaLevel;
|
||||
+ public class CaveLavaSeaLevel extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean useCustomSeaLevel = false;
|
||||
+ public int customSeaLevel = -54;
|
||||
+ String customSeaBlock = "default";
|
||||
+
|
||||
+ public net.minecraft.world.level.block.state.BlockState customSeaLevel(net.minecraft.world.level.levelgen.NoiseGeneratorSettings settings) {
|
||||
+ if (this.customSeaBlock.equalsIgnoreCase("default")) return settings.defaultFluid();
|
||||
+ return net.minecraft.core.registries.BuiltInRegistries.BLOCK
|
||||
+ .getOptional(new net.minecraft.resources.ResourceLocation(this.customSeaBlock))
|
||||
+ .orElseGet(() -> {
|
||||
+ PlazmaConfigurations.LOGGER.warn("Invalid custom sea level block: " + this.customSeaBlock, ", defaulting to lava");
|
||||
+ return net.minecraft.world.level.block.Blocks.LAVA;
|
||||
+ })
|
||||
+ .defaultBlockState();
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -288,10 +288,10 @@ index 0000000000000000000000000000000000000000..d11579075e653868a43fe826bdf9b41d
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/util/random/WeightedRandomList.java b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
index 1bcb5a58b945cdb3dc94efb314d7ba41fbb38e07..34beb1b0af10877b3388e6f44913253eb51e7a51 100644
|
||||
index ef44047c3ea850fe52370b8176efbdf0515d20d6..30efa8704c1ae94027272602687cbc4a2bc8a772 100644
|
||||
--- a/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
+++ b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
@@ -8,10 +8,10 @@ import net.minecraft.util.RandomSource;
|
||||
@@ -10,10 +10,10 @@ import net.minecraft.util.RandomSource;
|
||||
|
||||
public class WeightedRandomList<E extends WeightedEntry> {
|
||||
private final int totalWeight;
|
||||
@@ -300,7 +300,7 @@ index 1bcb5a58b945cdb3dc94efb314d7ba41fbb38e07..34beb1b0af10877b3388e6f44913253e
|
||||
|
||||
WeightedRandomList(List<? extends E> entries) {
|
||||
- this.items = ImmutableList.copyOf(entries);
|
||||
+ this.items = entries.size() > 4 ? ImmutableList.copyOf(entries) : java.util.Collections.unmodifiableList(new me.jellysquid.mods.lithium.common.util.collections.HashedReferenceList<>(entries));// Plazma - Lithium: collections.mob_spawning
|
||||
+ this.items = entries.size() > 4 ? ImmutableList.copyOf(entries) : java.util.Collections.unmodifiableList(new me.jellysquid.mods.lithium.common.util.collections.HashedReferenceList<>(entries)); // Plazma - Lithium: collections.mob_spawning
|
||||
this.totalWeight = WeightedRandom.getTotalWeight(entries);
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Improve SwingTime ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7fdb4d5eb1ab6c45c88ca18112d5b1b26bfd5947..57b1f741609193eced5e5ab1d45f18bea005eeb7 100644
|
||||
index f0d611f370966c12e076252ffd020a05c40f3588..8da257e5d305e4ec978f4933d5011f84976e6bb9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2602,6 +2602,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2670,6 +2670,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void updateSwingTime() {
|
||||
+ if (!this.swinging && this.swingTime == 0) return; // Plazma - de-sisyphus :skull:
|
||||
+ if (!this.swinging && this.swingTime == 0) return; // Plazma - Improve SwingTime ticking
|
||||
int i = this.getCurrentSwingDuration();
|
||||
|
||||
if (this.swinging) {
|
||||
@@ -5,71 +5,108 @@ Subject: [PATCH] Save Json list asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
index 935dac757280731bfeb0a8f033cbe315ecac46da..038f370ac2cb768e14fe7605b32b2ac811c33b8f 100644
|
||||
index 22c4f8dea99f92a1eb3da2baf0a15bf9d2ca0462..20c531f11b310dab0a867e589c769393ed835df5 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
@@ -60,20 +60,20 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
@@ -58,21 +58,23 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
this.loadWhiteList();
|
||||
}
|
||||
|
||||
+ // Plazma start - Save JSON list asynchronously
|
||||
private void saveIpBanList() {
|
||||
- try {
|
||||
+ //try { // Plazma - Build fix
|
||||
this.getIpBans().save();
|
||||
- this.getIpBans().save();
|
||||
- } catch (IOException var2) {
|
||||
+ /*} catch (IOException var2) { // Plazma - Build fix
|
||||
LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
|
||||
- LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ }*/ // Plazma - Build fix
|
||||
|
||||
+ this.getIpBans().save();
|
||||
}
|
||||
|
||||
private void saveUserBanList() {
|
||||
- try {
|
||||
+ //try { // Plazma - Build fix
|
||||
this.getBans().save();
|
||||
- this.getBans().save();
|
||||
- } catch (IOException var2) {
|
||||
+ /*} catch (IOException var2) { // Plazma - Build fix
|
||||
LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
|
||||
- LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ }*/ // Plazma - Build fix
|
||||
+ this.getBans().save();
|
||||
+ }
|
||||
+
|
||||
+ private void saveOps() {
|
||||
+ this.getOps().save();
|
||||
+ }
|
||||
+
|
||||
+ private void saveWhiteList() {
|
||||
+ this.getWhiteList().save();
|
||||
}
|
||||
+ // Plazma end - Save JSON list asynchronously
|
||||
|
||||
private void loadIpBanList() {
|
||||
try {
|
||||
@@ -98,14 +100,6 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
- private void saveOps() {
|
||||
- try {
|
||||
- this.getOps().save();
|
||||
- } catch (Exception var2) {
|
||||
- LOGGER.warn("Failed to save operators list: ", (Throwable)var2);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void loadWhiteList() {
|
||||
try {
|
||||
this.getWhiteList().load();
|
||||
@@ -114,14 +108,6 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
- private void saveWhiteList() {
|
||||
- try {
|
||||
- this.getWhiteList().save();
|
||||
- } catch (Exception var2) {
|
||||
- LOGGER.warn("Failed to save white-list: ", (Throwable)var2);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
@Override
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
return !this.isUsingWhitelist() || this.isOp(profile) || this.getWhiteList().isWhiteListed(profile);
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 34b7c5421da93f14050425b0fc16bbc27e5f3eba..a35340b9231bc3009ca9449fa6ea8f8ae6929146 100644
|
||||
index c038da20b76c0b7b1c18471b20be01e849d29f3a..0735a0bd182635e1969d19336b46bc72b14e555f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -61,11 +61,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -42,13 +42,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
public void add(V entry) {
|
||||
this.map.put(this.getKeyForUser(entry.getUser()), entry);
|
||||
|
||||
-
|
||||
- try {
|
||||
+ //try { // Plazma - Fix build
|
||||
this.save();
|
||||
- this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Fix build
|
||||
StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
|
||||
- StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Fix build
|
||||
|
||||
-
|
||||
+ this.save(); // Plazma - Save Json list asynchronously
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@Nullable
|
||||
@@ -62,13 +56,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
public void remove(K key) {
|
||||
this.map.remove(this.getKeyForUser(key));
|
||||
|
||||
-
|
||||
- try {
|
||||
+ //try { // Plazma - Fix build
|
||||
this.save();
|
||||
- this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Fix build
|
||||
StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
|
||||
- StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Fix build
|
||||
|
||||
-
|
||||
+ this.save(); // Plazma - Save Json list asynchronously
|
||||
}
|
||||
|
||||
@@ -142,7 +142,10 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
public void remove(StoredUserEntry<K> entry) {
|
||||
@@ -102,7 +90,9 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
return this.map.values();
|
||||
}
|
||||
|
||||
@@ -77,11 +114,10 @@ index 34b7c5421da93f14050425b0fc16bbc27e5f3eba..a35340b9231bc3009ca9449fa6ea8f8a
|
||||
+ // Plazma start - Save Json list asynchronously
|
||||
+ public void save()/* throws IOException*/ {
|
||||
+ io.papermc.paper.util.MCUtil.scheduleAsyncTask(() -> {
|
||||
+
|
||||
this.removeExpired(); // Paper - remove expired values before saving
|
||||
JsonArray jsonarray = new JsonArray();
|
||||
Stream<JsonObject> stream = this.map.values().stream().map((jsonlistentry) -> { // CraftBukkit - decompile error
|
||||
@@ -154,27 +157,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -114,27 +104,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
Objects.requireNonNull(jsonarray);
|
||||
stream.forEach(jsonarray::add);
|
||||
@@ -89,7 +125,7 @@ index 34b7c5421da93f14050425b0fc16bbc27e5f3eba..a35340b9231bc3009ca9449fa6ea8f8a
|
||||
|
||||
- try {
|
||||
+ try (BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
|
||||
StoredUserList.GSON.toJson(jsonarray, bufferedwriter);
|
||||
StoredUserList.GSON.toJson(jsonarray, StoredUserList.GSON.newJsonWriter(bufferedwriter));
|
||||
- } catch (Throwable throwable) {
|
||||
- if (bufferedwriter != null) {
|
||||
- try {
|
||||
@@ -110,7 +146,7 @@ index 34b7c5421da93f14050425b0fc16bbc27e5f3eba..a35340b9231bc3009ca9449fa6ea8f8a
|
||||
|
||||
+ });
|
||||
}
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Save Json list asynchronously
|
||||
|
||||
public void load() throws IOException {
|
||||
if (this.file.exists()) {
|
||||
136
patches/server/0032-Add-more-MSPT.patch
Normal file
136
patches/server/0032-Add-more-MSPT.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 May 2024 00:01:03 +0900
|
||||
Subject: [PATCH] Add more MSPT
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/MSPTCommand.java b/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
index 03be23690a94a14d7343526acad67ccf53b85c70..416c0a736edf47f76a37be0bc5fe8678cf89cdb3 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/MSPTCommand.java
|
||||
@@ -45,8 +45,10 @@ public final class MSPTCommand extends Command {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
|
||||
List<Component> times = new ArrayList<>();
|
||||
+ times.addAll(eval(server.tickTimes1s.getTimes())); // Plazma - Add more MSPT
|
||||
times.addAll(eval(server.tickTimes5s.getTimes()));
|
||||
times.addAll(eval(server.tickTimes10s.getTimes()));
|
||||
+ times.addAll(eval(server.tickTimes30s.getTimes())); // Plazma - Add more MSPT
|
||||
times.addAll(eval(server.tickTimes60s.getTimes()));
|
||||
|
||||
sender.sendMessage(text().content("Server tick times ").color(GOLD)
|
||||
@@ -61,12 +63,18 @@ public final class MSPTCommand extends Command {
|
||||
text(")")
|
||||
)
|
||||
).append(
|
||||
- text(" from last 5s"),
|
||||
+ // Plazma start - Add more MSPT
|
||||
+ text(" from last 1s"),
|
||||
+ text(",", GRAY),
|
||||
+ text(" 5s"),
|
||||
text(",", GRAY),
|
||||
text(" 10s"),
|
||||
text(",", GRAY),
|
||||
+ text(" 30s"),
|
||||
+ text(",", GRAY),
|
||||
text(" 1m"),
|
||||
text(":", YELLOW)
|
||||
+ // Plazma end - Add more MSPT
|
||||
)
|
||||
);
|
||||
sender.sendMessage(text().content("◴ ").color(GOLD)
|
||||
@@ -74,7 +82,11 @@ public final class MSPTCommand extends Command {
|
||||
.append(
|
||||
times.get(0), SLASH, times.get(1), SLASH, times.get(2), text(", ", YELLOW),
|
||||
times.get(3), SLASH, times.get(4), SLASH, times.get(5), text(", ", YELLOW),
|
||||
- times.get(6), SLASH, times.get(7), SLASH, times.get(8)
|
||||
+ // Plazma start - Add more MSPT
|
||||
+ times.get(6), SLASH, times.get(7), SLASH, times.get(8), text(", ", YELLOW),
|
||||
+ times.get(9), SLASH, times.get(10), SLASH, times.get(11), text(", ", YELLOW),
|
||||
+ times.get(12), SLASH, times.get(13), SLASH, times.get(14), text(", ", YELLOW)
|
||||
+ // Plazma end - Add more MSPT
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -93,18 +105,26 @@ public final class MSPTCommand extends Command {
|
||||
text(")")
|
||||
)
|
||||
).append(
|
||||
- text(" from last 5s"),
|
||||
+ // Plazma start - Add more MSPT
|
||||
+ text(" from last 1s"),
|
||||
+ text(",", GRAY),
|
||||
+ text(" 5s"),
|
||||
text(",", GRAY),
|
||||
text(" 10s"),
|
||||
text(",", GRAY),
|
||||
+ text(" 30s"),
|
||||
+ text(",", GRAY),
|
||||
text(" 1m"),
|
||||
text(":", YELLOW)
|
||||
+ // Plazma end - Add more MSPT
|
||||
)
|
||||
);
|
||||
for (net.minecraft.server.level.ServerLevel level: server.getAllLevels()) {
|
||||
List<Component> worldTimes = new ArrayList<>();
|
||||
+ worldTimes.addAll(eval(level.tickTimes1s.getTimes())); // Plazma - Add more MSPT
|
||||
worldTimes.addAll(eval(level.tickTimes5s.getTimes()));
|
||||
worldTimes.addAll(eval(level.tickTimes10s.getTimes()));
|
||||
+ worldTimes.addAll(eval(level.tickTimes30s.getTimes())); // Plazma - Add more MSPT
|
||||
worldTimes.addAll(eval(level.tickTimes60s.getTimes()));
|
||||
|
||||
sender.sendMessage(text().content("◴ " + level.getWorld().getName() + ": ").color(GOLD)
|
||||
@@ -112,7 +132,11 @@ public final class MSPTCommand extends Command {
|
||||
.append(
|
||||
worldTimes.get(0), SLASH, worldTimes.get(1), SLASH, worldTimes.get(2), text(", ", YELLOW),
|
||||
worldTimes.get(3), SLASH, worldTimes.get(4), SLASH, worldTimes.get(5), text(", ", YELLOW),
|
||||
- worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8)
|
||||
+ // Plazma start - Add more MSPT
|
||||
+ worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8), text(", ", YELLOW),
|
||||
+ worldTimes.get(9), SLASH, worldTimes.get(10), SLASH, worldTimes.get(11), text(", ", YELLOW),
|
||||
+ worldTimes.get(12), SLASH, worldTimes.get(13), SLASH, worldTimes.get(14), text(", ", YELLOW)
|
||||
+ // Plazma end - Add more MSPT
|
||||
)
|
||||
)
|
||||
);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4782f19409d300fbcaa952ae0dd6a0577ade5f7b..f926376ee95b28a9c09a1ad87223f89f1c28f50e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -254,8 +254,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private final long[] tickTimesNanos;
|
||||
private long aggregatedTickTimesNanos;
|
||||
// Paper start - Add tick times API and /mspt command
|
||||
+ public final TickTimes tickTimes1s = new TickTimes(20); // Plazma - Add more MSPT
|
||||
public final TickTimes tickTimes5s = new TickTimes(100);
|
||||
public final TickTimes tickTimes10s = new TickTimes(200);
|
||||
+ public final TickTimes tickTimes30s = new TickTimes(600); // Plazma - Add more MSPT
|
||||
public final TickTimes tickTimes60s = new TickTimes(1200);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
@Nullable
|
||||
@@ -1821,8 +1823,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
long after = Util.getNanos() - before;
|
||||
|
||||
+ worldserver.tickTimes1s.add(this.tickCount, after); // Plazma - Add more MSPT
|
||||
worldserver.tickTimes5s.add(this.tickCount, after);
|
||||
worldserver.tickTimes10s.add(this.tickCount, after);
|
||||
+ worldserver.tickTimes30s.add(this.tickCount, after); // Plazma - Add more MSPT
|
||||
worldserver.tickTimes60s.add(this.tickCount, after);
|
||||
// Plazma end - Port SparklyPaper patches; Track World specific MSPT
|
||||
// Paper start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 508e01e9ef41f006e6d9be71969c0d82dc646628..15548aac320ae6d707cab4a61dfc99eaebb06634 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -234,8 +234,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public boolean hasRidableMoveEvent = false; // Purpur
|
||||
|
||||
// Plazma start - Port SparklyPaper patches; Track World specific MSPT
|
||||
+ public final MinecraftServer.TickTimes tickTimes1s = new MinecraftServer.TickTimes(20); // Plazma - Add more MSPT
|
||||
public final MinecraftServer.TickTimes tickTimes5s = new MinecraftServer.TickTimes(100);
|
||||
public final MinecraftServer.TickTimes tickTimes10s = new MinecraftServer.TickTimes(200);
|
||||
+ public final MinecraftServer.TickTimes tickTimes30s = new MinecraftServer.TickTimes(600); // Plazma - Add more MSPT
|
||||
public final MinecraftServer.TickTimes tickTimes60s = new MinecraftServer.TickTimes(1200);
|
||||
// Plazma end - Port SparklyPaper patches; Track World specific MSPT
|
||||
|
||||
1317
patches/server/0033-Process-pathfinding-asynchronously.patch
Normal file
1317
patches/server/0033-Process-pathfinding-asynchronously.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 May 2024 12:25:59 +0900
|
||||
Subject: [PATCH] Use Akair's flag when running the test server with gradle
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 54a30184392815a01f20b8fc841690e4ae5b3cc6..10bff15cd8b52fd6973aa3565ae75aabdf7dff53 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -137,7 +137,7 @@ fun TaskContainer.registerRunTask(
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
vendor.set(JvmVendorSpec.JETBRAINS)
|
||||
})
|
||||
- jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
|
||||
+ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods", "-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled", "-XX:MaxGCPauseMillis=200", "-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4", "-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90", "-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem", "-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs", "-Daikars.new.flags=true", "-XX:G1NewSizePercent=40", "-XX:G1MaxNewSizePercent=50", "-XX:G1HeapRegionSize=16M", "-XX:G1ReservePercent=15")
|
||||
|
||||
if (rootProject.childProjects["test-plugin"] != null) {
|
||||
val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }
|
||||
@@ -0,0 +1,81 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 May 2024 13:40:48 +0900
|
||||
Subject: [PATCH] Use Plazma logo instead if server favicon doesn't exist
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f926376ee95b28a9c09a1ad87223f89f1c28f50e..cf13166d1fdd663f1f99fd6d00a5296631276511 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1555,29 +1555,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private Optional<ServerStatus.Favicon> loadStatusIcon() {
|
||||
- Optional<Path> optional = Optional.of(this.getFile("server-icon.png").toPath()).filter((path) -> {
|
||||
- return Files.isRegularFile(path, new LinkOption[0]);
|
||||
- }).or(() -> {
|
||||
- return this.storageSource.getIconFile().filter((path) -> {
|
||||
- return Files.isRegularFile(path, new LinkOption[0]);
|
||||
- });
|
||||
- });
|
||||
-
|
||||
- return optional.flatMap((path) -> {
|
||||
- try {
|
||||
- BufferedImage bufferedimage = ImageIO.read(path.toFile());
|
||||
-
|
||||
- Preconditions.checkState(bufferedimage.getWidth() == 64, "Must be 64 pixels wide");
|
||||
- Preconditions.checkState(bufferedimage.getHeight() == 64, "Must be 64 pixels high");
|
||||
- ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
|
||||
-
|
||||
- ImageIO.write(bufferedimage, "PNG", bytearrayoutputstream);
|
||||
- return Optional.of(new ServerStatus.Favicon(bytearrayoutputstream.toByteArray()));
|
||||
- } catch (Exception exception) {
|
||||
- MinecraftServer.LOGGER.error("Couldn't load server icon", exception);
|
||||
- return Optional.empty();
|
||||
- }
|
||||
- });
|
||||
+ // Plazma start - Use Plazma logo instead if server favicon doesn't exist
|
||||
+ @Nullable File file = Optional.of(this.getFile("server-icon.png").toPath()).filter(Files::isRegularFile)
|
||||
+ .or(() -> this.storageSource.getIconFile().filter(Files::isRegularFile)).map(Path::toFile).orElse(null);
|
||||
+
|
||||
+ try (
|
||||
+ java.io.InputStream stream = (file != null)
|
||||
+ ? new java.io.FileInputStream(file)
|
||||
+ : (
|
||||
+ org.plazmamc.plazma.Options.VANILLA_ICO
|
||||
+ ? null
|
||||
+ : MinecraftServer.class.getResourceAsStream("logo.png")
|
||||
+ )
|
||||
+ ) {
|
||||
+ if (stream == null) return Optional.empty();
|
||||
+ if (file == null && !org.plazmamc.plazma.Options.VANILLA_ICO)
|
||||
+ LOGGER.info("No server icon found, using the logo instead.");
|
||||
+
|
||||
+ BufferedImage bufferedimage = ImageIO.read(stream);
|
||||
+
|
||||
+ Preconditions.checkState(bufferedimage.getWidth() == 64, "Must be 64 pixels wide");
|
||||
+ Preconditions.checkState(bufferedimage.getHeight() == 64, "Must be 64 pixels high");
|
||||
+ ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
|
||||
+
|
||||
+ ImageIO.write(bufferedimage, "PNG", bytearrayoutputstream);
|
||||
+ return Optional.of(new ServerStatus.Favicon(bytearrayoutputstream.toByteArray()));
|
||||
+ } catch (Exception exception) {
|
||||
+ MinecraftServer.LOGGER.error("Couldn't load server icon", exception);
|
||||
+ return Optional.empty();
|
||||
+ }
|
||||
+ // Plazma end - Use Plazma logo instead if server favicon doesn't exist
|
||||
}
|
||||
|
||||
public Optional<Path> getWorldScreenshotFile() {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
index 3e0e67c089e269d0bccd4a0d2de5ac1ac515997e..2e75ca5d2b7d8f35814fe9a0814b19a9135d80cb 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -8,5 +8,6 @@ public interface Options {
|
||||
boolean AGGRESSIVE = Boolean.getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
|
||||
boolean VANILLAIZE = Boolean.getBoolean("Plazma.vanillaize") && !AGGRESSIVE;
|
||||
boolean USE_VANILLA = Boolean.getBoolean("Plazma.useVanillaConfiguration") && !AGGRESSIVE && NO_OPTIMIZE;
|
||||
+ boolean VANILLA_ICO = Boolean.getBoolean("Plazma.useVanillaFavicon");
|
||||
|
||||
}
|
||||
182
patches/server/0036-Implement-FreedomChat.patch
Normal file
182
patches/server/0036-Implement-FreedomChat.patch
Normal file
@@ -0,0 +1,182 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 29 Apr 2024 14:49:37 +0900
|
||||
Subject: [PATCH] Implement FreedomChat
|
||||
|
||||
ocelotpotpie/FreedomChat
|
||||
Copyright (C) 2022-2024 ocelotpotpie, Licensed under GNU GPL v3.0
|
||||
|
||||
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/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 95105a7ffaa71f8eaa00c617fc112872aa2e2e78..dc24e0d9d7811de89ff94c49365c537d7211aa7d 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -708,6 +708,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper start - Add setting for proxy online mode status
|
||||
return dedicatedserverproperties.enforceSecureProfile
|
||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||
+ && !org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.freedomChat.enabled // Plazma - Implement FreedomChat
|
||||
&& this.services.canValidateProfileKeys();
|
||||
// Paper end - Add setting for proxy online mode status
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c36ebab552c480d34e7fd48a45f0a320a97b9677..fdfe8f5bc5ad0e5f5ded41d87756a5866d041df1 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -135,6 +135,7 @@ public abstract class PlayerList {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final int SEND_PLAYER_INFO_INTERVAL = 600;
|
||||
private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
||||
+ private static final ru.bk.oharass.freedomchat.FreedomChat FREEDOM_HANDLER = new ru.bk.oharass.freedomchat.FreedomChat(); // Plazma - Implement FreedomChat
|
||||
private final MinecraftServer server;
|
||||
public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
|
||||
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
||||
@@ -285,6 +286,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit - Moved message to after join
|
||||
// PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
|
||||
LevelData worlddata = worldserver1.getLevelData();
|
||||
+ connection.channel.pipeline().addAfter("packet_handler", "freedom_handler", FREEDOM_HANDLER); // Plazma - Implement FreedomChat
|
||||
|
||||
player.loadGameTypes((CompoundTag) optional.orElse(null)); // CraftBukkit - decompile error
|
||||
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData);
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index d0a1b97bacf9978b4955b1c2c4502c2c1312f1d4..c2caf205fa65382016b8340ff536c583b8234621 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -29,6 +29,15 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
|
||||
|
||||
+ public FreedomChat freedomChat;
|
||||
+ public class FreedomChat extends ConfigurationPart {
|
||||
+
|
||||
+ public boolean enabled = false;
|
||||
+ public boolean rewriteChat = true;
|
||||
+ public boolean noChatReports = true;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
@Setting("world-generation")
|
||||
diff --git a/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java b/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..24ba82e13f6eeedd3a3658ebc29c9c4744f5f1b0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java
|
||||
@@ -0,0 +1,103 @@
|
||||
+package ru.bk.oharass.freedomchat;
|
||||
+
|
||||
+import com.mojang.serialization.Codec;
|
||||
+import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
+import io.netty.buffer.ByteBuf;
|
||||
+import io.netty.channel.ChannelHandler;
|
||||
+import io.netty.channel.ChannelHandlerContext;
|
||||
+import io.netty.handler.codec.MessageToByteEncoder;
|
||||
+import net.minecraft.network.FriendlyByteBuf;
|
||||
+import net.minecraft.network.RegistryFriendlyByteBuf;
|
||||
+import net.minecraft.network.chat.CommonComponents;
|
||||
+import net.minecraft.network.chat.Component;
|
||||
+import net.minecraft.network.chat.ComponentSerialization;
|
||||
+import net.minecraft.network.codec.StreamCodec;
|
||||
+import net.minecraft.network.protocol.Packet;
|
||||
+import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
+import net.minecraft.network.protocol.game.ClientboundPlayerChatPacket;
|
||||
+import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
|
||||
+import net.minecraft.network.protocol.game.GameProtocols;
|
||||
+import net.minecraft.network.protocol.status.ClientboundStatusResponsePacket;
|
||||
+import net.minecraft.network.protocol.status.ServerStatus;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+
|
||||
+import java.util.Objects;
|
||||
+import java.util.Optional;
|
||||
+
|
||||
+import static org.plazmamc.plazma.configurations.GlobalConfiguration.get;
|
||||
+
|
||||
+@ChannelHandler.Sharable
|
||||
+public class FreedomChat extends MessageToByteEncoder<Packet<?>> {
|
||||
+
|
||||
+ private static final StreamCodec<ByteBuf, Packet<? super ClientGamePacketListener>> CODEC = GameProtocols.CLIENTBOUND
|
||||
+ .bind(RegistryFriendlyByteBuf.decorator(MinecraftServer.getServer().registryAccess())).codec();
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean acceptOutboundMessage(final Object msg) {
|
||||
+ return get().player.freedomChat.rewriteChat && msg instanceof ClientboundPlayerChatPacket
|
||||
+ || get().player.freedomChat.noChatReports && msg instanceof ClientboundStatusResponsePacket;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void encode(
|
||||
+ final ChannelHandlerContext context, final Packet<?> packet, final ByteBuf byteBuf
|
||||
+ ) throws Exception {
|
||||
+ final FriendlyByteBuf buf = new FriendlyByteBuf(byteBuf);
|
||||
+
|
||||
+ switch (packet) {
|
||||
+ case ClientboundPlayerChatPacket chat -> encodeChat(context, chat, buf);
|
||||
+ case ClientboundStatusResponsePacket data -> encodeQuery(context, data, buf);
|
||||
+ default -> {}
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static void encodeChat(
|
||||
+ final ChannelHandlerContext ignored, final ClientboundPlayerChatPacket packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ final Component content = Objects.requireNonNullElseGet(
|
||||
+ packet.unsignedContent(),
|
||||
+ () -> Component.literal(packet.body().content())
|
||||
+ );
|
||||
+
|
||||
+ CODEC.encode(byteBuf, new ClientboundSystemChatPacket(packet.chatType().decorate(content), false));
|
||||
+ }
|
||||
+
|
||||
+ private static void encodeQuery(
|
||||
+ final ChannelHandlerContext ignored, final ClientboundStatusResponsePacket packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ byteBuf.writeVarInt(0x00);
|
||||
+ byteBuf.writeJsonWithCodec(NCRMetadata.CODEC, NCRMetadata.from(packet.status()));
|
||||
+ }
|
||||
+
|
||||
+ private record NCRMetadata(
|
||||
+ Component description,
|
||||
+ Optional<ServerStatus.Players> players,
|
||||
+ Optional<ServerStatus.Version> version,
|
||||
+ Optional<ServerStatus.Favicon> favicon,
|
||||
+ boolean enforcesSecureChat,
|
||||
+ boolean preventsChatReports
|
||||
+ ) {
|
||||
+
|
||||
+ private static final Codec<NCRMetadata> CODEC = RecordCodecBuilder.create(instance -> instance.group(
|
||||
+ ComponentSerialization.CODEC.lenientOptionalFieldOf("description", CommonComponents.EMPTY).forGetter(NCRMetadata::description),
|
||||
+ ServerStatus.Players.CODEC.lenientOptionalFieldOf("players").forGetter(NCRMetadata::players),
|
||||
+ ServerStatus.Version.CODEC.lenientOptionalFieldOf("version").forGetter(NCRMetadata::version),
|
||||
+ ServerStatus.Favicon.CODEC.lenientOptionalFieldOf("favicon").forGetter(NCRMetadata::favicon),
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", true).forGetter(NCRMetadata::enforcesSecureChat),
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("preventsChatReports", false).forGetter(NCRMetadata::preventsChatReports)
|
||||
+ ).apply(instance, NCRMetadata::new));
|
||||
+
|
||||
+ private static NCRMetadata from(final ServerStatus status) {
|
||||
+ return new NCRMetadata(
|
||||
+ status.description(),
|
||||
+ status.players(),
|
||||
+ status.version(),
|
||||
+ status.favicon(),
|
||||
+ status.enforcesSecureChat() && !get().player.freedomChat.enabled,
|
||||
+ get().player.freedomChat.noChatReports
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
@@ -1,31 +1,48 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 18:29:51 +0900
|
||||
Date: Wed, 15 May 2024 14:30:55 +0900
|
||||
Subject: [PATCH] Add some 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 f8790ab5b7c1279719271ee57c00f4f2d6ce9714..9a9d6c05ceb5b62c4c0c72f64b047f783ae4aeb6 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
|
||||
@@ -128,9 +128,11 @@ public class Armadillo extends Animal {
|
||||
return ArmadilloAi.makeBrain(this.brainProvider().makeBrain(dynamic));
|
||||
}
|
||||
|
||||
+ private int behaviorTick; // Plazma - Add missing pufferfish configurations
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
//this.level().getProfiler().push("armadilloBrain"); // Purpur
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
||||
((Brain<Armadillo>) this.brain).tick((ServerLevel) this.level(), this); // CraftBukkit - decompile error
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
//this.level().getProfiler().push("armadilloActivityUpdate"); // Purpur
|
||||
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 bcc3458afac5ece9637df63b9d02c445aa0a4ef9..0ee7a663988bbcc37d72da690fa9372ca1d14425 100644
|
||||
index fdc3aa9672077787e841d240fe1e690dcd9ca321..47d5db93adbb740c7b29dd9059bd31be91097a17 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
|
||||
@@ -168,10 +168,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
return dimensions.height - 0.1F * this.getScale();
|
||||
@@ -161,11 +161,13 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
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() {
|
||||
//this.level().getProfiler().push("camelBrain"); // Purpur
|
||||
Brain<Camel> brain = (Brain<Camel>) this.getBrain(); // Paper - decompile fix
|
||||
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
|
||||
brain.tick((ServerLevel)this.level(), this);
|
||||
behaviorcontroller.tick((ServerLevel) this.level(), this);
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
//this.level().getProfiler().push("camelActivityUpdate"); // Purpur
|
||||
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 795c93352dfa69fad0e034a8377eceb6dc1e81da..e743b4891c1e56f82d40f798e456a701b0efbc73 100644
|
||||
index a2cc1efaa621861828b007759536ac49d7e3646e..6637bdb953428473edd3429740c75b67b634059a 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
|
||||
@@ -527,9 +527,11 @@ public class Sniffer extends Animal {
|
||||
@@ -514,9 +514,11 @@ public class Sniffer extends Animal {
|
||||
return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES);
|
||||
}
|
||||
|
||||
@@ -38,15 +55,15 @@ index 795c93352dfa69fad0e034a8377eceb6dc1e81da..e743b4891c1e56f82d40f798e456a701
|
||||
//this.level().getProfiler().popPush("snifferActivityUpdate"); // Purpur
|
||||
SnifferAi.updateActivity(this);
|
||||
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 66d47c1613532189e761c0f48d893652c17fe240..8a5d8f9ad1bd94ca53c1ffd1872275c07a52f0b7 100644
|
||||
index 524d2304a1dbc873a47c95c55ad70c4120f07ad4..c9a8cbcaae0693c63ccdd05d271a524524c36754 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
|
||||
@@ -319,7 +319,7 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -318,7 +318,7 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
ServerLevel worldserver = (ServerLevel) this.level();
|
||||
|
||||
//worldserver.getProfiler().push("wardenBrain"); // Purpur
|
||||
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing pufferfish configurations
|
||||
this.getBrain().tick(worldserver, this);
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
super.customServerAiStep();
|
||||
19
patches/server/0038-Improve-biome-temperature-cache.patch
Normal file
19
patches/server/0038-Improve-biome-temperature-cache.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 15 May 2024 14:31:47 +0900
|
||||
Subject: [PATCH] Improve biome temperature cache
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index f9fbfb63f19decb3b15284306d7edda072e609af..81b996679f396f18a8f5948311f1069be0806756 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -118,7 +118,7 @@ public final class Biome {
|
||||
public float getTemperature(BlockPos blockPos) {
|
||||
long l = blockPos.asLong();
|
||||
// Pufferfish start
|
||||
- gg.airplane.structs.Long2FloatAgingCache cache = this.temperatureCache.get();
|
||||
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - Improve biome temperature cache
|
||||
float f = cache.getValue(l);
|
||||
if (!Float.isNaN(f)) {
|
||||
return f;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Wed, 6 Sep 2023 15:04:25 +0900
|
||||
Subject: [PATCH] Optimize-spigot-event-bus
|
||||
Subject: [PATCH] Optimize Spigot event bus
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java
|
||||
index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..45b8ee1945202cc673905aab5c90985c01cb205e 100644
|
||||
index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..f1b3559bf9d2023ca59330c65e6e34714759dd9d 100644
|
||||
--- a/src/main/java/org/bukkit/event/Event.java
|
||||
+++ b/src/main/java/org/bukkit/event/Event.java
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -48,7 +48,7 @@ index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..45b8ee1945202cc673905aab5c90985c
|
||||
+ public final @NotNull net.kyori.adventure.util.TriState asynchronous() {
|
||||
+ return this.async;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Optimize Spigot event bus
|
||||
+
|
||||
// Paper start
|
||||
/**
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user