Compare commits
84 Commits
old/1.20.4
...
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 |
@@ -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
|
||||
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
@@ -1,22 +1,24 @@
|
||||
name: Release Plazma (1.20.4)
|
||||
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.4
|
||||
|
||||
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]')"
|
||||
@@ -26,7 +28,7 @@ jobs:
|
||||
id: setup
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: echo "branch=${BRANCH##*/}" >> $GITHUB_OUTPUT
|
||||
run: echo "VERSION=${BRANCH##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,17 +39,17 @@ jobs:
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
path: javadoc
|
||||
ref: ${{ steps.setup.outputs.branch }}
|
||||
ref: ${{ env.VERSION }}
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
path: javadoc
|
||||
|
||||
- name: Checkout javadocs
|
||||
uses: actions/checkout@v4
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
path: jdmain
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
path: jdmain
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
@@ -63,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
|
||||
|
||||
@@ -80,18 +86,21 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [ ! -d "javadoc" ]; then
|
||||
mkdir javadoc
|
||||
cd javadoc
|
||||
git init && git branch -m ${{ steps.setup.outputs.branch }}
|
||||
SUBMODULE_ADD=true
|
||||
mkdir javadoc && cd javadoc
|
||||
git init && git branch -m ${{ env.VERSION }}
|
||||
git remote add origin https://github.com/PlazmaMC/Javadocs
|
||||
fi
|
||||
|
||||
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
||||
cp -rf Plazma-API/build/docs/javadoc/* javadoc/
|
||||
cd javadoc
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push -f
|
||||
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
|
||||
@@ -103,16 +112,12 @@ jobs:
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
./gradlew publish --stacktrace
|
||||
|
||||
- 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
|
||||
@@ -122,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
|
||||
@@ -133,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
|
||||
|
||||
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.4)
|
||||
[](https://github.com/PlazmaMC/Plazma/releases/build/1.20.4/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.4. If you want to know more about Plazma, please check the **[main branch][main]**.<br>
|
||||
이곳은 플라즈마의 1.20.4용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[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.4/latest/plazma-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar
|
||||
[paperMojmap]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.4/latest/plazma-paperclip-1.20.4-R0.1-SNAPSHOT-mojmap.jar
|
||||
[bundlerReobf]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.4/latest/plazma-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar
|
||||
[bundlerMojmap]: https://github.com/PlazmaMC/Plazma/releases/download/build/1.20.4/latest/plazma-bundler-1.20.4-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]** 를 확인해주세요.
|
||||
|
||||
102
build.gradle.kts
102
build.gradle.kts
@@ -10,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(configurations.paperclip.name)
|
||||
}
|
||||
maven("https://repo.papermc.io/repository/maven-public/") {
|
||||
content { onlyForConfigurations(configurations.paperclip.name) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,33 +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 {
|
||||
publishing.repositories.maven("https://maven.pkg.github.com/$providerRepo") {
|
||||
name = "githubPackage"
|
||||
url = uri("https://maven.pkg.github.com/PlazmaMC/PlazmaBukkit")
|
||||
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"])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.compilerArgs.addAll(listOf("--add-modules=jdk.incubator.vector", "-Xmaxwarns", "1"))
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release = 17
|
||||
options.release = jdkVersion
|
||||
options.compilerArgs.addAll(listOf(
|
||||
"--add-modules=jdk.incubator.vector",
|
||||
"-Xmaxwarns", "1"
|
||||
))
|
||||
}
|
||||
|
||||
withType<Javadoc> {
|
||||
@@ -87,43 +82,43 @@ subprojects {
|
||||
}
|
||||
|
||||
paperweight {
|
||||
serverProject = project(":plazma-server")
|
||||
serverProject = project(":${brandName.lowercase()}-server")
|
||||
|
||||
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 = layout.projectDirectory.dir("patches/generated-api")
|
||||
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
|
||||
}
|
||||
|
||||
patchTasks.register("mojangApi") {
|
||||
isBareDirectory = true
|
||||
upstreamDirPath = "Paper-MojangAPI"
|
||||
patchDir = layout.projectDirectory.dir("patches/mojang-api")
|
||||
outputDir = layout.projectDirectory.dir("Plazma-MojangAPI")
|
||||
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 {
|
||||
@@ -136,20 +131,35 @@ tasks {
|
||||
}
|
||||
|
||||
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/PlazmaMC/Plazma",
|
||||
"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"
|
||||
}
|
||||
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,20 +1,79 @@
|
||||
package org.plazmamc.alwaysuptodate
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.plazmamc.alwaysuptodate.tasks.CheckPaperCommitTask
|
||||
import org.plazmamc.alwaysuptodate.tasks.CheckPurpurCommitTask
|
||||
import org.plazmamc.alwaysuptodate.tasks.PaperUpdateTask
|
||||
import org.plazmamc.alwaysuptodate.tasks.PurpurUpdateTask
|
||||
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)
|
||||
target.tasks.register("checkPaperCommit", CheckPaperCommitTask::class.java)
|
||||
target.tasks.register("checkPurpurCommit", CheckPurpurCommitTask::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 } }
|
||||
@@ -1,64 +0,0 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.fromJson
|
||||
import io.papermc.paperweight.util.gson
|
||||
import org.gradle.api.Project
|
||||
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 paper.libs.com.google.gson.JsonObject
|
||||
import java.net.URI
|
||||
|
||||
abstract class CheckPaperCommitTask : Task() {
|
||||
|
||||
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
|
||||
@TaskAction
|
||||
fun check() {
|
||||
println(project.checkCommit(property.paperRepository.get(), property.paperBranch.get(), "paperCommit"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract class CheckPurpurCommitTask : Task() {
|
||||
|
||||
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
|
||||
@TaskAction
|
||||
fun check() {
|
||||
println(project.checkCommit(property.purpurRepository.get(), property.purpurBranch.get(), "purpurCommit"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun Project.getLatest(repository: String, branch: String) : String {
|
||||
val regex = "[a-z0-9]{40}\trefs/heads/$branch".toRegex()
|
||||
|
||||
return Git(project.pathIO)("ls-remote", repository).readText()?.lines()
|
||||
?.filterNot { regex.matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Purpur commit")
|
||||
}
|
||||
|
||||
fun Project.checkCommit(repository: String, branch: String, propertyName: String) : Boolean {
|
||||
val latestCommit = project.getLatest(repository, branch)
|
||||
val currentCommit = project.properties[propertyName] as String
|
||||
|
||||
return currentCommit == latestCommit
|
||||
}
|
||||
|
||||
fun Project.createCompareComment(repository: String, branch: String, before: String, clear: Boolean = false) {
|
||||
val builder = StringBuilder()
|
||||
val rawRepo = URI.create(repository).path.substring(1)
|
||||
|
||||
if (!clear) builder.append(project.file("compare.txt").readText())
|
||||
builder.append("\n\n[${rawRepo.split("/").last()} Changes]")
|
||||
|
||||
gson.fromJson<JsonObject>(URI.create("https://api.github.com/repos/$rawRepo/compare/$before...$branch").toURL().readText())["commits"].asJsonArray.forEach {
|
||||
val commit = it.asJsonObject
|
||||
builder.append("$rawRepo@${commit["sha"].asString.subSequence(0, 7)}: ${commit["commit"].asJsonObject["message"].asString.split("\n")[0]}\n")
|
||||
}
|
||||
project.file("compare.txt").writeText(builder.toString())
|
||||
}
|
||||
@@ -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 java.io.File
|
||||
|
||||
abstract class PaperUpdateTask : Task() {
|
||||
|
||||
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
|
||||
override fun init() {
|
||||
outputs.upToDateWhen {
|
||||
project.checkCommit(
|
||||
property.paperRepository.get(),
|
||||
property.paperBranch.get(),
|
||||
"purpurCommit"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
fun update() {
|
||||
if (project.checkCommit(property.paperRepository.get(), property.paperBranch.get(), "purpurCommit")) return
|
||||
project.createCompareComment(
|
||||
property.paperRepository.get(),
|
||||
property.paperBranch.get(),
|
||||
project.properties["paperCommit"] as String,
|
||||
true
|
||||
)
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun updatePaperCommit(repo: String, branch: String, properties: File, regexRule: String = "paperCommit = ") {
|
||||
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("$regexRule.*".toRegex(), "$regexRule$latestCommit"))
|
||||
}
|
||||
@@ -1,25 +1,31 @@
|
||||
package org.plazmamc.alwaysuptodate.tasks
|
||||
|
||||
import io.papermc.paperweight.patcher.tasks.CheckoutRepo
|
||||
import io.papermc.paperweight.util.Git
|
||||
import io.papermc.paperweight.util.cache
|
||||
import io.papermc.paperweight.util.path
|
||||
import io.papermc.paperweight.util.set
|
||||
import org.gradle.api.file.Directory
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.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.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
|
||||
@@ -34,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
|
||||
@@ -56,124 +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 {
|
||||
project.checkCommit(
|
||||
property.purpurRepository.get(),
|
||||
property.purpurBranch.get(),
|
||||
"purpurCommit"
|
||||
@get:Internal
|
||||
abstract val workDir: DirectoryProperty
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val purpurDir: DirectoryProperty
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val pufferfishDir: DirectoryProperty
|
||||
|
||||
override fun init(): Unit = with(project) {
|
||||
val wd = layout.cache.resolve("alwaysUpToDate/update/purpur").also { it.toFile().deleteRecursively() }
|
||||
workDir.set(wd)
|
||||
|
||||
val compare =
|
||||
configureTask<CreateCompareComment>("createPurpurCompareComment", "Create Purpur Compare Comment") {
|
||||
clear.convention(true)
|
||||
repo.convention(extension.purpurRepo)
|
||||
ref.convention(extension.purpurRef)
|
||||
commitPropertyName.convention(extension.purpurCommitName)
|
||||
}
|
||||
|
||||
val paper = dependsOn<SimpleUpstreamUpdateTask>("updatePaper", "Update Paper") {
|
||||
outputs.upToDateWhen { checkCommitFor { repo to ref to paperCommitName } }
|
||||
dependsOn(compare)
|
||||
repo.convention(extension.paperRepo)
|
||||
ref.convention(extension.paperRef)
|
||||
regex.convention("paperCommit = ")
|
||||
workDir.set(layout.projectDirectory)
|
||||
}
|
||||
|
||||
fun checkout(
|
||||
name: String, repo: Provider<String>, ref: Provider<String>, regex: String, block: CheckoutRepo.() -> Unit
|
||||
): Pair<TaskProvider<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 (project.checkCommit(property.purpurRepository.get(), property.purpurBranch.get(), "purpurCommit")) return
|
||||
Git.checkForGit()
|
||||
fun update() = with(project) {
|
||||
val purpur = purpurDir.path
|
||||
val pufferfish = if (extension { usePufferfish }) pufferfishDir.path else null
|
||||
|
||||
project.createCompareComment(
|
||||
property.purpurRepository.get(),
|
||||
property.purpurBranch.get(),
|
||||
project.properties["purpurCommit"] as String,
|
||||
true
|
||||
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"
|
||||
)
|
||||
val dir = project.layout.cache.resolve("AlwaysUpToDate/UpdatePurpur")
|
||||
if (dir.exists()) dir.toFile().deleteRecursively()
|
||||
|
||||
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(), "paperRef=")
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), purpur.resolve("gradle.properties").toFile())
|
||||
|
||||
if (!project.checkCommit(property.paperRepository.get(), property.paperBranch.get(), "paperCommit")) {
|
||||
project.createCompareComment(
|
||||
property.paperRepository.get(),
|
||||
property.paperBranch.get(),
|
||||
project.properties["paperCommit"] as String
|
||||
)
|
||||
updatePaperCommit(
|
||||
property.paperRepository.get(),
|
||||
property.paperBranch.get(),
|
||||
project.file("gradle.properties")
|
||||
patches.resolve("api").copyPatch( resolve("api"),
|
||||
if (pufferfish == null) "" else "Pufferfish-API-Changes",
|
||||
"Purpur-API-Changes"
|
||||
)
|
||||
}
|
||||
|
||||
val latestCommit = git("ls-remote", property.purpurRepository.get()).readText()?.lines()
|
||||
?.filterNot { "[a-z0-9]{40}\trefs/heads/${property.purpurBranch.get()}".toRegex().matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Purpur commit")
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
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()
|
||||
Thread.sleep(1_000)
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
project.file("gradle.properties").writeText(project.file("gradle.properties").readText().replace("purpurCommit = .*".toRegex(), "purpurCommit = $latestCommit"))
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
14
fxapi
14
fxapi
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupAPI
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-API
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
mv 0001-fixup.patch ../
|
||||
|
||||
cd ../
|
||||
14
fxsrv
14
fxsrv
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# FixupServer
|
||||
|
||||
PS1="$"
|
||||
|
||||
cd Plazma-Server
|
||||
|
||||
git add .
|
||||
git commit -m "fixup"
|
||||
git format-patch -1
|
||||
mv 0001-fixup.patch ../
|
||||
|
||||
cd ../
|
||||
@@ -1,12 +1,29 @@
|
||||
group = org.plazmamc.plazma
|
||||
org.gradle.deamon = true
|
||||
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
|
||||
|
||||
version = 1.20.4-R0.1-SNAPSHOT
|
||||
mcVersion = 1.20.4
|
||||
paper.runMemoryGb = 8
|
||||
paper.runDisableWatchdog = true
|
||||
|
||||
paperCommit = f4c7d373e4a1aff23539fe099745bf29a28559b9
|
||||
purpurCommit = 6b1ee98f813ee19f8046b3c528feeee61840a35b
|
||||
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,6 +1,6 @@
|
||||
[versions]
|
||||
shadow = "8.1.1"
|
||||
paperweight = "1.5.15"
|
||||
paperweight = "1.7.1"
|
||||
paperclip = "3.0.3"
|
||||
decompiler = "1.10.1"
|
||||
remapper = "0.10.1"
|
||||
|
||||
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.7-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 -
|
||||
}
|
||||
@@ -6,6 +6,7 @@ sentry = "5.4.0"
|
||||
fastutil = "8.5.6"
|
||||
findbugs = "1.3.9"
|
||||
slf4j-api = "2.0.9"
|
||||
brigadier = "1.2.9"
|
||||
bungeechat = "1.20-R0.2"
|
||||
json-simple = "1.1.1"
|
||||
annotations = "24.0.1"
|
||||
@@ -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,7 +5,7 @@ mockito = "5.5.0"
|
||||
jupiter = "5.10.0"
|
||||
hamcrest = "2.2"
|
||||
snakeyaml = "2.2"
|
||||
adventure = "4.16.0"
|
||||
adventure = "4.17.0"
|
||||
commons-lang2 = "2.6"
|
||||
commons-lang3 = "3.12.0"
|
||||
maven-provider = "3.9.6"
|
||||
|
||||
@@ -1,28 +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.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" }
|
||||
@@ -32,9 +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", "upnp", "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,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Date: Tue, 9 Nov 2021 14:01:56 -0500
|
||||
Date: Sun, 2 Jun 2024 23:04:51 +0000
|
||||
Subject: [PATCH] Pufferfish API Changes
|
||||
|
||||
Pufferfish
|
||||
@@ -20,10 +20,10 @@ 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 04853c43b99951bf0d4c96ef73724625bdaf018f..9164120d299d062c62529a7ef74eac0ded367993 100644
|
||||
index fd39ed209b20c927054b8482c400beeeeab460a3..1336685fde70c4a88a1fb591cdfcd781a8f06d0b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -51,6 +51,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")
|
||||
@@ -31,7 +31,7 @@ index 04853c43b99951bf0d4c96ef73724625bdaf018f..9164120d299d062c62529a7ef74eac0d
|
||||
|
||||
implementation("org.ow2.asm:asm:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
@@ -109,6 +110,13 @@ val generateApiVersioningFile by tasks.registering {
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <contact@granny.dev>
|
||||
Date: Fri, 26 Apr 2024 18:07:21 +0900
|
||||
Date: Sun, 2 Jun 2024 23:06:07 +0000
|
||||
Subject: [PATCH] Purpur API Changes
|
||||
|
||||
PurpurMC
|
||||
@@ -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 9164120d299d062c62529a7ef74eac0ded367993..09e541dcbbb43699b4402036b8a3cc86a0ac9aad 100644
|
||||
index 1336685fde70c4a88a1fb591cdfcd781a8f06d0b..7aa138f7123dcfb7d1d9ae9efcf2359522f5d2fd 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -129,6 +129,8 @@ tasks.jar {
|
||||
@@ -150,6 +150,8 @@ tasks.jar {
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
@@ -198,11 +198,29 @@ index ab5fea0b03224bf249352ce340e94704ff713345..3441cdad70da1bd523c5933b1a914688
|
||||
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 9a428153f34291bdc026a71f7e60e285b7794b0c..53ce0fb2dac9c22680ab934f535b5a2037139445 100644
|
||||
index 9a219b255b63f10005fc68faacb771dd32f61ac2..83b979fbb8c0dd64f0a19feef654af2b165bd603 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2884,4 +2884,127 @@ public final class Bukkit {
|
||||
@@ -2913,4 +2913,127 @@ public final class Bukkit {
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@@ -421,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 ec117c47401ea1a04beb0e5ee9d4d394db7c5c4e..5b058d709751a5b720e209931774e09fcc9c960c 100644
|
||||
index 7509b61dfdc0a6675256970cb850b08f9e814580..c1986ca90c3adb81daca4f72b62cda65e5465bff 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -11559,4 +11559,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
|
||||
@@ -577,10 +595,10 @@ index 30298a629b39bd43ce14b414fc697b2dfcbea89c..ce00af9121de7a910aaea4e0685a06d4
|
||||
+ // Purpur end - OfflinePlayer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 4ff1b38eb65f97344257204cf018f176f247ed36..c15b0b05870a469ea5d314c9fac6a57a045f463c 100644
|
||||
index 49d2547fcdaf779e284f513e58c1ac2ae3000bda..916db0d6096338c4f1b8707048eb38b50a2b027d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2235,6 +2235,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
|
||||
|
||||
@@ -599,7 +617,7 @@ index 4ff1b38eb65f97344257204cf018f176f247ed36..c15b0b05870a469ea5d314c9fac6a57a
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -2518,4 +2530,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
|
||||
@@ -706,10 +724,10 @@ index 4ff1b38eb65f97344257204cf018f176f247ed36..c15b0b05870a469ea5d314c9fac6a57a
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e6f66d70d024cf4f0536a5bf8e51bf7b306335df..07e75978b4fc0e446e8aa46a40be5e371dc1c11b 100644
|
||||
index 97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e..83a5b68c785a88594e6e3824ed282844086f7f1a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4233,6 +4233,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4249,6 +4249,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public DragonBattle getEnderDragonBattle();
|
||||
|
||||
@@ -826,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;
|
||||
}
|
||||
|
||||
@@ -849,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 {
|
||||
@@ -864,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 {
|
||||
@@ -886,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
|
||||
);
|
||||
@@ -959,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 23def071492ccd715693d534cc506936e18f0f46..706096924ffd3b578866693e2937de4182fad554 100644
|
||||
index 725ef320f929d5e3d141c1ed3246d73a7d741f31..2d12c70b0baa50504619c8e37881a11a56d7df2c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -1144,4 +1144,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
|
||||
@@ -1111,30 +1129,16 @@ index bcc6ba95bd21c7972865838c636a03f50b6c1f1a..c3fcd8dd7dbb1e1a18e17c014c1e6411
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 65112eae8b92344796850b1e4c89e75443eab2fe..5369d802d37863a1efc0c031520147ceedcadc78 100644
|
||||
index b777e530122549455dcce6fac8d4a151c1c0af42..61a046584acf48693489ff551a0dd4c4b16af9ff 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1445,4 +1445,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 - 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
|
||||
@@ -1182,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 d048ae07cc33fd77d128cc1ebf88b0804969fa3c..8bbbdad40bc6a1932d8f79ec95c0a92037b3dac5 100644
|
||||
index 6c327a07bf8a6aa11a2d7dad12b2830acc539484..d057743b8f6a463434c1f76398c7a98614b19d47 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3752,4 +3752,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
|
||||
@@ -1379,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
|
||||
+ /**
|
||||
@@ -1435,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 daa1306a7324d946d66ad5a674bbc84371d8d4d6..f3b2d7b6fda051211add2b3215f120fb6911aeed 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
|
||||
@@ -165,7 +165,7 @@ public enum InventoryType {
|
||||
@@ -166,7 +166,7 @@ public enum InventoryType {
|
||||
SMITHING_NEW(4, "Upgrade Gear"),
|
||||
;
|
||||
|
||||
@@ -1464,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 f680545b6b59bf8d2ad154b0472dda4cba42a162..58a62ba0635f9158bf18043da89aba7521e0e2e1 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -353,4 +353,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 7414b4fa690d393a8e9557cc1fd1ce12fa426940..591759aef6c7c3333cbdab596c6619af9185c3c2 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;
|
||||
@@ -1503,12 +1488,11 @@ index 7414b4fa690d393a8e9557cc1fd1ce12fa426940..591759aef6c7c3333cbdab596c6619af
|
||||
+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.
|
||||
@@ -1061,4 +1073,635 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -1079,4 +1090,565 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player);
|
||||
}
|
||||
// Paper end - expose itemstack tooltip lines
|
||||
@@ -1993,67 +1977,6 @@ index 7414b4fa690d393a8e9557cc1fd1ce12fa426940..591759aef6c7c3333cbdab596c6619af
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * 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() {
|
||||
@@ -2098,7 +2021,7 @@ index 7414b4fa690d393a8e9557cc1fd1ce12fa426940..591759aef6c7c3333cbdab596c6619af
|
||||
+ 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)) {
|
||||
@@ -2133,19 +2056,10 @@ index 7414b4fa690d393a8e9557cc1fd1ce12fa426940..591759aef6c7c3333cbdab596c6619af
|
||||
+ }
|
||||
+ 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 db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199899bd364 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;
|
||||
@@ -2156,7 +2070,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
|
||||
|
||||
/**
|
||||
* 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;
|
||||
@@ -2164,7 +2078,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
|
||||
|
||||
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) {
|
||||
@@ -2172,7 +2086,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..feda3ddfaaf37b6ee218a0e0b1fbc199
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -2242,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 653135352c104a6ddeb74a1b6d4916c6952d6271..46b0d02aa759b3735e6ac811523d459cf263aa8b 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
|
||||
@@ -66,6 +66,7 @@ public class LibraryLoader
|
||||
@@ -68,6 +68,7 @@ public class LibraryLoader
|
||||
@Override
|
||||
public void transferStarted(@NotNull TransferEvent event) throws TransferCancelledException
|
||||
{
|
||||
@@ -2253,7 +2167,7 @@ index 653135352c104a6ddeb74a1b6d4916c6952d6271..46b0d02aa759b3735e6ac811523d459c
|
||||
logger.log( Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName() );
|
||||
}
|
||||
} );
|
||||
@@ -81,6 +82,7 @@ public class LibraryLoader
|
||||
@@ -94,6 +95,7 @@ public class LibraryLoader
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -2261,7 +2175,7 @@ index 653135352c104a6ddeb74a1b6d4916c6952d6271..46b0d02aa759b3735e6ac811523d459c
|
||||
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
|
||||
@@ -119,6 +121,7 @@ public class LibraryLoader
|
||||
@@ -144,6 +146,7 @@ public class LibraryLoader
|
||||
}
|
||||
|
||||
jarFiles.add( url );
|
||||
@@ -2269,204 +2183,6 @@ index 653135352c104a6ddeb74a1b6d4916c6952d6271..46b0d02aa759b3735e6ac811523d459c
|
||||
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 c8ab330ef171795d08fa201cf8320703c7f1c66b..93e2ea220dc03c122f82af65d5e9fda5b582290c 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
@@ -33,6 +33,7 @@ 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;
|
||||
@@ -40,6 +41,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
private final boolean particles;
|
||||
private final boolean icon;
|
||||
private final PotionEffect hiddenEffect; // Paper
|
||||
+ @Nullable private final NamespacedKey key; // Purpur
|
||||
|
||||
/**
|
||||
* Creates a potion effect.
|
||||
@@ -50,11 +52,12 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
* @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()}
|
||||
* @param hiddenEffect the hidden PotionEffect
|
||||
* @hidden Internal-- hidden effects are only shown internally
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
- public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect) { // Paper
|
||||
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect, @Nullable NamespacedKey key) { // Paper // Purpur
|
||||
Preconditions.checkArgument(type != null, "effect type cannot be null");
|
||||
this.type = type;
|
||||
this.duration = duration;
|
||||
@@ -62,6 +65,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this.ambient = ambient;
|
||||
this.particles = particles;
|
||||
this.icon = icon;
|
||||
+ this.key = key; // Purpur
|
||||
// Paper start
|
||||
this.hiddenEffect = hiddenEffect;
|
||||
}
|
||||
@@ -77,10 +81,27 @@ 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) {
|
||||
- this(type, duration, amplifier, ambient, particles, icon, null);
|
||||
+ this(type, duration, amplifier, ambient, particles, icon, null, null); // Purpur
|
||||
// Paper end
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * 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) {
|
||||
+ this(type, duration, amplifier, ambient, particles, icon, null, key);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
/**
|
||||
* Creates a potion effect with no defined color.
|
||||
*
|
||||
@@ -126,33 +147,33 @@ 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)), (PotionEffect) map.get(HIDDEN_EFFECT)); // Paper
|
||||
+ this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), (PotionEffect) map.get(HIDDEN_EFFECT), getKey(map)); // Paper // 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
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,6 +190,13 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
}
|
||||
// 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;
|
||||
@@ -201,6 +229,17 @@ 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() {
|
||||
@@ -215,6 +254,11 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
if (this.hiddenEffect != null) {
|
||||
builder.put(HIDDEN_EFFECT, this.hiddenEffect);
|
||||
}
|
||||
+ // Purpur start
|
||||
+ if (key != null) {
|
||||
+ builder.put(KEY, key.toString());
|
||||
+ }
|
||||
+ // Purpur end
|
||||
return builder.build();
|
||||
// Paper end
|
||||
}
|
||||
@@ -243,7 +287,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 && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect); // Paper
|
||||
+ 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 && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect) && this.key == that.key; // Paper // Purpur - add key
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,6 +383,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;
|
||||
@@ -354,6 +416,6 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
- return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + '}'; // Paper
|
||||
+ return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + ", key=" + key + '}'; // Paper // Purpur - add key
|
||||
}
|
||||
}
|
||||
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 {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Use Gradle Version Catalogs
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 09e541dcbbb43699b4402036b8a3cc86a0ac9aad..085cdd8ccdc27f94b22baab7ea4ac0d02769378f 100644
|
||||
index 7aa138f7123dcfb7d1d9ae9efcf2359522f5d2fd..67324689a65e8ed65c9d27c9b50073488c235c51 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,13 @@ java {
|
||||
@@ -13,84 +13,110 @@ index 09e541dcbbb43699b4402036b8a3cc86a0ac9aad..085cdd8ccdc27f94b22baab7ea4ac0d0
|
||||
}
|
||||
|
||||
+/* // Plazma - Use Gradle Version Catalogs
|
||||
val annotationsVersion = "24.0.1"
|
||||
val annotationsVersion = "24.1.0"
|
||||
val bungeeCordChatVersion = "1.20-R0.2"
|
||||
val adventureVersion = "4.16.0"
|
||||
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,6 +29,7 @@ configurations.api {
|
||||
@@ -27,56 +29,31 @@ configurations.api {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
+ /* // Plazma - Use Gradle Version Catalogs
|
||||
// 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")
|
||||
@@ -39,6 +42,34 @@ dependencies {
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
- 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 // includes junit
|
||||
+ }
|
||||
+
|
||||
+ apiAndDocs(common.bundles.adventure)
|
||||
+ api(api.jsonsimple) { isTransitive = false }
|
||||
+ api(api.bungeechat) { exclude("com.google.guava", "guava") }
|
||||
+ apiAndDocs(platform(common.adventure.bom))
|
||||
+ apiAndDocs(common.bundles.adventure)
|
||||
+
|
||||
+ compileOnly(api.findbugs)
|
||||
+ compileOnly(api.annotations)
|
||||
+ compileOnly(common.bundles.maven)
|
||||
+
|
||||
+ compileOnly(api.annotations)
|
||||
+ compileOnlyApi(api.checkerqual)
|
||||
+
|
||||
+ testImplementation(common.asm.tree)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(common.commons.lang3)
|
||||
+ testImplementation(common.bundles.test)
|
||||
+
|
||||
+ testCompileOnly(api.annotations)
|
||||
+ testCompileOnly(api.checkerqual)
|
||||
+ // Plazma end
|
||||
+
|
||||
+ testCompileOnly(api.bundles.annotations)
|
||||
+ /*
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
api("it.unimi.dsi:fastutil:8.5.6")
|
||||
@@ -76,6 +107,7 @@ dependencies {
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
+ */ // Plazma - Use Gradle Version Catalogs
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -136,25 +168,25 @@ tasks.withType<Javadoc> {
|
||||
@@ -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://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/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
|
||||
- // 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/",
|
||||
@@ -99,17 +125,18 @@ index 09e541dcbbb43699b4402036b8a3cc86a0ac9aad..085cdd8ccdc27f94b22baab7ea4ac0d0
|
||||
- "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}/",
|
||||
- // 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}/",
|
||||
// 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.connector.orNull?.version}", // Paper
|
||||
+ "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,10 +5,10 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index c15b0b05870a469ea5d314c9fac6a57a045f463c..b55834f2477d18290b2985685eeeb249114dca67 100644
|
||||
index ec8b9b2cbe65838a194281f7d76d0e17defc5211..0062b2d4dc7a64d1e4da240bf8dc5b428eb242ee 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2247,6 +2247,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
|
||||
|
||||
@@ -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 f7f864a2b46129e4d61bc87f3e23c343417aa094..eb3cc41388a210f000bf637bfae135081bee51e9 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java
|
||||
@@ -216,6 +216,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.
|
||||
*/
|
||||
@@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alpha <dev@alpha93.kr>
|
||||
Date: Tue, 27 Feb 2024 18:36:43 +0900
|
||||
Subject: [PATCH] Rebrand
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index a278ee93d7001e8dc7fd2f5409c2f528c637cb2f..a00cf1659f1fd9dff3ff34561d78732645b51dfb 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,7 +9,7 @@ java {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
- implementation(project(":paper-api"))
|
||||
+ implementation(project(":plazma-api")) // Plazma - Rebrand
|
||||
api("com.mojang:brigadier:1.0.18")
|
||||
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.6")
|
||||
@@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 26 Jan 2024 15:34:53 +0900
|
||||
Subject: [PATCH] Development Build
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
index b04d3eea789f77b2435cb0192635f1be1bab597d..a58ce2c893d8c755ab3027207d512542d2d57c36 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -24,7 +24,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
private static int distance = -2; public int distance() { return distance; }
|
||||
// Purpur end
|
||||
private static @Nullable String mcVer;
|
||||
- private static final boolean DEVELOPMENT = false; // Plazma
|
||||
+ private static final boolean DEVELOPMENT = true; // Plazma
|
||||
|
||||
@Override
|
||||
public long getCacheTime() {
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,83 +5,94 @@ Subject: [PATCH] Use Gradle Version Catalogs
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1cad0728d..b97182b80 100644
|
||||
index 4c4d242475c5229e9cdae69fcc328d52af6df4b8..c2a0dd63fe700484ac9473733b10615375d7c2b4 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,21 +19,38 @@ dependencies {
|
||||
exclude("io.papermc.paper", "paper-api")
|
||||
}
|
||||
// Purpur end
|
||||
+ // Plazma start - Use Gradle version catalogs
|
||||
+ /*
|
||||
// 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.14.0") // Keep in sync with adventureVersion from Paper-API build file
|
||||
implementation("net.kyori:ansi:1.0.3") // Manually bump beyond above transitive dep
|
||||
@@ -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
|
||||
+ */
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||
+
|
||||
- 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.snakeyaml)
|
||||
+ implementation(common.bundles.asm)
|
||||
+ implementation(common.commons.lang2)
|
||||
+ implementation(common.adventure.serializer.ansi)
|
||||
+ implementation(server.ansi)
|
||||
+ implementation(server.velocity) { isTransitive = false }
|
||||
+ implementation(server.simpleyaml) { exclude(group="org.yaml", module="snakeyaml") }
|
||||
+ implementation(server.bundles.implementation)
|
||||
+
|
||||
+ runtimeOnly(common.bundles.maven)
|
||||
+ runtimeOnly(common.maven.provider)
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
runtimeOnly(log4jPlugins.output)
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||
+ alsoShade(log4jPlugins.output) // Plazma - Diff on patch
|
||||
+ runtimeOnly(log4jPlugins.output) // Plazma - Diff on patch
|
||||
+
|
||||
alsoShade(log4jPlugins.output)
|
||||
+ runtimeOnly(common.maven.provider)
|
||||
+ runtimeOnly(common.bundles.maven)
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
+
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(server.bundles.test)
|
||||
+
|
||||
+ /*
|
||||
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.19.0") // Paper - remove exclusion
|
||||
@@ -46,8 +63,11 @@ dependencies {
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
// Paper start - Use Velocity cipher
|
||||
implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
|
||||
+ */
|
||||
+ implementation(server.velocity) {
|
||||
isTransitive = false
|
||||
}
|
||||
+ /*
|
||||
// Paper end - Use Velocity cipher
|
||||
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
@@ -57,8 +77,11 @@ dependencies {
|
||||
// Pufferfish start
|
||||
implementation("org.yaml:snakeyaml:1.32")
|
||||
implementation ("com.github.carleslc.Simple-YAML:Simple-Yaml:1.8.4") {
|
||||
+ */
|
||||
+ implementation(server.simpleyaml) {
|
||||
exclude(group="org.yaml", module="snakeyaml")
|
||||
}
|
||||
+ /*
|
||||
// Pufferfish end
|
||||
|
||||
implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||
@@ -71,6 +94,7 @@ dependencies {
|
||||
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
|
||||
+ */
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
}
|
||||
|
||||
val craftbukkitPackageVersion = "1_20_R3" // Paper
|
||||
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,429 +0,0 @@
|
||||
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] Rebrand
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b97182b806fddf53ddcdbe57a43500d36e97e2a4..055627fc478a3e64b0e0644cbd9ef4cf5438c696 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,12 +13,10 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
val alsoShade: Configuration by configurations.creating
|
||||
|
||||
dependencies {
|
||||
- // Purpur start
|
||||
- implementation(project(":purpur-api"))
|
||||
- implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
||||
- exclude("io.papermc.paper", "paper-api")
|
||||
- }
|
||||
- // Purpur end
|
||||
+ // Plazma start - Branding
|
||||
+ implementation(project(":plazma-api"))
|
||||
+ implementation(project(":plazma-mojangapi"))
|
||||
+ // Plazma end - Branding
|
||||
// Plazma start - Use Gradle version catalogs
|
||||
/*
|
||||
// Paper start
|
||||
@@ -118,7 +116,7 @@ tasks.jar {
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur
|
||||
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma - Setup Gradle Project
|
||||
"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..0b3d87d2d43148e6370e7a03e0bb6074891ac800 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 - Branding
|
||||
|
||||
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 // Plazma - Branding
|
||||
|
||||
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..b04d3eea789f77b2435cb0192635f1be1bab597d 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -20,10 +20,11 @@ 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 // Plazma - Branding
|
||||
private static int distance = -2; public int distance() { return distance; }
|
||||
// Purpur end
|
||||
private static @Nullable String mcVer;
|
||||
+ private static final boolean DEVELOPMENT = false; // Plazma
|
||||
|
||||
@Override
|
||||
public long getCacheTime() {
|
||||
@@ -33,8 +34,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 // Plazma - Branding
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/PlazmaBukkit", (DEVELOPMENT ? "dev/" : "ver/") + getMinecraftVersion(), parts[0]); // Purpur // Plazma // Plazma - Branding
|
||||
final Component history = getHistory();
|
||||
|
||||
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
||||
@@ -47,7 +48,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 // Plazma - Branding
|
||||
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
||||
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
|
||||
}
|
||||
@@ -57,6 +58,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 +67,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 - Disable CI Checking
|
||||
|
||||
switch (distance) {
|
||||
case -1:
|
||||
@@ -83,6 +90,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 +110,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..3e32c28e1d4c157a2f00dbc6d6e9d71cb3b8f6b7 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 - Branding
|
||||
.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 f91ea723a1c85f6cf8c4f6dd7f182b948c2f2e81..c5a3f9c2daf3da135cccecb757353534e1688821 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("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma - Branding
|
||||
}
|
||||
|
||||
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 PLAZMA INSTEAD!"); // Plazma - Branding
|
||||
// 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 4ef8eaad4485a2ee920f80556f9dda04e59d2b2a..b91c3b8ca8f840335ba6470658d82c5d71bb75e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -105,6 +105,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┛\033[0m
|
||||
+ """);
|
||||
+ 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
|
||||
|
||||
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 60b5e0643d933393b5473681ac9261db29fe2416..ac12ccf60b45b150982e79f32d3cdd21c4017cc8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -956,7 +956,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 - Branding
|
||||
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 ae75edfaa9e4c72f11fbb7ffc66294be47c206cc..a66dcea06424518290576c7647ae0717040586f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -57,7 +57,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", "A Plazma Server"); // Purpur // Plazma - Branding
|
||||
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 0dec2f3762aa55cfaa7af5b357f0fe243a3b2cc6..22d32ee08ee9419685a3e17d6e443396cff895e0 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 - Branding
|
||||
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("Plazma Minecraft server"); // Paper - Improve ServerGUI // Purpur // Plazma - Branding
|
||||
|
||||
// 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("Plazma Minecraft server - shutting down!"); // Purpur // Plazma - Branding
|
||||
server.halt(true);
|
||||
servergui.runFinalizers();
|
||||
}
|
||||
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 fe312b1aef579cb4bf81bdd967cf72ff880d7505..97628761958289612ada0374f56e7d8f6af21512 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 - Branding
|
||||
}
|
||||
|
||||
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dabaf0cff6dafe8ca411996e67ead9a2cf84dfb8..b2470f03eecb1b81d3f0acbd9bc3c38f321ef3d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -266,7 +266,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 - Branding
|
||||
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 409c0e81571e23c9d535b541c61538424259d60a..d36c880012153058803b595429084adb36458741 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 - Branding
|
||||
|
||||
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 - Branding
|
||||
.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 64c73cc7370c23c9ce68b68476fd0ddb3ca6beca..cd0e9020e28ff97063bd335dcdbb32ac3225ffb3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -969,7 +969,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 - Branding
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index ca8ae8e1c51b937dac916e0b0dc94b5e2e61efeb..6bab5f9e40987d1a8ca9c17118d2a14135df5dff 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 Plazma"); // Paper // Purpur // Plazma - Branding
|
||||
// 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..73b4818998098b08abcbee4d29915492aa09b5ef 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 - Branding & Improve Versioning
|
||||
+ 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 - Branding & Improve Versioning
|
||||
}
|
||||
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 efe25d3894f3ad000257c72d9a5e06ef22446d41..a937993f318ef5703420f57fe65c5d990ce2c4dd 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 - Branding
|
||||
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 f7296691cb4af7814de1520347b307ff209082e4..090eb94fe8088d0ae98bfbe8bbd32a3cac2015d0 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 - Branding
|
||||
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 - Branding
|
||||
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 - Branding
|
||||
//
|
||||
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 PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma - Branding
|
||||
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 - Branding
|
||||
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 PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma - Branding
|
||||
}
|
||||
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
@@ -5,329 +5,461 @@ Subject: [PATCH] Rebrand Logo
|
||||
|
||||
|
||||
diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png
|
||||
index 518591dd83289e041a16e2c2e7d7e7640d4b2e1b..278de5d47a7802ab89d9ae39c1560ef87d6d6fc4 100644
|
||||
index 8b924977b7886df9ab8790b1e4ff9b1c04a2af45..efa53bcb692650396b2e71b62243a15dd95aa096 100644
|
||||
GIT binary patch
|
||||
literal 7999
|
||||
zcmbVR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oZS)?8^0-?^g11w23S(X*2v9^k*
|
||||
zKU)$N`g+?WLff<~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
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/Configurations.java b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e6556d3f094 100644
|
||||
index 62b602450a53cfebf08f839b505d0e965aff6e20..cda3636a1ff914c7177e95a8f813e9f4dd27a2c5 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
@@ -36,28 +36,93 @@ public abstract class Configurations<G, W> {
|
||||
@@ -39,28 +39,95 @@ public abstract class Configurations<G, W> {
|
||||
public static final String WORLD_DEFAULTS = "__world_defaults__";
|
||||
public static final ResourceLocation WORLD_DEFAULTS_KEY = new ResourceLocation("configurations", WORLD_DEFAULTS);
|
||||
protected final Path globalFolder;
|
||||
@@ -26,6 +26,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
- final String defaultWorldConfigFileName,
|
||||
- final String worldConfigFileName
|
||||
- ) {
|
||||
+
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @org.jetbrains.annotations.VisibleForTesting
|
||||
+ public static final java.util.function.Supplier<org.spigotmc.SpigotWorldConfig> SPIGOT_WORLD_DEFAULTS = com.google.common.base.Suppliers.memoize(() -> new org.spigotmc.SpigotWorldConfig(org.apache.commons.lang.RandomStringUtils.randomAlphabetic(255)) {
|
||||
@@ -61,7 +62,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
+ protected abstract org.spongepowered.configurate.NodePath[] removedWorldPaths();
|
||||
+ protected abstract W getWorldConfiguration(final ServerLevel level);
|
||||
+ protected abstract String buildWorldHeader(final ContextMap contextMap);
|
||||
+ protected abstract Object createWorldConfigInstance(final ContextMap contextMap);
|
||||
+ protected abstract W createWorldConfigInstance(final ContextMap contextMap);
|
||||
+
|
||||
+ protected static ConfigurationOptions defaultOptions(ConfigurationOptions options) {
|
||||
+ return options.serializers(builder -> builder
|
||||
@@ -76,16 +77,17 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
+ }
|
||||
+
|
||||
+ protected static ContextMap createWorldContextMap(ServerLevel level) {
|
||||
+ return createWorldContextMap(level.convertable.levelDirectory.path(), level.serverLevelData.getLevelName(), level.dimension().location(), level.spigotConfig, level.registryAccess());
|
||||
+ return createWorldContextMap(level.convertable.levelDirectory.path(), level.serverLevelData.getLevelName(), level.dimension().location(), level.spigotConfig, level.registryAccess(), level.getGameRules());
|
||||
+ }
|
||||
+
|
||||
+ public static ContextMap createWorldContextMap(Path dir, String levelName, ResourceLocation worldKey, org.spigotmc.SpigotWorldConfig spigotConfig, RegistryAccess registryAccess) {
|
||||
+ public static ContextMap createWorldContextMap(Path dir, String levelName, ResourceLocation worldKey, org.spigotmc.SpigotWorldConfig spigotConfig, RegistryAccess registryAccess, GameRules gameRules) {
|
||||
+ return ContextMap.builder()
|
||||
+ .put(WORLD_DIRECTORY, dir)
|
||||
+ .put(WORLD_NAME, levelName)
|
||||
+ .put(WORLD_KEY, worldKey)
|
||||
+ .put(SPIGOT_WORLD_CONFIG_CONTEXT_KEY, com.google.common.base.Suppliers.ofInstance(spigotConfig))
|
||||
+ .put(REGISTRY_ACCESS, registryAccess)
|
||||
+ .put(GAME_RULES, gameRules)
|
||||
+ .build();
|
||||
+ }
|
||||
+
|
||||
@@ -121,7 +123,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
protected ObjectMapper.Factory.Builder createObjectMapper() {
|
||||
return ObjectMapper.factoryBuilder()
|
||||
.addConstraint(Constraint.class, new Constraint.Factory())
|
||||
@@ -65,17 +130,21 @@ public abstract class Configurations<G, W> {
|
||||
@@ -68,17 +135,21 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
protected YamlConfigurationLoader.Builder createLoaderBuilder() {
|
||||
@@ -146,16 +148,16 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
}
|
||||
|
||||
@MustBeInvokedByOverriders
|
||||
@@ -93,7 +162,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -96,7 +167,7 @@ public abstract class Configurations<G, W> {
|
||||
};
|
||||
}
|
||||
|
||||
- static <T> CheckedFunction<ConfigurationNode, T, SerializationException> reloader(Class<T> type, T instance) {
|
||||
+ protected static <T> CheckedFunction<ConfigurationNode, T, SerializationException> reloader(Class<T> type, T instance) { // Plazma - package -> protected
|
||||
+ protected static <T> CheckedFunction<ConfigurationNode, T, SerializationException> reloader(Class<T> type, T instance) { // Plazma - AT (package -> public)
|
||||
return node -> {
|
||||
ObjectMapper.Factory factory = (ObjectMapper.Factory) Objects.requireNonNull(node.options().serializers().get(type));
|
||||
ObjectMapper.Mutable<T> mutable = (ObjectMapper.Mutable<T>) factory.get(type);
|
||||
@@ -103,7 +172,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -106,7 +177,7 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
public G initializeGlobalConfiguration(final RegistryAccess registryAccess) throws ConfigurateException {
|
||||
@@ -164,7 +166,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
}
|
||||
|
||||
private void trySaveFileNode(YamlConfigurationLoader loader, ConfigurationNode node, String filename) throws ConfigurateException {
|
||||
@@ -117,7 +186,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -125,7 +196,7 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
protected G initializeGlobalConfiguration(final CheckedFunction<ConfigurationNode, G, SerializationException> creator) throws ConfigurateException {
|
||||
@@ -173,7 +175,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
final YamlConfigurationLoader loader = this.createGlobalLoaderBuilder()
|
||||
.defaultOptions(this.applyObjectMapperFactory(this.createGlobalObjectMapperFactoryBuilder().build()))
|
||||
.path(configFile)
|
||||
@@ -148,6 +217,13 @@ public abstract class Configurations<G, W> {
|
||||
@@ -156,6 +227,13 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
protected void applyGlobalConfigTransformations(final ConfigurationNode node) throws ConfigurateException {
|
||||
@@ -187,7 +189,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
}
|
||||
|
||||
@MustBeInvokedByOverriders
|
||||
@@ -155,6 +231,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -163,6 +241,7 @@ public abstract class Configurations<G, W> {
|
||||
return ContextMap.builder()
|
||||
.put(WORLD_NAME, WORLD_DEFAULTS)
|
||||
.put(WORLD_KEY, WORLD_DEFAULTS_KEY)
|
||||
@@ -195,7 +197,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
.put(REGISTRY_ACCESS, registryAccess);
|
||||
}
|
||||
|
||||
@@ -162,7 +239,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -170,7 +249,7 @@ public abstract class Configurations<G, W> {
|
||||
final ContextMap contextMap = this.createDefaultContextMap(registryAccess)
|
||||
.put(FIRST_DEFAULT)
|
||||
.build();
|
||||
@@ -204,18 +206,18 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
final DefaultWorldLoader result = this.createDefaultWorldLoader(false, contextMap, configFile);
|
||||
final YamlConfigurationLoader loader = result.loader();
|
||||
final ConfigurationNode node = loader.load();
|
||||
@@ -172,8 +249,8 @@ public abstract class Configurations<G, W> {
|
||||
@@ -180,8 +259,8 @@ public abstract class Configurations<G, W> {
|
||||
this.verifyWorldConfigVersion(contextMap, node);
|
||||
}
|
||||
this.applyWorldConfigTransformations(contextMap, node);
|
||||
this.applyWorldConfigTransformations(contextMap, node, null);
|
||||
- final W instance = node.require(this.worldConfigClass);
|
||||
- node.set(this.worldConfigClass, instance);
|
||||
+ final W instance = node.require(this.worldConfigClass()); // Plazma - Configurable Plazma
|
||||
+ node.set(this.worldConfigClass(), instance); // Plazma - Configurable Plazma
|
||||
trySaveFileNode(loader, node, configFile.toString());
|
||||
this.trySaveFileNode(loader, node, configFile.toString());
|
||||
}
|
||||
|
||||
@@ -194,30 +271,41 @@ public abstract class Configurations<G, W> {
|
||||
@@ -202,31 +281,42 @@ public abstract class Configurations<G, W> {
|
||||
private record DefaultWorldLoader(YamlConfigurationLoader loader, boolean isNewFile) {
|
||||
}
|
||||
|
||||
@@ -249,6 +251,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
+ // Plazma end - Configurable Plazma
|
||||
|
||||
protected W createWorldConfig(final ContextMap contextMap, final CheckedFunction<ConfigurationNode, W, SerializationException> creator) throws IOException {
|
||||
Preconditions.checkArgument(!contextMap.isDefaultWorldContext(), "cannot create world map with default world context");
|
||||
- final Path defaultsConfigFile = this.globalFolder.resolve(this.defaultWorldConfigFileName);
|
||||
+ final Path defaultsConfigFile = this.globalFolder.resolve(this.defaultWorldConfigFileName()); // Plazma - Configurable Plazma
|
||||
final YamlConfigurationLoader defaultsLoader = this.createDefaultWorldLoader(true, this.createDefaultContextMap(contextMap.require(REGISTRY_ACCESS)).build(), defaultsConfigFile).loader();
|
||||
@@ -264,19 +267,10 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
Files.createFile(worldConfigFile); // create empty file as template
|
||||
newFile = true;
|
||||
}
|
||||
@@ -246,7 +334,7 @@ public abstract class Configurations<G, W> {
|
||||
if (worldName.equals(WORLD_DEFAULTS)) {
|
||||
LOGGER.warn("The world defaults config file didn't have a version set, assuming latest");
|
||||
} else {
|
||||
- LOGGER.warn("The world config file for " + worldName + " didn't have a version set, assuming latest");
|
||||
+ LOGGER.warn("The world config file for {} didn't have a version set, assuming latest", worldName); // Plazma
|
||||
}
|
||||
version.raw(this.worldConfigVersion());
|
||||
} else if (version.getInt() > this.worldConfigVersion()) {
|
||||
@@ -261,6 +349,13 @@ public abstract class Configurations<G, W> {
|
||||
@@ -270,6 +360,13 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
protected void applyWorldConfigTransformations(final ContextMap contextMap, final ConfigurationNode node) throws ConfigurateException {
|
||||
protected void applyWorldConfigTransformations(final ContextMap contextMap, final ConfigurationNode node, final @Nullable ConfigurationNode defaultsNode) throws ConfigurateException {
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ org.spongepowered.configurate.transformation.ConfigurationTransformation.Builder builder = org.spongepowered.configurate.transformation.ConfigurationTransformation.builder();
|
||||
+ for (org.spongepowered.configurate.NodePath path : removedWorldPaths()) {
|
||||
@@ -287,7 +281,7 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
}
|
||||
|
||||
protected void applyDefaultsAwareWorldConfigTransformations(final ContextMap contextMap, final ConfigurationNode worldNode, final ConfigurationNode defaultsNode) throws ConfigurateException {
|
||||
@@ -273,7 +368,7 @@ public abstract class Configurations<G, W> {
|
||||
@@ -282,7 +379,7 @@ public abstract class Configurations<G, W> {
|
||||
}
|
||||
|
||||
public Path getWorldConfigFile(ServerLevel level) {
|
||||
@@ -297,10 +291,10 @@ index 218bf89fd7583d6db9f64754c4db8fcce5415bdb..bd2234f883faa50015289315fa745e65
|
||||
|
||||
public static class ContextMap {
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad958054b8a8665 100644
|
||||
index 83a726bcf8b7dce73a361b0d79dbd63a0afc7a12..3c893e5da90f7fcf519f190e34e2b15ea16ea262 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -131,6 +131,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -134,6 +134,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
See https://docs.papermc.io/paper/configuration for more information.
|
||||
""";
|
||||
|
||||
@@ -308,7 +302,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
@VisibleForTesting
|
||||
public static final Supplier<SpigotWorldConfig> SPIGOT_WORLD_DEFAULTS = Suppliers.memoize(() -> new SpigotWorldConfig(RandomStringUtils.randomAlphabetic(255)) {
|
||||
@Override // override to ensure "verbose" is false
|
||||
@@ -139,12 +140,69 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -142,12 +143,69 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
});
|
||||
public static final ContextKey<Supplier<SpigotWorldConfig>> SPIGOT_WORLD_CONFIG_CONTEXT_KEY = new ContextKey<>(new TypeToken<Supplier<SpigotWorldConfig>>() {}, "spigot world config");
|
||||
@@ -334,8 +328,8 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
+ @Override
|
||||
+ protected NodePath[] removedGlobalPaths() {
|
||||
+ return RemovedConfigurations.REMOVED_GLOBAL_PATHS;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected GlobalConfiguration getGlobalConfiguration() {
|
||||
+ return GlobalConfiguration.get();
|
||||
@@ -369,8 +363,8 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
+ @Override
|
||||
+ protected String buildWorldHeader(final ContextMap contextMap) {
|
||||
+ return WORLD_HEADER.apply(contextMap);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ protected WorldConfiguration getWorldConfiguration(final ServerLevel level) {
|
||||
+ return level.paperConfig();
|
||||
@@ -380,7 +374,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
@Override
|
||||
protected int globalConfigVersion() {
|
||||
return GlobalConfiguration.CURRENT_VERSION;
|
||||
@@ -155,6 +213,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -158,6 +216,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
return WorldConfiguration.CURRENT_VERSION;
|
||||
}
|
||||
|
||||
@@ -388,7 +382,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
@Override
|
||||
protected YamlConfigurationLoader.Builder createLoaderBuilder() {
|
||||
return super.createLoaderBuilder()
|
||||
@@ -177,6 +236,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -180,6 +239,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
private static ObjectMapper.Factory.Builder defaultGlobalFactoryBuilder(ObjectMapper.Factory.Builder builder) {
|
||||
return builder.addDiscoverer(InnerClassFieldDiscoverer.globalConfig());
|
||||
}
|
||||
@@ -396,7 +390,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
|
||||
@Override
|
||||
protected YamlConfigurationLoader.Builder createGlobalLoaderBuilder() {
|
||||
@@ -200,6 +260,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -203,6 +263,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@@ -404,42 +398,40 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
@Override
|
||||
protected ContextMap.Builder createDefaultContextMap(final RegistryAccess registryAccess) {
|
||||
return super.createDefaultContextMap(registryAccess)
|
||||
@@ -213,8 +274,12 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -216,8 +277,9 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
.addNodeResolver(new NestedSetting.Factory())
|
||||
.addDiscoverer(InnerClassFieldDiscoverer.worldConfig(createWorldConfigInstance(contextMap)));
|
||||
}
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ */
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
- private static WorldConfiguration createWorldConfigInstance(ContextMap contextMap) {
|
||||
+ @Override
|
||||
+ protected Object createWorldConfigInstance(ContextMap contextMap) {
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+ @Override protected WorldConfiguration createWorldConfigInstance(ContextMap contextMap) { // Plazma - Configurable Plazma
|
||||
return new WorldConfiguration(
|
||||
contextMap.require(PaperConfigurations.SPIGOT_WORLD_CONFIG_CONTEXT_KEY).get(),
|
||||
contextMap.require(Configurations.WORLD_KEY)
|
||||
@@ -226,7 +291,6 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -229,7 +291,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
final RegistryAccess access = contextMap.require(REGISTRY_ACCESS);
|
||||
return super.createWorldConfigLoaderBuilder(contextMap)
|
||||
.defaultOptions(options -> options
|
||||
- .header(contextMap.require(WORLD_NAME).equals(WORLD_DEFAULTS) ? WORLD_DEFAULTS_HEADER : WORLD_HEADER.apply(contextMap))
|
||||
+ // .header(contextMap.require(WORLD_NAME).equals(WORLD_DEFAULTS) ? WORLD_DEFAULTS_HEADER : WORLD_HEADER.apply(contextMap)) // Plazma - Configurable Plazma
|
||||
.serializers(serializers -> serializers
|
||||
.register(new TypeToken<Reference2IntMap<?>>() {}, new FastutilMapSerializer.SomethingToPrimitive<Reference2IntMap<?>>(Reference2IntOpenHashMap::new, Integer.TYPE))
|
||||
.register(new TypeToken<Reference2LongMap<?>>() {}, new FastutilMapSerializer.SomethingToPrimitive<Reference2LongMap<?>>(Reference2LongOpenHashMap::new, Long.TYPE))
|
||||
@@ -251,11 +315,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -254,11 +316,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
|
||||
@Override
|
||||
protected void applyWorldConfigTransformations(final ContextMap contextMap, final ConfigurationNode node) throws ConfigurateException {
|
||||
- ConfigurationTransformation.Builder builder = ConfigurationTransformation.builder();
|
||||
- for (NodePath path : RemovedConfigurations.REMOVED_WORLD_PATHS) {
|
||||
protected void applyWorldConfigTransformations(final ContextMap contextMap, final ConfigurationNode node, final @Nullable ConfigurationNode defaultsNode) throws ConfigurateException {
|
||||
- final ConfigurationTransformation.Builder builder = ConfigurationTransformation.builder();
|
||||
- for (final NodePath path : RemovedConfigurations.REMOVED_WORLD_PATHS) {
|
||||
- builder.addAction(path, TransformAction.remove());
|
||||
- }
|
||||
- builder.build().apply(node);
|
||||
+ super.applyWorldConfigTransformations(contextMap, node); // Plazma - Configurable Plazma
|
||||
+ super.applyWorldConfigTransformations(contextMap, node, defaultsNode); // Plazma - Configurable Plazma // Plazma - Configurable Plazma
|
||||
|
||||
final ConfigurationTransformation.VersionedBuilder versionedBuilder = Transformations.versionedBuilder();
|
||||
V29_ZeroWorldHeight.apply(versionedBuilder);
|
||||
@@ -266,11 +326,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -270,11 +328,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
|
||||
@Override
|
||||
protected void applyGlobalConfigTransformations(ConfigurationNode node) throws ConfigurateException {
|
||||
@@ -452,23 +444,23 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
|
||||
final ConfigurationTransformation.VersionedBuilder versionedBuilder = Transformations.versionedBuilder();
|
||||
V29_LogIPs.apply(versionedBuilder);
|
||||
@@ -295,6 +351,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
transformation.apply(worldNode);
|
||||
@@ -294,6 +348,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
builder.build().apply(worldNode);
|
||||
}
|
||||
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@Override
|
||||
public WorldConfiguration createWorldConfig(final ContextMap contextMap) {
|
||||
final String levelName = contextMap.require(WORLD_NAME);
|
||||
@@ -335,6 +392,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
.put(REGISTRY_ACCESS, registryAccess)
|
||||
@@ -335,6 +390,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
.put(GAME_RULES, gameRules)
|
||||
.build();
|
||||
}
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
public static PaperConfigurations setup(final Path legacyConfig, final Path configDir, final Path worldFolder, final File spigotConfig) throws Exception {
|
||||
final Path legacy = Files.isSymbolicLink(legacyConfig) ? Files.readSymbolicLink(legacyConfig) : legacyConfig;
|
||||
@@ -368,12 +426,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -368,12 +424,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
throw new RuntimeException("Could not convert '" + legacyFileName + "' to the new configuration format", ex);
|
||||
}
|
||||
}
|
||||
@@ -482,7 +474,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
}
|
||||
|
||||
private static void convert(final Path legacyConfig, final Path configDir, final Path worldFolder, final File spigotConfig) throws Exception {
|
||||
@@ -424,6 +477,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -424,6 +475,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
return Files.exists(legacyConfig) && Files.isRegularFile(legacyConfig);
|
||||
}
|
||||
|
||||
@@ -490,7 +482,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
@Deprecated
|
||||
public YamlConfiguration createLegacyObject(final MinecraftServer server) {
|
||||
YamlConfiguration global = YamlConfiguration.loadConfiguration(this.globalFolder.resolve(this.globalConfigFileName).toFile());
|
||||
@@ -434,6 +488,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -434,6 +486,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
return global;
|
||||
}
|
||||
@@ -498,7 +490,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
|
||||
@Deprecated
|
||||
public static YamlConfiguration loadLegacyConfigFile(File configFile) throws Exception {
|
||||
@@ -456,10 +511,12 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -456,10 +509,13 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
return BasicConfigurationNode.root(options);
|
||||
}
|
||||
|
||||
@@ -510,20 +502,13 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..4a444ac90d357e1b5cc432bccad95805
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1032916def98f0607fabb1bbb550ba2ff70b3019..1cbb3c1142a480201971fae718e6b15a3e4c9d53 100644
|
||||
index 468cb5034f7648e6ef39b1961298f592535aad88..79ee153cd3c7bd3b2f34e7d30f70be5080cfa3c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable
|
||||
private ServerStatus.Favicon statusIcon;
|
||||
private final RandomSource random;
|
||||
+ public RandomSource random() { return this.random; } // Plazma - Expose random source
|
||||
public final DataFixer fixerUpper;
|
||||
private String localIp;
|
||||
private int port;
|
||||
@@ -307,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -311,6 +311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final double[] recentTps = new double[ 4 ]; // Purpur
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
@@ -531,7 +516,7 @@ index 1032916def98f0607fabb1bbb550ba2ff70b3019..1cbb3c1142a480201971fae718e6b15a
|
||||
public static long currentTickLong = 0L; // Paper - track current tick as a long
|
||||
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
public boolean lagging = false; // Purpur
|
||||
@@ -416,6 +418,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -422,6 +423,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||
@@ -539,47 +524,36 @@ index 1032916def98f0607fabb1bbb550ba2ff70b3019..1cbb3c1142a480201971fae718e6b15a
|
||||
}
|
||||
|
||||
private void readScoreboard(DimensionDataStorage persistentStateManager) {
|
||||
@@ -1175,7 +1178,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: https://docs.plazmamc.org/plazma/administration/getting-started/next-step");
|
||||
LOGGER.info("*************************************************************************************");
|
||||
}
|
||||
// Paper end - Add onboarding message for initial server start
|
||||
@@ -1471,6 +1474,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end - execute chunk tasks mid tick
|
||||
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ public static void setServer(MinecraftServer server) {
|
||||
+ if (SERVER != null)
|
||||
+ throw new UnsupportedOperationException("Cannot redefine singleton Server");
|
||||
+
|
||||
+ SERVER = server;
|
||||
+ }
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
private boolean pollTaskInternal() {
|
||||
if (super.pollTask()) {
|
||||
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
|
||||
index 33e3815a0c979609d4c7ab83ad91e87ac07a556d..5b3d59cc5e4efd54bea967d2e37dc9339aff1737 100644
|
||||
index 33e3815a0c979609d4c7ab83ad91e87ac07a556d..4f1071c48fec78036d6759cdff179df3182f28f5 100644
|
||||
--- a/src/main/java/net/minecraft/server/Services.java
|
||||
+++ b/src/main/java/net/minecraft/server/Services.java
|
||||
@@ -12,13 +12,20 @@ import net.minecraft.util.SignatureValidator;
|
||||
@@ -12,13 +12,34 @@ import net.minecraft.util.SignatureValidator;
|
||||
|
||||
|
||||
public record Services(
|
||||
- MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations // Paper - add paper configuration files
|
||||
+ MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @org.jetbrains.annotations.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @org.jetbrains.annotations.Nullable org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations // Paper - add paper configuration files // Plazma - Configurable Plazma
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ MinecraftSessionService sessionService,
|
||||
+ ServicesKeySet servicesKeySet,
|
||||
+ GameProfileRepository profileRepository,
|
||||
+ GameProfileCache profileCache,
|
||||
+ @org.jetbrains.annotations.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations,
|
||||
+ @org.jetbrains.annotations.Nullable org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations
|
||||
+ // Plazma end - Configurable Plazma
|
||||
) {
|
||||
// Paper start - add paper configuration files
|
||||
+ // Plazma start - Configurable Plazma
|
||||
public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
|
||||
- this(sessionService, servicesKeySet, profileRepository, profileCache, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, profileCache, null, null);
|
||||
+ this(
|
||||
+ sessionService,
|
||||
+ servicesKeySet,
|
||||
+ profileRepository,
|
||||
+ profileCache,
|
||||
+ null,
|
||||
+ null
|
||||
+ );
|
||||
}
|
||||
|
||||
+ @Override
|
||||
@@ -591,24 +565,29 @@ index 33e3815a0c979609d4c7ab83ad91e87ac07a556d..5b3d59cc5e4efd54bea967d2e37dc933
|
||||
@Override
|
||||
public io.papermc.paper.configuration.PaperConfigurations paperConfigurations() {
|
||||
return java.util.Objects.requireNonNull(this.paperConfigurations);
|
||||
@@ -34,7 +41,11 @@ public record Services(
|
||||
@@ -34,7 +55,16 @@ public record Services(
|
||||
final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath();
|
||||
final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath();
|
||||
io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, rootDirectory.toPath(), (File) optionSet.valueOf("spigot-settings"));
|
||||
- return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations);
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ final java.nio.file.Path plazmaConfigDirPath = ((File) optionSet.valueOf("plazma-settings-directory")).toPath();
|
||||
+ org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations = new org.plazmamc.plazma.configurations.PlazmaConfigurations(plazmaConfigDirPath);
|
||||
+ return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations, plazmaConfigurations);
|
||||
+ return new Services(
|
||||
+ minecraftSessionService,
|
||||
+ authenticationService.getServicesKeySet(),
|
||||
+ gameProfileRepository,
|
||||
+ gameProfileCache,
|
||||
+ paperConfigurations,
|
||||
+ new org.plazmamc.plazma.configurations.PlazmaConfigurations(optionSet)
|
||||
+ );
|
||||
+ // Plazma end
|
||||
// Paper end - load paper config files from cli options
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5ca6af93362d205438f8321ee2461ae7f8160df1..b7709cbb1a78eb1daac2112cb9fbf5d379aaa662 100644
|
||||
index 6d3f61a05c4d4ad20e62175eb0331bc31b5d6807..6cbbe9c692068edee7e66f85081ec95b8dd12101 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -209,6 +209,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -222,6 +222,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper start - initialize global and world-defaults configuration
|
||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
@@ -617,7 +596,7 @@ index 5ca6af93362d205438f8321ee2461ae7f8160df1..b7709cbb1a78eb1daac2112cb9fbf5d3
|
||||
// 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()) {
|
||||
@@ -219,6 +221,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -232,6 +234,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
|
||||
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
@@ -626,55 +605,87 @@ index 5ca6af93362d205438f8321ee2461ae7f8160df1..b7709cbb1a78eb1daac2112cb9fbf5d3
|
||||
// Purpur start
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2ac8c77684c2e4cfc30bc0d39bcaf853dcd3bfb9..f5d1c1629a762b0ff5534d546610b1f59f385921 100644
|
||||
index b3d47d16fb9733ca5cc4f90051ee8694ff3545c5..5456d2ded6f6e75c48868147e5a2dde5eb23bec8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -695,7 +695,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -700,15 +700,33 @@ 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())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor
|
||||
+ 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 - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable 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(), iworlddataserver.getGameRules())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor
|
||||
+ // Plazma start - Configurable 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(), iworlddataserver.getGameRules())),
|
||||
+ spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())),
|
||||
+ executor
|
||||
+ );
|
||||
+ // Plazma end - Configurable Plazma
|
||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index f6664447c45b1d6f3371af7bed8b1175b17f25e2..9161f020d2ecc0cb9191666cfbc6a877d067063e 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -271,7 +271,7 @@ public final class ItemStack {
|
||||
if (0 < version && version < CraftMagicNumbers.INSTANCE.getDataVersion() && MinecraftServer.getServer() != null) { // Paper - skip conversion if the server doesn't exist (for tests)
|
||||
CompoundTag savedStack = new CompoundTag();
|
||||
this.save(savedStack);
|
||||
- savedStack = (CompoundTag) MinecraftServer.getServer().fixerUpper.update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue();
|
||||
+ savedStack = (CompoundTag) MinecraftServer.getServer().getFixerUpper().update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue(); // Plazma - Configurable Plazma
|
||||
this.load(savedStack);
|
||||
}
|
||||
}
|
||||
// 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 Mojang's Profiler
|
||||
+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler
|
||||
this.pathTypesByPosCache = new PathTypeCache();
|
||||
this.navigatingMobs = new ObjectOpenHashSet();
|
||||
this.blockEvents = new ObjectLinkedOpenHashSet();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 311c853f2150247350ab6ccb2dd92d58dbfc645c..7578b6d4ee52ebafea16b7eaf88dcedbd1f093d8 100644
|
||||
index 6fab30d186d64d51f7dd9af00fccded4c388844c..df73867ee5682fb966b69dd85da61a6928d8dab3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -171,7 +171,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -169,6 +169,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return this.paperConfig;
|
||||
}
|
||||
// Paper end - add paper world config
|
||||
-
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ private final org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig;
|
||||
+ public org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig() {
|
||||
+ return this.plazmaConfig;
|
||||
+ }
|
||||
+ // Plazma end - Configurable Plazma
|
||||
|
||||
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
@@ -262,9 +267,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -251,9 +257,28 @@ 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.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
|
||||
+ 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 - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma
|
||||
+ // Plazma start - Configurable 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
|
||||
+ ) {
|
||||
+ // Plazma end - Configurable Plazma
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||
+ this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma - Configurable Plazma
|
||||
@@ -682,10 +693,10 @@ index 311c853f2150247350ab6ccb2dd92d58dbfc645c..7578b6d4ee52ebafea16b7eaf88dcedb
|
||||
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
||||
this.generator = gen;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b2470f03eecb1b81d3f0acbd9bc3c38f321ef3d9..ceea71c3e6886b03d017c44c287dc20928f63f09 100644
|
||||
index 3c505f631f15fe97e380c96ac719b1f61ed22690..02037da80f2f3cada359bbe0f58160fd15761b77 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1068,6 +1068,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1047,6 +1047,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
@@ -693,12 +704,12 @@ index b2470f03eecb1b81d3f0acbd9bc3c38f321ef3d9..ceea71c3e6886b03d017c44c287dc209
|
||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||
@@ -3111,6 +3112,13 @@ public final class CraftServer implements Server {
|
||||
@@ -3113,6 +3114,13 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @Override @org.jetbrains.annotations.NotNull
|
||||
+ @Override
|
||||
+ public YamlConfiguration getPlazmaConfig() {
|
||||
+ return CraftServer.this.console.plazmaConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
+ }
|
||||
@@ -708,11 +719,11 @@ index b2470f03eecb1b81d3f0acbd9bc3c38f321ef3d9..ceea71c3e6886b03d017c44c287dc209
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index d36c880012153058803b595429084adb36458741..e8df8e8520cea5d21197c61a172f7211a3a2c34d 100644
|
||||
index 90d6650aa37247f3907f6bcf2fe5201cac4e05ea..24c3914ba4f144a2e43c17e98373b7a4ce1f6217 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -195,6 +195,14 @@ public class Main {
|
||||
.defaultsTo("Plazma Server") // Plazma - Branding
|
||||
@@ -197,6 +197,14 @@ public class Main {
|
||||
.defaultsTo("A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server") // Plazma - Fork-friendly Rebranding
|
||||
.describedAs("Name");
|
||||
// Paper end
|
||||
+
|
||||
@@ -726,6 +737,21 @@ index d36c880012153058803b595429084adb36458741..e8df8e8520cea5d21197c61a172f7211
|
||||
}
|
||||
};
|
||||
|
||||
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..5942d0997f07bd51d934dac32cd349792a10643e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -0,0 +1,9 @@
|
||||
+package org.plazmamc.plazma;
|
||||
+
|
||||
+import static java.lang.Boolean.getBoolean;
|
||||
+
|
||||
+public interface Options {
|
||||
+
|
||||
+ boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/commands/Commands.java b/src/main/java/org/plazmamc/plazma/commands/Commands.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4497d8f8a52db0fc89ce27168b54657d172b1445
|
||||
@@ -1007,20 +1033,22 @@ index 0000000000000000000000000000000000000000..d8006ae086c18a4ef43906d516eba0d5
|
||||
+}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e32ae3f4fd
|
||||
index 0000000000000000000000000000000000000000..09053b4ccf268fd204c81dbb8d4f10fa9edcad5f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
|
||||
@@ -0,0 +1,218 @@
|
||||
@@ -0,0 +1,219 @@
|
||||
+package org.plazmamc.plazma.configurations;
|
||||
+
|
||||
+import com.mojang.logging.LogUtils;
|
||||
+import io.papermc.paper.configuration.ConfigurationPart;
|
||||
+import io.papermc.paper.configuration.Configurations;
|
||||
+import joptsimple.OptionSet;
|
||||
+import net.minecraft.core.RegistryAccess;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
+import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
+import org.jetbrains.annotations.VisibleForTesting;
|
||||
+import org.plazmamc.plazma.Options;
|
||||
+import org.slf4j.Logger;
|
||||
+import org.spongepowered.configurate.BasicConfigurationNode;
|
||||
+import org.spongepowered.configurate.ConfigurateException;
|
||||
@@ -1030,6 +1058,7 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
+import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
|
||||
+
|
||||
+import java.io.File;
|
||||
+import java.nio.file.Path;
|
||||
+import java.util.function.Function;
|
||||
+
|
||||
@@ -1038,12 +1067,12 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+@DefaultQualifier(NonNull.class)
|
||||
+public class PlazmaConfigurations extends Configurations<GlobalConfiguration, WorldConfigurations> {
|
||||
+
|
||||
+ public static final Logger LOGGER = LogUtils.getClassLogger();
|
||||
+ public static final String CONFIG_DIR = "config";
|
||||
+ static final Logger LOGGER = LogUtils.getLogger();
|
||||
+ static final String GLOBAL_CONFIG_FILE_NAME = "plazma-global.yml";
|
||||
+ static final String WORLD_DEFAULTS_CONFIG_FILE_NAME = "plazma-world-defaults.yml";
|
||||
+ static final String WORLD_CONFIG_FILE_NAME = "plazma-world.yml";
|
||||
+ static final boolean OPTIMIZE = !Boolean.getBoolean("Plazma.disableConfigOptimization");
|
||||
+ static final boolean OPTIMIZE = !Options.NO_OPTIMIZE;
|
||||
+
|
||||
+ private static final String HEADER_START = """
|
||||
+ #### ENGLISH ####
|
||||
@@ -1070,7 +1099,7 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+ %s
|
||||
+
|
||||
+ GitHub: https://github.com/PlazmaMC/Plazma
|
||||
+ Wiki: https://github.com/PlazmaMC/Plazma/wiki
|
||||
+ Wiki: https://docs.plazmamc.org/
|
||||
+ Discord: https://plazmamc.org/discord
|
||||
+ """;
|
||||
+
|
||||
@@ -1103,7 +1132,6 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+ If you need help with the configuration or have any questions related to Plazma,
|
||||
+ join us in our Discord for Plazma, or create issues on our GitHub repository.
|
||||
+
|
||||
+
|
||||
+ #### 한국어 ####
|
||||
+ 본 파일은 %s (%s) 월드 전용 Plazma 구성 파일입니다.
|
||||
+ 이 파일은 초기에는 비어있지만, 월드 기본 설정을 덮어쓰기 위해 설정을 추가할 수 있습니다.
|
||||
@@ -1114,10 +1142,9 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+ 만약 설정에 도움이 필요하거나, Plazma에 대해 질문이 있으시다면,
|
||||
+ 공식 Discord 서버에 접속하거나, GitHub 레포지토리에 이슈를 생성해주시기 바랍니다.
|
||||
+
|
||||
+
|
||||
+ World Default Config Directory: %s/%s
|
||||
+ GitHub: https://github.com/PlazmaMC/Plazma
|
||||
+ Wiki: https://github.com/PlazmaMC/Plazma/wiki
|
||||
+ Document: https://docs.plazmamc.org/
|
||||
+ Discord: https://plazmamc.org/discord
|
||||
+ """.formatted(
|
||||
+ map.require(WORLD_NAME), map.require(WORLD_KEY),
|
||||
@@ -1125,8 +1152,8 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+ CONFIG_DIR, WORLD_DEFAULTS_CONFIG_FILE_NAME
|
||||
+ );
|
||||
+
|
||||
+ public PlazmaConfigurations(final Path globalFolder) {
|
||||
+ super(globalFolder);
|
||||
+ public PlazmaConfigurations(final OptionSet optionSet) {
|
||||
+ super(((File) optionSet.valueOf("plazma-settings-directory")).toPath());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -1208,7 +1235,7 @@ index 0000000000000000000000000000000000000000..28deb72a851f353abaf50345983467e3
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected Object createWorldConfigInstance(final ContextMap contextMap) {
|
||||
+ protected WorldConfigurations createWorldConfigInstance(final ContextMap contextMap) {
|
||||
+ return new WorldConfigurations(contextMap.require(WORLD_KEY));
|
||||
+ }
|
||||
+
|
||||
@@ -1277,7 +1304,7 @@ index 0000000000000000000000000000000000000000..f2d3d51cb4b8fc7a5fd6db1a63289fff
|
||||
+
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index b786ed8e620feb51baceae41dd2d1538dc298705..6c2db1219714a524b456428523ed4674f79ffe03 100644
|
||||
index 1b1d51a68c0abe7d8f0aa1172064192c71ae645e..74af3501397bfd89d637ad5ce72bb8f2c2bbdc8a 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -64,6 +64,7 @@ public abstract class AbstractTestingBase {
|
||||
@@ -1288,24 +1315,6 @@ index b786ed8e620feb51baceae41dd2d1538dc298705..6c2db1219714a524b456428523ed4674
|
||||
|
||||
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
index 3b3e44c5ed24f653f7dc1e5d3d4f0ff76084f277..9391d5447e26a42142c6b44c8e470b35c0f9b0cf 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
@@ -57,6 +57,13 @@ public final class DummyServer {
|
||||
when(instance.getTag(anyString(), any(org.bukkit.NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.util.EmptyTag());
|
||||
// paper end - testing additions
|
||||
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ net.minecraft.server.MinecraftServer handle = mock(withSettings().stubOnly());
|
||||
+ when(handle.random()).thenReturn(net.minecraft.util.RandomSource.create());
|
||||
+ when(handle.getFixerUpper()).thenReturn(net.minecraft.util.datafix.DataFixers.getDataFixer());
|
||||
+ net.minecraft.server.MinecraftServer.setServer(handle);
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
} catch (Throwable t) {
|
||||
throw new Error(t);
|
||||
diff --git a/src/test/java/org/plazmamc/plazma/configurations/GlobalConfigurationTestingBase.java b/src/test/java/org/plazmamc/plazma/configurations/GlobalConfigurationTestingBase.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c63942e2dc00ed6d6b4119f418bdaa5a64b4c0fe
|
||||
@@ -61,10 +61,10 @@ index d8006ae086c18a4ef43906d516eba0d5fd397f5f..57d29f8f3bc89529db9ee8f6dc3fffdb
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..42d639688b6f0b9ff53debf49a920f5c8e232a19 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;
|
||||
|
||||
@@ -95,5 +95,11 @@ index f2d3d51cb4b8fc7a5fd6db1a63289fff6d32a1ea..42d639688b6f0b9ff53debf49a920f5c
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ 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 b91c3b8ca8f840335ba6470658d82c5d71bb75e1..23f0302f2d90b7229828890eb364bc2c9abc11d2 100644
|
||||
index 4911a6d25d12eb9d2b263aeb9b7f521ff828397a..29eef278940cab33a1f5f168f66ab2b80f0d60ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -168,6 +168,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 - Always agree EULA on development mode
|
||||
+ eulaAgreed = eulaAgreed || Boolean.getBoolean("Paper.pushPaperAssetsRoot"); // Plazma - Always agree EULA on development mode
|
||||
if ( eulaAgreed )
|
||||
{
|
||||
System.err.println( "You have used the Spigot command line EULA agreement flag." );
|
||||
@@ -1,118 +0,0 @@
|
||||
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/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 04b98e23eed926d8473cc2464e04a5b9f18f1140..cf098d4a3111771c13766285c5ec5f1fc1f539a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -74,6 +74,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;
|
||||
@@ -210,12 +211,14 @@ 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();
|
||||
+ if (!skipSqrWhenNoDeltaChanges && vec3d1 != this.ap) { // Plazma - SparklyPaper port; Skip distanceToSqr if the delta movement hasn't changed
|
||||
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 - SparklyPaper port; Skip distanceToSqr if the delta movement hasn't changed
|
||||
}
|
||||
|
||||
if (packet1 != null) {
|
||||
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
index f890738d3bb9fb5e70a9d323c6cec97f9948f9cf..52e72277c661b67a54bc5ce584efb04134599dd3 100644
|
||||
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
@@ -243,7 +243,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 +251,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/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 8d3c1897044f9a2bbe1911e1a72dc9a00fb246df..a68112a1d1904edfc84acb6c209e13f0836d97e0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -313,12 +313,14 @@ 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 worldmap = MapItem.getSavedData(stack, world);
|
||||
|
||||
if (worldmap != null) {
|
||||
+ if (skipTickWhenCraftNotPresent && worldmap.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 entityhuman = (Player) entity;
|
||||
|
||||
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..9c830ec9129ac94aa08e914a82792210c13fc1a3 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -40,9 +40,11 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Entity entity;
|
||||
public class Entity extends ConfigurationPart {
|
||||
|
||||
+ boolean skipSqrWhenNoDeltaChanges = OPTIMIZE;
|
||||
|
||||
@PostProcess
|
||||
public void post() {
|
||||
+ net.minecraft.server.level.ServerEntity.skipSqrWhenNoDeltaChanges = this.skipSqrWhenNoDeltaChanges;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,9 +52,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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ 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 0b3d87d2d43148e6370e7a03e0bb6074891ac800..8783c81af1d09e6682256dee0dd546de0be418cd 100644
|
||||
index 81b204c03b3c9a997f00fd423daa963757cb0daf..67e299893b7e1a64ab2962d79c2434dad189eed5 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,38 +636,59 @@ public class Metrics {
|
||||
@@ -9,10 +9,10 @@ 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 8afc58f35deb49084a20b803e91ce4692ce6e4d6..1febd6d0743aadb4002b447c07ec43098ca96c18 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",
|
||||
@@ -21,37 +21,36 @@ index 8afc58f35deb49084a20b803e91ce4692ce6e4d6..1febd6d0743aadb4002b447c07ec4309
|
||||
"Join our Discord for support: https://discord.gg/reZw4vQV9H",
|
||||
"Download new builds at https://ci.pufferfish.host/job/Pufferfish");
|
||||
|
||||
@@ -219,7 +219,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");
|
||||
@@ -233,7 +233,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.");
|
||||
@@ -241,7 +241,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.",
|
||||
@@ -261,8 +261,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 8afc58f35deb49084a20b803e91ce4692ce6e4d6..1febd6d0743aadb4002b447c07ec4309
|
||||
+ getInt("entity_timeouts.SNOWBALL", 200);
|
||||
+ getInt("entity_timeouts.LLAMA_SPIT", 200);
|
||||
+ } else {
|
||||
+ getInt("entity_timeouts.SNOWBALL", -1);
|
||||
+ getInt("entity_timeouts.LLAMA_SPIT", -1);
|
||||
+ }
|
||||
+ // Plazma end - Optimize default configurations
|
||||
getInt("entity_timeouts.SNOWBALL", -1);
|
||||
getInt("entity_timeouts.LLAMA_SPIT", -1);
|
||||
+ } // Plazma - 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 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222bc5f90ed 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
|
||||
@@ -156,7 +156,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 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
||||
}
|
||||
|
||||
public SpamLimiter spamLimiter;
|
||||
@@ -198,7 +198,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 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
||||
public boolean fixTargetSelectorTagCompletion = true;
|
||||
public boolean timeCommandAffectsAllWorlds = false;
|
||||
}
|
||||
@@ -247,7 +247,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 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
||||
public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
|
||||
}
|
||||
public boolean resolveSelectorsInBooks = false;
|
||||
@@ -258,7 +258,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 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
||||
|
||||
@ConfigSerializable
|
||||
public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) {
|
||||
@@ -326,7 +334,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -335,7 +343,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
executor.setMaximumPoolSize(_chatExecutorMaxSize);
|
||||
}
|
||||
}
|
||||
@@ -125,7 +124,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
||||
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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d897ab34ac8 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 {
|
||||
@@ -194,14 +193,14 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,7 +211,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
}
|
||||
|
||||
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
|
||||
@@ -221,7 +220,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
@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)));
|
||||
|
||||
@@ -383,7 +424,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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
public boolean disableExplosionKnockback = false;
|
||||
public boolean generateFlatBedrock = false;
|
||||
public FrostedIce frostedIce;
|
||||
@@ -438,7 +479,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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
public boolean disableUnloadedChunkEnderpearlExploit = true;
|
||||
public boolean preventTntFromMovingInWater = false;
|
||||
public boolean splitOverstackedLoot = true;
|
||||
@@ -466,9 +507,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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
public boolean allowPlayerCrammingDamage = false;
|
||||
}
|
||||
|
||||
@@ -476,18 +517,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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
});
|
||||
public boolean flushRegionsOnSave = false;
|
||||
}
|
||||
@@ -502,9 +566,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 d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
||||
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));
|
||||
@@ -538,9 +602,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 23f0302f2d90b7229828890eb364bc2c9abc11d2..a9753f799ef944a46ee3cedd68c8aad7aacc2612 100644
|
||||
index 29eef278940cab33a1f5f168f66ab2b80f0d60ce..b4d47c53bb2a5c75e9f69506dbd69a8817f368dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -153,7 +153,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,10 +350,10 @@ index 23f0302f2d90b7229828890eb364bc2c9abc11d2..a9753f799ef944a46ee3cedd68c8aad7
|
||||
|
||||
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 a66dcea06424518290576c7647ae0717040586f9..41d5d15dfa2affdee68501efb2447a209c38992d 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
|
||||
@@ -130,14 +130,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.spawnMonsters = this.get("spawn-monsters", true);
|
||||
this.useNativeTransport = this.get("use-native-transport", true);
|
||||
this.enableCommandBlock = this.get("enable-command-block", false);
|
||||
@@ -373,20 +372,20 @@ index a66dcea06424518290576c7647ae0717040586f9..41d5d15dfa2affdee68501efb2447a20
|
||||
this.maxPlayers = this.get("max-players", 20);
|
||||
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
|
||||
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
||||
@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -146,7 +146,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, 1, 29999984);
|
||||
}, 29999984);
|
||||
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag
|
||||
+ this.syncChunkWrites = this.get("sync-chunk-writes", false) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Show disabled by default
|
||||
+ 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 ceea71c3e6886b03d017c44c287dc20928f63f09..e250196a4210c5b2fe5eadda6312ebc5e17590b8 100644
|
||||
index 02037da80f2f3cada359bbe0f58160fd15761b77..8de087636686b78c12bc1c293258713ff7dddff0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -426,7 +426,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 ceea71c3e6886b03d017c44c287dc20928f63f09..e250196a4210c5b2fe5eadda6312ebc5
|
||||
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 a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71 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 {
|
||||
@@ -427,7 +446,7 @@ index a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecb
|
||||
private static void useAlternateKeepAlive() {
|
||||
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
}
|
||||
@@ -486,7 +487,7 @@ public class PurpurConfig {
|
||||
@@ -481,7 +482,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static boolean useUPnP = false;
|
||||
@@ -437,10 +456,10 @@ index a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecb
|
||||
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 7dc82ffccc157a17335f1bc56ab81be3813294f6..d756c25e6d0af3153e510d0162e65348b1675366 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 7dc82ffccc157a17335f1bc56ab81be3813294f6..d756c25e6d0af3153e510d0162e65348
|
||||
public boolean teleportOnNetherCeilingDamage = false;
|
||||
public boolean totemOfUndyingWorksInInventory = false;
|
||||
public boolean playerFixStuckPortal = false;
|
||||
@@ -3127,7 +3127,7 @@ public class PurpurWorldConfig {
|
||||
@@ -3135,7 +3135,7 @@ public class PurpurWorldConfig {
|
||||
public boolean zombieJockeyOnlyBaby = true;
|
||||
public double zombieJockeyChance = 0.05D;
|
||||
public boolean zombieJockeyTryExistingChickens = true;
|
||||
@@ -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
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Tweak console logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e20b104c57 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\"");
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -212,6 +202,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
@@ -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
|
||||
@@ -43,7 +43,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2
|
||||
// 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
|
||||
@@ -320,6 +321,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -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
|
||||
@@ -51,7 +51,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2
|
||||
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.");
|
||||
@@ -333,7 +335,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -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
|
||||
@@ -61,22 +61,22 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 60aa2984e490374ab2659f9d0a4821f1ea17c700..14d15dd0d4973957871f5c06042fcaa4ea8b7a8a 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
|
||||
@@ -1469,6 +1469,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 9c830ec9129ac94aa08e914a82792210c13fc1a3..f7457660566d64a8149db414e005f0b8ed2202b5 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
|
||||
@@ -67,4 +67,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 518660609566ffe943103b305472590ee9f0a257..a6a697868b22224a26d6c39e594533c3b33e724b 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
|
||||
@@ -33,10 +33,10 @@ index 518660609566ffe943103b305472590ee9f0a257..a6a697868b22224a26d6c39e594533c3
|
||||
|
||||
@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 8616a8c09a21f576a07daaa93ebf64e0f03d0c88..77c1bcde8cc5c2f51418a6f385ce84f202a13787 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
|
||||
@@ -97,6 +97,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;
|
||||
}
|
||||
@@ -51,15 +51,15 @@ index 8616a8c09a21f576a07daaa93ebf64e0f03d0c88..77c1bcde8cc5c2f51418a6f385ce84f2
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
+ // 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 37f1d3c656997906cef57d9dbefc226d04fc65fe..b3880426148bb1ffbf36113343c54850fc344d1c 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
|
||||
@@ -161,6 +161,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();
|
||||
}
|
||||
@@ -84,10 +84,10 @@ index 37f1d3c656997906cef57d9dbefc226d04fc65fe..b3880426148bb1ffbf36113343c54850
|
||||
|
||||
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 2a9c2a69a0589e4e7b7c79d3716376b360a2eba1..630eaae555403db79f4e16880ca443904b9254ab 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
|
||||
@@ -90,6 +90,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
|
||||
}
|
||||
@@ -112,12 +112,12 @@ index 2a9c2a69a0589e4e7b7c79d3716376b360a2eba1..630eaae555403db79f4e16880ca44390
|
||||
|
||||
@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 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c6daf4cfb 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 - Add missing purpur configuration options
|
||||
@@ -135,7 +135,7 @@ index 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c
|
||||
|
||||
@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 bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16e4116239 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
|
||||
@@ -147,6 +147,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -163,10 +163,10 @@ index bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16
|
||||
|
||||
@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 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8026440d4 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
|
||||
@@ -43,7 +43,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);
|
||||
@@ -175,6 +175,12 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8
|
||||
}
|
||||
|
||||
public ChestBoat(Level world, double d0, double d1, double d2) {
|
||||
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
|
||||
@@ -185,7 +191,7 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71..fc48ff9270e32c3b3dbf7ffd310cab7c33d459c0 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 {
|
||||
@@ -205,13 +211,13 @@ index 65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71..fc48ff9270e32c3b3dbf7ffd310cab7c
|
||||
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 d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604bf6ab03ae 100644
|
||||
index b6a6a74dfd00a4536258c8693048c9d1ac4df435..182e8c3f9a631a98576b2efb63371d57f9f5f25f 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1170,7 +1170,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;
|
||||
@@ -224,23 +230,21 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||
@@ -1289,7 +1297,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 - 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);
|
||||
@@ -1717,7 +1733,15 @@ public class PurpurWorldConfig {
|
||||
@@ -1723,7 +1737,15 @@ public class PurpurWorldConfig {
|
||||
public boolean frogControllable = true;
|
||||
public float frogRidableJumpHeight = 0.65F;
|
||||
public int frogBreedingTicks = 6000;
|
||||
@@ -256,7 +260,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
||||
@@ -2668,7 +2692,13 @@ public class PurpurWorldConfig {
|
||||
@@ -2676,7 +2698,13 @@ public class PurpurWorldConfig {
|
||||
public boolean snifferControllable = true;
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
public int snifferBreedingTicks = 6000;
|
||||
@@ -270,7 +274,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
|
||||
@@ -2767,7 +2797,15 @@ public class PurpurWorldConfig {
|
||||
@@ -2775,7 +2803,15 @@ public class PurpurWorldConfig {
|
||||
public boolean tadpoleRidable = false;
|
||||
public boolean tadpoleRidableInWater = true;
|
||||
public boolean tadpoleControllable = true;
|
||||
@@ -286,7 +290,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
||||
@@ -2983,7 +3021,15 @@ public class PurpurWorldConfig {
|
||||
@@ -2991,7 +3027,15 @@ public class PurpurWorldConfig {
|
||||
public boolean wardenRidable = false;
|
||||
public boolean wardenRidableInWater = true;
|
||||
public boolean wardenControllable = true;
|
||||
|
||||
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,7 +5,7 @@ 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 46910a3bdacc9df1835e16b300f9e107744d2660..9b372b494b831c374bab478267309544b4b31748 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
|
||||
@@ -99,7 +99,7 @@ public class PortalShape {
|
||||
@@ -36,7 +36,7 @@ index 46910a3bdacc9df1835e16b300f9e107744d2660..9b372b494b831c374bab478267309544
|
||||
|
||||
// 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 42d639688b6f0b9ff53debf49a920f5c8e232a19..36728e206de513e071f387d36a608e70a5984a58 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 {
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,18 @@ Date: Wed, 27 Sep 2023 21:18:22 +0900
|
||||
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 703e3720cf28c669000b663cba56b070ac4ed96a..4782f19409d300fbcaa952ae0dd6a0577ade5f7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable
|
||||
private ServerStatus.Favicon statusIcon;
|
||||
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 b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046edd340a82 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
@@ -18,10 +30,10 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046e
|
||||
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 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a8447627923ee4086c 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
|
||||
@@ -456,7 +456,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);
|
||||
@@ -30,7 +42,7 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792
|
||||
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
@@ -493,7 +493,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);
|
||||
@@ -40,20 +52,20 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792
|
||||
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 c0729d3a38e0b9924711c0ca96afd138fa69fa3b..d45a435a3aa8fc5b8f028e0455c3789b36cbdf12 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
|
||||
@@ -71,7 +71,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 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..034b41aa8c8a5571f21530a4e8588b1cc110ecf3 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
|
||||
@@ -341,7 +341,7 @@ public class QueryThreadGs4 extends GenericThread {
|
||||
@@ -61,12 +73,12 @@ index 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..034b41aa8c8a5571f21530a4e8588b1c
|
||||
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 3fac11bf02652b5f51f30f99bdf516504467d0d2..add054ac26890b627d1eee87d1b0f88a84bf2aac 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;
|
||||
@@ -74,12 +86,12 @@ index 3fac11bf02652b5f51f30f99bdf516504467d0d2..add054ac26890b627d1eee87d1b0f88a
|
||||
public class ShufflingList<U> implements Iterable<U> {
|
||||
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 - Reduce create random instance
|
||||
+ 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 e553f52de2e0b30511ac1b73cb436374017cd7d7..cbb94ec3111865563e451e758e5b9813f3c6102f 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;
|
||||
@@ -87,12 +99,12 @@ index e553f52de2e0b30511ac1b73cb436374017cd7d7..cbb94ec3111865563e451e758e5b9813
|
||||
|
||||
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.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 3d792957f27fd4bdfad8d76262a8e2a2012bf35f..2d96cf85fb9250bbbddb8065307a47929c0c905c 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
|
||||
@@ -33,7 +33,7 @@ public class AngerManagement {
|
||||
@@ -100,12 +112,12 @@ index 3d792957f27fd4bdfad8d76262a8e2a2012bf35f..2d96cf85fb9250bbbddb8065307a4792
|
||||
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 -> 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 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0888acda2 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 {
|
||||
@@ -113,12 +125,12 @@ index 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0
|
||||
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 91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0..1317d8289898798a9d86a4c995a4a1a317631bf7 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
|
||||
@@ -87,7 +87,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -131,10 +143,10 @@ index 91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0..1317d8289898798a9d86a4c995a4a1a3
|
||||
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 bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e069d254c35 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
|
||||
@@ -114,7 +114,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);
|
||||
@@ -143,7 +155,7 @@ index bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e06
|
||||
this.waveSpawnPos = Optional.empty();
|
||||
this.id = id;
|
||||
this.level = world;
|
||||
@@ -128,7 +128,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);
|
||||
@@ -153,10 +165,10 @@ index bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e06
|
||||
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 1a686780e5aadcbdcfceb770ce8e283b38115209..6c1ba9631e56c336ed3ddee8e6435734597a3aa3 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
|
||||
};
|
||||
@@ -166,23 +178,23 @@ index 1a686780e5aadcbdcfceb770ce8e283b38115209..6c1ba9631e56c336ed3ddee8e6435734
|
||||
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 0be03430d8257d918b7cf646af518473ae027399..824f210af6d8467ed596ece1573740d99b92b7ba 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
|
||||
@@ -92,7 +92,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, ParticleOptions particle, ParticleOptions emitterParticle, SoundEvent soundEvent) {
|
||||
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 16e6716f70d5b9090f29f8b2320302d98dd087c2..72420d9e79d4b480fa060f9b910cea7b677a1427 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
|
||||
@@ -122,16 +122,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;
|
||||
@@ -198,14 +210,14 @@ index 16e6716f70d5b9090f29f8b2320302d98dd087c2..72420d9e79d4b480fa060f9b910cea7b
|
||||
@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;
|
||||
// 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 4997f120aa9877c199fbcaa0c2f65226e13b5a23..af393eaf3d21a260f0bfff5eaeb78c389161bffd 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
|
||||
@@ -363,7 +363,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) {
|
||||
@@ -215,7 +227,7 @@ index 4997f120aa9877c199fbcaa0c2f65226e13b5a23..af393eaf3d21a260f0bfff5eaeb78c38
|
||||
|
||||
@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 798e22fb4d685b5845ebf687e8004e94f13a9751..189f425565c9c38b29031ae26de667422eb3b6bb 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
|
||||
@@ -224,7 +224,7 @@ public class ChunkGeneratorStructureState {
|
||||
@@ -223,7 +235,7 @@ index 798e22fb4d685b5845ebf687e8004e94f13a9751..189f425565c9c38b29031ae26de66742
|
||||
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 - Add missing structure set seed configs
|
||||
if (this.conf.strongholdSeed != null && structureSetEntry.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) {
|
||||
@@ -241,7 +253,7 @@ index 7bbe93966fa00b7001da53bf2f22f4d942b7cc22..6c5eececc83571b0f60e7f672ed185e1
|
||||
} 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 d4f903c402765c6e8e1db99e148613748f530726..c8d76fdee94a0ffb76fcb476ca386acf154dda28 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 {
|
||||
@@ -263,7 +275,7 @@ index d4f903c402765c6e8e1db99e148613748f530726..c8d76fdee94a0ffb76fcb476ca386acf
|
||||
|
||||
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 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb814b56f6bc 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;
|
||||
@@ -281,10 +293,10 @@ index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb81
|
||||
// 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 f7457660566d64a8149db414e005f0b8ed2202b5..d922c572e2410fa1f719fe2371f65cd1542ca8b4 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
|
||||
@@ -64,6 +64,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -65,6 +65,8 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public Miscellaneous misc;
|
||||
public class Miscellaneous extends ConfigurationPart {
|
||||
|
||||
@@ -294,7 +306,7 @@ index f7457660566d64a8149db414e005f0b8ed2202b5..d922c572e2410fa1f719fe2371f65cd1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 36728e206de513e071f387d36a608e70a5984a58..c8b10b3499fbdf41f0b268d8a9da729e3432bb66 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,10 +7,10 @@ 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 f2c6b52fe7fbb05afa0074684cd195f6ae598f1f..f16a347e0e263a0479a73cb14626e31c9de37e6c 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
|
||||
@@ -2154,8 +2154,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2209,8 +2209,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
@@ -21,7 +21,7 @@ index f2c6b52fe7fbb05afa0074684cd195f6ae598f1f..f16a347e0e263a0479a73cb14626e31c
|
||||
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();
|
||||
@@ -2183,8 +2184,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2238,8 +2239,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
entity.push(d0, 0.0D, d1);
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ 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 0847aef56d8608cb1403485f231f30b2527f35ab..fee30f686a5d1ee50a00c2073efd5b0a80e85179 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 - 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));
|
||||
@@ -17,7 +17,7 @@ index 0847aef56d8608cb1403485f231f30b2527f35ab..fee30f686a5d1ee50a00c2073efd5b0a
|
||||
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 c8b10b3499fbdf41f0b268d8a9da729e3432bb66..922d1d250f2e2e5a4177bcf5fe7487ff2b43413b 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,19 +6,19 @@ 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 f7ac60e1aa188ec25a4c5d326cdd4a109a54101c..613f12a7194920690c42ffca2fdf6908700516e5 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
|
||||
@@ -1472,6 +1472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -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) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
||||
if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !flag)) {
|
||||
float f2 = flag ? 300.0F : 100.0F;
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index a060257a62da7ed02b342b426e18e5f02ecdbdc9..f7e4d14a7eaa3e35c9b03f3c6a01ae8712ded569 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 {
|
||||
@@ -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 e0f085169fafa5e574caf368efa343514540b348..042617c7de30707f66e60536cebc31e210647b64 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -60,7 +60,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() )
|
||||
@@ -71,7 +72,7 @@ public class PlayerDataStorage {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
- if (file.exists() && file.isFile()) {
|
||||
+ if (isNormalFile) { // Plazma - Avoid double I/O operation
|
||||
nbttagcompound = NbtIo.readCompressed(file.toPath(), NbtAccounter.unlimitedHeap());
|
||||
}
|
||||
// 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] Do not 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 fa64bf5ad13c278438039b663ea3134e72108411..3ec9cb7c98cd5d3cb26e4a27174a75fe243c81c0 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
|
||||
@@ -68,6 +68,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
|
||||
@Override
|
||||
public void unpackLootTable(@org.jetbrains.annotations.Nullable final Player player) {
|
||||
+ if (player == null && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.refreshLootTableForNonPlayerInteraction) return; // Plazma - Do not refresh LootTable for non player interaction
|
||||
// Copied from super with changes, always check the original method
|
||||
net.minecraft.world.level.Level level = this.getLevel();
|
||||
BlockPos blockPos = this.getBlockPos();
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index d922c572e2410fa1f719fe2371f65cd1542ca8b4..a060257a62da7ed02b342b426e18e5f02ecdbdc9 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -66,6 +66,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public boolean reduceRandom = OPTIMIZE;
|
||||
public boolean ignoreThreadSafeRandom = false;
|
||||
+ public boolean refreshLootTableForNonPlayerInteraction = !OPTIMIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: [PATCH] Ignore useless entity packets
|
||||
- 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 cf098d4a3111771c13766285c5ec5f1fc1f539a4..433e9a06db191f8a0ff6c23d1ac6122606e67959 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
|
||||
@@ -207,6 +207,8 @@ public class ServerEntity {
|
||||
@@ -214,6 +214,8 @@ public class ServerEntity {
|
||||
flag4 = true;
|
||||
flag5 = true;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ index cf098d4a3111771c13766285c5ec5f1fc1f539a4..433e9a06db191f8a0ff6c23d1ac61226
|
||||
}
|
||||
|
||||
if ((this.trackDelta || this.entity.hasImpulse || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) && this.tickCount > 0) {
|
||||
@@ -281,6 +283,19 @@ public class ServerEntity {
|
||||
@@ -297,6 +299,19 @@ public class ServerEntity {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index cf098d4a3111771c13766285c5ec5f1fc1f539a4..433e9a06db191f8a0ff6c23d1ac61226
|
||||
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 922d1d250f2e2e5a4177bcf5fe7487ff2b43413b..c8a3e91d0d6510b519e927027f5a534cddf7d0a3 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,24 +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 41ee792f572b13054084b9ad6c6e4cf67ed10290..0d83baabdfabff925c11d363a78414afebe513d3 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
|
||||
@@ -938,10 +938,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
}
|
||||
// Paper end - Allow nerfed mobs to jump and float
|
||||
//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.sensing.tick(); // Plazma - Moved down
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
int i = this.level().getServer().getTickCount() + this.getId();
|
||||
//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 c8a3e91d0d6510b519e927027f5a534cddf7d0a3..bc283729cab4df2c596febf1df54241571227564 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 {
|
||||
@@ -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 bc283729cab4df2c596febf1df54241571227564..1e7c23c8851ba1d0f37d2b17fd334220e060888e 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 {
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 27 Apr 2024 14:14:49 +0900
|
||||
Subject: [PATCH] Improve biome temperture 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 0c317b0147a73a8075e0883f0c132f4db0bdfea7..97c5cc3e2e6721321d9c500e331cab1aee37a0fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -64,7 +64,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(() -> Util.make(() -> {
|
||||
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> Util.make(() -> { // Plazma - Improve biome temperature cache
|
||||
/*
|
||||
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
|
||||
protected void rehash(int i) {
|
||||
@@ -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;
|
||||
@@ -17,10 +17,10 @@ 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 2630f54d499abbe52798f97c8ea14a8d0bd75e99..014ccbafd8beecb7f3bfeea0cdaa6627a81796bd 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
|
||||
@@ -115,6 +115,12 @@ public abstract class StateHolder<O, S> {
|
||||
@@ -114,6 +114,12 @@ public abstract class StateHolder<O, S> {
|
||||
}
|
||||
|
||||
public <T extends Comparable<T>, V extends T> S trySetValue(Property<T> property, V value) {
|
||||
@@ -33,7 +33,7 @@ index 2630f54d499abbe52798f97c8ea14a8d0bd75e99..014ccbafd8beecb7f3bfeea0cdaa6627
|
||||
Comparable<?> comparable = this.values.get(property);
|
||||
if (comparable != null && !comparable.equals(value)) {
|
||||
S object = this.neighbours.get(property, value);
|
||||
@@ -126,10 +132,11 @@ public abstract class StateHolder<O, S> {
|
||||
@@ -125,10 +131,11 @@ public abstract class StateHolder<O, S> {
|
||||
} else {
|
||||
return (S)this;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ index 2630f54d499abbe52798f97c8ea14a8d0bd75e99..014ccbafd8beecb7f3bfeea0cdaa6627
|
||||
throw new IllegalStateException();
|
||||
} else {
|
||||
Table<Property<?>, Comparable<?>, S> table = HashBasedTable.create();
|
||||
@@ -144,7 +151,7 @@ public abstract class StateHolder<O, S> {
|
||||
@@ -143,7 +150,7 @@ public abstract class StateHolder<O, S> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 433e9a06db191f8a0ff6c23d1ac6122606e67959..149ea6b62c88200ecfc50c825a1dcdffa56d9fcb 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
|
||||
@@ -404,7 +404,8 @@ public class ServerEntity {
|
||||
@@ -415,7 +415,8 @@ public class ServerEntity {
|
||||
}
|
||||
|
||||
if (this.entity instanceof LivingEntity) {
|
||||
@@ -18,7 +18,7 @@ index 433e9a06db191f8a0ff6c23d1ac6122606e67959..149ea6b62c88200ecfc50c825a1dcdff
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
// CraftBukkit start - Send scaled max health
|
||||
@@ -415,7 +416,7 @@ public class ServerEntity {
|
||||
@@ -426,7 +427,7 @@ public class ServerEntity {
|
||||
this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index 433e9a06db191f8a0ff6c23d1ac6122606e67959..149ea6b62c88200ecfc50c825a1dcdff
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
|
||||
index 1e7c23c8851ba1d0f37d2b17fd334220e060888e..29514dd01d46ba9f6b123bf3af56981541f670db 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,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 98c7f695093acbcf9382a5f07a7a89e373709763..a85b1ebb4236f131b9be0104c4aa56f22e661441 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 - Configurable cave lava sea level
|
||||
+ 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 - Configurable cave lava sea level
|
||||
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 f7e4d14a7eaa3e35c9b03f3c6a01ae8712ded569..4f3ed01e12ccb8a6f1a5c4f605451bb36370a236 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: {}, defaulting to lava", this.customSeaBlock);
|
||||
+ return net.minecraft.world.level.block.Blocks.LAVA;
|
||||
+ })
|
||||
+ .defaultBlockState();
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: [PATCH] Add entity spawn deadlock timer
|
||||
- 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 40c199812ecf7b16fe5a17c18cb0d6d3ce258910..f01390790cab0425e5d702d93b6755be41e94313 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
|
||||
@@ -48,6 +48,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 - Configurable mob spawner tick rate
|
||||
@@ -19,7 +19,7 @@ index 40c199812ecf7b16fe5a17c18cb0d6d3ce258910..f01390790cab0425e5d702d93b6755be
|
||||
|
||||
public BaseSpawner() {}
|
||||
|
||||
@@ -83,6 +85,17 @@ public abstract class BaseSpawner {
|
||||
@@ -85,6 +87,17 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
|
||||
public void serverTick(ServerLevel world, BlockPos pos) {
|
||||
@@ -37,30 +37,31 @@ index 40c199812ecf7b16fe5a17c18cb0d6d3ce258910..f01390790cab0425e5d702d93b6755be
|
||||
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
|
||||
// Paper start - Configurable mob spawner tick rate
|
||||
if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||
@@ -280,6 +293,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 - 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 - Add entity spawn deadlock timer
|
||||
|
||||
+
|
||||
this.displayEntity = null;
|
||||
}
|
||||
@@ -309,6 +328,8 @@ public abstract class BaseSpawner {
|
||||
|
||||
@@ -318,6 +338,8 @@ public abstract class BaseSpawner {
|
||||
}));
|
||||
}
|
||||
|
||||
+ 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).result().orElseThrow());
|
||||
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 29514dd01d46ba9f6b123bf3af56981541f670db..6a0cfec24618227d9a5ddc6c71e37d1986147799 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 {
|
||||
@@ -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..3bd989b2af76392a31d2aca23fdab20a79dc3933 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;
|
||||
@@ -5,10 +5,10 @@ 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 d6705dce3bc8c1964184fe425386b3f3c0a8202e..6ca6d44114bb2e18786b9fa3c0e2c78c1b07ea75 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
|
||||
@@ -2624,6 +2624,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2670,6 +2670,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void updateSwingTime() {
|
||||
152
patches/server/0031-Save-Json-list-asynchronously.patch
Normal file
152
patches/server/0031-Save-Json-list-asynchronously.patch
Normal file
@@ -0,0 +1,152 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 11 Jan 2024 13:40:41 +0900
|
||||
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 22c4f8dea99f92a1eb3da2baf0a15bf9d2ca0462..20c531f11b310dab0a867e589c769393ed835df5 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
@@ -58,21 +58,23 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
this.loadWhiteList();
|
||||
}
|
||||
|
||||
+ // Plazma start - Save JSON list asynchronously
|
||||
private void saveIpBanList() {
|
||||
- try {
|
||||
- this.getIpBans().save();
|
||||
- } catch (IOException var2) {
|
||||
- LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ this.getIpBans().save();
|
||||
}
|
||||
|
||||
private void saveUserBanList() {
|
||||
- try {
|
||||
- this.getBans().save();
|
||||
- } catch (IOException var2) {
|
||||
- LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ 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 c038da20b76c0b7b1c18471b20be01e849d29f3a..0735a0bd182635e1969d19336b46bc72b14e555f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -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 {
|
||||
- this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
- StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
|
||||
- }
|
||||
-
|
||||
+ this.save(); // Plazma - Save Json list asynchronously
|
||||
}
|
||||
|
||||
@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 {
|
||||
- this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
- StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
|
||||
- }
|
||||
-
|
||||
+ this.save(); // Plazma - Save Json list asynchronously
|
||||
}
|
||||
|
||||
public void remove(StoredUserEntry<K> entry) {
|
||||
@@ -102,7 +90,9 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
return this.map.values();
|
||||
}
|
||||
|
||||
- public void save() throws IOException {
|
||||
+ // 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
|
||||
@@ -114,27 +104,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
Objects.requireNonNull(jsonarray);
|
||||
stream.forEach(jsonarray::add);
|
||||
- BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8);
|
||||
|
||||
- try {
|
||||
+ try (BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
|
||||
StoredUserList.GSON.toJson(jsonarray, StoredUserList.GSON.newJsonWriter(bufferedwriter));
|
||||
- } catch (Throwable throwable) {
|
||||
- if (bufferedwriter != null) {
|
||||
- try {
|
||||
- bufferedwriter.close();
|
||||
- } catch (Throwable throwable1) {
|
||||
- throwable.addSuppressed(throwable1);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- throw throwable;
|
||||
- }
|
||||
-
|
||||
- if (bufferedwriter != null) {
|
||||
- bufferedwriter.close();
|
||||
+ } catch (IOException e) {
|
||||
+ StoredUserList.LOGGER.warn("Failed to asynchronously save file " + this.file, e);
|
||||
}
|
||||
|
||||
+ });
|
||||
}
|
||||
+ // 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,239 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 11 Jan 2024 13:40:41 +0900
|
||||
Subject: [PATCH] Save Json list asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
||||
index 554f4d4e63c1431721989e6f502a32ccc53a8807..b85bc5834d90f20d46f640621abec891456b47a0 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
||||
@@ -17,7 +17,7 @@ public final class ChunkList implements Iterable<LevelChunk> {
|
||||
this.chunkToIndex.defaultReturnValue(Integer.MIN_VALUE);
|
||||
}
|
||||
|
||||
- protected static final LevelChunk[] EMPTY_LIST = new LevelChunk[0];
|
||||
+ protected static final LevelChunk[] EMPTY_LIST = new LevelChunk[0]; // Plazma - Reduce allocations (mark)
|
||||
|
||||
protected LevelChunk[] chunks = EMPTY_LIST;
|
||||
protected int count;
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/DummyBukkitPluginLoader.java b/src/main/java/io/papermc/paper/plugin/manager/DummyBukkitPluginLoader.java
|
||||
index aef19b44075a3b2e8696315baa89117dd8ebb513..6370d3f4451de4ca12a8bcc2661e4b2b4833fc0e 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/DummyBukkitPluginLoader.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/DummyBukkitPluginLoader.java
|
||||
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
|
||||
@ApiStatus.Internal
|
||||
public class DummyBukkitPluginLoader implements PluginLoader {
|
||||
|
||||
- private static final Pattern[] PATTERNS = new Pattern[0];
|
||||
+ private static final Pattern[] PATTERNS = new Pattern[0]; // Plazma - Reduce allocations (mark)
|
||||
|
||||
@Override
|
||||
public @NotNull Plugin loadPlugin(@NotNull File file) throws InvalidPluginException, UnknownDependencyException {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
index 22c4f8dea99f92a1eb3da2baf0a15bf9d2ca0462..20c531f11b310dab0a867e589c769393ed835df5 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
@@ -58,21 +58,23 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
this.loadWhiteList();
|
||||
}
|
||||
|
||||
+ // Plazma start - Save JSON list asynchronously
|
||||
private void saveIpBanList() {
|
||||
- try {
|
||||
- this.getIpBans().save();
|
||||
- } catch (IOException var2) {
|
||||
- LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ this.getIpBans().save();
|
||||
}
|
||||
|
||||
private void saveUserBanList() {
|
||||
- try {
|
||||
- this.getBans().save();
|
||||
- } catch (IOException var2) {
|
||||
- LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ 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 1289e8e9c54a584f5037ea8e852df37376af093d..2014e0c4f412bead5881de588ec941a9a5ae3565 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -43,11 +43,11 @@ 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 - Save Json list asynchronously
|
||||
this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Save Json list asynchronously
|
||||
StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
@@ -63,11 +63,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
public void remove(K key) {
|
||||
this.map.remove(this.getKeyForUser(key));
|
||||
|
||||
- try {
|
||||
+ //try { // Plazma - Save Json list asynchronously
|
||||
this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Save Json list asynchronously
|
||||
StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
@@ -102,7 +102,10 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
return this.map.values();
|
||||
}
|
||||
|
||||
- public void save() throws IOException {
|
||||
+ // 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
|
||||
@@ -114,27 +117,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
Objects.requireNonNull(jsonarray);
|
||||
stream.forEach(jsonarray::add);
|
||||
- BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8);
|
||||
|
||||
- try {
|
||||
+ try (BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
|
||||
StoredUserList.GSON.toJson(jsonarray, bufferedwriter);
|
||||
- } catch (Throwable throwable) {
|
||||
- if (bufferedwriter != null) {
|
||||
- try {
|
||||
- bufferedwriter.close();
|
||||
- } catch (Throwable throwable1) {
|
||||
- throwable.addSuppressed(throwable1);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- throw throwable;
|
||||
- }
|
||||
-
|
||||
- if (bufferedwriter != null) {
|
||||
- bufferedwriter.close();
|
||||
+ } catch (IOException e) {
|
||||
+ StoredUserList.LOGGER.warn("Failed to asynchronously save file " + this.file, e);
|
||||
}
|
||||
|
||||
+ });
|
||||
}
|
||||
+ // Plazma end - Save Json list asynchronously
|
||||
|
||||
public void load() throws IOException {
|
||||
if (this.file.exists()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Endermite.java b/src/main/java/net/minecraft/world/entity/monster/Endermite.java
|
||||
index 965362c281315c15fb70a83a6949d7825bebf15b..e463df132c9b3cbb2217e7019b1bd9a0e0027c10 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Endermite.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Endermite.java
|
||||
@@ -94,7 +94,7 @@ public class Endermite extends Monster {
|
||||
this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
||||
this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 6b9cd8543a5bfc2b936ba18f66ffd60f2f792e43..d99c56194d1a16c34a62d8f2f01026974a242921 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -832,7 +832,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
|
||||
// Paper start - Perf: Optimize Hoppers
|
||||
static final AABB HOPPER_ITEM_SUCK_OVERALL = Hopper.SUCK.bounds();
|
||||
- static final AABB[] HOPPER_ITEM_SUCK_INDIVIDUAL = Hopper.SUCK.toAabbs().toArray(new AABB[0]);
|
||||
+ static final AABB[] HOPPER_ITEM_SUCK_INDIVIDUAL = Hopper.SUCK.toAabbs().toArray(new AABB[0]); // Plazma - Reduce allocations (mark)
|
||||
// Paper end - Perf: Optimize Hoppers
|
||||
|
||||
public static List<ItemEntity> getItemsAtAndAbove(Level world, Hopper hopper) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java b/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
|
||||
index 8a4f95049c63afb28bef6719c77b7a7092e75aae..e117350504e0c37b27f10ff102781ed78210cad2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
|
||||
@@ -50,7 +50,7 @@ public class Main {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
- URLClassLoader classLoader = new URLClassLoader(extractedUrls.toArray(new URL[0]));
|
||||
+ URLClassLoader classLoader = new URLClassLoader(extractedUrls.toArray(new URL[0])); // Plazma - Reduce allocations (mark)
|
||||
|
||||
System.out.println("Starting server");
|
||||
Thread runThread = new Thread(() -> {
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/commands/plazma/subcommand/VersionCommand.java b/src/main/java/org/plazmamc/plazma/commands/plazma/subcommand/VersionCommand.java
|
||||
index b6664ba0fce55f5cfa0c8d3051dc8c2be0fd0703..ccb5008987dff2365fe58eddc86227e4515cbbfc 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/commands/plazma/subcommand/VersionCommand.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/commands/plazma/subcommand/VersionCommand.java
|
||||
@@ -7,6 +7,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
import org.plazmamc.plazma.commands.PlazmaSubCommand;
|
||||
+import org.plazmamc.plazma.constants.Empty;
|
||||
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public class VersionCommand implements PlazmaSubCommand {
|
||||
@@ -14,7 +15,7 @@ public class VersionCommand implements PlazmaSubCommand {
|
||||
@Override
|
||||
public boolean execute(final CommandSender sender, final String subCommand, final String[] args) {
|
||||
final @Nullable Command ver = MinecraftServer.getServer().server.getCommandMap().getCommand("version");
|
||||
- if (ver != null) return ver.execute(sender, "plazma", new String[0]);
|
||||
+ if (ver != null) return ver.execute(sender, "plazma", Empty.STRING);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
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 77c1bcde8cc5c2f51418a6f385ce84f202a13787..8ac2f6749f3bd85b73ac543bc9040aacb6032623 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
|
||||
@@ -170,11 +170,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
|
||||
@@ -17,16 +33,16 @@ index 77c1bcde8cc5c2f51418a6f385ce84f202a13787..8ac2f6749f3bd85b73ac543bc9040aac
|
||||
protected void customServerAiStep() {
|
||||
//this.level().getProfiler().push("camelBrain"); // Purpur
|
||||
Brain<Camel> behaviorcontroller = (Brain<Camel>) this.getBrain(); // CraftBukkit - decompile error
|
||||
-
|
||||
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations
|
||||
behaviorcontroller.tick((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 24e351b40745d15e065f4c3cd904596c6daf4cfb..aa60c4a251de2877a9b4ea72899f07194ce15ed7 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);
|
||||
}
|
||||
|
||||
@@ -39,10 +55,10 @@ index 24e351b40745d15e065f4c3cd904596c6daf4cfb..aa60c4a251de2877a9b4ea72899f0719
|
||||
//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 1f476a4fd148ac9a4c9ad5d12de46a16e4116239..707fd662c7f17986fffcabe774de176741456227 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
|
||||
@@ -320,7 +320,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
|
||||
@@ -1,191 +0,0 @@
|
||||
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/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 14d15dd0d4973957871f5c06042fcaa4ea8b7a8a..2a45bebb2b83efd4ffcecad6c0a979198ab985c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -134,6 +134,7 @@ public abstract class PlayerList {
|
||||
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 org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[] EMPTY_FLAG = new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]; // Plazma - Reduce allocations
|
||||
+ 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();
|
||||
@@ -287,6 +288,8 @@ public abstract class PlayerList {
|
||||
// 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(nbttagcompound);
|
||||
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData);
|
||||
GameRules gamerules = worldserver1.getGameRules();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhase.java
|
||||
index 48826eb0a960f7af6dd2ef184a8aed744a1d8f83..c6df4262d660a1043705c3a4041f959490fae79e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhase.java
|
||||
@@ -5,7 +5,7 @@ import java.util.Arrays;
|
||||
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
|
||||
|
||||
public class EnderDragonPhase<T extends DragonPhaseInstance> {
|
||||
- private static EnderDragonPhase<?>[] phases = new EnderDragonPhase[0];
|
||||
+ private static EnderDragonPhase<?>[] phases = new EnderDragonPhase[0]; // Plazma - Reduce allocations (mark)
|
||||
public static final EnderDragonPhase<DragonHoldingPatternPhase> HOLDING_PATTERN = create(DragonHoldingPatternPhase.class, "HoldingPattern");
|
||||
public static final EnderDragonPhase<DragonStrafePlayerPhase> STRAFE_PLAYER = create(DragonStrafePlayerPhase.class, "StrafePlayer");
|
||||
public static final EnderDragonPhase<DragonLandingApproachPhase> LANDING_APPROACH = create(DragonLandingApproachPhase.class, "LandingApproach");
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
index d8fe760bb74c8ea0d6fb8321d2c8a49d838c5362..6e910d74bac39735020d553cf31eb65b750163e0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
@@ -85,7 +85,7 @@ public record ShapedRecipePattern(int width, int height, NonNullList<Ingredient>
|
||||
}
|
||||
|
||||
if (pattern.size() == l) {
|
||||
- return new String[0];
|
||||
+ return org.plazmamc.plazma.constants.Empty.STRING; // Plazma - Reduce allocations
|
||||
} else {
|
||||
String[] strings = new String[pattern.size() - l - k];
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 4f3ed01e12ccb8a6f1a5c4f605451bb36370a236..98f26e3de66a881163e84295e9156c7f362bf7cb 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
@@ -29,6 +29,16 @@ 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 claimSecureChatEnforced = 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..67f21c23e80881f52e7b92f22c6cbbe3a0bd55b5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java
|
||||
@@ -0,0 +1,96 @@
|
||||
+package ru.bk.oharass.freedomchat;
|
||||
+
|
||||
+import com.google.gson.JsonObject;
|
||||
+import com.mojang.logging.LogUtils;
|
||||
+import com.mojang.serialization.JsonOps;
|
||||
+import io.netty.buffer.ByteBuf;
|
||||
+import io.netty.channel.ChannelHandler;
|
||||
+import io.netty.channel.ChannelHandlerContext;
|
||||
+import io.netty.handler.codec.EncoderException;
|
||||
+import io.netty.handler.codec.MessageToByteEncoder;
|
||||
+import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
+import net.minecraft.network.Connection;
|
||||
+import net.minecraft.network.FriendlyByteBuf;
|
||||
+import net.minecraft.network.chat.ChatType;
|
||||
+import net.minecraft.network.chat.Component;
|
||||
+import net.minecraft.network.protocol.Packet;
|
||||
+import net.minecraft.network.protocol.game.ClientboundPlayerChatPacket;
|
||||
+import net.minecraft.network.protocol.game.ClientboundServerDataPacket;
|
||||
+import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
|
||||
+import net.minecraft.network.protocol.status.ClientboundStatusResponsePacket;
|
||||
+import net.minecraft.network.protocol.status.ServerStatus;
|
||||
+import org.slf4j.Logger;
|
||||
+
|
||||
+import java.util.Optional;
|
||||
+
|
||||
+import static org.plazmamc.plazma.configurations.GlobalConfiguration.get;
|
||||
+import static net.minecraft.server.MinecraftServer.getServer;
|
||||
+
|
||||
+@ChannelHandler.Sharable
|
||||
+public class FreedomChat extends MessageToByteEncoder<Packet<?>> {
|
||||
+
|
||||
+ private static final Logger LOGGER = LogUtils.getLogger();
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean acceptOutboundMessage(final Object msg) {
|
||||
+ return get().player.freedomChat.rewriteChat && msg instanceof ClientboundPlayerChatPacket
|
||||
+ || get().player.freedomChat.claimSecureChatEnforced && msg instanceof ClientboundServerDataPacket
|
||||
+ || 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);
|
||||
+
|
||||
+ // TODO: JDK 21 - Change to pattern matching
|
||||
+ if (packet instanceof ClientboundPlayerChatPacket chat)
|
||||
+ encodeChat(context, chat, buf);
|
||||
+ else if (packet instanceof ClientboundServerDataPacket data)
|
||||
+ encodeData(context, data, buf);
|
||||
+ else if (packet instanceof ClientboundStatusResponsePacket query)
|
||||
+ encodeQuery(context, query, buf);
|
||||
+ }
|
||||
+
|
||||
+ private static void encodeChat(
|
||||
+ final ChannelHandlerContext context, final ClientboundPlayerChatPacket packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ final Optional<ChatType.Bound> bound = packet.chatType().resolve(getServer().registryAccess());
|
||||
+ if (bound.isEmpty()) {
|
||||
+ LOGGER.warn("Failed to resolve chat type: {}", packet.chatType().chatType(), new Throwable());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final ClientboundSystemChatPacket after = new ClientboundSystemChatPacket( bound.orElseThrow().decorate(
|
||||
+ Optional.ofNullable( packet.unsignedContent() ).orElse( Component.literal(packet.body().content()) )
|
||||
+ ), false );
|
||||
+ write(context, after, byteBuf);
|
||||
+ after.write(byteBuf);
|
||||
+ }
|
||||
+
|
||||
+ private static void encodeData(
|
||||
+ final ChannelHandlerContext context, final ClientboundServerDataPacket packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ write(context, packet, byteBuf);
|
||||
+ byteBuf.writeComponent(packet.getMotd());
|
||||
+ byteBuf.writeOptional(packet.getIconBytes(), FriendlyByteBuf::writeByteArray);
|
||||
+ byteBuf.writeBoolean(true);
|
||||
+ }
|
||||
+
|
||||
+ private static void encodeQuery(
|
||||
+ final ChannelHandlerContext context, final ClientboundStatusResponsePacket packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ final JsonObject status = ServerStatus.CODEC.encodeStart(JsonOps.INSTANCE, packet.status()).get().left()
|
||||
+ .orElseThrow(() -> new EncoderException("Failed to encode server status query response")).getAsJsonObject();
|
||||
+
|
||||
+ status.addProperty("preventsChatReports", true);
|
||||
+ write(context, packet, byteBuf);
|
||||
+ byteBuf.writeUtf(GsonComponentSerializer.gson().serializer().toJson(status));
|
||||
+ }
|
||||
+
|
||||
+ private static void write(
|
||||
+ final ChannelHandlerContext context, final Packet<?> packet, final FriendlyByteBuf byteBuf
|
||||
+ ) {
|
||||
+ byteBuf.writeVarInt(context.channel().attr(Connection.ATTRIBUTE_CLIENTBOUND_PROTOCOL).get().packetId(packet));
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
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;
|
||||
@@ -1,937 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 27 Apr 2024 14:01:42 +0900
|
||||
Subject: [PATCH] Completely remove Timings
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
index 36b8fe86335df851f9c85d6bb2a91368b4d945d1..acf3df70e17aa8b2b155c83a56226fcc69c2f367 100644
|
||||
--- a/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
@@ -1,12 +1,14 @@
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import static co.aikar.timings.TimingsManager.*;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
-public class FullServerTickHandler extends TimingHandler {
|
||||
+interface FullServerTickHandler { /* extends TimingHandler { // Plazma - Remove timings
|
||||
private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null);
|
||||
final TimingData minuteData;
|
||||
double avgFreeMemory = -1D;
|
||||
@@ -83,4 +85,5 @@ public class FullServerTickHandler extends TimingHandler {
|
||||
boolean isViolated() {
|
||||
return record.getCurTickTotal() > 50000000;
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
index 81671cf40feeed2844ee8d92348d48062aaf2c46..ac3b2d321b43ed73bfe8c30742e3574e3603d1ae 100644
|
||||
--- a/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
@@ -23,11 +23,13 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
-public final class NullTimingHandler implements Timing {
|
||||
+interface NullTimingHandler { /* implements Timing { // Plazma - Remove timings
|
||||
public static final Timing NULL = new NullTimingHandler();
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -66,4 +68,5 @@ public final class NullTimingHandler implements Timing {
|
||||
public void close() {
|
||||
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
index 6fbc64e0f214d0c8e5afcbe385e414a4e1fe1c72..ed9580da2bfa1e3423bd63962008c00f29f6ff98 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.EventException;
|
||||
@@ -33,21 +34,14 @@ import org.bukkit.plugin.Plugin;
|
||||
import java.lang.reflect.Method;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
-public class TimedEventExecutor implements EventExecutor {
|
||||
+interface TimedEventExecutor { /* implements EventExecutor { // Plazma - Remove timings
|
||||
|
||||
private final EventExecutor executor;
|
||||
private final Timing timings;
|
||||
|
||||
- /**
|
||||
- * Wraps an event executor and associates a timing handler to it.
|
||||
- *
|
||||
- * @param executor Executor to wrap
|
||||
- * @param plugin Owning plugin
|
||||
- * @param method EventHandler method
|
||||
- * @param eventClass Owning class
|
||||
- */
|
||||
public TimedEventExecutor(@NotNull EventExecutor executor, @NotNull Plugin plugin, @Nullable Method method, @NotNull Class<? extends Event> eventClass) {
|
||||
this.executor = executor;
|
||||
String id;
|
||||
@@ -87,4 +81,5 @@ public class TimedEventExecutor implements EventExecutor {
|
||||
public String toString() {
|
||||
return "TimedEventExecutor['" + this.executor.toString() + "']";
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
index 1d866e980abc542bdfee1ce082cd9cdd7761e9f7..409d698de83fb72569813d15d4fb5afbaecda68b 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timing.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||
@@ -23,8 +23,10 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* Provides an ability to time sections of code within the Minecraft Server
|
||||
@@ -32,61 +34,30 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @deprecated Timings will likely be replaced with Spark in the future
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
-public interface Timing extends AutoCloseable {
|
||||
- /**
|
||||
- * Starts timing the execution until {@link #stopTiming()} is called.
|
||||
- *
|
||||
- * @return Timing
|
||||
- */
|
||||
+interface Timing { /* extends AutoCloseable { // Plazma - Remove timings
|
||||
@NotNull
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
Timing startTiming();
|
||||
|
||||
- /**
|
||||
- * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||
- *
|
||||
- * Will automatically be called when this Timing is used with try-with-resources
|
||||
- */
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
void stopTiming();
|
||||
|
||||
- /**
|
||||
- * Starts timing the execution until {@link #stopTiming()} is called.
|
||||
- *
|
||||
- * But only if we are on the primary thread.
|
||||
- *
|
||||
- * @return Timing
|
||||
- */
|
||||
@NotNull
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
Timing startTimingIfSync();
|
||||
|
||||
- /**
|
||||
- * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||
- *
|
||||
- * <p>Will automatically be called when this Timing is used with try-with-resources</p>
|
||||
- *
|
||||
- * But only if we are on the primary thread.
|
||||
- */
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
void stopTimingIfSync();
|
||||
|
||||
- /**
|
||||
- * @deprecated Doesn't do anything - Removed
|
||||
- */
|
||||
@Deprecated
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
void abort();
|
||||
|
||||
- /**
|
||||
- * Used internally to get the actual backing Handler in the case of delegated Handlers
|
||||
- *
|
||||
- * @return TimingHandler
|
||||
- */
|
||||
@Nullable
|
||||
TimingHandler getTimingHandler();
|
||||
|
||||
@Override
|
||||
@io.papermc.paper.annotation.DoNotUse // Purpur
|
||||
void close();
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
|
||||
index a5d13a1e44edb861f45c83a9b4309fbf799d407d..51449d3bbf204f7fee4730af80121bdc1e2c467d 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingData.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingData.java
|
||||
@@ -23,17 +23,19 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static co.aikar.util.JSONUtil.toArray;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* <p>Lightweight object for tracking timing data</p>
|
||||
*
|
||||
* This is broken out to reduce memory usage
|
||||
*/
|
||||
-class TimingData {
|
||||
+interface TimingData { /* // Plazma - Remove timings
|
||||
private final int id;
|
||||
private int count = 0;
|
||||
private int lagCount = 0;
|
||||
@@ -119,4 +121,5 @@ class TimingData {
|
||||
void setCurTickTotal(long curTickTotal) {
|
||||
this.curTickTotal = curTickTotal;
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..2a070b9882462226be4547da9a47907df2f64b9d 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import co.aikar.util.LoadingIntMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
@@ -35,8 +36,9 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
-class TimingHandler implements Timing {
|
||||
+interface TimingHandler { /* implements Timing { // Plazma - Remove timings
|
||||
|
||||
private static AtomicInteger idPool = new AtomicInteger(1);
|
||||
private static Deque<TimingHandler> TIMING_STACK = new ArrayDeque<>();
|
||||
@@ -163,9 +165,6 @@ class TimingHandler implements Timing {
|
||||
}
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Reset this timer, setting all values to zero.
|
||||
- */
|
||||
void reset(boolean full) {
|
||||
record.reset();
|
||||
if (full) {
|
||||
@@ -194,9 +193,6 @@ class TimingHandler implements Timing {
|
||||
return id;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * This is simply for the Closeable interface so it can be used with try-with-resources ()
|
||||
- */
|
||||
@Override
|
||||
public void close() {
|
||||
stopTimingIfSync();
|
||||
@@ -223,4 +219,5 @@ class TimingHandler implements Timing {
|
||||
}
|
||||
return clonedChildren;
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
index 02e88db63be2d5e31da6b65157ba7b971b1f10f3..bda95eeacd244892ea3a114bfdcb8b24dfdfccfa 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import co.aikar.timings.TimingHistory.RegionData.RegionId;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -49,10 +50,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
import static co.aikar.timings.TimingsManager.FULL_SERVER_TICK;
|
||||
import static co.aikar.timings.TimingsManager.MINUTE_REPORTS;
|
||||
import static co.aikar.util.JSONUtil.*;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"})
|
||||
-public class TimingHistory {
|
||||
+interface TimingHistory { /*
|
||||
public static long lastMinuteTime;
|
||||
public static long timedTicks;
|
||||
public static long playerTicks;
|
||||
@@ -352,4 +354,5 @@ public class TimingHistory {
|
||||
return count;
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
|
||||
index 86d5ac6bd0d7d0003688761aceb3f3343575319f..c862c14eb99ac9c55cfb367cf3d8c2db59f8a50e 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingHistoryEntry.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
|
||||
@@ -23,14 +23,16 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import com.google.common.base.Function;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static co.aikar.util.JSONUtil.toArrayMapper;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
-class TimingHistoryEntry {
|
||||
+interface TimingHistoryEntry { /* // Plazma - Remove timings
|
||||
final TimingData data;
|
||||
private final TimingData[] children;
|
||||
|
||||
@@ -55,4 +57,5 @@ class TimingHistoryEntry {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||
index df142a89b8c43acb81eb383eac0ef048a1f49a6e..b273b4bc96cc756fa246b8b4c8efa1cac23cd957 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import co.aikar.util.LoadingMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -34,16 +35,14 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* <p>Used as a basis for fast HashMap key comparisons for the Timing Map.</p>
|
||||
*
|
||||
* This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings
|
||||
*/
|
||||
-final class TimingIdentifier {
|
||||
- /**
|
||||
- * Holds all groups. Autoloads on request for a group by name.
|
||||
- */
|
||||
+interface TimingIdentifier { /* // Plazma - Remove timings
|
||||
static final Map<String, TimingGroup> GROUP_MAP = LoadingMap.of(new ConcurrentHashMap<>(64, .5F), TimingGroup::new);
|
||||
private static final TimingGroup DEFAULT_GROUP = getGroup("Minecraft");
|
||||
final String group;
|
||||
@@ -113,4 +112,5 @@ final class TimingIdentifier {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
index 752d54830aa8baa1450bf72da03ae55ed30293c2..d2bab3cc02f7dfef2852cd705870351c81376061 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timings.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.EvictingQueue;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -39,13 +40,14 @@ import java.util.Queue;
|
||||
import java.util.logging.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* @deprecated Timings will likely be replaced with Spark in the future
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"})
|
||||
-public final class Timings {
|
||||
+interface Timings { /* // Plazma - Remove timings
|
||||
|
||||
final static List<CommandSender> requestingReport = Lists.newArrayList();
|
||||
private static final int MAX_HISTORY_FRAMES = 12;
|
||||
@@ -58,13 +60,6 @@ public final class Timings {
|
||||
|
||||
private Timings() {}
|
||||
|
||||
- /**
|
||||
- * Returns a Timing for a plugin corresponding to a name.
|
||||
- *
|
||||
- * @param plugin Plugin to own the Timing
|
||||
- * @param name Name of Timing
|
||||
- * @return Handler
|
||||
- */
|
||||
@NotNull
|
||||
public static Timing of(@NotNull Plugin plugin, @NotNull String name) {
|
||||
Timing pluginHandler = null;
|
||||
@@ -74,18 +69,6 @@ public final class Timings {
|
||||
return of(plugin, name, pluginHandler);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Returns a handler that has a groupHandler timer handler. Parent timers should not have their
|
||||
- * start/stop methods called directly, as the children will call it for you.</p>
|
||||
- *
|
||||
- * Parent Timers are used to group multiple subsections together and get a summary of them combined
|
||||
- * Parent Handler can not be changed after first call
|
||||
- *
|
||||
- * @param plugin Plugin to own the Timing
|
||||
- * @param name Name of Timing
|
||||
- * @param groupHandler Parent handler to mirror .start/stop calls to
|
||||
- * @return Timing Handler
|
||||
- */
|
||||
@NotNull
|
||||
public static Timing of(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
Preconditions.checkNotNull(plugin, "Plugin can not be null");
|
||||
@@ -93,34 +76,11 @@ public final class Timings {
|
||||
return TimingsManager.getHandler(plugin.getName(), name, groupHandler);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Returns a Timing object after starting it, useful for Java7 try-with-resources.
|
||||
- *
|
||||
- * try (Timing ignored = Timings.ofStart(plugin, someName)) {
|
||||
- * // timed section
|
||||
- * }
|
||||
- *
|
||||
- * @param plugin Plugin to own the Timing
|
||||
- * @param name Name of Timing
|
||||
- * @return Timing Handler
|
||||
- */
|
||||
@NotNull
|
||||
public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name) {
|
||||
return ofStart(plugin, name, null);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Returns a Timing object after starting it, useful for Java7 try-with-resources.
|
||||
- *
|
||||
- * try (Timing ignored = Timings.ofStart(plugin, someName, groupHandler)) {
|
||||
- * // timed section
|
||||
- * }
|
||||
- *
|
||||
- * @param plugin Plugin to own the Timing
|
||||
- * @param name Name of Timing
|
||||
- * @param groupHandler Parent handler to mirror .start/stop calls to
|
||||
- * @return Timing Handler
|
||||
- */
|
||||
@NotNull
|
||||
public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
Timing timing = of(plugin, name, groupHandler);
|
||||
@@ -128,22 +88,10 @@ public final class Timings {
|
||||
return timing;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Gets whether or not the Spigot Timings system is enabled
|
||||
- *
|
||||
- * @return Enabled or not
|
||||
- */
|
||||
public static boolean isTimingsEnabled() {
|
||||
return timingsEnabled;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Sets whether or not the Spigot Timings system should be enabled</p>
|
||||
- *
|
||||
- * Calling this will reset timing data.
|
||||
- *
|
||||
- * @param enabled Should timings be reported
|
||||
- */
|
||||
public static void setTimingsEnabled(boolean enabled) {
|
||||
// Purpur start - we don't do that here...
|
||||
timingsEnabled = false;
|
||||
@@ -182,51 +130,19 @@ public final class Timings {
|
||||
.build();
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Sets whether or not the Timings should monitor at Verbose level.</p>
|
||||
- *
|
||||
- * <p>When Verbose is disabled, high-frequency timings will not be available.</p>
|
||||
- *
|
||||
- * @return Enabled or not
|
||||
- */
|
||||
public static boolean isVerboseTimingsEnabled() {
|
||||
return verboseEnabled;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Sets whether or not the Timings should monitor at Verbose level.</p>
|
||||
- *
|
||||
- * When Verbose is disabled, high-frequency timings will not be available.
|
||||
- * Calling this will reset timing data.
|
||||
- *
|
||||
- * @param enabled Should high-frequency timings be reported
|
||||
- */
|
||||
public static void setVerboseTimingsEnabled(boolean enabled) {
|
||||
verboseEnabled = enabled;
|
||||
TimingsManager.needsRecheckEnabled = true;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Gets the interval between Timing History report generation.</p>
|
||||
- *
|
||||
- * Defaults to 5 minutes (6000 ticks)
|
||||
- *
|
||||
- * @return Interval in ticks
|
||||
- */
|
||||
public static int getHistoryInterval() {
|
||||
return historyInterval;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * <p>Sets the interval between Timing History report generations.</p>
|
||||
- *
|
||||
- * <p>Defaults to 5 minutes (6000 ticks)</p>
|
||||
- *
|
||||
- * This will recheck your history length, so lowering this value will lower your
|
||||
- * history length if you need more than 60 history windows.
|
||||
- *
|
||||
- * @param interval Interval in ticks
|
||||
- */
|
||||
public static void setHistoryInterval(int interval) {
|
||||
historyInterval = Math.max(20*60, interval);
|
||||
// Recheck the history length with the new Interval
|
||||
@@ -235,28 +151,10 @@ public final class Timings {
|
||||
}
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Gets how long in ticks Timings history is kept for the server.
|
||||
- *
|
||||
- * Defaults to 1 hour (72000 ticks)
|
||||
- *
|
||||
- * @return Duration in Ticks
|
||||
- */
|
||||
public static int getHistoryLength() {
|
||||
return historyLength;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Sets how long Timing History reports are kept for the server.
|
||||
- *
|
||||
- * Defaults to 1 hours(72000 ticks)
|
||||
- *
|
||||
- * This value is capped at a maximum of getHistoryInterval() * MAX_HISTORY_FRAMES (12)
|
||||
- *
|
||||
- * Will not reset Timing Data but may truncate old history if the new length is less than old length.
|
||||
- *
|
||||
- * @param length Duration in ticks
|
||||
- */
|
||||
public static void setHistoryLength(int length) {
|
||||
// Cap at 12 History Frames, 1 hour at 5 minute frames.
|
||||
int maxLength = historyInterval * MAX_HISTORY_FRAMES;
|
||||
@@ -276,19 +174,10 @@ public final class Timings {
|
||||
TimingsManager.HISTORY.addAll(oldQueue);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Resets all Timing Data
|
||||
- */
|
||||
public static void reset() {
|
||||
TimingsManager.reset();
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Generates a report and sends it to the specified command sender.
|
||||
- *
|
||||
- * If sender is null, ConsoleCommandSender will be used.
|
||||
- * @param sender The sender to send to, or null to use the ConsoleCommandSender
|
||||
- */
|
||||
public static void generateReport(@Nullable CommandSender sender) {
|
||||
if (sender == null) {
|
||||
sender = Bukkit.getConsoleSender();
|
||||
@@ -296,22 +185,11 @@ public final class Timings {
|
||||
requestingReport.add(sender);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Generates a report and sends it to the specified listener.
|
||||
- * Use with {@link org.bukkit.command.BufferedCommandSender} to get full response when done!
|
||||
- * @param sender The listener to send responses too.
|
||||
- */
|
||||
public static void generateReport(@NotNull TimingsReportListener sender) {
|
||||
Preconditions.checkNotNull(sender);
|
||||
requestingReport.add(sender);
|
||||
}
|
||||
|
||||
- /*
|
||||
- =================
|
||||
- Protected API: These are for internal use only in Bukkit/CraftBukkit
|
||||
- These do not have isPrimaryThread() checks in the startTiming/stopTiming
|
||||
- =================
|
||||
- */
|
||||
@NotNull
|
||||
static TimingHandler ofSafe(@NotNull String name) {
|
||||
return ofSafe(null, name, null);
|
||||
@@ -335,5 +213,6 @@ public final class Timings {
|
||||
static TimingHandler ofSafe(@Nullable String groupName, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
return TimingsManager.getHandler(groupName, name, groupHandler);
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
index 1abfcee0f6d632f4cd8d74b4994a90c9ea9d254c..18ddc321c4a23689d93c4340e0010dc67e84f138 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
@@ -61,6 +61,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
sender.sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>"));
|
||||
return true;
|
||||
}
|
||||
+ /* // Plazma - Remove timings
|
||||
if (args.length < 1) {
|
||||
sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
|
||||
return true;
|
||||
@@ -109,6 +110,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
} else {
|
||||
sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
index 5e1558ca3ffeeaf2645fa003965474a442d650bf..f6aa204db5ef216e1eb06be5e5e307067cfcf05c 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import co.aikar.util.LoadingMap;
|
||||
import com.google.common.collect.EvictingQueue;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -38,12 +39,13 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* @deprecated Timings will likely be replaced with Spark in the future
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
-public final class TimingsManager {
|
||||
+interface TimingsManager { /* // Plazma - Remove timings
|
||||
static final Map<TimingIdentifier, TimingHandler> TIMING_MAP = LoadingMap.of(
|
||||
new ConcurrentHashMap<>(4096, .5F), TimingHandler::new
|
||||
);
|
||||
@@ -65,17 +67,10 @@ public final class TimingsManager {
|
||||
|
||||
private TimingsManager() {}
|
||||
|
||||
- /**
|
||||
- * Resets all timing data on the next tick
|
||||
- */
|
||||
static void reset() {
|
||||
needsFullReset = true;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Ticked every tick by CraftBukkit to count the number of times a timer
|
||||
- * caused TPS loss.
|
||||
- */
|
||||
static void tick() {
|
||||
if (Timings.timingsEnabled) {
|
||||
boolean violated = FULL_SERVER_TICK.isViolated();
|
||||
@@ -139,16 +134,6 @@ public final class TimingsManager {
|
||||
return TIMING_MAP.get(new TimingIdentifier(group, name, parent));
|
||||
}
|
||||
|
||||
-
|
||||
- /**
|
||||
- * <p>Due to access restrictions, we need a helper method to get a Command TimingHandler with String group</p>
|
||||
- *
|
||||
- * Plugins should never call this
|
||||
- *
|
||||
- * @param pluginName Plugin this command is associated with
|
||||
- * @param command Command to get timings for
|
||||
- * @return TimingHandler
|
||||
- */
|
||||
@NotNull
|
||||
public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) {
|
||||
Plugin plugin = null;
|
||||
@@ -170,13 +155,6 @@ public final class TimingsManager {
|
||||
return Timings.ofSafe(plugin, "Command: " + pluginName + ":" + command.getTimingName());
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Looks up the class loader for the specified class, and if it is a PluginClassLoader, return the
|
||||
- * Plugin that created this class.
|
||||
- *
|
||||
- * @param clazz Class to check
|
||||
- * @return Plugin if created by a plugin
|
||||
- */
|
||||
@Nullable
|
||||
public static Plugin getPluginByClassloader(@Nullable Class<?> clazz) {
|
||||
if (clazz == null) {
|
||||
@@ -189,4 +167,5 @@ public final class TimingsManager {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
index 3af5b8ea795311582044c712de50d29412024b77..d5b52c8bf0bd23d9e3c0ba708c758694771a07ac 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -11,10 +12,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
-public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender {
|
||||
+interface TimingsReportListener { /* implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender { // Plazma - Remove timings
|
||||
private final List<CommandSender> senders;
|
||||
private final Runnable onDone;
|
||||
private String timingsURL;
|
||||
@@ -84,4 +86,5 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
|
||||
this.senders.add(Bukkit.getConsoleSender());
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
|
||||
index 632c4961515f5052551f841cfa840e60bba7a257..0656b8e86eaee12161a8bb16d1b46301fd5cea13 100644
|
||||
--- a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
|
||||
@@ -23,10 +23,12 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
-class UnsafeTimingHandler extends TimingHandler {
|
||||
+interface UnsafeTimingHandler { /* extends TimingHandler { // Plazma - Remove timings
|
||||
|
||||
UnsafeTimingHandler(@NotNull TimingIdentifier id) {
|
||||
super(id);
|
||||
@@ -50,4 +52,5 @@ class UnsafeTimingHandler extends TimingHandler {
|
||||
checkThread();
|
||||
super.stopTiming();
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index b791358f90fe92bc2264d9a26492245763813af3..8c10f2dc17cfede217f3a1b615777ea4dd308f76 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -33,7 +33,7 @@ public abstract class Command {
|
||||
protected String usageMessage;
|
||||
private String permission;
|
||||
private net.kyori.adventure.text.Component permissionMessage; // Paper
|
||||
- public co.aikar.timings.Timing timings; // Paper
|
||||
+ // public co.aikar.timings.Timing timings; // Paper // Plazma - Remove timings
|
||||
@NotNull public String getTimingName() {return getName();} // Paper
|
||||
|
||||
protected Command(@NotNull String name) {
|
||||
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
index 9d4f553c04784cca63901a56a7aea62a5cae1d72..321082710aa84627405d4f1453246b6a729659cc 100644
|
||||
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
@@ -12,7 +12,7 @@ public class FormattedCommandAlias extends Command {
|
||||
|
||||
public FormattedCommandAlias(@NotNull String alias, @NotNull String[] formatStrings) {
|
||||
super(alias);
|
||||
- timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot
|
||||
+ //timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot // Plazma - Remove timings
|
||||
this.formatStrings = formatStrings;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 5349f16136d9348c374a7dfe5b89a71dfcb0e66d..c0c2f7671122f767af3a94a3aadefdfa4b492f3a 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -34,7 +34,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
register("bukkit", new ReloadCommand("reload"));
|
||||
//register("bukkit", new PluginsCommand("plugins")); // Paper
|
||||
- register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper
|
||||
+ //register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper // Plazma - Remove timings
|
||||
}
|
||||
|
||||
public void setFallbackCommands() {
|
||||
@@ -66,7 +66,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
@Override
|
||||
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
|
||||
- command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
|
||||
+ // command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper // Plazma - Remove timings
|
||||
label = label.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
boolean registered = register(label, command, false, fallbackPrefix);
|
||||
@@ -156,11 +156,13 @@ public class SimpleCommandMap implements CommandMap {
|
||||
parsedArgs = event.getArgs();
|
||||
// Purpur end
|
||||
|
||||
+ /* // Plazma - Remove timings
|
||||
// Paper start - Plugins do weird things to workaround normal registration
|
||||
if (target.timings == null) {
|
||||
target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
|
||||
}
|
||||
// Paper end
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
try {
|
||||
//try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 899d67fa782fac639fe7fb096e05c551d75bd647..1d9906c508ca916297b8e121f8826532b66f83e2 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -707,6 +707,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Preconditions.checkArgument(plugin != null, "Plugin cannot be null");
|
||||
if (true) {this.paperPluginManager.registerEvent(event, listener, priority, executor, plugin, ignoreCancelled); return;} // Paper
|
||||
|
||||
+ /* // Plazma - Remove timings
|
||||
if (!plugin.isEnabled()) {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
}
|
||||
@@ -717,6 +718,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
} else {
|
||||
getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
}
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -946,8 +948,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public boolean useTimings() {
|
||||
- if (true) {return this.paperPluginManager.useTimings();} // Paper
|
||||
- return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot
|
||||
+ return false;
|
||||
+ // if (true) {return this.paperPluginManager.useTimings();} // Paper // Plazma - Remove timings
|
||||
+ // return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot // Plazma - Remove timings
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -956,7 +959,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param use True if per event timing code should be used
|
||||
*/
|
||||
public void useTimings(boolean use) {
|
||||
- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
|
||||
+ // co.aikar.timings.Timings.setTimingsEnabled(use); // Paper // Plazma - Remove timings
|
||||
}
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 0c6ca7588fb3d6b6497ddf032fe75e5c6c9719e5..e5d4ac1b8b4ca3846e2a9ea63f6b6eb05f7b70bd 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -43,7 +43,7 @@ import org.bukkit.plugin.TimedRegisteredListener;
|
||||
import org.bukkit.plugin.UnknownDependencyException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
-import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
+// import org.spigotmc.CustomTimingsHandler; // Spigot // Plazma - Remove timings
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
|
||||
/**
|
||||
@@ -294,7 +294,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
}
|
||||
}
|
||||
|
||||
- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
|
||||
+ EventExecutor executor = new EventExecutor() { // Paper // Plazma - Remove timings
|
||||
@Override
|
||||
public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
|
||||
try {
|
||||
@@ -308,7 +308,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
throw new EventException(t);
|
||||
}
|
||||
}
|
||||
- }, plugin, method, eventClass); // Paper
|
||||
+ }; // Paper // Plazma - Remove timings
|
||||
if (false) { // Spigot - RL handles useTimings check now
|
||||
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
|
||||
} else {
|
||||
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
index 9c2d605c50cbf9aefa56ec209df9f6cea1392e89..cb2bd5f58544493a5ae0d2b765be806e35639baa 100644
|
||||
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package org.spigotmc;
|
||||
|
||||
+/* // Plazma - Remove timings
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
@@ -32,6 +33,7 @@ import co.aikar.timings.TimingsManager;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
+ */ // Plazma - Remove timings
|
||||
|
||||
/**
|
||||
* This is here for legacy purposes incase any plugin used it.
|
||||
@@ -39,10 +41,9 @@ import java.util.logging.Level;
|
||||
* If you use this, migrate ASAP as this will be removed in the future!
|
||||
*
|
||||
* @deprecated
|
||||
- * @see co.aikar.timings.Timings#of
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
-public final class CustomTimingsHandler {
|
||||
+interface CustomTimingsHandler { /* // Plazma - Remove timings
|
||||
private final Timing handler;
|
||||
|
||||
public CustomTimingsHandler(@NotNull String name) {
|
||||
@@ -61,7 +62,7 @@ public final class CustomTimingsHandler {
|
||||
handler = timing;
|
||||
}
|
||||
|
||||
- public void startTiming() { /*handler.startTiming();*/ } // Purpur
|
||||
- public void stopTiming() { /*handler.stopTiming();*/ } // Purpur
|
||||
-
|
||||
+ public void startTiming() { handler.startTiming(); } // Purpur // Plazma - IDE Parsing problem
|
||||
+ public void stopTiming() { handler.stopTiming(); } // Purpur // Plazma - IDE Parsing problem
|
||||
+ */ // Plazma - Remove timings
|
||||
}
|
||||
@@ -89,7 +89,7 @@ index 190c5f0b02a3d99054704ae1afbffb3498ddffe1..042ea49ec61ee327c0f67ddcf0807740
|
||||
|
||||
public int size() {
|
||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
||||
index 17ce14f2dcbf900890efbc2351782bc6f8867068..a8d4acc1dbb3e8e5cd8d181fbd8335f84e252d0c 100644
|
||||
index 049e20407..bbd0b944c 100644
|
||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
||||
@@ -42,6 +42,7 @@ import java.util.function.Consumer;
|
||||
@@ -123,7 +123,7 @@ index ae60bd96b5284d54676d8e7e4dd5d170b526ec1e..359c4b080bd47234e569dce7055da03d
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
index eedbf46e04b5ae420f9bedcbc2bbb10643ba7e22..1ac70b965f5dd9441658156e19a38419cbcc47d6 100644
|
||||
index 3e82ea07c..692bef556 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
@@ -47,6 +47,8 @@ import java.util.logging.Level;
|
||||
@@ -144,7 +144,7 @@ index eedbf46e04b5ae420f9bedcbc2bbb10643ba7e22..1ac70b965f5dd9441658156e19a38419
|
||||
}
|
||||
|
||||
public boolean isPluginEnabled(@NotNull String name) {
|
||||
@@ -136,7 +138,7 @@ class PaperPluginInstanceManager {
|
||||
@@ -133,7 +135,7 @@ class PaperPluginInstanceManager {
|
||||
this.server.getLogger().log(Level.SEVERE, "Unknown error occurred while loading plugins through PluginManager.", e);
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ index eedbf46e04b5ae420f9bedcbc2bbb10643ba7e22..1ac70b965f5dd9441658156e19a38419
|
||||
+ return runtimePluginEntrypointHandler.getPluginProviderStorage().getLoaded().toArray(EMPTY_JPLUGIN); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
// Plugins are disabled in order like this inorder to "rougly" prevent
|
||||
// The behavior of this is that all errors are logged instead of being thrown
|
||||
diff --git a/src/main/java/io/papermc/paper/util/CollisionUtil.java b/src/main/java/io/papermc/paper/util/CollisionUtil.java
|
||||
index ee0331a6bc40cdde08d926fd8eb1dc642630c2e5..bafa781ea77afa159576afca3449bacb01ab387d 100644
|
||||
index ee8e9c0e3..f2598e139 100644
|
||||
--- a/src/main/java/io/papermc/paper/util/CollisionUtil.java
|
||||
+++ b/src/main/java/io/papermc/paper/util/CollisionUtil.java
|
||||
@@ -1149,7 +1149,7 @@ public final class CollisionUtil {
|
||||
@@ -250,7 +250,7 @@ index 06648f9751fd8a322d0809ffebf6a544596ee1a4..b0ea87e2ed8f9bf04b33c2ff8a827d4f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 23916b011ed0645ab284fb080c9555921290d875..2abe6c8dcbf20bf550bb790fd4e18ccc848d1065 100644
|
||||
index 4e005b7b0..059a1e49f 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -409,7 +409,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -294,10 +294,10 @@ index ff13d67151c50ea11a45117e524c7524e2b1a202..5048ec707c147b9a5b2dd8736d518d93
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
index 24ad8d22b5180cd7d7f793e3074e438f9192448f..c902b478d331a1cad9ac66a6eeb66c19fbcd8789 100644
|
||||
index 154bffd34..83c36d452 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
@@ -279,7 +279,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
@@ -258,7 +258,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ index 24ad8d22b5180cd7d7f793e3074e438f9192448f..c902b478d331a1cad9ac66a6eeb66c19
|
||||
}
|
||||
|
||||
public long[] getLongArray(int index) {
|
||||
@@ -291,7 +291,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
@@ -269,7 +269,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,10 +329,10 @@ index 2e5c34ebb94a1536cf09d71bdf052a49ecb9159d..144d3bbe80fc0f459a06017a19929e3e
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/nbt/NbtIo.java b/src/main/java/net/minecraft/nbt/NbtIo.java
|
||||
index c2044d2e8ce2d4747aa73ba90e5b975b1b7d2c19..b4e043379ece86ce39eacd4c1eb9114a2b6727ca 100644
|
||||
index 9f659af04..d2969c1ce 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/NbtIo.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/NbtIo.java
|
||||
@@ -249,7 +249,7 @@ public class NbtIo {
|
||||
@@ -277,7 +277,7 @@ public class NbtIo {
|
||||
|
||||
@Nullable
|
||||
public static CompoundTag read(Path path) throws IOException {
|
||||
@@ -357,23 +357,23 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..70d776d5cfdb0612f65d92333d6f872a
|
||||
protected CipherBase(Cipher cipher) {
|
||||
this.cipher = cipher;
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 9e31954212b1d6162dca2fbc91d373e908560335..5e7b4363e6f83d4145954a96d6b6b610d392c7d1 100644
|
||||
index 9f274048b..ba54c16f1 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -322,7 +322,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -316,7 +316,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
|
||||
public void setListener(PacketListener packetListener) {
|
||||
- Validate.notNull(packetListener, "packetListener", new Object[0]);
|
||||
+ Validate.notNull(packetListener, "packetListener"/*, new Object[0]*/); // Plazma - Reduce allocations
|
||||
PacketFlow enumprotocoldirection = packetListener.flow();
|
||||
private void validateListener(ProtocolInfo<?> state, PacketListener listener) {
|
||||
- Validate.notNull(listener, "packetListener", new Object[0]);
|
||||
+ Validate.notNull(listener, "packetListener"/*, new Object[0]*/); // Plazma - Reduce allocations
|
||||
PacketFlow enumprotocoldirection = listener.flow();
|
||||
String s;
|
||||
|
||||
if (enumprotocoldirection != this.receiving) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
index d3a80d0a23be762c05931ae8001d98e43cab2b4a..a94feef330b1836a2fc009405c52945551b7590a 100644
|
||||
index 6dcade427..4a0b4b0fa 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/Component.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
@@ -191,7 +191,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
@@ -189,7 +189,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
}
|
||||
|
||||
static MutableComponent translatable(String key) {
|
||||
@@ -382,7 +382,7 @@ index d3a80d0a23be762c05931ae8001d98e43cab2b4a..a94feef330b1836a2fc009405c529455
|
||||
}
|
||||
|
||||
static MutableComponent translatable(String key, Object... args) {
|
||||
@@ -211,7 +211,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
@@ -209,7 +209,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
}
|
||||
|
||||
static MutableComponent translatableWithFallback(String key, @Nullable String fallback) {
|
||||
@@ -392,7 +392,7 @@ index d3a80d0a23be762c05931ae8001d98e43cab2b4a..a94feef330b1836a2fc009405c529455
|
||||
|
||||
static MutableComponent translatableWithFallback(String key, @Nullable String fallback, Object... args) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
index 18e53db59082bae94922edc4baa812aa6f089576..c922919e15a4157b7a46728caa4a7df0b5fcce1f 100644
|
||||
index 4aa6232bf..84e8a29f0 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.util.ExtraCodecs;
|
||||
@@ -401,7 +401,7 @@ index 18e53db59082bae94922edc4baa812aa6f089576..c922919e15a4157b7a46728caa4a7df0
|
||||
public class TranslatableContents implements ComponentContents {
|
||||
- public static final Object[] NO_ARGS = new Object[0];
|
||||
+ // public static final Object[] NO_ARGS = new Object[0]; // Plazma - Reduce allocations
|
||||
private static final Codec<Object> PRIMITIVE_ARG_CODEC = ExtraCodecs.validate(ExtraCodecs.JAVA, TranslatableContents::filterAllowedArguments);
|
||||
private static final Codec<Object> PRIMITIVE_ARG_CODEC = ExtraCodecs.JAVA.validate(TranslatableContents::filterAllowedArguments);
|
||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
||||
.xmap(
|
||||
@@ -69,7 +69,7 @@ public class TranslatableContents implements ComponentContents {
|
||||
@@ -409,15 +409,15 @@ index 18e53db59082bae94922edc4baa812aa6f089576..c922919e15a4157b7a46728caa4a7df0
|
||||
|
||||
private static Object[] adjustArgs(Optional<List<Object>> args) {
|
||||
- return args.<Object[]>map(list -> list.isEmpty() ? NO_ARGS : list.toArray()).orElse(NO_ARGS);
|
||||
+ return args.<Object[]>map(list -> list.isEmpty() ? org.plazmamc.plazma.constants.Empty.OBJECT : list.toArray()).orElse(org.plazmamc.plazma.constants.Empty.OBJECT);
|
||||
+ return args.<Object[]>map(list -> list.isEmpty() ? org.plazmamc.plazma.constants.Empty.OBJECT : list.toArray()).orElse(org.plazmamc.plazma.constants.Empty.OBJECT); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
private static TranslatableContents create(String key, Optional<String> fallback, Optional<List<Object>> args) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
index ccdc2345465313991f065e1176b58fb7d5e8722f..bb50e69a4d84e4753db77be071cc6fc73b08a981 100644
|
||||
index 1a37654af..0e61f8cb3 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
@@ -63,7 +63,7 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet<ClientGamePa
|
||||
@@ -66,7 +66,7 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet<ClientGamePa
|
||||
public ClientboundSectionBlocksUpdatePacket(SectionPos sectionPos, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<BlockState> blockChanges) {
|
||||
this.sectionPos = sectionPos;
|
||||
this.positions = blockChanges.keySet().toShortArray();
|
||||
@@ -427,10 +427,10 @@ index ccdc2345465313991f065e1176b58fb7d5e8722f..bb50e69a4d84e4753db77be071cc6fc7
|
||||
// Paper end - Multi Block Change API
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ac12ccf60b45b150982e79f32d3cdd21c4017cc8..1032916def98f0607fabb1bbb550ba2ff70b3019 100644
|
||||
index e121cc57e..7b27af22a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1499,13 +1499,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1541,13 +1541,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private Optional<ServerStatus.Favicon> loadStatusIcon() {
|
||||
@@ -449,7 +449,7 @@ index ac12ccf60b45b150982e79f32d3cdd21c4017cc8..1032916def98f0607fabb1bbb550ba2f
|
||||
return optional.flatMap((path) -> {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index ba8a8575af92541cef2e116743d51cd68d1e794a..140079be22acbb898720c538c4ffb06194da0860 100644
|
||||
index ef520d1dd..b3b0c18b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -130,7 +130,7 @@ public class PlayerAdvancements {
|
||||
@@ -494,10 +494,10 @@ index bae0d208b31aa0a6977c30f2f8484ab3c316bc71..981c3023044f3cc6dc22ada20cd4bedc
|
||||
}
|
||||
);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index bb412ca874b85d777c0e3565fcefcee15b23182b..9116b3d298a9bb6e550d299f76ff1243da824cbe 100644
|
||||
index 4e6fccec4..618dc900d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -109,6 +109,7 @@ import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
||||
@@ -112,6 +112,7 @@ import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
||||
|
||||
public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider {
|
||||
|
||||
@@ -505,7 +505,7 @@ index bb412ca874b85d777c0e3565fcefcee15b23182b..9116b3d298a9bb6e550d299f76ff1243
|
||||
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
|
||||
private static final byte CHUNK_TYPE_UNKNOWN = 0;
|
||||
private static final byte CHUNK_TYPE_FULL = 1;
|
||||
@@ -1347,7 +1348,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1361,7 +1362,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// stuff could have been removed, so we need to check the trackedPlayers set
|
||||
// for players that were removed
|
||||
|
||||
@@ -515,10 +515,10 @@ index bb412ca874b85d777c0e3565fcefcee15b23182b..9116b3d298a9bb6e550d299f76ff1243
|
||||
this.updatePlayer(conn.getPlayer());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 00ac2902be93327c7dd1bf78ee5922d7954f1b26..2ac8c77684c2e4cfc30bc0d39bcaf853dcd3bfb9 100644
|
||||
index f72af2feb..0aaa0e63f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1449,7 +1449,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1439,7 +1439,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public static List<Entity> getCurrentlyTickingEntities() {
|
||||
Entity ticking = currentlyTickingEntity.get();
|
||||
@@ -528,21 +528,25 @@ index 00ac2902be93327c7dd1bf78ee5922d7954f1b26..2ac8c77684c2e4cfc30bc0d39bcaf853
|
||||
return ret;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 8b62f992ec61d0a66a3856b4928ee2d705548291..c0729d3a38e0b9924711c0ca96afd138fa69fa3b 100644
|
||||
index 3b4fadb37..f276fe09f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -138,8 +138,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -165,12 +165,12 @@ 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 (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation && !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) Validate.validState(Player.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]); // Paper - config username validation
|
||||
+ Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet"/*, new Object[0]*/); // Plazma - Reduce allocations
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation && !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) Validate.validState(Player.isValidUsername(packet.name()), "Invalid characters in username"/*, new Object[0]*/); // Paper - config username validation // Plazma - Reduce allocations
|
||||
// Paper start - Validate usernames
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation
|
||||
&& !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) {
|
||||
- Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username", new Object[0]);
|
||||
+ Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username"/*, new Object[0]*/); // Plazma - Reduce allocations
|
||||
}
|
||||
// Paper end - Validate usernames
|
||||
this.requestedUsername = packet.name();
|
||||
GameProfile gameprofile = this.server.getSingleplayerProfile();
|
||||
|
||||
@@ -223,7 +223,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -268,7 +268,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
@Override
|
||||
public void handleKey(ServerboundKeyPacket packet) {
|
||||
@@ -551,20 +555,20 @@ index 8b62f992ec61d0a66a3856b4928ee2d705548291..c0729d3a38e0b9924711c0ca96afd138
|
||||
|
||||
final String s;
|
||||
|
||||
@@ -403,7 +403,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -448,7 +448,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
@Override
|
||||
public void handleLoginAcknowledgement(ServerboundLoginAcknowledgedPacket packet) {
|
||||
- Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet", new Object[0]);
|
||||
+ Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet"/*, new Object[0]*/); // Plazma - Reduce allocations
|
||||
CommonListenerCookie commonlistenercookie = CommonListenerCookie.createInitial((GameProfile) Objects.requireNonNull(this.authenticatedProfile));
|
||||
this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
||||
CommonListenerCookie commonlistenercookie = CommonListenerCookie.createInitial((GameProfile) Objects.requireNonNull(this.authenticatedProfile), this.transferred);
|
||||
ServerConfigurationPacketListenerImpl serverconfigurationpacketlistenerimpl = new ServerConfigurationPacketListenerImpl(this.server, this.connection, commonlistenercookie, this.player); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ac1e0c66f167218306504db6037cc1d6509072a0..60aa2984e490374ab2659f9d0a4821f1ea17c700 100644
|
||||
index b863f6fe6..068c7619b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -133,6 +133,7 @@ public abstract class PlayerList {
|
||||
@@ -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");
|
||||
@@ -572,7 +576,7 @@ index ac1e0c66f167218306504db6037cc1d6509072a0..60aa2984e490374ab2659f9d0a4821f1
|
||||
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();
|
||||
@@ -816,7 +817,7 @@ public abstract class PlayerList {
|
||||
@@ -815,7 +816,7 @@ public abstract class PlayerList {
|
||||
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason) {
|
||||
// Paper start - Expand PlayerRespawnEvent
|
||||
@@ -582,7 +586,7 @@ index ac1e0c66f167218306504db6037cc1d6509072a0..60aa2984e490374ab2659f9d0a4821f1
|
||||
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 7e133752ccb1ea7c0b4fa781feb1a88e2cfdcf6d..1289e8e9c54a584f5037ea8e852df37376af093d 100644
|
||||
index c038da20b..b6cab933d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -76,7 +76,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -628,222 +632,19 @@ index 01f5b946fabbe34f31110e75973dab9f39897346..2564c21900df7ca3c58872741ec8f68b
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 997ab942be9f742804041b07d607e7dd6473ba96..14a61e58987464d7865caf98e6232fb1334c6d88 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -251,7 +251,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
this.goalSelector.addGoal(8, new Bee.BeeWanderGoal());
|
||||
this.goalSelector.addGoal(9, new FloatGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, (new Bee.BeeHurtByOtherGoal(this)).setAlertOthers(new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, (new Bee.BeeHurtByOtherGoal(this)).setAlertOthers(/*new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new Bee.BeeBecomeAngryTargetGoal(this));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index 442eb602f5c82550a87e218e2013171b718abd62..b68f7d1fba18cf08a1844a179f07cb6d873c236b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -122,7 +122,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new DefendVillageTargetGoal(this));
|
||||
- this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Mob.class, 5, false, false, (entityliving) -> {
|
||||
return entityliving instanceof Enemy && !(entityliving instanceof Creeper);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
index adfa18c941b5070692ed855d1d609993ca49a01d..b44e752b4fa18d25ca7ac989b1eaacc138512848 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
@@ -340,7 +340,7 @@ public class Panda extends Animal {
|
||||
this.goalSelector.addGoal(13, new FollowParentGoal(this, 1.25D));
|
||||
this.goalSelector.addGoal(14, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, (new Panda.PandaHurtByTargetGoal(this, new Class[0])).setAlertOthers(new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, (new Panda.PandaHurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers(/*new Class[0]*/)); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
index eae2488f2a46e543b496b7a2919aabbb55dcb825..3383d61551f28b44943c0e935aedfa3cc9ac7e93 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
|
||||
@@ -461,7 +461,7 @@ public class Rabbit extends Animal implements VariantHolder<Rabbit.Variant> {
|
||||
if (variant == Rabbit.Variant.EVIL) {
|
||||
this.getAttribute(Attributes.ARMOR).setBaseValue(8.0D);
|
||||
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.4D, true));
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*,new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Wolf.class, true));
|
||||
if (!this.hasCustomName()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index a90055fe8819a32180754b6060a0f88e81d1a3b6..68825a2ad5a6ea1b0784a935206bd150d29e25f9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -241,7 +241,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
|
||||
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
|
||||
- this.targetSelector.addGoal(3, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(3, (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
// this.targetSelector.addGoal(5, new NonTameRandomTargetGoal<>(this, Animal.class, false, Wolf.PREY_SELECTOR)); // Purpur - moved to updatePathfinders()
|
||||
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
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..518660609566ffe943103b305472590ee9f0a257 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
|
||||
@@ -84,7 +84,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
private static final EntityDataAccessor<Boolean> DATA_DANCING = SynchedEntityData.defineId(Allay.class, EntityDataSerializers.BOOLEAN);
|
||||
private static final EntityDataAccessor<Boolean> DATA_CAN_DUPLICATE = SynchedEntityData.defineId(Allay.class, EntityDataSerializers.BOOLEAN);
|
||||
protected static final ImmutableList<SensorType<? extends Sensor<? super Allay>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.HURT_BY, SensorType.NEAREST_ITEMS);
|
||||
- protected static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.PATH, MemoryModuleType.LOOK_TARGET, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.HURT_BY, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.LIKED_PLAYER, MemoryModuleType.LIKED_NOTEBLOCK_POSITION, MemoryModuleType.LIKED_NOTEBLOCK_COOLDOWN_TICKS, MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS, MemoryModuleType.IS_PANICKING, new MemoryModuleType[0]);
|
||||
+ protected static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.PATH, MemoryModuleType.LOOK_TARGET, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.HURT_BY, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.LIKED_PLAYER, MemoryModuleType.LIKED_NOTEBLOCK_POSITION, MemoryModuleType.LIKED_NOTEBLOCK_COOLDOWN_TICKS, MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS, MemoryModuleType.IS_PANICKING/*, new MemoryModuleType[0]*/); // Plazma - Reduce allocations
|
||||
public static final ImmutableList<Float> THROW_SOUND_PITCHES = ImmutableList.of(0.5625F, 0.625F, 0.75F, 0.9375F, 1.0F, 1.0F, 1.125F, 1.25F, 1.5F, 1.875F, 2.0F, 2.25F, new Float[]{2.5F, 3.0F, 3.75F, 4.0F});
|
||||
private final DynamicGameEventListener<VibrationSystem.Listener> dynamicVibrationListener;
|
||||
private VibrationSystem.Data vibrationData;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index 1d896c6c49705acd87416dc11a1d8ce205f7844e..6d5c60cf9851fc358f29d25bf5d0de98ff7aeb40 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -255,7 +255,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
||||
this.goalSelector.addGoal(7, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, WitherBoss.LIVING_ENTITY_SELECTOR));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
index a00646bc8a9caefe56e48b7682e8fb0c464b81fa..a2b5d2f1be493148a0ed102f10fd8b762b8d3981 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -79,7 +79,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
||||
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
index 54315fb84e3289f0ad8305c2c2cec980a5b2c627..5adcb3cb643025de833935ad0b962cf557d354aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -154,7 +154,7 @@ public class Creeper extends Monster implements PowerableMob {
|
||||
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
- this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 13bc6389652f8868d7539676ee6d85f37ba78f67..6e4dca9074132fc0fb8c90878bf5028729b72367 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -138,7 +138,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt));
|
||||
- this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Endermite.class, 10, true, false, (entityliving) -> entityliving.level().purpurConfig.endermanAggroEndermites && entityliving instanceof Endermite endermite && (!entityliving.level().purpurConfig.endermanAggroEndermitesOnlyIfPlayerSpawned || endermite.isPlayerSpawned()))); // Purpur
|
||||
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
index 931412a5ab315d4080a9f5209d3e85d78642f4c2..0678c916eb6c7fe4a96d6716980892f80e77b3d8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
@@ -90,7 +90,7 @@ public class Silverfish extends Monster {
|
||||
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(5, new Silverfish.SilverfishMergeWithStoneGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*,new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
index b44ffeb4cc0ef63fdd25683f60c5a20fcdeb9135..284aa2340079a4bdf9f1916b28596ea4a06a53ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
@@ -95,7 +95,7 @@ public class Spider extends Monster {
|
||||
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
|
||||
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new Spider.SpiderTargetGoal<>(this, Player.class));
|
||||
this.targetSelector.addGoal(3, new Spider.SpiderTargetGoal<>(this, IronGolem.class));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index c531d830f4d6b2d2213e160d7e1a5b50b80dbea5..18f33b417573417d5e3eb06768d9b59362c2dcf1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -166,7 +166,7 @@ public class Zombie extends Monster {
|
||||
this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(6, new MoveThroughVillageGoal(this, 1.0D, true, 4, this::canBreakDoors));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers(ZombifiedPiglin.class));
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers(ZombifiedPiglin.class)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
// Purpur start
|
||||
if ( this.level().spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
index feba8a264bae656244f60296d0511a8046297f73..37dbf8ab18710fdd889073468c52cc0c6fc3ced2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
@@ -120,7 +120,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
protected void addBehaviourGoals() {
|
||||
this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
index a097cfc528f709c80575f35483b6878314ea2717..61840d78c4e99e706de56613d13d5741576ad660 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||
@@ -27,6 +27,7 @@ public class ShapelessRecipe extends io.papermc.paper.inventory.recipe.RecipeBoo
|
||||
final ItemStack result;
|
||||
final NonNullList<Ingredient> ingredients;
|
||||
private final boolean isBukkit; // Pufferfish
|
||||
+ private static final Ingredient[] EMPTY_INGREDIENT = new Ingredient[0]; // Plazma - Reduce allocations
|
||||
|
||||
// Pufferfish start
|
||||
public ShapelessRecipe(String group, CraftingBookCategory category, ItemStack result, NonNullList<Ingredient> ingredients) {
|
||||
@@ -84,7 +85,7 @@ public class ShapelessRecipe extends io.papermc.paper.inventory.recipe.RecipeBoo
|
||||
public boolean matches(CraftingContainer inventory, Level world) {
|
||||
// Pufferfish start
|
||||
if (!this.isBukkit) {
|
||||
- java.util.List<Ingredient> ingredients = com.google.common.collect.Lists.newArrayList(this.ingredients.toArray(new Ingredient[0]));
|
||||
+ java.util.List<Ingredient> ingredients = com.google.common.collect.Lists.newArrayList(this.ingredients.toArray(EMPTY_INGREDIENT)); // Plazma - Reduce allocations
|
||||
|
||||
inventory: for (int index = 0; index < inventory.getContainerSize(); index++) {
|
||||
ItemStack itemStack = inventory.getItem(index);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 47b7baa41f341087bcd5dfec1d2a13b96f8357ca..72e410ad6bed528b7a1febd30079ab39e10fd5ed 100644
|
||||
index f34159f8d..4088ec804 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -62,6 +62,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
avoxelshape[8] = avoxelshape[7];
|
||||
});
|
||||
@@ -57,6 +57,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
public static final Object2FloatMap<ItemLike> COMPOSTABLES = new Object2FloatOpenHashMap();
|
||||
private static final int AABB_SIDE_THICKNESS = 2;
|
||||
private static final VoxelShape OUTER_SHAPE = Shapes.block();
|
||||
+ private static final int[] ZERO_INT = new int[]{0}; // Plazma - Reduce allocations // Plazma - Reduce allocations
|
||||
|
||||
@Override
|
||||
public MapCodec<ComposterBlock> codec() {
|
||||
@@ -450,7 +451,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
private static final VoxelShape[] SHAPES = (VoxelShape[]) Util.make(new VoxelShape[9], (avoxelshape) -> {
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
avoxelshape[i] = Shapes.join(ComposterBlock.OUTER_SHAPE, Block.box(2.0D, (double) Math.max(2, 1 + i * 2), 2.0D, 14.0D, 16.0D, 14.0D), BooleanOp.ONLY_FIRST);
|
||||
@@ -458,7 +459,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -852,7 +653,7 @@ index 47b7baa41f341087bcd5dfec1d2a13b96f8357ca..72e410ad6bed528b7a1febd30079ab39
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -499,7 +500,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -507,7 +508,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -861,7 +662,7 @@ index 47b7baa41f341087bcd5dfec1d2a13b96f8357ca..72e410ad6bed528b7a1febd30079ab39
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -541,7 +542,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -549,7 +550,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -870,33 +671,20 @@ index 47b7baa41f341087bcd5dfec1d2a13b96f8357ca..72e410ad6bed528b7a1febd30079ab39
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
|
||||
index a907b79fd8291a0e92db138f37239d17424188a1..a402db6baa4b24b4c6750b01b8b2f56e213ecf78 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
|
||||
@@ -148,7 +148,7 @@ public class ChunkStatus {
|
||||
}, (chunkstatus, worldserver, structuretemplatemanager, lightenginethreaded, function, ichunkaccess) -> {
|
||||
return (CompletableFuture) function.apply(ichunkaccess);
|
||||
});
|
||||
- private static final List<ChunkStatus> STATUS_BY_RANGE = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.INITIALIZE_LIGHT, ChunkStatus.CARVERS, ChunkStatus.BIOMES, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, new ChunkStatus[0]);
|
||||
+ private static final List<ChunkStatus> STATUS_BY_RANGE = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.INITIALIZE_LIGHT, ChunkStatus.CARVERS, ChunkStatus.BIOMES, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS/*, new ChunkStatus[0]*/); // Plazma - Reduce allocations
|
||||
private static final IntList RANGE_BY_STATUS = (IntList) Util.make(new IntArrayList(ChunkStatus.getStatusList().size()), (intarraylist) -> {
|
||||
int i = 0;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 6cf83502a954cce9c562ec036bfeddb477d38b73..d28bffce82d0b40c31f240c016621ac06bbad178 100644
|
||||
index 1362a4794..2490b63cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -444,7 +444,7 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -445,7 +445,7 @@ public class RegionFile implements AutoCloseable {
|
||||
this.path = path;
|
||||
initOversizedState(); // Paper
|
||||
this.usedSectors = new RegionBitmap();
|
||||
this.version = outputChunkStreamVersion;
|
||||
this.version = compressionFormat;
|
||||
- if (!Files.isDirectory(directory, new LinkOption[0])) {
|
||||
+ if (!Files.isDirectory(directory/*, new LinkOption[0]*/)) { // Plazma - Reduce allocations
|
||||
throw new IllegalArgumentException("Expected directory, got " + directory.toAbsolutePath());
|
||||
throw new IllegalArgumentException("Expected directory, got " + String.valueOf(directory.toAbsolutePath()));
|
||||
} else {
|
||||
this.externalFileDir = directory;
|
||||
@@ -700,7 +700,7 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -717,7 +717,7 @@ public class RegionFile implements AutoCloseable {
|
||||
private DataInputStream createExternalChunkInputStream(ChunkPos pos, byte flags) throws IOException {
|
||||
Path path = this.getExternalChunkPath(pos);
|
||||
|
||||
@@ -905,7 +693,7 @@ index 6cf83502a954cce9c562ec036bfeddb477d38b73..d28bffce82d0b40c31f240c016621ac0
|
||||
RegionFile.LOGGER.error("External chunk path {} is not file", path);
|
||||
return null;
|
||||
} else {
|
||||
@@ -752,7 +752,7 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -769,7 +769,7 @@ public class RegionFile implements AutoCloseable {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -915,7 +703,7 @@ index 6cf83502a954cce9c562ec036bfeddb477d38b73..d28bffce82d0b40c31f240c016621ac0
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/DebugLevelSource.java b/src/main/java/net/minecraft/world/level/levelgen/DebugLevelSource.java
|
||||
index bf74c054e800104cd47208a29594d3c1340fd668..0320662df9bb039094ecd2bccc94dd59bcdd9d1d 100644
|
||||
index b8e333e79..b6012d360 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/DebugLevelSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/DebugLevelSource.java
|
||||
@@ -89,7 +89,7 @@ public class DebugLevelSource extends ChunkGenerator {
|
||||
@@ -1,641 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sat, 27 Apr 2024 14:02:18 +0900
|
||||
Subject: [PATCH] Completely remove Timings
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
index 4b467f1af93452d13829f756d55dee18b8889d40..7e20ec279c9fb75b92ca3bf938adeeb126641aa5 100644
|
||||
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Completely remove Timings
|
||||
import com.google.common.collect.MapMaker;
|
||||
import io.papermc.paper.configuration.GlobalConfiguration;
|
||||
import net.minecraft.commands.functions.CommandFunction;
|
||||
@@ -12,10 +13,11 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.craftbukkit.scheduler.CraftTask;
|
||||
|
||||
import java.util.Map;
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
|
||||
-// TODO: Re-implement missing timers
|
||||
+// TODO: Re-implement missing timers // Plazma - nah you cant
|
||||
@Deprecated(forRemoval = true)
|
||||
-public final class MinecraftTimings {
|
||||
+interface MinecraftTimings { /* // Plazma - Completely remove Timings
|
||||
|
||||
public static final Timing serverOversleep = Timings.ofSafe("Server Oversleep");
|
||||
public static final Timing playerListTimer = Timings.ofSafe("Player List");
|
||||
@@ -59,12 +61,6 @@ public final class MinecraftTimings {
|
||||
return Timings.ofSafe(taskName);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Gets a timer associated with a plugins tasks.
|
||||
- * @param bukkitTask
|
||||
- * @param period
|
||||
- * @return
|
||||
- */
|
||||
public static Timing getPluginTaskTimings(BukkitTask bukkitTask, long period) {
|
||||
if (!bukkitTask.isSync()) {
|
||||
return NullTimingHandler.NULL;
|
||||
@@ -110,11 +106,6 @@ public final class MinecraftTimings {
|
||||
return Timings.ofSafe(plugin, name.toString());
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Get a named timer for the specified entity type to track type specific timings.
|
||||
- * @param entityType
|
||||
- * @return
|
||||
- */
|
||||
public static Timing getEntityTimings(String entityType, String type) {
|
||||
return Timings.ofSafe("Minecraft", "## tickEntity - " + entityType + " - " + type, tickEntityTimer);
|
||||
}
|
||||
@@ -127,11 +118,6 @@ public final class MinecraftTimings {
|
||||
return Timings.ofSafe("## Sensor - " + type + " (Default rate: " + rate + ")");
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Get a named timer for the specified tile entity type to track type specific timings.
|
||||
- * @param entity
|
||||
- * @return
|
||||
- */
|
||||
public static Timing getTileEntityTimings(BlockEntity entity) {
|
||||
String entityType = entity.getClass().getName();
|
||||
return Timings.ofSafe("Minecraft", "## tickTileEntity - " + entityType, tickTileEntityTimer);
|
||||
@@ -150,10 +136,10 @@ public final class MinecraftTimings {
|
||||
public static Timing getBlockTiming(Block block) {
|
||||
return Timings.ofSafe("## Scheduled Block: " + block.toString(), scheduledBlocksTimer);
|
||||
}
|
||||
-/*
|
||||
+
|
||||
public static Timing getStructureTiming(StructureGenerator structureGenerator) {
|
||||
return Timings.ofSafe("Structure Generator - " + structureGenerator.getName(), structureGenerationTimer);
|
||||
- }*/
|
||||
+ }
|
||||
|
||||
public static Timing getPacketTiming(Packet packet) {
|
||||
return Timings.ofSafe("## Packet - " + packet.getClass().getName(), packetProcessTimer);
|
||||
@@ -178,4 +164,6 @@ public final class MinecraftTimings {
|
||||
co.aikar.timings.Timings.setHistoryInterval(config.historyInterval * 20);
|
||||
co.aikar.timings.Timings.setHistoryLength(config.historyLength * 20);
|
||||
}
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index b35a9f4c5f8960864c402ede8a51fb5ab9c4fcc0..46085a9c12efc6a1766e704c9bb0fbf454d60c8a 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Completely remove Timings
|
||||
import com.google.common.collect.Sets;
|
||||
import io.papermc.paper.adventure.PaperAdventure;
|
||||
import net.kyori.adventure.text.event.ClickEvent;
|
||||
@@ -64,10 +65,11 @@ import static co.aikar.util.JSONUtil.toArray;
|
||||
import static co.aikar.util.JSONUtil.toArrayMapper;
|
||||
import static co.aikar.util.JSONUtil.toObjectMapper;
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
|
||||
@SuppressWarnings({"rawtypes", "SuppressionAnnotation"})
|
||||
@Deprecated(forRemoval = true)
|
||||
-public class TimingsExport extends Thread {
|
||||
+interface TimingsExport { /* extends Thread { // Plazma - Completely remove Timings
|
||||
|
||||
private final TimingsReportListener listeners;
|
||||
private final Map out;
|
||||
@@ -81,9 +83,6 @@ public class TimingsExport extends Thread {
|
||||
this.history = history;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Checks if any pending reports are being requested, and builds one if needed.
|
||||
- */
|
||||
public static void reportTimings() {
|
||||
if (Timings.requestingReport.isEmpty()) {
|
||||
return;
|
||||
@@ -386,4 +385,6 @@ public class TimingsExport extends Thread {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
index 22687667ec69a954261e55e59261286ac1b8b8cd..9115fab47c5d69aa9c563b8ade7f916b99827e4f 100644
|
||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -1,15 +1,18 @@
|
||||
package co.aikar.timings;
|
||||
|
||||
+/* // Plazma - Completely remove Timings
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.storage.PrimaryLevelData;
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
|
||||
/**
|
||||
* Set of timers per world, to track world specific timings.
|
||||
*/
|
||||
// TODO: Re-implement missing timers
|
||||
@Deprecated(forRemoval = true)
|
||||
-public class WorldTimingsHandler {
|
||||
+interface WorldTimingsHandler {
|
||||
+ /* // Plazma - Completely remove Timings
|
||||
public final Timing mobSpawn;
|
||||
public final Timing doChunkUnload;
|
||||
public final Timing doPortalForcer;
|
||||
@@ -137,4 +140,5 @@ public class WorldTimingsHandler {
|
||||
public static Timing getTickList(ServerLevel worldserver, String timingsType) {
|
||||
return Timings.ofSafe(((PrimaryLevelData) worldserver.getLevelData()).getLevelName() + " - Scheduled " + timingsType);
|
||||
}
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index c71daa5d3665cec2836770e5f04da222bc5f90ed..da06919b1911f87e64732716217f85d6ba606e8f 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.papermc.paper.configuration;
|
||||
|
||||
-import co.aikar.timings.MinecraftTimings;
|
||||
+// import co.aikar.timings.MinecraftTimings; // Plazma - Completely remove Timings
|
||||
import com.mojang.logging.LogUtils;
|
||||
import io.papermc.paper.configuration.constraint.Constraints;
|
||||
import io.papermc.paper.configuration.type.number.IntOr;
|
||||
@@ -91,6 +91,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public boolean useDisplayNameInQuitMessage = false;
|
||||
}
|
||||
|
||||
+ /* // Plazma - Completely remove Timings
|
||||
@Deprecated(forRemoval = true)
|
||||
public Timings timings;
|
||||
|
||||
@@ -113,6 +114,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
MinecraftTimings.processConfig(this);
|
||||
}
|
||||
}
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
|
||||
public Proxies proxies;
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
|
||||
index 7ce9ebba8ce304d1f3f21d4f15ee5f3560d7700b..2a79e3423724b5005f1918b80e06051dfcfc5bf9 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.papermc.paper.plugin.manager;
|
||||
|
||||
-import co.aikar.timings.TimedEventExecutor;
|
||||
+// import co.aikar.timings.TimedEventExecutor; // Plazma - Completely remove Timings
|
||||
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
import com.destroystokyo.paper.exception.ServerEventException;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -95,7 +95,7 @@ class PaperEventManager {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
}
|
||||
|
||||
- executor = new TimedEventExecutor(executor, plugin, null, event);
|
||||
+ // executor = new TimedEventExecutor(executor, plugin, null, event); // Plazma - Completely remove Timings
|
||||
this.getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class PaperEventManager {
|
||||
}
|
||||
}
|
||||
|
||||
- EventExecutor executor = new TimedEventExecutor(EventExecutor.create(method, eventClass), plugin, method, eventClass);
|
||||
+ EventExecutor executor = EventExecutor.create(method, eventClass); // Plazma - Completely remove Timings
|
||||
eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
|
||||
}
|
||||
return ret;
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
|
||||
index dab211c458311869c61779305580a1c7da830f71..efa194f99807a61c02923dbaf58fac542bd9229f 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
|
||||
@@ -227,7 +227,8 @@ public class PaperPluginManagerImpl implements PluginManager, DependencyContext
|
||||
|
||||
@Override
|
||||
public boolean useTimings() {
|
||||
- return co.aikar.timings.Timings.isTimingsEnabled();
|
||||
+ return false;
|
||||
+ // return co.aikar.timings.Timings.isTimingsEnabled(); // Plazma - Completely remove Timings
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index 620edb63cacd15e38f7fc859efd4095bfb5e5f72..85e6a5d5d3266d0d042ee62a89adbb5f0d3880e6 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -49,7 +49,7 @@ public class PacketUtils {
|
||||
try { // Paper - detailed watchdog information
|
||||
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
||||
if (listener.shouldHandleMessage(packet)) {
|
||||
- co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
+ // co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings // Plazma - Completely remove Timings
|
||||
try { // Paper - timings // Purpur
|
||||
packet.handle(listener);
|
||||
} catch (Exception exception) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 93564ba734f6b82ffde07b1321180fc24a0ff50f..25d560594d2fb38a6b94bb4b1677ff79603d5645 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,7 +3,7 @@ package net.minecraft.server;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
-import co.aikar.timings.Timings;
|
||||
+// import co.aikar.timings.Timings; // Plazma - Completely remove Timings
|
||||
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -189,7 +189,7 @@ import org.bukkit.craftbukkit.Main;
|
||||
import org.bukkit.event.server.ServerLoadEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+//import co.aikar.timings.MinecraftTimings; // Paper // Plazma - Completely remove Timings
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
||||
|
||||
@@ -975,7 +975,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
- MinecraftTimings.stopServer(); // Paper
|
||||
+ //MinecraftTimings.stopServer(); // Paper // Plazma - Completely remove Timings
|
||||
// Purpur start
|
||||
if (upnp) {
|
||||
if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 2a73508dd8a59c6af8b65ab2db97b6e20b104c57..27b14e60bb7ef73a73d49c561056ee42b2d7637f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -58,7 +58,7 @@ import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.io.IoBuilder;
|
||||
import org.bukkit.command.CommandSender;
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+// import co.aikar.timings.MinecraftTimings; // Paper // Plazma - Completely remove Timings
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
import org.bukkit.craftbukkit.util.Waitable; // Paper
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
@@ -830,7 +830,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
};
|
||||
waitableArray[0] = waitable;
|
||||
- co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
|
||||
+ // co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable)); // Plazma - Completely remove Timings
|
||||
} else {
|
||||
// Paper end
|
||||
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index d1056b1c91edc3ec06c78e65c8fa2dd1f000c43f..3f78dfb3af583e6b0a960b1d87393744a9da3baf 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.minecraft.server.level;
|
||||
|
||||
-import co.aikar.timings.Timing; // Paper
|
||||
+// import co.aikar.timings.Timing; // Paper // Plazma - Completely remove Timings
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableList.Builder;
|
||||
import com.google.common.collect.Iterables;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 80789e6a31cb0dbbe780154f3bb7353685950e07..84491e05bfbd045c79b48e8524a8a874cad0964b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.minecraft.server.level;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
-import co.aikar.timings.TimingHistory; // Paper
|
||||
+// import co.aikar.timings.TimingHistory; // Paper // Plazma - Completely remove Timings
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -1463,9 +1463,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
currentlyTickingEntity.lazySet(entity);
|
||||
}
|
||||
// Paper end - log detailed entity tick information
|
||||
- ++TimingHistory.entityTicks; // Paper - timings
|
||||
+ // ++TimingHistory.entityTicks; // Paper - timings // Plazma - Completely remove Timings
|
||||
// Spigot start
|
||||
- co.aikar.timings.Timing timer; // Paper
|
||||
+ // co.aikar.timings.Timing timer; // Paper // Plazma - Completely remove Timings
|
||||
/*if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { // Paper - comment out - EAR 2, reimplement below
|
||||
entity.tickCount++;
|
||||
timer = entity.getType().inactiveTickTimer.startTiming(); try { // Paper - timings
|
||||
@@ -1488,7 +1488,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
});*/ // Purpur
|
||||
//gameprofilerfiller.incrementCounter("tickNonPassenger"); // Purpur
|
||||
if (isActive) { // Paper - EAR 2
|
||||
- TimingHistory.activatedEntityTicks++;
|
||||
+ // TimingHistory.activatedEntityTicks++; // Plazma - Completely remove Timings
|
||||
entity.tick();
|
||||
entity.postTick(); // CraftBukkit
|
||||
} else { entity.inactiveTick(); } // Paper - EAR 2
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ef4b1fb1532e1939d9a7e5337edc80b334b78318..5c0786fd473e16f931ab1c24bc622fcac40301c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.minecraft.server.players;
|
||||
|
||||
-import co.aikar.timings.MinecraftTimings;
|
||||
+// import co.aikar.timings.MinecraftTimings; // Plazma - Completely remove Timings
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index a9e2a758669550530eb29475ba99fe42e520f6ae..c74e18522c9569eb405b3d02097f5e9b3a8c9f86 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -344,10 +344,10 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
||||
}
|
||||
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures, String id) {
|
||||
- this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
|
||||
- this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
||||
- this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
||||
- this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
|
||||
+ // this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick"); // Plazma - Completely remove Timings
|
||||
+ // this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick"); // Plazma - Completely remove Timings
|
||||
+ // this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick"); // Plazma - Completely remove Timings
|
||||
+ // this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick"); // Plazma - Completely remove Timings
|
||||
// Paper end
|
||||
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||
this.factory = factory;
|
||||
@@ -721,10 +721,10 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
}
|
||||
|
||||
// Paper start - timings
|
||||
- public final co.aikar.timings.Timing tickTimer;
|
||||
- public final co.aikar.timings.Timing inactiveTickTimer;
|
||||
- public final co.aikar.timings.Timing passengerTickTimer;
|
||||
- public final co.aikar.timings.Timing passengerInactiveTickTimer;
|
||||
+ // public final co.aikar.timings.Timing tickTimer; // Plazma - Completely remove Timings
|
||||
+ // public final co.aikar.timings.Timing inactiveTickTimer; // Plazma - Completely remove Timings
|
||||
+ // public final co.aikar.timings.Timing passengerTickTimer; // Plazma - Completely remove Timings
|
||||
+ // public final co.aikar.timings.Timing passengerInactiveTickTimer; // Plazma - Completely remove Timings
|
||||
// Paper end
|
||||
public boolean trackDeltas() {
|
||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||
index 8f7d9f8a5138bcd572691d66c814aaa7c308b317..5db4a2b790680ed86a6106473d43fb0b2887f875 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||
@@ -16,7 +16,7 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
|
||||
private final int maxDuration;
|
||||
// Paper start - configurable behavior tick rate and timings
|
||||
private final String configKey;
|
||||
- private final co.aikar.timings.Timing timing;
|
||||
+ // private final co.aikar.timings.Timing timing; // Plazma - Completely remove Timings
|
||||
// Paper end - configurable behavior tick rate and timings
|
||||
|
||||
public Behavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState) {
|
||||
@@ -38,7 +38,7 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
|
||||
key = key.substring(lastSeparator + 1);
|
||||
}
|
||||
this.configKey = key.toLowerCase(java.util.Locale.ROOT);
|
||||
- this.timing = co.aikar.timings.MinecraftTimings.getBehaviorTimings(configKey);
|
||||
+ // this.timing = co.aikar.timings.MinecraftTimings.getBehaviorTimings(configKey); // Plazma - Completely remove Timings
|
||||
// Paper end - configurable behavior tick rate and timings
|
||||
}
|
||||
|
||||
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 e553f52de2e0b30511ac1b73cb436374017cd7d7..21f4e5c3dd3e528f3184940a2351259a02fcb131 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
|
||||
@@ -28,7 +28,7 @@ public abstract class Sensor<E extends LivingEntity> {
|
||||
private long timeToTick;
|
||||
// Paper start - configurable sensor tick rate and timings
|
||||
private final String configKey;
|
||||
- private final co.aikar.timings.Timing timing;
|
||||
+ // private final co.aikar.timings.Timing timing; // Plazma - Completely remove Timings
|
||||
// Paper end
|
||||
|
||||
public Sensor(int senseInterval) {
|
||||
@@ -39,7 +39,7 @@ public abstract class Sensor<E extends LivingEntity> {
|
||||
key = key.substring(lastSeparator + 1);
|
||||
}
|
||||
this.configKey = key.toLowerCase(java.util.Locale.ROOT);
|
||||
- this.timing = co.aikar.timings.MinecraftTimings.getSensorTimings(configKey, senseInterval);
|
||||
+ // this.timing = co.aikar.timings.MinecraftTimings.getSensorTimings(configKey, senseInterval); // Plazma - Completely remove Timings
|
||||
// Paper end
|
||||
this.scanRate = senseInterval;
|
||||
this.timeToTick = (long)RANDOM.nextInt(senseInterval);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 16e6716f70d5b9090f29f8b2320302d98dd087c2..c20f3dfdfb4efced687da115be0293887d69f966 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -179,7 +179,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Plazma end - Configurable Plazma
|
||||
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
- public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
+ // public final co.aikar.timings.WorldTimingsHandler timings; // Paper // Plazma - Completely remove Timings
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
@@ -352,7 +352,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||
});
|
||||
// CraftBukkit end
|
||||
- this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||
+ // this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings // Plazma - Completely remove Timings
|
||||
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper - Option to keep spawn chunks loaded
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||
@@ -1362,7 +1362,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
//this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
|
||||
this.tickingBlockEntities = false;
|
||||
- co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
||||
+ // co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper // Plazma - Completely remove Timings
|
||||
//gameprofilerfiller.pop(); // Purpur
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 284149925440f413d23a9ec3ce704e70a74f4c08..608a00e6be7c8c5ae922aaa738f875559ab708f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -114,6 +114,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
this != Blocks.STRUCTURE_BLOCK &&
|
||||
this != Blocks.JIGSAW;
|
||||
}
|
||||
+ /* // Plazma - Completely remove Timings
|
||||
public co.aikar.timings.Timing timing;
|
||||
public co.aikar.timings.Timing getTiming() {
|
||||
if (timing == null) {
|
||||
@@ -121,6 +122,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
return timing;
|
||||
}
|
||||
+ */ // Plazma - Completely remove Timings
|
||||
// Paper end
|
||||
@Nullable
|
||||
private String descriptionId;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index e9701ed4e5b35ace1accd2b46f082191d8ab6497..f2200a6098210ae3137e266a1f079ffd6971504d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -23,14 +23,14 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
// CraftBukkit end
|
||||
|
||||
-import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
-import co.aikar.timings.Timing; // Paper
|
||||
+// import org.spigotmc.CustomTimingsHandler; // Spigot // Plazma - Completely remove Timings
|
||||
+// import co.aikar.timings.MinecraftTimings; // Paper // Plazma - Completely remove Timings
|
||||
+// import co.aikar.timings.Timing; // Paper // Plazma - Completely remove Timings
|
||||
|
||||
public abstract class BlockEntity {
|
||||
static boolean ignoreTileUpdates; // Paper - Perf: Optimize Hoppers
|
||||
|
||||
- public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
||||
+ // public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper // Plazma - Completely remove Timings
|
||||
// CraftBukkit start - data containers
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index e8df8e8520cea5d21197c61a172f7211a3a2c34d..27a106e3844309e5b7ca12d1fd2374cf20f4ba48 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -366,8 +366,8 @@ public class Main {
|
||||
tryPreloadClass("org.jline.terminal.impl.MouseSupport");
|
||||
tryPreloadClass("org.jline.terminal.impl.MouseSupport$1");
|
||||
tryPreloadClass("org.jline.terminal.Terminal$MouseTracking");
|
||||
- tryPreloadClass("co.aikar.timings.TimingHistory");
|
||||
- tryPreloadClass("co.aikar.timings.TimingHistory$MinuteReport");
|
||||
+ // tryPreloadClass("co.aikar.timings.TimingHistory"); // Plazma - Completely remove Timings
|
||||
+ // tryPreloadClass("co.aikar.timings.TimingHistory$MinuteReport"); // Plazma - Completely remove Timings
|
||||
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext");
|
||||
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext$11");
|
||||
tryPreloadClass("io.netty.channel.AbstractChannelHandlerContext$12");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 6bab5f9e40987d1a8ca9c17118d2a14135df5dff..14fd658f987f21993f334ae1524f880e3ce12b86 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.bukkit.craftbukkit.scheduler;
|
||||
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+// import co.aikar.timings.MinecraftTimings; // Paper // Plazma - Completely remove Timings
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.util.ArrayList;
|
||||
@@ -304,7 +304,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
- }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper
|
||||
+ });//{{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper // Plazma - Completely remove Timings
|
||||
this.handle(task, 0L);
|
||||
for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
||||
if (taskPending == task) {
|
||||
@@ -344,7 +344,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
}
|
||||
}
|
||||
- }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer(plugin);}}; // Paper
|
||||
+ });//{{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer(plugin);}}; // Paper // Plazma - Completely remove Timings
|
||||
this.handle(task, 0L);
|
||||
for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
||||
if (taskPending == task) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
index 5835dc236b3f5291a804f7fb14a12eb466d4e0ba..5b943a792f6b005a094bc06f59899bd28cf576a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
@@ -2,14 +2,14 @@ package org.bukkit.craftbukkit.scheduler;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
-import co.aikar.timings.NullTimingHandler;
|
||||
+// import co.aikar.timings.NullTimingHandler; // Plazma - Completely remove Timings
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
-import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
-import co.aikar.timings.Timing; // Paper
|
||||
+// import org.spigotmc.CustomTimingsHandler; // Spigot // Plazma - Completely remove Timings
|
||||
+// import co.aikar.timings.MinecraftTimings; // Paper // Plazma - Completely remove Timings
|
||||
+// import co.aikar.timings.Timing; // Paper // Plazma - Completely remove Timings
|
||||
|
||||
public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
private long nextRun;
|
||||
public final Runnable rTask; // Paper
|
||||
public final Consumer<BukkitTask> cTask; // Paper
|
||||
- public Timing timings; // Paper
|
||||
+ // public Timing timings; // Paper // Plazma - Completely remove Timings
|
||||
private final Plugin plugin;
|
||||
private final int id;
|
||||
private final long createdAt = System.nanoTime();
|
||||
@@ -55,7 +55,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
this.id = id;
|
||||
this.period = CraftTask.NO_REPEATING;
|
||||
this.taskName = taskName;
|
||||
- this.timings = MinecraftTimings.getInternalTaskName(taskName);
|
||||
+ // this.timings = MinecraftTimings.getInternalTaskName(taskName); // Plazma - Completely remove Timings
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -76,7 +76,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
}
|
||||
this.id = id;
|
||||
this.period = period;
|
||||
- timings = task != null ? MinecraftTimings.getPluginTaskTimings(this, period) : NullTimingHandler.NULL; // Paper
|
||||
+ // timings = task != null ? MinecraftTimings.getPluginTaskTimings(this, period) : NullTimingHandler.NULL; // Paper // Plazma - Completely remove Timings
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index e29dc1101c7aa4b7b2a2d2e732e27a1a14a2a234..544d6f4831341802ac156080e30b2b500cd9f0da 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -217,7 +217,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
// Paper start
|
||||
@Override
|
||||
public void reportTimings() {
|
||||
- co.aikar.timings.TimingsExport.reportTimings();
|
||||
+ //co.aikar.timings.TimingsExport.reportTimings(); // Plazma - Completely remove Timings
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -495,9 +495,9 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
return new CraftDamageSourceBuilder(damageType);
|
||||
}
|
||||
// Paper start
|
||||
- @Override
|
||||
+ @Override @Deprecated // Plazma - Completely remove Timings
|
||||
public String getTimingsServerName() {
|
||||
- return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
|
||||
+ return null; //io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName; // Plazma - Completely remove Timings
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 56e52b16b419c882440a15947f037ae1a902bc70..e0e1c873703c1d3482d5bc82294490a44dd3a7a9 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -35,7 +35,7 @@ import net.minecraft.world.entity.projectile.FireworkRocketEntity;
|
||||
import net.minecraft.world.entity.projectile.ThrowableProjectile;
|
||||
import net.minecraft.world.entity.projectile.ThrownTrident;
|
||||
import net.minecraft.world.entity.raid.Raider;
|
||||
-import co.aikar.timings.MinecraftTimings;
|
||||
+// import co.aikar.timings.MinecraftTimings; // Plazma - Completely remove Timings
|
||||
import net.minecraft.world.entity.schedule.Activity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
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