mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
1.20
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build Leaf 1.19.4
|
name: Build Leaf 1.20
|
||||||
on: [ push, pull_request ]
|
on: [ push, pull_request ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -22,18 +22,18 @@ jobs:
|
|||||||
- name: Create ReobfPaperclipJar
|
- name: Create ReobfPaperclipJar
|
||||||
run: ./gradlew -Dorg.gradle.jvmargs="-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector" createReobfPaperclipJar --stacktrace --no-daemon
|
run: ./gradlew -Dorg.gradle.jvmargs="-Dgraal.CompilerConfiguration=enterprise -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true --add-modules jdk.incubator.vector" createReobfPaperclipJar --stacktrace --no-daemon
|
||||||
- name: Rename Paperclip Jar
|
- name: Rename Paperclip Jar
|
||||||
run: mv build/libs/leaf-paperclip-1.19.4-R0.1-SNAPSHOT-reobf.jar ./leaf-1.19.4.jar
|
run: mv build/libs/leaf-paperclip-1.20-R0.1-SNAPSHOT-reobf.jar ./leaf-1.20.jar
|
||||||
- name: Upload Leaf
|
- name: Upload Leaf
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Leaf
|
name: Leaf
|
||||||
path: ./leaf-1.19.4.jar
|
path: ./leaf-1.20.jar
|
||||||
- name: Release Leaf
|
- name: Release Leaf
|
||||||
if: github.ref_name == 'ver/1.19.4'
|
if: github.ref_name == 'ver/1.20'
|
||||||
uses: softprops/action-gh-release@master
|
uses: softprops/action-gh-release@master
|
||||||
with:
|
with:
|
||||||
name: "Leaf 1.19.4"
|
name: "Leaf 1.20"
|
||||||
tag_name: "ver-1.19.4"
|
tag_name: "ver-1.20"
|
||||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
files: "./leaf-1.19.4.jar"
|
files: "./leaf-1.20.jar"
|
||||||
prerelease: false
|
prerelease: false
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Leaf
|
## Leaf
|
||||||
|
|
||||||
[](https://github.com/Winds-Studio/Leaf/releases)
|
[](https://github.com/Winds-Studio/Leaf/releases)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
<h5>Leaf is a drop-in replacement designed for removing some checks, customized, and high-performance built on top of <a href="https://github.com/GaleMC/Gale">Gale</a> with optimization from other forks.</h5>
|
<h5>Leaf is a drop-in replacement designed for removing some checks, customized, and high-performance built on top of <a href="https://github.com/GaleMC/Gale">Gale</a> with optimization from other forks.</h5>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ plugins {
|
|||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||||
id("io.papermc.paperweight.patcher") version "1.5.5"
|
id("io.papermc.paperweight.patcher") version "1.5.6-SNAPSHOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
group = org.dreeam.leaf
|
group = org.dreeam.leaf
|
||||||
version = 1.19.4-R0.1-SNAPSHOT
|
version = 1.20-R0.1-SNAPSHOT
|
||||||
|
|
||||||
galeCommit = dad62237f8f020d6e48b4c639492f4918f905220
|
galeCommit = 3efde1600dbbef211a31f71f7b6b53cdbcc46d74
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-rc-2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
5
gradlew
vendored
5
gradlew
vendored
@@ -130,10 +130,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ Original license: GPL v3
|
|||||||
Original project: https://github.com/pufferfish-gg/Pufferfish
|
Original project: https://github.com/pufferfish-gg/Pufferfish
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 0719e49dde343c80d18daf82d7fed926150d7d6d..e23ed86c4288ecdfef37bf5b2cd132f348bf852a 100644
|
index c5b725b28b11878f31b358ea9719acb53aacac41..b1c11eaee0d53ed9ece3ddf768bded98c92dde98 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -42,6 +42,7 @@ dependencies {
|
@@ -44,6 +44,7 @@ dependencies {
|
||||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||||
api("org.apache.logging.log4j:log4j-api:2.17.1")
|
api("org.apache.logging.log4j:log4j-api:2.17.1")
|
||||||
api("org.slf4j:slf4j-api:1.8.0-beta4")
|
api("org.slf4j:slf4j-api:1.8.0-beta4")
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Leaf config files
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 61cd83e6797e84679063a31aff1609e1168352c5..59f78d0fa224a416eed57bec85fad3bff71bdc56 100644
|
index 007e23a9383ab8eda12c6dffb385256215356040..c890e9655551865f7cea3c92782ee6a09e90f88e 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -2059,6 +2059,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -2047,6 +2047,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
}
|
|
||||||
// Purpur end
|
// Paper end
|
||||||
|
|
||||||
+ // Leaf start
|
+ // Leaf start
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@ Subject: [PATCH] Bump Dependencies
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 3e148458cc78a3225e8d6572b43e1d358791eec2..8813d67ff64f4f213de223c17cd16ef21aa9c916 100644
|
index b1c11eaee0d53ed9ece3ddf768bded98c92dde98..6885418db2deec33622fac66428b432b690d5621 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -24,15 +24,17 @@ configurations.api {
|
@@ -26,15 +26,17 @@ val annotationsVersion = "24.0.1"
|
||||||
dependencies {
|
dependencies {
|
||||||
// api dependencies are listed transitively to API consumers
|
// api dependencies are listed transitively to API consumers
|
||||||
api("com.google.guava:guava:31.1-jre")
|
api("com.google.guava:guava:31.1-jre")
|
||||||
@@ -18,7 +18,7 @@ index 3e148458cc78a3225e8d6572b43e1d358791eec2..8813d67ff64f4f213de223c17cd16ef2
|
|||||||
+ api("com.google.code.gson:gson:2.10.1")
|
+ api("com.google.code.gson:gson:2.10.1")
|
||||||
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper
|
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper
|
||||||
+ // Leaf end
|
+ // Leaf end
|
||||||
api("org.yaml:snakeyaml:1.33")
|
api("org.yaml:snakeyaml:2.0")
|
||||||
api("org.joml:joml:1.10.5")
|
api("org.joml:joml:1.10.5")
|
||||||
// Paper start
|
// Paper start
|
||||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||||
@@ -29,7 +29,7 @@ index 3e148458cc78a3225e8d6572b43e1d358791eec2..8813d67ff64f4f213de223c17cd16ef2
|
|||||||
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||||
apiAndDocs("net.kyori:adventure-api")
|
apiAndDocs("net.kyori:adventure-api")
|
||||||
apiAndDocs("net.kyori:adventure-text-minimessage")
|
apiAndDocs("net.kyori:adventure-text-minimessage")
|
||||||
@@ -40,34 +42,36 @@ dependencies {
|
@@ -42,34 +44,37 @@ dependencies {
|
||||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||||
@@ -46,17 +46,13 @@ index 3e148458cc78a3225e8d6572b43e1d358791eec2..8813d67ff64f4f213de223c17cd16ef2
|
|||||||
+ implementation("org.ow2.asm:asm-commons:9.5")
|
+ implementation("org.ow2.asm:asm-commons:9.5")
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
- api("org.apache.maven:maven-resolver-provider:3.8.5") // Paper, expose
|
api("org.apache.maven:maven-resolver-provider:3.9.2")
|
||||||
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
|
||||||
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
|
||||||
- compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
|
- compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
|
||||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.1")
|
|
||||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.7")
|
|
||||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.7")
|
|
||||||
+ compileOnly("com.google.code.findbugs:jsr305:3.0.2") // Paper
|
+ compileOnly("com.google.code.findbugs:jsr305:3.0.2") // Paper
|
||||||
|
|
||||||
- val annotations = "org.jetbrains:annotations:23.0.0" // Paper - we don't want Java 5 annotations...
|
val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
|
||||||
+ val annotations = "org.jetbrains:annotations:24.0.1" // Paper - we don't want Java 5 annotations...
|
|
||||||
compileOnly(annotations)
|
compileOnly(annotations)
|
||||||
testCompileOnly(annotations)
|
testCompileOnly(annotations)
|
||||||
|
|
||||||
@@ -72,27 +68,24 @@ index 3e148458cc78a3225e8d6572b43e1d358791eec2..8813d67ff64f4f213de223c17cd16ef2
|
|||||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
- testImplementation("org.hamcrest:hamcrest-library:1.3")
|
- testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||||
- testImplementation("org.ow2.asm:asm-tree:9.4")
|
+
|
||||||
+ testImplementation("org.hamcrest:hamcrest-library:2.2")
|
+ testImplementation("org.hamcrest:hamcrest-library:2.2")
|
||||||
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||||
+ // Leaf end
|
+ // Leaf end
|
||||||
}
|
}
|
||||||
|
|
||||||
configure<PublishingExtension> {
|
configure<PublishingExtension> {
|
||||||
@@ -115,9 +119,11 @@ tasks.withType<Javadoc> {
|
@@ -115,7 +120,9 @@ tasks.withType<Javadoc> {
|
||||||
options.use()
|
options.use()
|
||||||
options.isDocFilesSubDirs = true
|
options.isDocFilesSubDirs = true
|
||||||
options.links(
|
options.links(
|
||||||
+ // Leaf - Bump Dependencies
|
+ // Leaf - Bump Dependencies
|
||||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
+ // Leaf - end
|
||||||
- "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/24.0.1/", // Paper - we don't want Java 5 annotations
|
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||||
+ // Leaf end
|
|
||||||
// Paper start
|
// Paper start
|
||||||
//"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
|
@@ -158,6 +165,9 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.
|
||||||
"https://jd.advntr.dev/api/$adventureVersion/",
|
|
||||||
@@ -158,6 +164,9 @@ val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.
|
|
||||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||||
classpath.from(configurations.compileClasspath)
|
classpath.from(configurations.compileClasspath)
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ Original license: MIT
|
|||||||
Original project: https://github.com/KeYiMC/KeYi
|
Original project: https://github.com/KeYiMC/KeYi
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||||
index 18e38e028cb44b12e4e439175f67800e83512d2f..db8f06deb894a2d986c2abf28aab7be17b44466c 100644
|
index e378c91155b4c70d89e5ee2af59828051454e192..5662c72e0b76b3e0aa2d7a78305637fd36245d5e 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||||
@@ -4,7 +4,10 @@ import java.net.InetSocketAddress;
|
@@ -4,7 +4,10 @@ import java.net.InetSocketAddress;
|
||||||
@@ -22,10 +22,10 @@ index 18e38e028cb44b12e4e439175f67800e83512d2f..db8f06deb894a2d986c2abf28aab7be1
|
|||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@@ -3215,4 +3218,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
@@ -3086,4 +3089,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
*/
|
@Override
|
||||||
void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message, @Nullable Entity killer);
|
Spigot spigot();
|
||||||
// Purpur end
|
// Spigot end
|
||||||
+
|
+
|
||||||
+ // KeYi start
|
+ // KeYi start
|
||||||
+ /**
|
+ /**
|
||||||
@@ -7,10 +7,10 @@ Original license: MIT
|
|||||||
Original project: https://github.com/Cryptite/Slice
|
Original project: https://github.com/Cryptite/Slice
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||||
index db8f06deb894a2d986c2abf28aab7be17b44466c..2b909bf048af82d4ff97b01b5473911bf3a99c29 100644
|
index 5662c72e0b76b3e0aa2d7a78305637fd36245d5e..c7232a047106efa998512c45ea200d6320432289 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||||
@@ -2965,6 +2965,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
@@ -2971,6 +2971,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
String getClientBrandName();
|
String getClientBrandName();
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 539f11b179e0b6473ca9b38ba971bd0b659bbdb4..dcccde28176c8800257d338117b87c83cc2286ca 100644
|
index 3097e021e89bf04e9cf18dae1f9be8a089d29743..d209ac7c8fe639a23904e4ebd5bade0637fb8eab 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -9,7 +9,7 @@ plugins {
|
@@ -9,7 +9,7 @@ plugins {
|
||||||
@@ -15,9 +15,9 @@ index 539f11b179e0b6473ca9b38ba971bd0b659bbdb4..dcccde28176c8800257d338117b87c83
|
|||||||
- implementation(project(":gale-api"))
|
- implementation(project(":gale-api"))
|
||||||
+ implementation(project(":leaf-api")) // Leaf
|
+ implementation(project(":leaf-api")) // Leaf
|
||||||
// Depend on Paper MojangAPI
|
// Depend on Paper MojangAPI
|
||||||
implementation("io.papermc.paper:paper-mojangapi:1.19.3-R0.1-SNAPSHOT") {
|
implementation("io.papermc.paper:paper-mojangapi:1.20-R0.1-SNAPSHOT") {
|
||||||
exclude("io.papermc.paper", "paper-api")
|
exclude("io.papermc.paper", "paper-api")
|
||||||
@@ -80,7 +80,7 @@ tasks.jar {
|
@@ -79,7 +79,7 @@ tasks.jar {
|
||||||
attributes(
|
attributes(
|
||||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
"Implementation-Title" to "CraftBukkit",
|
"Implementation-Title" to "CraftBukkit",
|
||||||
@@ -40,23 +40,23 @@ index e45e6b44b2a8f2cdae6e0048a812b92126aa17ca..b5f3f213da8a40d5184098af017c8e26
|
|||||||
.completer(new ConsoleCommandCompleter(this.server))
|
.completer(new ConsoleCommandCompleter(this.server))
|
||||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 5db4312ed1973a2395af66975a43abe5beffa1cd..1c671eb71254172fe023eb81cda21976d861a81f 100644
|
index ecb42a8f9a8eb18d7fd3f828ece4ac8ebf4de0e0..66f284345fe011bd317019bc035e009e90c58fdc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1030,7 +1030,7 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -907,7 +907,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
We do not want people to report thread issues to Paper,
|
We do not want people to report thread issues to Paper,
|
||||||
but we do want people to report thread issues to Gale.
|
but we do want people to report thread issues to Gale.
|
||||||
*/
|
*/
|
||||||
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues )");
|
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues )");
|
||||||
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues )"); // Leaf
|
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Leaf bug, please report it at https://github.com/Winds-Studio/Leaf/issues )"); // Leaf
|
||||||
// Gale end - branding changes
|
// Gale end - branding changes
|
||||||
// Gale start - base thread pool
|
while (this.getRunningThread().isAlive()) {
|
||||||
while (serverThread.isAlive()) {
|
this.getRunningThread().stop();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 841492478d64a10e722ec5ac98b5a8606a65669a..d9934a9cfccd324dc35c4225e4a859f70a5c083d 100644
|
index 226add5ee9fdb32e179a3ac42a277fed728934bf..ffdedab6808736ad96850d2e6eecf09fb758306a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -267,7 +267,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -265,7 +265,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@@ -92,10 +92,10 @@ index 0b5979723bb30f9011ac64c36d894aa41713ec9b..17e3ee3a73a2347e9f0baa0ed1640a3b
|
|||||||
|
|
||||||
if (stream != null) {
|
if (stream != null) {
|
||||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
index bcb144ec4a836b8b32f60726bcbee218a4f62742..9ab8f897471258383623cfe3ca9ff591ca40a56a 100644
|
index 08bdaab86269b0a24e61b3c9d69c18aca1a1d1f7..dc306e27b75d4b20a0ea38d01287dd94acafc1ac 100644
|
||||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
@@ -161,15 +161,15 @@ public final class WatchdogThread extends ServerThread // Paper - rewrite chunk
|
@@ -160,15 +160,15 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||||
We do not want people to report thread issues to Paper,
|
We do not want people to report thread issues to Paper,
|
||||||
but we do want people to report thread issues to Gale.
|
but we do want people to report thread issues to Gale.
|
||||||
*/
|
*/
|
||||||
@@ -114,7 +114,7 @@ index bcb144ec4a836b8b32f60726bcbee218a4f62742..9ab8f897471258383623cfe3ca9ff591
|
|||||||
//
|
//
|
||||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||||
{
|
{
|
||||||
@@ -197,13 +197,13 @@ public final class WatchdogThread extends ServerThread // Paper - rewrite chunk
|
@@ -196,13 +196,13 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||||
We do not want people to report thread issues to Paper,
|
We do not want people to report thread issues to Paper,
|
||||||
but we do want people to report thread issues to Gale.
|
but we do want people to report thread issues to Gale.
|
||||||
*/
|
*/
|
||||||
@@ -129,8 +129,8 @@ index bcb144ec4a836b8b32f60726bcbee218a4f62742..9ab8f897471258383623cfe3ca9ff591
|
|||||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Leaf!):" ); // Paper // Gale - branding changes // Leaf
|
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Leaf!):" ); // Paper // Gale - branding changes // Leaf
|
||||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
||||||
this.dumpTickingInfo(); // Paper - log detailed tick information
|
this.dumpTickingInfo(); // Paper - log detailed tick information
|
||||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.serverThread.getId(), Integer.MAX_VALUE ), log ); // Gale - base thread pool
|
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||||
@@ -224,7 +224,7 @@ public final class WatchdogThread extends ServerThread // Paper - rewrite chunk
|
@@ -223,7 +223,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||||
We do not want people to report thread issues to Paper,
|
We do not want people to report thread issues to Paper,
|
||||||
but we do want people to report thread issues to Gale.
|
but we do want people to report thread issues to Gale.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Leaf Config
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index a681913af54f11633d7b3fc2a833ae64028dd25d..493acdeeb56ed13a0c30d9d10b2f9171df296d98 100644
|
index d209ac7c8fe639a23904e4ebd5bade0637fb8eab..d18f72faf22e7cabee833525f08e75012471eed8 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -49,6 +49,13 @@ dependencies {
|
@@ -48,6 +48,13 @@ dependencies {
|
||||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
|
||||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
|
||||||
|
|
||||||
+ // Pufferfish start
|
+ // Pufferfish start
|
||||||
+ implementation("org.yaml:snakeyaml:1.33")
|
+ implementation("org.yaml:snakeyaml:1.33")
|
||||||
@@ -23,10 +23,10 @@ index a681913af54f11633d7b3fc2a833ae64028dd25d..493acdeeb56ed13a0c30d9d10b2f9171
|
|||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||||
index e7d93cb9b219542736ef870bbbefacc359c0b46f..ae94e908d97aa88bdac7380a48db7816e10837be 100644
|
index f749516e5d3c22e808638f3a7672aab837571b1a..61fc65624f7d9a3bfa399a58112efb7f55b31652 100644
|
||||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||||
@@ -308,8 +308,9 @@ public class TimingsExport extends Thread {
|
@@ -303,8 +303,9 @@ public class TimingsExport extends Thread {
|
||||||
pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
||||||
// Gale start - Gale configuration - include in timings
|
// Gale start - Gale configuration - include in timings
|
||||||
pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)),
|
||||||
@@ -38,10 +38,10 @@ index e7d93cb9b219542736ef870bbbefacc359c0b46f..ae94e908d97aa88bdac7380a48db7816
|
|||||||
|
|
||||||
new TimingsExport(listeners, parent, history).start();
|
new TimingsExport(listeners, parent, history).start();
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 1141b3a88e2eb1baa705b4f781353df0305a7c85..b104a38d2c879b649a3862876c389564c69e83b4 100644
|
index cafc4391d2ed3df7b0b8d73c663777cdbb3a5de9..8ba7f4aad1ff28d5f38b895e8eb47e141390e5ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -247,6 +247,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -239,6 +239,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
LOGGER.warn("If you would like to disable this message, set simd.warn-if-disabled to false in gale-global.yml");
|
LOGGER.warn("If you would like to disable this message, set simd.warn-if-disabled to false in gale-global.yml");
|
||||||
}
|
}
|
||||||
// Gale start - Pufferfish - SIMD support
|
// Gale start - Pufferfish - SIMD support
|
||||||
|
|||||||
@@ -152,20 +152,19 @@ index 0000000000000000000000000000000000000000..65c3d2989e8140259c5720222c569129
|
|||||||
+}
|
+}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 4e82ff6b3167bda96f743c79d63c10145408ad4e..a21cc8377fd44ee247f2abe006fcb4c744e4b551 100644
|
index 66f284345fe011bd317019bc035e009e90c58fdc..e178004a3360bf6841e6aa0c874ca8ef10587f49 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -413,6 +413,8 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -299,6 +299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public volatile boolean abnormalExit = false; // Paper
|
public volatile boolean abnormalExit = false; // Paper
|
||||||
public boolean isIteratingOverLevels = false; // Paper
|
public boolean isIteratingOverLevels = false; // Paper
|
||||||
|
|
||||||
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
|
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
|
||||||
+
|
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||||
public static <S extends MinecraftServer> S spin(Function<OriginalServerThread, S> serverFactory) { // Gale - base thread pool
|
|
||||||
AtomicReference<S> atomicreference = new AtomicReference();
|
AtomicReference<S> atomicreference = new AtomicReference();
|
||||||
OriginalServerThread thread = new OriginalServerThread(() -> { // Paper - rewrite chunk system // Gale - base thread pool
|
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index b104a38d2c879b649a3862876c389564c69e83b4..1704f5f29c4e36580101e760ee003d608ca3550e 100644
|
index 8ba7f4aad1ff28d5f38b895e8eb47e141390e5ea..69c594bbd52335d6779b06f9273a1ef8e8138a67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -47,6 +47,7 @@ import net.minecraft.world.level.GameRules;
|
@@ -47,6 +47,7 @@ import net.minecraft.world.level.GameRules;
|
||||||
@@ -175,8 +174,8 @@ index b104a38d2c879b649a3862876c389564c69e83b4..1704f5f29c4e36580101e760ee003d60
|
|||||||
+import org.dreeam.leaf.LeafConfig;
|
+import org.dreeam.leaf.LeafConfig;
|
||||||
import org.galemc.gale.command.GaleCommands;
|
import org.galemc.gale.command.GaleCommands;
|
||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
import org.galemc.gale.executor.thread.OriginalServerThread;
|
import org.slf4j.Logger;
|
||||||
@@ -366,6 +367,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -358,6 +359,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
DedicatedServer.LOGGER.info("JMX monitoring enabled");
|
DedicatedServer.LOGGER.info("JMX monitoring enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,18 +184,18 @@ index b104a38d2c879b649a3862876c389564c69e83b4..1704f5f29c4e36580101e760ee003d60
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index d4f99270c62cef94cc5ad5fc00f155c480722516..9eeb139d36429353a7ae94e1587c205a20d2e800 100644
|
index 3c9ff57cf8cf7e7bfca234e460ff869165bd40d3..9e743d20e9ff979ebad152f209a6ca97a533ea47 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -45,6 +45,7 @@ import net.minecraft.world.level.storage.DimensionDataStorage;
|
@@ -48,6 +48,7 @@ import net.minecraft.world.level.storage.DimensionDataStorage;
|
||||||
import net.minecraft.world.level.storage.LevelData;
|
import net.minecraft.world.level.storage.LevelData;
|
||||||
import net.minecraft.world.level.storage.LevelStorageSource;
|
import net.minecraft.world.level.storage.LevelStorageSource;
|
||||||
import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; // Paper
|
import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; // Paper
|
||||||
+import org.dreeam.leaf.LeafConfig;
|
+import org.dreeam.leaf.LeafConfig;
|
||||||
import org.galemc.gale.executor.ClosestChunkBlockableEventLoop;
|
|
||||||
import org.galemc.gale.executor.lock.YieldingLock;
|
public class ServerChunkCache extends ChunkSource {
|
||||||
import org.galemc.gale.executor.queue.BaseTaskQueues;
|
|
||||||
@@ -76,6 +77,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -75,6 +76,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<LevelChunk> loadedChunkMap = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(8192, 0.5f);
|
final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<LevelChunk> loadedChunkMap = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(8192, 0.5f);
|
||||||
|
|
||||||
private final LevelChunk[] lastLoadedChunks = new LevelChunk[4 * 4];
|
private final LevelChunk[] lastLoadedChunks = new LevelChunk[4 * 4];
|
||||||
@@ -206,7 +205,7 @@ index d4f99270c62cef94cc5ad5fc00f155c480722516..9eeb139d36429353a7ae94e1587c205a
|
|||||||
|
|
||||||
private static int getChunkCacheKey(int x, int z) {
|
private static int getChunkCacheKey(int x, int z) {
|
||||||
return x & 3 | ((z & 3) << 2);
|
return x & 3 | ((z & 3) << 2);
|
||||||
@@ -781,18 +785,25 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -553,18 +557,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
|
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
|
||||||
@@ -238,7 +237,7 @@ index d4f99270c62cef94cc5ad5fc00f155c480722516..9eeb139d36429353a7ae94e1587c205a
|
|||||||
// Gale start - MultiPaper - skip unnecessary mob spawning computations
|
// Gale start - MultiPaper - skip unnecessary mob spawning computations
|
||||||
} else {
|
} else {
|
||||||
spawnercreature_d = null;
|
spawnercreature_d = null;
|
||||||
@@ -831,8 +842,8 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -604,8 +615,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
if ((true || this.level.isNaturalSpawningAllowed(chunkcoordintpair)) && this.chunkMap.anyPlayerCloseEnoughForSpawning(holder, chunkcoordintpair, false)) { // Paper - optimise anyPlayerCloseEnoughForSpawning // Paper - the chunk is known ticking
|
if ((true || this.level.isNaturalSpawningAllowed(chunkcoordintpair)) && this.chunkMap.anyPlayerCloseEnoughForSpawning(holder, chunkcoordintpair, false)) { // Paper - optimise anyPlayerCloseEnoughForSpawning // Paper - the chunk is known ticking
|
||||||
chunk1.incrementInhabitedTime(j);
|
chunk1.incrementInhabitedTime(j);
|
||||||
@@ -249,7 +248,7 @@ index d4f99270c62cef94cc5ad5fc00f155c480722516..9eeb139d36429353a7ae94e1587c205a
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - the chunk is known ticking
|
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - the chunk is known ticking
|
||||||
@@ -890,6 +901,29 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -663,6 +674,29 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
// Paper end - controlled flush for entity tracker packets
|
// Paper end - controlled flush for entity tracker packets
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index d3b8df0766d34e557806a7578f856184c0b3d437..ccedeb88e4cbf0e1088412e72ee317c2182cb277 100644
|
index 1462f9d4f2cdf4071fb002d602783866a5a3d285..5d6c0f5d2d993ae3a044a1a02716a2662e9080d0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -934,6 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -836,6 +836,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Gale end - split tick steps
|
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||||
timings.entityTick.startTiming(); // Spigot
|
timings.entityTick.startTiming(); // Spigot
|
||||||
this.entityTickList.forEach((entity) -> {
|
this.entityTickList.forEach((entity) -> {
|
||||||
+ entity.activatedPriorityReset = false; // Pufferfish - DAB
|
+ entity.activatedPriorityReset = false; // Pufferfish - DAB
|
||||||
@@ -42,7 +42,7 @@ index d3b8df0766d34e557806a7578f856184c0b3d437..ccedeb88e4cbf0e1088412e72ee317c2
|
|||||||
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
||||||
entity.discard();
|
entity.discard();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 804c1f0377b66a9fa0eebd9ab80945e4ff6929d2..2e3ab61998d4174f231118e7a4bdc9e25563715f 100644
|
index 9d5a1d6141414d5a886891867e2062ee11de0fd2..223086fa230346e7212051710758560f874cb3b0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -125,6 +125,7 @@ import net.minecraft.world.phys.shapes.Shapes;
|
@@ -125,6 +125,7 @@ import net.minecraft.world.phys.shapes.Shapes;
|
||||||
@@ -53,7 +53,7 @@ index 804c1f0377b66a9fa0eebd9ab80945e4ff6929d2..2e3ab61998d4174f231118e7a4bdc9e2
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -419,6 +420,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -423,6 +424,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ index 804c1f0377b66a9fa0eebd9ab80945e4ff6929d2..2e3ab61998d4174f231118e7a4bdc9e2
|
|||||||
return this.yRot;
|
return this.yRot;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index ceacc0d383e2ee674783d3c0a7df0a951595faca..559bce4bbcc03117f52dc2810bad5becddf14a8e 100644
|
index 9afc81ccb237c3655d64cdbe8a0db9a4d7791043..1679f0a3d095a7b758b468c77b6d3a4c078b7962 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -300,6 +300,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -300,6 +300,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
@@ -78,10 +78,10 @@ index ceacc0d383e2ee674783d3c0a7df0a951595faca..559bce4bbcc03117f52dc2810bad5bec
|
|||||||
private String descriptionId;
|
private String descriptionId;
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index f2eca869a9301c8e6536396f55fd5dc871a3dfbc..7c6332171eae9e06588dd6ff9f023cb4e3e6079b 100644
|
index 035a0a8620fc46dbf026c65ccf2542d9f49e22b0..979b76d58d05c9d83dfae45d3052eea9431dfc65 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -221,10 +221,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -224,10 +224,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@Override
|
@Override
|
||||||
public void inactiveTick() {
|
public void inactiveTick() {
|
||||||
super.inactiveTick();
|
super.inactiveTick();
|
||||||
@@ -94,8 +94,8 @@ index f2eca869a9301c8e6536396f55fd5dc871a3dfbc..7c6332171eae9e06588dd6ff9f023cb4
|
|||||||
this.targetSelector.tick();
|
this.targetSelector.tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -900,10 +900,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -903,10 +903,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
int i = this.level.getServer().getTickCount() + this.getId();
|
int i = this.level().getServer().getTickCount() + this.getId();
|
||||||
|
|
||||||
if (i % 2 != 0 && this.tickCount > 1) {
|
if (i % 2 != 0 && this.tickCount > 1) {
|
||||||
+ if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
+ if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
||||||
@@ -154,10 +154,10 @@ index 86fc528551c2c90c78783d4d46a4a2c52e4efe41..67fa9b4fb37d20a808378f00002d00b0
|
|||||||
public boolean hasTasks() {
|
public boolean hasTasks() {
|
||||||
for (WrappedGoal task : this.availableGoals) {
|
for (WrappedGoal task : this.availableGoals) {
|
||||||
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
|
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 068c6904599f57b70b9cf166a5fe949362a7b23f..5b5d3adacda11bb0d38a4a8aebd40a570dfe692f 100644
|
index 0014951b6e33ce72b4e0184946cf8bd6d6d2e5b0..047780d1cdbe3f3ffb5f03d03733fb486f28cf98 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
@@ -223,8 +223,10 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
|
@@ -222,8 +222,10 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||||
return 0.4F;
|
return 0.4F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,11 +165,11 @@ index 068c6904599f57b70b9cf166a5fe949362a7b23f..5b5d3adacda11bb0d38a4a8aebd40a57
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel) this.level, this);
|
this.getBrain().tick((ServerLevel) this.level(), this);
|
||||||
AllayAi.updateActivity(this);
|
AllayAi.updateActivity(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
index c513138be4b343ee1868a9ef541130a637fa0744..77d7c15d328b8dcf7b458a4e4083018bb6aeae46 100644
|
index 634e884978094c48eaa8b1943ad0fb5cfc943f2c..e54e873169a822844b87adc6c4703974bf89e379 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
@@ -285,8 +285,10 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
@@ -285,8 +285,10 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
||||||
@@ -180,14 +180,14 @@ index c513138be4b343ee1868a9ef541130a637fa0744..77d7c15d328b8dcf7b458a4e4083018b
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel) this.level, this);
|
this.getBrain().tick((ServerLevel) this.level(), this);
|
||||||
AxolotlAi.updateActivity(this);
|
AxolotlAi.updateActivity(this);
|
||||||
if (!this.isNoAi()) {
|
if (!this.isNoAi()) {
|
||||||
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
|
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 c7b08018dbfb7d210ea4102518ea7e592ad01452..de05b61f460cc2352f73c8eb3b40a18afb9723a1 100644
|
index 62bf9294906c36c75367f660f9f2b9a03ebdbb86..62d7eee0c2f0e3059e13d5f8998866580b66a234 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
@@ -167,8 +167,10 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
@@ -162,8 +162,10 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,11 +195,11 @@ index c7b08018dbfb7d210ea4102518ea7e592ad01452..de05b61f460cc2352f73c8eb3b40a18a
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel)this.level, this);
|
this.getBrain().tick((ServerLevel)this.level(), this);
|
||||||
FrogAi.updateActivity(this);
|
FrogAi.updateActivity(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
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
|
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 09240841cd9216c06da8dc4059f8a60ef9022d39..561ccb25a5c50a51879f0a2b8e4cb90c29ac6d0b 100644
|
index 0f3a11203dd0353d74626a273e9003131356f5e1..c83dabddf93249a6477c10725622119c939db4d5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||||
@@ -77,8 +77,10 @@ public class Tadpole extends AbstractFish {
|
@@ -77,8 +77,10 @@ public class Tadpole extends AbstractFish {
|
||||||
@@ -210,11 +210,11 @@ index 09240841cd9216c06da8dc4059f8a60ef9022d39..561ccb25a5c50a51879f0a2b8e4cb90c
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel) this.level, this);
|
this.getBrain().tick((ServerLevel) this.level(), this);
|
||||||
TadpoleAi.updateActivity(this);
|
TadpoleAi.updateActivity(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
index ef584de97ba678176ab9bf61365d97ca61ff07cf..b8134f660dc0678db6106e7d69a8f1451e3bff2c 100644
|
index 61144e8c2ad1543816be16002b43622d1578ec73..c88c2312509906dbf45118b4a82fed2fc3e0d14d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
@@ -188,8 +188,10 @@ public class Goat extends Animal {
|
@@ -188,8 +188,10 @@ public class Goat extends Animal {
|
||||||
@@ -225,11 +225,11 @@ index ef584de97ba678176ab9bf61365d97ca61ff07cf..b8134f660dc0678db6106e7d69a8f145
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel) this.level, this);
|
this.getBrain().tick((ServerLevel) this.level(), this);
|
||||||
GoatAi.updateActivity(this);
|
GoatAi.updateActivity(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||||
index 739f4f86af7951ea42a3b248b93989de8b8f4f54..2fac1ded7ad16a186dd2c1ebef3ad70715ddffa3 100644
|
index a4b9c36e4fa3f499493436219a1dfd18cda2162f..7387979e5b17994a48a86f37f81b170695b6ad8e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||||
@@ -126,8 +126,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
@@ -126,8 +126,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||||
@@ -240,14 +240,14 @@ index 739f4f86af7951ea42a3b248b93989de8b8f4f54..2fac1ded7ad16a186dd2c1ebef3ad707
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel)this.level, this);
|
this.getBrain().tick((ServerLevel)this.level(), this);
|
||||||
HoglinAi.updateActivity(this);
|
HoglinAi.updateActivity(this);
|
||||||
if (this.isConverting()) {
|
if (this.isConverting()) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
index a2246ab400545284cb65c292012eaf8bb3376ad7..fb78f9bff486bf8aba17f02f2378a4852b1f7cca 100644
|
index 93dc4f2ac5a4302337de8ae3440a9fded2437c72..f041a2b6b330692316e7c5385651d9370377d5e0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
@@ -308,8 +308,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
@@ -305,8 +305,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||||
return !this.cannotHunt;
|
return !this.cannotHunt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,31 +255,31 @@ index a2246ab400545284cb65c292012eaf8bb3376ad7..fb78f9bff486bf8aba17f02f2378a485
|
|||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick((ServerLevel) this.level, this);
|
this.getBrain().tick((ServerLevel) this.level(), this);
|
||||||
PiglinAi.updateActivity(this);
|
PiglinAi.updateActivity(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
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
|
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 4544ce7e0f33b13a56cd4d4a3c905f71d370bbe6..d33a240b9dbd3cebe179096407c3da69f2df884a 100644
|
index 9ca38f97f5d0d533187cdcd549b1accebc93bc95..55d5aad6ee98bc61dac415b106d0b6d1048dae7e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
@@ -270,10 +270,12 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
|
@@ -271,10 +271,12 @@ public class Warden extends Monster implements VibrationSystem {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ private int behaviorTick = 0; // Pufferfish
|
+ private int behaviorTick = 0; // Pufferfish
|
||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
ServerLevel worldserver = (ServerLevel) this.level;
|
ServerLevel worldserver = (ServerLevel) this.level();
|
||||||
|
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
this.getBrain().tick(worldserver, this);
|
this.getBrain().tick(worldserver, this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
if ((this.tickCount + this.getId()) % 120 == 0) {
|
if ((this.tickCount + this.getId()) % 120 == 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index 583f8bbb242305bf1bf825e254209108fd323ad4..474de6f93631c07c75aa78ad95b71a4f89b0dcc5 100644
|
index ae3628efe7628427c53bb7d0f7fc6e457a511b94..ffe93e11c1ab6986ea73f486fbc475aca51eca4a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -142,6 +142,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -143,6 +143,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
return holder.is(PoiTypes.MEETING);
|
return holder.is(PoiTypes.MEETING);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -288,19 +288,22 @@ index 583f8bbb242305bf1bf825e254209108fd323ad4..474de6f93631c07c75aa78ad95b71a4f
|
|||||||
public Villager(EntityType<? extends Villager> entityType, Level world) {
|
public Villager(EntityType<? extends Villager> entityType, Level world) {
|
||||||
this(entityType, world, VillagerType.PLAINS);
|
this(entityType, world, VillagerType.PLAINS);
|
||||||
}
|
}
|
||||||
@@ -245,10 +247,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -246,6 +248,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
|
|
||||||
+ private int behaviorTick = 0; // Pufferfish
|
+ private int behaviorTick = 0; // Pufferfish
|
||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() { mobTick(false); }
|
@Deprecated // Paper
|
||||||
protected void mobTick(boolean inactive) {
|
protected void customServerAiStep() {
|
||||||
if (!inactive) this.getBrain().tick((ServerLevel) this.level, this); // Paper
|
@@ -255,6 +258,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
|
protected void customServerAiStep(final boolean inactive) {
|
||||||
|
// Paper end
|
||||||
|
if (!inactive) this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||||
+ // Pufferfish start
|
+ // Pufferfish start
|
||||||
+ if (!inactive) {
|
+ if (!inactive) {
|
||||||
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||||
+ this.getBrain().tick((ServerLevel) this.level, this); // Paper
|
+ this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||||
+ }
|
+ }
|
||||||
+ // Pufferfish end
|
+ // Pufferfish end
|
||||||
if (this.assignProfessionWhenSpawned) {
|
if (this.assignProfessionWhenSpawned) {
|
||||||
@@ -369,7 +372,7 @@ index 00fc9278a61b963382c03c36bc11917361c55612..51738097440030b33579b483ebac7587
|
|||||||
|
|
||||||
private static void network() {
|
private static void network() {
|
||||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
index 754c8ab99b908b017b9ef4ceaa3ae67c7266ac44..ff247e28fef12d7cd18175b65811fb97a2828dad 100644
|
index 4dc59a82f12a727f6db4a68bc1f5bd65c8cb08cc..aa6969641168f56e4e147ab211424b1eaeb70075 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
@@ -38,7 +38,11 @@ import co.aikar.timings.MinecraftTimings;
|
@@ -38,7 +38,11 @@ import co.aikar.timings.MinecraftTimings;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ Original license: GPL v3
|
|||||||
Original project: https://github.com/pufferfish-gg/Pufferfish
|
Original project: https://github.com/pufferfish-gg/Pufferfish
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 7c6332171eae9e06588dd6ff9f023cb4e3e6079b..23f9b67ed0f9ec357d2ef8220f6f21c74248dcd2 100644
|
index 979b76d58d05c9d83dfae45d3052eea9431dfc65..1674f9accbbbb9ecdd99f05da6032398c4d82b38 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -84,6 +84,7 @@ import org.bukkit.event.entity.EntityTargetEvent;
|
@@ -83,6 +83,7 @@ import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.event.entity.EntityTransformEvent;
|
import org.bukkit.event.entity.EntityTransformEvent;
|
||||||
import org.bukkit.event.entity.EntityUnleashEvent;
|
import org.bukkit.event.entity.EntityUnleashEvent;
|
||||||
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
|
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
|
||||||
@@ -18,7 +18,7 @@ index 7c6332171eae9e06588dd6ff9f023cb4e3e6079b..23f9b67ed0f9ec357d2ef8220f6f21c7
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class Mob extends LivingEntity implements Targeting {
|
public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@@ -217,11 +218,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -220,11 +221,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
return this.lookControl;
|
return this.lookControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ Original license: GPL v3
|
|||||||
Original project: https://github.com/pufferfish-gg/Pufferfish
|
Original project: https://github.com/pufferfish-gg/Pufferfish
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 2e3ab61998d4174f231118e7a4bdc9e25563715f..101ce131804492779e34218c65879398794e2d7f 100644
|
index 223086fa230346e7212051710758560f874cb3b0..c6069b70d188a45950be27f9f6c63c8218dea7fa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -822,6 +822,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -828,6 +828,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public void baseTick() {
|
public void baseTick() {
|
||||||
@@ -24,7 +24,7 @@ index 2e3ab61998d4174f231118e7a4bdc9e25563715f..101ce131804492779e34218c65879398
|
|||||||
this.feetBlockState = null;
|
this.feetBlockState = null;
|
||||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index 559bce4bbcc03117f52dc2810bad5becddf14a8e..8af0918d3a62de58a4b2af55022c812bb0e46092 100644
|
index 1679f0a3d095a7b758b468c77b6d3a4c078b7962..aa5cec6d56d7a8e80861aa4c9b4a74ca3e64be8c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -301,6 +301,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -301,6 +301,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
|
|||||||
@@ -5,27 +5,19 @@ Subject: [PATCH] Bump Dependencies
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 586d7998918fdb8b1db3c433d10234b6d7943115..c068173108818b8b042e1c1f518cf60bbf25c9b3 100644
|
index d18f72faf22e7cabee833525f08e75012471eed8..d4593da8d4cf893847705e394264dabf303c7912 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -11,13 +11,13 @@ dependencies {
|
@@ -16,7 +16,7 @@ dependencies {
|
||||||
// Depend on own API
|
|
||||||
implementation(project(":leaf-api")) // Leaf
|
|
||||||
// Depend on Paper MojangAPI
|
|
||||||
- implementation("io.papermc.paper:paper-mojangapi:1.19.3-R0.1-SNAPSHOT") {
|
|
||||||
+ implementation("io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT") { // Leaf - Bump Dependencies
|
|
||||||
exclude("io.papermc.paper", "paper-api")
|
|
||||||
}
|
}
|
||||||
// Gale end - project setup
|
// Gale end - project setup
|
||||||
- implementation("io.projectreactor.tools:blockhound:1.0.7.RELEASE") // Gale - base thread pool - watch for blocking base threads
|
|
||||||
+ implementation("io.projectreactor.tools:blockhound:1.0.8.RELEASE") // Gale - base thread pool - watch for blocking base threads // Leaf - Bump Dependencies
|
|
||||||
// Paper start
|
// Paper start
|
||||||
- implementation("org.jline:jline-terminal-jansi:3.21.0")
|
- implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
+ implementation("org.jline:jline-terminal-jansi:3.23.0") // Leaf - Bump Dependencies
|
+ implementation("org.jline:jline-terminal-jansi:3.23.0") // Leaf - Bump Dependencies
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
/*
|
/*
|
||||||
Required to add the missing Log4j2Plugins.dat file from log4j-core
|
Required to add the missing Log4j2Plugins.dat file from log4j-core
|
||||||
@@ -25,14 +25,16 @@ dependencies {
|
@@ -24,14 +24,16 @@ dependencies {
|
||||||
all its classes to check if they are plugins.
|
all its classes to check if they are plugins.
|
||||||
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||||
*/
|
*/
|
||||||
@@ -49,8 +41,8 @@ index 586d7998918fdb8b1db3c433d10234b6d7943115..c068173108818b8b042e1c1f518cf60b
|
|||||||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||||
implementation("commons-lang:commons-lang:2.6")
|
implementation("commons-lang:commons-lang:2.6")
|
||||||
implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||||
@@ -40,7 +42,7 @@ dependencies {
|
@@ -39,7 +41,7 @@ dependencies {
|
||||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
|
||||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||||
// Paper start - Use Velocity cipher
|
// Paper start - Use Velocity cipher
|
||||||
- implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
|
- implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
|
||||||
@@ -58,17 +50,7 @@ index 586d7998918fdb8b1db3c433d10234b6d7943115..c068173108818b8b042e1c1f518cf60b
|
|||||||
isTransitive = false
|
isTransitive = false
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -49,22 +51,25 @@ dependencies {
|
@@ -50,16 +52,18 @@ dependencies {
|
||||||
implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
|
||||||
implementation("dev.omega24:upnp4j:1.0") // Purpur
|
|
||||||
|
|
||||||
- runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
|
||||||
- runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
|
||||||
- runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
|
||||||
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.1")
|
|
||||||
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.7")
|
|
||||||
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.7")
|
|
||||||
+ // Leaf end
|
|
||||||
|
|
||||||
// Pufferfish start
|
// Pufferfish start
|
||||||
implementation("org.yaml:snakeyaml:1.33")
|
implementation("org.yaml:snakeyaml:1.33")
|
||||||
@@ -90,8 +72,8 @@ index 586d7998918fdb8b1db3c433d10234b6d7943115..c068173108818b8b042e1c1f518cf60b
|
|||||||
+ // Leaf end
|
+ // Leaf end
|
||||||
}
|
}
|
||||||
|
|
||||||
val craftbukkitPackageVersion = "1_19_R3" // Paper
|
val craftbukkitPackageVersion = "1_20_R1" // Paper
|
||||||
@@ -231,3 +236,6 @@ tasks.registerRunTask("runDev") {
|
@@ -225,3 +229,6 @@ tasks.registerRunTask("runDev") {
|
||||||
description = "Spin up a non-relocated Mojang-mapped test server"
|
description = "Spin up a non-relocated Mojang-mapped test server"
|
||||||
classpath(sourceSets.main.map { it.runtimeClasspath })
|
classpath(sourceSets.main.map { it.runtimeClasspath })
|
||||||
}
|
}
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Github Actions <no-reply@github.com>
|
|
||||||
Date: Wed, 24 May 2023 06:00:03 +0800
|
|
||||||
Subject: [PATCH] Purpur Base
|
|
||||||
|
|
||||||
Original license: MIT
|
|
||||||
Original project: https://github.com/PurpurMC/Purpur
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
||||||
index 493acdeeb56ed13a0c30d9d10b2f9171df296d98..3c1e97fb031f7cdf73ecb6cf8ec662e08b78f96f 100644
|
|
||||||
--- a/build.gradle.kts
|
|
||||||
+++ b/build.gradle.kts
|
|
||||||
@@ -45,6 +45,10 @@ dependencies {
|
|
||||||
}
|
|
||||||
// Paper end
|
|
||||||
|
|
||||||
+ implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
|
||||||
+ implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
|
||||||
+ implementation("dev.omega24:upnp4j:1.0") // Purpur
|
|
||||||
+
|
|
||||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
|
||||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
|
||||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
|
||||||
@@ -168,7 +172,7 @@ fun TaskContainer.registerRunTask(
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Gale end - use default Java installation for development runs
|
|
||||||
- group = "paper"
|
|
||||||
+ group = "paperweight" // Purpur
|
|
||||||
mainClass.set("org.bukkit.craftbukkit.Main")
|
|
||||||
standardInput = System.`in`
|
|
||||||
workingDir = rootProject.layout.projectDirectory
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
||||||
index 4e56018b64d11f76c8da43fd8f85c6de72204e36..aa8212432825db65cf485cd93f734ccd9eefcb5a 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
||||||
@@ -21,7 +21,12 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendMessage(String message) {
|
|
||||||
- this.sendRawMessage(message);
|
|
||||||
+ // Purpur start
|
|
||||||
+ String[] parts = message.split("\n");
|
|
||||||
+ for (String part : parts) {
|
|
||||||
+ this.sendRawMessage(part);
|
|
||||||
+ }
|
|
||||||
+ // Purpur end
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -91,7 +96,7 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
|
|
||||||
// Paper start
|
|
||||||
@Override
|
|
||||||
public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) {
|
|
||||||
- this.sendRawMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(message));
|
|
||||||
+ this.sendMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(message)); // Purpur
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
diff --git a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
||||||
index 7fee1c2779ab390586b2d3f75f56890846323500..5fdb227acfd1d8f55b770c8a66e97494c36db33c 100644
|
|
||||||
--- a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
||||||
+++ b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
||||||
@@ -68,7 +68,7 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
|
|
||||||
// Gale end - branding changes - version fetcher
|
|
||||||
final Component history = getHistory();
|
|
||||||
|
|
||||||
- return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
|
||||||
+ return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
|
||||||
}
|
|
||||||
|
|
||||||
protected @Nullable String getMinecraftVersion() { // Gale - branding changes - version fetcher
|
|
||||||
@@ -120,13 +120,13 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
|
|
||||||
|
|
||||||
switch (distance) {
|
|
||||||
case -1:
|
|
||||||
- return Component.text("Error obtaining version information", NamedTextColor.YELLOW);
|
|
||||||
+ return Component.text("* Error obtaining version information", NamedTextColor.RED); // Purpur
|
|
||||||
case 0:
|
|
||||||
- return Component.text("You are running the latest version", NamedTextColor.GREEN);
|
|
||||||
+ return Component.text("* You are running the latest version", NamedTextColor.GREEN); // Purpur
|
|
||||||
case -2:
|
|
||||||
- return Component.text("Unknown version", NamedTextColor.YELLOW);
|
|
||||||
+ return Component.text("* Unknown version", NamedTextColor.YELLOW); // Purpur
|
|
||||||
default:
|
|
||||||
- return Component.text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW)
|
|
||||||
+ return Component.text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur
|
|
||||||
.append(Component.newline())
|
|
||||||
.append(Component.text("Download the new version at: ")
|
|
||||||
.append(Component.text(this.downloadPage, NamedTextColor.GOLD) // Gale - branding changes - version fetcher
|
|
||||||
@@ -174,6 +174,6 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return Component.text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC);
|
|
||||||
+ return org.bukkit.ChatColor.parseMM("<grey>Previous: %s", oldVersion); // Purpur
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove Mojang username check
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 5ed89ce9d2c29927f48c1f7f8f9288f39d68b56c..30371f1a6dfb6fc170ac0cbdb3a7c78c837429c2 100644
|
index 5b7c12db86be64433c65e31e3ecc0b444b0ddf48..cb8c4f91663c8653a1918a3864c17171c70ebe78 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -37,6 +37,7 @@ import net.minecraft.util.Crypt;
|
@@ -37,6 +37,7 @@ import net.minecraft.util.Crypt;
|
||||||
@@ -16,7 +16,7 @@ index 5ed89ce9d2c29927f48c1f7f8f9288f39d68b56c..30371f1a6dfb6fc170ac0cbdb3a7c78c
|
|||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@@ -245,10 +246,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -243,10 +244,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
public void handleHello(ServerboundHelloPacket packet) {
|
public void handleHello(ServerboundHelloPacket packet) {
|
||||||
// Gale start - JettPack - reduce array allocations
|
// Gale start - JettPack - reduce array allocations
|
||||||
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", ArrayConstants.emptyObjectArray);
|
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", ArrayConstants.emptyObjectArray);
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove Spigot Check for Broken BungeeCord Configurations
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
index f3bbfb472b9be083dd1f1a317b90dda5c3c4f851..ff24597a21d2fb6b4143679e18e0a89d2e2d3914 100644
|
index 2821de09a36fc315897129f4691ba713386737db..3f60c1e5bf49784ac2a812157a5d22ce28e34ed6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
@@ -11,6 +11,7 @@ import net.minecraft.network.protocol.handshake.ServerHandshakePacketListener;
|
@@ -11,6 +11,7 @@ import net.minecraft.network.protocol.handshake.ServerHandshakePacketListener;
|
||||||
@@ -7,18 +7,18 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang.
|
|||||||
By removing this check, it enable hackers to use some modules of hack clients.
|
By removing this check, it enable hackers to use some modules of hack clients.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 5ee7fee40fd930424456f4f454e94bc88951b0d2..a157789fc6f3bdcbbf7321d5238c746833511630 100644
|
index 79dba3796df83d0127db6e29f38a35e1d3289724..297a9c2eba28c66c511ba83daeaa3e8a07fa6504 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -190,6 +190,7 @@ import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
@@ -189,6 +189,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
import org.galemc.gale.executor.queue.BaseTaskQueues;
|
|
||||||
import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues;
|
|
||||||
+import org.dreeam.leaf.LeafConfig;
|
+import org.dreeam.leaf.LeafConfig;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -2044,7 +2045,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1977,7 +1978,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
Vec3 vec3d2 = vec3d.subtract(vec3d1);
|
Vec3 vec3d2 = vec3d.subtract(vec3d1);
|
||||||
double d0 = 1.0000001D;
|
double d0 = 1.0000001D;
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Original license: MIT
|
|||||||
Original project: https://github.com/KeYiMC/KeYi
|
Original project: https://github.com/KeYiMC/KeYi
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index e363891e8ab872ed24c557e3f94110f36c6fb277..e61ce64d14e0c216f9462ebbf640b1b60fdfcd87 100644
|
index 548eddde8b0558b780f672d321507cfcbac92558..132d50e23ba713ab9178e17b34332b9af74f63f5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -25,6 +25,11 @@ import java.util.Optional;
|
@@ -25,6 +25,11 @@ import java.util.Optional;
|
||||||
@@ -30,10 +30,10 @@ index e363891e8ab872ed24c557e3f94110f36c6fb277..e61ce64d14e0c216f9462ebbf640b1b6
|
|||||||
import org.bukkit.map.MapCursor;
|
import org.bukkit.map.MapCursor;
|
||||||
import org.bukkit.map.MapView;
|
import org.bukkit.map.MapView;
|
||||||
import org.bukkit.metadata.MetadataValue;
|
import org.bukkit.metadata.MetadataValue;
|
||||||
@@ -3304,4 +3310,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -3144,4 +3150,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.getHandle().connection.send(packet);
|
return this.spigot;
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Spigot end
|
||||||
+
|
+
|
||||||
+ // KeYi start
|
+ // KeYi start
|
||||||
+ @Override
|
+ @Override
|
||||||
@@ -7,10 +7,10 @@ Original license: MIT
|
|||||||
Original project: https://github.com/KeYiMC/KeYi
|
Original project: https://github.com/KeYiMC/KeYi
|
||||||
|
|
||||||
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||||
index 0b4621b60c2eee7201b38016063ec3db11706022..4892c6d9e1df2f25ae82c98bdabbe807e8c58b2e 100644
|
index c03a6650d65ada6014019b09b29dc4d4f9b21286..961bb821d9e0fa795c8e086c9d2c6f5714fb14f9 100644
|
||||||
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||||
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
||||||
@@ -325,7 +325,7 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
@@ -323,7 +323,7 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
||||||
|
|
||||||
public boolean entitiesCanEatBlocksInNonTickingChunks = false; // Gale - Purpur - prevent entities eating blocks in non-ticking chunks
|
public boolean entitiesCanEatBlocksInNonTickingChunks = false; // Gale - Purpur - prevent entities eating blocks in non-ticking chunks
|
||||||
public boolean entitiesCanRandomStrollIntoNonTickingChunks = true; // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks
|
public boolean entitiesCanRandomStrollIntoNonTickingChunks = true; // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks
|
||||||
@@ -7,7 +7,7 @@ Original license: MIT
|
|||||||
Original project: https://github.com/KeYiMC/KeYi
|
Original project: https://github.com/KeYiMC/KeYi
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index bcfa484d9729242ae9e4dec2443d18d98dfd9243..5c08b2687f6588339a27cc3a8a80255473024014 100644
|
index fb0cd2ad93d2dbd678662f2cdad0851fd698cf3d..a45dd00d9cf335156d67d711f3ac5d6e6fe67314 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -38,6 +38,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
@@ -38,6 +38,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||||
@@ -18,7 +18,7 @@ index bcfa484d9729242ae9e4dec2443d18d98dfd9243..5c08b2687f6588339a27cc3a8a802554
|
|||||||
|
|
||||||
public class ItemEntity extends Entity implements TraceableEntity {
|
public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
@@ -331,7 +332,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -330,7 +331,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
ItemStack itemstack1 = other.getItem();
|
ItemStack itemstack1 = other.getItem();
|
||||||
|
|
||||||
if (Objects.equals(this.target, other.target) && ItemEntity.areMergable(itemstack, itemstack1)) {
|
if (Objects.equals(this.target, other.target) && ItemEntity.areMergable(itemstack, itemstack1)) {
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: peaches94 <peachescu94@gmail.com>
|
|
||||||
Date: Sun, 10 Jul 2022 13:29:20 -0500
|
|
||||||
Subject: [PATCH] Petal: reduce work done by game event system
|
|
||||||
|
|
||||||
Original license: GPL v3
|
|
||||||
Original project: https://github.com/Bloom-host/Petal
|
|
||||||
|
|
||||||
1. going into game event dispatching can be expensive so run the checks before dispatching
|
|
||||||
|
|
||||||
2. EuclideanGameEventListenerRegistry is not used concurrently so we ban that usage for improved performance with allays
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
|
||||||
index 902f2b39104bf059849228829bfe93b6dbc757d4..088bc38bfe82532a9ec80a96de8178dee21d07d6 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
|
||||||
@@ -85,6 +85,13 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // petal start
|
|
||||||
+ @Override
|
|
||||||
+ public boolean listensToEvent(GameEvent gameEvent, GameEvent.Context context) {
|
|
||||||
+ return !this.isRemoved() && gameEvent == GameEvent.ENTITY_DIE && context.sourceEntity() instanceof LivingEntity;
|
|
||||||
+ }
|
|
||||||
+ // petal end
|
|
||||||
+
|
|
||||||
public static void serverTick(Level world, BlockPos pos, BlockState state, SculkCatalystBlockEntity blockEntity) {
|
|
||||||
org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = blockEntity.getBlockPos(); // CraftBukkit - SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
|
|
||||||
blockEntity.sculkSpreader.updateCursors(world, pos, world.getRandom(), true);
|
|
||||||
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 fa9cb1312501689c70a3433e625b8704647e9273..27e4c92a3af2cf2396db6326859b3f6d62b5aaaf 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
||||||
@@ -83,7 +83,18 @@ public class LevelChunk extends ChunkAccess {
|
|
||||||
private Supplier<ChunkHolder.FullChunkStatus> fullStatus;
|
|
||||||
@Nullable
|
|
||||||
private LevelChunk.PostLoadProcessor postLoad;
|
|
||||||
- private final Int2ObjectMap<GameEventListenerRegistry> gameEventListenerRegistrySections;
|
|
||||||
+ // petal start
|
|
||||||
+ private final GameEventListenerRegistry[] gameEventListenerRegistrySections;
|
|
||||||
+ private static final int GAME_EVENT_DISPATCHER_RADIUS = 2;
|
|
||||||
+
|
|
||||||
+ private static int getGameEventSectionIndex(int sectionIndex) {
|
|
||||||
+ return sectionIndex + GAME_EVENT_DISPATCHER_RADIUS;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ private static int getGameEventSectionLength(int sectionCount) {
|
|
||||||
+ return sectionCount + (GAME_EVENT_DISPATCHER_RADIUS * 2);
|
|
||||||
+ }
|
|
||||||
+ // petal end
|
|
||||||
private final LevelChunkTicks<Block> blockTicks;
|
|
||||||
private final LevelChunkTicks<Fluid> fluidTicks;
|
|
||||||
|
|
||||||
@@ -112,7 +123,7 @@ public class LevelChunk extends ChunkAccess {
|
|
||||||
this.tickersInLevel = Maps.newHashMap();
|
|
||||||
this.clientLightReady = false;
|
|
||||||
this.level = (ServerLevel) world; // CraftBukkit - type
|
|
||||||
- this.gameEventListenerRegistrySections = new Int2ObjectOpenHashMap();
|
|
||||||
+ this.gameEventListenerRegistrySections = new GameEventListenerRegistry[getGameEventSectionLength(this.getSectionsCount())]; // petal
|
|
||||||
Heightmap.Types[] aheightmap_type = Heightmap.Types.values();
|
|
||||||
int j = aheightmap_type.length;
|
|
||||||
|
|
||||||
@@ -438,9 +449,23 @@ public class LevelChunk extends ChunkAccess {
|
|
||||||
if (world instanceof ServerLevel) {
|
|
||||||
ServerLevel worldserver = (ServerLevel) world;
|
|
||||||
|
|
||||||
- return (GameEventListenerRegistry) this.gameEventListenerRegistrySections.computeIfAbsent(ySectionCoord, (j) -> {
|
|
||||||
- return new EuclideanGameEventListenerRegistry(worldserver);
|
|
||||||
- });
|
|
||||||
+ // petal start
|
|
||||||
+ int sectionIndex = getGameEventSectionIndex(this.getSectionIndexFromSectionY(ySectionCoord));
|
|
||||||
+
|
|
||||||
+ // drop game events that are too far away (32 blocks) from loaded sections
|
|
||||||
+ // this matches the highest radius of game events in the game
|
|
||||||
+ if (sectionIndex < 0 || sectionIndex >= this.gameEventListenerRegistrySections.length) {
|
|
||||||
+ return GameEventListenerRegistry.NOOP;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ var dispatcher = this.gameEventListenerRegistrySections[sectionIndex];
|
|
||||||
+
|
|
||||||
+ if (dispatcher == null) {
|
|
||||||
+ dispatcher = this.gameEventListenerRegistrySections[sectionIndex] = new EuclideanGameEventListenerRegistry(worldserver);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return dispatcher;
|
|
||||||
+ // petal end
|
|
||||||
} else {
|
|
||||||
return super.getListenerRegistry(ySectionCoord);
|
|
||||||
}
|
|
||||||
@@ -804,7 +829,7 @@ public class LevelChunk extends ChunkAccess {
|
|
||||||
|
|
||||||
gameeventlistenerregistry.unregister(gameeventlistener);
|
|
||||||
if (gameeventlistenerregistry.isEmpty()) {
|
|
||||||
- this.gameEventListenerRegistrySections.remove(i);
|
|
||||||
+ this.gameEventListenerRegistrySections[getGameEventSectionIndex(this.getSectionIndexFromSectionY(i))] = null; // petal
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/EuclideanGameEventListenerRegistry.java b/src/main/java/net/minecraft/world/level/gameevent/EuclideanGameEventListenerRegistry.java
|
|
||||||
index 878a42695ecedf0c3f2e6310e3ce44c6b6c36858..3c3168284bfc22dab4037a861aff9f1712cb1c05 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/gameevent/EuclideanGameEventListenerRegistry.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/EuclideanGameEventListenerRegistry.java
|
|
||||||
@@ -12,8 +12,8 @@ import net.minecraft.world.phys.Vec3;
|
|
||||||
|
|
||||||
public class EuclideanGameEventListenerRegistry implements GameEventListenerRegistry {
|
|
||||||
private final List<GameEventListener> listeners = Lists.newArrayList();
|
|
||||||
- private final Set<GameEventListener> listenersToRemove = Sets.newHashSet();
|
|
||||||
- private final List<GameEventListener> listenersToAdd = Lists.newArrayList();
|
|
||||||
+ //private final Set<GameEventListener> listenersToRemove = Sets.newHashSet(); // petal - not necessary
|
|
||||||
+ //private final List<GameEventListener> listenersToAdd = Lists.newArrayList(); // petal
|
|
||||||
private boolean processing;
|
|
||||||
private final ServerLevel level;
|
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ public class EuclideanGameEventListenerRegistry implements GameEventListenerRegi
|
|
||||||
@Override
|
|
||||||
public void register(GameEventListener listener) {
|
|
||||||
if (this.processing) {
|
|
||||||
- this.listenersToAdd.add(listener);
|
|
||||||
+ throw new java.util.ConcurrentModificationException(); // petal - disallow concurrent modification
|
|
||||||
} else {
|
|
||||||
this.listeners.add(listener);
|
|
||||||
}
|
|
||||||
@@ -40,7 +40,7 @@ public class EuclideanGameEventListenerRegistry implements GameEventListenerRegi
|
|
||||||
@Override
|
|
||||||
public void unregister(GameEventListener listener) {
|
|
||||||
if (this.processing) {
|
|
||||||
- this.listenersToRemove.add(listener);
|
|
||||||
+ throw new java.util.ConcurrentModificationException(); // petal - disallow concurrent modification
|
|
||||||
} else {
|
|
||||||
this.listeners.remove(listener);
|
|
||||||
}
|
|
||||||
@@ -57,7 +57,7 @@ public class EuclideanGameEventListenerRegistry implements GameEventListenerRegi
|
|
||||||
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
GameEventListener gameEventListener = iterator.next();
|
|
||||||
- if (this.listenersToRemove.remove(gameEventListener)) {
|
|
||||||
+ if (false) { // petal - disallow concurrent modification
|
|
||||||
iterator.remove();
|
|
||||||
} else {
|
|
||||||
Optional<Vec3> optional = getPostableListenerPosition(this.level, pos, gameEventListener);
|
|
||||||
@@ -71,6 +71,8 @@ public class EuclideanGameEventListenerRegistry implements GameEventListenerRegi
|
|
||||||
this.processing = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // petal start
|
|
||||||
+ /*
|
|
||||||
if (!this.listenersToAdd.isEmpty()) {
|
|
||||||
this.listeners.addAll(this.listenersToAdd);
|
|
||||||
this.listenersToAdd.clear();
|
|
||||||
@@ -80,6 +82,8 @@ public class EuclideanGameEventListenerRegistry implements GameEventListenerRegi
|
|
||||||
this.listeners.removeAll(this.listenersToRemove);
|
|
||||||
this.listenersToRemove.clear();
|
|
||||||
}
|
|
||||||
+ */
|
|
||||||
+ // petal end
|
|
||||||
|
|
||||||
return bl;
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/GameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/GameEventListener.java
|
|
||||||
index a6689c03777c2b4b79dcafcae5d70c949519cd8e..f94169a3e177251a05644e3e384ac0514efd3719 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/gameevent/GameEventListener.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/GameEventListener.java
|
|
||||||
@@ -18,4 +18,10 @@ public interface GameEventListener {
|
|
||||||
UNSPECIFIED,
|
|
||||||
BY_DISTANCE;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // petal start - add check for seeing if this listener cares about an event
|
|
||||||
+ default boolean listensToEvent(net.minecraft.world.level.gameevent.GameEvent gameEvent, net.minecraft.world.level.gameevent.GameEvent.Context context) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ // petal end
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
|
||||||
index 103e12ec589dcbe6dbad7432b50e0644c3a37b1b..c90a827ca260d5f010c699488cba0dd00f9e97e4 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
|
||||||
@@ -228,6 +228,13 @@ public class VibrationListener implements GameEventListener {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // petal start
|
|
||||||
+ @Override
|
|
||||||
+ public boolean listensToEvent(GameEvent gameEvent, GameEvent.Context context) {
|
|
||||||
+ return this.currentVibration == null && gameEvent.is(this.config.getListenableEvents());
|
|
||||||
+ }
|
|
||||||
+ // petal end
|
|
||||||
+
|
|
||||||
public interface VibrationListenerConfig {
|
|
||||||
|
|
||||||
default TagKey<GameEvent> getListenableEvents() {
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: peaches94 <peachescu94@gmail.com>
|
|
||||||
Date: Sun, 10 Jul 2022 15:44:38 -0500
|
|
||||||
Subject: [PATCH] Petal: Reduce sensor work
|
|
||||||
|
|
||||||
Original license: GPL v3
|
|
||||||
Original project: https://github.com/Bloom-host/Petal
|
|
||||||
|
|
||||||
this patch is focused around the sensors used for ai
|
|
||||||
delete the line of sight cache less often and use a faster nearby comparison
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
index 89a2e52dd1d93a9521d48218711f92305b0d7848..44248144491354b8ae0ebfede1de3091c06aa8f8 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
@@ -1019,20 +1019,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entity != null) {
|
|
||||||
- ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
|
|
||||||
+ // petal start - only do itemstack lookup if we need to
|
|
||||||
+ //ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
|
|
||||||
EntityType<?> entitytypes = entity.getType();
|
|
||||||
|
|
||||||
// Purpur start
|
|
||||||
- if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL)) {
|
|
||||||
+ if (entitytypes == EntityType.SKELETON && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.SKELETON_SKULL)) {
|
|
||||||
d0 *= entity.level.purpurConfig.skeletonHeadVisibilityPercent;
|
|
||||||
}
|
|
||||||
- else if (entitytypes == EntityType.ZOMBIE && itemstack.is(Items.ZOMBIE_HEAD)) {
|
|
||||||
+ else if (entitytypes == EntityType.ZOMBIE && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.ZOMBIE_HEAD)) {
|
|
||||||
d0 *= entity.level.purpurConfig.zombieHeadVisibilityPercent;
|
|
||||||
}
|
|
||||||
- else if (entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) {
|
|
||||||
+ else if (entitytypes == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) {
|
|
||||||
d0 *= entity.level.purpurConfig.creeperHeadVisibilityPercent;
|
|
||||||
}
|
|
||||||
- else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && itemstack.is(Items.PIGLIN_HEAD)) {
|
|
||||||
+ else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) {
|
|
||||||
d0 *= entity.level.purpurConfig.piglinHeadVisibilityPercent;
|
|
||||||
}
|
|
||||||
// Purpur end
|
|
||||||
@@ -1047,6 +1048,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Purpur end
|
|
||||||
+ // petal end
|
|
||||||
}
|
|
||||||
|
|
||||||
return d0;
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
||||||
index ad56f2ecd8bb74d94974fdd05f4550b48e6b8d9e..2f2b0c7a2ed23b956668cb1aa15eda9747a70afe 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
||||||
@@ -928,8 +928,8 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Paper end
|
|
||||||
- this.sensing.tick();
|
|
||||||
- int i = this.level.getServer().getTickCount() + this.getId();
|
|
||||||
+ int i = this.level.getServer().getTickCount() + this.getId(); // petal - move up
|
|
||||||
+ if (i % 10 == 0) this.sensing.tick(); // petal - only refresh line of sight cache every half second
|
|
||||||
|
|
||||||
if (i % 2 != 0 && this.tickCount > 1) {
|
|
||||||
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
|
|
||||||
@@ -7,41 +7,41 @@ Original license: MIT
|
|||||||
Original project: https://github.com/Cryptite/Slice
|
Original project: https://github.com/Cryptite/Slice
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 97f29244a4e7cf4edb346b9f0d8d61f320fe9ee0..ae1931d4756f237c3f3ad74eefabfc8de84cde40 100644
|
index f4cc145f2670dee5893eeb1891b3fb8bfadd9b36..25fe104b1bc92ae6b21000c9accdfdb02493fe1f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -283,6 +283,7 @@ public class ServerPlayer extends Player {
|
@@ -278,6 +278,7 @@ public class ServerPlayer extends Player {
|
||||||
private boolean ramBar = false; // Purpur
|
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||||
private boolean tpsBar = false; // Purpur
|
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||||
private boolean compassBar = false; // Purpur
|
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
||||||
+ public boolean smoothWorldTeleport; // Slice
|
+ public boolean smoothWorldTeleport; // Slice
|
||||||
|
|
||||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
|
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1));
|
||||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
public io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 4e1db6c64254eeef8579d4cae5919b5a6a18d200..297141cb63786dc356a70ee8af2614fe060b9373 100644
|
index 88d350ecfb16e34d6710ad7b17ce7438e4dbceb9..0669c806b8c6b150183b4e02146f970bc4c3e225 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -989,12 +989,12 @@ public abstract class PlayerList {
|
@@ -942,12 +942,12 @@ public abstract class PlayerList {
|
||||||
int i = flag ? 1 : 0;
|
int i = flag ? 1 : 0;
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
LevelData worlddata = worldserver1.getLevelData();
|
LevelData worlddata = worldserver1.getLevelData();
|
||||||
- entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
|
- entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation(), entityplayer1.getPortalCooldown()));
|
||||||
+ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
|
+ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation(), entityplayer1.getPortalCooldown())); // Slice
|
||||||
entityplayer1.connection.send(new ClientboundSetChunkCacheRadiusPacket(worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetSendDistance())); // Spigot // Paper - replace old player chunk management
|
entityplayer1.connection.send(new ClientboundSetChunkCacheRadiusPacket(worldserver1.getWorld().getSendViewDistance())); // Spigot // Paper - replace old player chunk management
|
||||||
entityplayer1.connection.send(new ClientboundSetSimulationDistancePacket(worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetTickViewDistance())); // Spigot // Paper - replace old player chunk management
|
entityplayer1.connection.send(new ClientboundSetSimulationDistancePacket(worldserver1.getWorld().getSimulationDistance())); // Spigot // Paper - replace old player chunk management
|
||||||
entityplayer1.spawnIn(worldserver1);
|
entityplayer1.spawnIn(worldserver1);
|
||||||
entityplayer1.unsetRemoved();
|
entityplayer1.unsetRemoved();
|
||||||
- entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
- entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
||||||
+ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
+ if (!entityplayer.smoothWorldTeleport) entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); // Slice
|
||||||
entityplayer1.setShiftKeyDown(false);
|
entityplayer1.setShiftKeyDown(false);
|
||||||
|
|
||||||
// entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
|
// entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index e61ce64d14e0c216f9462ebbf640b1b60fdfcd87..8467f815b17e3a9ed28c525da63c0477a322462b 100644
|
index 132d50e23ba713ab9178e17b34332b9af74f63f5..073f4e31bcd796484340dead39539b026e72680f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1273,6 +1273,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1242,6 +1242,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,10 +8,10 @@ Original project: https://github.com/PaperMC/Velocity
|
|||||||
Paper pull request: https://github.com/PaperMC/Paper/pull/8418
|
Paper pull request: https://github.com/PaperMC/Paper/pull/8418
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
index 1f4b64a5f812376c499c98cb4be62469bd0b7dbe..1f4320d8243cc64b86892c23c601d14101d5a7ad 100644
|
index 9938bb90bef84cf784f9a1ceb02a1a45aa8b48a1..f5080a3716a65a7175b043c41f1e002322ecbf70 100644
|
||||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
@@ -105,6 +105,18 @@ public class FriendlyByteBuf extends ByteBuf {
|
@@ -103,6 +103,18 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getVarIntSize(int value) {
|
public static int getVarIntSize(int value) {
|
||||||
@@ -30,7 +30,7 @@ index 1f4b64a5f812376c499c98cb4be62469bd0b7dbe..1f4320d8243cc64b86892c23c601d141
|
|||||||
for (int j = 1; j < 5; ++j) {
|
for (int j = 1; j < 5; ++j) {
|
||||||
if ((value & -1 << j * 7) == 0) {
|
if ((value & -1 << j * 7) == 0) {
|
||||||
return j;
|
return j;
|
||||||
@@ -615,6 +627,21 @@ public class FriendlyByteBuf extends ByteBuf {
|
@@ -613,6 +625,21 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FriendlyByteBuf writeVarInt(int value) {
|
public FriendlyByteBuf writeVarInt(int value) {
|
||||||
@@ -7,7 +7,7 @@ Original license: GPLv3
|
|||||||
Original project: https://github.com/ProjectEdenGG/Parchment
|
Original project: https://github.com/ProjectEdenGG/Parchment
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
diff --git a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||||
index 7784d72ddd6db00c674e22759c00c430222c4b85..b336789b74d6d6819b38e78cb2014f61de3f004b 100644
|
index 463c6d8d5b114816ed9065558285945817c30385..d77fb29ea767fce5b8e00b76625188f19ecdbd24 100644
|
||||||
--- a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
--- a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||||
+++ b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
+++ b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||||
@@ -24,6 +24,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.BLUE;
|
@@ -24,6 +24,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.BLUE;
|
||||||
@@ -33,41 +33,41 @@ index 46954db7ecd35ac4018fdf476df7c8020d7ce6c8..044c51ebb058fc36074fd178929e3279
|
|||||||
public PlayerAreaMap() {
|
public PlayerAreaMap() {
|
||||||
super();
|
super();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 7fdcd4b78ff43050c157dea7e4fd7b9aad2cda5c..418686a2c3e64182558a7cc4204bdecd3fbbe564 100644
|
index c6069b70d188a45950be27f9f6c63c8218dea7fa..09332e82647df95f3bdcfb998bff98e8ecfccb90 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -404,6 +404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -407,6 +407,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
private UUID originWorld;
|
||||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||||
public boolean collidingWithWorldBorder; // Paper
|
public boolean collidingWithWorldBorder; // Paper
|
||||||
public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API
|
|
||||||
+ private CompoundTag leavesData = new CompoundTag(); // Leaves - Leaves ex data
|
+ private CompoundTag leavesData = new CompoundTag(); // Leaves - Leaves ex data
|
||||||
|
|
||||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||||
this.origin = location.toVector();
|
this.origin = location.toVector();
|
||||||
@@ -2368,6 +2369,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2481,6 +2482,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
nbt.putBoolean("Purpur.FireImmune", immuneToFire);
|
nbt.putBoolean("Paper.FreezeLock", true);
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Paper end
|
||||||
+ nbt.put("Leaves.Data", leavesData); // Leaves - leaves ex data
|
+ nbt.put("Leaves.Data", leavesData); // Leaves - leaves ex data
|
||||||
return nbt;
|
return nbt;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||||
@@ -2541,6 +2543,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2649,6 +2651,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
immuneToFire = nbt.getBoolean("Purpur.FireImmune");
|
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Paper end
|
||||||
+ // Leaves start - leaves ex data
|
+ // Leaves start - leaves ex data
|
||||||
+ if (nbt.contains("Leaves.Data")) {
|
+ if (nbt.contains("Leaves.Data")) {
|
||||||
+ leavesData = nbt.getCompound("Leaves.Data");
|
+ leavesData = nbt.getCompound("Leaves.Data");
|
||||||
+ }
|
+ }
|
||||||
+ // Leaves start - leaves ex data
|
+ // Leaves end - leaves ex data
|
||||||
|
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||||
@@ -4887,4 +4894,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4899,4 +4906,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return false;
|
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Paper end
|
||||||
+
|
+
|
||||||
+ // Leaves start - leaves ex data
|
+ // Leaves start - leaves ex data
|
||||||
+ public CompoundTag getLeavesData() {
|
+ public CompoundTag getLeavesData() {
|
||||||
@@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves
|
|||||||
This patch is Powered by Jade(https://github.com/Snownee/Jade)
|
This patch is Powered by Jade(https://github.com/Snownee/Jade)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index a157789fc6f3bdcbbf7321d5238c746833511630..6d25421091018d1dc0c7bccbce31d8b4244639bb 100644
|
index 297a9c2eba28c66c511ba83daeaa3e8a07fa6504..6155fa16a73de3314bc636b9af63106cf5b508e4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -250,6 +250,7 @@ import org.bukkit.inventory.CraftingInventory;
|
@@ -249,6 +249,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||||
import org.bukkit.inventory.EquipmentSlot;
|
import org.bukkit.inventory.EquipmentSlot;
|
||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.SmithingInventory;
|
import org.bukkit.inventory.SmithingInventory;
|
||||||
@@ -20,7 +20,7 @@ index a157789fc6f3bdcbbf7321d5238c746833511630..6d25421091018d1dc0c7bccbce31d8b4
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener {
|
public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener {
|
||||||
@@ -3725,6 +3726,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3592,6 +3593,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||||
@@ -31,10 +31,10 @@ index a157789fc6f3bdcbbf7321d5238c746833511630..6d25421091018d1dc0c7bccbce31d8b4
|
|||||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||||
this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
|
this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 297141cb63786dc356a70ee8af2614fe060b9373..e4be585e73f55ba0b2c8694df0694334e6573501 100644
|
index 0669c806b8c6b150183b4e02146f970bc4c3e225..2bf8ba3463eab42dd70cee3c1cf0098ca1754e75 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -402,6 +402,8 @@ public abstract class PlayerList {
|
@@ -358,6 +358,8 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
||||||
|
|
||||||
@@ -44,10 +44,10 @@ index 297141cb63786dc356a70ee8af2614fe060b9373..e4be585e73f55ba0b2c8694df0694334
|
|||||||
|
|
||||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||||
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
|
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 f85210c8d0d3e27398f52509f5e078f1d0d3eb93..911e83c6ce0166cea84dea92ae61d55462d7a9c0 100644
|
index c83dabddf93249a6477c10725622119c939db4d5..bfb85d119355f99c96e8cebb0c9be43c6be4b6b4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||||
@@ -288,7 +288,7 @@ public class Tadpole extends AbstractFish {
|
@@ -251,7 +251,7 @@ public class Tadpole extends AbstractFish {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ index f85210c8d0d3e27398f52509f5e078f1d0d3eb93..911e83c6ce0166cea84dea92ae61d554
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index aa276ff3319b7eda1cf84de40924236175febb66..265b7272f20105bbe5eee6bb46022cb008ad9191 100644
|
index ffdedab6808736ad96850d2e6eecf09fb758306a..8ac5414c04a601801bfcc872f809fb2bfeb306f9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -254,6 +254,7 @@ import org.bukkit.scoreboard.Criteria;
|
@@ -254,6 +254,7 @@ import org.bukkit.scoreboard.Criteria;
|
||||||
@@ -66,9 +66,9 @@ index aa276ff3319b7eda1cf84de40924236175febb66..265b7272f20105bbe5eee6bb46022cb0
|
|||||||
import org.bukkit.util.permissions.DefaultPermissions;
|
import org.bukkit.util.permissions.DefaultPermissions;
|
||||||
+import org.dreeam.leaf.LeafConfig;
|
+import org.dreeam.leaf.LeafConfig;
|
||||||
import org.yaml.snakeyaml.LoaderOptions;
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
import org.galemc.gale.util.CPUCoresEstimation;
|
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||||
@@ -409,6 +410,7 @@ public final class CraftServer implements Server {
|
@@ -393,6 +394,7 @@ public final class CraftServer implements Server {
|
||||||
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
|
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
|
||||||
}
|
}
|
||||||
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
|
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
|
||||||
@@ -76,16 +76,16 @@ index aa276ff3319b7eda1cf84de40924236175febb66..265b7272f20105bbe5eee6bb46022cb0
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getCommandBlockOverride(String command) {
|
public boolean getCommandBlockOverride(String command) {
|
||||||
@@ -1001,6 +1003,11 @@ public final class CraftServer implements Server {
|
@@ -984,6 +986,11 @@ public final class CraftServer implements Server {
|
||||||
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
|
||||||
this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration
|
this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration
|
||||||
+ // Leaves start - Jade
|
+ // Leaves start - Jade
|
||||||
+ if (LeafConfig.jadeProtocol) {
|
+ if (LeafConfig.jadeProtocol) {
|
||||||
+ top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer();
|
+ top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer();
|
||||||
+ }
|
+ }
|
||||||
+ // Leaves end - Jade
|
+ // Leaves end - Jade
|
||||||
for (ServerLevel world : this.console.getAllLevelsArray()) { // Gale - base thread pool - optimize server levels
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||||
@@ -103,7 +103,7 @@ index 18976e4b84146422daf262af469abcaff5e6fbbe..f77a8b729846dc9be3adad659ccc02df
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java
|
diff --git a/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..375b8a00accaf01c2be00080481e43c83979b005
|
index 0000000000000000000000000000000000000000..fcbf73aaf404d9d28689748e2a6399fbac77845c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java
|
+++ b/src/main/java/top/leavesmc/leaves/protocol/JadeProtocol.java
|
||||||
@@ -0,0 +1,572 @@
|
@@ -0,0 +1,572 @@
|
||||||
@@ -424,7 +424,7 @@ index 0000000000000000000000000000000000000000..375b8a00accaf01c2be00080481e43c8
|
|||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ Level world = player.level;
|
+ Level world = player.level();
|
||||||
+ Entity entity = world.getEntity(buf.readVarInt());
|
+ Entity entity = world.getEntity(buf.readVarInt());
|
||||||
+ boolean showDetails = buf.readBoolean();
|
+ boolean showDetails = buf.readBoolean();
|
||||||
+ if (entity == null || player.distanceToSqr(entity) > MAX_DISTANCE_SQR) {
|
+ if (entity == null || player.distanceToSqr(entity) > MAX_DISTANCE_SQR) {
|
||||||
@@ -460,7 +460,7 @@ index 0000000000000000000000000000000000000000..375b8a00accaf01c2be00080481e43c8
|
|||||||
+
|
+
|
||||||
+ BlockPos pos = buf.readBlockPos();
|
+ BlockPos pos = buf.readBlockPos();
|
||||||
+ boolean showDetails = buf.readBoolean();
|
+ boolean showDetails = buf.readBoolean();
|
||||||
+ Level world = player.level;
|
+ Level world = player.level();
|
||||||
+ if (pos.distSqr(player.blockPosition()) > MAX_DISTANCE_SQR || !world.isLoaded(pos)) {
|
+ if (pos.distSqr(player.blockPosition()) > MAX_DISTANCE_SQR || !world.isLoaded(pos)) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
@@ -7,35 +7,23 @@ Original license: GPLv3
|
|||||||
Original project: https://github.com/LeavesMC/Leaves
|
Original project: https://github.com/LeavesMC/Leaves
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 44a31750f08bee7e44565739fa1eaf6a78f10b3b..2d4a9ffd947e57e399a09bb3881c5e1cf7d0b031 100644
|
index e178004a3360bf6841e6aa0c874ca8ef10587f49..c44fe9e25cbaeba46601ee6fd076792210b20adc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1637,6 +1637,7 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1548,6 +1548,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.tickStep_tickConnection();
|
GameTestTicker.SINGLETON.tick();
|
||||||
this.tickStep_tickPlayerList();
|
}
|
||||||
this.tickStep_tickGameTestTicker();
|
|
||||||
+ this.tickStep_tickLeavesProtocol();
|
|
||||||
this.tickStep_runTickables();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1788,6 +1789,12 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
|
||||||
// Gale start - split tick steps
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public final void tickStep_tickLeavesProtocol() {
|
|
||||||
+ // Gale & Leaf start - split tick steps
|
|
||||||
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.tick(); // Leaves - appleskin
|
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.tick(); // Leaves - appleskin
|
||||||
+ // Gale & Leaf end - split tick steps
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
public final void tickStep_runTickables() {
|
|
||||||
// Gale end - split tick steps
|
|
||||||
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
||||||
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||||
|
((Runnable) this.tickables.get(i)).run();
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index e4be585e73f55ba0b2c8694df0694334e6573501..903b772e3ac5547d803809449dca9614f8d58805 100644
|
index 2bf8ba3463eab42dd70cee3c1cf0098ca1754e75..72674746a0aa20d79d634c7ac121396c6f1f8268 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -403,6 +403,7 @@ public abstract class PlayerList {
|
@@ -359,6 +359,7 @@ public abstract class PlayerList {
|
||||||
player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
||||||
|
|
||||||
top.leavesmc.leaves.protocol.JadeProtocol.onPlayerJoin(player); // Leaves - Jade
|
top.leavesmc.leaves.protocol.JadeProtocol.onPlayerJoin(player); // Leaves - Jade
|
||||||
@@ -43,19 +31,19 @@ index e4be585e73f55ba0b2c8694df0694334e6573501..903b772e3ac5547d803809449dca9614
|
|||||||
|
|
||||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||||
|
|
||||||
@@ -653,6 +654,7 @@ public abstract class PlayerList {
|
@@ -608,6 +609,7 @@ public abstract class PlayerList {
|
||||||
return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName())));
|
return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName())));
|
||||||
}
|
}
|
||||||
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) {
|
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) {
|
||||||
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.onPlayerLoggedOut(entityplayer); // Leaves - appleskin
|
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.onPlayerLoggedOut(entityplayer); // Leaves - appleskin
|
||||||
// Paper end
|
// Paper end
|
||||||
org.purpurmc.purpur.task.BossBarTask.removeFromAll(entityplayer.getBukkitEntity()); // Purpur
|
ServerLevel worldserver = entityplayer.serverLevel();
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 265b7272f20105bbe5eee6bb46022cb008ad9191..27a1d7c04ec228df0b0509e94c13ff58fe15ee2f 100644
|
index 8ac5414c04a601801bfcc872f809fb2bfeb306f9..971fc2667a999d3d1a65176d7433de9f559e3aed 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1008,6 +1008,13 @@ public final class CraftServer implements Server {
|
@@ -991,6 +991,13 @@ public final class CraftServer implements Server {
|
||||||
top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer();
|
top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer();
|
||||||
}
|
}
|
||||||
// Leaves end - Jade
|
// Leaves end - Jade
|
||||||
@@ -66,7 +54,7 @@ index 265b7272f20105bbe5eee6bb46022cb008ad9191..27a1d7c04ec228df0b0509e94c13ff58
|
|||||||
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.disableAllPlayer();
|
+ top.leavesmc.leaves.protocol.AppleSkinProtocol.disableAllPlayer();
|
||||||
+ }
|
+ }
|
||||||
+ // Leaves end - appleskin
|
+ // Leaves end - appleskin
|
||||||
for (ServerLevel world : this.console.getAllLevelsArray()) { // Gale - base thread pool - optimize server levels
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||||
@@ -7,10 +7,10 @@ Original license: GPLv3
|
|||||||
Original project: https://github.com/LeavesMC/Leaves
|
Original project: https://github.com/LeavesMC/Leaves
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 903b772e3ac5547d803809449dca9614f8d58805..e7c2914d14d10407cd6eee625718d9396d5fd77b 100644
|
index 72674746a0aa20d79d634c7ac121396c6f1f8268..8534591585dc9b78e936b8fb0f1b26da2fb584b8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1400,6 +1400,7 @@ public abstract class PlayerList {
|
@@ -1315,6 +1315,7 @@ public abstract class PlayerList {
|
||||||
player.connection.send(new ClientboundInitializeBorderPacket(worldborder));
|
player.connection.send(new ClientboundInitializeBorderPacket(worldborder));
|
||||||
player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
|
player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
|
||||||
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle()));
|
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle()));
|
||||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Fix: Make log4j compatible with future release
|
|||||||
This patch fixes the warnning "WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release" during server launching.
|
This patch fixes the warnning "WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release" during server launching.
|
||||||
|
|
||||||
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
||||||
index 52af11926a1f7973d70a1dae191d2e8138ec5c94..54306d5249b7962a11f107453cf6931a2bd74fca 100644
|
index 74ccc67e3c12dc5182602fb691ef3ddeb5b53280..9804bcae3439aaf9a9d477f9ab2494caa899ec1e 100644
|
||||||
--- a/src/main/resources/log4j2.xml
|
--- a/src/main/resources/log4j2.xml
|
||||||
+++ b/src/main/resources/log4j2.xml
|
+++ b/src/main/resources/log4j2.xml
|
||||||
@@ -1,5 +1,5 @@
|
@@ -1,5 +1,5 @@
|
||||||
@@ -15,4 +15,4 @@ index 52af11926a1f7973d70a1dae191d2e8138ec5c94..54306d5249b7962a11f107453cf6931a
|
|||||||
+<Configuration status="WARN" shutdownHook="disable">
|
+<Configuration status="WARN" shutdownHook="disable">
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Queue name="ServerGuiConsole">
|
<Queue name="ServerGuiConsole">
|
||||||
<!-- Purpur start - copied from TerminalConsole -->
|
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
||||||
Reference in New Issue
Block a user