diff --git a/README.md b/README.md
index 1b88fb839..e0993fe03 100644
--- a/README.md
+++ b/README.md
@@ -20,5 +20,5 @@
[main]: https://github.com/PlazmaMC/PlazmaBukkit/blob/main/README.md
> [!IMPORTANT]
-This is the branch for Plazma 1.21.2/3. If you want to know more about Plazma, please check the **[main branch][main]**.
-이곳은 플라즈마의 1.21.2/3용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 분기][main]** 를 확인해주세요.
+This is the branch for Plazma 1.21.4. If you want to know more about Plazma, please check the **[main branch][main]**.
+해당 페이지는 Plazma의 1.21.4용 분기입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 분기][main]** 를 확인해주세요.
diff --git a/build.gradle.kts b/build.gradle.kts
index 55dce0bd9..20f9390ea 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -36,13 +36,8 @@ paperweight {
remapRepo = "https://repo.papermc.io/repository/maven-public/"
decompileRepo = "https://repo.papermc.io/repository/maven-public/"
- useStandardUpstream("paper") {
- url = github("PaperMC", "Paper-archive")
- ref = providers.gradleProperty("paperCommit")
-
- withStandardPatcher {
- baseName("Paper")
-
+ usePaperUpstream(providers.gradleProperty("paperCommit")) {
+ withPaperPatcher {
apiPatchDir.set(projectDir.resolve("patches/api"))
apiOutputDir.set(projectDir.resolve("$brandName-API"))
diff --git a/gradle.properties b/gradle.properties
index 07b35e492..49f259081 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -13,17 +13,17 @@ brandName = Plazma
providerName = PlazmaMC
providerRepo = PlazmaMC/PlazmaBukkit
-version = 1.21.3-R0.1-SNAPSHOT
-mcVersion = 1.21.3
+version = 1.21.4-R0.1-SNAPSHOT
+mcVersion = 1.21.4
jdkVersion = 21
-paperRepo = https://github.com/PaperMC/Paper-archive
-paperBranch = ver/1.21.3
+paperRepo = https://github.com/PaperMC/Paper
+paperBranch = master
purpurRepo = https://github.com/PurpurMC/Purpur
-purpurBranch = ver/1.21.3
+purpurBranch = ver/1.21.4
pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish
pufferfishBranch = ver/1.21
usePufferfish = false
-paperCommit = da7138233f6392e791d790d1c3407414c855f9c2
-purpurCommit = 16ce24aa7eb08232030e4570e027f7baefa5f3f9
+paperCommit = b746d9df0b6b7765478b2a72c2d963b6e668fa35
+purpurCommit = 4a204f1bd7cde4bd1a99673bf46f2373d3bcb7e5
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index c9064c912..c68bdc987 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -2,7 +2,7 @@
shadow = "8.3.5"
remapper = "0.10.3"
paperclip = "3.0.3"
-paperweight = "1.7.4"
+paperweight = "1.7.7"
decompiler = "1.10.1"
[libraries]
diff --git a/libs/api.versions.toml b/libs/api.versions.toml
index 6ce5cb209..32136e4f6 100644
--- a/libs/api.versions.toml
+++ b/libs/api.versions.toml
@@ -9,7 +9,7 @@ bungeechat = "1.20-R0.2-deprecated+build.19"
joml = "1.10.8"
json-simple = "1.1.1"
-fastutil = "8.5.6"
+fastutil = "8.5.15"
# adventure
# log4j
slf4j-api = "2.0.9"
diff --git a/libs/common.versions.toml b/libs/common.versions.toml
index ed9f9e105..ae0524d5a 100644
--- a/libs/common.versions.toml
+++ b/libs/common.versions.toml
@@ -1,6 +1,6 @@
[versions]
adventure = "4.17.0"
-log4j = "2.19.0"
+log4j = "2.24.1"
asm = "9.7.1"
mvn = "3.9.6"
diff --git a/libs/server.versions.toml b/libs/server.versions.toml
index 8be06bc43..4cdb08b67 100644
--- a/libs/server.versions.toml
+++ b/libs/server.versions.toml
@@ -1,4 +1,6 @@
[versions]
+concurrentutil = "0.0.2"
+
jline = "3.27.1"
tca = "1.3.0"
# adventure
@@ -7,7 +9,7 @@ netty = "4.1.97.Final"
# asm
configurate = "4.2.0-SNAPSHOT"
# commons2
-sqlite = "3.46.1.3"
+sqlite = "3.47.0.0"
mysql = "9.1.0"
disruptor = "3.4.4"
velocity = "3.3.0-SNAPSHOT"
@@ -31,6 +33,8 @@ spark = "1.10.119-SNAPSHOT"
[libraries]
+concurrentutil = { group = "ca.spottedleaf", name = "concurrentutil", version.ref = "concurrentutil" }
+
jline-ffm = { group = "org.jline", name = "jline-terminal-ffm", version.ref = "jline" }
jline-jni = { group = "org.jline", name = "jline-terminal-jni", version.ref = "jline" }
tca = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="tca" }
@@ -70,6 +74,7 @@ runtime = [ "sqlite", "mysql", "disruptor" ]
test = [ "classgraph" ]
implementation = [
+ "concurrentutil",
"jline-ffm",
"jline-jni",
"tca",
diff --git a/patches/api/0001-Purpur-API-Changes.patch b/patches/api/0001-Purpur-API-Changes.patch
index b915ed1c6..4887dd10e 100644
--- a/patches/api/0001-Purpur-API-Changes.patch
+++ b/patches/api/0001-Purpur-API-Changes.patch
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny
-Date: Fri, 13 Dec 2024 07:03:22 +0900
+Date: Sat, 14 Dec 2024 20:26:32 +0900
Subject: [PATCH] Purpur API Changes
PurpurMC
@@ -25,10 +25,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
diff --git a/build.gradle.kts b/build.gradle.kts
-index e29e5024fa693baae469d47fe77b57118f14627c..b0fd6c1804844f09428051952e3ac4e58f8c859c 100644
+index 571534b42cd9c33d6a7bb6fe3bf3a28e33f8e5de..49546dfbb4dd006b5a2419908890ba4c2a0e207a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -64,6 +64,7 @@ dependencies {
+@@ -66,6 +66,7 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
@@ -36,7 +36,7 @@ index e29e5024fa693baae469d47fe77b57118f14627c..b0fd6c1804844f09428051952e3ac4e5
implementation("org.ow2.asm:asm:9.7.1")
implementation("org.ow2.asm:asm-commons:9.7.1")
-@@ -148,6 +149,13 @@ val generateApiVersioningFile by tasks.registering {
+@@ -150,6 +151,13 @@ val generateApiVersioningFile by tasks.registering {
}
}
@@ -50,7 +50,7 @@ index e29e5024fa693baae469d47fe77b57118f14627c..b0fd6c1804844f09428051952e3ac4e5
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
-@@ -160,6 +168,8 @@ tasks.jar {
+@@ -162,6 +170,8 @@ tasks.jar {
}
tasks.withType {
@@ -781,10 +781,10 @@ index 918a045165cdcde264bc24082b7afebb407271de..e98d6321c5f2cdde91b54f8a74cbcc04
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index 028ac35df6c4d044d07b3869751736d418c1eb0e..95c1f331f364c5fafa100860f3c9674f18888714 100644
+index e89edabd36a6755912694d8a8700da4ebe5c5829..ba2eff0f2ecffbea4b42d5c6e4485ee0087dc981 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -5840,4 +5840,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -5811,4 +5811,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
return this.asItemType().getDefaultDataTypes();
}
// Paper end - data component API
@@ -4305,7 +4305,7 @@ index 12946bd55fcf7c40d39081779a7fa30049ee6165..9c2d605c50cbf9aefa56ec209df9f6ce
}
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
-index f9e4b16a21d6cc6c9cbbe06d20c8af25e72e3ddb..4028b230e7fe1c78520f227a377a2a61e8381ecc 100644
+index 5b0d26c68f6c30fd3a9125e96012a7d162afb402..c92dc62e16aec026f32c5a4739ac041e5c88ed03 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -47,6 +47,10 @@ public class AnnotationTest {
diff --git a/patches/api/0002-Use-Gradle-Version-Catalogs.patch b/patches/api/0002-Use-Gradle-Version-Catalogs.patch
index 14aeeb1fc..98f18d222 100644
--- a/patches/api/0002-Use-Gradle-Version-Catalogs.patch
+++ b/patches/api/0002-Use-Gradle-Version-Catalogs.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Use Gradle Version Catalogs
diff --git a/build.gradle.kts b/build.gradle.kts
-index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d8872448f1929cf 100644
+index 49546dfbb4dd006b5a2419908890ba4c2a0e207a..6963a76b9040c01dc60d0f24c9eef4738e93f753 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,11 +9,13 @@ java {
@@ -22,26 +22,28 @@ index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d887244
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
-@@ -39,58 +41,30 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
+@@ -39,60 +41,30 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
// Paper end - configure mockito agent that is needed in newer java versions
dependencies {
- api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api
- // api dependencies are listed transitively to API consumers
-- api("com.google.guava:guava:32.1.2-jre")
-- api("com.google.code.gson:gson:2.10.1")
+- api("com.google.guava:guava:33.3.1-jre")
+- api("com.google.code.gson:gson:2.11.0")
- // Paper start - adventure
-- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.18") {
+- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") {
- exclude("com.google.guava", "guava")
- }
- // Paper - adventure
- api("org.yaml:snakeyaml:2.2")
-- api("org.joml:joml:1.10.5")
+- api("org.joml:joml:1.10.8") {
+- isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
+- }
- // Paper start
- api("com.googlecode.json-simple:json-simple:1.1.1") {
- isTransitive = false // includes junit
- }
-- api("it.unimi.dsi:fastutil:8.5.6")
+- api("it.unimi.dsi:fastutil:8.5.15")
- apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
- apiAndDocs("net.kyori:adventure-api")
- apiAndDocs("net.kyori:adventure-text-minimessage")
@@ -105,17 +107,17 @@ index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d887244
}
// Paper start
-@@ -175,27 +149,25 @@ tasks.withType {
+@@ -177,27 +149,25 @@ tasks.withType {
options.use()
options.isDocFilesSubDirs = true
options.links(
-- "https://guava.dev/releases/32.1.2-jre/api/docs/",
+- "https://guava.dev/releases/33.3.1-jre/api/docs/",
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
- // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
- // Paper start - add missing javadoc links
-- "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
-- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
+- "https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
+- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
- "https://jspecify.dev/docs/api/",
- // Paper end
- // Paper start
diff --git a/patches/api/0005-Various-API-Tweaks.patch b/patches/api/0005-Various-API-Tweaks.patch
index 4b20293af..9825504ca 100644
--- a/patches/api/0005-Various-API-Tweaks.patch
+++ b/patches/api/0005-Various-API-Tweaks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Various API Tweaks
diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java
-index 41eaa8159f8c028faa118300e95f6a0fb9cfe989..76a5381a959ae4e153dba291a362f3d58aeceac9 100644
+index 679f78e07a3a2de745fa237165d0a8db5e086f29..ac24a288fda957546e2832f375bd1c958db8852b 100644
--- a/src/main/java/com/destroystokyo/paper/MaterialTags.java
+++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java
-@@ -584,6 +584,15 @@ public class MaterialTags {
+@@ -591,6 +591,15 @@ public class MaterialTags {
.add(material -> material.name().startsWith("DEEPSLATE_") && material.name().endsWith("_ORE"))
.ensureSize("DEEPSLATE_ORES", 8).lock();
diff --git a/patches/api/0007-Reduce-allocations.patch b/patches/api/0007-Reduce-allocations.patch
index bfe71e60c..a7455d3c4 100644
--- a/patches/api/0007-Reduce-allocations.patch
+++ b/patches/api/0007-Reduce-allocations.patch
@@ -67,10 +67,10 @@ index 521f035409ee61a9ad73d39bec938f2938892570..6e53135579426cb677bf34a0813db826
}
}
diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java
-index 464f8f81ba907a61588e4ab869e4f8269830195a..6d50664e76e6e7ed98ca7b311fdb368886ab65a8 100644
+index 20fc2b30fdcdedb012dfe129e746d0b9e162fc36..ca97debfd1a204d15bf5f6c176612cccc2596537 100644
--- a/src/main/java/org/bukkit/block/Biome.java
+++ b/src/main/java/org/bukkit/block/Biome.java
-@@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull;
+@@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
* which can be accessed via {@link Registry#BIOME}.
*/
public interface Biome extends OldEnum, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
@@ -78,7 +78,7 @@ index 464f8f81ba907a61588e4ab869e4f8269830195a..6d50664e76e6e7ed98ca7b311fdb3688
Biome OCEAN = getBiome("ocean");
Biome PLAINS = getBiome("plains");
-@@ -129,7 +130,7 @@ public interface Biome extends OldEnum, Keyed, net.kyori.adventure.transl
+@@ -125,7 +126,7 @@ public interface Biome extends OldEnum, Keyed, net.kyori.adventure.transl
@NotNull
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Biome[] values() {
diff --git a/patches/api/0009-Temporary-javadoc-build-fix.patch b/patches/api/0009-Temporary-javadoc-build-fix.patch
new file mode 100644
index 000000000..719fb8e03
--- /dev/null
+++ b/patches/api/0009-Temporary-javadoc-build-fix.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: AlphaKR93
+Date: Sun, 15 Dec 2024 13:34:45 +0900
+Subject: [PATCH] Temporary javadoc build fix
+
+
+diff --git a/build.gradle.kts b/build.gradle.kts
+index 6963a76b9040c01dc60d0f24c9eef4738e93f753..1f3d951a69cd6a9ea5fa7ddbe60aaa5e8d9f0974 100644
+--- a/build.gradle.kts
++++ b/build.gradle.kts
+@@ -165,7 +165,7 @@ tasks.withType {
+ "https://jd.advntr.dev/text-logger-slf4j/${common.adventure.api.orNull?.version}/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.orNull?.version}/",
+- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
++ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/2.20.0/", // Plazma - TODO: log4j 2.24.2 javadocs not found
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.mvn.connector.orNull?.version}",
+ // Plazma end
+ )
diff --git a/patches/server/0001-Purpur-Server-Changes.patch b/patches/server/0001-Purpur-Server-Changes.patch
index 3f972ca95..ad02f90e5 100644
--- a/patches/server/0001-Purpur-Server-Changes.patch
+++ b/patches/server/0001-Purpur-Server-Changes.patch
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny
-Date: Fri, 13 Dec 2024 07:03:31 +0900
+Date: Sat, 14 Dec 2024 20:26:40 +0900
Subject: [PATCH] Purpur Server Changes
PurpurMC
@@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
diff --git a/build.gradle.kts b/build.gradle.kts
-index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..77602e4445b1b45a17e5552ac6a769e0ed46ebc7 100644
+index 2da91ed6363c0851e4c459188f5e8ef5475e0c97..74d7aaae57e0e9ea9e31c4b2189ba50a0ac83bea 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
@@ -34,10 +34,10 @@ index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..77602e4445b1b45a17e5552ac6a769e0
dependencies {
- implementation(project(":paper-api"))
+ implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
+ implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency
// Paper start
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
- implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
-@@ -60,6 +60,17 @@ dependencies {
+@@ -61,6 +61,17 @@ dependencies {
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
@@ -55,8 +55,8 @@ index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..77602e4445b1b45a17e5552ac6a769e0
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
-@@ -86,6 +97,14 @@ paperweight {
- craftBukkitPackageVersion.set("v1_21_R2") // also needs to be updated in MappingEnvironment
+@@ -87,6 +98,14 @@ paperweight {
+ craftBukkitPackageVersion.set("v1_21_R3") // also needs to be updated in MappingEnvironment
}
+
@@ -70,7 +70,7 @@ index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..77602e4445b1b45a17e5552ac6a769e0
tasks.jar {
archiveClassifier.set("dev")
-@@ -99,14 +118,14 @@ tasks.jar {
+@@ -100,14 +119,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
@@ -90,7 +90,7 @@ index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..77602e4445b1b45a17e5552ac6a769e0
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
-@@ -172,7 +191,7 @@ fun TaskContainer.registerRunTask(
+@@ -173,7 +192,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider = register(name) {
@@ -240,10 +240,10 @@ index c21e00812f1aaa1279834a0562d360d6b89e146c..877d2095a066854939f260ca4b0b8c7b
}
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
-index 4b002e8b75d117b726b0de274a76d3596fce015b..8cde30544e14f8fc2dac32966ae3c21f8cf3a551 100644
+index 8f62879582195d8ae4f64bd23f752fa133b1c973..4a8f95670e25c81952cccbaf4c6e49514cacd529 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
-@@ -593,7 +593,7 @@ public class Metrics {
+@@ -592,7 +592,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
@@ -252,7 +252,7 @@ index 4b002e8b75d117b726b0de274a76d3596fce015b..8cde30544e14f8fc2dac32966ae3c21f
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
-@@ -602,16 +602,8 @@ public class Metrics {
+@@ -601,16 +601,8 @@ public class Metrics {
}));
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
@@ -365,7 +365,7 @@ index 6ee39b534b8d992655bc0cef3c299d12cbae0034..90b3526479320064378f2cde6c2f2b8e
.completer(new ConsoleCommandCompleter(this.server))
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
-index 3470720466fc81f977c18e3a97bb918926025a22..c8651af322927c46d075f88890fcd0476bd85440 100644
+index 6bdc683b5ade408ee27f1d6636b4d60c8c89cb7c..11d91f58208c1e816620f5b97c5fdfc6ce37f6c3 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
@@ -136,6 +136,10 @@ public class MobGoalHelper {
@@ -1558,7 +1558,7 @@ index 13bd145b1e8006a53c22f5dc0c78f29b540c7663..0d133cd7993eb40b19e2aabe8e2bfcdc
boolean flag1 = this.source.acceptsSuccess() && !this.silent;
boolean flag2 = broadcastToOps && this.source.shouldInformAdmins() && !this.silent;
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index 64bf4444ffba25cb40743a32267aa790ad1738f9..8d82425ccbc30b3f4a59767ca72bf37311ddeda0 100644
+index 517cb238ec280aadd1fc54bcb675ed386e798eaf..a5e8f2d8e5963c730a9509eddfadb9ca322c7183 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -226,8 +226,8 @@ public class Commands {
@@ -1704,10 +1704,10 @@ index 7b118a92a6eb779f800ae8f5d8f6e3c861fc4f6a..057a038e8dcacd7496a0b2373de2c202
register(registry, "template_rotation", TemplateRotationArgument.class, SingletonArgumentInfo.contextFree(TemplateRotationArgument::templateRotation));
register(registry, "heightmap", HeightmapTypeArgument.class, SingletonArgumentInfo.contextFree(HeightmapTypeArgument::heightmap));
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
-index f58a94efafbc01d402cd03a108bb90f60930a316..21ea63da99c5b3e2e1ab9cc1049c903bba6cf288 100644
+index faffd87c357511ef00646971a16acf1009362c59..c98e0d9d8bc9e6ef12a9b9d6082e98bc5bb7a5f6 100644
--- a/src/main/java/net/minecraft/core/BlockPos.java
+++ b/src/main/java/net/minecraft/core/BlockPos.java
-@@ -62,6 +62,12 @@ public class BlockPos extends Vec3i {
+@@ -63,6 +63,12 @@ public class BlockPos extends Vec3i {
public static final int MAX_HORIZONTAL_COORDINATE = 33554431;
// Paper end - Optimize Bit Operations by inlining
@@ -1721,7 +1721,7 @@ index f58a94efafbc01d402cd03a108bb90f60930a316..21ea63da99c5b3e2e1ab9cc1049c903b
super(x, y, z);
}
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index 0d12605dc84dad49faa18bf1fd058c3c168623ee..c6490554a3025f4de3f3218178fad76cd1848a19 100644
+index c9d7ac819ce26f5301df7df56edce59b7ef377e0..cdd73bb358e309844bef576175a9026cb8563e7e 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -930,5 +930,22 @@ public interface DispenseItemBehavior {
@@ -1761,7 +1761,7 @@ index bf8c511739265c6a9cd277752e844481598f8966..ffe2399ab6b1f311536475d8216238b5
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
-index e693a003ea8f022eef8b49e4332025b769333b30..44a31f6f44885598ee06e88b940b84b1e89e5430 100644
+index 3c866432c8a938c677a315612f3e159bda67a2a2..8661c1b1cfe2b3db000e1f08814fd4409c4b7fab 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -617,11 +617,20 @@ public class Connection extends SimpleChannelInboundHandler> {
@@ -1799,10 +1799,10 @@ index 300929a406905f5ff1ede664d5b99fb0938d4d2e..a4e9ac0e07f08e0b6aa682e8c1587d9c
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.OUT_OF_ORDER_CHAT, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
} else {
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
-index 90ca25c4aaf92a5639839a7cdaee2ffcdb75efa7..ecaec3c7b5768771b00c4c33d48a76ba22653a79 100644
+index 300a044bb0f0e377133f24469cea1a9669de6e58..a880f4e5cf712654649ad043e58e073e9a87c0fe 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
-@@ -120,6 +120,12 @@ public class Main {
+@@ -122,6 +122,12 @@ public class Main {
JvmProfiler.INSTANCE.start(Environment.SERVER);
}
@@ -1816,7 +1816,7 @@ index 90ca25c4aaf92a5639839a7cdaee2ffcdb75efa7..ecaec3c7b5768771b00c4c33d48a76ba
Bootstrap.bootStrap();
Bootstrap.validate();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 4158473fd553a16fec23bcbcf9a278d413120600..23505b0f80d643d9ef569b49192f44e0373dfb5f 100644
+index ae4ebf509837e8d44255781c61d02873f8b74be8..95f1e0ae174400f2cf7bfed2897259d5aa2cfcb5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -314,6 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
+ public boolean lagging = false; // Purpur
+ protected boolean upnp = false; // Purpur
public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
- private final Set pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
public static S spin(Function serverFactory) {
- AtomicReference atomicreference = new AtomicReference();
-@@ -1054,6 +1058,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
worldserver.updateLagCompensationTick(); // Paper - lag compensation
@@ -1959,7 +1959,7 @@ index 4158473fd553a16fec23bcbcf9a278d413120600..23505b0f80d643d9ef569b49192f44e0
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
-@@ -2011,7 +2058,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop persistentStateManagerFactory) {
this.level = world;
this.mainThreadProcessor = new ServerChunkCache.MainThreadExecutor(world);
-@@ -504,6 +507,43 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -511,6 +514,43 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.broadcastChangedChunks(gameprofilerfiller);
gameprofilerfiller.pop();
}
@@ -2352,7 +2352,7 @@ index d021cd5b6136f0125076513977f430c6d4dd4f9f..1cb8c9d21eef27492efc4995525c198c
}
private void broadcastChangedChunks(ProfilerFiller profiler) {
-@@ -553,6 +593,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -560,6 +600,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
final int naturalSpawnChunkCount = j;
NaturalSpawner.SpawnState spawnercreature_d; // moved down
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
@@ -2360,7 +2360,7 @@ index d021cd5b6136f0125076513977f430c6d4dd4f9f..1cb8c9d21eef27492efc4995525c198c
// re-set mob counts
for (ServerPlayer player : this.level.players) {
// Paper start - per player mob spawning backoff
-@@ -567,13 +608,17 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -574,13 +615,17 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
// Paper end - per player mob spawning backoff
}
@@ -2381,7 +2381,7 @@ index d021cd5b6136f0125076513977f430c6d4dd4f9f..1cb8c9d21eef27492efc4995525c198c
profiler.popPush("spawnAndTick");
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
-@@ -590,7 +635,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -597,7 +642,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Paper end - PlayerNaturallySpawnCreaturesEvent
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
@@ -2390,7 +2390,7 @@ index d021cd5b6136f0125076513977f430c6d4dd4f9f..1cb8c9d21eef27492efc4995525c198c
} else {
list1 = List.of();
}
-@@ -602,8 +647,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -609,8 +654,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
ChunkPos chunkcoordintpair = chunk.getPos();
chunk.incrementInhabitedTime(timeDelta);
@@ -2402,7 +2402,7 @@ index d021cd5b6136f0125076513977f430c6d4dd4f9f..1cb8c9d21eef27492efc4995525c198c
if (true) { // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
-index 90eb4927fa51ce3df86aa7b6c71f49150a03e337..c14ce846afb7364e541bfe01b73a06a94e48f55b 100644
+index 103e2c414780be66324bcb9cd4ea539bbdfe12ad..b0675953a75ff01f714cf5f35ad3907281648724 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -81,7 +81,7 @@ public class ServerEntity {
@@ -2431,10 +2431,10 @@ index 90eb4927fa51ce3df86aa7b6c71f49150a03e337..c14ce846afb7364e541bfe01b73a06a9
this.wasOnGround = this.entity.onGround();
this.teleportDelay = 0;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea03eaec03 100644
+index 1f898500d0e9b18a880645ceb0a8ff0fe75f4e48..d0653880e8f8852a27e16c5c964fb7b86c40d542 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -223,6 +223,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -224,6 +224,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private final StructureManager structureManager;
private final StructureCheck structureCheck;
private final boolean tickTime;
@@ -2443,7 +2443,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
private final RandomSequences randomSequences;
// CraftBukkit start
-@@ -231,6 +233,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -232,6 +234,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public boolean hasPhysicsEvent = true; // Paper - BlockPhysicsEvent
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
@@ -2451,7 +2451,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately
-@@ -604,7 +607,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -605,7 +608,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// CraftBukkit end
this.tickTime = flag1;
this.server = minecraftserver;
@@ -2477,7 +2477,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
this.serverLevelData = iworlddataserver;
ChunkGenerator chunkgenerator = worlddimension.generator();
// CraftBukkit start
-@@ -676,6 +696,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -677,6 +697,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -2485,7 +2485,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
}
// Paper start
-@@ -727,7 +748,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -728,7 +749,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
long j;
@@ -2494,7 +2494,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
// CraftBukkit start
j = this.levelData.getDayTime() + 24000L;
TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (j - j % 24000L) - this.getDayTime());
-@@ -792,6 +813,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -793,6 +814,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
this.entityTickList.forEach((entity) -> {
@@ -2502,7 +2502,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
if (!entity.isRemoved()) {
if (!tickratemanager.isEntityFrozen(entity)) {
gameprofilerfiller.push("checkDespawn");
-@@ -809,7 +831,20 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -810,7 +832,20 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
gameprofilerfiller.push("tick");
@@ -2524,7 +2524,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
gameprofilerfiller.pop();
}
}
-@@ -841,6 +876,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -842,6 +877,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.getScheduledEvents().tick(this.server, i);
Profiler.get().pop();
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
@@ -2538,7 +2538,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
this.setDayTime(this.levelData.getDayTime() + 1L);
}
-@@ -849,8 +891,22 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -850,8 +892,22 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public void setDayTime(long timeOfDay) {
this.serverLevelData.setDayTime(timeOfDay);
@@ -2561,7 +2561,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
public void tickCustomSpawners(boolean spawnMonsters, boolean spawnAnimals) {
Iterator iterator = this.customSpawners.iterator();
-@@ -930,7 +986,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -931,7 +987,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("thunder");
@@ -2570,7 +2570,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
-@@ -938,10 +994,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -939,10 +995,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper - Configurable spawn chances for skeleton horses
if (flag1) {
@@ -2591,7 +2591,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
entityhorseskeleton.setAge(0);
entityhorseskeleton.setPos((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
this.addFreshEntity(entityhorseskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
-@@ -1022,7 +1086,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1023,7 +1087,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return holder.is(PoiTypes.LIGHTNING_ROD);
}, (blockposition1) -> {
return blockposition1.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition1.getX(), blockposition1.getZ()) - 1;
@@ -2600,7 +2600,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
return optional.map((blockposition1) -> {
return blockposition1.above(1);
-@@ -1071,11 +1135,27 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1072,11 +1136,27 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (this.canSleepThroughNights()) {
if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) {
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
@@ -2629,7 +2629,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
ichatmutablecomponent = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(i));
}
-@@ -1215,6 +1295,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1216,6 +1296,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@VisibleForTesting
public void resetWeatherCycle() {
// CraftBukkit start
@@ -2637,7 +2637,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
-@@ -1222,6 +1303,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1223,6 +1304,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setRainTime(0);
}
// CraftBukkit end
@@ -2645,7 +2645,7 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
this.serverLevelData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// CraftBukkit start
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
-@@ -2762,7 +2844,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2772,7 +2854,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal
@@ -2655,10 +2655,10 @@ index 585e2b43a0326f0b81597fa1234d3c67c76af550..6a359f1ed07aa7b9c78e470fb00661ea
}
// Paper end - Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1db5cf44bd 100644
+index fc7f7a34babd095a51b5321f600aef65a2a9d123..3f6ffe3da816eb53bfe065b4b7d561478a27ece9 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -329,6 +329,10 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -327,6 +327,10 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
public @Nullable String clientBrandName = null; // Paper - Brand support
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
@@ -2669,7 +2669,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
// Paper start - rewrite chunk system
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
-@@ -691,6 +695,9 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -689,6 +693,9 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
});
}
@@ -2679,7 +2679,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
}
@Override
-@@ -743,6 +750,9 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -741,6 +748,9 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
}
this.saveEnderPearls(nbt);
@@ -2689,7 +2689,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
}
private void saveParentVehicle(CompoundTag nbt) {
-@@ -1032,6 +1042,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1029,6 +1039,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.trackEnteredOrExitedLavaOnVehicle();
this.updatePlayerAttributes();
this.advancements.flushDirty(this);
@@ -2705,7 +2705,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
}
private void updatePlayerAttributes() {
-@@ -1329,6 +1348,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1326,6 +1345,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
}));
PlayerTeam scoreboardteam = this.getTeam();
@@ -2713,12 +2713,12 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
if (scoreboardteam != null && scoreboardteam.getDeathMessageVisibility() != Team.Visibility.ALWAYS) {
if (scoreboardteam.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) {
this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent);
-@@ -1432,6 +1452,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1429,6 +1449,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
if (this.isInvulnerableTo(world, source)) {
return false;
} else {
+ // Purpur start
-+ if (source.is(DamageTypeTags.IS_FALL)) { // Purpur
++ if (source.is(net.minecraft.tags.DamageTypeTags.IS_FALL)) { // Purpur
+ if (getRootVehicle() instanceof net.minecraft.world.entity.vehicle.AbstractMinecart && level().purpurConfig.minecartControllable && !level().purpurConfig.minecartControllableFallDamage) {
+ return false;
+ }
@@ -2727,10 +2727,10 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
+ }
+ }
+ // Purpur end
- boolean flag = this.server.isDedicatedServer() && this.isPvpAllowed() && source.is(DamageTypeTags.IS_FALL);
+ Entity entity = source.getEntity();
- if (!flag && this.spawnInvulnerableTime > 0 && !source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) {
-@@ -1664,6 +1694,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+ if (entity instanceof net.minecraft.world.entity.player.Player) {
+@@ -1655,6 +1685,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
this.unsetRemoved();
// CraftBukkit end
@@ -2738,7 +2738,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
this.setServerLevel(worldserver);
this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
-@@ -1774,7 +1805,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1765,7 +1796,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
return entitymonster.isPreventingPlayerRest(this.serverLevel(), this);
});
@@ -2747,7 +2747,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.NOT_SAFE);
}
}
-@@ -1814,7 +1845,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1805,7 +1836,19 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
});
if (!this.serverLevel().canSleepThroughNights()) {
@@ -2768,7 +2768,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
}
((ServerLevel) this.level()).updateSleepingPlayerList();
-@@ -1936,6 +1979,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1919,6 +1962,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@Override
public void openTextEdit(SignBlockEntity sign, boolean front) {
@@ -2776,7 +2776,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos()));
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front));
}
-@@ -2252,6 +2296,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -2235,6 +2279,26 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.lastSentExp = -1; // CraftBukkit - Added to reset
}
@@ -2803,7 +2803,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
@Override
public void displayClientMessage(Component message, boolean overlay) {
this.sendSystemMessage(message, overlay);
-@@ -2476,6 +2540,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -2456,6 +2520,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
return new CommandSourceStack(this.commandSource(), this.position(), this.getRotationVector(), this.serverLevel(), this.getPermissionLevel(), this.getName().getString(), this.getDisplayName(), this.server, this);
}
@@ -2824,7 +2824,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
public void sendSystemMessage(Component message) {
this.sendSystemMessage(message, false);
}
-@@ -2597,8 +2675,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -2577,8 +2655,68 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
public void resetLastActionTime() {
this.lastActionTime = Util.getMillis();
@@ -2893,7 +2893,7 @@ index 5a8f396d47577f087abb415c972fd4f51e50faba..e6001fadc04b63b82e20652bbb16cb1d
public ServerStatsCounter getStats() {
return this.stats;
}
-@@ -3305,4 +3443,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -3285,4 +3423,50 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
@@ -3076,10 +3076,10 @@ index b0bc66dc7248aae691dcab68b925b52a1695e63f..7d276c191b391bca24948ddb36b8b7d0
if (this.keepAlivePending && !this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // Paper - check keepalive limit, don't fire if already disconnected
this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE, PlayerKickEvent.Cause.TIMEOUT); // Paper - kick event cause
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd188404890f 100644
+index 84fa24880d02dc7ba1ec8bda3575be38447fd4b2..8a468f0c09daf23cfbddb3c607a758c6411babfc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -342,6 +342,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -344,6 +344,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private boolean justTeleported = false;
// CraftBukkit end
@@ -3100,7 +3100,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
@Override
public void tick() {
if (this.ackBlockChangesUpTo > -1) {
-@@ -398,6 +412,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -400,6 +414,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.recipeSpamPackets.tick(); // Paper - auto recipe limit
this.dropSpamThrottler.tick();
if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) this.server.getPlayerIdleTimeout() * 1000L * 60L && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits
@@ -3113,7 +3113,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
}
-@@ -663,6 +683,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -656,6 +676,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@@ -3122,7 +3122,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.cserver.getPluginManager().callEvent(event);
-@@ -739,6 +761,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -734,6 +756,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (packet.getId() == this.awaitingTeleport) {
if (this.awaitingPositionFromClient == null) {
@@ -3130,7 +3130,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
this.disconnect((Component) Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause
return;
}
-@@ -1172,6 +1195,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1226,6 +1249,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleEditBook(ServerboundEditBookPacket packet) {
@@ -3138,7 +3138,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
// Paper start - Book size limits
final io.papermc.paper.configuration.type.number.IntOr.Disabled pageMax = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
if (!this.cserver.isPrimaryThread() && pageMax.enabled()) {
-@@ -1180,6 +1204,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1234,6 +1258,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
final int maxBookPageSize = pageMax.intValue();
final double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D);
long byteAllowed = maxBookPageSize;
@@ -3149,7 +3149,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
for (final String page : pageList) {
final int byteLength = page.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
byteTotal += byteLength;
-@@ -1204,7 +1232,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1258,7 +1286,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (byteTotal > byteAllowed) {
@@ -3159,7 +3159,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect
return;
}
-@@ -1226,10 +1255,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1280,10 +1309,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Objects.requireNonNull(list);
optional.ifPresent(list::add);
list.addAll(packet.pages());
@@ -3176,7 +3176,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
};
this.filterTextPacket((List) list).thenAcceptAsync(consumer, this.server);
-@@ -1237,13 +1270,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1291,13 +1324,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
private void updateBookContents(List pages, int slotId) {
@@ -3196,7 +3196,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1));
this.player.getInventory().setItem(slotId, CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
-@@ -1251,6 +1289,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1305,6 +1343,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
private void signBook(FilteredText title, List pages, int slotId) {
@@ -3208,7 +3208,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
ItemStack itemstack = this.player.getInventory().getItem(slotId);
if (itemstack.has(DataComponents.WRITABLE_BOOK_CONTENT)) {
-@@ -1258,10 +1301,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1312,10 +1355,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
itemstack1.remove(DataComponents.WRITABLE_BOOK_CONTENT);
List> list1 = (List>) (List) pages.stream().map((filteredtext1) -> { // CraftBukkit - decompile error
@@ -3221,7 +3221,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
CraftEventFactory.handleEditBookEvent(this.player, slotId, itemstack, itemstack1); // CraftBukkit
this.player.getInventory().setItem(slotId, itemstack); // CraftBukkit - event factory updates the hand book
}
-@@ -1271,6 +1314,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1325,6 +1368,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return this.player.isTextFilteringEnabled() ? Filterable.passThrough(message.filteredOrEmpty()) : Filterable.from(message);
}
@@ -3238,7 +3238,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
@Override
public void handleEntityTagQuery(ServerboundEntityTagQueryPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
-@@ -1320,7 +1373,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1374,7 +1427,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
@@ -3255,7 +3255,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
this.disconnect((Component) Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause
} else {
ServerLevel worldserver = this.player.serverLevel();
-@@ -1500,7 +1561,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1554,7 +1615,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
movedWrongly = true;
if (event.getLogWarning())
// Paper end
@@ -3264,7 +3264,7 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
} // Paper
}
-@@ -1568,6 +1629,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1622,6 +1683,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@@ -3273,13 +3273,13 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.cserver.getPluginManager().callEvent(event);
-@@ -1613,6 +1676,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1667,6 +1730,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.tryResetCurrentImpulseContext();
}
+ // Purpur Start
-+ if (this.player.level().purpurConfig.dontRunWithScissors && this.player.isSprinting() && !(this.player.level().purpurConfig.ignoreScissorsInWater && this.player.isInWater()) && !(this.player.level().purpurConfig.ignoreScissorsInLava && this.player.isInLava()) && (isScissor(this.player.getItemInHand(InteractionHand.MAIN_HAND)) || isScissor(this.player.getItemInHand(InteractionHand.OFF_HAND))) && (int) (Math.random() * 10) == 0) {
-+ this.player.hurt(this.player.damageSources().scissors(), (float) this.player.level().purpurConfig.scissorsRunningDamage);
++ if (this.player.serverLevel().purpurConfig.dontRunWithScissors && this.player.isSprinting() && !(this.player.serverLevel().purpurConfig.ignoreScissorsInWater && this.player.isInWater()) && !(this.player.serverLevel().purpurConfig.ignoreScissorsInLava && this.player.isInLava()) && (isScissors(this.player.getItemInHand(InteractionHand.MAIN_HAND)) || isScissors(this.player.getItemInHand(InteractionHand.OFF_HAND))) && (int) (Math.random() * 10) == 0) {
++ this.player.hurtServer(this.player.serverLevel(), this.player.damageSources().scissors(), (float) this.player.serverLevel().purpurConfig.scissorsRunningDamage);
+ if (!org.purpurmc.purpur.PurpurConfig.dontRunWithScissors.isBlank()) this.player.sendActionBarMessage(org.purpurmc.purpur.PurpurConfig.dontRunWithScissors);
+ }
+ // Purpur End
@@ -3287,45 +3287,48 @@ index cd1b6b539a62fa5237d6dab2d1c09a2e631d9941..9ae16e24013ea5664d4ea6d52ed7dd18
this.player.checkMovementStatistics(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5);
this.lastGoodX = this.player.getX();
this.lastGoodY = this.player.getY();
-@@ -1652,6 +1722,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1706,6 +1776,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
+ // Purpur start
-+ public boolean isScissor(ItemStack stack) {
++ public boolean isScissors(ItemStack stack) {
+ if (!stack.is(Items.SHEARS)) return false;
-+ net.minecraft.world.item.component.CustomModelData customModelData = stack.get(net.minecraft.core.component.DataComponents.CUSTOM_MODEL_DATA);
-+ return customModelData == null || customModelData.value() == 0;
++
++ ResourceLocation itemModelReference = stack.get(net.minecraft.core.component.DataComponents.ITEM_MODEL);
++ if (itemModelReference != null && itemModelReference.equals(this.player.serverLevel().purpurConfig.dontRunWithScissorsItemModelReference)) return true;
++
++ return stack.getOrDefault(DataComponents.CUSTOM_MODEL_DATA, net.minecraft.world.item.component.CustomModelData.EMPTY).equals(net.minecraft.world.item.component.CustomModelData.EMPTY);
+ }
+ // Purpur end
+
// Paper start - optimise out extra getCubes
private boolean hasNewCollision(final ServerLevel world, final Entity entity, final AABB oldBox, final AABB newBox) {
final List collisionsBB = new java.util.ArrayList<>();
-@@ -2025,6 +2103,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2084,6 +2165,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- boolean cancelled;
- if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
+ boolean cancelled;
+ if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
+ if (this.player.gameMode.shiftClickMended(itemstack)) return; // Purpur
- org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand);
- cancelled = event.useItemInHand() == Event.Result.DENY;
- } else {
-@@ -2808,6 +2887,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- AABB axisalignedbb = entity.getBoundingBox();
+ org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand);
+ cancelled = event.useItemInHand() == Event.Result.DENY;
+ } else {
+@@ -2874,6 +2956,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ AABB axisalignedbb = entity.getBoundingBox();
if (this.player.canInteractWithEntity(axisalignedbb, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0D))) { // Paper - configurable lenience value for interact range
+ if (entity instanceof Mob mob) mob.ticksSinceLastInteraction = 0; // Purpur
- packet.dispatch(new ServerboundInteractPacket.Handler() {
- private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
- ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
-@@ -2821,6 +2901,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ packet.dispatch(new ServerboundInteractPacket.Handler() {
+ private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
+ ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
+@@ -2887,6 +2970,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
+ ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
-+ player.processClick(enumhand); // Purpur
++ player.processClick(enumhand); // Purpur
+
- // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
- if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
+ // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
+ if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
entity.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 033755682c61c889723c3669b5cff4de147f637e..16069b9cbf6c7679c28a2e9a54e77d23cd10e541 100644
@@ -3353,7 +3356,7 @@ index 532f09089b8d6798999cf3f83e852df7479e450e..43c63d203859eaa0999937e2f9254c22
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 1a956249828156fdc273888de59128c3d1a0b898..16999fa20c3621e016d1b0fadfb76f2fe03a2a69 100644
+index 9b71655a425356132afb786eff623f558e1e3498..e1d195ab8b005edd7fcded810ddf903b47c000a1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -419,6 +419,7 @@ public abstract class PlayerList {
@@ -3653,10 +3656,10 @@ index 11d1ee8fae7670f02cb3f5d57f4774dbde77f48c..88cf1353892a7ead4e0f16822216b151
return true;
diff --git a/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java b/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java
-index 83c6d17f75c3f0b531bdfd5b5f9bc2a5b3eb7a2c..df43c007e7b9fee58b2cd0892b966ce88cb1f890 100644
+index 3f1e59229d6a71117700a56c87914bc9401f1da2..32c8474ffa88e997bb484caecb21e3dc98991e70 100644
--- a/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java
+++ b/src/main/java/net/minecraft/world/effect/PoisonMobEffect.java
-@@ -11,8 +11,8 @@ class PoisonMobEffect extends MobEffect {
+@@ -13,8 +13,8 @@ public class PoisonMobEffect extends MobEffect {
@Override
public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
@@ -3695,10 +3698,10 @@ index 98b74649a667fb9b10afef0ba5383a73022d8c71..0c7c0524e487ff32e16dd9939d92bc64
((CraftPlayer) entityhuman.getBukkitEntity()).sendHealthUpdate();
diff --git a/src/main/java/net/minecraft/world/effect/WitherMobEffect.java b/src/main/java/net/minecraft/world/effect/WitherMobEffect.java
-index 303cefba51e19ac43b1f6188ad64ef480715ebaf..98ec88751b3e71c2e7aad633096b7f41608c0b33 100644
+index 55132e6e064ddd15b26286eca335305ed57b2f9e..1e04947995009689315352b79989e7ce4e20073c 100644
--- a/src/main/java/net/minecraft/world/effect/WitherMobEffect.java
+++ b/src/main/java/net/minecraft/world/effect/WitherMobEffect.java
-@@ -10,7 +10,7 @@ class WitherMobEffect extends MobEffect {
+@@ -12,7 +12,7 @@ public class WitherMobEffect extends MobEffect {
@Override
public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
@@ -3708,7 +3711,7 @@ index 303cefba51e19ac43b1f6188ad64ef480715ebaf..98ec88751b3e71c2e7aad633096b7f41
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44177752f7 100644
+index 7ac7d0729705cb02f22277be3c467aed4f69ec0e..c59963369bf4add28a966ec24b67cb6e8b701dd2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -177,7 +177,7 @@ import org.bukkit.plugin.PluginManager;
@@ -3785,7 +3788,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
this.remainingFireTicks = -this.getFireImmuneTicks();
this.fluidHeight = new Object2DoubleArrayMap(2);
this.fluidOnEyes = new HashSet();
-@@ -974,6 +1000,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -978,6 +1004,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage
@@ -3793,7 +3796,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
this.onBelowWorld();
}
-@@ -1935,7 +1962,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1958,7 +1985,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean fireImmune() {
@@ -3802,7 +3805,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
}
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
-@@ -2008,7 +2035,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2031,7 +2058,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.isInWater() || flag;
}
@@ -3811,7 +3814,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
Entity entity = this.getVehicle();
if (entity instanceof AbstractBoat abstractboat) {
-@@ -2690,6 +2717,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2713,6 +2740,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
nbttagcompound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -3823,7 +3826,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
-@@ -2838,6 +2870,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2863,6 +2895,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
}
// Paper end
@@ -3835,7 +3838,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
-@@ -3089,6 +3126,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3114,6 +3151,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
@@ -3843,7 +3846,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
// CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent
org.bukkit.event.player.PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
-@@ -3294,6 +3332,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3324,6 +3362,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list);
}
@@ -3857,7 +3860,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
}
}
-@@ -3333,6 +3378,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3363,6 +3408,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false;
}
// CraftBukkit end
@@ -3872,7 +3875,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
this.passengers = ImmutableList.of();
} else {
-@@ -3413,14 +3466,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3443,14 +3496,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -3891,7 +3894,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
}
} else {
this.portalProcess = new PortalProcessor(portal, pos.immutable());
-@@ -3637,7 +3693,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3667,7 +3723,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public int getMaxAirSupply() {
@@ -3900,7 +3903,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
}
public int getAirSupply() {
-@@ -4135,7 +4191,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4169,7 +4225,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end
public boolean canUsePortal(boolean allowVehicles) {
@@ -3909,7 +3912,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
}
public boolean canTeleport(Level from, Level to) {
-@@ -4723,6 +4779,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4753,6 +4809,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return Mth.lerp(delta, this.yRotO, this.yRot);
}
@@ -3922,7 +3925,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
-@@ -5124,7 +5186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -5154,7 +5216,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public float maxUpStep() {
@@ -3931,7 +3934,7 @@ index a15546e433ebba6c0de01bdaaef201a3d99a87b5..aa171a1afb9800e6ec84f6b4f1b28e44
}
public void onExplosionHit(@Nullable Entity entity) {}
-@@ -5325,4 +5387,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -5355,4 +5417,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((net.minecraft.server.level.ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter
@@ -3989,7 +3992,7 @@ index 6bf691fcc6486bde73bae30eff09142802c29eda..59c4d3753c7084e92402608b7fb3c4ad
private EntitySelector() {}
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index c8c2394558952d7ca57d29874485251b8f2b3400..1d50b03246d114c6583815205eeacb7ac8549aec 100644
+index d23914a3ab3723d532ae867db6b954c843030f75..a3ae5e663a0334eaa8ca6ce89c3088620a849bb9 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -385,10 +385,12 @@ public class EntityType implements FeatureElement, EntityTypeT
@@ -4023,7 +4026,7 @@ index c8c2394558952d7ca57d29874485251b8f2b3400..1d50b03246d114c6583815205eeacb7a
public static ResourceLocation getKey(EntityType> type) {
return BuiltInRegistries.ENTITY_TYPE.getKey(type);
}
-@@ -604,6 +616,16 @@ public class EntityType implements FeatureElement, EntityTypeT
+@@ -614,6 +626,16 @@ public class EntityType implements FeatureElement, EntityTypeT
return this.category;
}
@@ -4040,7 +4043,7 @@ index c8c2394558952d7ca57d29874485251b8f2b3400..1d50b03246d114c6583815205eeacb7a
public String getDescriptionId() {
return this.descriptionId;
}
-@@ -661,6 +683,12 @@ public class EntityType implements FeatureElement, EntityTypeT
+@@ -671,6 +693,12 @@ public class EntityType implements FeatureElement, EntityTypeT
entity.load(nbt);
}, () -> {
EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
@@ -4054,10 +4057,10 @@ index c8c2394558952d7ca57d29874485251b8f2b3400..1d50b03246d114c6583815205eeacb7a
}
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index bf0838f574fa3fb9654e087d602b8d380bd7fb28..32a0db7e8f974712bd8a05f16f3bd48ac66142d5 100644
+index 23b47d90fd35659d9eaa661e808a7f89b29614cf..ba4fe614e2a3378f17b544c78c92a271523e8d37 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -333,7 +333,7 @@ public class ExperienceOrb extends Entity {
+@@ -335,7 +335,7 @@ public class ExperienceOrb extends Entity {
public void playerTouch(Player player) {
if (player instanceof ServerPlayer entityplayer) {
if (player.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(entityplayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
@@ -4066,7 +4069,7 @@ index bf0838f574fa3fb9654e087d602b8d380bd7fb28..32a0db7e8f974712bd8a05f16f3bd48a
player.take(this, 1);
int i = this.repairPlayerItems(entityplayer, this.value);
-@@ -351,7 +351,7 @@ public class ExperienceOrb extends Entity {
+@@ -353,7 +353,7 @@ public class ExperienceOrb extends Entity {
}
private int repairPlayerItems(ServerPlayer player, int amount) {
@@ -4076,7 +4079,7 @@ index bf0838f574fa3fb9654e087d602b8d380bd7fb28..32a0db7e8f974712bd8a05f16f3bd48a
if (optional.isPresent()) {
ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
diff --git a/src/main/java/net/minecraft/world/entity/GlowSquid.java b/src/main/java/net/minecraft/world/entity/GlowSquid.java
-index b851c3ee1426bc0a259bf6c4a662af0c9883dd71..3283228d7ebf98ce98780725a0a412bea4200da5 100644
+index 397765b1547ae47b64963b3807b206c50a6650e1..7f75b5485ca047829415cc1ffb0ec28614633707 100644
--- a/src/main/java/net/minecraft/world/entity/GlowSquid.java
+++ b/src/main/java/net/minecraft/world/entity/GlowSquid.java
@@ -25,6 +25,39 @@ public class GlowSquid extends Squid {
@@ -4120,11 +4123,11 @@ index b851c3ee1426bc0a259bf6c4a662af0c9883dd71..3283228d7ebf98ce98780725a0a412be
protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e755aa12bfa 100644
+index 96b4fbe4a4655777ff10b32e3257e2fac2aba12a..33fbe0f7a356dd847e546feffb468b2803c6744b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -248,9 +248,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
- protected int deathScore;
+@@ -246,9 +246,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ protected float rotOffs;
public float lastHurt;
public boolean jumping;
- public float xxa;
@@ -4136,7 +4139,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
protected int lerpSteps;
protected double lerpX;
protected double lerpY;
-@@ -297,6 +297,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -295,6 +295,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
@@ -4144,7 +4147,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
@Override
public float getBukkitYaw() {
-@@ -325,7 +326,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -323,7 +324,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.lastClimbablePos = Optional.empty();
this.activeLocationDependentEnchantments = new EnumMap(EquipmentSlot.class);
this.appliedScale = 1.0F;
@@ -4154,7 +4157,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.craftAttributes = new CraftAttributeMap(this.attributes); // CraftBukkit
// CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
this.entityData.set(LivingEntity.DATA_HEALTH_ID, (float) this.getAttribute(Attributes.MAX_HEALTH).getValue());
-@@ -340,6 +342,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -338,6 +340,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.brain = this.makeBrain(new Dynamic(dynamicopsnbt, (Tag) dynamicopsnbt.createMap((Map) ImmutableMap.of(dynamicopsnbt.createString("memories"), (Tag) dynamicopsnbt.emptyMap()))));
}
@@ -4163,7 +4166,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
public Brain> getBrain() {
return this.brain;
}
-@@ -375,6 +379,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -373,6 +377,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public static AttributeSupplier.Builder createLivingAttributes() {
return AttributeSupplier.builder().add(Attributes.MAX_HEALTH).add(Attributes.KNOCKBACK_RESISTANCE).add(Attributes.MOVEMENT_SPEED).add(Attributes.ARMOR).add(Attributes.ARMOR_TOUGHNESS).add(Attributes.MAX_ABSORPTION).add(Attributes.STEP_HEIGHT).add(Attributes.SCALE).add(Attributes.GRAVITY).add(Attributes.SAFE_FALL_DISTANCE).add(Attributes.FALL_DAMAGE_MULTIPLIER).add(Attributes.JUMP_STRENGTH).add(Attributes.OXYGEN_BONUS).add(Attributes.BURNING_TIME).add(Attributes.EXPLOSION_KNOCKBACK_RESISTANCE).add(Attributes.WATER_MOVEMENT_EFFICIENCY).add(Attributes.MOVEMENT_EFFICIENCY).add(Attributes.ATTACK_KNOCKBACK);
}
@@ -4171,7 +4174,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
@Override
protected void checkFallDamage(double heightDifference, boolean onGround, BlockState state, BlockPos landedPosition) {
-@@ -467,7 +472,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -465,7 +470,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (world1 instanceof ServerLevel) {
worldserver1 = (ServerLevel) world1;
@@ -4180,7 +4183,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.hurtServer(worldserver1, this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d1 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
-@@ -475,6 +480,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -473,6 +478,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (d1 < 0.0D) {
d0 = this.level().getWorldBorder().getDamagePerBlock();
if (d0 > 0.0D) {
@@ -4188,7 +4191,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.hurtServer(worldserver1, this.damageSources().outOfBorder(), (float) Math.max(1, Mth.floor(-d1 * d0)));
}
}
-@@ -486,7 +492,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -484,7 +490,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (flag1) {
this.setAirSupply(this.decreaseAirSupply(this.getAirSupply()));
@@ -4197,15 +4200,15 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.setAirSupply(0);
Vec3 vec3d = this.getDeltaMovement();
-@@ -498,7 +504,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -496,7 +502,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().addParticle(ParticleTypes.BUBBLE, this.getX() + d0, this.getY() + d2, this.getZ() + d3, vec3d.x, vec3d.y, vec3d.z);
}
- this.hurt(this.damageSources().drown(), 2.0F);
+ this.hurt(this.damageSources().drown(), (float) this.level().purpurConfig.damageFromDrowning); // Purpur
}
- }
-
+ } else if (this.getAirSupply() < this.getMaxAirSupply()) {
+ this.setAirSupply(this.increaseAirSupply(this.getAirSupply()));
@@ -564,6 +570,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
gameprofilerfiller.pop();
}
@@ -4313,23 +4316,23 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.noActionTime = 0;
if (amount < 0.0F) {
amount = 0.0F;
-@@ -1549,13 +1615,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
- if (entity1 instanceof net.minecraft.world.entity.player.Player) {
- net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1;
-
+@@ -1643,13 +1709,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ Entity entity = damageSource.getEntity();
+
+ if (entity instanceof net.minecraft.world.entity.player.Player entityhuman) {
+- this.lastHurtByPlayerTime = 100;
++ this.lastHurtByPlayerTime = this.level().purpurConfig.mobLastHurtByPlayerTime; // Purpur
+ this.lastHurtByPlayer = entityhuman;
+ return entityhuman;
+ } else {
+ if (entity instanceof Wolf entitywolf) {
+ if (entitywolf.isTame()) {
- this.lastHurtByPlayerTime = 100;
+ this.lastHurtByPlayerTime = this.level().purpurConfig.mobLastHurtByPlayerTime; // Purpur
- this.lastHurtByPlayer = entityhuman;
- } else if (entity1 instanceof Wolf) {
- Wolf entitywolf = (Wolf) entity1;
-
- if (entitywolf.isTame()) {
-- this.lastHurtByPlayerTime = 100;
-+ this.lastHurtByPlayerTime = this.level().purpurConfig.mobLastHurtByPlayerTime; // Purpur
- LivingEntity entityliving2 = entitywolf.getOwner();
+ LivingEntity entityliving = entitywolf.getOwner();
- if (entityliving2 instanceof net.minecraft.world.entity.player.Player) {
-@@ -1702,6 +1768,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ if (entityliving instanceof net.minecraft.world.entity.player.Player) {
+@@ -1713,6 +1779,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
@@ -4348,7 +4351,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
event.setCancelled(itemstack == null);
-@@ -1873,7 +1951,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1884,7 +1962,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = false;
if (this.dead && adversary instanceof WitherBoss) { // Paper
@@ -4357,7 +4360,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
BlockPos blockposition = this.blockPosition();
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
-@@ -1910,6 +1988,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1921,6 +1999,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropEquipment(world); // CraftBukkit - from below
if (this.shouldDropLoot() && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@@ -4365,7 +4368,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.dropFromLootTable(world, damageSource, flag);
// Paper start
final boolean prev = this.clearEquipmentSlots;
-@@ -1918,6 +1997,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1929,6 +2008,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper end
this.dropCustomDeathLoot(world, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
@@ -4373,7 +4376,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
}
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> {
-@@ -2120,6 +2200,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2135,6 +2215,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos;
}
@@ -4394,7 +4397,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
public boolean onClimbable() {
if (this.isSpectator()) {
return false;
-@@ -3146,6 +3240,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3157,6 +3251,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (f > 0.0F) {
this.playSound(this.getFallDamageSound((int) f), 1.0F, 1.0F);
@@ -4402,7 +4405,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
this.hurt(this.damageSources().flyIntoWall(), f);
}
}
-@@ -3692,8 +3787,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3703,8 +3798,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.pushEntities();
gameprofilerfiller.pop();
// Paper start - Add EntityMoveEvent
@@ -4415,7 +4418,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
-@@ -3703,6 +3800,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3714,6 +3811,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
}
}
@@ -4437,7 +4440,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
}
// Paper end - Add EntityMoveEvent
world = this.level();
-@@ -3712,6 +3824,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3723,6 +3835,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
@@ -4472,7 +4475,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
}
public boolean isSensitiveToWater() {
-@@ -3738,7 +3878,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3749,7 +3889,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
}).toList();
EquipmentSlot enumitemslot = (EquipmentSlot) Util.getRandom(list, this.random);
@@ -4491,7 +4494,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
}
this.gameEvent(GameEvent.ELYTRA_GLIDE);
-@@ -3747,7 +3897,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3758,7 +3908,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
@@ -4500,7 +4503,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
if (!this.onGround() && !this.isPassenger() && !this.hasEffect(MobEffects.LEVITATION)) {
Iterator iterator = EquipmentSlot.VALUES.iterator();
-@@ -4669,7 +4819,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4676,7 +4826,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (equippable != null && equippable.dispensable()) {
EquipmentSlot enumitemslot = equippable.slot();
@@ -4509,7 +4512,7 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
} else {
return false;
}
-@@ -4694,6 +4844,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4701,6 +4851,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
return equippable == null ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
}
@@ -4523,10 +4526,10 @@ index f36a075dbee2b96d01899e02460b1d8443e91749..f4604e543a980d6aeb485252da5a4e75
return slot != EquipmentSlot.HEAD && slot != EquipmentSlot.MAINHAND && slot != EquipmentSlot.OFFHAND ? SlotAccess.forEquipmentSlot(entity, slot, (itemstack) -> {
return itemstack.isEmpty() || entity.getEquipmentSlotForItem(itemstack) == slot;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2df55a21c 100644
+index 5a0b51342f4a646101f4588697bcae7d1ca8a010..0d68cd513cfed80fcbe011648cc8779beb782aaa 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -148,6 +148,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -144,6 +144,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
private BlockPos restrictCenter;
private float restrictRadius;
@@ -4534,7 +4537,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
public boolean aware = true; // CraftBukkit
protected Mob(EntityType extends Mob> type, Level world) {
-@@ -163,8 +164,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -159,8 +160,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
this.restrictRadius = -1.0F;
this.goalSelector = new GoalSelector();
this.targetSelector = new GoalSelector();
@@ -4545,7 +4548,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
this.jumpControl = new JumpControl(this);
this.bodyRotationControl = this.createBodyControl();
this.navigation = this.createNavigation(world);
-@@ -235,14 +236,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -231,14 +232,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
return this.lookControl;
}
@@ -4564,7 +4567,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
this.targetSelector.tick();
}
}
-@@ -334,6 +337,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -330,6 +333,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
entityliving = null;
}
}
@@ -4572,7 +4575,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
this.target = entityliving;
return true;
// CraftBukkit end
-@@ -378,8 +382,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -374,8 +378,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
}
gameprofilerfiller.pop();
@@ -4601,7 +4604,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
@Override
protected void playHurtSound(DamageSource damageSource) {
this.resetAmbientSoundTime();
-@@ -547,6 +571,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -544,6 +568,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
}
nbt.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit
@@ -4609,7 +4612,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
}
@Override
-@@ -624,6 +649,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -634,6 +659,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
this.aware = nbt.getBoolean("Bukkit.Aware");
}
// CraftBukkit end
@@ -4621,7 +4624,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
}
@Override
-@@ -676,7 +706,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -686,7 +716,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Level world = this.level();
if (world instanceof ServerLevel worldserver) {
@@ -4669,7 +4672,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
}
public boolean isWithinRestriction() {
-@@ -1735,23 +1769,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -1738,23 +1772,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
this.playAttackSound();
}
@@ -4696,7 +4699,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
}
@Override
-@@ -1813,4 +1839,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -1816,4 +1842,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
public float[] getArmorDropChances() {
return this.armorDropChances;
}
@@ -4756,7 +4759,7 @@ index dbd321f3dc3cc80737830db63aed47a6935e8e89..7ca12a1128661ea36e2e33cda204c7d2
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
-index 94d04a20f97405e02d7cccaabadc7a7e86e336f7..861591694785a6ff16f839fa91781791c275de14 100644
+index fb967ac7b3e7828301f08a7fe9b039441cf7da30..236485c0c9706d5561f8bc950b20411ae628ca96 100644
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
@@ -23,14 +23,23 @@ public class AttributeMap {
@@ -4801,10 +4804,10 @@ index 94d04a20f97405e02d7cccaabadc7a7e86e336f7..861591694785a6ff16f839fa91781791
public boolean hasAttribute(Holder attribute) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java b/src/main/java/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java
-index 386f9bca728055f7b75fb690b307ff4510068105..0bb08af954d224a2b4404615bee720ac4bdbac55 100644
+index c76438d5ce2330eca16dc0b381f97e9506f84aef..074d2d4e85d3e3ad546fcb15dfd00b757bf549a8 100644
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java
-@@ -130,7 +130,7 @@ public class DefaultAttributes {
+@@ -131,7 +131,7 @@ public class DefaultAttributes {
.put(EntityType.OCELOT, Ocelot.createAttributes().build())
.put(EntityType.PANDA, Panda.createAttributes().build())
.put(EntityType.PARROT, Parrot.createAttributes().build())
@@ -4813,7 +4816,7 @@ index 386f9bca728055f7b75fb690b307ff4510068105..0bb08af954d224a2b4404615bee720ac
.put(EntityType.PIG, Pig.createAttributes().build())
.put(EntityType.PIGLIN, Piglin.createAttributes().build())
.put(EntityType.PIGLIN_BRUTE, PiglinBrute.createAttributes().build())
-@@ -161,7 +161,7 @@ public class DefaultAttributes {
+@@ -162,7 +162,7 @@ public class DefaultAttributes {
.put(EntityType.VILLAGER, Villager.createAttributes().build())
.put(EntityType.VINDICATOR, Vindicator.createAttributes().build())
.put(EntityType.WARDEN, Warden.createAttributes().build())
@@ -4835,18 +4838,18 @@ index f0703302e7dbbda88de8c648d20d87c55ed9b1e0..a913ebabaa5f443afa987b972355a8f8
}
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
-index e1b6fe9ecda25f86431baf414f1bfd3a26a8b2bd..3d7578605812021bc84b99d4db1672a682d897ad 100644
+index 0d177e828c2b338ce93c58aaef04df326e1eb0b2..273ba657926ce72a7c82861e880a82bf7f322a0b 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
-@@ -73,7 +73,7 @@ public class AcquirePoi {
+@@ -86,7 +86,7 @@ public class AcquirePoi {
};
// Paper start - optimise POI access
- java.util.List, BlockPos>> poiposes = new java.util.ArrayList<>();
+ final java.util.List, BlockPos>> poiposes = new java.util.ArrayList<>();
- io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, poiPredicate, predicate2, entity.blockPosition(), 48, 48*48, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes);
+ io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, poiPredicate, predicate2, entity.blockPosition(), world.purpurConfig.villagerAcquirePoiSearchRadius, world.purpurConfig.villagerAcquirePoiSearchRadius*world.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes);
- Set, BlockPos>> set = new java.util.HashSet<>(poiposes);
- // Paper end - optimise POI access
- Path path = findPathToPois(entity, set);
+ final Set, BlockPos>> set = new java.util.HashSet<>(poiposes.size());
+ for (final Pair, BlockPos> poiPose : poiposes) {
+ if (worldPosBiPredicate.test(world, poiPose.getSecond())) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java b/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
index 2ade08d1466660ee1787fa97908002ef56389712..018cc6ff39641157668fca09e64bcddf7d4d3a5c 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
@@ -4975,10 +4978,10 @@ index 8508ac7de8cda3127b73e11ff4aee62502e65ead..b1544e028d5a9b84b944e1fb5a12bb16
throwHalfStack(entity, this.trades, villager);
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java b/src/main/java/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java
-index bb65d46967cb04f611b3c9c97d5732cfb21ede9b..7f4156e4690bbd57f9e9141f008851062cae733d 100644
+index 41f4107101bcd5d753b72cdbabe7946a1975c653..4475b406dde30e5be8ce9d2ff45f8d22d242690c 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java
-@@ -52,8 +52,13 @@ public class VillagerGoalPackages {
+@@ -74,8 +74,13 @@ public class VillagerGoalPackages {
}
public static ImmutableList>> getWorkPackage(VillagerProfession profession, float speed) {
@@ -5555,10 +5558,10 @@ index 5677dc97ed83652f261100cf391883cfac7d16fe..9987d28ea145f6d0126cb4ea22001e09
entityanimal.resetLove();
worldserver.broadcastEntityEvent(this, (byte) 18);
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f60f81b659 100644
+index 0bafe14342c1acce131ad34717c18aed3718deed..bfe3c1d587f129013de108b8fb31293b0386a44a 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -150,6 +150,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -154,6 +154,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
public Bee(EntityType extends Bee> type, Level world) {
super(type, world);
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);
@@ -5566,7 +5569,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
// Paper start - Fix MC-167279
class BeeFlyingMoveControl extends FlyingMoveControl {
public BeeFlyingMoveControl(final Mob entity, final int maxPitchChange, final boolean noGravity) {
-@@ -158,22 +159,69 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -162,22 +163,69 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public void tick() {
@@ -5637,7 +5640,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
-@@ -188,6 +236,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -192,6 +240,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
protected void registerGoals() {
@@ -5645,7 +5648,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
this.goalSelector.addGoal(0, new Bee.BeeAttackGoal(this, 1.399999976158142D, true));
this.goalSelector.addGoal(1, new Bee.BeeEnterHiveGoal());
this.goalSelector.addGoal(2, new BreedGoal(this, 1.0D));
-@@ -207,6 +256,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -211,6 +260,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.goalSelector.addGoal(7, new Bee.BeeGrowCropGoal());
this.goalSelector.addGoal(8, new Bee.BeeWanderGoal());
this.goalSelector.addGoal(9, new FloatGoal(this));
@@ -5653,7 +5656,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
this.targetSelector.addGoal(1, (new Bee.BeeHurtByOtherGoal(this)).setAlertOthers(new Class[0]));
this.targetSelector.addGoal(2, new Bee.BeeBecomeAngryTargetGoal(this));
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
-@@ -376,7 +426,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -380,7 +430,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
public static boolean isNightOrRaining(Level world) {
@@ -5662,7 +5665,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
}
public void setStayOutOfHiveCountdown(int cannotEnterHiveTicks) {
-@@ -411,6 +461,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -415,6 +465,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.hurtServer(world, this.damageSources().drown(), 1.0F);
}
@@ -5670,7 +5673,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
if (flag) {
++this.timeSinceSting;
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {
-@@ -435,6 +486,27 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -439,6 +490,27 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
return tileentitybeehive != null && tileentitybeehive.isFireNearby();
}
@@ -5698,8 +5701,8 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
@Override
public int getRemainingPersistentAngerTime() {
return (Integer) this.entityData.get(Bee.DATA_REMAINING_ANGER_TIME);
-@@ -701,16 +773,16 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
- this.hivePos = pos;
+@@ -738,16 +810,16 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+ return state.is(BlockTags.BEE_ATTRACTIVE) ? ((Boolean) state.getValueOrElse(BlockStateProperties.WATERLOGGED, false) ? false : (state.is(Blocks.SUNFLOWER) ? state.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.UPPER : true)) : false;
}
- private class BeeLookControl extends LookControl {
@@ -5718,7 +5721,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
}
}
-@@ -882,6 +954,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -916,6 +988,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
if (optional.isPresent()) {
Bee.this.savedFlowerPos = (BlockPos) optional.get();
Bee.this.navigation.moveTo((double) Bee.this.savedFlowerPos.getX() + 0.5D, (double) Bee.this.savedFlowerPos.getY() + 0.5D, (double) Bee.this.savedFlowerPos.getZ() + 0.5D, 1.2000000476837158D);
@@ -5726,7 +5729,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
return true;
} else {
Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60);
-@@ -925,6 +998,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -959,6 +1032,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.pollinating = false;
Bee.this.navigation.stop();
Bee.this.remainingCooldownBeforeLocatingNewFlower = 200;
@@ -5734,7 +5737,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
}
@Override
-@@ -974,6 +1048,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -1008,6 +1082,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.setWantedPos();
}
@@ -5743,7 +5746,7 @@ index 42276acfeadec6e7aa9a91d3f446f4fedb04829d..dc8df0912c1d18176e18a8f4dc43c4f6
if (Bee.this.random.nextFloat() < 0.05F && this.successfulPollinatingTicks > this.lastSoundPlayedTick + 60) {
this.lastSoundPlayedTick = this.successfulPollinatingTicks;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
-index 471d5727b964922d8e898be9e1d5c30f9d3bac97..4aad4fdc80070f4000e929fff126714fc67050b0 100644
+index 989b7be74eaeba7f40eac87c7ee7f252cb0c05c9..a418ded306908ee9cb9e375104354a6e031305c9 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
@@ -100,12 +100,59 @@ public class Cat extends TamableAnimal implements VariantHolder {
@@ -6624,10 +6628,10 @@ index e07b79ef172095c1800c88342b3ac8dc7703aea2..9a6471d2f1eb1c8af006b70b6bba0b66
}
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
-index eea02ea0d99425a60575f5fa729782494d579080..6cbe80e13a590817d3ecf27d89202f10e2cd83dc 100644
+index b04532aa04aec6ebbff74d64abb73189c2e12016..4d05c34dcebc7582fd400066809b4997b2e8a86a 100644
--- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
-@@ -65,6 +65,43 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder optional = this.getEffectsFromItemStack(itemstack);
-
- if (optional.isEmpty()) {
-- return InteractionResult.PASS;
-+ return tryRide(player, hand); // Purpur
- }
-
- itemstack.consume(1, player);
-@@ -195,6 +232,13 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder {
world.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5D), this.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
@@ -6909,10 +6904,10 @@ index be753557d7ebd6f1e82b1bdb6d60ecc450f72eec..83372c86bd54eedd9b136ddfcbfc67d3
}
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
-index 8883894da73c7d5975a8826d23ee7f542db98b0b..28a9d267099f6c24f71dc5a11179d59c27265a88 100644
+index a2f0b79599799ad2aa85aff821d8ac76a8e650bd..f14fe1c299e6ef5cf55bde617ff9fe6aca08702f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
-@@ -126,12 +126,89 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder type, Level world) {
super(type, world);
@@ -7003,7 +6998,7 @@ index 8883894da73c7d5975a8826d23ee7f542db98b0b..28a9d267099f6c24f71dc5a11179d59c
@Nullable
@Override
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData entityData) {
-@@ -150,8 +227,11 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder type, LevelAccessor world, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) {
-@@ -294,13 +375,13 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder {
@@ -7408,7 +7403,7 @@ index 8cc6022507c97af62fb2b4455198bc35744137c9..b3a0146ccfcda9fa33b91d33458086b5
+ // Purpur end
float f = 0.3F;
- if (this.horizontalCollision || this.moveControl.hasWanted() && this.moveControl.getWantedY() > this.getY() + 0.5D) {
+ if (this.moveControl.getSpeedModifier() <= 0.6D) {
@@ -188,6 +264,12 @@ public class Rabbit extends Animal implements VariantHolder {
@Override
@@ -7463,7 +7458,7 @@ index 8cc6022507c97af62fb2b4455198bc35744137c9..b3a0146ccfcda9fa33b91d33458086b5
+ public void vanillaTick() { // Purpur
if (this.rabbit.onGround() && !this.rabbit.jumping && !((Rabbit.RabbitJumpControl) this.rabbit.jumpControl).wantJump()) {
this.rabbit.setSpeedModifier(0.0D);
- } else if (this.hasWanted()) {
+ } else if (this.hasWanted() || this.operation == MoveControl.Operation.JUMPING) {
this.rabbit.setSpeedModifier(this.nextJumpSpeed);
}
@@ -7482,10 +7477,10 @@ index 8cc6022507c97af62fb2b4455198bc35744137c9..b3a0146ccfcda9fa33b91d33458086b5
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Salmon.java b/src/main/java/net/minecraft/world/entity/animal/Salmon.java
-index 661997c39df777b6e332f0a5710e7f63a116a499..1a0c71ed6f3bd3d961f9b30ab29a62d683195355 100644
+index 500259e6f297276fb3d6943c2bf88c844d4ec7e4..3716201b0889dfb0bacd0e223a29e80ee1f84e8e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Salmon.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Salmon.java
-@@ -32,6 +32,33 @@ public class Salmon extends AbstractSchoolingFish implements VariantHolder brainProvider() {
return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
-@@ -219,11 +260,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
+@@ -223,11 +264,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
return 0.4F;
}
@@ -8444,7 +8440,7 @@ index f3c884ab9c09f04dd01cabf2ee9de3b5b620563d..dbce71f45c008da883b6d244a06343d8
protected SoundEvent getAmbientSound() {
return SoundEvents.CAMEL_AMBIENT;
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 36846ba6b6c7494c745ebd8b221479a9d02ff318..02581f47d1ca58c2b8abffc478adf48343585c8b 100644
+index ca04e5d829331551a2c2f44e223ff05c6ce04e76..267f49bf00f5bbd5541e25c938f727a5bafd8eb2 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -106,6 +106,8 @@ public class Frog extends Animal implements VariantHolder> {
@@ -9094,7 +9090,7 @@ index 7d0197447990bb79b85a4f1529c3ac3eefb03c84..9307c07b8f75caacbde6839893f54700
@Override
protected SoundEvent getAmbientSound() {
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
-index 7b43fcf86984cc200f34c189e7a547996416f379..1d765ad53a9d8dd388106bc0cb02f4919a1f8173 100644
+index 53a8d59681809da931d11ff76c202f950993a142..cb881211f948b21ea03364373376e894cd6ed5cc 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
@@ -33,6 +33,58 @@ public class TraderLlama extends Llama {
@@ -9389,7 +9385,7 @@ index 7cb3d69a69e0e3ef4b7f9f9c8b1eb67edb5d116d..b1db1e92de3a88a0f0e0fdb42b0bf973
this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-index 2df8bf818345246cc1f88b93e4a3b62e61772efb..c9e3bb91ff506a35551a58f469ad2849e6058668 100644
+index d5fc74dbc2c5f6b65fee46e7797b151144c8fd41..eff4424fa9cbea4358c8d8cd4d20c53182f5179e 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -108,6 +108,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -9570,7 +9566,7 @@ index 2df8bf818345246cc1f88b93e4a3b62e61772efb..c9e3bb91ff506a35551a58f469ad2849
short0 = 12000;
}
-@@ -1069,6 +1155,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -1083,6 +1169,7 @@ public class EnderDragon extends Mob implements Enemy {
@Override
protected boolean canRide(Entity entity) {
@@ -9578,7 +9574,7 @@ index 2df8bf818345246cc1f88b93e4a3b62e61772efb..c9e3bb91ff506a35551a58f469ad2849
return false;
}
-@@ -1095,6 +1182,6 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -1109,6 +1196,6 @@ public class EnderDragon extends Mob implements Enemy {
@Override
protected float sanitizeScale(float scale) {
@@ -9587,7 +9583,7 @@ index 2df8bf818345246cc1f88b93e4a3b62e61772efb..c9e3bb91ff506a35551a58f469ad2849
}
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c060797883613812ad73c31 100644
+index bd9e10f79eaf0d23908229b3ebc2227946a14843..a671d18a354421f197e5248a16bfe9a12c5befe4 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -86,20 +86,60 @@ public class WitherBoss extends Monster implements RangedAttackMob {
@@ -9652,7 +9648,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
@Override
protected PathNavigation createNavigation(Level world) {
FlyingPathNavigation navigationflying = new FlyingPathNavigation(this, world);
-@@ -110,13 +150,114 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -109,13 +149,114 @@ public class WitherBoss extends Monster implements RangedAttackMob {
return navigationflying;
}
@@ -9767,7 +9763,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, WitherBoss.LIVING_ENTITY_SELECTOR));
}
-@@ -134,6 +275,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -133,6 +274,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
nbt.putInt("Invul", this.getInvulnerableTicks());
@@ -9775,7 +9771,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
}
@Override
-@@ -143,6 +285,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -142,6 +284,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
if (this.hasCustomName()) {
this.bossEvent.setName(this.getDisplayName());
}
@@ -9783,7 +9779,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
}
-@@ -152,6 +295,13 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -151,6 +294,13 @@ public class WitherBoss extends Monster implements RangedAttackMob {
this.bossEvent.setName(this.getDisplayName());
}
@@ -9797,7 +9793,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
@Override
protected SoundEvent getAmbientSound() {
return SoundEvents.WITHER_AMBIENT;
-@@ -261,6 +411,15 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -260,6 +410,15 @@ public class WitherBoss extends Monster implements RangedAttackMob {
@Override
protected void customServerAiStep(ServerLevel world) {
@@ -9813,7 +9809,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
int i;
if (this.getInvulnerableTicks() > 0) {
-@@ -277,7 +436,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -276,7 +435,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
}
// CraftBukkit end
@@ -9822,7 +9818,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
// CraftBukkit start - Use relative location for far away sounds
// worldserver.globalLevelEvent(1023, new BlockPosition(this), 0);
int viewDistance = world.getCraftServer().getViewDistance() * 16;
-@@ -302,7 +461,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -301,7 +460,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
this.setInvulnerableTicks(i);
if (this.tickCount % 10 == 0) {
@@ -9831,7 +9827,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
}
} else {
-@@ -362,7 +521,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -361,7 +520,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
if (this.destroyBlocksTick > 0) {
--this.destroyBlocksTick;
@@ -9840,7 +9836,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
boolean flag = false;
j = Mth.floor(this.getBbWidth() / 2.0F + 1.0F);
-@@ -389,8 +548,10 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -388,8 +547,10 @@ public class WitherBoss extends Monster implements RangedAttackMob {
}
}
@@ -9853,7 +9849,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
}
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
-@@ -579,11 +740,11 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -578,11 +739,11 @@ public class WitherBoss extends Monster implements RangedAttackMob {
}
public int getAlternativeTarget(int headIndex) {
@@ -9867,7 +9863,7 @@ index 244e38db508efa3eebebb6392c4ebb0805367baf..5e134b3cf939fe396c06079788361381
}
public boolean isPowered() {
-@@ -592,6 +753,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -591,6 +752,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
@Override
protected boolean canRide(Entity entity) {
@@ -9936,7 +9932,7 @@ index 70b8023c3badc745f342d5b0ab54699e3923826a..037586c0fdb42a02660aba89dd741a64
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
-index bbdaaa1cc0b4aed28bc39385508d221055b99d4d..bd5e034ce58ebe53d2121209d76ae60134ce72fe 100644
+index 7d83ad8a61f6aafbc063506c1858554f9b700b70..fd1bd4fb88d1bd4a0734db463dc1be640c736d34 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -240,7 +240,13 @@ public class ItemFrame extends HangingEntity {
@@ -10022,7 +10018,7 @@ index 0f086af57a5ff08c264dcbf89a8c3931ec73a609..c63cf322e0d00b5ec9929db8c22d4a39
@Override
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-index de87483600e55d88176fe25db621bbd3e464729f..287ba483614e79e78022e703ef891f59f41ac455 100644
+index 809f5e847e2f5bb594c130cebd2cb897ea768d82..6f1e21d6c104d71fe4fc3376ed2f2273a5f3d3cc 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -249,4 +249,31 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@@ -10058,10 +10054,10 @@ index de87483600e55d88176fe25db621bbd3e464729f..287ba483614e79e78022e703ef891f59
+ // Purpur end - Shears can defuse TNT
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3e0057e60 100644
+index 90b6ed81dcfd4021c7e9509da5e8725034fa07e5..0235488faee8078186fbb78038789da0846aca29 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-@@ -68,16 +68,19 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -70,16 +70,19 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
protected AbstractSkeleton(EntityType extends AbstractSkeleton> type, Level world) {
super(type, world);
this.reassessWeaponGoal();
@@ -10081,7 +10077,7 @@ index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3
this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
-@@ -96,37 +99,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -98,37 +101,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
abstract SoundEvent getStepSound();
// Paper start - shouldBurnInDay API
@@ -10121,7 +10117,7 @@ index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3
super.aiStep();
}
-@@ -158,11 +138,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -160,11 +140,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
this.reassessWeaponGoal();
this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
@@ -10134,7 +10130,7 @@ index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3
this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(randomsource.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN));
this.armorDropChances[EquipmentSlot.HEAD.getIndex()] = 0.0F;
}
-@@ -221,7 +197,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -223,7 +199,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
}
if (event.getProjectile() == entityarrow.getBukkitEntity()) {
@@ -10143,7 +10139,7 @@ index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3
}
// CraftBukkit end
}
-@@ -243,7 +219,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -250,7 +226,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
super.readAdditionalSaveData(nbt);
this.reassessWeaponGoal();
// Paper start - shouldBurnInDay API
@@ -10152,7 +10148,7 @@ index 32670a3cb4b54b66d655197e3fde834d2b2b6d34..39d02cf0e31832e30c4f034b0b5385e3
this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay");
}
// Paper end - shouldBurnInDay API
-@@ -253,7 +229,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -260,7 +236,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
@@ -10523,10 +10519,10 @@ index 1906dfc22af208d6e801ad4a8f2f9e9702432691..38cbe2fce9c36195aa9bea2af26d1436
}
// Paper end - CreeperIgniteEvent
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5462b86b9 100644
+index c6c86913c0a48501a9109a3838a3e56685d16d79..a28a4cd9544ffa58bd03ac901a761c797044629a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-@@ -72,6 +72,59 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -75,6 +75,59 @@ public class Drowned extends Zombie implements RangedAttackMob {
return Zombie.createAttributes().add(Attributes.STEP_HEIGHT, 1.0);
}
@@ -10586,7 +10582,7 @@ index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5
@Override
protected void addBehaviourGoals() {
this.goalSelector.addGoal(1, new Drowned.DrownedGoToWaterGoal(this, 1.0));
-@@ -79,10 +132,23 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -82,10 +135,23 @@ public class Drowned extends Zombie implements RangedAttackMob {
this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false));
this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0));
this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel()));
@@ -10611,7 +10607,7 @@ index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Axolotl.class, true, false));
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
-@@ -396,7 +462,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -398,7 +464,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
}
}
@@ -10620,7 +10616,7 @@ index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5
private final Drowned drowned;
public DrownedMoveControl(Drowned drowned) {
-@@ -405,7 +471,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -407,7 +473,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
}
@Override
@@ -10629,7 +10625,7 @@ index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5
LivingEntity livingEntity = this.drowned.getTarget();
if (this.drowned.wantsToSwim() && this.drowned.isInWater()) {
if (livingEntity != null && livingEntity.getY() > this.drowned.getY() || this.drowned.searchingForLand) {
-@@ -425,7 +491,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -427,7 +493,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
float h = (float)(Mth.atan2(f, d) * 180.0F / (float)Math.PI) - 90.0F;
this.drowned.setYRot(this.rotlerp(this.drowned.getYRot(), h, 90.0F));
this.drowned.yBodyRot = this.drowned.getYRot();
@@ -10638,7 +10634,7 @@ index 2e73917ce9270de7483bb1d4e9bf312a31ec9b1e..949207eda199c874f2f14074b5a4fff5
float j = Mth.lerp(0.125F, this.drowned.getSpeed(), i);
this.drowned.setSpeed(j);
this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add((double)j * d * 0.005, (double)j * e * 0.1, (double)j * f * 0.005));
-@@ -434,7 +500,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -436,7 +502,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add(0.0, -0.008, 0.0));
}
@@ -10687,10 +10683,10 @@ index 378694a38115c012978e1fea59d049d1ebd04110..a000304e3ac4c34b020f7457aa2589c8
return Guardian.createAttributes().add(Attributes.MOVEMENT_SPEED, 0.30000001192092896D).add(Attributes.ATTACK_DAMAGE, 8.0D).add(Attributes.MAX_HEALTH, 80.0D);
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b58f78479d 100644
+index 2a394381a4ad46359359ba402b65c62b331480b4..881b85506cbff22febe0c1cd0d30822be5c2a517 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-@@ -92,12 +92,41 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -91,12 +91,41 @@ public class EnderMan extends Monster implements NeutralMob {
public EnderMan(EntityType extends EnderMan> type, Level world) {
super(type, world);
@@ -10733,7 +10729,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
this.goalSelector.addGoal(1, new EnderMan.EndermanFreezeWhenLookedAt(this));
this.goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.0D, false));
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D, 0.0F));
-@@ -105,9 +134,10 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -104,9 +133,10 @@ public class EnderMan extends Monster implements NeutralMob {
this.goalSelector.addGoal(8, new RandomLookAroundGoal(this));
this.goalSelector.addGoal(10, new EnderMan.EndermanLeaveBlockGoal(this));
this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this));
@@ -10745,16 +10741,16 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
}
-@@ -235,7 +265,7 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -234,7 +264,7 @@ public class EnderMan extends Monster implements NeutralMob {
boolean isBeingStaredBy(Player player) {
- // Paper start - EndermanAttackPlayerEvent
-- boolean shouldAttack = isBeingStaredBy0(player);
-+ boolean shouldAttack = !this.level().purpurConfig.endermanDisableStareAggro && isBeingStaredBy0(player); // Purpur
- com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity());
+ // Paper start - EndermanAttackPlayerEvent
+- final boolean shouldAttack = isBeingStaredBy0(player);
++ final boolean shouldAttack = !this.level().purpurConfig.endermanDisableStareAggro && isBeingStaredBy0(player); // Purpur
+ final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity());
event.setCancelled(!shouldAttack);
return event.callEvent();
-@@ -263,12 +293,12 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -262,12 +292,12 @@ public class EnderMan extends Monster implements NeutralMob {
@Override
public boolean isSensitiveToWater() {
@@ -10769,7 +10765,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
float f = this.getLightLevelDependentMagicValue();
if (f > 0.5F && world.canSeeSky(this.blockPosition()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper - EndermanEscapeEvent
-@@ -307,11 +337,17 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -306,11 +336,17 @@ public class EnderMan extends Monster implements NeutralMob {
private boolean teleport(double x, double y, double z) {
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(x, y, z);
@@ -10789,7 +10785,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
boolean flag = iblockdata.blocksMotion();
boolean flag1 = iblockdata.getFluidState().is(FluidTags.WATER);
-@@ -383,6 +419,8 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -382,6 +418,8 @@ public class EnderMan extends Monster implements NeutralMob {
public boolean hurtServer(ServerLevel world, DamageSource source, float amount) {
if (this.isInvulnerableTo(world, source)) {
return false;
@@ -10798,7 +10794,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
} else {
boolean flag = source.getDirectEntity() instanceof ThrownPotion;
boolean flag1;
-@@ -397,6 +435,7 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -396,6 +434,7 @@ public class EnderMan extends Monster implements NeutralMob {
} else {
flag1 = flag && this.hurtWithCleanWater(world, source, (ThrownPotion) source.getDirectEntity(), amount);
@@ -10806,7 +10802,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent
for (int i = 0; i < 64; ++i) {
if (this.teleport()) {
-@@ -441,7 +480,7 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -440,7 +479,7 @@ public class EnderMan extends Monster implements NeutralMob {
@Override
public boolean requiresCustomPersistence() {
@@ -10815,7 +10811,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
}
private static class EndermanFreezeWhenLookedAt extends Goal {
-@@ -488,7 +527,16 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -487,7 +526,16 @@ public class EnderMan extends Monster implements NeutralMob {
@Override
public boolean canUse() {
@@ -10833,7 +10829,7 @@ index 48dcd2bc12ce1d08cc5195bff5460dc0dd9902d3..476aaa0d9899eb56ea29b1fcf15565b5
}
@Override
-@@ -533,7 +581,16 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -532,7 +580,16 @@ public class EnderMan extends Monster implements NeutralMob {
@Override
public boolean canUse() {
@@ -10936,7 +10932,7 @@ index 534e98dd7291e09dee1d0f77cbf221b15708590f..f8373fc9839fccb31e3dd090de70e2cd
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
-index 6592baa53ecb4e364d1c1b6f64178fc86c59a982..e231bb33b7e6a00d7c1a6c3540b4b48cfd4c15e3 100644
+index 14f23c9a248760a57b3d6fe4f2824a4a456a6d37..9454a2eccc1f405f2013a18d56e65a1e6a4bb8f7 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
@@ -53,10 +53,44 @@ public class Evoker extends SpellcasterIllager {
@@ -10983,7 +10979,7 @@ index 6592baa53ecb4e364d1c1b6f64178fc86c59a982..e231bb33b7e6a00d7c1a6c3540b4b48c
+ this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
this.goalSelector.addGoal(1, new Evoker.EvokerCastingSpellGoal());
this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Player.class, 8.0F, 0.6D, 1.0D));
- this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 1.0D, 1.2D));
+ this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 0.6D, 1.0D));
@@ -66,6 +100,7 @@ public class Evoker extends SpellcasterIllager {
this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 3.0F, 1.0F));
@@ -11538,7 +11534,7 @@ index e2de074bbe7bab0e5a7aecc1fae4c5914a203dd4..c2061f575c731ecc6071384b007517c0
return false;
} else {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
-index 150fd890ac65097b5434fd88e8d2b24a89dca79a..cda6cb5b10b895bab48d2212f259ba4ca40e1ed6 100644
+index 4ff75412452649ebf106ef591cb97dc7ac8175e7..23ca324c5379f9735232a9f74071117da23c2290 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -49,6 +49,8 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -11553,7 +11549,7 @@ index 150fd890ac65097b5434fd88e8d2b24a89dca79a..cda6cb5b10b895bab48d2212f259ba4c
@@ -58,6 +60,92 @@ public class Phantom extends FlyingMob implements Enemy {
this.xpReward = 5;
this.moveControl = new Phantom.PhantomMoveControl(this);
- this.lookControl = new Phantom.PhantomLookControl(this, this);
+ this.lookControl = new Phantom.PhantomLookControl(this);
+ this.setShouldBurnInDay(true); // Purpur - API for any mob to burn daylight
+ }
+
@@ -11914,11 +11910,11 @@ index 150fd890ac65097b5434fd88e8d2b24a89dca79a..cda6cb5b10b895bab48d2212f259ba4c
}
}
-- private class PhantomLookControl extends LookControl {
-+ private class PhantomLookControl extends org.purpurmc.purpur.controller.LookControllerWASD { // Purpur
+- private static class PhantomLookControl extends LookControl {
++ private static class PhantomLookControl extends org.purpurmc.purpur.controller.LookControllerWASD { // Purpur
- public PhantomLookControl(final Phantom entity, final Mob phantom) {
- super(phantom);
+ public PhantomLookControl(Mob entity) {
+ super(entity);
}
+ // Purpur start
@@ -11955,10 +11951,10 @@ index 150fd890ac65097b5434fd88e8d2b24a89dca79a..cda6cb5b10b895bab48d2212f259ba4c
list.sort(Comparator.comparing((Entity e) -> { return e.getY(); }).reversed()); // CraftBukkit - decompile error
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/entity/monster/Pillager.java b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
-index 3e8631c7bd1e7591051ca21c6ae7acd87d3c7529..85d5c84a8861905e4546901aa6707078571eb402 100644
+index 91edf8767541982b8cd1be83c33a7b287ffb62fe..588da64f4137a9f13f41875b3f5c47b485398782 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Pillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
-@@ -64,16 +64,51 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
+@@ -67,16 +67,51 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
super(type, world);
}
@@ -12001,7 +11997,7 @@ index 3e8631c7bd1e7591051ca21c6ae7acd87d3c7529..85d5c84a8861905e4546901aa6707078
this.goalSelector.addGoal(0, new FloatGoal(this));
+ this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
this.goalSelector.addGoal(1, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 1.0D, 1.2D));
- this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F)); // Paper - decomp fix
+ this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F));
this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0D, 8.0F));
this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 15.0F, 1.0F));
@@ -12011,10 +12007,10 @@ index 3e8631c7bd1e7591051ca21c6ae7acd87d3c7529..85d5c84a8861905e4546901aa6707078
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false));
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa721a87a123 100644
+index cfc28828a5b81563a826ae6045553e7350f67986..17aaa3f376ce6183911739536206f9f701e452b5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-@@ -77,15 +77,57 @@ public class Ravager extends Raider {
+@@ -75,14 +75,56 @@ public class Ravager extends Raider {
this.setPathfindingMalus(PathType.LEAVES, 0.0F);
}
@@ -12062,7 +12058,6 @@ index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa72
super.registerGoals();
this.goalSelector.addGoal(0, new FloatGoal(this));
+ this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
- this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 1.0D, 1.2D));
+ if (level().purpurConfig.ravagerAvoidRabbits) this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.AvoidEntityGoal<>(this, net.minecraft.world.entity.animal.Rabbit.class, 6.0F, 1.0D, 1.2D)); // Purpur
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, true));
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4D));
@@ -12072,7 +12067,7 @@ index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa72
this.targetSelector.addGoal(2, (new HurtByTargetGoal(this, new Class[]{Raider.class})).setAlertOthers());
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, true));
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, true, (entityliving, worldserver) -> {
-@@ -138,7 +180,7 @@ public class Ravager extends Raider {
+@@ -135,7 +177,7 @@ public class Ravager extends Raider {
@Override
public void aiStep() {
super.aiStep();
@@ -12081,7 +12076,7 @@ index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa72
if (this.isImmobile()) {
this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.0D);
} else {
-@@ -153,7 +195,7 @@ public class Ravager extends Raider {
+@@ -150,7 +192,7 @@ public class Ravager extends Raider {
if (world instanceof ServerLevel) {
ServerLevel worldserver = (ServerLevel) world;
@@ -12090,7 +12085,7 @@ index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa72
boolean flag = false;
AABB axisalignedbb = this.getBoundingBox().inflate(0.2D);
Iterator iterator = BlockPos.betweenClosed(Mth.floor(axisalignedbb.minX), Mth.floor(axisalignedbb.minY), Mth.floor(axisalignedbb.minZ), Mth.floor(axisalignedbb.maxX), Mth.floor(axisalignedbb.maxY), Mth.floor(axisalignedbb.maxZ)).iterator();
-@@ -163,7 +205,7 @@ public class Ravager extends Raider {
+@@ -160,7 +202,7 @@ public class Ravager extends Raider {
BlockState iblockdata = worldserver.getBlockState(blockposition);
Block block = iblockdata.getBlock();
@@ -12100,7 +12095,7 @@ index c96fbfe448b3e7b722a8db0e1688276776abd94e..98c1934b4895a86cd8748edf906aaa72
if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock())) { // Paper - fix wrong block state
continue;
diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
-index 6e0f2f6573ed6be9b91de960d55c269417ad8907..e3fefd52c83079fe3eab1a96dd81a183f718192b 100644
+index 64d99b8b576212f754bd316343562b1ba7f604fa..b940cb26de3852e2127ccdd1f6c067123a909c25 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
@@ -84,7 +84,7 @@ public class Shulker extends AbstractGolem implements VariantHolder type, ServerLevelAccessor world, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random
) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Strider.java b/src/main/java/net/minecraft/world/entity/monster/Strider.java
-index 711b7eb8e9fdedbc87965828e573fe8d5c357d53..c3b5b34a54de945071692293645b8a8865aed961 100644
+index 0a9246241985d2d97beb865b7163f1d2198f03b8..779ae2e63202c1f189b1f5647218a07c21a84ccd 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Strider.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java
@@ -91,12 +91,45 @@ public class Strider extends Animal implements ItemSteerable, Saddleable {
@@ -13058,10 +13054,10 @@ index a03fa8a3e648532a7ffaaf523ca87c13e8af4c0a..313228811d1eff478887511f99b49706
this.targetSelector.addGoal(2, this.healRaidersGoal);
this.targetSelector.addGoal(3, this.attackPlayersGoal);
diff --git a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
-index 37d3acda84a984bf4f1c44b3d27e2102839d3e8e..23fc36780a3e15260f8cb1001c8d676464a9df3a 100644
+index 557b4e225688416132281e9b1759d46a9b775ff9..80968050fa7680a8d9b379ef7a8db5e91a4b3a8f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
-@@ -33,6 +33,39 @@ public class WitherSkeleton extends AbstractSkeleton {
+@@ -36,6 +36,39 @@ public class WitherSkeleton extends AbstractSkeleton {
this.setPathfindingMalus(PathType.LAVA, 8.0F);
}
@@ -13368,7 +13364,7 @@ index a12461907278cfbfa3b1c0aa74b9f07a31768b8a..85b03e0bf7436cb846df13c575ad78ac
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
-index 18c19e4b675000aacb74344909fc104964231008..6f6b32bf7f68d05e4173c31f2e631a409b858a05 100644
+index 30bce56a70f923b0ec77c8e3f29e435a71c71510..cd66ef1d99f3ce4533c2423fd12b2fcadf481a66 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -85,6 +85,58 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -13530,11 +13526,11 @@ index 03e3cbe73119ca76417d4dd192e1560bdfc373ec..8c3271dcc8c9aa58e2e007eba282c11e
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
-index 7b5f9284972b3a6bd8125891b23f73438e875c08..ea1655d2cbc631d80dd66f7e3e24998530df66a2 100644
+index 6a7e725edece3043c8523d387e2929d5ba8932cb..57f07799e74ecd48b8e4af68569b46be42c721ea 100644
--- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
+++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
-@@ -63,6 +63,29 @@ public class Creaking extends Monster {
- this.xpReward = 0;
+@@ -106,6 +106,29 @@ public class Creaking extends Monster {
+ return this.getHomePos() != null;
}
+ // Purpur start
@@ -13563,7 +13559,7 @@ index 7b5f9284972b3a6bd8125891b23f73438e875c08..ea1655d2cbc631d80dd66f7e3e249985
@Override
protected BodyRotationControl createBodyControl() {
return new Creaking.CreakingBodyRotationControl(this);
-@@ -185,6 +208,14 @@ public class Creaking extends Monster {
+@@ -474,6 +497,14 @@ public class Creaking extends Monster {
return this.isActive() ? null : SoundEvents.CREAKING_AMBIENT;
}
@@ -13578,12 +13574,13 @@ index 7b5f9284972b3a6bd8125891b23f73438e875c08..ea1655d2cbc631d80dd66f7e3e249985
@Override
protected SoundEvent getHurtSound(DamageSource source) {
return SoundEvents.CREAKING_SWAY;
-@@ -296,28 +327,28 @@ public class Creaking extends Monster {
- }
+@@ -575,31 +606,31 @@ public class Creaking extends Monster {
+ return 0.0F;
}
-- class CreakingLookControl extends LookControl {
-+ class CreakingLookControl extends org.purpurmc.purpur.controller.LookControllerWASD { // Purpur
+- private class CreakingLookControl extends LookControl {
++ private class CreakingLookControl extends org.purpurmc.purpur.controller.LookControllerWASD { // Purpur
+
public CreakingLookControl(final Creaking creaking) {
super(creaking);
}
@@ -13595,11 +13592,13 @@ index 7b5f9284972b3a6bd8125891b23f73438e875c08..ea1655d2cbc631d80dd66f7e3e249985
- super.tick();
+ super.vanillaTick(); // Purpur
}
+
}
}
-- class CreakingMoveControl extends MoveControl {
-+ class CreakingMoveControl extends org.purpurmc.purpur.controller.MoveControllerWASD { // Purpur
+- private class CreakingMoveControl extends MoveControl {
++ private class CreakingMoveControl extends org.purpurmc.purpur.controller.MoveControllerWASD { // Purpur
+
public CreakingMoveControl(final Creaking creaking) {
super(creaking);
}
@@ -13611,8 +13610,8 @@ index 7b5f9284972b3a6bd8125891b23f73438e875c08..ea1655d2cbc631d80dd66f7e3e249985
- super.tick();
+ super.vanillaTick(); // Purpur
}
+
}
- }
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 92270912ef26924f611a1df7cb3d5b485b0a262d..6144613e834236ec0ebb12872ef9e47255b76b5b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -13682,10 +13681,10 @@ index 92270912ef26924f611a1df7cb3d5b485b0a262d..6144613e834236ec0ebb12872ef9e472
gameprofilerfiller.pop();
HoglinAi.updateActivity(this);
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 e04d2c5e75dc774fe893a552474fdb8045c32693..20608fb46a0af85739e3c0caa843c1a9d45c9659 100644
+index 2121d2a2e1aa1d0f0390cc515317096431f6dcb0..a2d29cf854be6f0bc5b5bb99e7002e07ccc4cae9 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
-@@ -96,6 +96,39 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
+@@ -99,6 +99,39 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
this.xpReward = 5;
}
@@ -13725,7 +13724,7 @@ index e04d2c5e75dc774fe893a552474fdb8045c32693..20608fb46a0af85739e3c0caa843c1a9
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
-@@ -304,11 +337,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
+@@ -307,11 +340,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
return !this.cannotHunt;
}
@@ -13739,7 +13738,7 @@ index e04d2c5e75dc774fe893a552474fdb8045c32693..20608fb46a0af85739e3c0caa843c1a9
this.getBrain().tick(world, this);
gameprofilerfiller.pop();
PiglinAi.updateActivity(this);
-@@ -405,7 +440,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
+@@ -413,7 +448,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
public boolean wantsToPickUp(ServerLevel world, ItemStack stack) {
@@ -13825,7 +13824,7 @@ index 24eaeb93284fe1a573026b85818a93a34fd9e1ec..bc3b0eb21200eae7e419b2571871b36f
profilerFiller.pop();
PiglinBruteAi.updateActivity(this);
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
-index 6180019da58b19d2595da508aed3196af922d587..5a62fe9c4f0cee9e8b4a48564f76afec609335b1 100644
+index c47ed605f0822effd58df4f875297ed015e1e57e..cf231928bae5493b0684109c769d7da4dc36f872 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -127,8 +127,32 @@ public class Warden extends Monster implements VibrationSystem {
@@ -13897,7 +13896,7 @@ index 6180019da58b19d2595da508aed3196af922d587..5a62fe9c4f0cee9e8b4a48564f76afec
public static void applyDarknessAround(ServerLevel world, Vec3 pos, @Nullable Entity entity, int range) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
-index 5f656fc726a1dc5f42657095a2f2b7cf85b92d7c..6c74cf1dea99b3b967b8c3d76f405f823c881fb9 100644
+index 3c037cabd8331eb96a6523b37abab4e73ab79a02..e2b00681e427bc99c3b3660d8f4830379b98c7a0 100644
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
@@ -48,6 +48,7 @@ import org.bukkit.event.entity.VillagerAcquireTradeEvent;
@@ -13950,7 +13949,7 @@ index b0236c7bf9441aa84d3795ffed05dd6099f29636..796dcc0dcf9022b455b8847e045266b8
}
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 b7a34f1c4d7b5ef3f7a843d152e33c839dcdedd5..0ee456972923e90905732ffc5d77bb027cf6c0fc 100644
+index 2d8ba55906c8da16fde850e3412f4a6bda3d56e7..15ddc44bb266b4cdb1036c92dd60f1379832b501 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -141,6 +141,10 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -14309,10 +14308,10 @@ index a728dcbf956f108f01c966c7531449a506a14a87..4c1378132201c1e5d1bc01f8c0cbba91
if (spawnplacementtype.isSpawnPositionOk(world, blockposition2, EntityType.WANDERING_TRADER)) {
blockposition1 = blockposition2;
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
-index 0990bcf65f484b9a019c91fcdae1783bac6388da..99feda30fb85a7615560b6e9a3701d5dfeb3e524 100644
+index 110456deaa662bc1c0f6ba7878bb3074869a4350..58c8e8f06f5cf028b158350327bf42984fcb4d38 100644
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
-@@ -649,6 +649,8 @@ public class Inventory implements Container, Nameable {
+@@ -636,6 +636,8 @@ public class Inventory implements Container, Nameable {
}
public boolean contains(ItemStack stack) {
@@ -14321,7 +14320,7 @@ index 0990bcf65f484b9a019c91fcdae1783bac6388da..99feda30fb85a7615560b6e9a3701d5d
Iterator iterator = this.compartments.iterator();
while (iterator.hasNext()) {
-@@ -663,6 +665,18 @@ public class Inventory implements Container, Nameable {
+@@ -650,6 +652,18 @@ public class Inventory implements Container, Nameable {
}
}
}
@@ -14341,10 +14340,10 @@ index 0990bcf65f484b9a019c91fcdae1783bac6388da..99feda30fb85a7615560b6e9a3701d5d
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d1587feab 100644
+index 5b8b85a295a08ae495f729c595b3a78778965342..d19b1e127a1018a798eed181d8060a781b589f90 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -197,17 +197,40 @@ public abstract class Player extends LivingEntity {
+@@ -200,17 +200,40 @@ public abstract class Player extends LivingEntity {
private int currentImpulseContextResetGraceTime;
public boolean affectsSpawning = true; // Paper - Affects Spawning API
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
@@ -14385,7 +14384,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
public Player(Level world, BlockPos pos, float yaw, GameProfile gameProfile) {
super(EntityType.PLAYER, world);
this.lastItemInMainHand = ItemStack.EMPTY;
-@@ -252,6 +275,12 @@ public abstract class Player extends LivingEntity {
+@@ -255,6 +278,12 @@ public abstract class Player extends LivingEntity {
@Override
public void tick() {
@@ -14396,9 +14395,9 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
+ // Purpur end
+
this.noPhysics = this.isSpectator();
- if (this.isSpectator()) {
+ if (this.isSpectator() || this.isPassenger()) {
this.setOnGround(false);
-@@ -332,6 +361,17 @@ public abstract class Player extends LivingEntity {
+@@ -335,6 +364,17 @@ public abstract class Player extends LivingEntity {
this.turtleHelmetTick();
}
@@ -14416,7 +14415,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
this.cooldowns.tick();
this.updatePlayerPose();
if (this.currentImpulseContextResetGraceTime > 0) {
-@@ -622,7 +662,7 @@ public abstract class Player extends LivingEntity {
+@@ -625,7 +665,7 @@ public abstract class Player extends LivingEntity {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -14425,7 +14424,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
list1.add(entity);
} else if (!entity.isRemoved()) {
this.touch(entity);
-@@ -1274,7 +1314,7 @@ public abstract class Player extends LivingEntity {
+@@ -1277,7 +1317,7 @@ public abstract class Player extends LivingEntity {
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
if (flag2) {
damagesource = damagesource.critical(true); // Paper start - critical damage API
@@ -14434,7 +14433,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
}
float f3 = f + f1;
-@@ -1640,7 +1680,7 @@ public abstract class Player extends LivingEntity {
+@@ -1643,7 +1683,7 @@ public abstract class Player extends LivingEntity {
}
@Override
@@ -14443,7 +14442,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
return !this.abilities.flying && super.canGlide();
}
-@@ -1900,7 +1940,23 @@ public abstract class Player extends LivingEntity {
+@@ -1903,7 +1943,23 @@ public abstract class Player extends LivingEntity {
@Override
protected int getBaseExperienceReward(ServerLevel world) {
@@ -14468,7 +14467,7 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
}
@Override
-@@ -1978,6 +2034,13 @@ public abstract class Player extends LivingEntity {
+@@ -1981,6 +2037,13 @@ public abstract class Player extends LivingEntity {
return slot != EquipmentSlot.BODY;
}
@@ -14483,10 +14482,10 @@ index 61d412c4f1ebd55661cc3f0260468e3ac0efe0bb..c1d068fa99ec0fd5685bbb627a775e4d
if (!this.isPassenger() && this.onGround() && !this.isInWater() && !this.isInPowderSnow) {
if (this.getShoulderEntityLeft().isEmpty()) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 8ce573042ea87631eb6539f2a0d5036655c2b809..5006a59734c5fc7525fba86f7d74e74f8f1b54b0 100644
+index f4513b1887f823b088dabe425be042b8fb2bde66..e136738ed53a488ad0aa67a04237ac6243fe712c 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -80,6 +80,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -82,6 +82,7 @@ public abstract class AbstractArrow extends Projectile {
public ItemStack pickupItemStack;
@Nullable
public ItemStack firedFromWeapon;
@@ -14494,7 +14493,7 @@ index 8ce573042ea87631eb6539f2a0d5036655c2b809..5006a59734c5fc7525fba86f7d74e74f
// Spigot Start
@Override
-@@ -371,7 +372,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -372,7 +373,7 @@ public abstract class AbstractArrow extends Projectile {
Vec3 vec3d = this.getDeltaMovement();
this.setDeltaMovement(vec3d.multiply((double) (this.random.nextFloat() * 0.2F), (double) (this.random.nextFloat() * 0.2F), (double) (this.random.nextFloat() * 0.2F)));
@@ -14503,7 +14502,7 @@ index 8ce573042ea87631eb6539f2a0d5036655c2b809..5006a59734c5fc7525fba86f7d74e74f
}
public boolean isInGround() {
-@@ -623,6 +624,12 @@ public abstract class AbstractArrow extends Projectile {
+@@ -638,6 +639,12 @@ public abstract class AbstractArrow extends Projectile {
return this.firedFromWeapon;
}
@@ -14563,7 +14562,7 @@ index 958ea103cc80da7366cc33dc385b76d4f5c809f2..0b7f27a6cc6be58fa5b60002059c9fbb
protected double getDefaultGravity() {
return 0.06D;
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
-index 6c2d4d6f3a36ab452dfd3c33f66e54f152906639..a7df9c2a3f210bc944cf76cdcc8d2a9484704bd1 100644
+index 9a7b56b653848974e1194eb4f6d40cb99a96ff57..40a1514637a6a26666ba877e6dcf5bc42bd54a51 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -58,6 +58,36 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -14603,7 +14602,7 @@ index 6c2d4d6f3a36ab452dfd3c33f66e54f152906639..a7df9c2a3f210bc944cf76cdcc8d2a94
public void setOwner(@Nullable Entity entity) {
if (entity != null) {
this.ownerUUID = entity.getUUID();
-@@ -480,7 +510,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
+@@ -468,7 +498,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
public boolean mayInteract(ServerLevel world, BlockPos pos) {
Entity entity = this.getOwner();
@@ -14626,7 +14625,7 @@ index bb159ea4baf208aab6d6fcfbbddacd5b089b55c8..588b07ec4501924a49264183b414a7fd
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
-index 70961e151666a0ecf5b791853f4581eaebbdcc8b..0db58e7d63a5c1b43a2224c247979f23a1d3f899 100644
+index 048ca5232d71f07d8ba7d3eaf0236660494c6b35..6fdacf2f6934521a0dd4b25aea35a6a14123da0a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
@@ -58,11 +58,41 @@ public class Snowball extends ThrowableItemProjectile {
@@ -14699,10 +14698,10 @@ index bd2684528157f928460f2143dd71a48e11983123..0720df603b4f89dd6aa346091b13033a
this.playSound(worldserver, vec3d);
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-index 322733266fdca8ce43434a8ffea304c51794bcbb..489c26423a7f5bc9da45d247de57ec989cc74119 100644
+index 1e045397763e8233c2e8f9955468788374b80068..3573a6cf0632dfb6859f5a5e7ceffb947e9d3692 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-@@ -69,7 +69,7 @@ public class ThrownTrident extends AbstractArrow {
+@@ -70,7 +70,7 @@ public class ThrownTrident extends AbstractArrow {
Entity entity = this.getOwner();
byte b0 = (Byte) this.entityData.get(ThrownTrident.ID_LOYALTY);
@@ -14745,7 +14744,7 @@ index 4c47b30867e30d84908abf93dbefc252bc8c3453..e63b408594b5d2673148e39c1deafc85
protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(WitherSkull.DATA_DANGEROUS, false);
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-index ab132041982df2a701e4baea8195873f31b4a5fb..722c1660cf6b93d0f9c05cafe587b1834c5c3a22 100644
+index cee1e4db2312efb4843c4b6dc18f4af10b91d304..68525419f18c18931d771d66fb15c9301d611416 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
@@ -345,7 +345,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -14802,7 +14801,7 @@ index 439d61d8689fabe940006b9b317a6810175dccfb..6b30941a84054efb5fcccb5d9e6c80d7
if (!raid.isStarted() && !this.raidMap.containsKey(raid.getId())) {
this.raidMap.put(raid.getId(), raid);
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
-index 1fdbef16cd29c8fc74578ac3328f985eca61088d..56c265940208bc94f531a5af94f564b59f35ebf3 100644
+index b87fd952020d88a6612429df73121422bf9ae422..1a4fb057025689a22b3dd05f531f0d8639d7e47b 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
@@ -499,6 +499,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
@@ -15228,10 +15227,10 @@ index 286ae002e1711ad9e800b7f2091988d66cd572a7..5959e1df9374bcb889be1726abb83b8c
public boolean setItemName(String newItemName) {
diff --git a/src/main/java/net/minecraft/world/inventory/ArmorSlot.java b/src/main/java/net/minecraft/world/inventory/ArmorSlot.java
-index 6c0b6abb1698fac9bb902f695b725d4ab783ee90..091e3c3514fcb378b68098114106d09f04d8fb0d 100644
+index db7caaa2e77b9b98adac8add3040131c673c036b..262d9b2507d37edf0ed9c0821059e518d1baa9e9 100644
--- a/src/main/java/net/minecraft/world/inventory/ArmorSlot.java
+++ b/src/main/java/net/minecraft/world/inventory/ArmorSlot.java
-@@ -45,7 +45,7 @@ class ArmorSlot extends Slot {
+@@ -44,7 +44,7 @@ class ArmorSlot extends Slot {
@Override
public boolean mayPickup(Player playerEntity) {
ItemStack itemStack = this.getItem();
@@ -15276,10 +15275,10 @@ index 48a6b6136ac3414ca735f93a14b1a8d76210603c..27321b07cd04814bc1ff720c65770d77
return new ChestMenu(MenuType.GENERIC_9x6, syncId, playerInventory, inventory, 6);
}
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
-index 50a735dd97daab4fb9579f922a4c63de60204f29..5b8ad051347f73553acb65c5ddc690d2b7eaa754 100644
+index bb9b17a058273ee1519b2abbefba97cad7feb51b..29996864b35711b29629e9071d28493ac27fbde6 100644
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
-@@ -42,6 +42,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent;
+@@ -41,6 +41,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent;
import org.bukkit.entity.Player;
// CraftBukkit end
@@ -15291,8 +15290,8 @@ index 50a735dd97daab4fb9579f922a4c63de60204f29..5b8ad051347f73553acb65c5ddc690d2
+
public class EnchantmentMenu extends AbstractContainerMenu {
- static final ResourceLocation EMPTY_SLOT_LAPIS_LAZULI = ResourceLocation.withDefaultNamespace("item/empty_slot_lapis_lazuli");
-@@ -76,6 +82,22 @@ public class EnchantmentMenu extends AbstractContainerMenu {
+ static final ResourceLocation EMPTY_SLOT_LAPIS_LAZULI = ResourceLocation.withDefaultNamespace("container/slot/lapis_lazuli");
+@@ -75,6 +81,22 @@ public class EnchantmentMenu extends AbstractContainerMenu {
return context.getLocation();
}
// CraftBukkit end
@@ -15315,8 +15314,8 @@ index 50a735dd97daab4fb9579f922a4c63de60204f29..5b8ad051347f73553acb65c5ddc690d2
};
this.random = RandomSource.create();
this.enchantmentSeed = DataSlot.standalone();
-@@ -100,6 +122,16 @@ public class EnchantmentMenu extends AbstractContainerMenu {
- return Pair.of(InventoryMenu.BLOCK_ATLAS, EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI);
+@@ -99,6 +121,16 @@ public class EnchantmentMenu extends AbstractContainerMenu {
+ return EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI;
}
});
+ // Purpur start
@@ -15332,7 +15331,7 @@ index 50a735dd97daab4fb9579f922a4c63de60204f29..5b8ad051347f73553acb65c5ddc690d2
this.addStandardInventorySlots(playerInventory, 8, 84);
this.addDataSlot(DataSlot.shared(this.costs, 0));
this.addDataSlot(DataSlot.shared(this.costs, 1));
-@@ -329,6 +361,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
+@@ -328,6 +360,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
public void removed(net.minecraft.world.entity.player.Player player) {
super.removed(player);
this.access.execute((world, blockposition) -> {
@@ -15615,7 +15614,7 @@ index abff08f2d61014944235ffe2f5494a718a28cc10..dc2c415ab227e1357533079ada4903e9
return optional3;
} else {
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
-index c816c935ecc74a811ffdffbe6ded73c06e92324a..d58619d1d63a03598b8740dd789d4b6f2c93f8d0 100644
+index 4377fa2400c4320e0023ece230090a2a3b4b2ab6..3d7a09c81b10f7a34d55670b7f2cc50b80550380 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java
@@ -151,7 +151,16 @@ public class BlockItem extends Item {
@@ -15636,15 +15635,15 @@ index c816c935ecc74a811ffdffbe6ded73c06e92324a..d58619d1d63a03598b8740dd789d4b6f
}
@Nullable
-@@ -213,6 +222,7 @@ public class BlockItem extends Item {
+@@ -223,6 +232,7 @@ public class BlockItem extends Item {
+ }
- if (tileentity != null) {
- if (!world.isClientSide && tileentity.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission
-+ if (!(!world.isClientSide && world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners")))
+ if (tileentitytypes1.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission
++ if (!(world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners")))
return false;
}
-@@ -248,6 +258,7 @@ public class BlockItem extends Item {
+@@ -273,6 +283,7 @@ public class BlockItem extends Item {
ItemContainerContents itemcontainercontents = (ItemContainerContents) entity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY);
if (itemcontainercontents != null) {
@@ -15703,7 +15702,7 @@ index bb593209c95c9cf1f9c5d52d52fab4a33ddbabcf..58fa528e4b2589d362eb976afd6221cd
} else {
user.startUsingItem(hand);
diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java
-index 3bddfb6f7412ab86e0c090d0cbc6cf254b3f891c..6aa8ee091d3a7d2826d08ab9a03f970ef71a81ea 100644
+index 3bddfb6f7412ab86e0c090d0cbc6cf254b3f891c..38f287d97544b8a5b080837e38710dc4e94ae9bf 100644
--- a/src/main/java/net/minecraft/world/item/BucketItem.java
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java
@@ -196,7 +196,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -15720,15 +15719,15 @@ index 3bddfb6f7412ab86e0c090d0cbc6cf254b3f891c..6aa8ee091d3a7d2826d08ab9a03f970e
for (int l = 0; l < 8; ++l) {
- world.addParticle(ParticleTypes.LARGE_SMOKE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D);
-+ ((ServerLevel) world).sendParticles(null, ParticleTypes.LARGE_SMOKE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 1, 0.0D, 0.0D, 0.0D, 0.0D, true); // Purpur
++ ((ServerLevel) world).sendParticlesSource(null, ParticleTypes.LARGE_SMOKE, false, true, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 1, 0.0D, 0.0D, 0.0D, 0.0D); // Purpur
}
return true;
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
-index 52c40eafc77e50a6fd21b9a7a250cea501f11690..86204c2ab5bbd5d45ddb1d626f844d91ccae6b4f 100644
+index be1902a307a54434644b242b429ad47c271d2a0c..cac4de9877b91bd805a5a8f4b84d27449fc5001f 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
-@@ -69,7 +69,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
+@@ -70,7 +70,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
ItemStack itemStack = user.getItemInHand(hand);
ChargedProjectiles chargedProjectiles = itemStack.get(DataComponents.CHARGED_PROJECTILES);
if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) {
@@ -15738,12 +15737,12 @@ index 52c40eafc77e50a6fd21b9a7a250cea501f11690..86204c2ab5bbd5d45ddb1d626f844d91
} else if (!user.getProjectile(itemStack).isEmpty()) {
this.startSoundPlayed = false;
diff --git a/src/main/java/net/minecraft/world/item/DyeColor.java b/src/main/java/net/minecraft/world/item/DyeColor.java
-index 79dc7cf5bfe92b4df21d164f39726dfe618331e4..6721432f9cdd11c9658c34f0ac407be217f9d276 100644
+index 648e6979aa72b9d1e1ea3b40d5a876e3c690b934..d9cd4f47e9990bdd85e30f68ca3b755a953332a1 100644
--- a/src/main/java/net/minecraft/world/item/DyeColor.java
+++ b/src/main/java/net/minecraft/world/item/DyeColor.java
-@@ -103,4 +103,10 @@ public enum DyeColor implements StringRepresentable {
- public String getSerializedName() {
- return this.name;
+@@ -123,4 +123,10 @@ public enum DyeColor implements StringRepresentable {
+ private static CraftingInput makeCraftColorInput(DyeColor first, DyeColor second) {
+ return CraftingInput.of(2, 1, List.of(new ItemStack(DyeItem.byColor(first)), new ItemStack(DyeItem.byColor(second))));
}
+
+ // Purpur start
@@ -15753,15 +15752,15 @@ index 79dc7cf5bfe92b4df21d164f39726dfe618331e4..6721432f9cdd11c9658c34f0ac407be2
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/item/EggItem.java b/src/main/java/net/minecraft/world/item/EggItem.java
-index 3ddd34e5d05fa1355a2affd329d72dea216cd0e4..770bdb3fb2426083ff6785f1c38ffe9d11f898e5 100644
+index 6d559fef484036194e4d899b82aaa7b5d518311e..9fb04b4e5b61ea497238e042fefa9a06f7489618 100644
--- a/src/main/java/net/minecraft/world/item/EggItem.java
+++ b/src/main/java/net/minecraft/world/item/EggItem.java
-@@ -27,7 +27,7 @@ public class EggItem extends Item implements ProjectileItem {
+@@ -29,7 +29,7 @@ public class EggItem extends Item implements ProjectileItem {
if (world instanceof ServerLevel worldserver) {
// CraftBukkit start
// Paper start - PlayerLaunchProjectileEvent
-- final Projectile.Delayed thrownEgg = Projectile.spawnProjectileFromRotationDelayed(ThrownEgg::new, worldserver, itemstack, user, 0.0F, 1.5F, 1.0F);
-+ final Projectile.Delayed thrownEgg = Projectile.spawnProjectileFromRotationDelayed(ThrownEgg::new, worldserver, itemstack, user, 0.0F, 1.5F, (float) worldserver.purpurConfig.eggProjectileOffset); // Purpur
+- final Projectile.Delayed thrownEgg = Projectile.spawnProjectileFromRotationDelayed(ThrownEgg::new, worldserver, itemstack, user, 0.0F, EggItem.PROJECTILE_SHOOT_POWER, 1.0F);
++ final Projectile.Delayed thrownEgg = Projectile.spawnProjectileFromRotationDelayed(ThrownEgg::new, worldserver, itemstack, user, 0.0F, EggItem.PROJECTILE_SHOOT_POWER, (float) worldserver.purpurConfig.eggProjectileOffset); // Purpur
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) thrownEgg.projectile().getBukkitEntity());
if (event.callEvent() && thrownEgg.attemptSpawn()) {
if (event.shouldConsume()) {
@@ -15788,19 +15787,19 @@ index b62db8c7c8c57e43869ee239ebf4b02f112355d9..e75930f26604b772a141a93c6f4b7782
}
}
diff --git a/src/main/java/net/minecraft/world/item/EnderpearlItem.java b/src/main/java/net/minecraft/world/item/EnderpearlItem.java
-index b232390d8ee8e449e61c0ea7f3af60df507abb97..4039d300debadf29e6c544e8b4c950b7121a02d1 100644
+index eaee34054233c8f0296b65a09f1287ba515496f2..392f2600e4fb1ff937c3ec5635156b358eb36888 100644
--- a/src/main/java/net/minecraft/world/item/EnderpearlItem.java
+++ b/src/main/java/net/minecraft/world/item/EnderpearlItem.java
-@@ -24,7 +24,7 @@ public class EnderpearlItem extends Item {
+@@ -26,7 +26,7 @@ public class EnderpearlItem extends Item {
if (world instanceof ServerLevel worldserver) {
// CraftBukkit start
// Paper start - PlayerLaunchProjectileEvent
-- final Projectile.Delayed thrownEnderpearl = Projectile.spawnProjectileFromRotationDelayed(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, 1.5F, 1.0F);
-+ final Projectile.Delayed thrownEnderpearl = Projectile.spawnProjectileFromRotationDelayed(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, 1.5F, (float) worldserver.purpurConfig.enderPearlProjectileOffset); // Purpur
+- final Projectile.Delayed thrownEnderpearl = Projectile.spawnProjectileFromRotationDelayed(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, EnderpearlItem.PROJECTILE_SHOOT_POWER, 1.0F);
++ final Projectile.Delayed thrownEnderpearl = Projectile.spawnProjectileFromRotationDelayed(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, EnderpearlItem.PROJECTILE_SHOOT_POWER, (float) worldserver.purpurConfig.enderPearlProjectileOffset); // Purpur
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) thrownEnderpearl.projectile().getBukkitEntity());
if (event.callEvent() && thrownEnderpearl.attemptSpawn()) {
if (event.shouldConsume()) {
-@@ -35,6 +35,7 @@ public class EnderpearlItem extends Item {
+@@ -37,6 +37,7 @@ public class EnderpearlItem extends Item {
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENDER_PEARL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
user.awardStat(Stats.ITEM_USED.get(this));
@@ -15883,10 +15882,10 @@ index d2871bb4fd670ae4133d13f290b3256c9177d8e6..0936bdc945f73c7750c20a34276aead2
consumer.accept(context);
if (player != null) {
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd1456be8db35 100644
+index f29415b8dff7d17328e159b56ae4ad46452f018e..5964c2e77e9f21c72d9e0655e5f48d2798317779 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -503,6 +503,7 @@ public final class ItemStack implements DataComponentHolder {
+@@ -508,6 +508,7 @@ public final class ItemStack implements DataComponentHolder {
world.isBlockPlaceCancelled = true; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent
for (BlockState blockstate : blocks) {
blockstate.update(true, false);
@@ -15894,7 +15893,7 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd145
}
world.isBlockPlaceCancelled = false; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent
world.preventPoiUpdated = false;
-@@ -535,6 +536,7 @@ public final class ItemStack implements DataComponentHolder {
+@@ -540,6 +541,7 @@ public final class ItemStack implements DataComponentHolder {
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
block.onPlace(world, newblockposition, oldBlock, true, context);
}
@@ -15902,7 +15901,7 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd145
world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
}
-@@ -681,6 +683,26 @@ public final class ItemStack implements DataComponentHolder {
+@@ -686,6 +688,26 @@ public final class ItemStack implements DataComponentHolder {
return this.isDamageableItem() && this.getDamageValue() > 0;
}
@@ -15929,7 +15928,7 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd145
public int getDamageValue() {
return Mth.clamp((Integer) this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
-@@ -761,6 +783,12 @@ public final class ItemStack implements DataComponentHolder {
+@@ -766,6 +788,12 @@ public final class ItemStack implements DataComponentHolder {
org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent
}
// CraftBukkit end
@@ -15942,7 +15941,7 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd145
this.shrink(1);
breakCallback.accept(item);
-@@ -1325,6 +1353,12 @@ public final class ItemStack implements DataComponentHolder {
+@@ -1343,6 +1371,12 @@ public final class ItemStack implements DataComponentHolder {
return !((ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY)).isEmpty();
}
@@ -15956,10 +15955,10 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..42b259c3878bd34b8e7cb768887fd145
return (ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY);
}
diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java
-index 5a70111cd39af50981cfd440c021340da1de5eab..580bd63fdbf9555f867362d3c1f39f41fd750089 100644
+index 6d16b4433e79eca0ff8008941f0b9b807b1db9db..317e69eb4e3a4c312d5e856a0bff31a9e3eb5326 100644
--- a/src/main/java/net/minecraft/world/item/Items.java
+++ b/src/main/java/net/minecraft/world/item/Items.java
-@@ -363,7 +363,7 @@ public class Items {
+@@ -367,7 +367,7 @@ public class Items {
public static final Item PURPUR_BLOCK = registerBlock(Blocks.PURPUR_BLOCK);
public static final Item PURPUR_PILLAR = registerBlock(Blocks.PURPUR_PILLAR);
public static final Item PURPUR_STAIRS = registerBlock(Blocks.PURPUR_STAIRS);
@@ -15968,7 +15967,7 @@ index 5a70111cd39af50981cfd440c021340da1de5eab..580bd63fdbf9555f867362d3c1f39f41
public static final Item CREAKING_HEART = registerBlock(Blocks.CREAKING_HEART);
public static final Item CHEST = registerBlock(Blocks.CHEST, settings -> settings.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY));
public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE);
-@@ -2104,7 +2104,7 @@ public class Items {
+@@ -1987,7 +1987,7 @@ public class Items {
"sweet_berries", createBlockItemWithCustomItemName(Blocks.SWEET_BERRY_BUSH), new Item.Properties().food(Foods.SWEET_BERRIES)
);
public static final Item GLOW_BERRIES = registerItem(
@@ -15978,7 +15977,7 @@ index 5a70111cd39af50981cfd440c021340da1de5eab..580bd63fdbf9555f867362d3c1f39f41
public static final Item CAMPFIRE = registerBlock(Blocks.CAMPFIRE, settings -> settings.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY));
public static final Item SOUL_CAMPFIRE = registerBlock(
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
-index 571f2540a1e9422025efe651167e26b44b437daa..c2f3c8b3d8eeb609b6d6067c4fb404aefbf94ec5 100644
+index 8ff50a4c7461bbd9f469d503f6b5ee482d2463d7..5c0a46c11003b6e154195a8ef299416cc73eae33 100644
--- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
@@ -194,6 +194,7 @@ public class MapItem extends Item {
@@ -16014,7 +16013,7 @@ index 7153d9ed12276a0f2d8b8a17c79734aa25ed1fa5..dc49ea6454e04ae8ec68af12c4bf2ff0
}
}
diff --git a/src/main/java/net/minecraft/world/item/NameTagItem.java b/src/main/java/net/minecraft/world/item/NameTagItem.java
-index 000d1863bfba98b5132dfc6743362d687b2f54f3..20fece9908382f40b4082f7b1fb7d41914ae31be 100644
+index df9cdcb9544a171a5a07c65ba0150933fb70d5fc..793bd6392ca3c3792306a20538233e4d7fb69b86 100644
--- a/src/main/java/net/minecraft/world/item/NameTagItem.java
+++ b/src/main/java/net/minecraft/world/item/NameTagItem.java
@@ -23,6 +23,7 @@ public class NameTagItem extends Item {
@@ -16059,27 +16058,26 @@ index 55c18f182166f4905d623d6f5e909eefd5ed2483..d10c4705cc9e7faabd4a5619e1da1072
afterAction = () -> { // Paper
if (!level.isClientSide()) {
diff --git a/src/main/java/net/minecraft/world/item/SnowballItem.java b/src/main/java/net/minecraft/world/item/SnowballItem.java
-index 57872ebef6beb8cdc03c9f8f19de94652ee19062..60a064c26de0566aaf9f8be886402e291c03ca3b 100644
+index d3bba4665ae14cc279c0f937831f909f8831b12b..27499f01ef0bc89c4c3f60eb696ca07cc5984809 100644
--- a/src/main/java/net/minecraft/world/item/SnowballItem.java
+++ b/src/main/java/net/minecraft/world/item/SnowballItem.java
-@@ -27,7 +27,7 @@ public class SnowballItem extends Item implements ProjectileItem {
+@@ -29,7 +29,7 @@ public class SnowballItem extends Item implements ProjectileItem {
// world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
if (world instanceof ServerLevel worldserver) {
// Paper start - PlayerLaunchProjectileEvent
-- final Projectile.Delayed snowball = Projectile.spawnProjectileFromRotationDelayed(Snowball::new, worldserver, itemstack, user, 0.0F, 1.5F, 1.0F);
-+ final Projectile.Delayed snowball = Projectile.spawnProjectileFromRotationDelayed(Snowball::new, worldserver, itemstack, user, 0.0F, 1.5F, (float) worldserver.purpurConfig.snowballProjectileOffset); // Purpur
+- final Projectile.Delayed snowball = Projectile.spawnProjectileFromRotationDelayed(Snowball::new, worldserver, itemstack, user, 0.0F, SnowballItem.PROJECTILE_SHOOT_POWER, 1.0F);
++ final Projectile.Delayed snowball = Projectile.spawnProjectileFromRotationDelayed(Snowball::new, worldserver, itemstack, user, 0.0F, SnowballItem.PROJECTILE_SHOOT_POWER, (float) worldserver.purpurConfig.snowballProjectileOffset); // Purpur
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) snowball.projectile().getBukkitEntity());
if (event.callEvent() && snowball.attemptSpawn()) {
user.awardStat(Stats.ITEM_USED.get(this));
diff --git a/src/main/java/net/minecraft/world/item/SpawnEggItem.java b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
-index 9956ed42df55daa6d97fd6e3ab5368dad91cfaf0..e0e746d6c78421b40777125ba49f0a04809f5415 100644
+index cc7e9b87e919b4ef8cf77cd780c890fd9a9cfa50..a185d098175e504b7bb93d2cff03ca99eabc11eb 100644
--- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java
+++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
-@@ -73,6 +73,24 @@ public class SpawnEggItem extends Item {
+@@ -68,6 +68,23 @@ public class SpawnEggItem extends Item {
Spawner spawner = (Spawner) tileentity;
- entitytypes = this.getType(itemstack);
-+
+ entitytypes = this.getType(world.registryAccess(), itemstack);
+ // Purpur start
+ if (spawner instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity) {
+ org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -16101,23 +16099,23 @@ index 9956ed42df55daa6d97fd6e3ab5368dad91cfaf0..e0e746d6c78421b40777125ba49f0a04
world.sendBlockUpdated(blockposition, iblockdata, iblockdata, 3);
world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.BLOCK_CHANGE, blockposition);
diff --git a/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java b/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
-index fa9d2ae44fcdd06f8f33cd14ffca422b20a01451..ffbc71ca2a27800d7758e3db339bf06a39ef1f11 100644
+index e422881d1ab0f1a5bb2cb741d23089a2e35de2d4..bbd65d35d91d4f3ffabeb355b82f22ddde0f868b 100644
--- a/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
+++ b/src/main/java/net/minecraft/world/item/ThrowablePotionItem.java
-@@ -21,7 +21,7 @@ public class ThrowablePotionItem extends PotionItem implements ProjectileItem {
+@@ -23,7 +23,7 @@ public class ThrowablePotionItem extends PotionItem implements ProjectileItem {
ItemStack itemStack = user.getItemInHand(hand);
if (world instanceof ServerLevel serverLevel) {
// Paper start - PlayerLaunchProjectileEvent
-- final Projectile.Delayed thrownPotion = Projectile.spawnProjectileFromRotationDelayed(ThrownPotion::new, serverLevel, itemStack, user, -20.0F, 0.5F, 1.0F);
-+ final Projectile.Delayed thrownPotion = Projectile.spawnProjectileFromRotationDelayed(ThrownPotion::new, serverLevel, itemStack, user, -20.0F, 0.5F, (float) serverLevel.purpurConfig.throwablePotionProjectileOffset); // Purpur
+- final Projectile.Delayed thrownPotion = Projectile.spawnProjectileFromRotationDelayed(ThrownPotion::new, serverLevel, itemStack, user, -20.0F, PROJECTILE_SHOOT_POWER, 1.0F);
++ final Projectile.Delayed thrownPotion = Projectile.spawnProjectileFromRotationDelayed(ThrownPotion::new, serverLevel, itemStack, user, -20.0F, PROJECTILE_SHOOT_POWER, (float) serverLevel.purpurConfig.throwablePotionProjectileOffset); // Purpur
// Paper start - PlayerLaunchProjectileEvent
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Projectile) thrownPotion.projectile().getBukkitEntity());
if (event.callEvent() && thrownPotion.attemptSpawn()) {
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
-index 8b9a93ef71164cce8a616735b71d96d37e83b1a8..23e04d0d68ffa0e07ab295e7121f8a4963f4914a 100644
+index 2b2af4b7cc2c8be8c3aed30885be26816c021bdc..be32255c9bd90f7de3f8f5a62d84c7dcf59fa722 100644
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
-@@ -88,7 +88,7 @@ public class TridentItem extends Item implements ProjectileItem {
+@@ -89,7 +89,7 @@ public class TridentItem extends Item implements ProjectileItem {
// itemstack.hurtWithoutBreaking(1, entityhuman); // CraftBukkit - moved down
if (f == 0.0F) {
// Paper start - PlayerLaunchProjectileEvent
@@ -16126,7 +16124,7 @@ index 8b9a93ef71164cce8a616735b71d96d37e83b1a8..23e04d0d68ffa0e07ab295e7121f8a49
// Paper start - PlayerLaunchProjectileEvent
com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), (org.bukkit.entity.Projectile) tridentDelayed.projectile().getBukkitEntity());
if (!event.callEvent() || !tridentDelayed.attemptSpawn()) {
-@@ -100,6 +100,9 @@ public class TridentItem extends Item implements ProjectileItem {
+@@ -101,6 +101,9 @@ public class TridentItem extends Item implements ProjectileItem {
return false;
}
ThrownTrident entitythrowntrident = tridentDelayed.projectile(); // Paper - PlayerLaunchProjectileEvent
@@ -16173,20 +16171,20 @@ index 0651c2af040e3f248860cfb3c5effce91589380e..d884df481b4bbb978113a4ac7a1feac3
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
-index 812f919a7a7e309c8513f44104f092496037608f..10730b307971915f52b3e41068a864b8ee1352b4 100644
+index 0b0054b3d5d56ba24e1aee0e3ab56ea5b01a82a8..2e3a834643d56543418e9b9beb9d3448bf059d22 100644
--- a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
+++ b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
-@@ -45,6 +45,7 @@ public final class Ingredient implements Predicate {
+@@ -45,6 +45,7 @@ public final class Ingredient implements StackedContents.IngredientInfo itemStacks;
+ private java.util.Set itemStacks; // Paper - Improve exact choice recipe ingredients
+ public Predicate predicate; // Purpur
public boolean isExact() {
return this.itemStacks != null;
-@@ -100,6 +101,11 @@ public final class Ingredient implements Predicate {
-
- return false;
+@@ -100,6 +101,11 @@ public final class Ingredient implements StackedContents.IngredientInfo> list = this.items();
-
+ return itemstack.is(this.values);
+ }
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
-index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..d7ce86752e4138cdd3844b3374609753aa20f9ea 100644
+index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..4b3769020a92124bd5677cf75e268b8bc5ba2031 100644
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
@@ -31,8 +31,13 @@ public class ShapelessRecipe implements CraftingRecipe {
@@ -16214,7 +16212,7 @@ index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..d7ce86752e4138cdd3844b3374609753
this.group = group;
this.category = category;
this.result = result;
-@@ -80,6 +85,28 @@ public class ShapelessRecipe implements CraftingRecipe {
+@@ -80,6 +85,27 @@ public class ShapelessRecipe implements CraftingRecipe {
}
public boolean matches(CraftingInput input, Level world) {
@@ -16239,12 +16237,11 @@ index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..d7ce86752e4138cdd3844b3374609753
+ return ingredients.isEmpty();
+ }
+ // Pufferfish end
-+
// Paper start - Improve exact choice recipe ingredients & unwrap ternary
if (input.ingredientCount() != this.ingredients.size()) {
return false;
diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
-index f99b87cf70df7eaac13d46f4e0234b1e6483d342..73241113e50dc8be89ef8850d49d95ec31fb194f 100644
+index 4dd074d04c9a535f6cf24420058fd68594c59edc..2c1799e8c9009a6ab24c24e7363d5a87e41f0c35 100644
--- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
+++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
@@ -16396,10 +16393,10 @@ index 5d7a6e4b73f032db356e7ec369b150013e940ee6..6b2cda6d578a0983b2401ea206292754
if (range < 0.0 || d < range * range) {
return true;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 0de2b79481352b52438dde284262019b29949ad8..34e8eb828be517d9ee3973597c74c5cac3d75c99 100644
+index 27f9d167b5ae9ce5117798ea44324107df59425f..1a808fc381c0c3ea1fc49bbffebddf2c550e817a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -174,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -175,6 +175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - add paper world config
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
@@ -16407,7 +16404,7 @@ index 0de2b79481352b52438dde284262019b29949ad8..34e8eb828be517d9ee3973597c74c5ca
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
-@@ -181,6 +182,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -182,6 +183,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Faster redstone torch rapid clock removal; Move from Map in BlockRedstoneTorch to here
@@ -16457,7 +16454,7 @@ index 0de2b79481352b52438dde284262019b29949ad8..34e8eb828be517d9ee3973597c74c5ca
public CraftWorld getWorld() {
return this.world;
}
-@@ -842,6 +886,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -843,6 +887,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -16466,7 +16463,7 @@ index 0de2b79481352b52438dde284262019b29949ad8..34e8eb828be517d9ee3973597c74c5ca
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
-@@ -1487,16 +1533,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1488,16 +1534,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
public void guardEntityTick(Consumer tickConsumer, T entity) {
try {
tickConsumer.accept(entity);
@@ -16486,7 +16483,7 @@ index 0de2b79481352b52438dde284262019b29949ad8..34e8eb828be517d9ee3973597c74c5ca
}
// Paper start - Option to prevent armor stands from doing entity lookups
@Override
-@@ -2042,4 +2088,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -2045,4 +2091,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
return this.id;
}
}
@@ -16515,7 +16512,7 @@ index c1b76a1ebc1eea7ab70cf61d8175a31794dd122a..dc15c15951e4ca30b8341d24f813259a
if (entityhuman != null) {
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
-index bbbd451ff184be8fa13bd93d53c89a9502f9951a..3c3d219c9339f64c23ec0b31783bf68a4423636c 100644
+index 685ccfb73bf7125585ef90b6a0f51b2f81daa428..e2763ee67530074d8ec78fbff694eb84f5373de0 100644
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
@@ -311,7 +311,7 @@ public class ServerExplosion implements Explosion {
@@ -16652,7 +16649,7 @@ index d7ca7a43d2d5f8cad416156fd40588cdd6634f52..231338adda19f57bf1a95379cc2e1434
return true;
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-index c02c4834ace843633b77fb43eeadd3ddc7b1f743..c130d316e87f1f896d33ab43831063a89e3bef2b 100644
+index be700995c3e7f63e0471712c3cd6fd83db583491..54836f2a1e4cc9046ba29fb71ea237b358c9cb7d 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
@@ -106,7 +106,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
@@ -16696,7 +16693,7 @@ index 9e3f1441d62128535112621bf259c24f1a90595b..2535e6d71b690f8dfde41a7d9cb76b6f
if (i != -1) {
world.scheduleTick(blockposition, (Block) this, i);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index b6d6c2cb9b227a17fb4ce42bc75f92206fbea043..1748aea6613e0c8081f70092c9431e7e04907383 100644
+index c0b1f903962b25d8ff6c2b4fcd2be0e45de09b35..91e68335d7007e3c1fe13eec0060db01c5f659ac 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -88,6 +88,10 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -16791,10 +16788,10 @@ index b6d6c2cb9b227a17fb4ce42bc75f92206fbea043..1748aea6613e0c8081f70092c9431e7e
public void updateEntityMovementAfterFallOn(BlockGetter world, Entity entity) {
diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
-index 66a07f7cbf1c1d6ecbe055cbf4f63eb07d93e90c..63d67d46d30ed8ed57cdc0e59b6cb6b75ab22c1f 100644
+index 9bafac9b2c7b487f745fb64354f4bbc6a7ded468..1c34691da51d7f7ba3d54e095a3b58b74a5f2263 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
-@@ -6465,6 +6465,7 @@ public class Blocks {
+@@ -6454,6 +6454,7 @@ public class Blocks {
BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT)
.forceSolidOff()
@@ -16802,7 +16799,7 @@ index 66a07f7cbf1c1d6ecbe055cbf4f63eb07d93e90c..63d67d46d30ed8ed57cdc0e59b6cb6b7
.instabreak()
.sound(SoundType.AZALEA)
.noOcclusion()
-@@ -6476,6 +6477,7 @@ public class Blocks {
+@@ -6465,6 +6466,7 @@ public class Blocks {
BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT)
.forceSolidOff()
@@ -16926,7 +16923,7 @@ index 648c2510beb162e73aed236a3169d0bbb8fc5050..3563a241c0b697dc0167cf7b1aa73fef
}
diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
-index 18d4020017d76303d3179fad8974574777ea6305..2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb 100644
+index 1b94f26e78db062f80d806b82f714a815b4710ff..299d782c4e84d8548f2faddfb03712bab388de09 100644
--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
@@ -140,7 +140,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
@@ -16991,7 +16988,7 @@ index c9968934f4ecaa8d81e545f279b3001c7b1ce545..03e4fce6f8226451365fc2831b5bf1e5
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
-index c4473c2a778116d48bc3e4796afd901f455070e6..e62217c0bfa6cc426c7d41154f3ccc34d8f242ca 100644
+index 81e572783157926383dd9baa58d30f5419c1616f..84d6ae4acf80f6ff4f418739a0228e740993f950 100644
--- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
@@ -94,4 +94,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines {
@@ -17020,10 +17017,10 @@ index daae7fd6e0148cfba8e359d990748a0c83a3376e..0e06b1bcd906e92c083dc74d56d6d0a2
return random.nextFloat() < f1 ? this.getNext(state) : Optional.empty();
}
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-index edef8fc62f8dba1b57214d8d7d805ff0d83f4114..663eb96b8227f000448957b5d8ea13ca78cee329 100644
+index ca69a9fbd4942f9079aeaab7cead2d7a2c3b8659..54f351f1cbb50a5b1aa3167e3a0b10bb0456c1cf 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-@@ -341,6 +341,7 @@ public class ChestBlock extends AbstractChestBlock implements
+@@ -336,6 +336,7 @@ public class ChestBlock extends AbstractChestBlock implements
}
public static boolean isBlockedChestByBlock(BlockGetter world, BlockPos pos) {
@@ -17032,10 +17029,10 @@ index edef8fc62f8dba1b57214d8d7d805ff0d83f4114..663eb96b8227f000448957b5d8ea13ca
return world.getBlockState(blockposition1).isRedstoneConductor(world, blockposition1);
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-index db837b250fc35af5b528bf973b3b07f63e79bc46..ed3a310d56a0cca8c4c11c3768ac2056cd11edea 100644
+index 9264ba58188a7a682eeb8eb449b89ff8e60f91d6..809a820dd8eec3e48dd3263335c62fbea4cd4f2c 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-@@ -241,18 +241,27 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -243,18 +243,27 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
int i = (Integer) state.getValue(ComposterBlock.LEVEL);
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) {
@@ -17074,7 +17071,7 @@ index db837b250fc35af5b528bf973b3b07f63e79bc46..ed3a310d56a0cca8c4c11c3768ac2056
return InteractionResult.SUCCESS;
} else {
-@@ -260,6 +269,25 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -262,6 +271,25 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
}
}
@@ -17113,7 +17110,7 @@ index a59b23f4062fa896836dec72cbd5097411774ad1..c526ea13a726624adaa654f09ff84c89
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
-index 1ada5ed825501666addacf527a513ab7bd4a3a58..33c27909290ff3ab483226cf65b1a1bc2e983cbc 100644
+index 1967ff3fcb94988be85985c4754904f0077de066..7f6f7a114e9930e7655c9695a5737739503999de 100644
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
@@ -180,7 +180,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
@@ -17187,10 +17184,10 @@ index 30d15686b1a81de7ac28feb0c6188eb007c6f2fd..b6799db00e157892dd4339a01d2ca360
BlockPos blockposition1 = pos.offset(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16));
diff --git a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
-index a7fb500d950687743d1fc0b3ad3e6d10dcc6e31a..ce6a9e15ae0114623e79b5d8c244c2c490a3f74e 100644
+index 4c4e6290035710480cd5c1d7399f2443df01a5a6..248039ac7eab85b29ae3c525a986d91aa8d177fe 100644
--- a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
-@@ -123,4 +123,18 @@ public class EnchantingTableBlock extends BaseEntityBlock {
+@@ -118,4 +118,18 @@ public class EnchantingTableBlock extends BaseEntityBlock {
protected boolean isPathfindable(BlockState state, PathComputationType type) {
return false;
}
@@ -17210,7 +17207,7 @@ index a7fb500d950687743d1fc0b3ad3e6d10dcc6e31a..ce6a9e15ae0114623e79b5d8c244c2c4
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
-index a7a21f071161fb7e73a046717d2462f871ab653c..abb75f9389167a1f51a2c50831664d50181749de 100644
+index af46f2885ead1e3ec1734504d8ba134c886e04fb..47ee0538c8ea94136b2416c324c8a264e54d2c09 100644
--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
@@ -104,6 +104,13 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
@@ -17228,7 +17225,7 @@ index a7a21f071161fb7e73a046717d2462f871ab653c..abb75f9389167a1f51a2c50831664d50
TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, tileentityendgateway);
}
diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
-index 4aa14f975e1ceedf3d4a427e0daefb58b12fcafe..2dffc3990d9ae3d595d923239885e3a7d8ec04f3 100644
+index 8cb4142562db0be1f1a7d961ec5a10d4abf31692..84ecb012cb0a47e47799dc73c7fadc75f462f47a 100644
--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
@@ -70,6 +70,13 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
@@ -17246,10 +17243,10 @@ index 4aa14f975e1ceedf3d4a427e0daefb58b12fcafe..2dffc3990d9ae3d595d923239885e3a7
EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()), org.bukkit.PortalType.ENDER); // Paper - add portal type
world.getCraftServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
-index 2a207fb2e1c26b562de42240e11c856bd2a23458..6ad4aa371607ab92616626285a7e71757c76a3db 100644
+index 9b6ab617ab7f503cf0b2d4e29333c706ffe95f46..bfe79431dc5707677671df5c0787817c6e14a676 100644
--- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
-@@ -89,7 +89,7 @@ public class EnderChestBlock extends AbstractChestBlock i
+@@ -84,7 +84,7 @@ public class EnderChestBlock extends AbstractChestBlock i
// Paper start - Fix InventoryOpenEvent cancellation - moved up;
playerEnderChestContainer.setActiveChest(enderChestBlockEntity); // Needs to happen before ChestMenu.threeRows as it is required for opening animations
if (world instanceof ServerLevel serverLevel && player.openMenu(
@@ -17258,7 +17255,7 @@ index 2a207fb2e1c26b562de42240e11c856bd2a23458..6ad4aa371607ab92616626285a7e7175
).isPresent()) {
// Paper end - Fix InventoryOpenEvent cancellation - moved up;
// Paper - Fix InventoryOpenEvent cancellation - moved up;
-@@ -104,6 +104,35 @@ public class EnderChestBlock extends AbstractChestBlock i
+@@ -99,6 +99,35 @@ public class EnderChestBlock extends AbstractChestBlock i
}
}
@@ -17499,7 +17496,7 @@ index 7ffdcf18bf4bd8b5325c76945b2d80ca3fe52958..dfa931316fde0b2e80068a0edd1427ff
}
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
-index 2b31bf586c1c0bd393d2aa8d0b6635dd9f22f21c..02bcba52e28f757b59e2f384d5744834962870f0 100644
+index 3e9642e5236d9a1cc8e8f3b375d76810f4bc7c6c..6c10860aee8b8fac4089fb7f1506c890fb3f5308 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
@@ -78,7 +78,7 @@ public class NetherPortalBlock extends Block implements Portal {
@@ -17535,7 +17532,7 @@ index 2b31bf586c1c0bd393d2aa8d0b6635dd9f22f21c..02bcba52e28f757b59e2f384d5744834
return 0;
}
diff --git a/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java b/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java
-index acbd60a2f162fe0e254e36d0e8e7face3fc8a7b3..b8355ea1de26c4b6905f477fb4e110f1762447b4 100644
+index 7bb4994d6474c8ea59c102009253552020691b8f..264692baa4a20b66910d8ff379fa72acb99e27f8 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherWartBlock.java
@@ -16,7 +16,7 @@ import net.minecraft.world.level.block.state.properties.IntegerProperty;
@@ -17674,10 +17671,10 @@ index 9117c035d5a6ff114b028fad3380ceb1fc2b9691..2c5e394156dbf76107adb4913a094dfd
public static boolean canSetSpawn(Level world) {
diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
-index 0e05bfef55dcacb50766bba8328ffeb8a5394c31..e00fcea07e74de647c26ff9eb32bc682738c15b7 100644
+index 7990a6c225c27845ccada0df91cf5ed7e4315a88..db2b21d5842fafa48dbde25a461505d03aa9b955 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
-@@ -135,7 +135,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
+@@ -130,7 +130,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
@Nullable
@Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@@ -17734,7 +17731,7 @@ index 9908a0b5b1fec5f9de518a733f7abbbff7e1a9f9..0ad444cf7f798f63e9140a42c5d5d8ca
}
diff --git a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
-index 4f190a40b8474aa06a92c8afcc06d0044120ff7b..80ee7a6f010cc838625674007a3ea908f2f9dadd 100644
+index d751b280a8bf2066d458f8eb548d7aa123fa69c9..fb88b5c1d9e764bf1211d601527133ea8e8268b3 100644
--- a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
@@ -42,6 +42,57 @@ public class SpawnerBlock extends BaseEntityBlock {
@@ -17804,7 +17801,7 @@ index 4f190a40b8474aa06a92c8afcc06d0044120ff7b..80ee7a6f010cc838625674007a3ea908
int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
-index 59cf905b1b5686f6f4f2bad94730ffa69d3a2834..4c5bc71fef307d13b640e534ace0b4411f6e97e2 100644
+index e9a77c1ae09af42d2d444ad6b5f6c8ac395044e1..4540d3a31ed89ea3684feeffb85a391655e9cbbc 100644
--- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java
@@ -61,7 +61,7 @@ public class SpongeBlock extends Block {
@@ -17822,7 +17819,7 @@ index 59cf905b1b5686f6f4f2bad94730ffa69d3a2834..4c5bc71fef307d13b640e534ace0b441
- if (!fluid.is(FluidTags.WATER)) {
+ if (!fluid.is(FluidTags.WATER) && (!world.purpurConfig.spongeAbsorbsLava || !fluid.is(FluidTags.LAVA)) && (!world.purpurConfig.spongeAbsorbsWaterFromMud || !iblockdata.is(Blocks.MUD))) { // Purpur
- return false;
+ return BlockPos.TraversalNodeStatus.SKIP;
} else {
Block block = iblockdata.getBlock();
@@ -95,6 +95,10 @@ public class SpongeBlock extends Block {
@@ -17835,12 +17832,12 @@ index 59cf905b1b5686f6f4f2bad94730ffa69d3a2834..4c5bc71fef307d13b640e534ace0b441
+ // Purpur end
} else {
if (!iblockdata.is(Blocks.KELP) && !iblockdata.is(Blocks.KELP_PLANT) && !iblockdata.is(Blocks.SEAGRASS) && !iblockdata.is(Blocks.TALL_SEAGRASS)) {
- return false;
+ return BlockPos.TraversalNodeStatus.SKIP;
diff --git a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
-index e61644241f24b42bb4f702d3eef5b590b4d107c8..0bf6503819b02e5ba2c346d9d563a93f2946d89b 100644
+index f1366aea49206afcd64bf058ee673d6a562315c5..ff655401c7aecba5acd8d241e844d77364f09f35 100644
--- a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
-@@ -98,4 +98,14 @@ public class StonecutterBlock extends Block {
+@@ -93,4 +93,14 @@ public class StonecutterBlock extends Block {
protected boolean isPathfindable(BlockState state, PathComputationType type) {
return false;
}
@@ -17994,10 +17991,10 @@ index 0fbe66cc02bd3d95c0a5dcd55380a1b4a2f17ca6..3a7126883f11ac5a647947eaf060df15
if (!world.addFreshEntity(entitywither, SpawnReason.BUILD_WITHER)) {
return;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
-index 15e0861486a2bda3e2f4049b1b5a299c870acd31..91a158ed90b7ce3eac7277fd962682a0226c08ed 100644
+index a9809c18233d82f910735e59363a49de488defcd..affa084b6bd4a6792d1c55719f88f3fb16627761 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
-@@ -219,6 +219,21 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
+@@ -218,6 +218,21 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
}
ItemStack itemstack = (ItemStack) blockEntity.items.get(1);
@@ -18019,7 +18016,7 @@ index 15e0861486a2bda3e2f4049b1b5a299c870acd31..91a158ed90b7ce3eac7277fd962682a0
ItemStack itemstack1 = (ItemStack) blockEntity.items.get(0);
boolean flag2 = !itemstack1.isEmpty();
boolean flag3 = !itemstack.isEmpty();
-@@ -308,6 +323,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
+@@ -303,6 +318,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
setChanged(world, pos, state);
}
@@ -18134,7 +18131,7 @@ index 0e0d178f2793ab014358f534c8dc53218b89f083..2d190b3a6378b8cbadfa65510df1ccfb
BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT);
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-index 83ad45aed0894e90825d22e078632352c3a06816..def408384cbd571b7bee23f5cecf430a5d690c4b 100644
+index 65a85b4a4e159cfe55e435ed342a87bcc07b21d5..6fa25cac9d88808a590281bf90f619fa2f167d4a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
@@ -60,7 +60,7 @@ public class BeehiveBlockEntity extends BlockEntity {
@@ -18180,7 +18177,7 @@ index 83ad45aed0894e90825d22e078632352c3a06816..def408384cbd571b7bee23f5cecf430a
// Paper start - Add EntityBlockStorage clearEntities
public void clearBees() {
this.stored.clear();
-@@ -472,9 +494,9 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -467,9 +489,9 @@ public class BeehiveBlockEntity extends BlockEntity {
}
}
@@ -18193,10 +18190,10 @@ index 83ad45aed0894e90825d22e078632352c3a06816..def408384cbd571b7bee23f5cecf430a
private int ticksInHive;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18680a252b 100644
+index 1f664c10138a6e19bdc0051fa80575516d5602e7..5c5cc77ff2e050e80dc9f6f62ede68d177a0015f 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -95,6 +95,12 @@ public abstract class BlockEntity {
+@@ -94,6 +94,12 @@ public abstract class BlockEntity {
if (persistentDataTag instanceof CompoundTag) {
this.persistentDataContainer.putAll((CompoundTag) persistentDataTag);
}
@@ -18209,7 +18206,7 @@ index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18
}
// CraftBukkit end
-@@ -111,6 +117,15 @@ public abstract class BlockEntity {
+@@ -110,6 +116,15 @@ public abstract class BlockEntity {
this.loadAdditional(nbt, registries);
}
@@ -18225,7 +18222,7 @@ index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18
protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registries) {}
public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) {
-@@ -419,4 +434,16 @@ public abstract class BlockEntity {
+@@ -406,4 +421,16 @@ public abstract class BlockEntity {
T getOrDefault(DataComponentType extends T> type, T fallback);
}
@@ -18378,7 +18375,7 @@ index 61ef08ac941b1e8988d001241780d3a1582f7a2d..2eab5b43ab654966d26424597c1f3baa
FuelValues(Object2IntSortedMap- fuelValues) {
this.values = fuelValues;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
-index 8ac19e1e052e73ff3fd09089bb8e3fd687390ee4..6da1eec98c08e4909ecbd48fe90b3fd62011e284 100644
+index 7a1d9a718dc57b5f630ca8e5358120cebaeefb9c..b51b0b0f48b1da6187387d6ec025681e10ed584d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -201,16 +201,31 @@ public class SignBlockEntity extends BlockEntity {
@@ -18476,7 +18473,7 @@ index 205e223c356634bd6bc6bd58c6f0b7fda61a6f5f..bea05cb928d540a2f19b51bb7352d032
}
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
-index 5b6fbfd1a7a2d87fb2b87d5d1e674206cdf9b280..dcf2dcece3e995ce4646b931329246be19a4e1c2 100644
+index 8c0f332a1a0918f60226d969918ae7fe4fe74166..c8ae6e4cd74549f753ec04def5d882de1ab72308 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -91,7 +91,7 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -18498,10 +18495,10 @@ index 5b6fbfd1a7a2d87fb2b87d5d1e674206cdf9b280..dcf2dcece3e995ce4646b931329246be
protected final String descriptionId;
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 4640baec5bed6c2d53cc0f8ca1d273cc115abe9b..5c4843f6cfd13790a44fc0f928f1fbcef8a648ce 100644
+index 97937e3bd211997f0a0a3e9e671a1c59712d0003..090e196cf391dced8adcb8106026d67b2aeac6b0 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -88,6 +88,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -89,6 +89,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
private final LevelChunkTicks fluidTicks;
private LevelChunk.UnsavedListener unsavedListener;
@@ -18520,7 +18517,7 @@ index 4640baec5bed6c2d53cc0f8ca1d273cc115abe9b..5c4843f6cfd13790a44fc0f928f1fbce
public LevelChunk(Level world, ChunkPos pos) {
this(world, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, (LevelChunkSection[]) null, (LevelChunk.PostLoadProcessor) null, (BlendingData) null);
}
-@@ -121,6 +133,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -122,6 +134,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
this.debug = !empty && this.level.isDebug();
this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE;
// Paper end - get block chunk optimisation
@@ -18990,7 +18987,7 @@ index 94ca0407303c4493ab4928b12ec6ecc75aaca549..a138e1b6b66d99f2035de054137a607a
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ac8af406180bc680d46e8edc3da0fc2e5211345a..81922bf93f8a96e6cf05944ca98a82cc5945a6c6 100644
+index 97b5d6ba2b19a7c730730c74175a29157aed1840..d74591cd30b19f0d5cbfdb81e0607ccd4bdd91d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -426,6 +426,20 @@ public final class CraftServer implements Server {
@@ -19142,10 +19139,10 @@ index ac8af406180bc680d46e8edc3da0fc2e5211345a..81922bf93f8a96e6cf05944ca98a82cc
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 57da11c0da7322e74810e7108e9c8000b0c36520..907fe00ab752ad124020755f211567af771b9d70 100644
+index 92d9f0ea8f7810ae20d3996f49aefa539b4bcb69..eb9bb689a52a7e9c95d6f2e07bb16799286e9057 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-@@ -2384,6 +2384,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
+@@ -2374,6 +2374,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
}
@@ -19195,7 +19192,7 @@ index 57da11c0da7322e74810e7108e9c8000b0c36520..907fe00ab752ad124020755f211567af
public Collection getStructures(int x, int z) {
return this.getStructures(x, z, struct -> true);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index be0d38544395a9b3befb898bb961f34e32fe9509..430407b0cf06ba337c59cd576c7e40a8e5fe8229 100644
+index 1c2439ffc1e407ff69286817d22f127470ce07ba..c471a8c81ba067abcb22956ad1a30b5a9b64fc87 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -176,6 +176,20 @@ public class Main {
@@ -19373,7 +19370,7 @@ index d657fd2c507a5b215aeab0a5f3e9c2ee892a27c8..985e9ec21c60a1f47973bd5fc53b96a6
// Paper start
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index ddabaed899c755925ad8618b78c33dacaf2126ac..51aee9a468f4ebfa9672fd9ce84883cf080859e3 100644
+index b25b10c24a379097233e61bcc10add841b6a7115..1290c1587fe9e39d9350c1079ab27f3be0c6084f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -87,6 +87,23 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -19527,7 +19524,7 @@ index 30d62ee4d5cd2ddacb8783b5bbbf475d592b3e02..5c1cda88080850314dac196dbe71ff12
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index d0c409f4efad289e3e325f44b500fc72589d89d4..051ffc663317fe5a4fafe0750c89fafdece4d316 100644
+index 4f98d138a275a6c34528b7a5148ef265bc38d6b5..72498e233ece886941cca268e729336d66042402 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -523,7 +523,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -19578,10 +19575,10 @@ index 351f42842b780d053cd2e5bad9ae299449141b10..4860574e7fad7a9527dda599703c573c
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index d4e497961578bb693275cdf95915b60b2cc76eb7..63065a22ff359c142bab23fccacfd5ebd86f81a5 100644
+index 6a647cab8b2e476987931486e290703b8726f2c7..029d6daa003f90999afa4e5070eabf6e0ada473a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -583,10 +583,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -584,10 +584,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setPlayerListName(String name) {
@@ -19598,7 +19595,7 @@ index d4e497961578bb693275cdf95915b60b2cc76eb7..63065a22ff359c142bab23fccacfd5eb
if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined
for (ServerPlayer player : (List) this.server.getHandle().players) {
if (player.getBukkitEntity().canSee(this)) {
-@@ -1435,6 +1440,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1444,6 +1449,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - Teleport passenger API
// Don't allow teleporting between worlds while keeping passengers
if (ignorePassengers && entity.isVehicle() && location.getWorld() != this.getWorld()) {
@@ -19606,7 +19603,7 @@ index d4e497961578bb693275cdf95915b60b2cc76eb7..63065a22ff359c142bab23fccacfd5eb
return false;
}
-@@ -1456,6 +1462,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1465,6 +1471,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API
@@ -19614,7 +19611,7 @@ index d4e497961578bb693275cdf95915b60b2cc76eb7..63065a22ff359c142bab23fccacfd5eb
return false;
}
-@@ -2769,6 +2776,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2763,6 +2770,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().getAbilities().walkingSpeed * 2f;
}
@@ -19643,7 +19640,7 @@ index d4e497961578bb693275cdf95915b60b2cc76eb7..63065a22ff359c142bab23fccacfd5eb
private void validateSpeed(float value) {
Preconditions.checkArgument(value <= 1f && value >= -1f, "Speed value (%s) need to be between -1f and 1f", value);
}
-@@ -3580,4 +3609,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -3565,4 +3594,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData()));
}
// Paper end - entity effect API
@@ -20218,10 +20215,10 @@ index 78975412da0f0c2b802bfce6d30d56b26d8023e2..4ec6a07796023aab2f8f84f131f48108
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
-index 3592091c6d1371224e82e1f95b003951ad2f8779..4fdc78a9c74b42a8894030221e0452493d68020e 100644
+index 4864e2016cb1d377425297fd1c52b383632cb59e..fc0e93a936dadb0dca758207297f92a22f3955d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
-@@ -38,6 +38,7 @@ public interface CraftRecipe extends Recipe {
+@@ -36,6 +36,7 @@ public interface CraftRecipe extends Recipe {
stack = Ingredient.of(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> CraftItemType.bukkitToMinecraft(mat)));
} else if (bukkit instanceof RecipeChoice.ExactChoice) {
stack = Ingredient.ofStacks(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> CraftItemStack.asNMSCopy(mat)).toList());
@@ -20350,7 +20347,7 @@ index 1354ccfbf525e5e64483ac5f443cc2325ba63850..5e7b833fc9f37bc370c76e5c43e6c991
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 507f908916cbeb592496f963b46e4c2121a7b5e3..86ba02ba848ee20a2e2b52baab8986dd5a013f98 100644
+index 15892c7769caa15f3d52a1ee2147cf9615aa0e25..8979956334ad5802d221e45eba91248e7f048d13 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -20398,7 +20395,7 @@ index b3169c551b8410f5861f9db0543c785439ecba7c..916ca3f1f39e10158fc7c10141785fff
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
new file mode 100644
-index 0000000000000000000000000000000000000000..95cd1156766895546ef5574b33a60806bff08fa2
+index 0000000000000000000000000000000000000000..7690441b5059ae6c7ca8519875ea8a515c5c5e93
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -0,0 +1,606 @@
@@ -20482,8 +20479,8 @@ index 0000000000000000000000000000000000000000..95cd1156766895546ef5574b33a60806
+ commands = new HashMap<>();
+ commands.put("purpur", new PurpurCommand("purpur"));
+
-+ version = getInt("config-version", 37);
-+ set("config-version", 37);
++ version = getInt("config-version", 38);
++ set("config-version", 38);
+
+ readConfig(PurpurConfig.class, null);
+
@@ -21010,10 +21007,10 @@ index 0000000000000000000000000000000000000000..95cd1156766895546ef5574b33a60806
+}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
new file mode 100644
-index 0000000000000000000000000000000000000000..57ddb4e6a464567cc67e09ce06218cc25af4ddf9
+index 0000000000000000000000000000000000000000..0d5a0e14cbaacc63eeced78a6c28cc64ad918522
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
-@@ -0,0 +1,3438 @@
+@@ -0,0 +1,3447 @@
+package org.purpurmc.purpur;
+
+import net.minecraft.core.registries.BuiltInRegistries;
@@ -21253,6 +21250,7 @@ index 0000000000000000000000000000000000000000..57ddb4e6a464567cc67e09ce06218cc2
+ public List
- itemImmuneToFire = new ArrayList<>();
+ public List
- itemImmuneToLightning = new ArrayList<>();
+ public boolean dontRunWithScissors = false;
++ public ResourceLocation dontRunWithScissorsItemModelReference = ResourceLocation.parse("purpurmc:scissors");
+ public boolean ignoreScissorsInWater = false;
+ public boolean ignoreScissorsInLava = false;
+ public double scissorsRunningDamage = 1D;
@@ -21304,6 +21302,7 @@ index 0000000000000000000000000000000000000000..57ddb4e6a464567cc67e09ce06218cc2
+ if (item != Items.AIR) itemImmuneToLightning.add(item);
+ });
+ dontRunWithScissors = getBoolean("gameplay-mechanics.item.shears.damage-if-sprinting", dontRunWithScissors);
++ dontRunWithScissorsItemModelReference = ResourceLocation.parse(getString("gameplay-mechanics.item.shears.damage-if-sprinting-item-model", "purpurmc:scissors"));
+ ignoreScissorsInWater = getBoolean("gameplay-mechanics.item.shears.ignore-in-water", ignoreScissorsInWater);
+ ignoreScissorsInLava = getBoolean("gameplay-mechanics.item.shears.ignore-in-lava", ignoreScissorsInLava);
+ scissorsRunningDamage = getDouble("gameplay-mechanics.item.shears.sprinting-damage", scissorsRunningDamage);
@@ -21625,28 +21624,35 @@ index 0000000000000000000000000000000000000000..57ddb4e6a464567cc67e09ce06218cc2
+ PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:weathered_copper_bulb", Map.of("into", "minecraft:exposed_copper_bulb", "drops", new HashMap()));
+ PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:oxidized_copper_bulb", Map.of("into", "minecraft:weathered_copper_bulb", "drops", new HashMap()));
+ }
++ if (PurpurConfig.version < 38) {
++ PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_wood", Map.of("into", "minecraft:stripped_pale_oak_wood", "drops", new HashMap()));
++ PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_log", Map.of("into", "minecraft:stripped_pale_oak_log", "drops", new HashMap()));
++ }
+ getMap("tools.axe.strippables", Map.ofEntries(
+ Map.entry("minecraft:oak_wood", Map.of("into", "minecraft:stripped_oak_wood", "drops", new HashMap())),
+ Map.entry("minecraft:oak_log", Map.of("into", "minecraft:stripped_oak_log", "drops", new HashMap())),
+ Map.entry("minecraft:dark_oak_wood", Map.of("into", "minecraft:stripped_dark_oak_wood", "drops", new HashMap())),
+ Map.entry("minecraft:dark_oak_log", Map.of("into", "minecraft:stripped_dark_oak_log", "drops", new HashMap())),
++ Map.entry("minecraft:pale_oak_wood", Map.of("into", "minecraft:stripped_pale_oak_wood", "drops", new HashMap())),
++ Map.entry("minecraft:pale_oak_log", Map.of("into", "minecraft:stripped_pale_oak_log", "drops", new HashMap())),
+ Map.entry("minecraft:acacia_wood", Map.of("into", "minecraft:stripped_acacia_wood", "drops", new HashMap())),
+ Map.entry("minecraft:acacia_log", Map.of("into", "minecraft:stripped_acacia_log", "drops", new HashMap())),
++ Map.entry("minecraft:cherry_wood", Map.of("into", "minecraft:stripped_cherry_wood", "drops", new HashMap())),
++ Map.entry("minecraft:cherry_log", Map.of("into", "minecraft:stripped_cherry_log", "drops", new HashMap())),
+ Map.entry("minecraft:birch_wood", Map.of("into", "minecraft:stripped_birch_wood", "drops", new HashMap())),
+ Map.entry("minecraft:birch_log", Map.of("into", "minecraft:stripped_birch_log", "drops", new HashMap())),
+ Map.entry("minecraft:jungle_wood", Map.of("into", "minecraft:stripped_jungle_wood", "drops", new HashMap())),
+ Map.entry("minecraft:jungle_log", Map.of("into", "minecraft:stripped_jungle_log", "drops", new HashMap())),
+ Map.entry("minecraft:spruce_wood", Map.of("into", "minecraft:stripped_spruce_wood", "drops", new HashMap())),
+ Map.entry("minecraft:spruce_log", Map.of("into", "minecraft:stripped_spruce_log", "drops", new HashMap())),
-+ Map.entry("minecraft:mangrove_wood", Map.of("into", "minecraft:stripped_mangrove_wood", "drops", new HashMap())),
-+ Map.entry("minecraft:mangrove_log", Map.of("into", "minecraft:stripped_mangrove_log", "drops", new HashMap())),
-+ Map.entry("minecraft:cherry_log", Map.of("into", "minecraft:stripped_cherry_log", "drops", new HashMap())),
-+ Map.entry("minecraft:cherry_wood", Map.of("into", "minecraft:stripped_cherry_wood", "drops", new HashMap())),
-+ Map.entry("minecraft:bamboo_block", Map.of("into", "minecraft:stripped_bamboo_block", "drops", new HashMap())),
+ Map.entry("minecraft:warped_stem", Map.of("into", "minecraft:stripped_warped_stem", "drops", new HashMap())),
+ Map.entry("minecraft:warped_hyphae", Map.of("into", "minecraft:stripped_warped_hyphae", "drops", new HashMap())),
+ Map.entry("minecraft:crimson_stem", Map.of("into", "minecraft:stripped_crimson_stem", "drops", new HashMap())),
-+ Map.entry("minecraft:crimson_hyphae", Map.of("into", "minecraft:stripped_crimson_hyphae", "drops", new HashMap())))
++ Map.entry("minecraft:crimson_hyphae", Map.of("into", "minecraft:stripped_crimson_hyphae", "drops", new HashMap())),
++ Map.entry("minecraft:mangrove_wood", Map.of("into", "minecraft:stripped_mangrove_wood", "drops", new HashMap())),
++ Map.entry("minecraft:mangrove_log", Map.of("into", "minecraft:stripped_mangrove_log", "drops", new HashMap())),
++ Map.entry("minecraft:bamboo_block", Map.of("into", "minecraft:stripped_bamboo_block", "drops", new HashMap()))
++ )
+ ).forEach((blockId, obj) -> {
+ Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
+ if (block == Blocks.AIR) { PurpurConfig.log(Level.SEVERE, "Invalid block for `tools.axe.strippables`: " + blockId); return; }
@@ -24950,14 +24956,16 @@ index 0000000000000000000000000000000000000000..a04d23bd98075cd65a24d4de8d18281d
+}
diff --git a/src/main/java/org/purpurmc/purpur/controller/FlyingMoveControllerWASD.java b/src/main/java/org/purpurmc/purpur/controller/FlyingMoveControllerWASD.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ed494e0ad278813a0eb261101447b84cca3ad7aa
+index 0000000000000000000000000000000000000000..940bcc6f79b59cb3cce578912eb789efd394f456
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/controller/FlyingMoveControllerWASD.java
-@@ -0,0 +1,71 @@
+@@ -0,0 +1,74 @@
+package org.purpurmc.purpur.controller;
+
++import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.ai.attributes.Attributes;
++import net.minecraft.world.entity.player.Input;
+import net.minecraft.world.entity.player.Player;
+
+public class FlyingMoveControllerWASD extends MoveControllerWASD {
@@ -24987,11 +24995,12 @@ index 0000000000000000000000000000000000000000..ed494e0ad278813a0eb261101447b84c
+
+ @Override
+ public void purpurTick(Player rider) {
-+ float forward = Math.max(0.0F, rider.getForwardMot());
++ Input lastClientInput = ((ServerPlayer) rider).getLastClientInput();
++ float forward = lastClientInput.forward() == lastClientInput.backward() ? 0.0F : lastClientInput.forward() ? 1.0F : 0.0F;
+ float vertical = forward == 0.0F ? 0.0F : -(rider.xRotO / 45.0F);
-+ float strafe = rider.getStrafeMot();
++ float strafe = (lastClientInput.left() == lastClientInput.right() ? 0.0F : lastClientInput.left() ? 1.0F : -1.0F);
+
-+ if (rider.jumping && spacebarEvent(entity)) {
++ if (lastClientInput.jump() && spacebarEvent(entity)) {
+ entity.onSpacebar();
+ }
+
@@ -25027,14 +25036,16 @@ index 0000000000000000000000000000000000000000..ed494e0ad278813a0eb261101447b84c
+}
diff --git a/src/main/java/org/purpurmc/purpur/controller/FlyingWithSpacebarMoveControllerWASD.java b/src/main/java/org/purpurmc/purpur/controller/FlyingWithSpacebarMoveControllerWASD.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9383c07fa53141127106a1f289366a040960d52e
+index 0000000000000000000000000000000000000000..e0bbaec05afa0ae67ed486b14ea1fbadbbe90d9b
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/controller/FlyingWithSpacebarMoveControllerWASD.java
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,66 @@
+package org.purpurmc.purpur.controller;
+
++import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.ai.attributes.Attributes;
++import net.minecraft.world.entity.player.Input;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.phys.Vec3;
+
@@ -25049,8 +25060,9 @@ index 0000000000000000000000000000000000000000..9383c07fa53141127106a1f289366a04
+
+ @Override
+ public void purpurTick(Player rider) {
-+ float forward = rider.getForwardMot();
-+ float strafe = rider.getStrafeMot() * 0.5F;
++ Input lastClientInput = ((ServerPlayer) rider).getLastClientInput();
++ float forward = (lastClientInput.forward() == lastClientInput.backward() ? 0.0F : lastClientInput.forward() ? 1.0F : -1.0F);
++ float strafe = (lastClientInput.left() == lastClientInput.right() ? 0.0F : lastClientInput.left() ? 1.0F : -1.0F) * 0.5F;
+ float vertical = 0;
+
+ if (forward < 0.0F) {
@@ -25064,7 +25076,7 @@ index 0000000000000000000000000000000000000000..9383c07fa53141127106a1f289366a04
+ speed *= groundSpeedModifier;
+ }
+
-+ if (rider.jumping && spacebarEvent(entity) && !entity.onSpacebar()) {
++ if (lastClientInput.jump() && spacebarEvent(entity) && !entity.onSpacebar()) {
+ entity.setNoGravity(true);
+ vertical = 1.0F;
+ } else {
@@ -25181,7 +25193,7 @@ index 0000000000000000000000000000000000000000..dd219518150ca90f89ad238904fd4095
+}
diff --git a/src/main/java/org/purpurmc/purpur/controller/MoveControllerWASD.java b/src/main/java/org/purpurmc/purpur/controller/MoveControllerWASD.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ad85c1ff6cd5d5ce2262bdb367ce9c8a5b707170
+index 0000000000000000000000000000000000000000..34f3c43fa16e950326ac5e3d93faee0466ffedc6
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/controller/MoveControllerWASD.java
@@ -0,0 +1,92 @@
@@ -25256,7 +25268,7 @@ index 0000000000000000000000000000000000000000..ad85c1ff6cd5d5ce2262bdb367ce9c8a
+
+ ((LookControllerWASD) entity.getLookControl()).setOffsets(yawOffset, 0);
+
-+ if (rider.jumping && spacebarEvent(entity) && !entity.onSpacebar() && entity.onGround) {
++ if (lastClientInput.jump() && spacebarEvent(entity) && !entity.onSpacebar() && entity.onGround) {
+ entity.jumpFromGround();
+ }
+
@@ -25279,14 +25291,16 @@ index 0000000000000000000000000000000000000000..ad85c1ff6cd5d5ce2262bdb367ce9c8a
+}
diff --git a/src/main/java/org/purpurmc/purpur/controller/WaterMoveControllerWASD.java b/src/main/java/org/purpurmc/purpur/controller/WaterMoveControllerWASD.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ba2a37dad43e238e54632975abea8ee6fafaa9e0
+index 0000000000000000000000000000000000000000..922e48799c43ca322a8f550c98a26e1e2959439c
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/controller/WaterMoveControllerWASD.java
-@@ -0,0 +1,50 @@
+@@ -0,0 +1,53 @@
+package org.purpurmc.purpur.controller;
+
++import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.ai.attributes.Attributes;
++import net.minecraft.world.entity.player.Input;
+import net.minecraft.world.entity.player.Player;
+
+public class WaterMoveControllerWASD extends MoveControllerWASD {
@@ -25303,8 +25317,9 @@ index 0000000000000000000000000000000000000000..ba2a37dad43e238e54632975abea8ee6
+
+ @Override
+ public void purpurTick(Player rider) {
-+ float forward = rider.getForwardMot();
-+ float strafe = rider.getStrafeMot() * 0.5F; // strafe slower by default
++ Input lastClientInput = ((ServerPlayer) rider).getLastClientInput();
++ float forward = (lastClientInput.forward() == lastClientInput.backward() ? 0.0F : lastClientInput.forward() ? 1.0F : -1.0F);
++ float strafe = (lastClientInput.left() == lastClientInput.right() ? 0.0F : lastClientInput.left() ? 1.0F : -1.0F) * 0.5F; // strafe slower by default
+ float vertical = -(rider.xRotO / 90);
+
+ if (forward == 0.0F) {
@@ -25335,10 +25350,10 @@ index 0000000000000000000000000000000000000000..ba2a37dad43e238e54632975abea8ee6
+}
diff --git a/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java b/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java
new file mode 100644
-index 0000000000000000000000000000000000000000..f25abee6dbf99c8d08f8e09db02b41df86115faa
+index 0000000000000000000000000000000000000000..1c7e38067b79869669a674dc949e9547b93bd49f
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java
-@@ -0,0 +1,107 @@
+@@ -0,0 +1,108 @@
+package org.purpurmc.purpur.entity;
+
+import net.minecraft.core.particles.ParticleTypes;
@@ -25400,11 +25415,12 @@ index 0000000000000000000000000000000000000000..f25abee6dbf99c8d08f8e09db02b41df
+
+ Vec3 motDouble = mot.scale(2.0);
+ for (int i = 0; i < 5; i++) {
-+ ((ServerLevel) level()).sendParticles(null, ParticleTypes.BUBBLE,
++ ((ServerLevel) level()).sendParticlesSource(null, ParticleTypes.BUBBLE,
++ false, true,
+ getX() + random.nextFloat() / 2 - 0.25F,
+ getY() + random.nextFloat() / 2 - 0.25F,
+ getZ() + random.nextFloat() / 2 - 0.25F,
-+ 0, motDouble.x(), motDouble.y(), motDouble.z(), 0.1D, true);
++ 0, motDouble.x(), motDouble.y(), motDouble.z(), 0.1D);
+ }
+
+ if (++ticksLived > 20) {
@@ -25448,10 +25464,10 @@ index 0000000000000000000000000000000000000000..f25abee6dbf99c8d08f8e09db02b41df
+}
diff --git a/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java b/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java
new file mode 100644
-index 0000000000000000000000000000000000000000..58957b0bd3cd2c37fd4a6766a02e2506d9f51010
+index 0000000000000000000000000000000000000000..19c2d5240eb47d8b4e819c75dc378f2fa2697b0d
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java
-@@ -0,0 +1,129 @@
+@@ -0,0 +1,130 @@
+package org.purpurmc.purpur.entity;
+
+import net.minecraft.core.particles.ParticleTypes;
@@ -25515,11 +25531,12 @@ index 0000000000000000000000000000000000000000..58957b0bd3cd2c37fd4a6766a02e2506
+
+ Vec3 motDouble = mot.scale(2.0);
+ for (int i = 0; i < 5; i++) {
-+ ((ServerLevel) level()).sendParticles(null, ParticleTypes.FLAME,
++ ((ServerLevel) level()).sendParticlesSource(null, ParticleTypes.FLAME,
++ false, true,
+ getX() + random.nextFloat() / 2 - 0.25F,
+ getY() + random.nextFloat() / 2 - 0.25F,
+ getZ() + random.nextFloat() / 2 - 0.25F,
-+ 0, motDouble.x(), motDouble.y(), motDouble.z(), 0.1D, true);
++ 0, motDouble.x(), motDouble.y(), motDouble.z(), 0.1D);
+ }
+
+ if (++ticksLived > 20) {
diff --git a/patches/server/0002-mc-dev-fixes.patch b/patches/server/0002-mc-dev-fixes.patch
index 989daf4d7..48e9403aa 100644
--- a/patches/server/0002-mc-dev-fixes.patch
+++ b/patches/server/0002-mc-dev-fixes.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] mc dev fixes
diff --git a/src/main/java/net/minecraft/server/commands/DebugCommand.java b/src/main/java/net/minecraft/server/commands/DebugCommand.java
-index 06568cc308e06b16f43ec7facd5e2c4e36f3fee9..f8cdd6911fe9d6402455b7368d0e98c25e9511ca 100644
+index 06568cc308e06b16f43ec7facd5e2c4e36f3fee9..c3374d11753d8cd152784727bf7ed08d18931136 100644
--- a/src/main/java/net/minecraft/server/commands/DebugCommand.java
+++ b/src/main/java/net/minecraft/server/commands/DebugCommand.java
@@ -271,5 +271,12 @@ public class DebugCommand {
@@ -15,7 +15,7 @@ index 06568cc308e06b16f43ec7facd5e2c4e36f3fee9..f8cdd6911fe9d6402455b7368d0e98c2
+
+ // Plazma start - Decompile fixes
+ @Override
-+ public CommandSender getBukkitSender(final CommandSourceStack wrapper) {
++ public org.bukkit.command.CommandSender getBukkitSender(final CommandSourceStack wrapper) {
+ return wrapper.getBukkitSender();
+ }
+ // Plazma end - Decompile fixes
diff --git a/patches/server/0003-Minor-code-optimizations.patch b/patches/server/0003-Minor-code-optimizations.patch
index 9ab49dd19..7323d5d67 100644
--- a/patches/server/0003-Minor-code-optimizations.patch
+++ b/patches/server/0003-Minor-code-optimizations.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Minor code optimizations
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 34e8eb828be517d9ee3973597c74c5cac3d75c99..f8575f94a389d87d8043ae838720dbe2247235c4 100644
+index 1a808fc381c0c3ea1fc49bbffebddf2c550e817a..55f15f26b56b97a561054b0660ba4965bb008b36 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -1697,7 +1697,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1698,7 +1698,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@Override
public List getEntities(@Nullable Entity except, AABB box, Predicate super Entity> predicate) {
Profiler.get().incrementCounter("getEntities");
diff --git a/patches/server/0004-Build-System-Changes.patch b/patches/server/0004-Build-System-Changes.patch
index 0522c48b8..f30ddcbb0 100644
--- a/patches/server/0004-Build-System-Changes.patch
+++ b/patches/server/0004-Build-System-Changes.patch
@@ -5,13 +5,15 @@ Subject: [PATCH] Build System Changes
diff --git a/build.gradle.kts b/build.gradle.kts
-index 77602e4445b1b45a17e5552ac6a769e0ed46ebc7..f021047331c7eb3dac7f0d56af73a9056ffe826b 100644
+index 74d7aaae57e0e9ea9e31c4b2189ba50a0ac83bea..20abf704decfad4dc1744b6515f540d0f871fcb7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -26,71 +26,34 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
+@@ -25,73 +25,35 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
+ // Paper end - configure mockito agent that is needed in newer java versions
dependencies {
- implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
+- implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
+- implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency
- // Paper start
- implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
- implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -29,11 +31,11 @@ index 77602e4445b1b45a17e5552ac6a769e0ed46ebc7..f021047331c7eb3dac7f0d56af73a905
- alsoShade(log4jPlugins.output)
- implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
- // Paper end
-- implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
+- implementation("org.apache.logging.log4j:log4j-iostreams:2.24.1") // Paper - remove exclusion
- implementation("org.ow2.asm:asm-commons:9.7.1")
- implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
- implementation("commons-lang:commons-lang:2.6")
-- runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
+- runtimeOnly("org.xerial:sqlite-jdbc:3.47.0.0")
- runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
- runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
- // Paper start - Use Velocity cipher
@@ -77,6 +79,7 @@ index 77602e4445b1b45a17e5552ac6a769e0ed46ebc7..f021047331c7eb3dac7f0d56af73a905
- implementation("me.lucko:spark-api:0.1-20240720.200737-2")
- implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT")
- // Paper end - spark
++ implementation(project(":${rootProject.providers.gradleProperty("brandName").get().lowercase()}-api")) // Pufferfish // Paper // Purpur // Plazma - Fork-friendly Rebranding
+ // Plazma start - Use Gradle Version Catalogs
+ implementation(server.bundles.implementation)
+ implementation(common.adventure.serializer.ansi)
@@ -108,7 +111,7 @@ index 77602e4445b1b45a17e5552ac6a769e0ed46ebc7..f021047331c7eb3dac7f0d56af73a905
}
paperweight {
-@@ -118,14 +81,14 @@ tasks.jar {
+@@ -119,14 +81,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
diff --git a/patches/server/0005-Fork-friendly-Rebranding.patch b/patches/server/0005-Fork-friendly-Rebranding.patch
index 5494caf8c..5c33d65ab 100644
--- a/patches/server/0005-Fork-friendly-Rebranding.patch
+++ b/patches/server/0005-Fork-friendly-Rebranding.patch
@@ -4,24 +4,11 @@ Date: Wed, 21 Dec 2022 19:31:24 +0900
Subject: [PATCH] Fork-friendly Rebranding
-diff --git a/build.gradle.kts b/build.gradle.kts
-index f021047331c7eb3dac7f0d56af73a9056ffe826b..41005f58fdd526907972185e728bbe1fa97171e9 100644
---- a/build.gradle.kts
-+++ b/build.gradle.kts
-@@ -25,7 +25,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
- // Paper end - configure mockito agent that is needed in newer java versions
-
- dependencies {
-- implementation(project(":purpur-api")) // Pufferfish // Paper // Purpur
-+ implementation(project(":plazma-api")) // Pufferfish // Paper // Purpur // Plazma
- // Plazma start - Use Gradle Version Catalogs
- implementation(server.bundles.implementation)
- implementation(common.adventure.serializer.ansi)
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
-index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..8d5a52c5762c3d9b44dcdf00ae312e0bdc01fa1f 100644
+index 4a8f95670e25c81952cccbaf4c6e49514cacd529..63c9f3b6ea3e3deae1e7a5d6b317b3aa179e1dc5 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
-@@ -593,7 +593,7 @@ public class Metrics {
+@@ -592,7 +592,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
@@ -209,10 +196,10 @@ index 710477ae27ebc5afdf0012ef0867d05efd293c24..3a5e7546c5cc1fcec880cece3f0d0b04
public String getTitle() {
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
-index ecaec3c7b5768771b00c4c33d48a76ba22653a79..8f77566bef4b992013e3b65068cabe7ee1921951 100644
+index a880f4e5cf712654649ad043e58e073e9a87c0fe..c3bce9206aee05b18ddd8b2788f892a972146737 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
-@@ -108,6 +108,11 @@ public class Main {
+@@ -110,6 +110,11 @@ public class Main {
*/ // CraftBukkit end
try {
@@ -225,10 +212,10 @@ index ecaec3c7b5768771b00c4c33d48a76ba22653a79..8f77566bef4b992013e3b65068cabe7e
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 23505b0f80d643d9ef569b49192f44e0373dfb5f..20f79bcd7613e426b6b1020f586773819f1ac9d0 100644
+index 95f1e0ae174400f2cf7bfed2897259d5aa2cfcb5..b0bc896f004e915b291091937a2a566477df1e43 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1280,7 +1280,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public boolean lagging = false; // Purpur
- protected boolean upnp = false; // Purpur
-@@ -515,6 +516,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
@@ -656,10 +656,10 @@ index 6a359f1ed07aa7b9c78e470fb00661ea03eaec03..a4421517b8136bb974e197eaa6dd0d83
this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index f8575f94a389d87d8043ae838720dbe2247235c4..0da2014933fe441c4d3dc27c5fe10afa92ca1ec7 100644
+index 55f15f26b56b97a561054b0660ba4965bb008b36..abdd3fcf266752d3bcad56cc5cd35ba8d3356a85 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -172,7 +172,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -173,7 +173,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
return this.paperConfig;
}
// Paper end - add paper world config
@@ -673,7 +673,7 @@ index f8575f94a389d87d8043ae838720dbe2247235c4..0da2014933fe441c4d3dc27c5fe10afa
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
public static BlockPos lastPhysicsProblem; // Spigot
-@@ -874,7 +879,24 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -875,7 +880,24 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}
// Paper end - optimise random ticking
@@ -699,7 +699,7 @@ index f8575f94a389d87d8043ae838720dbe2247235c4..0da2014933fe441c4d3dc27c5fe10afa
// Paper start - getblock optimisations - cache world height/sections
final DimensionType dimType = holder.value();
this.minY = dimType.minY();
-@@ -886,6 +908,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -887,6 +909,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -708,7 +708,7 @@ index f8575f94a389d87d8043ae838720dbe2247235c4..0da2014933fe441c4d3dc27c5fe10afa
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
this.generator = gen;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 81922bf93f8a96e6cf05944ca98a82cc5945a6c6..655463a7d588ed88778d137b6fe5ac18951ff172 100644
+index d74591cd30b19f0d5cbfdb81e0607ccd4bdd91d4..9f9ad30fc3b80b5865669d44057cc658172c574a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1100,6 +1100,7 @@ public final class CraftServer implements Server {
@@ -734,7 +734,7 @@ index 81922bf93f8a96e6cf05944ca98a82cc5945a6c6..655463a7d588ed88778d137b6fe5ac18
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 75a062e1105c2f7cc631a6b8b201b0e08621e3c5..b75e2a9273e9562a3d07f68af927ad085c428589 100644
+index 74c0859f6dc3d885f16c6dcc32c9c3fc5d3defcb..ba002bf801ec34f88671031fe916e0dddf86a437 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -197,6 +197,14 @@ public class Main {
diff --git a/patches/server/0009-Warn-on-startup.patch b/patches/server/0009-Warn-on-startup.patch
index 1a70dab4d..557e8bc94 100644
--- a/patches/server/0009-Warn-on-startup.patch
+++ b/patches/server/0009-Warn-on-startup.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Warn on startup
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
-index 8f77566bef4b992013e3b65068cabe7ee1921951..65fd553887ed9eb9c26e036c8009179a7baf5380 100644
+index c3bce9206aee05b18ddd8b2788f892a972146737..fc378b08c10c7f670be93d52937c7642b986ed0d 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
-@@ -113,6 +113,18 @@ public class Main {
+@@ -115,6 +115,18 @@ public class Main {
if (io.papermc.paper.ServerBrandConstants.ASCII_LOGO != null)
System.out.println(io.papermc.paper.ServerBrandConstants.ASCII_LOGO);
// Plazma end - Fork-friendly Rebranding
diff --git a/patches/server/0010-Always-agree-EULA-on-development-mode.patch b/patches/server/0010-Always-agree-EULA-on-development-mode.patch
index e6368f509..17ff79e17 100644
--- a/patches/server/0010-Always-agree-EULA-on-development-mode.patch
+++ b/patches/server/0010-Always-agree-EULA-on-development-mode.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Always agree EULA on development mode
diff --git a/build.gradle.kts b/build.gradle.kts
-index 41005f58fdd526907972185e728bbe1fa97171e9..746ad8087192931400256c8a1ef71e966eaf6b1a 100644
+index 20abf704decfad4dc1744b6515f540d0f871fcb7..5040a01c391b0276e28bd8b27280d5d61099e8f1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -164,7 +164,7 @@ fun TaskContainer.registerRunTask(
@@ -18,10 +18,10 @@ index 41005f58fdd526907972185e728bbe1fa97171e9..746ad8087192931400256c8a1ef71e96
if (rootProject.childProjects["test-plugin"] != null) {
val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
-index 65fd553887ed9eb9c26e036c8009179a7baf5380..694b126df2c3d1d6fa40ee9731c28886caf1a4fc 100644
+index fc378b08c10c7f670be93d52937c7642b986ed0d..05e760162ebbf3475129001b4e9de951e0e142d4 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
-@@ -179,6 +179,7 @@ public class Main {
+@@ -181,6 +181,7 @@ public class Main {
// Spigot Start
boolean eulaAgreed = Boolean.getBoolean( "com.mojang.eula.agree" );
diff --git a/patches/server/0011-Add-more-metrics.patch b/patches/server/0011-Add-more-metrics.patch
index 9c52df6b8..c6a909deb 100644
--- a/patches/server/0011-Add-more-metrics.patch
+++ b/patches/server/0011-Add-more-metrics.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add more metrics
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
-index 8d5a52c5762c3d9b44dcdf00ae312e0bdc01fa1f..48d33d4131af90eee35c9553898a2ac7ec5e2b7e 100644
+index 63c9f3b6ea3e3deae1e7a5d6b317b3aa179e1dc5..1693d010148b99cbafa22433d5fb396324c1bf2f 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
-@@ -636,38 +636,59 @@ public class Metrics {
+@@ -635,38 +635,59 @@ public class Metrics {
return map;
}));
diff --git a/patches/server/0012-Optimize-default-configurations.patch b/patches/server/0012-Optimize-default-configurations.patch
index 431da41f0..791433ad1 100644
--- a/patches/server/0012-Optimize-default-configurations.patch
+++ b/patches/server/0012-Optimize-default-configurations.patch
@@ -46,10 +46,10 @@ index 411c81a88b8a008b2aaf0ca62fb7ffa1dd9e32a4..53dc2e3c22c5cb038b9a283112f265d3
"will get their pathfinders and behaviors ticked. 20 = 1s");
activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index 17e23ca4dd2bbfba49ea00aa2b719a95feb931be..a8e75eaadfcc6c8b2503776d7de197f756712819 100644
+index 088b8fe5d144807f4da1e85b2fa34dfd21286f8c..8c3c7987a269733a0f530e8f22c3f1a005de21ac 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -147,7 +147,7 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -148,7 +148,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Watchdog extends ConfigurationPart {
public int earlyWarningEvery = 5000;
@@ -58,7 +58,7 @@ index 17e23ca4dd2bbfba49ea00aa2b719a95feb931be..a8e75eaadfcc6c8b2503776d7de197f7
}
public SpamLimiter spamLimiter;
-@@ -187,7 +187,7 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -188,7 +188,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Commands commands;
public class Commands extends ConfigurationPart {
@@ -307,10 +307,10 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
-index 694b126df2c3d1d6fa40ee9731c28886caf1a4fc..822ecda5f4dc6cc8cd0cc4da577f27cdcc5c4967 100644
+index 05e760162ebbf3475129001b4e9de951e0e142d4..363ef48b096281132cea61aff405a50d7b51c4d4 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
-@@ -164,7 +164,7 @@ public class Main {
+@@ -166,7 +166,7 @@ public class Main {
File configFile = (File) optionset.valueOf("bukkit-settings");
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
configuration.options().copyDefaults(true);
@@ -352,7 +352,7 @@ index 8f7e922ceca286b1a590181c301fbe9bff55c024..3dd5c7441bb300ca17d717af37edbefb
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
this.enableStatus = this.get("enable-status", true);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 655463a7d588ed88778d137b6fe5ac18951ff172..cc4762c13e21600b4c5e287a6fae9e6e472080b3 100644
+index 9f9ad30fc3b80b5865669d44057cc658172c574a..889d66fc4af69a1ecbf1ddd218f45e23e762d956 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -449,7 +449,7 @@ public final class CraftServer implements Server {
@@ -396,7 +396,7 @@ index 09053b4ccf268fd204c81dbb8d4f10fa9edcad5f..93f67f125b3674e645cfdae27e579e12
#### ENGLISH ####
This is the %s configuration file for Plazma.
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
-index 95cd1156766895546ef5574b33a60806bff08fa2..097f3c34d244b89e7dd9f8b6f2a3d8fdc67b36dc 100644
+index 7690441b5059ae6c7ca8519875ea8a515c5c5e93..f29059798c9dc642187b4939dd917ee15cbe120d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -244,7 +244,7 @@ public class PurpurConfig {
@@ -418,10 +418,10 @@ index 95cd1156766895546ef5574b33a60806bff08fa2..097f3c34d244b89e7dd9f8b6f2a3d8fd
private static void networkSettings() {
useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
-index 57ddb4e6a464567cc67e09ce06218cc25af4ddf9..e55993e318b7f7292e22c4539bc2fd1447f67fa8 100644
+index 0d5a0e14cbaacc63eeced78a6c28cc64ad918522..43ad38dadfe14b3dd0565c536b276eb3f9dbd813 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
-@@ -424,7 +424,7 @@ public class PurpurWorldConfig {
+@@ -426,7 +426,7 @@ public class PurpurWorldConfig {
public boolean idleTimeoutTargetPlayer = true;
public String playerDeathExpDropEquation = "expLevel * 7";
public int playerDeathExpDropMax = 100;
@@ -430,7 +430,7 @@ index 57ddb4e6a464567cc67e09ce06218cc25af4ddf9..e55993e318b7f7292e22c4539bc2fd14
public boolean teleportOnNetherCeilingDamage = false;
public boolean totemOfUndyingWorksInInventory = false;
public boolean playerFixStuckPortal = false;
-@@ -3262,7 +3262,7 @@ public class PurpurWorldConfig {
+@@ -3271,7 +3271,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
diff --git a/patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch b/patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch
index 8c6daee12..3e75c88ea 100644
--- a/patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch
+++ b/patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add an option to apply the configuration to the vanilla
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index a8e75eaadfcc6c8b2503776d7de197f756712819..99cf08bc17eec05463b300c0c9fd108cbfba1b8f 100644
+index 8c3c7987a269733a0f530e8f22c3f1a005de21ac..20def77109eb9cd98a7677e73b4316544be86283 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -87,7 +87,7 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -88,7 +88,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Component flyingVehicle = Component.translatable("multiplayer.disconnect.flying");
}
@@ -19,7 +19,7 @@ index a8e75eaadfcc6c8b2503776d7de197f756712819..99cf08bc17eec05463b300c0c9fd108c
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index cc4762c13e21600b4c5e287a6fae9e6e472080b3..76f255d12189ffe83426cc7aa85771d5c7cfb111 100644
+index 889d66fc4af69a1ecbf1ddd218f45e23e762d956..88208ecf64ab298b859226494436cc84c944e610 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -449,7 +449,19 @@ public final class CraftServer implements Server {
diff --git a/patches/server/0016-Add-missing-Purpur-configuration-options.patch b/patches/server/0016-Add-missing-Purpur-configuration-options.patch
index 83c8547fa..e5d2d0e39 100644
--- a/patches/server/0016-Add-missing-Purpur-configuration-options.patch
+++ b/patches/server/0016-Add-missing-Purpur-configuration-options.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add missing Purpur configuration options
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
-index 0a173040c56fea6d8f83998b7c66aa8daaf648f2..16b98cad477d7af2d9534cc189aae43a5adc8d58 100644
+index 235596af3a4e210efe966782b29e2b1d4d41e36d..e52178abc7684dd3ca7cbbe23906f9f4b5f80376 100644
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
@@ -160,6 +160,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -51,7 +51,7 @@ index d2f0b14a0014802605b601e62d0eebddf06d3737..459a45f82c42b346a66bb1954e155a09
@Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
-index 02581f47d1ca58c2b8abffc478adf48343585c8b..bd04af6311ca64d81c8829e731ac39a6486ee789 100644
+index 267f49bf00f5bbd5541e25c938f727a5bafd8eb2..c4fd2adb2c32f355f23e7a9f002b275bee0bedd7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -163,6 +163,23 @@ public class Frog extends Animal implements VariantHolder> {
@@ -130,7 +130,7 @@ index 6061cd4fc38fef0895571ab767e495d5755f9fc8..0bc7856065fdc599890f18f5a4e2f6c2
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
-index 5a62fe9c4f0cee9e8b4a48564f76afec609335b1..79b090030b716029cc4cfc8bf9d81af0b2202313 100644
+index cf231928bae5493b0684109c769d7da4dc36f872..065c7c5ad2f077ab8acd0f008867d42174ba20b4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -151,6 +151,23 @@ public class Warden extends Monster implements VibrationSystem {
@@ -189,7 +189,7 @@ index 1f4cc08e84a23213bb9786ea09ad77caeec2d336..f888f1dd2e3c228b0a370fe920b63d54
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
-index 097f3c34d244b89e7dd9f8b6f2a3d8fdc67b36dc..3f4c94aada930e55dfe6a2dd6f3bfb51b2276b0d 100644
+index f29059798c9dc642187b4939dd917ee15cbe120d..7a482099a69759659038e10632e7dd4626c187a1 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -331,6 +331,7 @@ public class PurpurConfig {
@@ -209,10 +209,10 @@ index 097f3c34d244b89e7dd9f8b6f2a3d8fdc67b36dc..3f4c94aada930e55dfe6a2dd6f3bfb51
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
-index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e94cfd6841 100644
+index 43ad38dadfe14b3dd0565c536b276eb3f9dbd813..474bab426175d8dece524faeffd8977a6e1bb074 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
-@@ -1135,7 +1135,13 @@ public class PurpurWorldConfig {
+@@ -1144,7 +1144,13 @@ public class PurpurWorldConfig {
public boolean allayControllable = true;
public double allayMaxHealth = 20.0D;
public double allayScale = 1.0D;
@@ -226,7 +226,7 @@ index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e9
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
-@@ -1290,7 +1296,13 @@ public class PurpurWorldConfig {
+@@ -1299,7 +1305,13 @@ public class PurpurWorldConfig {
public double camelMovementSpeedMin = 0.09D;
public double camelMovementSpeedMax = 0.09D;
public int camelBreedingTicks = 6000;
@@ -240,7 +240,7 @@ index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e9
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
-@@ -1755,7 +1767,15 @@ public class PurpurWorldConfig {
+@@ -1764,7 +1776,15 @@ public class PurpurWorldConfig {
public boolean frogControllable = true;
public float frogRidableJumpHeight = 0.65F;
public int frogBreedingTicks = 6000;
@@ -256,7 +256,7 @@ index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e9
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
-@@ -2767,7 +2787,13 @@ public class PurpurWorldConfig {
+@@ -2776,7 +2796,13 @@ public class PurpurWorldConfig {
public double snifferMaxHealth = 14.0D;
public double snifferScale = 1.0D;
public int snifferBreedingTicks = 6000;
@@ -270,7 +270,7 @@ index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e9
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
-@@ -2875,7 +2901,15 @@ public class PurpurWorldConfig {
+@@ -2884,7 +2910,15 @@ public class PurpurWorldConfig {
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
@@ -286,7 +286,7 @@ index e55993e318b7f7292e22c4539bc2fd1447f67fa8..b67b6147e9175041539b01357dd8b1e9
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
-@@ -3107,7 +3141,15 @@ public class PurpurWorldConfig {
+@@ -3116,7 +3150,15 @@ public class PurpurWorldConfig {
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;
diff --git a/patches/server/0018-Apply-various-optimizations.patch b/patches/server/0018-Apply-various-optimizations.patch
index 0bf64a389..d0d5b5fd4 100644
--- a/patches/server/0018-Apply-various-optimizations.patch
+++ b/patches/server/0018-Apply-various-optimizations.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations
Akarin - Swaps the predicate order of collision
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index aa171a1afb9800e6ec84f6b4f1b28e44177752f7..eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529 100644
+index c59963369bf4add28a966ec24b67cb6e8b701dd2..1717c14e77ab9a26298c6990d45be16d32f3f3e6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2309,8 +2309,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2332,8 +2332,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void playerTouch(Player player) {}
public void push(Entity entity) {
@@ -21,7 +21,7 @@ index aa171a1afb9800e6ec84f6b4f1b28e44177752f7..eaf53f5f4c33ca7a7a988e7bd04b7033
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
double d0 = entity.getX() - this.getX();
double d1 = entity.getZ() - this.getZ();
-@@ -2338,8 +2339,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2361,8 +2362,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.push(d0, 0.0D, d1);
}
}
diff --git a/patches/server/0020-Add-option-to-disable-moved-to-quickly-check-for-spe.patch b/patches/server/0020-Add-option-to-disable-moved-to-quickly-check-for-spe.patch
index 338d0a300..87f2a0b8f 100644
--- a/patches/server/0020-Add-option-to-disable-moved-to-quickly-check-for-spe.patch
+++ b/patches/server/0020-Add-option-to-disable-moved-to-quickly-check-for-spe.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add option to disable moved to quickly check for specific
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 9ae16e24013ea5664d4ea6d52ed7dd188404890f..91f161d27a45174b6f3c31440eea46ff81185203 100644
+index 8a468f0c09daf23cfbddb3c607a758c6411babfc..910a346f43dbd0ca8dfec5cb78ffa25caeeb1fa1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1695,7 +1695,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1749,7 +1749,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
diff --git a/patches/server/0027-Improve-SwingTime-ticking.patch b/patches/server/0027-Improve-SwingTime-ticking.patch
index 96f6aced0..d44ee97b2 100644
--- a/patches/server/0027-Improve-SwingTime-ticking.patch
+++ b/patches/server/0027-Improve-SwingTime-ticking.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Improve SwingTime ticking
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f4604e543a980d6aeb485252da5a4e755aa12bfa..f2753cf51634479e501c1a3e7931d6d9882bc801 100644
+index 33fbe0f7a356dd847e546feffb468b2803c6744b..765435fa2bc9aa901453c0939a7b3acd27e15008 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2821,6 +2821,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2832,6 +2832,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected void updateSwingTime() {
diff --git a/patches/server/0030-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch b/patches/server/0030-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch
index 000624d82..eb1f48188 100644
--- a/patches/server/0030-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch
+++ b/patches/server/0030-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Use Plazma logo instead if server favicon doesn't exist
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 20266ef8f0974f47581e71175de4b01ea1a27bf0..54ef910938efb537a689dd5dbda119455bbf2a0e 100644
+index 63353cd8c896b58b356ff1d44359be63db1e0186..b2b2677c8919cb8e0bc4df2e290c1f246833673e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1627,29 +1627,32 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop loadStatusIcon() {
diff --git a/patches/server/0037-Configurable-RandomSource-factory-provider.patch b/patches/server/0037-Configurable-RandomSource-factory-provider.patch
index 606ee4935..f89d6cd15 100644
--- a/patches/server/0037-Configurable-RandomSource-factory-provider.patch
+++ b/patches/server/0037-Configurable-RandomSource-factory-provider.patch
@@ -240,10 +240,10 @@ index f1e0d3d7b1f458fcce83cf67762a16309123cdcb..6a8d5948f127ea87a0b4554ece4ad2c4
public boolean isIgnoreEntities() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 907fe00ab752ad124020755f211567af771b9d70..e041752bbcba5cefce0dde8db917510129d29987 100644
+index eb9bb689a52a7e9c95d6f2e07bb16799286e9057..a7853ce8028c2fc0c8fe71f767700fc624a8007c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-@@ -288,7 +288,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
+@@ -289,7 +289,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
// Paper end
diff --git a/patches/server/0041-Completely-remove-timings-implementation.patch b/patches/server/0041-Completely-remove-timings-implementation.patch
index 987f1eea5..be548d62d 100644
--- a/patches/server/0041-Completely-remove-timings-implementation.patch
+++ b/patches/server/0041-Completely-remove-timings-implementation.patch
@@ -35,7 +35,7 @@ index 23594fb7eb4b2f33146592866608c2858ef23937..8acdea0f086129854cb44bc5ce8bbbc4
}
return ret;
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
-index 097500a59336db1bbfffcd1aa4cff7a8586e46ec..844e340c331c6dd12eaaac247f871b042ceb6c25 100644
+index 097500a59336db1bbfffcd1aa4cff7a8586e46ec..e0d634d4b0dd6f7c09f61865ed299de782c4abf8 100644
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
@@ -232,7 +232,7 @@ public class PaperPluginManagerImpl implements PluginManager, DependencyContext
@@ -43,12 +43,12 @@ index 097500a59336db1bbfffcd1aa4cff7a8586e46ec..844e340c331c6dd12eaaac247f871b04
@Override
public boolean useTimings() {
- return co.aikar.timings.Timings.isTimingsEnabled();
-+ return false; // Thunderbolt - Remove remaining timings implementations
++ return false; // Plazma - Remove remaining timings implementations
}
@Override
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 54ef910938efb537a689dd5dbda119455bbf2a0e..6e9766aff9a9f2b578f5b8a6b42e206fb7ad1bc6 100644
+index b2b2677c8919cb8e0bc4df2e290c1f246833673e..baf7324bb9a686a322de3e0db30fd64efdeb1dbf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -3,7 +3,7 @@ package net.minecraft.server;
diff --git a/patches/server/0042-Remove-persist-isClientSide-flag.patch b/patches/server/0042-Remove-persist-isClientSide-flag.patch
index c861702d2..80e1ecb05 100644
--- a/patches/server/0042-Remove-persist-isClientSide-flag.patch
+++ b/patches/server/0042-Remove-persist-isClientSide-flag.patch
@@ -195,70 +195,6 @@ index 571db5f9bf94745a8afe2cd313e593fb15db5e37..43e42d265513feedc54f3780f37427a5
public ChunkAccess getAnyChunkNow(final int chunkX, final int chunkZ) {
if (this.world == null) {
-diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index 8d82425ccbc30b3f4a59767ca72bf37311ddeda0..e137cc2e16a7b1532501bb3bb568236b427d171b 100644
---- a/src/main/java/net/minecraft/commands/Commands.java
-+++ b/src/main/java/net/minecraft/commands/Commands.java
-@@ -203,7 +203,7 @@ public class Commands {
- SayCommand.register(this.dispatcher);
- ScheduleCommand.register(this.dispatcher);
- ScoreboardCommand.register(this.dispatcher, commandRegistryAccess);
-- SeedCommand.register(this.dispatcher, environment != Commands.CommandSelection.INTEGRATED);
-+ SeedCommand.register(this.dispatcher, true); // Plazma - Remove persist 'isClientSide' flag
- SetBlockCommand.register(this.dispatcher, commandRegistryAccess);
- SetSpawnCommand.register(this.dispatcher);
- SetWorldSpawnCommand.register(this.dispatcher);
-@@ -234,12 +234,12 @@ public class Commands {
- WardenSpawnTrackerCommand.register(this.dispatcher);
- SpawnArmorTrimsCommand.register(this.dispatcher);
- ServerPackCommand.register(this.dispatcher);
-- if (environment.includeDedicated) {
-+ //if (environment.includeDedicated) { // Plazma - Remove persist 'isClientSide' flag
- DebugConfigCommand.register(this.dispatcher);
-- }
-+ //} // Plazma - Remove persist 'isClientSide' flag
- }
-
-- if (environment.includeDedicated) {
-+ //if (environment.includeDedicated) { // Plazma - Remove persist 'isClientSide' flag
- BanIpCommands.register(this.dispatcher);
- BanListCommands.register(this.dispatcher);
- BanPlayerCommands.register(this.dispatcher);
-@@ -263,11 +263,13 @@ public class Commands {
- org.purpurmc.purpur.command.CompassCommand.register(this.dispatcher); // Purpur
- org.purpurmc.purpur.command.RamBarCommand.register(this.dispatcher); // Purpur
- org.purpurmc.purpur.command.RamCommand.register(this.dispatcher); // Purpur
-- }
-+ //} // Plazma - Remove persist 'isClientSide' flag
-
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (environment.includeIntegrated) {
- PublishCommand.register(this.dispatcher);
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
-
- // Paper start - Vanilla command permission fixes
- for (final CommandNode node : this.dispatcher.getRoot().getChildren()) {
-@@ -731,18 +733,7 @@ public class Commands {
- }
- }
-
-- public static enum CommandSelection {
--
-- ALL(true, true), DEDICATED(false, true), INTEGRATED(true, false);
--
-- final boolean includeIntegrated;
-- final boolean includeDedicated;
--
-- private CommandSelection(final boolean flag, final boolean flag1) {
-- this.includeIntegrated = flag;
-- this.includeDedicated = flag1;
-- }
-- }
-+ public enum CommandSelection { ALL, DEDICATED, INTEGRATED } // Plazma - Remove persist 'isClientSide' flag
-
- @FunctionalInterface
- public interface ParseFunction {
diff --git a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
index ee2c4c5265d96afe592c5007b0b6ad7649ce5190..2495456fae536d83afd8023f531aeb65ec10bf82 100644
--- a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
@@ -408,7 +344,7 @@ index ee2c4c5265d96afe592c5007b0b6ad7649ce5190..2495456fae536d83afd8023f531aeb65
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index c6490554a3025f4de3f3218178fad76cd1848a19..e65245ab6c6c6f3fcb425f963f12cade3618e8e9 100644
+index cdd73bb358e309844bef576175a9026cb8563e7e..81fd76add225539689b1db7d10dff761c1addaaa 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -542,7 +542,7 @@ public interface DispenseItemBehavior {
@@ -470,7 +406,7 @@ index 65ed3d77a51b8299517e0c165403b0c5ac413475..5c7dbb218b6a9a7ccb2c9dbab93a7d8b
return stack;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 6e9766aff9a9f2b578f5b8a6b42e206fb7ad1bc6..421b3c524a2828fdd8b0b95c37bce9b79fc7825d 100644
+index baf7324bb9a686a322de3e0db30fd64efdeb1dbf..e1409a61891e4f30c39ba5b75691776e92417ed2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -270,8 +270,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> list = TagLoader.loadTagsForExistingRegistries(resourcemanager, this.registries.compositeAccess(), io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.RELOAD); // Paper - tag lifecycle - add cause
- return ReloadableServerResources.loadResources(resourcemanager, this.registries, list, this.worldData.enabledFeatures(), this.isDedicatedServer() ? Commands.CommandSelection.DEDICATED : Commands.CommandSelection.INTEGRATED, this.getFunctionCompilationLevel(), this.executor, this).whenComplete((datapackresources, throwable) -> {
-+ return ReloadableServerResources.loadResources(resourcemanager, this.registries, list, this.worldData.enabledFeatures(), Commands.CommandSelection.DEDICATED, this.getFunctionCompilationLevel(), this.executor, this).whenComplete((datapackresources, throwable) -> { // Plazma - Remove persist 'isClientSide' flag
++ return ReloadableServerResources.loadResources(resourcemanager, this.registries, list, this.worldData.enabledFeatures(), /*this.isDedicatedServer() ?*/ Commands.CommandSelection.DEDICATED /*: Commands.CommandSelection.INTEGRATED*/, this.getFunctionCompilationLevel(), this.executor, this).whenComplete((datapackresources, throwable) -> { // Plazma - Remove persist 'isClientSide' flag
if (throwable != null) {
resourcemanager.close();
}
-@@ -2687,16 +2689,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop {
++ this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, true /*this.isDedicatedServer()*/), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> { // Plazma - Remove persist 'isClientSide' flag
+ this.executeBlocking(() -> {
+ this.saveDebugReport(path.resolve("server"));
+ });
diff --git a/src/main/java/net/minecraft/server/commands/KickCommand.java b/src/main/java/net/minecraft/server/commands/KickCommand.java
-index 6468b3a25c7527a2fde6899e4812b5cb79ce4b1d..6630556c1849fb74156356c314f72078878c86cc 100644
+index 6468b3a25c7527a2fde6899e4812b5cb79ce4b1d..eb7b4b89d6eb93141c5ec1ca2b67684899db4343 100644
--- a/src/main/java/net/minecraft/server/commands/KickCommand.java
+++ b/src/main/java/net/minecraft/server/commands/KickCommand.java
-@@ -47,11 +47,11 @@ public class KickCommand {
+@@ -41,17 +41,19 @@ public class KickCommand {
+ }
+
+ private static int kickPlayers(CommandSourceStack source, Collection targets, Component reason) throws CommandSyntaxException {
++ /* Plazma - Remove persist 'isClientSide' flag
+ if (!source.getServer().isPublished()) {
+ throw ERROR_SINGLEPLAYER.create();
+ } else {
++ */ // Plazma - Remove persist 'isClientSide' flag
int i = 0;
for (ServerPlayer serverPlayer : targets) {
@@ -550,8 +522,16 @@ index 6468b3a25c7527a2fde6899e4812b5cb79ce4b1d..6630556c1849fb74156356c314f72078
}
if (i == 0) {
+@@ -59,6 +61,6 @@ public class KickCommand {
+ } else {
+ return i;
+ }
+- }
++ //} // Plazma - Remove persist 'isClientSide' flag
+ }
+ }
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 45fa867a22481bbba86e587767cfdb96d9691c49..5a9e2d55649679af44339afc8a1f84859ca73082 100644
+index 45fa867a22481bbba86e587767cfdb96d9691c49..e618840aa6a7d906bf944f87287b3f52173561b6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -197,13 +197,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -571,7 +551,33 @@ index 45fa867a22481bbba86e587767cfdb96d9691c49..5a9e2d55649679af44339afc8a1f8485
// Spigot start
this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage));
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
-@@ -839,10 +839,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -551,10 +551,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flags
+ @Override
+ public boolean isDedicatedServer() {
+ return true;
+ }
++ */ // Plazma - Remove persist 'isClientSide' flags
+
+ @Override
+ public int getRateLimitPacketsPerSecond() {
+@@ -571,10 +573,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+ return (DedicatedPlayerList) super.getPlayerList();
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flags
+ @Override
+ public boolean isPublished() {
+ return true;
+ }
++ */ // Plazma - Remove persist 'isClientSide' flags
+
+ @Override
+ public String getServerIp() {
+@@ -839,10 +843,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
SkullBlockEntity.clear();
}
@@ -584,7 +590,7 @@ index 45fa867a22481bbba86e587767cfdb96d9691c49..5a9e2d55649679af44339afc8a1f8485
@Override
public int getScaledTrackingDistance(int initialDistance) {
-@@ -875,11 +877,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -875,11 +881,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return this.settings.getProperties().serverResourcePackInfo;
}
@@ -599,22 +605,22 @@ index 45fa867a22481bbba86e587767cfdb96d9691c49..5a9e2d55649679af44339afc8a1f8485
@Override
public SampleLogger getTickTimeLogger() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a4421517b8136bb974e197eaa6dd0d83c2fdd0de..3a8b566aa44df367c6edacf371c0b7a2bd2548b6 100644
+index 774372b73375c0a7ec59b61c7206782aeb43cac4..36dec4f9d1a1ded85b13e9227e59cee0c408a316 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -679,9 +679,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -680,9 +680,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.prepareWeather();
this.getWorldBorder().setAbsoluteMaxSize(minecraftserver.getAbsoluteMaxWorldSize());
this.raids = (Raids) this.getDataStorage().computeIfAbsent(Raids.factory(this), Raids.getFileId(this.dimensionTypeRegistration()));
- if (!minecraftserver.isSingleplayer()) {
-+ //if (!minecraftserver.isSingleplayer()) { // Plazma - Completely remove Mojang profiler
++ //if (!minecraftserver.isSingleplayer()) { // Plazma - Remove persist 'isClientSide' flag
iworlddataserver.setGameType(minecraftserver.getDefaultGameType());
- }
-+ //} // Plazma - Completely remove Mojang profiler
++ //} // Plazma - Remove persist 'isClientSide' flag
long l = minecraftserver.getWorldData().worldGenOptions().seed();
-@@ -1149,43 +1149,37 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1150,43 +1150,38 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
private void announceSleepStatus() {
@@ -651,61 +657,41 @@ index a4421517b8136bb974e197eaa6dd0d83c2fdd0de..3a8b566aa44df367c6edacf371c0b7a2
-
- while (iterator.hasNext()) {
- ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+-
+- entityplayer.displayClientMessage(ichatmutablecomponent, true);
+- }
+ int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
+ Component ichatmutablecomponent;
-- entityplayer.displayClientMessage(ichatmutablecomponent, true);
-- }
+ if (this.sleepStatus.areEnoughSleeping(i)) {
+ // Purpur start
-+ if (org.purpurmc.purpur.PurpurConfig.sleepSkippingNight.isBlank()) return;
-
++ if (org.purpurmc.purpur.PurpurConfig.sleepSkippingNight.isBlank()) {
++ return;
+ }
+ if (!org.purpurmc.purpur.PurpurConfig.sleepSkippingNight.equalsIgnoreCase("default")) {
+ ichatmutablecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.purpurmc.purpur.PurpurConfig.sleepSkippingNight));
-+ } else {
-+ ichatmutablecomponent = Component.translatable("sleep.skipping_night");
- }
++ } else
++ ichatmutablecomponent = Component.translatable("sleep.skipping_night");
+ } else {
-+ if (org.purpurmc.purpur.PurpurConfig.sleepingPlayersPercent.isBlank()) return;
++ if (org.purpurmc.purpur.PurpurConfig.sleepingPlayersPercent.isBlank()) {
++ return;
++ }
+ if (!org.purpurmc.purpur.PurpurConfig.sleepingPlayersPercent.equalsIgnoreCase("default")) {
+ ichatmutablecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.purpurmc.purpur.PurpurConfig.sleepingPlayersPercent,
-+ net.kyori.adventure.text.minimessage.tag.resolver.Placeholder.parsed("count", Integer.toString(this.sleepStatus.amountSleeping())),
-+ net.kyori.adventure.text.minimessage.tag.resolver.Placeholder.parsed("total", Integer.toString(this.sleepStatus.sleepersNeeded(i)))));
-+ } else {
-+ // Purpur end
-+ ichatmutablecomponent = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(i));
-+ }
++ net.kyori.adventure.text.minimessage.tag.resolver.Placeholder.parsed("count", Integer.toString(this.sleepStatus.amountSleeping())),
++ net.kyori.adventure.text.minimessage.tag.resolver.Placeholder.parsed("total", Integer.toString(this.sleepStatus.sleepersNeeded(i)))));
++ } else
++ // Purpur end
++ ichatmutablecomponent = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(i));
+ }
+
-+ for (final ServerPlayer player : this.players) {
-+ player.displayClientMessage(ichatmutablecomponent, true);
++ for (final ServerPlayer entityplayer : this.players) {
++ entityplayer.displayClientMessage(ichatmutablecomponent, true);
}
+ // Plazma end - Remove persist 'isClientSide' flag
}
public void updateSleepingPlayerList() {
-diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index e6001fadc04b63b82e20652bbb16cb1db5cf44bd..ba8ff8f39d3ba39db9c2ce6070cabe33381f4adb 100644
---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
-+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -1014,7 +1014,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
- containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
- }
- // Paper end - Configurable container update tick rate
-- if (!this.level().isClientSide && this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen
-+ if (/*!this.level().isClientSide &&*/ this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen // Plazma - Remove persist 'isClientSide' flag
- this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
- this.containerMenu = this.inventoryMenu;
- }
-@@ -1462,7 +1462,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
- }
- }
- // Purpur end
-- boolean flag = this.server.isDedicatedServer() && this.isPvpAllowed() && source.is(DamageTypeTags.IS_FALL);
-+ boolean flag = this.isPvpAllowed() && source.is(DamageTypeTags.IS_FALL); // Plazma - Remove persist 'isClientSide' flag
-
- if (!flag && this.spawnInvulnerableTime > 0 && !source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) {
- return false;
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
index a8484b9659f175cc20985bf66082616ceb31df4d..abd93a93e6c9367c022259d1ab3895e2764ac702 100644
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -773,19 +759,19 @@ index 7d276c191b391bca24948ddb36b8b7d0f1f03b03..a71c220ea1c464c193029adb1a0d3e5c
protected abstract GameProfile playerProfile();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 91f161d27a45174b6f3c31440eea46ff81185203..ef7bc59e6b340c88a5379f9f4724b1c82bda4ef7 100644
+index 910a346f43dbd0ca8dfec5cb78ffa25caeeb1fa1..d148c2d25341799d26be4e8c3f1ae053e54d2140 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -590,7 +590,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -592,7 +592,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Paper end - Prevent moving into unloaded chunks
- if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
-+ if (d10 - d9 > Math.max(100.0D, Math.pow(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed, 2)) /*&& !this.isSingleplayerOwner()*/) { // Plazma - Remove persist 'isClientSide' flag
++ if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) /*&& !this.isSingleplayerOwner()*/) { // Plazma - Remove persist 'isClientSide' flag
// CraftBukkit end
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
- this.send(new ClientboundMoveVehiclePacket(entity));
-@@ -825,7 +825,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ this.send(ClientboundMoveVehiclePacket.fromEntity(entity));
+@@ -823,7 +823,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async
// CraftBukkit start
@@ -794,7 +780,7 @@ index 91f161d27a45174b6f3c31440eea46ff81185203..ef7bc59e6b340c88a5379f9f4724b1c8
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
return;
}
-@@ -1702,9 +1702,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1756,9 +1756,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private boolean shouldCheckPlayerMovement0(boolean elytra) {
// Plazma end - Add option to bypass moved to quickly check
@@ -806,7 +792,7 @@ index 91f161d27a45174b6f3c31440eea46ff81185203..ef7bc59e6b340c88a5379f9f4724b1c8
return false;
} else {
GameRules gamerules = this.player.serverLevel().getGameRules();
-@@ -2654,7 +2655,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2717,7 +2718,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Spigot end
// this.chatSpamThrottler.increment();
@@ -815,17 +801,16 @@ index 91f161d27a45174b6f3c31440eea46ff81185203..ef7bc59e6b340c88a5379f9f4724b1c8
// CraftBukkit end
this.disconnectAsync((Component) Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause // Paper - add proper async disconnect
}
-@@ -3682,15 +3683,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3738,7 +3739,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
+- if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
++ if (this.player.hasPermissions(2) /*|| this.isSingleplayerOwner()*/) { // Plazma - Remove persist 'isClientSide' flag
// this.server.setDifficulty(packet.getDifficulty(), false); // Paper - per level difficulty; don't allow clients to change this
}
-+ */ // Plazma - Remove persist 'isClientSide' flag
}
-
+@@ -3746,7 +3747,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleLockDifficulty(ServerboundLockDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
@@ -957,7 +942,7 @@ index 653856d0b8dcf2baf4cc77a276f17c8cc1fa717e..1f2958d21c279ecb377b7c90ba643ea8
ProfileLookupCallback profilelookupcallback = new ProfileLookupCallback() {
public void onProfileLookupSucceeded(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 579f81ed04eeb6373b25e6794d3bf0c403891011..e0b70bac3018dc39e6c8e47171060332ec2f63f2 100644
+index 085789778d30b807949384d266b4742288dcb6cd..70bb8a45217b51d3a156aabce32efbca1ae7fcc9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -517,7 +517,7 @@ public abstract class PlayerList {
@@ -1031,7 +1016,7 @@ index 119856b22df5bbcd4e5bf5f95645156f774c6168..809b72d0eb69f21d0d71515259e5e2f9
if (this.forcedAgeTimer % 4 == 0) {
this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);
diff --git a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
-index 7eba7c0e7b8d2795abbe96b3d86a9c1a3b6b74a6..629212c180be71daa0db77f3a247468efadb0608 100644
+index 921527acc8624536f4a48e9fdf7fce370bc52c77..41aee9dca82e842fd173b5fd43a3043a2267e8a2 100644
--- a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
+++ b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
@@ -87,9 +87,9 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
@@ -1046,15 +1031,15 @@ index 7eba7c0e7b8d2795abbe96b3d86a9c1a3b6b74a6..629212c180be71daa0db77f3a247468e
}
-@@ -170,12 +170,14 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
+@@ -170,12 +170,15 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
if (world instanceof ServerLevel worldserver) {
this.serverTick(worldserver);
-- } else {
-+ } /*else { // Plazma - Remove persist 'isClientSide' flag
++ /* // Plazma - Remove persist 'isClientSide' flag
+ } else {
this.clientTick();
- }
+ */ // Plazma - Remove persist 'isClientSide' flag
+ }
}
@@ -1062,7 +1047,7 @@ index 7eba7c0e7b8d2795abbe96b3d86a9c1a3b6b74a6..629212c180be71daa0db77f3a247468e
private void clientTick() {
boolean flag = this.isWaiting();
float f = this.getRadius();
-@@ -215,6 +217,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
+@@ -215,6 +218,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
}
}
@@ -1091,7 +1076,7 @@ index e6cbf4506c75046a89fad778e138b448fb4a29a9..adb30845aaf8f3f0f6ede5b8480ffcdd
protected abstract void updateRenderSubState(boolean shouldLerp, float lerpProgress);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc09b02a333 100644
+index 1717c14e77ab9a26298c6990d45be16d32f3f3e6..78f4ddfefcad7dd9332f1738c76f01b60a704a90 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -581,7 +581,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1103,7 +1088,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
float f = this.getLightLevelDependentMagicValue();
BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow;
-@@ -974,9 +974,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -978,9 +978,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
this.checkBelowWorld();
@@ -1115,35 +1100,44 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
this.firstTick = false;
world = this.level();
-@@ -1263,9 +1263,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1259,7 +1259,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
+
+ this.horizontalCollision = flag || flag1;
+- if (Math.abs(movement.y) > 0.0D || this.isControlledByOrIsLocalPlayer()) {
++ if (Math.abs(movement.y) > 0.0D /*|| this.isControlledByOrIsLocalPlayer()*/) { // Plazma - Remove persist 'isClientSide' flag
+ this.verticalCollision = movement.y != vec3d1.y;
+ this.verticalCollisionBelow = this.verticalCollision && movement.y < 0.0D;
+ this.setOnGroundWithMovement(this.verticalCollisionBelow, this.horizontalCollision, vec3d1);
+@@ -1274,9 +1274,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
BlockPos blockposition = this.getOnPosLegacy();
BlockState iblockdata = this.level().getBlockState(blockposition);
-- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
-+ //if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag
+- if ((!this.level().isClientSide() || this.isControlledByLocalInstance()) && !this.isControlledByClient()) {
++ //if ((!this.level().isClientSide() || this.isControlledByLocalInstance()) && !this.isControlledByClient()) { // Plazma - Remove persist 'isClientSide' flag
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
if (this.isRemoved()) {
gameprofilerfiller.pop();
-@@ -1276,6 +1276,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1287,13 +1287,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
}
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (this.isControlledByLocalInstance()) {
+- if (this.isControlledByLocalInstance()) {
++ //if (this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag
Block block = iblockdata.getBlock();
-@@ -1283,6 +1284,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ if (movement.y != vec3d1.y) {
block.updateEntityMovementAfterFallOn(this.level(), this);
}
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+- }
++ //} // Plazma - Remove persist 'isClientSide' flag
// CraftBukkit start
if (this.horizontalCollision && this.getBukkitEntity() instanceof Vehicle) {
-@@ -1306,13 +1308,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1317,13 +1317,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end
@@ -1159,19 +1153,16 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
float f = this.getBlockSpeedFactor();
-@@ -1442,9 +1444,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1455,7 +1455,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void extinguishFire() {
- if (!this.level().isClientSide && this.wasOnFire) {
-+ //if (!this.level().isClientSide && this.wasOnFire) { // Plazma - Remove persist 'isClientSide' flag
++ if (/*!this.level().isClientSide &&*/ this.wasOnFire) { // Plazma - Remove persist 'isClientSide' flag
this.playEntityOnFireExtinguishedSound();
-- }
-+ //} // Plazma - Remove persist 'isClientSide' flag
+ }
- this.clearFire();
- }
-@@ -3125,7 +3127,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3150,7 +3150,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public InteractionResult interact(Player player, InteractionHand hand) {
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
@@ -1180,16 +1171,16 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur
// CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent
-@@ -3138,7 +3140,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- // CraftBukkit end
- leashable.dropLeash(true, event.isDropLeash()); // Paper - Expand EntityUnleashEvent
+@@ -3168,7 +3168,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ }
+
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
- return InteractionResult.SUCCESS;
+ return InteractionResult.SUCCESS.withoutItem();
}
-@@ -3146,7 +3148,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3176,7 +3176,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
ItemStack itemstack = player.getItemInHand(hand);
if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) {
@@ -1198,7 +1189,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
// CraftBukkit start - fire PlayerLeashEntityEvent
if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
// ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item // Paper - Fix inventory desync
-@@ -3156,7 +3158,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3186,7 +3186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end
leashable.setLeashedTo(player, true);
@@ -1207,7 +1198,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
itemstack.shrink(1);
return InteractionResult.SUCCESS;
-@@ -3228,7 +3230,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3258,7 +3258,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false;
} else if (!entity.couldAcceptPassenger()) {
return false;
@@ -1216,7 +1207,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
return false;
} else {
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
-@@ -3323,7 +3325,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3353,7 +3353,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
List list = Lists.newArrayList(this.passengers);
@@ -1225,31 +1216,28 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
list.add(0, passenger);
} else {
list.add(passenger);
-@@ -3527,20 +3529,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
-
+@@ -3558,17 +3558,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void handleDamageEvent(DamageSource damageSource) {}
-- public void handleEntityEvent(byte status) {
-- switch (status) {
-- case 53:
-- HoneyBlock.showSlideParticles(this);
-- default:
-- }
-- }
-+ public void handleEntityEvent(byte status) {} // Plazma - Remove persist 'isClientSide' flag
+ public void handleEntityEvent(byte status) {
++ /* // Plazma - Remove persist 'isClientSide' flags
+ switch (status) {
+ case 53:
+ HoneyBlock.showSlideParticles(this);
+ default:
+ }
++ */ // Plazma - Remove persist 'isClientSide' flags
+ }
public void animateHurt(float yaw) {}
public boolean isOnFire() {
- boolean flag = this.level() != null && this.level().isClientSide;
-+ // boolean flag = this.level() != null && this.level().isClientSide; // Plazma - Remove persist 'isClientSide' flag
++ boolean flag = this.level() != null; //&& this.level().isClientSide; // Plazma - Remove persist 'isClientSide' flag
-- return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0));
-+ return !this.fireImmune() && (this.remainingFireTicks > 0 /*|| flag && this.getSharedFlag(0)*/); // Plazma - Remove persist 'isClientSide' flag
+ return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0));
}
-
- public boolean isPassenger() {
-@@ -3628,7 +3624,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -3658,7 +3660,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean isCurrentlyGlowing() {
@@ -1258,7 +1246,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
}
public boolean isInvisible() {
-@@ -4395,7 +4391,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4429,7 +4431,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.reapplyPosition();
boolean flag = entitysize1.width() <= 4.0F && entitysize1.height() <= 4.0F;
@@ -1267,7 +1255,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
this.fudgePositionAfterSizeChange(entitysize);
}
-@@ -4665,6 +4661,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4695,6 +4697,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@@ -1275,19 +1263,7 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
public boolean isControlledByOrIsLocalPlayer() {
if (this instanceof Player entityhuman) {
return entityhuman.isLocalPlayer();
-@@ -4682,6 +4679,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- return this.isEffectiveAi();
- }
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
-
- public boolean isControlledByClient() {
- net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger();
-@@ -4689,9 +4687,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- return entityliving != null && entityliving.isControlledByClient();
- }
-
-+ /* // Plazma - Remove persist 'isClientSide' flag
+@@ -4722,6 +4725,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public boolean isEffectiveAi() {
return !this.level().isClientSide;
}
@@ -1296,49 +1272,18 @@ index eaf53f5f4c33ca7a7a988e7bd04b7033e16f9529..99d15d6beed3e3d165e71e0955074cc0
protected static Vec3 getCollisionHorizontalEscapeVector(double vehicleWidth, double passengerWidth, float passengerYaw) {
double d2 = (vehicleWidth + passengerWidth + 9.999999747378752E-6D) / 2.0D;
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index 1d50b03246d114c6583815205eeacb7ac8549aec..2ff0dc3823c1b0c4e2c26fbc7196f420286ed2e9 100644
+index a3ae5e663a0334eaa8ca6ce89c3088620a849bb9..6f61ea24b9e812a92cc5547ee4c4e881ca3d612d 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -577,23 +577,24 @@ public class EntityType implements FeatureElement, EntityTypeT
- }
-
- public static void updateCustomEntityTag(Level world, @Nullable Player player, @Nullable Entity entity, CustomData nbt) {
-- MinecraftServer minecraftserver = world.getServer();
--
-- if (minecraftserver != null && entity != null) {
-- if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
-- // Paper start - filter out protected tags
-- if (player == null || !player.getBukkitEntity().hasPermission("minecraft.nbt.place")) {
-- nbt = nbt.update((compound) -> {
-- for (net.minecraft.commands.arguments.NbtPathArgument.NbtPath tag : world.paperConfig().entities.spawning.filteredEntityTagNbtPaths) {
-- tag.remove(compound);
-- }
-- });
-- }
-- // Paper end - filter out protected tags
-+ MinecraftServer server = world.getServer();
-
-- nbt.loadInto(entity);
-- }
-+ // Plazma start - Remove persist 'isClientSide' flag & Apply some optimizations
-+ if (server == null || entity == null) return;
-+ if (entity.onlyOpCanSetNbt() && (player == null || !server.getPlayerList().isOp(player.getGameProfile()))) return;
-+
-+ // Paper start - filter out protected tags
-+ if (player == null || !player.getBukkitEntity().hasPermission("minecraft.nbt.place")) {
-+ nbt = nbt.update((compound) -> {
-+ for (net.minecraft.commands.arguments.NbtPathArgument.NbtPath tag : world.paperConfig().entities.spawning.filteredEntityTagNbtPaths) {
-+ tag.remove(compound);
-+ }
-+ });
- }
-+ // Paper end - filter out protected tags
-+
-+ nbt.loadInto(entity);
-+ // Plazma end - Remove persist 'isClientSide' flag & Apply some optimizations
- }
-
- public boolean canSerialize() {
+@@ -590,7 +590,7 @@ public class EntityType implements FeatureElement, EntityTypeT
+ EntityType> entitytypes = (EntityType) nbt.parseEntityType(minecraftserver.registryAccess(), Registries.ENTITY_TYPE);
+
+ if (entity.getType() == entitytypes) {
+- if (world.isClientSide || !entity.getType().onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
++ if (/*world.isClientSide ||*/ !entity.getType().onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) { // Plazma - Remove persist 'isClientSide' flag
+ // Paper start - filter out protected tags
+ if (player == null || !player.getBukkitEntity().hasPermission("minecraft.nbt.place")) {
+ nbt = nbt.update((compound) -> {
diff --git a/src/main/java/net/minecraft/world/entity/FlyingMob.java b/src/main/java/net/minecraft/world/entity/FlyingMob.java
index 255f0c078cf931ee0612358900fa73e6c43a9a66..dc0d2c31b0d6624cb8fe8fbc3b0ed0fb45f335b1 100644
--- a/src/main/java/net/minecraft/world/entity/FlyingMob.java
@@ -1362,10 +1307,10 @@ index 255f0c078cf931ee0612358900fa73e6c43a9a66..dc0d2c31b0d6624cb8fe8fbc3b0ed0fb
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Interaction.java b/src/main/java/net/minecraft/world/entity/Interaction.java
-index 221d73676fe2fd240a47cf312c1179e049298cac..bc991efa3d1845642df3741e650aa559c3f6edab 100644
+index c838dc018fad67ae0a9b602a3b477aaea137bca2..764b576e5fd546a23ab498b9593404fb32c1b963 100644
--- a/src/main/java/net/minecraft/world/entity/Interaction.java
+++ b/src/main/java/net/minecraft/world/entity/Interaction.java
-@@ -175,12 +175,14 @@ public class Interaction extends Entity implements Attackable, Targeting {
+@@ -176,12 +176,14 @@ public class Interaction extends Entity implements Attackable, Targeting {
@Override
public InteractionResult interact(Player player, InteractionHand hand) {
@@ -1382,10 +1327,10 @@ index 221d73676fe2fd240a47cf312c1179e049298cac..bc991efa3d1845642df3741e650aa559
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java
-index 5f880a8809f9c20bc8e8c0b2d48590bab02cf077..4b3270614918103703f9a89170004f5ddcba5091 100644
+index 48f89ec0f02b85092d03fddeec961f1eba5d4a2a..b6186f518393e325c276addc4f767c614dc3485a 100644
--- a/src/main/java/net/minecraft/world/entity/Leashable.java
+++ b/src/main/java/net/minecraft/world/entity/Leashable.java
-@@ -276,6 +276,7 @@ public interface Leashable {
+@@ -301,6 +301,7 @@ public interface Leashable {
if (leashable_a == null) {
return null;
} else {
@@ -1393,7 +1338,7 @@ index 5f880a8809f9c20bc8e8c0b2d48590bab02cf077..4b3270614918103703f9a89170004f5d
if (leashable_a.delayedLeashHolderId != 0 && entity.level().isClientSide) {
Entity entity1 = entity.level().getEntity(leashable_a.delayedLeashHolderId);
-@@ -283,6 +284,7 @@ public interface Leashable {
+@@ -308,6 +309,7 @@ public interface Leashable {
leashable_a.setLeashHolder(entity1);
}
}
@@ -1428,10 +1373,10 @@ index 12127b14babf646711d3a118416453c4f1ac1460..447bcaf2a13d0f6f2752de9862ae1276
--this.life;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb4bdb1960 100644
+index 93d4f35841a6d728acb90a49f1a0d35084b4c605..acfd61118d7769c069127d793733b4df5a8f3924 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -460,7 +460,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -458,7 +458,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("livingEntityBaseTick");
@@ -1441,7 +1386,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
@@ -508,7 +508,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- }
+ this.setAirSupply(this.increaseAirSupply(this.getAirSupply()));
}
- if (!this.level().isClientSide && this.isPassenger() && this.getVehicle() != null && this.getVehicle().dismountsUnderwater()) {
@@ -1569,7 +1514,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
-@@ -1918,7 +1919,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1929,7 +1930,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.stopSleeping();
}
@@ -1578,17 +1523,19 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
}
-@@ -2779,9 +2780,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2790,9 +2791,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
case 52:
this.breakItem(this.getItemBySlot(EquipmentSlot.FEET));
break;
-- case 54:
-- HoneyBlock.showJumpParticles(this);
-- break;
++ /* // Plazma - Remove persist 'isClientSide' flags
+ case 54:
+ HoneyBlock.showJumpParticles(this);
+ break;
++ */ // Plazma - Remove persist 'isClientSide' flags
case 55:
this.swapHandItems();
break;
-@@ -3092,7 +3090,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3103,7 +3106,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void travel(Vec3 movementInput) {
@@ -1597,7 +1544,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
FluidState fluid = this.level().getFluidState(this.blockPosition());
if ((this.isInWater() || this.isInLava()) && this.isAffectedByFluids() && !this.canStandOnFluid(fluid)) {
-@@ -3103,7 +3101,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3114,7 +3117,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travelInAir(movementInput);
}
@@ -1606,22 +1553,22 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
private void travelInAir(Vec3 movementInput) {
-@@ -3116,12 +3114,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3127,12 +3130,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (mobeffect != null) {
d0 += (0.05D * (double) (mobeffect.getAmplifier() + 1) - vec3d1.y) * 0.2D;
-+ /* // Plazma - Remove persist 'isClientSide' flag
++ /* // Plazma - Remove persist 'isClientSide' flag
} else if (this.level().isClientSide && !this.level().hasChunkAt(blockposition)) {
if (this.getY() > (double) this.level().getMinY()) {
d0 = -0.1D;
} else {
d0 = 0.0D;
}
-+ */ // Plazma - Remove persist 'isClientSide' flag
++ */ // Plazma - Remove persist 'isClientSide' flag
} else {
d0 -= this.getEffectiveGravity();
}
-@@ -3199,11 +3199,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3210,11 +3215,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.setDeltaMovement(this.updateFallFlyingMovement(vec3d));
this.move(MoverType.SELF, this.getDeltaMovement());
@@ -1635,7 +1582,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
-@@ -3253,12 +3253,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3264,12 +3269,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = this.getRiddenInput(controllingPlayer, movementInput);
this.tickRidden(controllingPlayer, vec3d1);
@@ -1643,15 +1590,15 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
+ //if (this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag
this.setSpeed(this.getRiddenSpeed(controllingPlayer));
this.travel(vec3d1);
-- } else {
-+ /*} else { // Plazma - Remove persist 'isClientSide' flag
++ /* // Plazma - Remove persist 'isClientSide' flag
+ } else {
this.setDeltaMovement(Vec3.ZERO);
-- }
-+ }*/ // Plazma - Remove persist 'isClientSide' flag
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
}
-@@ -3362,7 +3362,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3373,7 +3380,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
super.tick();
this.updatingUsingItem();
this.updateSwimAmount();
@@ -1660,7 +1607,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
int i = this.getArrowCount();
if (i > 0) {
-@@ -3397,7 +3397,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3408,7 +3415,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isSleeping() && !this.checkBedExists()) {
this.stopSleeping();
}
@@ -1669,19 +1616,18 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
if (!this.isRemoved()) {
this.aiStep();
-@@ -3655,9 +3655,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3666,8 +3673,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.lerpSteps > 0) {
this.lerpPositionAndRotationStep(this.lerpSteps, this.lerpX, this.lerpY, this.lerpZ, this.lerpYRot, this.lerpXRot);
--this.lerpSteps;
-- } else if (!this.isEffectiveAi()) {
-+ } /*else if (!this.isEffectiveAi()) { // Plazma - Remove persist 'isClientSide' flag
++ /* // Plazma - Remove persist 'isClientSide' flag
+ } else if (!this.isEffectiveAi()) {
this.setDeltaMovement(this.getDeltaMovement().scale(0.98D));
++ */ // Plazma - Remove persist 'isClientSide' flag
}
-+ */ // Plazma - Remove persist 'isClientSide' flag
if (this.lerpHeadSteps > 0) {
- this.lerpHeadRotationStep(this.lerpHeadSteps, this.lerpYHeadRot);
-@@ -3689,7 +3690,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3700,7 +3709,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.jumping = false;
this.xxa = 0.0F;
this.zza = 0.0F;
@@ -1690,12 +1636,12 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
gameprofilerfiller.push("newAi");
this.serverAiStep();
gameprofilerfiller.pop();
-@@ -3752,14 +3753,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3763,14 +3772,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travel(vec3d1);
}
- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
-+ // if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag
++ //if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag
this.applyEffectsFromBlocks();
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
@@ -1708,7 +1654,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
int i = this.getTicksFrozen();
if (this.isInPowderSnow && this.canFreeze()) {
-@@ -3862,7 +3863,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3873,7 +3882,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void updateFallFlying() {
this.checkSlowFallDistance();
@@ -1717,7 +1663,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
if (!this.canGlide()) {
if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
this.setSharedFlag(7, false);
-@@ -3895,7 +3896,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3906,7 +3915,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.gameEvent(GameEvent.ELYTRA_GLIDE);
}
@@ -1726,7 +1672,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
-@@ -3998,7 +3999,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4009,7 +4018,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.autoSpinAttackTicks = 0;
}
@@ -1735,7 +1681,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
this.setLivingEntityFlag(4, false);
this.autoSpinAttackDmg = 0.0F;
this.autoSpinAttackItemStack = null;
-@@ -4027,7 +4028,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4038,7 +4047,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation
@@ -1744,7 +1690,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
this.dismountVehicle(entity);
}
-@@ -4101,7 +4102,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4112,7 +4121,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void take(Entity item, int count) {
@@ -1753,16 +1699,16 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
((ServerLevel) this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); // Paper - broadcast with collector as source
}
-@@ -4246,7 +4247,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4253,7 +4262,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start - lag compensate eating
// we add 1 to the expected time to avoid lag compensating when we should not
final boolean shouldLagCompensate = this.useItem.has(DataComponents.FOOD) && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1L + this.totalEatTimeTicks) * 50L * (1000L * 1000L));
- if ((--this.useItemRemaining == 0 || shouldLagCompensate) && !this.level().isClientSide && !stack.useOnRelease()) {
-+ if ((--this.useItemRemaining == 0 || shouldLagCompensate) /*&& !this.level().isClientSide*/ && !stack.useOnRelease()) { // Plazma - Remove persist 'isClientSide' flag
++ if ((--this.useItemRemaining == 0 || shouldLagCompensate) && /*!this.level().isClientSide &&*/ !stack.useOnRelease()) { // Plazma - Remove persist 'isClientSide' flag
this.useItemRemaining = 0;
// Paper end - lag compensate eating
this.completeUsingItem();
-@@ -4290,11 +4291,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4297,15 +4306,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.useItemRemaining = this.totalEatTimeTicks = itemstack.getUseDuration(this);
this.eatStartTime = System.nanoTime();
// Paper end - lag compensate eating
@@ -1776,123 +1722,38 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
}
}
-@@ -4302,6 +4303,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+
++ /* // Plazma - Remove persist 'isClientSide' flag
@Override
public void onSyncedDataUpdated(EntityDataAccessor> data) {
super.onSyncedDataUpdated(data);
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (LivingEntity.SLEEPING_POS_ID.equals(data)) {
- if (this.level().isClientSide) {
- this.getSleepingPos().ifPresent(this::setPosToBed);
-@@ -4320,6 +4322,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- // Paper end - lag compensate eating
- }
+@@ -4329,6 +4339,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
-+ */ // Plazma - Remove persist 'isClientSide' flag
}
++ */ // Plazma - Remove persist 'isClientSide' flag
-@@ -4354,61 +4357,52 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ @Override
+ public void lookAt(EntityAnchorArgument.Anchor anchorPoint, Vec3 target) {
+@@ -4361,7 +4372,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void completeUsingItem() {
- if (!this.level().isClientSide || this.isUsingItem()) {
-- InteractionHand enumhand = this.getUsedItemHand();
-+ // Plazma start - Remove persist 'isClientSide' flag & Apply some optimizations
-+ InteractionHand enumhand = this.getUsedItemHand();
-
-- if (!this.useItem.equals(this.getItemInHand(enumhand))) {
-- this.releaseUsingItem();
-- } else {
-- if (!this.useItem.isEmpty() && this.isUsingItem()) {
-- this.startUsingItem(this.getUsedItemHand(), true); // Paper - Prevent consuming the wrong itemstack
-- // CraftBukkit start - fire PlayerItemConsumeEvent
-- ItemStack itemstack;
-- PlayerItemConsumeEvent event = null; // Paper
-- if (this instanceof ServerPlayer entityPlayer) {
-- org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem);
-- org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand);
-- event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); // Paper
-- this.level().getCraftServer().getPluginManager().callEvent(event);
-+ if (!this.useItem.equals(this.getItemInHand(enumhand))) {
-+ this.releaseUsingItem();
-+ return;
-+ }
-
-- if (event.isCancelled()) {
-- // Update client
-- Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE);
-- if (consumable != null) {
-- consumable.cancelUsingItem(entityPlayer, this.useItem);
-- }
-- entityPlayer.getBukkitEntity().updateInventory();
-- entityPlayer.getBukkitEntity().updateScaledHealth();
-- this.stopUsingItem(); // Paper - event is using an item, clear active item to reset its use
-- return;
-- }
-+ if (this.useItem.isEmpty() || !this.isUsingItem()) return;
-
-- itemstack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this);
-- } else {
-- itemstack = this.useItem.finishUsingItem(this.level(), this);
-- }
-- // Paper start - save the default replacement item and change it if necessary
-- final ItemStack defaultReplacement = itemstack;
-- if (event != null && event.getReplacement() != null) {
-- itemstack = CraftItemStack.asNMSCopy(event.getReplacement());
-- }
-- // Paper end
-- // CraftBukkit end
-+ this.startUsingItem(this.getUsedItemHand(), true); // Paper - Prevent consuming the wrong itemstack
++ //if (!this.level().isClientSide || this.isUsingItem()) { // Plazma - Remove persist 'isClientSide' flag
+ InteractionHand enumhand = this.getUsedItemHand();
-- if (itemstack != this.useItem) {
-- this.setItemInHand(enumhand, itemstack);
-- }
-+ // CraftBukkit start - fire PlayerItemConsumeEvent
-+ ItemStack itemstack;
-+ PlayerItemConsumeEvent event = null; // Paper
-+ if (this instanceof ServerPlayer player) {
-+ org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem);
-+ org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand);
-
-- this.stopUsingItem();
-- // Paper start
-- if (this instanceof ServerPlayer) {
-- ((ServerPlayer) this).getBukkitEntity().updateInventory();
-- }
-- // Paper end
-- }
-+ event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); // Paper
-+ this.level().getCraftServer().getPluginManager().callEvent(event);
+ if (!this.useItem.equals(this.getItemInHand(enumhand))) {
+@@ -4415,7 +4426,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ }
-+ if (event.isCancelled()) {
-+ // Update client
-+ Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE);
-+ if (consumable != null) consumable.cancelUsingItem(player, this.useItem);
-+
-+ player.getBukkitEntity().updateInventory();
-+ player.getBukkitEntity().updateScaledHealth();
-+ this.stopUsingItem(); // Paper - event is using an item, clear active item to reset its use
-+ return;
}
-+
-+ itemstack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this);
-+ } else {
-+ itemstack = this.useItem.finishUsingItem(this.level(), this);
- }
-+
-+ if (event != null && event.getReplacement() != null) itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); // Paper
-+ // CraftBukkit end
-+
-+ if (itemstack != this.useItem) this.setItemInHand(enumhand, itemstack);
-+ this.stopUsingItem();
-+
-+ if (this instanceof ServerPlayer player) player.getBukkitEntity().updateInventory(); // Paper
-+ // Plazma end - Remove persist 'isClientSide' flag & Apply some optimizations
+- }
++ //} // Plazma - Remove persist 'isClientSide' flag
}
public void handleExtraItemsCreatedOnUse(ItemStack stack) {}
-@@ -4438,14 +4432,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4445,14 +4456,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void stopUsingItem() {
@@ -1909,7 +1770,7 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
this.useItem = ItemStack.EMPTY;
// Paper start - lag compensate eating
-@@ -4883,7 +4877,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4890,7 +4901,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public boolean isCurrentlyGlowing() {
@@ -1919,10 +1780,10 @@ index 02288d8f3521756770351c02f623f9db02efd40c..05f5932b771cef2739f9effb9993c3cb
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 331a75fee26e3fe2532e8661db282a0c207ddf9b..997c5b3deed7c55e5685fba76bcbb53e10e66d9f 100644
+index f7e360df2e26c34d8cc17b35c116df425202a054..dd82dbb3eca667d54eabe1f284bd3d0318a7fe0d 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -444,11 +444,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -440,11 +440,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
}
public void spawnAnim() {
@@ -1937,7 +1798,7 @@ index 331a75fee26e3fe2532e8661db282a0c207ddf9b..997c5b3deed7c55e5685fba76bcbb53e
}
-@@ -465,7 +467,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -461,7 +463,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
public void tick() {
super.tick();
@@ -1946,7 +1807,16 @@ index 331a75fee26e3fe2532e8661db282a0c207ddf9b..997c5b3deed7c55e5685fba76bcbb53e
this.updateControlFlags();
}
-@@ -1678,10 +1680,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+@@ -478,7 +480,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
+
+ @Override
+ protected float tickHeadTurn(float bodyRotation, float headRotation) {
+- this.bodyRotationControl.clientTick();
++ //this.bodyRotationControl.clientTick(); // Plazma - Remove persist 'isClientSide' flag
+ return headRotation;
+ }
+
+@@ -1681,10 +1683,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
return flag1;
}
@@ -1959,6 +1829,26 @@ index 331a75fee26e3fe2532e8661db282a0c207ddf9b..997c5b3deed7c55e5685fba76bcbb53e
public void setNoAi(boolean aiDisabled) {
byte b0 = (Byte) this.entityData.get(Mob.DATA_MOB_FLAGS_ID);
+diff --git a/src/main/java/net/minecraft/world/entity/ai/control/BodyRotationControl.java b/src/main/java/net/minecraft/world/entity/ai/control/BodyRotationControl.java
+index 1f610b598d4985dda2b71a407f0090c57875554d..46f53c0546485d6a312b853df4d3ffa8798be583 100644
+--- a/src/main/java/net/minecraft/world/entity/ai/control/BodyRotationControl.java
++++ b/src/main/java/net/minecraft/world/entity/ai/control/BodyRotationControl.java
+@@ -15,6 +15,7 @@ public class BodyRotationControl implements Control {
+ this.mob = entity;
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ public void clientTick() {
+ if (this.isMoving()) {
+ this.mob.yBodyRot = this.mob.getYRot();
+@@ -36,6 +37,7 @@ public class BodyRotationControl implements Control {
+ }
+ }
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ private void rotateBodyIfNecessary() {
+ this.mob.yBodyRot = Mth.rotateIfNecessary(this.mob.yBodyRot, this.mob.yHeadRot, (float)this.mob.getMaxHeadYRot());
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
index 771bb96032149a8573d1de14fa2ab19012c82000..f268c787d6ecef639633fbc7a36676fd184ae7cd 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
@@ -2049,10 +1939,10 @@ index 9987d28ea145f6d0126cb4ea22001e0922fb51bd..45663e0d5ee361972b6c3ed9d3c8c294
return super.mobInteract(player, hand);
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index dc8df0912c1d18176e18a8f4dc43c4f60f81b659..6dec1720aea724baab541e26e14c9fa0646abdbf 100644
+index bfe3c1d587f129013de108b8fb31293b0386a44a..dc4231375730357f6b6d7f902a71b0a593a34a8e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -576,7 +576,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -580,7 +580,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public void aiStep() {
super.aiStep();
@@ -2061,7 +1951,7 @@ index dc8df0912c1d18176e18a8f4dc43c4f60f81b659..6dec1720aea724baab541e26e14c9fa0
if (this.stayOutOfHiveCountdown > 0) {
--this.stayOutOfHiveCountdown;
}
-@@ -595,7 +595,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -599,7 +599,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
if (this.tickCount % 20 == 0 && !this.isHiveValid()) {
this.hivePos = null;
}
@@ -2070,6 +1960,18 @@ index dc8df0912c1d18176e18a8f4dc43c4f60f81b659..6dec1720aea724baab541e26e14c9fa0
}
+@@ -707,9 +707,9 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+
+ if (mobeffect != null) {
+ this.usePlayerItem(player, hand, itemstack);
+- if (!this.level().isClientSide) {
++ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flags
+ this.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause
+- }
++ //} // Plazma - Remove persist 'isClientSide' flags
+
+ return InteractionResult.SUCCESS;
+ }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
index 4eca5996a867086be22d22d99db81ab001467516..dff6c0615defa87e7b4e01c0df2d0a5fdeb7ecbb 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
@@ -2087,10 +1989,10 @@ index 4eca5996a867086be22d22d99db81ab001467516..dff6c0615defa87e7b4e01c0df2d0a5f
entity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
return Optional.of(InteractionResult.SUCCESS);
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
-index 4aad4fdc80070f4000e929fff126714fc67050b0..721e450242a36b2c0998a78fa86a1cc40dcc9ee6 100644
+index a418ded306908ee9cb9e375104354a6e031305c9..a81470adae2e0eaf6b647370a34c1b554be8c546 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
-@@ -451,22 +451,22 @@ public class Cat extends TamableAnimal implements VariantHolder {
@@ -2182,35 +2084,20 @@ index ac044be03494c3d6bad6bbc22321445e04d430cc..f25ce3f42157d7303304c39e3b990f66
@Override
public void aiStep() {
- if (!this.level().isClientSide && this.isAlive() && this.isEffectiveAi()) {
-+ if (/*!this.level().isClientSide &&*/ this.isAlive() /*&& this.isEffectiveAi()*/) { // Plazma - Remove persist 'isClientSide' flag
++ if (this.isAlive()) { // Plazma - Remove persist 'isClientSide' flag
++this.ticksSinceEaten;
ItemStack itemstack = this.getItemBySlot(EquipmentSlot.MAINHAND);
-@@ -559,14 +559,16 @@ public class Fox extends Animal implements VariantHolder {
+@@ -559,7 +559,7 @@ public class Fox extends Animal implements VariantHolder {
}
private void spitOutItem(ItemStack stack) {
- if (!stack.isEmpty() && !this.level().isClientSide) {
-- ItemEntity entityitem = new ItemEntity(this.level(), this.getX() + this.getLookAngle().x, this.getY() + 1.0D, this.getZ() + this.getLookAngle().z, stack);
-+ // Plazma start - Remove persist 'isClientSide' flag & Apply some optimizations
-+ if (stack.isEmpty()) return;
++ if (!stack.isEmpty() /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag
+ ItemEntity entityitem = new ItemEntity(this.level(), this.getX() + this.getLookAngle().x, this.getY() + 1.0D, this.getZ() + this.getLookAngle().z, stack);
-- entityitem.setPickUpDelay(40);
-- entityitem.setThrower(this);
-- this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
-- this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), entityitem); // Paper - Call EntityDropItemEvent
-- }
-+ ItemEntity entityitem = new ItemEntity(this.level(), this.getX() + this.getLookAngle().x, this.getY() + 1.0D, this.getZ() + this.getLookAngle().z, stack);
-+
-+ entityitem.setPickUpDelay(40);
-+ entityitem.setThrower(this);
-+ this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
-+ this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), entityitem); // Paper - Call EntityDropItemEvent
-+ // Plazma - Remove persist 'isClientSide' flag & Apply some optimizations
- }
-
- private void dropItemStack(ItemStack stack) {
-@@ -601,7 +603,7 @@ public class Fox extends Animal implements VariantHolder {
+ entityitem.setPickUpDelay(40);
+@@ -601,7 +601,7 @@ public class Fox extends Animal implements VariantHolder {
@Override
public void tick() {
super.tick();
@@ -2219,7 +2106,7 @@ index ac044be03494c3d6bad6bbc22321445e04d430cc..f25ce3f42157d7303304c39e3b990f66
boolean flag = this.isInWater();
if (flag || this.getTarget() != null || this.level().isThundering()) {
-@@ -618,7 +620,7 @@ public class Fox extends Animal implements VariantHolder {
+@@ -618,7 +618,7 @@ public class Fox extends Animal implements VariantHolder {
this.level().levelEvent(2001, blockposition, Block.getId(iblockdata));
}
@@ -2352,10 +2239,10 @@ index 83372c86bd54eedd9b136ddfcbfc67d303058c0a..2df413fce51db6360c2a55fde7206113
private boolean canFindBamboo() {
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
-index 28a9d267099f6c24f71dc5a11179d59c27265a88..a0a55f1da46f8e9be4e2a776678333eb5f8e42f6 100644
+index f14fe1c299e6ef5cf55bde617ff9fe6aca08702f..963c2158fb5fd8396bcfbb8ac3a4f761719d5d62 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
-@@ -329,22 +329,22 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder {
@@ -2470,10 +2357,10 @@ index b3a0146ccfcda9fa33b91d33458086b510bb4d7b..034dec437d6a6df5664185de77245bd1
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Sheep.java b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
-index 38f651ab5f8e25e6d653a86dcb9875990651542a..0503f936d0d7194f110069adabff984f51af0a3a 100644
+index 8ce4edbd7df3199133d9843780d028e8a8f020e2..f3c7422cbc63695c54f1038e155dedc268995c06 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
-@@ -157,6 +157,7 @@ public class Sheep extends Animal implements Shearable {
+@@ -150,6 +150,7 @@ public class Sheep extends Animal implements Shearable {
super.customServerAiStep(world);
}
@@ -2481,7 +2368,7 @@ index 38f651ab5f8e25e6d653a86dcb9875990651542a..0503f936d0d7194f110069adabff984f
@Override
public void aiStep() {
if (this.level().isClientSide) {
-@@ -165,6 +166,7 @@ public class Sheep extends Animal implements Shearable {
+@@ -158,6 +159,7 @@ public class Sheep extends Animal implements Shearable {
super.aiStep();
}
@@ -2490,7 +2377,7 @@ index 38f651ab5f8e25e6d653a86dcb9875990651542a..0503f936d0d7194f110069adabff984f
public static AttributeSupplier.Builder createAttributes() {
return Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 8.0D).add(Attributes.MOVEMENT_SPEED, 0.23000000417232513D);
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
-index 36a56553702fa6e4a2ac92b3639c210c94faee73..012c2dafb5a4fc420a7fec58b472374b933c0ded 100644
+index 3ba2e4954e6c2809804f7b8ceb04dae56bb7c2ba..950b1f011ac330ffd8b56aa92eaad35f65818bc0 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
@@ -168,16 +168,18 @@ public class Squid extends AgeableWaterCreature {
@@ -2581,7 +2468,7 @@ index c9e307452a097329c26893673055cfb72a43e4c7..388c0068905e2ad138d5125ba17734b1
this.move(MoverType.SELF, this.getDeltaMovement());
this.setDeltaMovement(this.getDeltaMovement().scale(0.9D));
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
-index 420345f130a40c4f59a021a4bdce3e218dc87cde..14d3e09e8eca665d186f5d356158052b118c6848 100644
+index 15b655fa1d483e8e4154b7cdbb5338f134ab1741..1be6773df34eeb8bbc9cb0dc5349a53f3369e089 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
@@ -370,16 +370,16 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder> {
@@ -3018,7 +2933,7 @@ index 8401c7ae749f6300281cbd6b2bfc77f03d5eb9ea..818aa1e29392321533c0eb83b953a123
if (flag && !this.isSilent()) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
-index 1d765ad53a9d8dd388106bc0cb02f4919a1f8173..40437c169a06c7dbf4950afcb575dec8adef33fa 100644
+index cb881211f948b21ea03364373376e894cd6ed5cc..e3415556c21bdad06f69d20e99c6f7e05d975d8c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java
@@ -138,9 +138,9 @@ public class TraderLlama extends Llama {
@@ -3065,7 +2980,7 @@ index 0bc7856065fdc599890f18f5a4e2f6c2b3d94ba7..a108cba43a7272f53cd53b885dc03874
@Override
protected void playStepSound(BlockPos pos, BlockState state) {
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-index c9e3bb91ff506a35551a58f469ad2849e6058668..d779f62ef6cd4f396225317b24c601e0536a9a94 100644
+index eff4424fa9cbea4358c8d8cd4d20c53182f5179e..b6835fd62ee3260d853757a27aabffebcc6ca298 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -221,6 +221,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -3112,18 +3027,22 @@ index c9e3bb91ff506a35551a58f469ad2849e6058668..d779f62ef6cd4f396225317b24c601e0
this.yBodyRot = this.getYRot();
Vec3[] avec3d = new Vec3[this.subEntities.length];
-@@ -1132,9 +1136,11 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -1144,6 +1148,7 @@ public class EnderDragon extends Mob implements Enemy {
+ this.phaseManager.getCurrentPhase().onCrystalDestroyed(crystal, pos, source, entityhuman);
+ }
++ /* // Plazma - Remove persist 'isClientSide' flag
@Override
public void onSyncedDataUpdated(EntityDataAccessor> data) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
if (EnderDragon.DATA_PHASE.equals(data) && this.level().isClientSide) {
- this.phaseManager.setPhase(EnderDragonPhase.getById((Integer) this.getEntityData().get(EnderDragon.DATA_PHASE)));
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+@@ -1152,6 +1157,7 @@ public class EnderDragon extends Mob implements Enemy {
super.onSyncedDataUpdated(data);
}
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public EnderDragonPhaseManager getPhaseManager() {
+ return this.phaseManager;
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java
index 5ed84f4199698dfe41abd7b9fc804bc3419078ef..e17304fd16632d2f478cf89f90ca2da3537fefd8 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java
@@ -3144,10 +3063,10 @@ index 5ed84f4199698dfe41abd7b9fc804bc3419078ef..e17304fd16632d2f478cf89f90ca2da3
}
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 5e134b3cf939fe396c060797883613812ad73c31..05fb8b26369f7703c6a97f1764a71bd4c3fe1058 100644
+index a671d18a354421f197e5248a16bfe9a12c5befe4..6f756f6f36b4aba5379df1780e8c6bab8873624c 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -321,7 +321,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -320,7 +320,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
public void aiStep() {
Vec3 vec3d = this.getDeltaMovement().multiply(1.0D, 0.6D, 1.0D);
@@ -3203,7 +3122,7 @@ index 037586c0fdb42a02660aba89dd741a647c67e52b..6230b5acc495b998e508a937d1e4c388
@Override
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
-index bd5e034ce58ebe53d2121209d76ae60134ce72fe..27f7a0abf77e94f15ff5f42e54e979377c94e63c 100644
+index fd1bd4fb88d1bd4a0734db463dc1be640c736d34..ad3f17ee59e2508886551204b87d95482ce9b100 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -419,7 +419,7 @@ public class ItemFrame extends HangingEntity {
@@ -3215,157 +3134,39 @@ index bd5e034ce58ebe53d2121209d76ae60134ce72fe..27f7a0abf77e94f15ff5f42e54e97937
if (!flag) {
if (flag1 && !this.isRemoved()) {
MapItemSavedData worldmap = MapItem.getSavedData(itemstack, this.level());
-@@ -454,9 +454,9 @@ public class ItemFrame extends HangingEntity {
+@@ -454,8 +454,10 @@ public class ItemFrame extends HangingEntity {
this.gameEvent(GameEvent.BLOCK_CHANGE, player);
return InteractionResult.SUCCESS;
}
-- } else {
-+ } /*else { // Plazma - Remove persist 'isClientSide' flag
++ /* // Plazma - Remove persist 'isClientSide' flag
+ } else {
return (InteractionResult) (!flag && !flag1 ? InteractionResult.PASS : InteractionResult.SUCCESS);
-- }
-+ }*/ // Plazma - Remove persist 'isClientSide' flag
++ */ // Plazma - Remove persist 'isClientSide' flag
+ }
}
- public SoundEvent getRotateItemSound() {
diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
-index d3a7953a3f42a0020342845e9107c6991637b050..650af7be38e9ba8e81ac991689ffa0a444e7f94b 100644
+index d06ec03ad16630f2dfd81cf9f32542bd1c2592de..637d307c6bdd8e21cb479981d3941656f6d0c41c 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
-@@ -75,80 +75,72 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity {
+@@ -75,9 +75,11 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity {
@Override
public InteractionResult interact(Player player, InteractionHand hand) {
-- if (this.level().isClientSide) {
-- return InteractionResult.SUCCESS;
-- } else {
-- boolean flag = false;
-- List list = LeadItem.leashableInArea(this.level(), this.getPos(), (leashable) -> {
-- Entity entity = leashable.getLeashHolder();
--
-- return entity == player || entity == this;
-- });
-- Iterator iterator = list.iterator();
--
-- while (iterator.hasNext()) {
-- Leashable leashable = (Leashable) iterator.next();
--
-- if (leashable.getLeashHolder() == player) {
-- // CraftBukkit start
-- if (leashable instanceof Entity leashed) {
-- if (CraftEventFactory.callPlayerLeashEntityEvent(leashed, this, player, hand).isCancelled()) {
-- ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder()));
-- flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities
-- continue;
-- }
-- }
-- // CraftBukkit end
-- leashable.setLeashedTo(this, true);
-- flag = true;
-- }
-+ // Plazma start - Remove persist 'isClientSide' flag & Apply some optimizations
-+ boolean flag = false;
-+ List list = LeadItem.leashableInArea(this.level(), this.getPos(), (leashable) -> {
-+ Entity entity = leashable.getLeashHolder();
-+
-+ return entity == player || entity == this;
-+ });
-+
-+ Iterator iterator = list.iterator();
-+ while (iterator.hasNext()) {
-+ Leashable leashable = (Leashable) iterator.next();
-+
-+ if (leashable.getLeashHolder() != player) continue;
-+
-+ // CraftBukkit start
-+ if (leashable instanceof Entity entity && CraftEventFactory.callPlayerLeashEntityEvent(entity, this, player, hand).isCancelled()) {
-+ ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder()));
-+ flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities
-+ continue;
- }
-+ // CraftBukkit end
-
-- boolean flag1 = false;
-+ leashable.setLeashedTo(this, true);
-+ flag = true;
-+ }
-
-- if (!flag) {
-- // CraftBukkit start - Move below
-- // this.discard();
-- boolean die = true;
-- // CraftBukkit end
-- if (true || player.getAbilities().instabuild) { // CraftBukkit - Process for non-creative as well
-- Iterator iterator1 = list.iterator();
--
-- while (iterator1.hasNext()) {
-- Leashable leashable1 = (Leashable) iterator1.next();
--
-- if (leashable1.isLeashed() && leashable1.getLeashHolder() == this) {
-- // CraftBukkit start
-- boolean dropLeash = !player.hasInfiniteMaterials();
-- if (leashable1 instanceof Entity leashed) {
-- // Paper start - Expand EntityUnleashEvent
-- org.bukkit.event.player.PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(leashed, player, hand, dropLeash);
-- dropLeash = event.isDropLeash();
-- if (event.isCancelled()) {
-- // Paper end - Expand EntityUnleashEvent
-- die = false;
-- continue;
-- }
-- }
-- leashable1.dropLeash(true, dropLeash); // false -> survival mode boolean // Paper - Expand EntityUnleashEvent
-- // CraftBukkit end
-- flag1 = true;
-- }
-- }
-- // CraftBukkit start
-- if (die) {
-- this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
-+ boolean flag1 = false;
-+ if (!flag) {
-+ // CraftBukkit start - Move below
-+ // this.discard();
-+ boolean die = true;
-+ // CraftBukkit end
-+
-+ Iterator iterator1 = list.iterator();
-+ while (iterator1.hasNext()) {
-+ Leashable leashable = (Leashable) iterator1.next();
-+
-+ if (!leashable.isLeashed() || leashable.getLeashHolder() != this) continue;
-+
-+ // CraftBukkit start
-+ boolean dropLeash = !player.hasInfiniteMaterials();
-+ if (leashable instanceof Entity entity) {
-+ // Paper start - Expand EntityUnleashEvent
-+ org.bukkit.event.player.PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(entity, player, hand, dropLeash);
-+ if (event.isCancelled()) {
-+ die = false;
-+ continue;
- }
-- // CraftBukkit end
-+
-+ dropLeash = event.isDropLeash();
-+ // Paper end - Expand EntityUnleashEvent
- }
-- }
-
-- if (flag || flag1) {
-- this.gameEvent(GameEvent.BLOCK_ATTACH, player);
-+ leashable.dropLeash(true, dropLeash); // false -> survival mode boolean // Paper - Expand EntityUnleashEvent
-+ // CraftBukkit end
-+
-+ flag1 = true;
++ /* // Plazma - Remove persist 'isClientSide' flag
+ if (this.level().isClientSide) {
+ return InteractionResult.SUCCESS;
+ } else {
++ */ // Plazma - Remove persist 'isClientSide' flag
+ boolean flag = false;
+ List list = LeadItem.leashableInArea(this.level(), this.getPos(), (leashable) -> {
+ Entity entity = leashable.getLeashHolder();
+@@ -152,7 +154,7 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity {
}
-- return InteractionResult.SUCCESS;
-+ if (die) this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
- }
-+
-+ if (flag || flag1) this.gameEvent(GameEvent.BLOCK_ATTACH, player);
-+
-+ return InteractionResult.SUCCESS;
-+ // Plazma end - Remove persist 'isClientSide' flag
+ return InteractionResult.SUCCESS;
+- }
++ //} // Plazma - Remove persist 'isClientSide' flag
}
@Override
@@ -3588,7 +3389,7 @@ index c63cf322e0d00b5ec9929db8c22d4a392049160f..8c5dff4e24c1366d583ba9c7c2c15ea1
}
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-index 287ba483614e79e78022e703ef891f59f41ac455..1273d5027d806f655e7c5e2d65b7a8e0182de185 100644
+index 6f1e21d6c104d71fe4fc3376ed2f2273a5f3d3cc..55d84e4c1277a3446e917b3e3e39a55c9d130f35 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -123,16 +123,18 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@@ -3613,10 +3414,10 @@ index 287ba483614e79e78022e703ef891f59f41ac455..1273d5027d806f655e7c5e2d65b7a8e0
// Paper start - Option to prevent TNT from moving in water
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-index 39d02cf0e31832e30c4f034b0b5385e3e0057e60..41c6b60a9d0210b7f2c660cc03999be9c9bc344e 100644
+index 0235488faee8078186fbb78038789da0846aca29..89c1dd7dd76aa89f74bbf680a2bdb94d6528cf08 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-@@ -148,7 +148,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -150,7 +150,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
}
public void reassessWeaponGoal() {
@@ -3625,7 +3426,7 @@ index 39d02cf0e31832e30c4f034b0b5385e3e0057e60..41c6b60a9d0210b7f2c660cc03999be9
this.goalSelector.removeGoal(this.meleeGoal);
this.goalSelector.removeGoal(this.bowGoal);
ItemStack itemstack = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW));
-@@ -236,9 +236,9 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -243,9 +243,9 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@Override
public void setItemSlot(EquipmentSlot slot, ItemStack stack, boolean silent) { // Paper - Fix silent equipment change
super.setItemSlot(slot, stack, silent); // Paper - Fix silent equipment change
@@ -3680,10 +3481,10 @@ index 38cbe2fce9c36195aa9bea2af26d14364b216825..3b2560ee1bb8c415eada619fc057d35c
return InteractionResult.SUCCESS;
} else {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-index 949207eda199c874f2f14074b5a4fff5462b86b9..19bc362ff8e28cd0e26ba357dda425bac24c5a56 100644
+index a28a4cd9544ffa58bd03ac901a761c797044629a..38cf26247c80430401b814b57a8eed6805caa614 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-@@ -279,7 +279,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -276,7 +276,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@Override
public void travel(Vec3 movementInput) {
@@ -3692,7 +3493,7 @@ index 949207eda199c874f2f14074b5a4fff5462b86b9..19bc362ff8e28cd0e26ba357dda425ba
this.moveRelative(0.01F, movementInput);
this.move(MoverType.SELF, this.getDeltaMovement());
this.setDeltaMovement(this.getDeltaMovement().scale(0.9));
-@@ -290,15 +290,15 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -287,15 +287,15 @@ public class Drowned extends Zombie implements RangedAttackMob {
@Override
public void updateSwimming() {
@@ -3712,22 +3513,26 @@ index 949207eda199c874f2f14074b5a4fff5462b86b9..19bc362ff8e28cd0e26ba357dda425ba
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-index 476aaa0d9899eb56ea29b1fcf15565b58f78479d..d57f6b312341f6d83788bbb294cc65ee47361373 100644
+index 881b85506cbff22febe0c1cd0d30822be5c2a517..fdc7c13e83bdaf63f1f4561921dd9146ba0ec8d8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-@@ -228,9 +228,11 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -225,6 +225,7 @@ public class EnderMan extends Monster implements NeutralMob {
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
@Override
public void onSyncedDataUpdated(EntityDataAccessor> data) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
if (EnderMan.DATA_CREEPY.equals(data) && this.hasBeenStaredAt() && this.level().isClientSide) {
- this.playStareSound();
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+@@ -233,6 +234,7 @@ public class EnderMan extends Monster implements NeutralMob {
super.onSyncedDataUpdated(data);
}
-@@ -277,16 +279,18 @@ public class EnderMan extends Monster implements NeutralMob {
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ @Override
+ public void addAdditionalSaveData(CompoundTag nbt) {
+@@ -276,16 +278,18 @@ public class EnderMan extends Monster implements NeutralMob {
@Override
public void aiStep() {
@@ -3748,7 +3553,7 @@ index 476aaa0d9899eb56ea29b1fcf15565b58f78479d..d57f6b312341f6d83788bbb294cc65ee
super.aiStep();
}
-@@ -311,7 +315,7 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -310,7 +314,7 @@ public class EnderMan extends Monster implements NeutralMob {
}
public boolean teleport() {
@@ -3863,7 +3668,7 @@ index 63caf20256a3deae98b9cd9f54650def172f0e57..ccb32a521160ffaf45b947422819629d
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
-index cda6cb5b10b895bab48d2212f259ba4ca40e1ed6..80647c433bd94450db2b6d48d6d5b952a8dd9a6c 100644
+index 23ca324c5379f9735232a9f74071117da23c2290..c043e4d0e782b92ef4e46fb0a74e213505f731b2 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -232,6 +232,7 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -3882,11 +3687,25 @@ index cda6cb5b10b895bab48d2212f259ba4ca40e1ed6..80647c433bd94450db2b6d48d6d5b952
if (level().purpurConfig.phantomFlamesOnSwoop && attackPhase == AttackPhase.SWOOP) shoot(); // Purpur
}
+@@ -582,11 +584,13 @@ public class Phantom extends FlyingMob implements Enemy {
+ super(entity);
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ @Override
+ public void clientTick() {
+ Phantom.this.yHeadRot = Phantom.this.yBodyRot;
+ Phantom.this.yBodyRot = Phantom.this.getYRot();
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+ }
+
+ private class PhantomAttackStrategyGoal extends Goal {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-index 98c1934b4895a86cd8748edf906aaa721a87a123..991d3eb79770c5809e92768bc8e51d42aab69e2e 100644
+index 17aaa3f376ce6183911739536206f9f701e452b5..c9da833c8e4d670b33703ce9e08248d34ecf22e7 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-@@ -57,7 +57,7 @@ public class Ravager extends Raider {
+@@ -55,7 +55,7 @@ public class Ravager extends Raider {
return Ravager.ROAR_TARGET_WITH_GRIEFING.test(entity) && !entity.getType().equals(EntityType.ARMOR_STAND);
};
private static final Predicate ROAR_TARGET_ON_CLIENT = (entityliving) -> {
@@ -3896,7 +3715,7 @@ index 98c1934b4895a86cd8748edf906aaa721a87a123..991d3eb79770c5809e92768bc8e51d42
private static final double BASE_MOVEMENT_SPEED = 0.3D;
private static final double ATTACK_MOVEMENT_SPEED = 0.35D;
diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
-index e3fefd52c83079fe3eab1a96dd81a183f718192b..2282b7d57a14c16f65afae7d084f0d42a6078165 100644
+index b940cb26de3852e2127ccdd1f6c067123a909c25..ccd8743908b3161341b4b787107b0ec03d4a55da 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
@@ -229,7 +229,7 @@ public class Shulker extends AbstractGolem implements VariantHolder data) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
if (Strider.DATA_BOOST_TIME.equals(data) && this.level().isClientSide) {
- this.steering.onSynced();
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+@@ -148,6 +149,7 @@ public class Strider extends Animal implements ItemSteerable, Saddleable {
super.onSyncedDataUpdated(data);
}
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ @Override
+ protected void defineSynchedData(SynchedEntityData.Builder builder) {
@@ -502,9 +504,9 @@ public class Strider extends Animal implements ItemSteerable, Saddleable {
// Purpur end
@@ -4164,7 +3997,7 @@ index 85b03e0bf7436cb846df13c575ad78ac6a17a151..6628efb0ec59e68810152a64309bc5f6
--this.conversionTime; // Paper - remove anti tick skipping measures / wall time
if (this.conversionTime < 0) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
-index 6f6b32bf7f68d05e4173c31f2e631a409b858a05..27f1eaa5e7d11a6aae3f2af07942dbcee60d5216 100644
+index cd66ef1d99f3ce4533c2423fd12b2fcadf481a66..399308324634c51cd90999aeafa756ddaf85e51a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -207,7 +207,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -4189,88 +4022,58 @@ index 6f6b32bf7f68d05e4173c31f2e631a409b858a05..27f1eaa5e7d11a6aae3f2af07942dbce
return InteractionResult.SUCCESS_SERVER;
} else {
diff --git a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
-index 489644b66266257828fd216e4298bd6d33f7777b..2e39c65304fff182ee63e18f16b677b490af2837 100644
+index a7504c80bd52a47bb19506cdba30cd38b8de7318..0f2e655eae6c6ab00cead76e256dfad5b19cbb60 100644
--- a/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
+++ b/src/main/java/net/minecraft/world/entity/monster/breeze/Breeze.java
-@@ -87,6 +87,7 @@ public class Breeze extends Monster {
+@@ -85,6 +85,7 @@ public class Breeze extends Monster {
+ return Brain.provider(BreezeAi.MEMORY_TYPES, BreezeAi.SENSOR_TYPES);
+ }
++ /* // Plazma - Remove persist 'isClientSide' flag
@Override
public void onSyncedDataUpdated(EntityDataAccessor> data) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
if (this.level().isClientSide() && Breeze.DATA_POSE.equals(data)) {
- this.resetAnimations();
- Pose entitypose = this.getPose();
-@@ -102,6 +103,7 @@ public class Breeze extends Monster {
- this.slide.startIfStopped(this.tickCount);
- }
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+@@ -105,6 +106,7 @@ public class Breeze extends Monster {
super.onSyncedDataUpdated(data);
}
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ private void resetAnimations() {
+ this.shoot.stop();
diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
-index ea1655d2cbc631d80dd66f7e3e24998530df66a2..833667dfaff7f8de638238981adbf0b4a839ea04 100644
+index 57f07799e74ecd48b8e4af68569b46be42c721ea..fdf4b44278961346282845270d3db3cffb497819 100644
--- a/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
+++ b/src/main/java/net/minecraft/world/entity/monster/creaking/Creaking.java
-@@ -157,7 +157,7 @@ public class Creaking extends Monster {
- this.attackAnimationRemainingTicks--;
+@@ -252,7 +252,7 @@ public class Creaking extends Monster {
+ --this.attackAnimationRemainingTicks;
}
- if (!this.level().isClientSide) {
+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag
- boolean bl = this.entityData.get(CAN_MOVE);
- boolean bl2 = this.checkCanMove();
- if (bl2 != bl) {
-@@ -171,11 +171,12 @@ public class Creaking extends Monster {
+ boolean flag = (Boolean) this.entityData.get(Creaking.CAN_MOVE);
+ boolean flag1 = this.checkCanMove();
+
+@@ -267,14 +267,14 @@ public class Creaking extends Monster {
}
- this.entityData.set(CAN_MOVE, bl2);
+ this.entityData.set(Creaking.CAN_MOVE, flag1);
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
super.aiStep();
}
-+ /* // Plazma - Remove persist 'isClientSide' flag
- @Override
- public void tick() {
- super.tick();
-@@ -183,6 +184,7 @@ public class Creaking extends Monster {
- this.setupAnimationStates();
- }
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
-
- private void setupAnimationStates() {
- this.attackAnimationState.animateWhen(this.attackAnimationRemainingTicks > 0, this.tickCount);
-diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java b/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java
-index b57818cbe9ac6a2095da8a2ee6ccbd4c1804a502..c7e217a5ec2cb6d261ae9804ae125961f344a418 100644
---- a/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java
-+++ b/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java
-@@ -44,9 +44,10 @@ public class CreakingTransient extends Creaking {
-
- @Override
- public boolean hurtServer(ServerLevel world, DamageSource source, float amount) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (this.level().isClientSide) {
- return super.hurtServer(world, source, amount);
-- } else if (source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) {
-+ } else*/ if (source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { // Plazma - Remove persist 'isClientSide' flag
- return super.hurtServer(world, source, amount);
- } else if (!this.isInvulnerableTo(world, source) && this.invulnerabilityAnimationRemainingTicks <= 0) {
- this.invulnerabilityAnimationRemainingTicks = 8;
-@@ -82,7 +83,7 @@ public class CreakingTransient extends Creaking {
-
@Override
public void tick() {
- if (!this.level().isClientSide) {
+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag
- label18:
- {
- if (this.homePos != null) {
-@@ -100,12 +101,14 @@ public class CreakingTransient extends Creaking {
- this.setRemoved(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause
- return;
+ BlockPos blockposition = this.getHomePos();
+
+ if (blockposition != null) {
+@@ -301,13 +301,15 @@ public class Creaking extends Monster {
+ this.setHealth(0.0F);
+ }
}
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
@@ -4279,11 +4082,37 @@ index b57818cbe9ac6a2095da8a2ee6ccbd4c1804a502..c7e217a5ec2cb6d261ae9804ae125961
+ /* // Plazma - Remove persist 'isClientSide' flag
if (this.level().isClientSide) {
this.setupAnimationStates();
+ this.checkEyeBlink();
}
+ */ // Plazma - Remove persist 'isClientSide' flag
}
+@@ -315,7 +317,7 @@ public class Creaking extends Monster {
+ protected void tickDeath() {
+ if (this.isHeartBound() && this.isTearingDown()) {
+ ++this.deathTime;
+- if (!this.level().isClientSide() && this.deathTime > 45 && !this.isRemoved()) {
++ if (/*!this.level().isClientSide() &&*/ this.deathTime > 45 && !this.isRemoved()) { // Plazma - Remove persist 'isClientSide' flag
+ this.tearDown();
+ }
+ } else {
+@@ -659,6 +661,7 @@ public class Creaking extends Monster {
+ super(creaking);
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ @Override
+ public void clientTick() {
+ if (Creaking.this.canMove()) {
+@@ -666,6 +669,7 @@ public class Creaking extends Monster {
+ }
+
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+ }
+
+ private class CreakingPathNavigation extends GroundPathNavigation {
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 6144613e834236ec0ebb12872ef9e47255b76b5b..28ca4b511ea37f6fd0eefc7a8d449c85075b855d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -4298,10 +4127,10 @@ index 6144613e834236ec0ebb12872ef9e47255b76b5b..28ca4b511ea37f6fd0eefc7a8d449c85
@Override
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 20608fb46a0af85739e3c0caa843c1a9d45c9659..938b4025122f6d27382086445bc8f231f325b864 100644
+index a2d29cf854be6f0bc5b5bb99e7002e07ccc4cae9..edcba583e41ce1cc87ecd28cccaa2387fe0736cf 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
-@@ -312,14 +312,14 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
+@@ -315,14 +315,14 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
public void setBaby(boolean baby) {
this.getEntityData().set(Piglin.DATA_BABY_ID, baby);
@@ -4318,7 +4147,7 @@ index 20608fb46a0af85739e3c0caa843c1a9d45c9659..938b4025122f6d27382086445bc8f231
}
-@@ -485,7 +485,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
+@@ -494,7 +494,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
protected SoundEvent getAmbientSound() {
@@ -4328,7 +4157,7 @@ index 20608fb46a0af85739e3c0caa843c1a9d45c9659..938b4025122f6d27382086445bc8f231
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
-index 79b090030b716029cc4cfc8bf9d81af0b2202313..6cce132f43ce7aad6f5ee2b351855c9b57b8f0c1 100644
+index 065c7c5ad2f077ab8acd0f008867d42174ba20b4..9bbf0eef3af5b7e26ae98649706746c67b76f069 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -287,6 +287,7 @@ public class Warden extends Monster implements VibrationSystem {
@@ -4348,7 +4177,7 @@ index 79b090030b716029cc4cfc8bf9d81af0b2202313..6cce132f43ce7aad6f5ee2b351855c9b
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
-index 6c74cf1dea99b3b967b8c3d76f405f823c881fb9..e57f95fb70c7482587acc134982caa22f7c67071 100644
+index e2b00681e427bc99c3b3660d8f4830379b98c7a0..e7d93e7e26f9733a0e5ea6572f1a4f13a87dc66c 100644
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
@@ -124,16 +124,18 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
@@ -4396,7 +4225,7 @@ index 6c74cf1dea99b3b967b8c3d76f405f823c881fb9..e57f95fb70c7482587acc134982caa22
this.writeInventoryToTag(nbt, this.registryAccess());
}
-@@ -308,8 +310,10 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
+@@ -308,10 +310,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
return this.getPosition(delta).add(vec3d.yRot(-f1));
}
@@ -4406,9 +4235,11 @@ index 6c74cf1dea99b3b967b8c3d76f405f823c881fb9..e57f95fb70c7482587acc134982caa22
return this.level().isClientSide;
}
+ */ // Plazma - Remove persist 'isClientSide' flag
- }
+
+ @Override
+ public boolean stillValid(Player player) {
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 0ee456972923e90905732ffc5d77bb027cf6c0fc..68353a8b2a01fbf873c3751f3887dc0ec35c8327 100644
+index 15ddc44bb266b4cdb1036c92dd60f1379832b501..c6d4a963ae5bde8a43fe84b6a9d3ed05c5be8ed1 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -323,13 +323,13 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -4510,19 +4341,19 @@ index 42c91e52060fad4a7a598f9e9ef88fd0e0ff8475..c348f049c0d51fc98d3b2dfbdde679fb
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf7e5c4495 100644
+index d19b1e127a1018a798eed181d8060a781b589f90..9ecd1b747066fa954608c3064867d06d4937dc85 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -238,7 +238,7 @@ public abstract class Player extends LivingEntity {
+@@ -241,7 +241,7 @@ public abstract class Player extends LivingEntity {
this.lastDeathLocation = Optional.empty();
this.setUUID(gameProfile.getId());
this.gameProfile = gameProfile;
- this.inventoryMenu = new InventoryMenu(this.inventory, !world.isClientSide, this);
-+ this.inventoryMenu = new InventoryMenu(this.inventory, this); // Plazma - Remove persist 'isClientSide' flag
++ this.inventoryMenu = new InventoryMenu(this.inventory, /*!world.isClientSide,*/ this); // Plazma - Remove persist 'isClientSide' flag
this.containerMenu = this.inventoryMenu;
this.moveTo((double) pos.getX() + 0.5D, (double) (pos.getY() + 1), (double) pos.getZ() + 0.5D, yaw, 0.0F);
this.rotOffs = 180.0F;
-@@ -303,7 +303,7 @@ public abstract class Player extends LivingEntity {
+@@ -306,7 +306,7 @@ public abstract class Player extends LivingEntity {
this.sleepCounter = 100;
}
@@ -4531,7 +4362,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
this.stopSleepInBed(false, true);
}
} else if (this.sleepCounter > 0) {
-@@ -315,7 +315,7 @@ public abstract class Player extends LivingEntity {
+@@ -318,7 +318,7 @@ public abstract class Player extends LivingEntity {
this.updateIsUnderwater();
super.tick();
@@ -4540,7 +4371,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
-@@ -599,7 +599,7 @@ public abstract class Player extends LivingEntity {
+@@ -602,7 +602,7 @@ public abstract class Player extends LivingEntity {
@Override
public void rideTick() {
@@ -4549,7 +4380,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
this.stopRiding();
// CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return
if (!this.isPassenger()) {
-@@ -676,7 +676,7 @@ public abstract class Player extends LivingEntity {
+@@ -679,7 +679,7 @@ public abstract class Player extends LivingEntity {
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
@@ -4558,7 +4389,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Add option to make parrots stay
this.removeEntitiesOnShoulder();
}
-@@ -723,10 +723,10 @@ public abstract class Player extends LivingEntity {
+@@ -726,10 +726,10 @@ public abstract class Player extends LivingEntity {
this.autoSpinAttackTicks = riptideTicks;
this.autoSpinAttackDmg = riptideAttackDamage;
this.autoSpinAttackItemStack = stack;
@@ -4571,7 +4402,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
}
-@@ -811,9 +811,11 @@ public abstract class Player extends LivingEntity {
+@@ -814,9 +814,11 @@ public abstract class Player extends LivingEntity {
@Nullable
public ItemEntity drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) {
// CraftBukkit end
@@ -4583,7 +4414,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
return null;
}
-@@ -1059,9 +1061,9 @@ public abstract class Player extends LivingEntity {
+@@ -1062,9 +1064,9 @@ public abstract class Player extends LivingEntity {
@Override
protected void hurtCurrentlyUsedShield(float amount) {
if (this.useItem.is(Items.SHIELD)) {
@@ -4595,7 +4426,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
if (amount >= 3.0F) {
int i = 1 + Mth.floor(amount);
-@@ -1454,7 +1456,7 @@ public abstract class Player extends LivingEntity {
+@@ -1457,7 +1459,7 @@ public abstract class Player extends LivingEntity {
EnchantmentHelper.doPostAttackEffects(worldserver1, target, damagesource);
}
@@ -4604,7 +4435,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
if (flag5) {
itemstack.postHurtEnemy((LivingEntity) object, this);
}
-@@ -1555,9 +1557,11 @@ public abstract class Player extends LivingEntity {
+@@ -1558,9 +1560,11 @@ public abstract class Player extends LivingEntity {
}
@@ -4616,7 +4447,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
public GameProfile getGameProfile() {
return this.gameProfile;
-@@ -1895,14 +1899,14 @@ public abstract class Player extends LivingEntity {
+@@ -1898,14 +1902,14 @@ public abstract class Player extends LivingEntity {
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
// CraftBukkit end
if (!this.abilities.invulnerable) {
@@ -4633,7 +4464,7 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
}
}
-@@ -2098,7 +2102,7 @@ public abstract class Player extends LivingEntity {
+@@ -2101,7 +2105,7 @@ public abstract class Player extends LivingEntity {
private Entity respawnEntityOnShoulder0(CompoundTag nbttagcompound) { // CraftBukkit void->boolean
// Paper end - release entity api - return entity - overload
@@ -4642,11 +4473,24 @@ index c1d068fa99ec0fd5685bbb627a775e4d1587feab..f92b72ee0172cd878baef69b9710dbaf
return EntityType.create(nbttagcompound, this.level(), EntitySpawnReason.LOAD).map((entity) -> { // CraftBukkit
if (entity instanceof TamableAnimal) {
((TamableAnimal) entity).setOwnerUUID(this.uuid);
+@@ -2492,10 +2496,12 @@ public abstract class Player extends LivingEntity {
+ return false;
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flags
+ @Override
+ public boolean isControlledByClient() {
+ return true;
+ }
++ */ // Plazma - Remove persist 'isClientSide' flags
+
+ @Override
+ public boolean onClimbable() {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 5006a59734c5fc7525fba86f7d74e74f8f1b54b0..3d4d1a247e14f97ddeab3c532341d0e8e89dc2e3 100644
+index e136738ed53a488ad0aa67a04237ac6243fe712c..8dfc26a9417f1201044b053c7b0135fc32f011cc 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -229,13 +229,13 @@ public abstract class AbstractArrow extends Projectile {
+@@ -231,13 +231,13 @@ public abstract class AbstractArrow extends Projectile {
}
if (this.isInGround() && flag) {
@@ -4662,7 +4506,7 @@ index 5006a59734c5fc7525fba86f7d74e74f8f1b54b0..3d4d1a247e14f97ddeab3c532341d0e8
++this.inGroundTime;
if (this.isAlive()) {
-@@ -486,7 +486,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -501,7 +501,7 @@ public abstract class AbstractArrow extends Projectile {
if (entity instanceof LivingEntity) {
LivingEntity entityliving1 = (LivingEntity) entity;
@@ -4671,7 +4515,7 @@ index 5006a59734c5fc7525fba86f7d74e74f8f1b54b0..3d4d1a247e14f97ddeab3c532341d0e8
entityliving1.setArrowCount(entityliving1.getArrowCount() + 1);
}
-@@ -508,7 +508,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -523,7 +523,7 @@ public abstract class AbstractArrow extends Projectile {
this.piercedAndKilledEntities.add(entityliving1);
}
@@ -4680,7 +4524,7 @@ index 5006a59734c5fc7525fba86f7d74e74f8f1b54b0..3d4d1a247e14f97ddeab3c532341d0e8
ServerPlayer entityplayer = (ServerPlayer) entity1;
if (this.piercedAndKilledEntities != null) {
-@@ -764,7 +764,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -779,7 +779,7 @@ public abstract class AbstractArrow extends Projectile {
@Override
public void playerTouch(Player player) {
@@ -4689,20 +4533,20 @@ index 5006a59734c5fc7525fba86f7d74e74f8f1b54b0..3d4d1a247e14f97ddeab3c532341d0e8
// CraftBukkit start
ItemStack itemstack = this.getPickupItem();
if (this.pickup == Pickup.ALLOWED && !itemstack.isEmpty() && player.getInventory().canHold(itemstack) > 0) {
-@@ -888,7 +888,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -903,7 +903,7 @@ public abstract class AbstractArrow extends Projectile {
}
public boolean isNoPhysics() {
- return !this.level().isClientSide ? this.noPhysics : ((Byte) this.entityData.get(AbstractArrow.ID_FLAGS) & 2) != 0;
-+ return /*!this.level().isClientSide ?*/ this.noPhysics /*: ((Byte) this.entityData.get(AbstractArrow.ID_FLAGS) & 2) != 0*/; // Plazma - Remove persist 'isClientSide' flag
++ return /*!this.level().isClientSide ?*/ this.noPhysics; //: ((Byte) this.entityData.get(AbstractArrow.ID_FLAGS) & 2) != 0; // Plazma - Remove persist 'isClientSide' flag
}
@Override
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
-index a84dccc59f9dc5298b18f263dc779c30c9b7ddab..c496d825b42bb88e96e7e6aecbe2b3f2461e4238 100644
+index 19ff16e1ba406584f3cdd760d0269a50980b0a26..6bfb7e4aa4633c44beb5e2e973a8a25b02b812e6 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
-@@ -77,7 +77,7 @@ public abstract class AbstractHurtingProjectile extends Projectile {
+@@ -73,7 +73,7 @@ public abstract class AbstractHurtingProjectile extends Projectile {
Entity entity = this.getOwner();
this.applyInertia();
@@ -4853,7 +4697,7 @@ index 8a4e7e1c0c4919d2ee34121c14f9665b9ad95273..f07ad352ea991752625a5c6bdf6ae9cc
super.handleEntityEvent(status);
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index 4daa69c6be6d48563e30343a7e40e4da9ec7e5ad..eb96b2fc32056275d3b9fe8e33162744a7b1870b 100644
+index 5e6ceb3c3728c0c08a516566c70a5c0d72d59196..5af2f35d99102deb313da141f8d70b4024552ce1 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -175,7 +175,7 @@ public class FishingHook extends Projectile {
@@ -4898,18 +4742,22 @@ index 4daa69c6be6d48563e30343a7e40e4da9ec7e5ad..eb96b2fc32056275d3b9fe8e33162744
int i = 0;
if (this.hookedIn != null) {
-@@ -605,9 +605,11 @@ public class FishingHook extends Projectile {
+@@ -603,6 +603,7 @@ public class FishingHook extends Projectile {
+ }
+ }
++ /* // Plazma - Remove persist 'isClientSide' flag
@Override
public void handleEntityEvent(byte status) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
if (status == 31 && this.level().isClientSide && this.hookedIn instanceof net.minecraft.world.entity.player.Player && ((net.minecraft.world.entity.player.Player) this.hookedIn).isLocalPlayer()) {
- this.pullEntity(this.hookedIn);
- }
-+ */ // Plazma - Remove persist 'isClientSide' flag
+@@ -611,6 +612,7 @@ public class FishingHook extends Projectile {
super.handleEntityEvent(status);
}
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public void pullEntity(Entity entity) {
+ Entity entity1 = this.getOwner();
diff --git a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java
index 0b7f27a6cc6be58fa5b60002059c9fbb3b1b7b67..8b8977d9aadd929e2b1b4d8a1b76aa4f0b30352b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java
@@ -4927,7 +4775,7 @@ index 0b7f27a6cc6be58fa5b60002059c9fbb3b1b7b67..8b8977d9aadd929e2b1b4d8a1b76aa4f
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
-index a7df9c2a3f210bc944cf76cdcc8d2a9484704bd1..4c65d1b1b1330b286dd32eb81bdf889c39a35166 100644
+index 40a1514637a6a26666ba877e6dcf5bc42bd54a51..94a1246d9cd2ca1eefb20e4d768e016aae9e4623 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -383,7 +383,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -4999,7 +4847,7 @@ index 588b07ec4501924a49264183b414a7fd64bb6550..5bdd243b96042e301eed0d232b569b2a
}
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
-index 0db58e7d63a5c1b43a2224c247979f23a1d3f899..43e3bd03eb8378a80d1cd9a7804ac013c4333ea2 100644
+index 6fdacf2f6934521a0dd4b25aea35a6a14123da0a..32b3acba6ac895d757a8aa5155775680727a565d 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
@@ -68,7 +68,7 @@ public class Snowball extends ThrowableItemProjectile {
@@ -5119,7 +4967,7 @@ index e63b408594b5d2673148e39c1deafc8510537bee..7365dcde9d134bceeaed0b0fc16ea34c
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java b/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
-index a325a223d06e155c01f664562db0edd0b180e356..7fed147928ae3710808101ef3f9408af470452da 100644
+index 821c1236901ca0a7d7e0d4c12a69f69e2b5c4363..e0afd713ab64a5e26cc9af670d17c8f5e95678cb 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
@@ -108,23 +108,23 @@ public abstract class AbstractWindCharge extends AbstractHurtingProjectile imple
@@ -5160,7 +5008,7 @@ index a325a223d06e155c01f664562db0edd0b180e356..7fed147928ae3710808101ef3f9408af
this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
} else {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
-index 56c265940208bc94f531a5af94f564b59f35ebf3..fd8658223cf52bbedfe37585383686c6a5219a7d 100644
+index 1a4fb057025689a22b3dd05f531f0d8639d7e47b..a48e5e21b2715550f8716812a0fe821cb4f117b5 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
@@ -178,13 +178,13 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
@@ -5264,7 +5112,7 @@ index 56c265940208bc94f531a5af94f564b59f35ebf3..fd8658223cf52bbedfe37585383686c6
// CraftBukkit end
- if (!this.level().isClientSide && entity_removalreason.shouldDestroy() && this.isLeashed()) {
+ if (/*!this.level().isClientSide &&*/ entity_removalreason.shouldDestroy() && this.isLeashed()) { // Plazma - Remove persist 'isClientSide' flag
- this.dropLeash(true, true);
+ this.dropLeash();
}
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
@@ -5465,11 +5313,26 @@ index d81a6874e8b25f098df619f84c359e146c7f64de..10bf3173b970f02029e680955b622104
this.consumedItemThisFrame = true;
this.setChanged();
}
+diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartSpawner.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartSpawner.java
+index 6fdc3e218c920aea72e44bfeec6aa67e625d8581..5e0d2695d225bb4c924990e83ca2bde274149bf3 100644
+--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartSpawner.java
++++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartSpawner.java
+@@ -37,9 +37,7 @@ public class MinecartSpawner extends AbstractMinecart {
+ }
+
+ private Runnable createTicker(Level world) {
+- return world instanceof ServerLevel
+- ? () -> this.spawner.serverTick((ServerLevel)world, this.blockPosition())
+- : () -> this.spawner.clientTick(world, this.blockPosition());
++ return () -> this.spawner.serverTick((ServerLevel) world, this.blockPosition()); // Plazma - Remove persist 'isClientSide' flag
+ }
+
+ @Override
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-index 0652494dc5f3d999116d4380032dea0e7402caec..63d208dbdde9cda9b0ad284f187c0cc542f88d82 100644
+index 0f005b1f98c387cd7bcfb934f44c166c39fdc9a5..8b6a16fa0b24f05567ccd95dffc1263867f3fb09 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-@@ -169,12 +169,12 @@ public class MinecartTNT extends AbstractMinecart {
+@@ -173,12 +173,12 @@ public class MinecartTNT extends AbstractMinecart {
public void primeFuse() {
this.fuse = 80;
@@ -5485,7 +5348,7 @@ index 0652494dc5f3d999116d4380032dea0e7402caec..63d208dbdde9cda9b0ad284f187c0cc5
}
diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
-index e0ee1c10960d24d2369d16f22431a8e02a5570aa..139f066a1b3644dac927ac0a74632e92153bdd2d 100644
+index b821c2676ecc252f90eff84cad0c4ba2c664531e..9b0dd634f5d85fd5671aa152c169a6d0fe68f680 100644
--- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
@@ -71,14 +71,14 @@ public class BeaconMenu extends AbstractContainerMenu {
@@ -5506,30 +5369,32 @@ index e0ee1c10960d24d2369d16f22431a8e02a5570aa..139f066a1b3644dac927ac0a74632e92
@Override
diff --git a/src/main/java/net/minecraft/world/inventory/InventoryMenu.java b/src/main/java/net/minecraft/world/inventory/InventoryMenu.java
-index 5685a3aeef1f7c5a1edebce0eae5cfb0ed179df6..9fcbfa64aef0d11998f8c85fa79a7a48a5413568 100644
+index 8f2de12971787f54917b1c4455394d83cad0250c..1c96e59b73385144d61ec923ca2be55245125ef6 100644
--- a/src/main/java/net/minecraft/world/inventory/InventoryMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/InventoryMenu.java
-@@ -42,18 +42,16 @@ public class InventoryMenu extends AbstractCraftingMenu {
- public static final ResourceLocation EMPTY_ARMOR_SLOT_SHIELD = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_shield");
+@@ -40,18 +40,18 @@ public class InventoryMenu extends AbstractCraftingMenu {
+ public static final ResourceLocation EMPTY_ARMOR_SLOT_SHIELD = ResourceLocation.withDefaultNamespace("container/slot/shield");
private static final Map TEXTURE_EMPTY_SLOTS = Map.of(EquipmentSlot.FEET, InventoryMenu.EMPTY_ARMOR_SLOT_BOOTS, EquipmentSlot.LEGS, InventoryMenu.EMPTY_ARMOR_SLOT_LEGGINGS, EquipmentSlot.CHEST, InventoryMenu.EMPTY_ARMOR_SLOT_CHESTPLATE, EquipmentSlot.HEAD, InventoryMenu.EMPTY_ARMOR_SLOT_HELMET);
private static final EquipmentSlot[] SLOT_IDS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET};
- public final boolean active;
++ //public final boolean active; // Plazma - Remove persist 'isClientSide' flag
private final Player owner;
// CraftBukkit start
private CraftInventoryView bukkitEntity = null;
// CraftBukkit end
- public InventoryMenu(Inventory inventory, boolean onServer, final Player owner) {
-+ public InventoryMenu(Inventory inventory, final Player owner) { // Plazma - Remove persist 'isClientSide' flag
++ public InventoryMenu(Inventory inventory, /*boolean onServer,*/ final Player owner) { // Plazma - Remove persist 'isClientSide' flag
// CraftBukkit start
super((MenuType) null, 0, 2, 2, inventory); // CraftBukkit - save player
this.setTitle(Component.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
// CraftBukkit end
- this.active = onServer;
++ //this.active = onServer; // Plazma - Remove persist 'isClientSide' flag
this.owner = owner;
this.addResultSlot(owner, 154, 28);
this.addCraftingGridSlots(98, 18);
-@@ -98,9 +96,9 @@ public class InventoryMenu extends AbstractCraftingMenu {
+@@ -96,9 +96,9 @@ public class InventoryMenu extends AbstractCraftingMenu {
public void removed(Player player) {
super.removed(player);
this.resultSlots.clearContent();
@@ -5542,7 +5407,7 @@ index 5685a3aeef1f7c5a1edebce0eae5cfb0ed179df6..9fcbfa64aef0d11998f8c85fa79a7a48
@Override
diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
-index 6a529b5e289c416c0ebdc0260086ec039777aa40..22cbe82a4afab9efd2776600e0e67ac65396c73a 100644
+index 54c43acb3c401a9b616f4d1b871d7c4d5660f455..5bedce0f9c1bd7556cd78d928b0a4b4bc6be6776 100644
--- a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
@@ -174,7 +174,7 @@ public class MerchantMenu extends AbstractContainerMenu {
@@ -5573,20 +5438,30 @@ index 6a529b5e289c416c0ebdc0260086ec039777aa40..22cbe82a4afab9efd2776600e0e67ac6
public void tryMoveItems(int recipeIndex) {
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
-index d58619d1d63a03598b8740dd789d4b6f2c93f8d0..1a989b55cc7f411b7d3270e537bf711396be0864 100644
+index 3d7a09c81b10f7a34d55670b7f2cc50b80550380..89d121a0c7497fd130bc84b37fcc829d46a86a95 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java
-@@ -221,8 +221,8 @@ public class BlockItem extends Item {
- BlockEntity tileentity = world.getBlockEntity(pos);
-
- if (tileentity != null) {
-- if (!world.isClientSide && tileentity.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission
-- if (!(!world.isClientSide && world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners")))
-+ if (/*!world.isClientSide &&*/ tileentity.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission // Plazma - Remove persist 'isClientSide' flag
-+ if (!(/*!world.isClientSide &&*/ world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners"))) // Plazma - Remove persist 'isClientSide' flag
- return false;
- }
+@@ -210,9 +210,11 @@ public class BlockItem extends Item {
+ }
+
+ public static boolean updateCustomBlockEntityTag(Level world, @Nullable Player player, BlockPos pos, ItemStack stack) {
++ /* // Plazma - Remove persist 'isClientSide' flag
+ if (world.isClientSide) {
+ return false;
+ } else {
++ */ // Plazma - Remove persist 'isClientSide' flag
+ CustomData customdata = (CustomData) stack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY);
+
+ if (!customdata.isEmpty()) {
+@@ -241,7 +243,7 @@ public class BlockItem extends Item {
+ }
+
+ return false;
+- }
++ //} // Plazma - Remove persist 'isClientSide' flag
+ }
+ @Override
diff --git a/src/main/java/net/minecraft/world/item/BoatItem.java b/src/main/java/net/minecraft/world/item/BoatItem.java
index 78d41d57df9cb61b295f1f54db1e1d62c13db701..86f2a6eac07f8886ee1674fb984c0b986dcad060 100644
--- a/src/main/java/net/minecraft/world/item/BoatItem.java
@@ -5640,7 +5515,7 @@ index c7d4a09c11f933494ab047921660451c6c1c7280..69125b16efeee7554ca48fd28b97aca5
return InteractionResult.SUCCESS;
} else {
diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java
-index 6aa8ee091d3a7d2826d08ab9a03f970ef71a81ea..a7694884434e702f1ac43c3c8426b47d6663c286 100644
+index 38f287d97544b8a5b080837e38710dc4e94ae9bf..d1b71df2c3760914aee98ac03c0d11fa1302a3a0 100644
--- a/src/main/java/net/minecraft/world/item/BucketItem.java
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java
@@ -94,9 +94,9 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -5664,40 +5539,11 @@ index 6aa8ee091d3a7d2826d08ab9a03f970ef71a81ea..a7694884434e702f1ac43c3c8426b47d
world.destroyBlock(blockposition, true);
}
-diff --git a/src/main/java/net/minecraft/world/item/BundleItem.java b/src/main/java/net/minecraft/world/item/BundleItem.java
-index f1999d904ac66f5349346ad8157f5401fb395e11..23f6fa49af0c124b75188d4a69af30fde888d87d 100644
---- a/src/main/java/net/minecraft/world/item/BundleItem.java
-+++ b/src/main/java/net/minecraft/world/item/BundleItem.java
-@@ -141,12 +141,14 @@ public class BundleItem extends Item {
-
- @Override
- public InteractionResult use(Level world, Player user, InteractionHand hand) {
-+ /* // Plazma - Remove persist 'isClientSide' flag
- if (world.isClientSide) {
- return InteractionResult.CONSUME;
- } else {
-+ */ // Plazma - Remove persist 'isClientSide' flag
- user.startUsingItem(hand);
- return InteractionResult.SUCCESS_SERVER;
-- }
-+ //} // Plazma - Remove persist 'isClientSide' flag
- }
-
- private void dropContent(Level world, Player player, ItemStack stack) {
-@@ -232,7 +234,7 @@ public class BundleItem extends Item {
-
- @Override
- public void onUseTick(Level world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
-- if (!world.isClientSide && user instanceof Player player) {
-+ if (/*!world.isClientSide &&*/ user instanceof Player player) { // Plazma - Remove persist 'isClientSide' flag
- int i = this.getUseDuration(stack, user);
- boolean bl = remainingUseTicks == i;
- if (bl || remainingUseTicks < i - 10 && remainingUseTicks % 2 == 0) {
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
-index 86204c2ab5bbd5d45ddb1d626f844d91ccae6b4f..6ffbe9d3be2ef3cb9c8f08db0373379856cc748b 100644
+index cac4de9877b91bd805a5a8f4b84d27449fc5001f..f8946704838d96ad522182d2b9f41ac8bfe92ac4 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
-@@ -222,7 +222,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
+@@ -223,7 +223,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
@Override
public void onUseTick(Level world, LivingEntity user, ItemStack stack, int remainingUseTicks) {
@@ -5706,7 +5552,7 @@ index 86204c2ab5bbd5d45ddb1d626f844d91ccae6b4f..6ffbe9d3be2ef3cb9c8f08db03733798
CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack);
float f = (float)(stack.getUseDuration(user) - remainingUseTicks) / (float)getChargeDuration(stack, user);
if (f < 0.2F) {
-@@ -241,7 +241,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
+@@ -242,7 +242,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
chargingSounds.mid()
.ifPresent(sound -> world.playSound(null, user.getX(), user.getY(), user.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F));
}
@@ -5812,7 +5658,7 @@ index c71a426c47e0ebc57ecb8c9c1d171737a084ccab..05264c4f0d2f13758d5726ab8b145d20
return InteractionResult.PASS;
}
diff --git a/src/main/java/net/minecraft/world/item/FishingRodItem.java b/src/main/java/net/minecraft/world/item/FishingRodItem.java
-index 801a513d67637136a15307a98fc6bbec9d202b00..e079c3392997ac8a2d7d915cadd8ece189eb5054 100644
+index 06b66e68d33928c41f0289a67c8c3aad87811ac9..dca4ba4250b607fa87935222e6ed7ed7247b623f 100644
--- a/src/main/java/net/minecraft/world/item/FishingRodItem.java
+++ b/src/main/java/net/minecraft/world/item/FishingRodItem.java
@@ -30,11 +30,11 @@ public class FishingRodItem extends Item {
@@ -5895,7 +5741,7 @@ index 0936bdc945f73c7750c20a34276aead2921eeb61..0b530ae9aa19a2f6917fc8a25a64a628
return InteractionResult.SUCCESS;
} else {
diff --git a/src/main/java/net/minecraft/world/item/Item.java b/src/main/java/net/minecraft/world/item/Item.java
-index 3d948c8d325bcef7f4cfc0045f9991acb3aa2f7c..7fc8fcab93be9076391a2981d028831cbd02a3d2 100644
+index 93895ca35c957aa5df00d15f6110d5cbba791d61..29afbe0aa72f12d8fa6c03af55d17abef89c8dd4 100644
--- a/src/main/java/net/minecraft/world/item/Item.java
+++ b/src/main/java/net/minecraft/world/item/Item.java
@@ -217,7 +217,7 @@ public class Item implements FeatureElement, ItemLike {
@@ -5986,7 +5832,7 @@ index 7c910d96edac066d4634bc6f6049a72238884ae9..6d12dce8e50ce73602341fd7d78e3141
}
}
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
-index c2f3c8b3d8eeb609b6d6067c4fb404aefbf94ec5..8c455ac7dcb126e2b2932eba980454513947fac2 100644
+index 5c0a46c11003b6e154195a8ef299416cc73eae33..68a0aa6545c8aba3ecc31086a8d2bc3e1aada64e 100644
--- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
@@ -269,7 +269,7 @@ public class MapItem extends Item {
@@ -6023,13 +5869,13 @@ index c2f3c8b3d8eeb609b6d6067c4fb404aefbf94ec5..8c455ac7dcb126e2b2932eba98045451
return InteractionResult.SUCCESS;
} else {
diff --git a/src/main/java/net/minecraft/world/item/NameTagItem.java b/src/main/java/net/minecraft/world/item/NameTagItem.java
-index 20fece9908382f40b4082f7b1fb7d41914ae31be..4df7168ccb37ebde8e9d39145379298b986621c8 100644
+index 793bd6392ca3c3792306a20538233e4d7fb69b86..8288984eab872e26f47715c15c5278136afa2f83 100644
--- a/src/main/java/net/minecraft/world/item/NameTagItem.java
+++ b/src/main/java/net/minecraft/world/item/NameTagItem.java
@@ -17,7 +17,7 @@ public class NameTagItem extends Item {
public InteractionResult interactLivingEntity(ItemStack stack, Player user, LivingEntity entity, InteractionHand hand) {
Component component = stack.get(DataComponents.CUSTOM_NAME);
- if (component != null && entity.getType().canSerialize()) {
+ if (component != null && entity.getType().canSerialize() && entity.canBeNameTagged()) {
- if (!user.level().isClientSide && entity.isAlive()) {
+ if (/*!user.level().isClientSide &&*/ entity.isAlive()) { // Plazma - Remove persist 'isClientSide' flag
// Paper start - Add PlayerNameEntityEvent
@@ -6164,10 +6010,10 @@ index 867b1326eaaa4a0ff7c5773e0098ebf68a55c519..d856dfd4a59de600291f2cdc139ce553
world.gameEvent(player, GameEvent.FLUID_PLACE, pos);
world.playSound(player, pos, this.placeSound, SoundSource.BLOCKS, 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/world/item/SpawnEggItem.java b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
-index e0e746d6c78421b40777125ba49f0a04809f5415..5d89be2a176bd48c9c0e287f118976f2d65b2261 100644
+index a185d098175e504b7bb93d2cff03ca99eabc11eb..356181e73697d5b9896892086e1c5ea670460541 100644
--- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java
+++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
-@@ -57,9 +57,11 @@ public class SpawnEggItem extends Item {
+@@ -52,9 +52,11 @@ public class SpawnEggItem extends Item {
public InteractionResult useOn(UseOnContext context) {
Level world = context.getLevel();
@@ -6179,7 +6025,7 @@ index e0e746d6c78421b40777125ba49f0a04809f5415..5d89be2a176bd48c9c0e287f118976f2
ItemStack itemstack = context.getItemInHand();
BlockPos blockposition = context.getClickedPos();
Direction enumdirection = context.getClickedFace();
-@@ -113,7 +115,7 @@ public class SpawnEggItem extends Item {
+@@ -107,7 +109,7 @@ public class SpawnEggItem extends Item {
return InteractionResult.SUCCESS;
}
@@ -6188,27 +6034,6 @@ index e0e746d6c78421b40777125ba49f0a04809f5415..5d89be2a176bd48c9c0e287f118976f2
}
@Override
-@@ -123,9 +125,10 @@ public class SpawnEggItem extends Item {
-
- if (movingobjectpositionblock.getType() != HitResult.Type.BLOCK) {
- return InteractionResult.PASS;
-- } else if (world.isClientSide) {
-+ } /*else if (world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag
- return InteractionResult.SUCCESS;
- } else {
-+ */ // Plazma - Remove persist 'isClientSide' flag
- BlockPos blockposition = movingobjectpositionblock.getBlockPos();
-
- if (!(world.getBlockState(blockposition).getBlock() instanceof LiquidBlock)) {
-@@ -145,7 +148,7 @@ public class SpawnEggItem extends Item {
- } else {
- return InteractionResult.FAIL;
- }
-- }
-+ //} // Plazma - Remove persist 'isClientSide' flag
- }
-
- public boolean spawnsEntity(ItemStack stack, EntityType> type) {
diff --git a/src/main/java/net/minecraft/world/item/component/Consumable.java b/src/main/java/net/minecraft/world/item/component/Consumable.java
index 6be5e7b0ce975702ae7c337a06faa59ff3414d64..a992094d5b40c3b56b14182cfcb9884ee52604cc 100644
--- a/src/main/java/net/minecraft/world/item/component/Consumable.java
@@ -6232,10 +6057,10 @@ index 6be5e7b0ce975702ae7c337a06faa59ff3414d64..a992094d5b40c3b56b14182cfcb9884e
user.gameEvent(this.animation == ItemUseAnimation.DRINK ? GameEvent.DRINK : GameEvent.EAT);
stack.consume(1, user);
diff --git a/src/main/java/net/minecraft/world/item/equipment/Equippable.java b/src/main/java/net/minecraft/world/item/equipment/Equippable.java
-index 1263f84cfe3b9f6ff7b33f04528a3f01ded8b670..9ff0b7fd831ae7a318f1106303e27d0f1de12feb 100644
+index 6af6abe46d11bc9d2cee3620bd0fbf4138a9136f..bdb4130d540589a62e8a08d7e91777635903ac10 100644
--- a/src/main/java/net/minecraft/world/item/equipment/Equippable.java
+++ b/src/main/java/net/minecraft/world/item/equipment/Equippable.java
-@@ -85,9 +85,9 @@ public record Equippable(
+@@ -86,9 +86,9 @@ public record Equippable(
ItemStack itemStack = player.getItemBySlot(this.slot);
if ((!EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE) || player.isCreative())
&& !ItemStack.isSameItemSameComponents(stack, itemStack)) {
@@ -6248,7 +6073,7 @@ index 1263f84cfe3b9f6ff7b33f04528a3f01ded8b670..9ff0b7fd831ae7a318f1106303e27d0f
if (stack.getCount() <= 1) {
ItemStack itemStack2 = itemStack.isEmpty() ? stack : itemStack.copyAndClear();
diff --git a/src/main/java/net/minecraft/world/item/trading/Merchant.java b/src/main/java/net/minecraft/world/item/trading/Merchant.java
-index 716b30dcd7e63c66736c448dd136c9f74dc7fe43..bebad1479b39e08e636b10a6e3c5f0d36d8c7756 100644
+index b67eadc1c3710ddf4e8ac6e184dd8c63d1fefeea..69adb046733ca90fc3ebd74c84032a2940871b5c 100644
--- a/src/main/java/net/minecraft/world/item/trading/Merchant.java
+++ b/src/main/java/net/minecraft/world/item/trading/Merchant.java
@@ -52,7 +52,7 @@ public interface Merchant {
@@ -6258,8 +6083,8 @@ index 716b30dcd7e63c66736c448dd136c9f74dc7fe43..bebad1479b39e08e636b10a6e3c5f0d3
- boolean isClientSide();
+ //boolean isClientSide(); // Plazma - Remove persist 'isClientSide' flag
- org.bukkit.craftbukkit.inventory.CraftMerchant getCraftMerchant(); // CraftBukkit
- }
+ boolean stillValid(Player player);
+
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
index 5cb39f95bd2d45b6c18554605f01d2ebf6473428..d581534e7b1a5ab95a76f7394bf82f2f066c863b 100644
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
@@ -6286,10 +6111,26 @@ index 5cb39f95bd2d45b6c18554605f01d2ebf6473428..d581534e7b1a5ab95a76f7394bf82f2f
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
-index 357d484029fe338bea4f5770d13ccfc0dce4432e..5865b715c1f91ad16a7c0d5918bc8e43579b7790 100644
+index 357d484029fe338bea4f5770d13ccfc0dce4432e..1c92f61a5af7d39192d10f389780a501d472926d 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
-@@ -364,9 +364,11 @@ public abstract class BaseSpawner {
+@@ -65,6 +65,7 @@ public abstract class BaseSpawner {
+ return world.hasNearbyAlivePlayerThatAffectsSpawning((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, (double) this.requiredPlayerRange); // Paper - Affects Spawning API
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ public void clientTick(Level world, BlockPos pos) {
+ if (!this.isNearPlayer(world, pos)) {
+ this.oSpin = this.spin;
+@@ -85,6 +86,7 @@ public abstract class BaseSpawner {
+ }
+
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public void serverTick(ServerLevel world, BlockPos pos) {
+ // Plazma start - Add entity spawn deadlock timer
+@@ -364,9 +366,11 @@ public abstract class BaseSpawner {
public boolean onEventTriggered(Level world, int status) {
if (status == 1) {
@@ -6302,71 +6143,72 @@ index 357d484029fe338bea4f5770d13ccfc0dce4432e..5865b715c1f91ad16a7c0d5918bc8e43
return true;
} else {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 0da2014933fe441c4d3dc27c5fe10afa92ca1ec7..a44cb5609b3d467ba24d4814ff2d1840f49d37ed 100644
+index abdd3fcf266752d3bcad56cc5cd35ba8d3356a85..7005b8b6cf9e583b67362a9a7b360e62d81478ed 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -137,7 +137,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -138,7 +138,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
private final RandomSource threadSafeRandom = RandomSource.createThreadSafe();
private final Holder dimensionTypeRegistration;
public final WritableLevelData levelData;
- public final boolean isClientSide;
-+ //public final boolean isClientSide; // Plazma - Remove persist 'isClientSide' flag
++ //public final boolean isClientSide; // Plazma - Remove persist 'isClientSide' flags
private final WorldBorder worldBorder;
private final BiomeManager biomeManager;
private final ResourceKey dimension;
-@@ -927,7 +927,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -928,7 +928,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
final DimensionType dimensionmanager = (DimensionType) holder.value();
this.dimension = resourcekey;
- this.isClientSide = flag;
-+ //this.isClientSide = flag; // Plazma - Remove persist 'isClientSide' flag
++ //this.isClientSide = flag; // Plazma - Remove persist 'isClientSide' flags
if (dimensionmanager.coordinateScale() != 1.0D) {
this.worldBorder = new WorldBorder() { // CraftBukkit - decompile error
@Override
-@@ -1031,10 +1031,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1032,10 +1032,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
return true;
}
// Paper end - Cancel hit for vanished players
-+ /* // Plazma - Remove persist 'isClientSide' flag
++
++ /* // Plazma - Remove persist 'isClientSide' flags
@Override
public boolean isClientSide() {
return this.isClientSide;
}
-+ */ // Plazma - Remove persist 'isClientSide' flag
++ */ // Plazma - Remove persist 'isClientSide' flags
@Nullable
@Override
-@@ -1173,7 +1175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1174,7 +1177,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// CraftBukkit end
if (this.isOutsideBuildHeight(pos)) {
return false;
- } else if (!this.isClientSide && this.isDebug()) {
-+ } else if (/*!this.isClientSide &&*/ this.isDebug()) { // Plazma - Remove persist 'isClientSide' flag
++ } else if (/*!this.isClientSide &&*/ this.isDebug()) { // Plazma - Remove persist 'isClientSide' flags
return false;
} else {
LevelChunk chunk = this.getChunkAt(pos);
-@@ -1259,13 +1261,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1260,13 +1263,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
}
- if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && (this.isClientSide || chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.FULL)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement // Paper - rewrite chunk system - change from ticking to full
-+ if ((i & 2) != 0 && (/*!this.isClientSide ||*/ (i & 4) == 0) && (/*this.isClientSide ||*/ chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.FULL)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement // Paper - rewrite chunk system - change from ticking to full // Plazma - Remove persist 'isClientSide' flag
++ if ((i & 2) != 0 /*&& (!this.isClientSide || (i & 4) == 0)*/ && (/*this.isClientSide ||*/ chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.FULL)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement // Paper - rewrite chunk system - change from ticking to full // Plazma - Remove persist 'isClientSide' flags
this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
}
if ((i & 1) != 0) {
this.blockUpdated(blockposition, iblockdata1.getBlock());
- if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
-+ if (/*!this.isClientSide &&*/ iblockdata.hasAnalogOutputSignal()) { // Plazma - Remove persist 'isClientSide' flag
++ if (/*!this.isClientSide &&*/ iblockdata.hasAnalogOutputSignal()) {
this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock());
}
}
-@@ -1630,7 +1632,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1631,7 +1634,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}
// Paper end - Perf: Optimize capturedTileEntities lookup
// CraftBukkit end
- return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE)); // Paper - rewrite chunk system
-+ return this.isOutsideBuildHeight(blockposition) ? null : (/*!this.isClientSide &&*/ !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE)); // Paper - rewrite chunk system // Plazma - Remove persist 'isClientSide' flag
++ return this.isOutsideBuildHeight(blockposition) ? null : (/*!this.isClientSide &&*/ !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE)); // Paper - rewrite chunk system // Plazma - Remove persist 'isClientSide' flags
}
public void setBlockEntity(BlockEntity blockEntity) {
@@ -6397,7 +6239,7 @@ index 53e85641cbbc49ad7e588741acc4227828c8dca1..3f0e466578188bf5dbdeb905908fea4f
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, hit.getBlockPos(), projectile).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/world/level/block/AbstractFurnaceBlock.java b/src/main/java/net/minecraft/world/level/block/AbstractFurnaceBlock.java
-index af71305c908ad4401bcddb120f50d76a34cd1131..ecdd56596d97a097db8511307122ae4274287456 100644
+index 1e3febdd19fe520c0e38079b3a0152c1b32aa6c7..cb41293b297f87af895d2b7d0f787918d0450bd9 100644
--- a/src/main/java/net/minecraft/world/level/block/AbstractFurnaceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AbstractFurnaceBlock.java
@@ -38,9 +38,9 @@ public abstract class AbstractFurnaceBlock extends BaseEntityBlock {
@@ -6546,7 +6388,7 @@ index f9a55f76fed8609bca167b2ea37464e8079de0c0..dbba3e6d9d1d631b8bc5c15e6032685b
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/BeaconBlock.java b/src/main/java/net/minecraft/world/level/block/BeaconBlock.java
-index debe8dbf1d5f3e58774903c5fcdcea672274ea61..25473693bc8404b45912402bb1d47fb1e8e18109 100644
+index ecd34884260a2ed0b3aff7e16183275dc8229505..1465db33f20dd017e7582b6203a03b995639b92b 100644
--- a/src/main/java/net/minecraft/world/level/block/BeaconBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeaconBlock.java
@@ -46,7 +46,7 @@ public class BeaconBlock extends BaseEntityBlock implements BeaconBeamBlock {
@@ -6559,7 +6401,7 @@ index debe8dbf1d5f3e58774903c5fcdcea672274ea61..25473693bc8404b45912402bb1d47fb1
}
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-index c130d316e87f1f896d33ab43831063a89e3bef2b..bd8784d80665ca8f45ca78c9c792e4e79fb78a55 100644
+index 54836f2a1e4cc9046ba29fb71ea237b358c9cb7d..ef179d24e7938c51e62329600b9277832ba8359d 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
@@ -84,9 +84,11 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
@@ -6592,7 +6434,7 @@ index c130d316e87f1f896d33ab43831063a89e3bef2b..bd8784d80665ca8f45ca78c9c792e4e7
BedPart blockpropertybedpart = (BedPart) state.getValue(BedBlock.PART);
if (blockpropertybedpart == BedPart.FOOT) {
-@@ -362,7 +364,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+@@ -357,7 +359,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
@Override
public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {
super.setPlacedBy(world, pos, state, placer, itemStack);
@@ -6601,7 +6443,7 @@ index c130d316e87f1f896d33ab43831063a89e3bef2b..bd8784d80665ca8f45ca78c9c792e4e7
BlockPos blockposition1 = pos.relative((Direction) state.getValue(BedBlock.FACING));
world.setBlock(blockposition1, (BlockState) state.setValue(BedBlock.PART, BedPart.HEAD), 3);
-@@ -373,7 +375,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+@@ -368,7 +370,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
// CraftBukkit end
world.blockUpdated(pos, Blocks.AIR);
state.updateNeighbourShapes(world, pos, 3);
@@ -6611,7 +6453,7 @@ index c130d316e87f1f896d33ab43831063a89e3bef2b..bd8784d80665ca8f45ca78c9c792e4e7
}
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
-index 6c0ea0bde1c36edda92807e317ed37f8b1bdac6a..8840bea07f0b43b8919604a0492ee7669aa00442 100644
+index 4e709c9b126c905a98156639c5ab193a5c496793..2347f0d91dbdab4f6fdb038cca88c29d5c2c0a6d 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -96,7 +96,7 @@ public class BeehiveBlock extends BaseEntityBlock {
@@ -6632,7 +6474,7 @@ index 6c0ea0bde1c36edda92807e317ed37f8b1bdac6a..8840bea07f0b43b8919604a0492ee766
player.awardStat(Stats.ITEM_USED.get(item));
}
}
-@@ -295,7 +295,7 @@ public class BeehiveBlock extends BaseEntityBlock {
+@@ -290,7 +290,7 @@ public class BeehiveBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -6642,7 +6484,7 @@ index 6c0ea0bde1c36edda92807e317ed37f8b1bdac6a..8840bea07f0b43b8919604a0492ee766
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/BellBlock.java b/src/main/java/net/minecraft/world/level/block/BellBlock.java
-index 104d228633110746dde42b187ad23d1b2406b5ee..73615c055c5ed16dd025808560ee8d83ec85bb4b 100644
+index b34a124adb1360ab1a8977e838134b4b22c2ac37..62072b66c894c4c7cd03aff6d7a86756d489e405 100644
--- a/src/main/java/net/minecraft/world/level/block/BellBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BellBlock.java
@@ -144,7 +144,7 @@ public class BellBlock extends BaseEntityBlock {
@@ -6654,7 +6496,7 @@ index 104d228633110746dde42b187ad23d1b2406b5ee..73615c055c5ed16dd025808560ee8d83
if (direction == null) {
direction = (Direction) world.getBlockState(pos).getValue(BellBlock.FACING);
}
-@@ -281,7 +281,7 @@ public class BellBlock extends BaseEntityBlock {
+@@ -276,7 +276,7 @@ public class BellBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -6686,7 +6528,7 @@ index 2535e6d71b690f8dfde41a7d9cb76b6f010f5aa7..bf4c5d6f2b7c24a7f439f9026e405666
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 1748aea6613e0c8081f70092c9431e7e04907383..872756eedbb1a594cd76b249ef0db05fbf1d46c8 100644
+index 91e68335d7007e3c1fe13eec0060db01c5f659ac..7fb9e88961dd2344790ac467c361c68d3b08a4f1 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -191,9 +191,9 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -6702,10 +6544,10 @@ index 1748aea6613e0c8081f70092c9431e7e04907383..872756eedbb1a594cd76b249ef0db05f
world.setBlock(pos, newState, flags & -33, maxUpdateDepth);
}
diff --git a/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java b/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java
-index cbaa6fc04eb8d765e0dd8238f2b82eed196d13c7..4f869ab05d3f31e1b8e4faf7ade79b4499934197 100644
+index 594d2dc0379528d2535731390deba057b3d743c5..2be670bfa590a8e890eaf3d384ecedd8919b3579 100644
--- a/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java
-@@ -63,7 +63,7 @@ public class BrewingStandBlock extends BaseEntityBlock {
+@@ -58,7 +58,7 @@ public class BrewingStandBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -6714,7 +6556,7 @@ index cbaa6fc04eb8d765e0dd8238f2b82eed196d13c7..4f869ab05d3f31e1b8e4faf7ade79b44
}
@Override
-@@ -73,7 +73,7 @@ public class BrewingStandBlock extends BaseEntityBlock {
+@@ -68,7 +68,7 @@ public class BrewingStandBlock extends BaseEntityBlock {
@Override
protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) {
@@ -6801,10 +6643,10 @@ index ddd1504ed9516f8f247cd63c42d5d1db0c01ce67..38fee8cda4b95a5bb9dd02ca6eca776c
@Nullable
diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
-index 2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb..0e6dafeef9bc405aaa6150ffbf41a8f33b174777 100644
+index 299d782c4e84d8548f2faddfb03712bab388de09..2ef78865012e0f06636dc421db4dbecde5731c48 100644
--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
-@@ -183,11 +183,13 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
+@@ -178,11 +178,13 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
}
public static void dowse(@Nullable Entity entity, LevelAccessor world, BlockPos pos, BlockState state) {
@@ -6818,7 +6660,7 @@ index 2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb..0e6dafeef9bc405aaa6150ffbf41a8f3
BlockEntity tileentity = world.getBlockEntity(pos);
-@@ -204,9 +206,9 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
+@@ -199,9 +201,9 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
boolean flag = (Boolean) state.getValue(CampfireBlock.LIT);
if (flag) {
@@ -6849,23 +6691,23 @@ index 9e7066ec9fa5a0a852f6e38052887a47be98cb55..06006f5a55e0543d06a99cbeb1a6b636
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-index 663eb96b8227f000448957b5d8ea13ca78cee329..7f79265f30cadca3a7ffc8d6793b7f3f37f4bb76 100644
+index 54f351f1cbb50a5b1aa3167e3a0b10bb0456c1cf..388e9732c572f009b2b8dd18ae72337eff277a92 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-@@ -333,7 +333,7 @@ public class ChestBlock extends AbstractChestBlock implements
+@@ -328,7 +328,7 @@ public class ChestBlock extends AbstractChestBlock implements
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
- return world.isClientSide ? createTickerHelper(type, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) : null;
-+ return /*world.isClientSide ? createTickerHelper(type, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) :*/ null; // Plazma - Remove persist 'isClientSide' flag
++ return null; //world.isClientSide ? createTickerHelper(type, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) : null; // Plazma - Remove persist 'isClientSide' flag
}
public static boolean isChestBlockedAt(LevelAccessor world, BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
-index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..dd90935c1e6bc2904f84cfa0ef04829c417cb121 100644
+index c0a1b247245f7dbe11ba9da3da467d2177bc898e..f070cf1ca733005976478d528b7c4710813862ab 100644
--- a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
-@@ -145,16 +145,16 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
+@@ -140,16 +140,16 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
}
private static void addBook(Level world, BlockPos pos, Player player, ChiseledBookShelfBlockEntity blockEntity, ItemStack stack, int slot) {
@@ -6885,7 +6727,7 @@ index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..dd90935c1e6bc2904f84cfa0ef04829c
ItemStack itemStack = blockEntity.removeItem(slot, 1);
SoundEvent soundEvent = itemStack.is(Items.ENCHANTED_BOOK)
? SoundEvents.CHISELED_BOOKSHELF_PICKUP_ENCHANTED
-@@ -165,7 +165,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
+@@ -160,7 +160,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
}
world.gameEvent(player, GameEvent.BLOCK_CHANGE, pos);
@@ -6894,7 +6736,7 @@ index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..dd90935c1e6bc2904f84cfa0ef04829c
}
@Nullable
-@@ -230,12 +230,14 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
+@@ -225,12 +225,14 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
@Override
protected int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
@@ -6911,7 +6753,7 @@ index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..dd90935c1e6bc2904f84cfa0ef04829c
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
-index fb5777b6a729a465c2482c5f89ced2bc79b425bc..1ebc28e28137431b11b6e7d9b305019a9d6a5f81 100644
+index 40c79df819a111b88adbbd006e3696f3684090c9..851087bc464329fc0d19b1d122bcf85056be35e4 100644
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
@@ -66,7 +66,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
@@ -6933,10 +6775,10 @@ index fb5777b6a729a465c2482c5f89ced2bc79b425bc..1ebc28e28137431b11b6e7d9b305019a
private void setPoweredAndUpdate(Level world, BlockPos pos, CommandBlockEntity blockEntity, boolean powered) {
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-index ed3a310d56a0cca8c4c11c3768ac2056cd11edea..f5b498bf68d351e42f5db5ae28aab4923847e3a5 100644
+index 809a820dd8eec3e48dd3263335c62fbea4cd4f2c..e5e8a4e71c3caf35c50803b7b966cd34adafc647 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-@@ -271,7 +271,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -273,7 +273,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
// Purpur start - sneak to bulk process composter
private static @Nullable BlockState process(int level, Player player, BlockState state, Level world, BlockPos pos, ItemStack stack) {
@@ -6945,7 +6787,7 @@ index ed3a310d56a0cca8c4c11c3768ac2056cd11edea..f5b498bf68d351e42f5db5ae28aab492
BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack);
// Paper start - handle cancelled events
if (iblockdata1 == null) {
-@@ -334,13 +334,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -336,13 +336,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
}
}
// CraftBukkit end
@@ -6962,7 +6804,7 @@ index ed3a310d56a0cca8c4c11c3768ac2056cd11edea..f5b498bf68d351e42f5db5ae28aab492
BlockState iblockdata1 = ComposterBlock.empty(user, state, world, pos);
diff --git a/src/main/java/net/minecraft/world/level/block/ConduitBlock.java b/src/main/java/net/minecraft/world/level/block/ConduitBlock.java
-index 71798bea02c49a0dc0a0b330370b956e8d3f4608..98b00c05c340e76580c0d42ed4146f94d4fda2cf 100644
+index 1a6eddedb5518faf9b1e038ff382c603d7237c5c..4a15f5222e1e5f34654315af34df52dfdadae7a6 100644
--- a/src/main/java/net/minecraft/world/level/block/ConduitBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ConduitBlock.java
@@ -55,7 +55,7 @@ public class ConduitBlock extends BaseEntityBlock implements SimpleWaterloggedBl
@@ -6970,12 +6812,12 @@ index 71798bea02c49a0dc0a0b330370b956e8d3f4608..98b00c05c340e76580c0d42ed4146f94
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
- return createTickerHelper(type, BlockEntityType.CONDUIT, world.isClientSide ? ConduitBlockEntity::clientTick : ConduitBlockEntity::serverTick);
-+ return createTickerHelper(type, BlockEntityType.CONDUIT, /*world.isClientSide ? ConduitBlockEntity::clientTick :*/ ConduitBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag
++ return createTickerHelper(type, BlockEntityType.CONDUIT, /*world.isClientSide ? ConduitBlockEntity::clientTick :*/ ConduitBlockEntity::serverTick);
}
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
-index 0e609b1e3abd50b415d8376dc550375a8a0251b6..4942f6e95e9c44cb441d68e819f7aca93908660a 100644
+index 481949e01a8b47205ee0884f95579fa3e28a5532..e99232de1df8494aa8d39be0da3522046eabcc32 100644
--- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
@@ -109,7 +109,7 @@ public class CrafterBlock extends BaseEntityBlock {
@@ -7024,10 +6866,10 @@ index 6a2123cd808fa79f3cdb1cb56632d29bfe99058d..55e4863038b958eda589d0c6e2ea1db0
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java b/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java
-index b0bf44dcb81e6c63b9eac45ced9906bb231ea07b..4d03e6a8b4582b1fecc81e88ee11829bb4d46541 100644
+index 2a67a84a6126a317106cc429a8a8b1f35d53c849..441caac729241c21d7cc86afd155043d98c679ea 100644
--- a/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java
-@@ -48,13 +48,15 @@ public class CreakingHeartBlock extends BaseEntityBlock {
+@@ -56,11 +56,13 @@ public class CreakingHeartBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -7036,16 +6878,14 @@ index b0bf44dcb81e6c63b9eac45ced9906bb231ea07b..4d03e6a8b4582b1fecc81e88ee11829b
return null;
} else {
+ */ // Plazma - Remove persist 'isClientSide' flag
- return state.getValue(CREAKING) != CreakingHeartBlock.CreakingHeartState.DISABLED
- ? createTickerHelper(type, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick)
- : null;
+ return state.getValue(ACTIVE) ? createTickerHelper(type, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick) : null;
- }
+ //} // Plazma - Remove persist 'isClientSide' flag
}
- public static boolean canSummonCreaking(Level world) {
+ public static boolean isNaturalNight(Level world) {
diff --git a/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java b/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java
-index 7fd7f20d524fa980ed8ff8e0ca8adb9af203ccda..8be7464b07d91cae1336f182bc18e33cb9301409 100644
+index 6e63ecbf425950f71bee9bf416cb6a77b6005ab6..4e912962ca254548fcc930242f6486ca26ed3407 100644
--- a/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java
@@ -85,13 +85,13 @@ public class DaylightDetectorBlock extends BaseEntityBlock {
@@ -7064,7 +6904,7 @@ index 7fd7f20d524fa980ed8ff8e0ca8adb9af203ccda..8be7464b07d91cae1336f182bc18e33c
return InteractionResult.SUCCESS;
}
-@@ -115,7 +115,7 @@ public class DaylightDetectorBlock extends BaseEntityBlock {
+@@ -110,7 +110,7 @@ public class DaylightDetectorBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -7074,7 +6914,7 @@ index 7fd7f20d524fa980ed8ff8e0ca8adb9af203ccda..8be7464b07d91cae1336f182bc18e33c
private static void tickEntity(Level world, BlockPos pos, BlockState state, DaylightDetectorBlockEntity blockEntity) {
diff --git a/src/main/java/net/minecraft/world/level/block/DecoratedPotBlock.java b/src/main/java/net/minecraft/world/level/block/DecoratedPotBlock.java
-index 3ec6ed1e9ba25165a7deb2f767b8d064d1f89d5f..bbc52c7187cf313a0152aa0359954f50d411b274 100644
+index 0e383747ce9e81245c2fdc753fc6bafd923645ff..5c2c75483584d5492b0166d7c539dccd55d8d748 100644
--- a/src/main/java/net/minecraft/world/level/block/DecoratedPotBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DecoratedPotBlock.java
@@ -99,9 +99,11 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog
@@ -7117,7 +6957,7 @@ index fa1c4defd0d4e4cd888eb26eed131539d0ed573f..cf8b8eaed8932d53ddafae24148d2001
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
-index 5a6c153fa2873aecba0d0d02be2cc2a514f445e3..a6af04d32e69c4a7fcb4d12f98fb12abefa3b9b8 100644
+index 01584d77a8877528c3ec65971a1a6377c09e763b..08882ab963b2445843c5d8545727f1576770d9fb 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -74,7 +74,7 @@ public class DispenserBlock extends BaseEntityBlock {
@@ -7196,15 +7036,15 @@ index b6799db00e157892dd4339a01d2ca36092c8e491..74a42da0cf747670761d7f19484fa004
return;
}
diff --git a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
-index ce6a9e15ae0114623e79b5d8c244c2c490a3f74e..0075b481aa17c1c5ee5b591fc0efe1745d815735 100644
+index 248039ac7eab85b29ae3c525a986d91aa8d177fe..ce8d69e4b8850d675611aad548a88a1a2e7c4a7c 100644
--- a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
-@@ -93,14 +93,14 @@ public class EnchantingTableBlock extends BaseEntityBlock {
+@@ -88,14 +88,14 @@ public class EnchantingTableBlock extends BaseEntityBlock {
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
- return world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null;
-+ return /*world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) :*/ null; // Plazma - Remove persist 'isClientSide' flag
++ return null; //world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null; // Plazma - Remove persist 'isClientSide' flag
}
@Override
@@ -7218,7 +7058,7 @@ index ce6a9e15ae0114623e79b5d8c244c2c490a3f74e..0075b481aa17c1c5ee5b591fc0efe174
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
-index abb75f9389167a1f51a2c50831664d50181749de..fdebf1f4ae72001c24b20dd973ca7dd54e30df3d 100644
+index 47ee0538c8ea94136b2416c324c8a264e54d2c09..938c50eb78daac54858e67261c7b75a2c9441026 100644
--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
@@ -47,7 +47,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
@@ -7230,43 +7070,60 @@ index abb75f9389167a1f51a2c50831664d50181749de..fdebf1f4ae72001c24b20dd973ca7dd5
}
@Override
-@@ -100,8 +100,8 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
+@@ -100,9 +100,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
// Paper end - call EntityPortalEnterEvent
BlockEntity tileentity = world.getBlockEntity(pos);
- if (!world.isClientSide && tileentity instanceof TheEndGatewayBlockEntity) {
- TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity;
-+ if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity tileentity) { // Plazma - Remove persist 'isClientSide' flag + minor improvement
-+ //TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity; // Plazma - Remove persist 'isClientSide' flag + minor improvement
-
+-
++ if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity tileentityendgateway) { // Plazma - Remove persist 'isClientSide' flag
if (!tileentityendgateway.isCoolingDown()) {
// Purpur start
+ if (world.purpurConfig.imposeTeleportRestrictionsOnGateways && (entity.isVehicle() || entity.isPassenger())) {
diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
-index 2dffc3990d9ae3d595d923239885e3a7d8ec04f3..487197df3a9d24f03a21f5fddd5f87d393646596 100644
+index 84ecb012cb0a47e47799dc73c7fadc75f462f47a..507b19699d081c85cd8b75bdb1fa24e38bf383c9 100644
--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
-@@ -82,7 +82,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
+@@ -82,9 +82,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
world.getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) return; // Paper - make cancellable
// CraftBukkit end
- if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) {
-+ if (/*!world.isClientSide &&*/ world.dimension() == Level.END && entity instanceof ServerPlayer) { // Plazma - Remove persist 'isClientSide' flag
- ServerPlayer entityplayer = (ServerPlayer) entity;
-
+- ServerPlayer entityplayer = (ServerPlayer) entity;
+-
++ if (/*!world.isClientSide &&*/ world.dimension() == Level.END && entity instanceof ServerPlayer entityplayer) { // Plazma - Remove persist 'isClientSide' flag
if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits
+ if (!entityplayer.seenCredits) {
+ entityplayer.showEndCredits();
diff --git a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
-index 6ad4aa371607ab92616626285a7e71757c76a3db..4834e3e9990a9be1a9441191c42f238dd024dfdf 100644
+index bfe79431dc5707677671df5c0787817c6e14a676..80762da21d21e21da0101d01f460bf7abe0d1f68 100644
--- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
-@@ -141,7 +141,7 @@ public class EnderChestBlock extends AbstractChestBlock i
+@@ -136,7 +136,7 @@ public class EnderChestBlock extends AbstractChestBlock i
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
- return world.isClientSide ? createTickerHelper(type, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) : null;
-+ return /*world.isClientSide ? createTickerHelper(type, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) :*/ null; // Plazma - Remove persist 'isClientSide' flag
++ return null; //world.isClientSide ? createTickerHelper(type, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) : null; // Plazma - Remove persist 'isClientSide' flag
}
@Override
+diff --git a/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java b/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
+index efe3f34a32fd01c9edba937b4b8ea25f51d86ba0..c375cb0f4b0c7bb938676e6aaeffc5b74071be97 100644
+--- a/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
+@@ -101,8 +101,8 @@ public class EyeblossomBlock extends FlowerBlock {
+ @Override
+ protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+ if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent
+- if (!world.isClientSide()
+- && world.getDifficulty() != Difficulty.PEACEFUL
++ if (/*!world.isClientSide() // Plazma - Remove persist 'isClientSide' flag
++ &&*/ world.getDifficulty() != Difficulty.PEACEFUL // Plazma - Remove persist 'isClientSide' flag
+ && entity instanceof Bee bee
+ && Bee.attractsBees(state)
+ && !bee.hasEffect(MobEffects.POISON)) {
diff --git a/src/main/java/net/minecraft/world/level/block/FenceBlock.java b/src/main/java/net/minecraft/world/level/block/FenceBlock.java
index 86e8153012673f2b8ec0306b5bd4bdc8e39cd226..c6f44247622bdc5633218629fa091dc59bb0cefe 100644
--- a/src/main/java/net/minecraft/world/level/block/FenceBlock.java
@@ -7303,10 +7160,10 @@ index 5201a11503362c2d43a9eee028613137ac9ae451..f664f78058f6045db26baa96666aceae
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java b/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java
-index 59c000612bbf7beb7208af48001d3b1e5111ebd4..4256ad5b20b63b1792cde46c20e63451ec41faad 100644
+index a1a98c9407f8d9ce37cac073f9704c009355309f..56a60485e9e40559ad2b38e1ade3940775868008 100644
--- a/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java
-@@ -156,11 +156,11 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock {
+@@ -151,11 +151,11 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock {
@Override
protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) {
@@ -7358,7 +7215,7 @@ index 5c360c6768582c1a35431739613e9b406875cc21..3536d74b4d422e6548d73bcba6d94368
+ */ // Plazma - Remove persist 'isClientSide' flag
}
diff --git a/src/main/java/net/minecraft/world/level/block/HopperBlock.java b/src/main/java/net/minecraft/world/level/block/HopperBlock.java
-index 005a2a66a6e8a492acfa7ba91117884cda08562d..39ac1d40b69ba3909cd9b26f62f3b4e872d3e612 100644
+index 8ba23af2fa6c5174aa3ec34e78f9c21ce786c4fc..9234efe97df347837095bd7c55742eb856fe17e2 100644
--- a/src/main/java/net/minecraft/world/level/block/HopperBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/HopperBlock.java
@@ -113,7 +113,7 @@ public class HopperBlock extends BaseEntityBlock {
@@ -7380,10 +7237,10 @@ index 005a2a66a6e8a492acfa7ba91117884cda08562d..39ac1d40b69ba3909cd9b26f62f3b4e8
}
diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
-index 70f2e6278e2d970245ca5b46fbd9ffae4727b47b..d8eec65e1a40159621f7069f911aa17531271ddd 100644
+index 1ca52ab9379a4758ec4583bb201e4b1954297da7..d3a2c068237c082b1e7e2ff4163b856013d083df 100644
--- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
-@@ -90,7 +90,7 @@ public class LecternBlock extends BaseEntityBlock {
+@@ -85,7 +85,7 @@ public class LecternBlock extends BaseEntityBlock {
Player entityhuman = ctx.getPlayer();
boolean flag = false;
@@ -7392,7 +7249,7 @@ index 70f2e6278e2d970245ca5b46fbd9ffae4727b47b..d8eec65e1a40159621f7069f911aa175
CustomData customdata = (CustomData) itemstack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY);
if (customdata.contains("Book")) {
-@@ -144,9 +144,9 @@ public class LecternBlock extends BaseEntityBlock {
+@@ -139,9 +139,9 @@ public class LecternBlock extends BaseEntityBlock {
public static boolean tryPlaceBook(@Nullable LivingEntity user, Level world, BlockPos pos, BlockState state, ItemStack stack) {
if (!(Boolean) state.getValue(LecternBlock.HAS_BOOK)) {
@@ -7404,7 +7261,7 @@ index 70f2e6278e2d970245ca5b46fbd9ffae4727b47b..d8eec65e1a40159621f7069f911aa175
return true;
} else {
-@@ -296,9 +296,9 @@ public class LecternBlock extends BaseEntityBlock {
+@@ -291,9 +291,9 @@ public class LecternBlock extends BaseEntityBlock {
@Override
protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) {
if ((Boolean) state.getValue(LecternBlock.HAS_BOOK)) {
@@ -7446,7 +7303,7 @@ index 1e7fec5c89c38943d13150a527b5acd239c21901..bd372e8af221783ffdbdbea4eb594c25
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/LightBlock.java b/src/main/java/net/minecraft/world/level/block/LightBlock.java
-index fec6bf38f080039436ba80d5528857ba4787bf4e..a943ee28712a65183e2c6e9cc3debaa169e8ffdc 100644
+index 9f6bb23b6021a99d4bb09d57659943cfdb4b673f..5b2351de4d56ae1ea51eee2d048b6e3a5733d343 100644
--- a/src/main/java/net/minecraft/world/level/block/LightBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LightBlock.java
@@ -60,7 +60,7 @@ public class LightBlock extends Block implements SimpleWaterloggedBlock {
@@ -7477,10 +7334,10 @@ index 1b57f8cf3f4f27f6a76fec82a542ec1c582470c9..c315b61b2f077f62d70779465474d60b
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java b/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java
-index 4f432a153d2f3230970cc6df2bda7e633e81cd6d..30d4feda19ef301aebba25b860e338bcb219d6b9 100644
+index ac6c2607c57d6df820aea773cc9ce96a0dc823cb..22c4369fe52e4b5281b0809c20f3e2c37c3037c6 100644
--- a/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java
-@@ -213,13 +213,13 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock {
+@@ -208,13 +208,13 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock {
@Override
public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {
@@ -7789,7 +7646,7 @@ index 2d3f425778302490dd3654d487cfa3cfed6fb9e8..0bc2a449f711f3c75858165af93588c5
return state;
}
diff --git a/src/main/java/net/minecraft/world/level/block/SculkCatalystBlock.java b/src/main/java/net/minecraft/world/level/block/SculkCatalystBlock.java
-index e0667753ce67d2bafebf4dbcc35337d4287d92f4..c94271279ac4ae40d7900abb8cf3897e55e89e55 100644
+index 62ce1bdfb7c5ba0af4049972b33c7c375a64309c..4d8f99750b5be36e3ba6a62c11f50b68aef7deba 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkCatalystBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkCatalystBlock.java
@@ -57,7 +57,7 @@ public class SculkCatalystBlock extends BaseEntityBlock {
@@ -7802,7 +7659,7 @@ index e0667753ce67d2bafebf4dbcc35337d4287d92f4..c94271279ac4ae40d7900abb8cf3897e
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java
-index 0ed449a188d98f87dbddd2d76009fed02a29ed25..b70fe3b96b0eac7733349f75c77b38438b7846a6 100644
+index bee8b26358034b2a007cd708cf52995887bf827e..f6397de47ad2e9773452c5c29d31e2f8621d0a4f 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java
@@ -107,7 +107,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg
@@ -7819,7 +7676,7 @@ index 0ed449a188d98f87dbddd2d76009fed02a29ed25..b70fe3b96b0eac7733349f75c77b3843
@Override
protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
- if (!world.isClientSide() && !state.is(oldState.getBlock())) {
-+ if (/*!world.isClientSide() &&*/ !state.is(oldState.getBlock())) { // Plazma - Remove persist 'isClientSide' flag
++ if (/*!world.isClientSide() &&*/ !state.is(oldState.getBlock())) {
if ((Integer) state.getValue(SculkSensorBlock.POWER) > 0 && !world.getBlockTicks().hasScheduledTick(pos, this)) {
world.setBlock(pos, (BlockState) state.setValue(SculkSensorBlock.POWER, 0), 18);
}
@@ -7836,10 +7693,10 @@ index 0ed449a188d98f87dbddd2d76009fed02a29ed25..b70fe3b96b0eac7733349f75c77b3843
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
-index e00fcea07e74de647c26ff9eb32bc682738c15b7..5b94f164b94c2434a946858c185f64ff9e26fa67 100644
+index db2b21d5842fafa48dbde25a461505d03aa9b955..4aec2d6c4284c57aeba1e55c99eb8a122497b6b1 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
-@@ -162,8 +162,8 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
+@@ -157,8 +157,8 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
@Nullable
@Override
public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) {
@@ -7851,10 +7708,10 @@ index e00fcea07e74de647c26ff9eb32bc682738c15b7..5b94f164b94c2434a946858c185f64ff
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
-index 155c7240b1112729333e6968122568c707d8f66b..d2787c48f21442cf4d6937880157615ceda2d21e 100644
+index c4e6c2714b215b99c884b2dca989c2d3d8f81fa0..679deb305c119bddc978cb7d6f0a0a388fc64021 100644
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
-@@ -136,7 +136,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
+@@ -130,7 +130,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) {
BlockEntity blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof ShulkerBoxBlockEntity shulkerBoxBlockEntity) {
@@ -7969,7 +7826,7 @@ index ec04fcc23c86d34a6dc1eaadda7f9d876f3d8ffe..ac52cdacf66dcf48213aaa327360c5a0
}
diff --git a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
-index 80ee7a6f010cc838625674007a3ea908f2f9dadd..2526e919fc60048502f0f57674faf8a34a1ef722 100644
+index fb88b5c1d9e764bf1211d601527133ea8e8268b3..8d5eb584d24ec8fdc7decc6569ea8a23855f6098 100644
--- a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
@@ -39,7 +39,7 @@ public class SpawnerBlock extends BaseEntityBlock {
@@ -7982,7 +7839,7 @@ index 80ee7a6f010cc838625674007a3ea908f2f9dadd..2526e919fc60048502f0f57674faf8a3
// Purpur start
diff --git a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
-index 0bf6503819b02e5ba2c346d9d563a93f2946d89b..c9ecd5b5cdfd294dbe4e7c5fe81a67a194569748 100644
+index ff655401c7aecba5acd8d241e844d77364f09f35..7e6aba582c81bfcc2851eab4efcc49e5d1bf2476 100644
--- a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
@@ -47,11 +47,11 @@ public class StonecutterBlock extends Block {
@@ -8000,7 +7857,7 @@ index 0bf6503819b02e5ba2c346d9d563a93f2946d89b..c9ecd5b5cdfd294dbe4e7c5fe81a67a1
return InteractionResult.SUCCESS;
}
diff --git a/src/main/java/net/minecraft/world/level/block/StructureBlock.java b/src/main/java/net/minecraft/world/level/block/StructureBlock.java
-index ec2ea748a164f47eb425efcd2ac0d43a23c2a9ca..ca4beb408306dc3bbc827361d024215830988d33 100644
+index bc85c8a51c954ff92879b67b383e282c1e8cba68..88b5a41e486027f79e1546d8b2da5cee95d4df39 100644
--- a/src/main/java/net/minecraft/world/level/block/StructureBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StructureBlock.java
@@ -51,14 +51,14 @@ public class StructureBlock extends BaseEntityBlock implements GameMasterBlock {
@@ -8020,6 +7877,19 @@ index ec2ea748a164f47eb425efcd2ac0d43a23c2a9ca..ca4beb408306dc3bbc827361d0242158
}
@Override
+diff --git a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java
+index 265c85413da04dbc7292a0af934a8b665b2fced5..58e791083d1495a815bf3d91819f4957bcd620ff 100644
+--- a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java
+@@ -91,7 +91,7 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock
+ ServerLevel worldserver = (ServerLevel) world;
+
+ if ((Integer) state.getValue(SweetBerryBushBlock.AGE) != 0) {
+- Vec3 vec3d = entity.isControlledByClient() ? entity.getKnownMovement() : entity.oldPosition().subtract(entity.position());
++ Vec3 vec3d = /*entity.isControlledByClient() ? entity.getKnownMovement() :*/ entity.oldPosition().subtract(entity.position()); // Plazma - Remove persist 'isClientSide' flag
+
+ if (vec3d.horizontalDistanceSqr() > 0.0D) {
+ double d0 = Math.abs(vec3d.x());
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
index ee4eb863b6c02f2bcbb03ca413fc98811d409ac5..e4aff00085a8dca4d70015651eee89e182c770ac 100644
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
@@ -8192,10 +8062,22 @@ index 2d190b3a6378b8cbadfa65510df1ccfbd5882ef8..69ef5c805d802575a639027fd40064d9
byte b0 = BeaconBlockEntity.getAmplification(beaconLevel, primaryEffect, secondaryEffect);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
-index 946c9dbfabf154db53d811906fd98d17992167d1..6a46eb93692028bd28ae1329de9c9b208878abb7 100644
+index 946c9dbfabf154db53d811906fd98d17992167d1..ca0aade0f74257734595e41b4aac89692944a9a4 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
-@@ -119,7 +119,7 @@ public class BellBlockEntity extends BlockEntity {
+@@ -88,9 +88,11 @@ public class BellBlockEntity extends BlockEntity {
+
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ public static void clientTick(Level world, BlockPos pos, BlockState state, BellBlockEntity blockEntity) {
+ BellBlockEntity.tick(world, pos, state, blockEntity, BellBlockEntity::showBellParticles);
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public static void serverTick(Level world, BlockPos pos, BlockState state, BellBlockEntity blockEntity) {
+ BellBlockEntity.tick(world, pos, state, blockEntity, BellBlockEntity::makeRaidersGlow);
+@@ -119,7 +121,7 @@ public class BellBlockEntity extends BlockEntity {
this.nearbyEntities = this.level.getEntitiesOfClass(LivingEntity.class, axisalignedbb);
}
@@ -8204,7 +8086,7 @@ index 946c9dbfabf154db53d811906fd98d17992167d1..6a46eb93692028bd28ae1329de9c9b20
Iterator iterator = this.nearbyEntities.iterator();
while (iterator.hasNext()) {
-@@ -129,7 +129,7 @@ public class BellBlockEntity extends BlockEntity {
+@@ -129,7 +131,7 @@ public class BellBlockEntity extends BlockEntity {
entityliving.getBrain().setMemory(MemoryModuleType.HEARD_BELL_TIME, this.level.getGameTime()); // CraftBukkit - decompile error
}
}
@@ -8213,11 +8095,31 @@ index 946c9dbfabf154db53d811906fd98d17992167d1..6a46eb93692028bd28ae1329de9c9b20
this.nearbyEntities.removeIf(e -> !e.isAlive()); // Paper - Fix bell block entity memory leak
}
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+index a43c41a26c1e34a2f4eda1c498a562664a783c77..f8a7d5ee6214b2db5c714c3cb7643224d053fcaa 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+@@ -83,6 +83,7 @@ public class ConduitBlockEntity extends BlockEntity {
+ return this.saveCustomOnly(registries);
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ public static void clientTick(Level world, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) {
+ ++blockEntity.tickCount;
+ long i = world.getGameTime();
+@@ -100,6 +101,7 @@ public class ConduitBlockEntity extends BlockEntity {
+ }
+
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public static void serverTick(Level world, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) {
+ ++blockEntity.tickCount;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
-index 853263b4dd28a5b7620dde17c13412193036eda9..e84cf74aa58d1d7ed15b7fc5b6d1633ddce525ea 100644
+index 27f8110d39ce44cf5605dc32df339fd7ca99f80b..dac1b1bcf4950d443fc62a29fb9b57106334bf84 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
-@@ -223,7 +223,7 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable
+@@ -212,7 +212,7 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable
}
public void wobble(DecoratedPotBlockEntity.WobbleStyle wobbleType) {
@@ -8252,7 +8154,7 @@ index aeeb8af68ea43ae6c93952610918d77b1593ed54..82606b6a0aac46588322f036e824da62
private boolean inventoryFull() {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
-index c3bbe5e9e0cc37f3f22fc1d839fa2652966f1266..e32c4aadf1b36e27e8cb9dba039ea1c41f49ad55 100644
+index 668ec9dfb888715aa1cca67bd28e610b8d0f2a93..ae52703cf15f57a1070f7a84caacf1c4807fc821 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
@@ -93,7 +93,7 @@ public class JukeboxBlockEntity extends BlockEntity implements ContainerSingleIt
@@ -8264,6 +8166,22 @@ index c3bbe5e9e0cc37f3f22fc1d839fa2652966f1266..e32c4aadf1b36e27e8cb9dba039ea1c4
BlockPos blockposition = this.getBlockPos();
ItemStack itemstack = this.getTheItem();
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java
+index 3ee153a831bfa776b54c924d9dad37322601e223..22fe2e80359016d73ac9d6c2466043151ca8636b 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java
+@@ -48,9 +48,11 @@ public class SpawnerBlockEntity extends BlockEntity implements Spawner {
+ this.spawner.save(nbt);
+ }
+
++ /* // Plazma - Remove persist 'isClientSide' flag
+ public static void clientTick(Level world, BlockPos pos, BlockState state, SpawnerBlockEntity blockEntity) {
+ blockEntity.spawner.clientTick(world, pos);
+ }
++ */ // Plazma - Remove persist 'isClientSide' flag
+
+ public static void serverTick(Level world, BlockPos pos, BlockState state, SpawnerBlockEntity blockEntity) {
+ blockEntity.spawner.serverTick((ServerLevel)world, pos);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
index 0147a7be5fd147ffa9bd42a90e85a324bc317a81..49d4b147e41d8f436947ca4d5ac22ea7cbd854dc 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
@@ -8321,10 +8239,10 @@ index 4045ae665450f6e3f5630cb25cc53be850afd1a8..ddc6b6b26dec60cc6a4111cf00fa0284
public VaultSharedData getSharedData() {
diff --git a/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java b/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java
-index b696597540d998c52ec3207ffd8bf658fde59215..a030a22057d35ebb6d84cb43cff12a2f36487feb 100644
+index 9cb3d1bfc4d524d272819c2ce27d005595b319ab..bb904aa6acc2aa75a96d4fb8d01a2ca3e0d4a802 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java
-@@ -85,7 +85,7 @@ public class MovingPistonBlock extends BaseEntityBlock {
+@@ -86,7 +86,7 @@ public class MovingPistonBlock extends BaseEntityBlock {
@Override
protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) {
@@ -8386,7 +8304,7 @@ index 4b51472502d08ea357da437afeb4b581979e9cff..fb5e18b7be62ff07af65229b1a38b6d6
if (type == 0) {
if (!this.moveBlocks(world, pos, enumdirection, true)) {
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonHeadBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonHeadBlock.java
-index c5c297b1081c9ddbb3bd0a0947401041aa8fec7d..ca409b4e49d9b7842a0d35fef10f8f53feffcf1e 100644
+index d35bf8367b0ec573dd3a3eebadcdf401ff5633d2..3ca49b109513bfd24373ad87898f666106fc05ac 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonHeadBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonHeadBlock.java
@@ -111,7 +111,7 @@ public class PistonHeadBlock extends DirectionalBlock {
@@ -8433,41 +8351,41 @@ index e1c9a961064887070b29207efd7af47884f8dc29..6feb7f915dac585916ac02a7f4a83b47
float f = blockEntity.progress + 0.5F;
moveCollidedEntities(world, pos, f, blockEntity);
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 5c4843f6cfd13790a44fc0f928f1fbcef8a648ce..3b3915c4f93f7e35392255c1352e236208a2b447 100644
+index 090e196cf391dced8adcb8106026d67b2aeac6b0..44cd8ba60233ec86d9c9316fe7c28eee5ce88f7a 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -430,7 +430,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -435,7 +435,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
boolean flag3 = iblockdata1.hasBlockEntity();
- if (!this.level.isClientSide && !this.level.isBlockPlaceCancelled) { // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent
-+ if (/*!this.level.isClientSide &&*/ !this.level.isBlockPlaceCancelled) { // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent // Plazma - Remove persist 'isClientSide' flag
++ if (/*!this.level.isClientSide &&*/ !this.level.isBlockPlaceCancelled) { // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent // Plazma - Remove persist 'isClientSide' flags
iblockdata1.onRemove(this.level, blockposition, iblockdata, flag);
} else if (!iblockdata1.is(block) && flag3) {
this.removeBlockEntity(blockposition);
-@@ -440,7 +440,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -445,7 +445,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
return null;
} else {
// CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
- if (!this.level.isClientSide && doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) {
-+ if (/*!this.level.isClientSide &&*/ doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Plazma - Remove persist 'isClientSide' flag
++ if (/*!this.level.isClientSide &&*/ doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Plazma - Remove persist 'isClientSide' flags
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
}
-@@ -542,7 +542,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -547,7 +547,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
}
private boolean isInLevel() {
- return this.loaded || this.level.isClientSide();
-+ return this.loaded; //|| this.level.isClientSide(); // Plazma - Remove persist 'isClientSide' flag
++ return this.loaded; //|| this.level.isClientSide(); // Plazma - Remove persist 'isClientSide' flags
}
boolean isTicking(BlockPos pos) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
-index 54debe9da0a26aea02c964fdc7efb372e07974c0..2e630167b1d21bc67a88e725a5e451bcf34441fb 100644
+index d9f9d4abaec00335abe80de26419aef676b0b076..030cb1f4e07b12b30cbcca5e808728adffe08a21 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
-@@ -128,9 +128,11 @@ public class CraftMerchantCustom implements CraftMerchant {
+@@ -128,10 +128,12 @@ public class CraftMerchantCustom implements CraftMerchant {
public void overrideOffers(MerchantOffers offers) {
}
@@ -8477,8 +8395,9 @@ index 54debe9da0a26aea02c964fdc7efb372e07974c0..2e630167b1d21bc67a88e725a5e451bc
return false;
}
+ */ // Plazma - Remove persist 'isClientSide' flag
- }
- }
+
+ @Override
+ public boolean stillValid(Player player) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
index 37458e8fd5d57acbf90a6bea4e66797cb07f69fa..313e3202e5f1acbdf9aba0826139c3e94de9de0a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
diff --git a/patches/server/0043-Process-pathfinding-asynchronously.patch b/patches/server/0043-Process-pathfinding-asynchronously.patch
index cb13182bd..30f03cb5d 100644
--- a/patches/server/0043-Process-pathfinding-asynchronously.patch
+++ b/patches/server/0043-Process-pathfinding-asynchronously.patch
@@ -464,12 +464,12 @@ index 0000000000000000000000000000000000000000..3456f38d381643b0461669b0b5fec6bf
+
+}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
-index 3d7578605812021bc84b99d4db1672a682d897ad..58feaaed5e301eb402dab24e6f155beb865fa5ee 100644
+index 273ba657926ce72a7c82861e880a82bf7f322a0b..f90a14860e4c9a11a972edc3cea011e1cf67b4eb 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
-@@ -76,6 +76,35 @@ public class AcquirePoi {
- io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, poiPredicate, predicate2, entity.blockPosition(), world.purpurConfig.villagerAcquirePoiSearchRadius, world.purpurConfig.villagerAcquirePoiSearchRadius*world.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes);
- Set, BlockPos>> set = new java.util.HashSet<>(poiposes);
+@@ -94,6 +94,35 @@ public class AcquirePoi {
+ }
+ }
// Paper end - optimise POI access
+ // Plazma start - Process Pathfinding Asynchronously
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) {
@@ -653,23 +653,23 @@ index 6802e0c4d331c7125114dd86409f6a110465ab82..0b8973765bcaa77e70ac7afe5b6a99ab
if (path != null && path.canReach()) {
BlockPos blockPos = path.getTarget();
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
-index 74aca307b4ebffe4e33c4fca3e07c23ca87622ac..a1c99a611c9b0c99d851393c668fe02c5a31536f 100644
+index 2846790fcd00788cf0284c348161ee1aee415f13..069e27041434c11ae5235ccb0e17544fe4a14e12 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
@@ -56,7 +56,7 @@ public abstract class DoorInteractGoal extends Goal {
} else {
GroundPathNavigation groundPathNavigation = (GroundPathNavigation)this.mob.getNavigation();
Path path = groundPathNavigation.getPath();
-- if (path != null && !path.isDone() && groundPathNavigation.canOpenDoors()) {
-+ if (path != null && path.isProcessed() && !path.isDone() && groundPathNavigation.canOpenDoors()) { // Plazma - Process Pathfinding asynchronously
+- if (path != null && !path.isDone()) {
++ if (path != null && path.isProcessed() && !path.isDone()) { // Plazma - Process Pathfinding asynchronously
for (int i = 0; i < Math.min(path.getNextNodeIndex() + 2, path.getNodeCount()); i++) {
Node node = path.getNode(i);
this.doorPos = new BlockPos(node.x, node.y + 1, node.z);
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
-index ee38e447a810094d2253b85714b74282a4b4c2bc..8361b230963469d564d6280414ea083e975f9cf7 100644
+index 29b852c3262c9cd0d2c77a93c01a386a2c184742..8361b230963469d564d6280414ea083e975f9cf7 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
-@@ -12,12 +12,26 @@ public class AmphibiousPathNavigation extends PathNavigation {
+@@ -12,11 +12,26 @@ public class AmphibiousPathNavigation extends PathNavigation {
super(mob, world);
}
@@ -687,7 +687,7 @@ index ee38e447a810094d2253b85714b74282a4b4c2bc..8361b230963469d564d6280414ea083e
@Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new AmphibiousNodeEvaluator(false);
- this.nodeEvaluator.setCanPassDoors(true);
++ this.nodeEvaluator.setCanPassDoors(true);
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled)
+ return new PathFinder(this.nodeEvaluator, range, GENERATOR);
return new PathFinder(this.nodeEvaluator, range);
@@ -697,10 +697,10 @@ index ee38e447a810094d2253b85714b74282a4b4c2bc..8361b230963469d564d6280414ea083e
@Override
protected boolean canUpdatePath() {
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
-index a3e0c5af4cc9323c02e88e768cbda9e46854aea1..d68e97084ba6bc97312fc5b62ffcb6e6b21b056e 100644
+index 2bd66da93227d4e4fc2ec4df47ae94b17f4d39d3..ee395676b5eb14cd24b7251a83be7154d71b7b20 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
-@@ -16,12 +16,26 @@ public class FlyingPathNavigation extends PathNavigation {
+@@ -16,11 +16,26 @@ public class FlyingPathNavigation extends PathNavigation {
super(entity, world);
}
@@ -713,12 +713,12 @@ index a3e0c5af4cc9323c02e88e768cbda9e46854aea1..d68e97084ba6bc97312fc5b62ffcb6e6
+ evaluator.setCanFloat(features.canFloat());
+ evaluator.setCanWalkOverFences(features.canWalkOverFences());
+ return evaluator;
-+ };
++ };
+
@Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new FlyNodeEvaluator();
- this.nodeEvaluator.setCanPassDoors(true);
++ this.nodeEvaluator.setCanPassDoors(true);
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled)
+ return new PathFinder(this.nodeEvaluator, range, GENERATOR);
return new PathFinder(this.nodeEvaluator, range);
@@ -727,7 +727,7 @@ index a3e0c5af4cc9323c02e88e768cbda9e46854aea1..d68e97084ba6bc97312fc5b62ffcb6e6
@Override
protected boolean canMoveDirectly(Vec3 origin, Vec3 target) {
-@@ -50,6 +64,7 @@ public class FlyingPathNavigation extends PathNavigation {
+@@ -49,6 +64,7 @@ public class FlyingPathNavigation extends PathNavigation {
this.recomputePath();
}
@@ -736,10 +736,10 @@ index a3e0c5af4cc9323c02e88e768cbda9e46854aea1..d68e97084ba6bc97312fc5b62ffcb6e6
if (this.canUpdatePath()) {
this.followThePath();
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
-index f73b559b8e60859020f762dab88b67b8c912bf8f..d218604447afbde96dc4af33ba90a87617a13ed4 100644
+index 2796df7af365c452b28373adfd7daf1d6730bac5..921b0f792fbb3e7a0bb0275d8494a19830a08eae 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
-@@ -24,10 +24,23 @@ public class GroundPathNavigation extends PathNavigation {
+@@ -24,11 +24,25 @@ public class GroundPathNavigation extends PathNavigation {
super(entity, world);
}
@@ -753,16 +753,18 @@ index f73b559b8e60859020f762dab88b67b8c912bf8f..d218604447afbde96dc4af33ba90a876
+ evaluator.setCanWalkOverFences(features.canWalkOverFences());
+ return evaluator;
+ };
-+ // Plazma end - Process pathfinding asynchronously
+
@Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new WalkNodeEvaluator();
- this.nodeEvaluator.setCanPassDoors(true);
-+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) return new PathFinder(this.nodeEvaluator, range, GENERATOR); // Plazma - Process pathfinding asynchronously
++ this.nodeEvaluator.setCanPassDoors(true);
++ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) return new PathFinder(this.nodeEvaluator, range, GENERATOR);
return new PathFinder(this.nodeEvaluator, range);
}
++ // Plazma end - Process pathfinding asynchronously
+ @Override
+ protected boolean canUpdatePath() {
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 48c0de870a5bbf647309e69361dfb10ab56c65ab..99e31c8e8488ce7138c5385575cbbabe0bd7394e 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -836,10 +838,10 @@ index 48c0de870a5bbf647309e69361dfb10ab56c65ab..99e31c8e8488ce7138c5385575cbbabe
Vec3 vec3 = new Vec3(((double)node.x + this.mob.getX()) / 2.0, ((double)node.y + this.mob.getY()) / 2.0, ((double)node.z + this.mob.getZ()) / 2.0);
return pos.closerToCenterThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex()));
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
-index 0446ac540d8509a653abe1a8bc10f52fb43d6ae1..77c10a3e9570f53ce73dacb39cb86a00202e6ce6 100644
+index 943c9944ae17fa7cd72e437cce61beaf3fc9505e..77c10a3e9570f53ce73dacb39cb86a00202e6ce6 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
-@@ -15,10 +15,23 @@ public class WaterBoundPathNavigation extends PathNavigation {
+@@ -15,11 +15,23 @@ public class WaterBoundPathNavigation extends PathNavigation {
super(entity, world);
}
@@ -859,6 +861,7 @@ index 0446ac540d8509a653abe1a8bc10f52fb43d6ae1..77c10a3e9570f53ce73dacb39cb86a00
protected PathFinder createPathFinder(int range) {
this.allowBreaching = this.mob.getType() == EntityType.DOLPHIN;
this.nodeEvaluator = new SwimNodeEvaluator(this.allowBreaching);
+- this.nodeEvaluator.setCanPassDoors(false);
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) return new PathFinder(this.nodeEvaluator, range, GENERATOR); // Plazma - Process pathfinding asynchronously
return new PathFinder(this.nodeEvaluator, range);
}
@@ -894,10 +897,10 @@ index 9104d7010bda6f9f73b478c11490ef9c53f76da2..a53950a6e4cb2e672b6f130461fa6306
// Paper end - optimise POI access
if (path != null && path.canReach()) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index 6dec1720aea724baab541e26e14c9fa0646abdbf..bf4a3bc730709f41a5089dfe4c6342b08057ef02 100644
+index dc4231375730357f6b6d7f902a71b0a593a34a8e..c43c26134c3431e66c767d54fc5b8761ca109084 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -1206,7 +1206,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -1240,7 +1240,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
} else {
Bee.this.pathfindRandomlyTowards(Bee.this.hivePos);
}
@@ -906,7 +909,7 @@ index 6dec1720aea724baab541e26e14c9fa0646abdbf..bf4a3bc730709f41a5089dfe4c6342b0
boolean flag = this.pathfindDirectlyTowards(Bee.this.hivePos);
if (!flag) {
-@@ -1265,7 +1265,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -1299,7 +1299,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
} else {
Path pathentity = Bee.this.navigation.getPath();
@@ -916,10 +919,10 @@ index 6dec1720aea724baab541e26e14c9fa0646abdbf..bf4a3bc730709f41a5089dfe4c6342b0
}
}
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 17ba0c6060ab56ab97b133565ebf86320ab52e1b..305fe2c13ae2d81b99ff36f8ef18e24c23255eae 100644
+index 59b955c946caf35bee22c32f5d0e30b79523e4ef..305fe2c13ae2d81b99ff36f8ef18e24c23255eae 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
-@@ -506,10 +506,23 @@ public class Frog extends Animal implements VariantHolder> {
+@@ -506,9 +506,23 @@ public class Frog extends Animal implements VariantHolder> {
return nodeType != PathType.WATER_BORDER && super.canCutCorner(nodeType);
}
@@ -938,16 +941,16 @@ index 17ba0c6060ab56ab97b133565ebf86320ab52e1b..305fe2c13ae2d81b99ff36f8ef18e24c
@Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new Frog.FrogNodeEvaluator(true);
- this.nodeEvaluator.setCanPassDoors(true);
++ this.nodeEvaluator.setCanPassDoors(true);
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) return new PathFinder(this.nodeEvaluator, range, GENERATOR); // Plazma - Process pathfinding asynchronously
return new PathFinder(this.nodeEvaluator, range);
}
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-index 19bc362ff8e28cd0e26ba357dda425bac24c5a56..e4784d37c4b93c34325eb72cfbaa640c63d0c3c1 100644
+index 38cf26247c80430401b814b57a8eed6805caa614..ad08dc9965c35bc06c67ee929b2cbb3432c2d9ba 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
-@@ -308,7 +308,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
+@@ -305,7 +305,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
protected boolean closeToNextPos() {
Path path = this.getNavigation().getPath();
@@ -957,10 +960,10 @@ index 19bc362ff8e28cd0e26ba357dda425bac24c5a56..e4784d37c4b93c34325eb72cfbaa640c
if (blockPos != null) {
double d = this.distanceToSqr((double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ());
diff --git a/src/main/java/net/minecraft/world/entity/monster/Strider.java b/src/main/java/net/minecraft/world/entity/monster/Strider.java
-index c09e49f928e32a3dc6c557f01d92c455d9bfc8c6..bf507bcb8746298ca96e50686cdf1bd91c91e4c1 100644
+index 06c64092ef9df58470448c333dab3a0fabdeb072..e8c310e84f799217bc8bdda47fa24b872ad64e2d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Strider.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java
-@@ -610,10 +610,23 @@ public class Strider extends Animal implements ItemSteerable, Saddleable {
+@@ -610,9 +610,23 @@ public class Strider extends Animal implements ItemSteerable, Saddleable {
super(entity, world);
}
@@ -979,19 +982,19 @@ index c09e49f928e32a3dc6c557f01d92c455d9bfc8c6..bf507bcb8746298ca96e50686cdf1bd9
@Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new WalkNodeEvaluator();
- this.nodeEvaluator.setCanPassDoors(true);
++ this.nodeEvaluator.setCanPassDoors(true);
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) return new PathFinder(this.nodeEvaluator, range, GENERATOR); // Plazma - Process pathfinding asynchronously
return new PathFinder(this.nodeEvaluator, range);
}
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 6cce132f43ce7aad6f5ee2b351855c9b57b8f0c1..4102dc4c8b63a1d00a8417aa303521590202f9a6 100644
+index 9bbf0eef3af5b7e26ae98649706746c67b76f069..d121fd2796382654aee39c6bebf8adb72b064d71 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
-@@ -638,6 +638,15 @@ public class Warden extends Monster implements VibrationSystem {
+@@ -637,6 +637,15 @@ public class Warden extends Monster implements VibrationSystem {
+ @Override
protected PathFinder createPathFinder(int range) {
this.nodeEvaluator = new WalkNodeEvaluator();
- this.nodeEvaluator.setCanPassDoors(true);
+ // Plazma start - Process pathfinding asynchonously
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled)
+ return new PathFinder(this.nodeEvaluator, range, GroundPathNavigation.GENERATOR) {
diff --git a/patches/server/0045-Reduce-allocations.patch b/patches/server/0045-Reduce-allocations.patch
index 0f19238d9..bdf7b8531 100644
--- a/patches/server/0045-Reduce-allocations.patch
+++ b/patches/server/0045-Reduce-allocations.patch
@@ -117,10 +117,10 @@ index 7e440b4a46b040365df7317035e577d93e7d855d..fd30799510b8230e11de10376ff9f781
players.add(player);
return;
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
-index b3c993a790fc3fab6a408c731deb297f74c959ce..c53ea30fe9282ae1bb26b48b8844ef1e0e890545 100644
+index d21ce54ebb5724c04eadf56a2cde701d5eeb5db2..31d61d0a252fadf26288ff8d3152ea4898c37edc 100644
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
-@@ -387,7 +387,7 @@ public final class ChunkEntitySlices {
+@@ -378,7 +378,7 @@ public final class ChunkEntitySlices {
private static final class BasicEntityList {
@@ -129,7 +129,7 @@ index b3c993a790fc3fab6a408c731deb297f74c959ce..c53ea30fe9282ae1bb26b48b8844ef1e
private static final int DEFAULT_CAPACITY = 4;
private E[] storage;
-@@ -398,7 +398,7 @@ public final class ChunkEntitySlices {
+@@ -389,7 +389,7 @@ public final class ChunkEntitySlices {
}
public BasicEntityList(final int cap) {
@@ -138,7 +138,7 @@ index b3c993a790fc3fab6a408c731deb297f74c959ce..c53ea30fe9282ae1bb26b48b8844ef1e
}
public boolean isEmpty() {
-@@ -410,7 +410,7 @@ public final class ChunkEntitySlices {
+@@ -401,7 +401,7 @@ public final class ChunkEntitySlices {
}
private void resize() {
@@ -165,10 +165,10 @@ index 58d9187adc188b693b6becc400f766e069bf1bf5..a3d186c80840fdb628a48181df219c46
public ServerEntityLookup(final ServerLevel world, final LevelCallback worldCallback) {
super(world, worldCallback);
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
-index b0bfe655922877676948d9b6ff3fa5a6ebb7a640..742594c95a6ea88f8e6e899e448277bc6f57ded7 100644
+index 67532b85073b7978254a0b04caadfe822679e61f..bebb2f9c07175900f6720af6a249394be6219ed1 100644
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
-@@ -921,9 +921,10 @@ public final class ChunkTaskScheduler {
+@@ -938,9 +938,10 @@ public final class ChunkTaskScheduler {
}
}
@@ -346,10 +346,10 @@ index 1e9873d7b258ce1f0b2437cb1e487157a16f6834..94f1337bb63a505641b66e6cbf0cc288
public CrashReportCategory(String title) {
this.title = title;
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
-index 1360aa8202542d3d0f32247f1123575fc2c38ff1..c9c1a2bd96804835250ff3b921277e4fe6191bcc 100644
+index 38ffa1c4c204f73746c4b87127de92b631548eb1..47d5d23f3cc3a173785c0f4971f97b343ba328df 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
-@@ -592,7 +592,7 @@ public class Util {
+@@ -597,7 +597,7 @@ public class Util {
} else if (futures.size() == 1) {
return futures.get(0).thenApply(List::of);
} else {
@@ -479,7 +479,7 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..80a28985e072334d960fe5a674d9bb08
protected CipherBase(Cipher cipher) {
this.cipher = cipher;
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
-index 44a31f6f44885598ee06e88b940b84b1e89e5430..01158f1f4aa13cefb46c0ed7cce55dbbde89b521 100644
+index 8661c1b1cfe2b3db000e1f08814fd4409c4b7fab..26456c0980315d8e38b68630ffeaf657aa02b0a0 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -326,7 +326,7 @@ public class Connection extends SimpleChannelInboundHandler> {
@@ -609,10 +609,10 @@ index 8dd9375f2ad2c65a773a3195aeff1f977e09e7e0..89cfe5a4e1554dd722ca98ec8c896e85
private ChunkMap getChunkMap() {
return (ChunkMap)this.playerProvider;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 3a8b566aa44df367c6edacf371c0b7a2bd2548b6..20d9cd87fcbdd666231746ca1b364cde7016b5d6 100644
+index 36dec4f9d1a1ded85b13e9227e59cee0c408a316..898b24e6264b59f59416c801f2d6b01801a8a881 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1364,7 +1364,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1366,7 +1366,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public static List getCurrentlyTickingEntities() {
Entity ticking = currentlyTickingEntity.get();
@@ -715,10 +715,10 @@ index a371f685534bf161f476ccea431fec6a80aca9c1..d2addf2453fa35779f0197f54a102e06
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index bf4a3bc730709f41a5089dfe4c6342b08057ef02..b8ac4ff028dc839a7f1d0c1b9922b0507dc384db 100644
+index c43c26134c3431e66c767d54fc5b8761ca109084..76b8e4872608bf34e6c489111c98c760d6644a5e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -257,7 +257,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -261,7 +261,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.goalSelector.addGoal(8, new Bee.BeeWanderGoal());
this.goalSelector.addGoal(9, new FloatGoal(this));
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
@@ -754,7 +754,7 @@ index 2df413fce51db6360c2a55fde72061135e0bd3a9..ae5d66afa5573596df9c322d9bb5c270
public static AttributeSupplier.Builder createAttributes() {
diff --git a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
-index 034dec437d6a6df5664185de77245bd17fcdd59b..67788747c84174054bfc2f66a4596837e08dd046 100644
+index 8875d212216f72114e94635a319663b195e957fd..de3527dc956302d83e54618d6ece7c9d2b982135 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java
@@ -458,7 +458,7 @@ public class Rabbit extends Animal implements VariantHolder {
@@ -767,7 +767,7 @@ index 034dec437d6a6df5664185de77245bd17fcdd59b..67788747c84174054bfc2f66a4596837
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Wolf.class, true));
this.getAttribute(Attributes.ATTACK_DAMAGE).addOrUpdateTransientModifier(new AttributeModifier(Rabbit.EVIL_ATTACK_POWER_MODIFIER, 5.0D, AttributeModifier.Operation.ADD_VALUE));
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
-index 14d3e09e8eca665d186f5d356158052b118c6848..02927b6face86a9825a97b767c8de85838a79725 100644
+index 1be6773df34eeb8bbc9cb0dc5349a53f3369e089..da4a3ba3a96c49a2be99c83559f9754d72f97808 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
@@ -247,7 +247,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder(this, Animal.class, false, Wolf.PREY_SELECTOR)); // Purpur - moved to updatePathfinders()
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
-index a660d8bfa1294cd44dfa89f4c15bd339ffcccecf..dc833fe4aed149a4edbf668af4bc12937f6a4850 100644
+index b08d3980761b97fbd6d63b9794aff97b1ede7fc8..29c8489d956f41b683d94e0c098bce3efef30513 100644
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
@@ -88,7 +88,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -807,10 +807,10 @@ index 48826eb0a960f7af6dd2ef184a8aed744a1d8f83..495a24d4e6705902c36032227bdfa359
public static final EnderDragonPhase STRAFE_PLAYER = create(DragonStrafePlayerPhase.class, "StrafePlayer");
public static final EnderDragonPhase LANDING_APPROACH = create(DragonLandingApproachPhase.class, "LandingApproach");
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 05fb8b26369f7703c6a97f1764a71bd4c3fe1058..82b31ced06d883a817b6d7036f8fce8481b463b9 100644
+index 6f756f6f36b4aba5379df1780e8c6bab8873624c..4add01bb03e52974fc2ac9507976b317585abece 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -258,7 +258,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
+@@ -257,7 +257,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
this.goalSelector.addGoal(7, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
@@ -820,10 +820,10 @@ index 05fb8b26369f7703c6a97f1764a71bd4c3fe1058..82b31ced06d883a817b6d7036f8fce84
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-index 41c6b60a9d0210b7f2c660cc03999be9c9bc344e..8acafd4f4d2dec45fb18f89a0be5c4a584c44904 100644
+index 89c1dd7dd76aa89f74bbf680a2bdb94d6528cf08..596077289def8306dd879e3a41f0b0af8a92fb94 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-@@ -81,7 +81,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -83,7 +83,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
@@ -846,10 +846,10 @@ index 3b2560ee1bb8c415eada619fc057d35ccb0e2ab0..82ccbcef029066a1b48c0844e974380d
public static AttributeSupplier.Builder createAttributes() {
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-index d57f6b312341f6d83788bbb294cc65ee47361373..aff74f0ca5a8a007b919151194f8ef578ce6fda4 100644
+index fdc7c13e83bdaf63f1f4561921dd9146ba0ec8d8..21d43105d2e283e2ff70a30ecaa7a86ddf5736ba 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
-@@ -136,7 +136,7 @@ public class EnderMan extends Monster implements NeutralMob {
+@@ -135,7 +135,7 @@ public class EnderMan extends Monster implements NeutralMob {
this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this));
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt));
@@ -960,10 +960,10 @@ index 2490a42c9c35c7e080279ef8566288a28362d167..34d6eaebfe03716c8cbbb5395024b0da
String[] strings = new String[pattern.size() - l - k];
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-index f5b498bf68d351e42f5db5ae28aab4923847e3a5..73f5ccf83285d5514907160e3cc5f5c1cde73d6b 100644
+index e5e8a4e71c3caf35c50803b7b966cd34adafc647..bbc92b0c8d8d43d442f39640f6929a81be980006 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
-@@ -462,7 +462,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -464,7 +464,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@Override
public int[] getSlotsForFace(Direction side) {
@@ -972,7 +972,7 @@ index f5b498bf68d351e42f5db5ae28aab4923847e3a5..73f5ccf83285d5514907160e3cc5f5c1
}
@Override
-@@ -511,7 +511,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -513,7 +513,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@Override
public int[] getSlotsForFace(Direction side) {
@@ -981,7 +981,7 @@ index f5b498bf68d351e42f5db5ae28aab4923847e3a5..73f5ccf83285d5514907160e3cc5f5c1
}
@Override
-@@ -553,7 +553,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -555,7 +555,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@Override
public int[] getSlotsForFace(Direction side) {
@@ -991,7 +991,7 @@ index f5b498bf68d351e42f5db5ae28aab4923847e3a5..73f5ccf83285d5514907160e3cc5f5c1
@Override
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStep.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStep.java
-index 4e56398a6fb8b97199f4c74ebebc1055fb718dcf..84faa524b57e1877ed6006be6784b07bc2805ecc 100644
+index f9aad1b8c02b70e620efdc2a58cadf4fff0f3ed5..ccfddd8c47572561238bd27fced90e1c36a53dc3 100644
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStep.java
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStep.java
@@ -144,7 +144,7 @@ public final class ChunkStep implements ca.spottedleaf.moonrise.patches.chunk_sy
@@ -1148,10 +1148,10 @@ index 8a4f95049c63afb28bef6719c77b7a7092e75aae..f295205e3093f8c3c4ed4c1cf6ac3aaf
System.out.println("Starting server");
Thread runThread = new Thread(() -> {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 63065a22ff359c142bab23fccacfd5ebd86f81a5..b788c9c1b162ea5b71754a1061565531b8cf1548 100644
+index 029d6daa003f90999afa4e5070eabf6e0ada473a..c307063dd311988443e415f3ce3709671ecd68f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -520,7 +520,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -521,7 +521,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void sendTitle(com.destroystokyo.paper.Title title) {
Preconditions.checkNotNull(title, "Title is null");
setTitleTimes(title.getFadeIn(), title.getStay(), title.getFadeOut());
diff --git a/patches/server/0047-Add-option-to-allow-shoot-fireball.patch b/patches/server/0047-Add-option-to-allow-shoot-fireball.patch
index f302fa79e..aa3edfce4 100644
--- a/patches/server/0047-Add-option-to-allow-shoot-fireball.patch
+++ b/patches/server/0047-Add-option-to-allow-shoot-fireball.patch
@@ -67,31 +67,6 @@ index 641eb27097740219199ce61ed3e6aa5f42a51b1c..f51be1746fc649d636bc9e3ae451d18e
@Override
public InteractionResult useOn(UseOnContext context) {
Level world = context.getLevel();
-diff --git a/src/main/java/net/minecraft/world/item/Items.java b/src/main/java/net/minecraft/world/item/Items.java
-index 580bd63fdbf9555f867362d3c1f39f41fd750089..bfde7c2d386d94913bde5452b903f2f2ee7ac672 100644
---- a/src/main/java/net/minecraft/world/item/Items.java
-+++ b/src/main/java/net/minecraft/world/item/Items.java
-@@ -1698,7 +1698,7 @@ public class Items {
- ExperienceBottleItem::new,
- new Item.Properties().rarity(Rarity.UNCOMMON).component(DataComponents.ENCHANTMENT_GLINT_OVERRIDE, true)
- );
-- public static final Item FIRE_CHARGE = registerItem("fire_charge", FireChargeItem::new);
-+ public static final Item FIRE_CHARGE = registerItem("fire_charge", FireChargeItem::new, new Item.Properties().useCooldown(org.plazmamc.plazma.configurations.GlobalConfiguration.get().item.fireCharge.cooldown()));
- public static final Item WIND_CHARGE = registerItem("wind_charge", WindChargeItem::new, new Item.Properties().useCooldown(0.5F));
- public static final Item WRITABLE_BOOK = registerItem(
- "writable_book", WritableBookItem::new, new Item.Properties().stacksTo(1).component(DataComponents.WRITABLE_BOOK_CONTENT, WritableBookContent.EMPTY)
-diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
-index dc632fe50e777c019705796602debc3a7f33152d..3c917e2a7fe8e5ff1ac91ddba29c717952a15d57 100644
---- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
-+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
-@@ -156,7 +156,6 @@ public class GlobalConfiguration extends ConfigurationPart {
-
- }
-
--
- public ConsoleLogs consoleLogs;
- public class ConsoleLogs extends ConfigurationPart {
-
diff --git a/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java
index ac0f038de0ce5cf6df0b730af69d3229c3119eff..ba3331a81002304187318ed32fec2dd31e4c23ee 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/RemovedConfigurations.java
diff --git a/patches/server/0049-Completely-remove-Mojang-profiler.patch b/patches/server/0049-Completely-remove-Mojang-profiler.patch
index 6cf3d87a5..b1849bc1e 100644
--- a/patches/server/0049-Completely-remove-Mojang-profiler.patch
+++ b/patches/server/0049-Completely-remove-Mojang-profiler.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Completely remove Mojang profiler
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index e137cc2e16a7b1532501bb3bb568236b427d171b..495341d9ebf5f4aa63526defdf822de18f9818a7 100644
+index a5e8f2d8e5963c730a9509eddfadb9ca322c7183..eff19915b68537bda8e6e3352964a2910e4cc602 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -132,7 +132,7 @@ import net.minecraft.server.commands.WorldBorderCommand;
@@ -17,7 +17,7 @@ index e137cc2e16a7b1532501bb3bb568236b427d171b..495341d9ebf5f4aa63526defdf822de1
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.flag.FeatureFlags;
-@@ -355,9 +355,11 @@ public class Commands {
+@@ -353,9 +353,11 @@ public class Commands {
// Paper end
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
@@ -29,24 +29,24 @@ index e137cc2e16a7b1532501bb3bb568236b427d171b..495341d9ebf5f4aa63526defdf822de1
ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent
try {
-@@ -386,9 +388,9 @@ public class Commands {
+@@ -384,9 +386,10 @@ public class Commands {
commandlistenerwrapper.sendFailure(Component.literal(Util.describeError(exception)));
Commands.LOGGER.error("'/{}' threw an exception", s, exception);
}
- } finally {
+ } /*finally { // Plazma - Completely remove Mojang profiler
Profiler.get().pop();
-- }
-+ }*/ // Plazma - Completely remove Mojang profiler
+ }
++ */ // Plazma - Completely remove Mojang profiler
}
-@@ -450,7 +452,7 @@ public class Commands {
+@@ -448,7 +451,7 @@ public class Commands {
int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT);
try {
- ExecutionContext executioncontext1 = new ExecutionContext<>(i, j, Profiler.get());
-+ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j/*, Profiler.get()*/);
++ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j/*, Profiler.get()*/); // Plazma - Completely remove Mojang profiler
try {
Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1);
@@ -213,7 +213,7 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..a72bf8986d7f93dc0b3d8830c17745cf
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 421b3c524a2828fdd8b0b95c37bce9b79fc7825d..c41cf465cc6133c7bb43b4d1019efae808ad86a9 100644
+index e1409a61891e4f30c39ba5b75691776e92417ed2..e66ba297c6f92fe855d992ceb5d4468be5670377 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -111,19 +111,19 @@ import net.minecraft.util.datafix.DataFixers;
@@ -226,12 +226,12 @@ index 421b3c524a2828fdd8b0b95c37bce9b79fc7825d..c41cf465cc6133c7bb43b4d1019efae8
-import net.minecraft.util.profiling.ProfilerFiller;
-import net.minecraft.util.profiling.ResultField;
-import net.minecraft.util.profiling.SingleTickProfiler;
-+//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang profilers
++//import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.Profiler; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.util.profiling.jfr.callback.ProfiledDuration;
-import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder;
@@ -239,11 +239,11 @@ index 421b3c524a2828fdd8b0b95c37bce9b79fc7825d..c41cf465cc6133c7bb43b4d1019efae8
-import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder;
-import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider;
-import net.minecraft.util.profiling.metrics.storage.MetricsPersister;
-+//import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang profilers
-+//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profilers
++//import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang profiler
++//import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang profiler
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
import net.minecraft.world.Difficulty;
import net.minecraft.world.RandomSequences;
@@ -258,56 +258,55 @@ index 421b3c524a2828fdd8b0b95c37bce9b79fc7825d..c41cf465cc6133c7bb43b4d1019efae8
- @Nullable
- private MinecraftServer.TimeProfiler debugCommandProfiler;
- private boolean debugCommandProfilerDelayStart;
-+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang profilers
-+ //private Consumer onMetricsRecordingStopped; // Plazma - Completely remove Mojang profilers
-+ //private Consumer onMetricsRecordingFinished; // Plazma - Completely remove Mojang profilers
-+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang profilers
-+ //@Nullable // Plazma - Completely remove Mojang profilers
-+ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang profilers
-+ //private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang profilers
++ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang profiler
++ //private Consumer onMetricsRecordingStopped; // Plazma - Completely remove Mojang profiler
++ //private Consumer onMetricsRecordingFinished; // Plazma - Completely remove Mojang profiler
++ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang profiler
++ //@Nullable // Plazma - Completely remove Mojang profiler
++ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang profiler
++ //private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang profiler
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@Nullable
-@@ -434,12 +434,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop {
this.stopRecordingMetrics();
};
-+ */ // Plazma - Completely remove Mojang profilers
-+ /* // Plazma - Completely remove Mojang profilers
this.onMetricsRecordingFinished = (path) -> {
};
-+ */ // Plazma - Completely remove Mojang profilers
++ */ // Plazma - Completely remove Mojang profiler
this.random = RandomSource.create();
this.port = -1;
this.levels = Maps.newLinkedHashMap();
-@@ -1054,9 +1058,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop {
- return false;
-@@ -1380,7 +1388,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop {
+- return false;
+- } : this::haveTime);
+- // Paper start - rewrite chunk system
+- final Throwable crash = this.chunkSystemCrash;
+- if (crash != null) {
+- this.chunkSystemCrash = null;
+- throw new RuntimeException("Chunk system crash propagated to tick()", crash);
+- }
+- // Paper end - rewrite chunk system
+- this.tickFrame.end();
- gameprofilerfiller.popPush("nextTickWait");
-+ //gameprofilerfiller.popPush("nextTickWait"); // Plazma - Completely remove Mojang profilers
- this.mayHaveDelayedTasks = true;
- this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
- // Pufferfish start - tps catchup
-@@ -1396,9 +1404,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop false : this::haveTime);
++ // Paper start - rewrite chunk system
++ final Throwable crash = this.chunkSystemCrash;
++ if (crash != null) {
++ this.chunkSystemCrash = null;
++ throw new RuntimeException("Chunk system crash propagated to tick()", crash);
++ }
++ // Paper end - rewrite chunk system
++ this.tickFrame.end();
++
++ this.mayHaveDelayedTasks = true;
++ this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
++ // Pufferfish start - tps catchup
++ if (!gg.pufferfish.pufferfish.PufferfishConfig.tpsCatchup) { // Purpur // Plazma - nice code purpur
++ this.nextTickTimeNanos = currentTime + i;
++ this.delayedTasksMaxNextTickTimeNanos = nextTickTimeNanos;
}
-+ */ // Plazma - Completely remove Mojang profilers
++ // Pufferfish end
++ this.startMeasuringTaskExecutionTime();
++ this.waitUntilNextTick();
++ this.finishMeasuringTaskExecutionTime();
++ if (flag) this.tickRateManager.endTickWork();
++
++ this.logFullTickTime();
++ // Plazma end - Completely remove Mojang profiler
this.isReady = true;
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
-@@ -1622,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
-@@ -1741,10 +1755,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop {
entityplayer.connection.suspendFlushing();
-@@ -1868,9 +1882,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Purpur
-+ /* // Plazma - Completely remove Mojang profilers
++ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
return s + " " + String.valueOf(worldserver.dimension().location());
});
-+ */ // Plazma - Completely remove Mojang profilers
++ */ // Plazma - Completely remove Mojang profiler
/* Drop global time updates
if (this.tickCount % 20 == 0) {
gameprofilerfiller.push("timeSync");
-@@ -1922,7 +1938,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Plazma - Remove persist 'isClientSide' flag
+- this.executeBlocking(() -> {
+- this.saveDebugReport(path.resolve("server"));
+- });
+- this.onMetricsRecordingFinished.accept(path);
+- });
+- this.willStartRecordingMetrics = false;
+- }
+-
+- this.metricsRecorder.startTick();
+- return SingleTickProfiler.decorateFiller(this.metricsRecorder.getProfiler(), SingleTickProfiler.createTickProfiler("Server"));
++ throw new UnsupportedOperationException("Profiler not supported"); // Plazma - compiler fix
+ }
+
+ public void endMetricsRecordingTick() {
+@@ -2984,6 +2953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop true);
-- gameprofilerfiller.pop();
-+ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
+@@ -460,27 +461,28 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.clearCache();
}
// CraftBukkit end
++ */ // Plazma - Completely remove Mojang profiler
@Override
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
@@ -895,7 +930,7 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
this.clearCache();
}
-@@ -483,29 +483,29 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -490,29 +492,29 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
this.lastInhabitedUpdate = i;
if (!this.level.isDebug()) {
@@ -933,7 +968,7 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
}
// Pufferfish start - optimize mob spawning
-@@ -546,8 +546,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -553,8 +555,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Pufferfish end
}
@@ -944,7 +979,7 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
Iterator iterator = this.chunkHoldersToBroadcast.iterator();
while (iterator.hasNext()) {
-@@ -560,7 +560,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -567,7 +569,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
this.chunkHoldersToBroadcast.clear();
@@ -953,18 +988,18 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
}
private void collectTickingChunks(List chunks) {
-@@ -586,8 +586,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -593,8 +595,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Paper end - chunk tick iteration optimisation
}
- private void tickChunks(ProfilerFiller profiler, long timeDelta, List chunks) {
- profiler.popPush("naturalSpawnCount");
-+ private void tickChunks(/*ProfilerFiller profiler,*/ long timeDelta, List chunks) { // Plazma - Completely remove Mojang profiler
++ private void tickChunks(/*ProfilerFiller profiler,*/ long timeDelta, List chunks) {
+ //profiler.popPush("naturalSpawnCount"); // Plazma - Completely remove Mojang profiler
int j = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - Optional per player mob spawns
final int naturalSpawnChunkCount = j;
-@@ -619,7 +619,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -626,7 +628,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// Paper end - Optional per player mob spawns
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
@@ -973,7 +1008,7 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
List list1;
-@@ -656,7 +656,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -663,7 +665,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
}
}
@@ -982,7 +1017,7 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
if (flag) {
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
}
-@@ -854,7 +854,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -861,7 +863,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@Override
protected void doRunTask(Runnable task) {
@@ -992,10 +1027,10 @@ index 1cb8c9d21eef27492efc4995525c198cbffd4b9b..e1957ad2a804f1272ccd458560bd7bde
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e3742506f 100644
+index 898b24e6264b59f59416c801f2d6b01801a8a881..3afb36148d4ee8a856521cfa16cfc10d2cc68961 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -79,8 +79,8 @@ import net.minecraft.util.ProgressListener;
+@@ -80,8 +80,8 @@ import net.minecraft.util.ProgressListener;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
import net.minecraft.util.datafix.DataFixTypes;
@@ -1006,7 +1041,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
import net.minecraft.util.valueproviders.IntProvider;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.DifficultyInstance;
-@@ -748,18 +748,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -749,18 +749,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
public void tick(BooleanSupplier shouldKeepTicking) {
@@ -1029,7 +1064,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
}
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
-@@ -790,30 +790,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -791,30 +791,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.tickTime();
}
@@ -1068,7 +1103,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this
if (flag1) {
-@@ -821,11 +821,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -822,11 +822,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
if (flag1 || this.emptyTime++ < 300) {
@@ -1083,7 +1118,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
}
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
-@@ -833,9 +833,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -834,9 +834,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.activatedPriorityReset = false; // Pufferfish - DAB
if (!entity.isRemoved()) {
if (!tickratemanager.isEntityFrozen(entity)) {
@@ -1095,7 +1130,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
if (true) { // Paper - rewrite chunk system
Entity entity1 = entity.getVehicle();
-@@ -847,7 +847,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -848,7 +848,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.stopRiding();
}
@@ -1104,7 +1139,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
// Pufferfish start - copied from this.guardEntityTick
try {
this.tickNonPassenger(entity); // Pufferfish - changed
-@@ -862,18 +862,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -863,18 +863,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
this.moonrise$midTickTasks(); // Paper - rewrite chunk system
// Pufferfish end
@@ -1127,7 +1162,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
}
@Override
-@@ -889,9 +889,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -890,9 +890,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
long i = this.levelData.getGameTime() + 1L;
this.serverLevelData.setGameTime(i);
@@ -1139,19 +1174,19 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
// Purpur start
int incrementTicks = isDay() ? this.purpurConfig.daytimeTicks : this.purpurConfig.nighttimeTicks;
-@@ -1000,9 +1000,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1001,9 +1001,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
boolean flag = this.isRaining();
int j = chunkcoordintpair.getMinBlockX();
int k = chunkcoordintpair.getMinBlockZ();
- ProfilerFiller gameprofilerfiller = Profiler.get();
-+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
++ //ProfilerFiller gameprofilerfiller = Profiler.get();
- gameprofilerfiller.push("thunder");
+ //gameprofilerfiller.push("thunder"); // Plazma - Completely remove Mojang profiler
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*simpleRandom.nextInt(this.spigotConfig.thunderChance) == 0*/ chunk.shouldDoLightning(this.simpleRandom)) { // Spigot // Paper - Option to disable thunder // Paper - optimise random ticking // Pufferfish - replace random with shouldDoLightning
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
-@@ -1039,7 +1039,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1040,7 +1040,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
@@ -1160,7 +1195,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
for (int l = 0; l < randomTickSpeed; ++l) {
-@@ -1049,12 +1049,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1050,12 +1050,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
} // Paper - Option to disable ice and snow
@@ -1175,7 +1210,7 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
}
@VisibleForTesting
-@@ -1386,19 +1386,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1388,19 +1388,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}*/ // Paper - comment out EAR 2
// Spigot end
entity.setOldPosAndRot();
@@ -1200,12 +1235,12 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {
-@@ -1421,12 +1423,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1423,12 +1425,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
passenger.setOldPosAndRot();
++passenger.tickCount;
- ProfilerFiller gameprofilerfiller = Profiler.get();
-+ //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
++ //ProfilerFiller gameprofilerfiller = Profiler.get();
+ /* // Plazma - Completely remove Mojang profiler
gameprofilerfiller.push(() -> {
@@ -1213,24 +1248,24 @@ index 20d9cd87fcbdd666231746ca1b364cde7016b5d6..14188b6e317dca2bbf98896951605f2e
});
- gameprofilerfiller.incrementCounter("tickPassenger");
+ */ // Plazma - Completely remove Mojang profiler
-+ //gameprofilerfiller.incrementCounter("tickPassenger");
++ //gameprofilerfiller.incrementCounter("tickPassenger"); // Plazma - Completely remove Mojang profiler
// Paper start - EAR 2
if (isActive) {
passenger.rideTick();
-@@ -1438,7 +1442,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1440,7 +1444,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
vehicle.positionRider(passenger);
}
// Paper end - EAR 2
- gameprofilerfiller.pop();
-+ //gameprofilerfiller.pop();
++ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
Iterator iterator = passenger.getPassengers().iterator();
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index ba8ff8f39d3ba39db9c2ce6070cabe33381f4adb..97bf63c4a472e41e0b10a938752eeee8a4a36e7c 100644
+index 3f6ffe3da816eb53bfe065b4b7d561478a27ece9..3fdac9a6b2cbc9c9b460d83e53c309323d30a213 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -102,8 +102,8 @@ import net.minecraft.tags.FluidTags;
+@@ -101,8 +101,8 @@ import net.minecraft.tags.FluidTags;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.util.Unit;
@@ -1241,7 +1276,7 @@ index ba8ff8f39d3ba39db9c2ce6070cabe33381f4adb..97bf63c4a472e41e0b10a938752eeee8
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.effect.MobEffectInstance;
-@@ -1673,15 +1673,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1664,15 +1664,15 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.unsetRemoved();
*/
// CraftBukkit end
@@ -1261,12 +1296,12 @@ index ba8ff8f39d3ba39db9c2ce6070cabe33381f4adb..97bf63c4a472e41e0b10a938752eeee8
// CraftBukkit start
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
LevelData worlddata = worldserver.getLevelData();
-@@ -1699,7 +1699,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
+@@ -1690,7 +1690,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
worldserver.addDuringTeleport(this);
- gameprofilerfiller.pop();
-+ //gameprofilerfiller.pop(); // Plazma - Completely remove mojang profiler
++ //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
this.triggerDimensionChangeTriggers(worldserver1);
this.stopUsingItem();
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
@@ -1362,26 +1397,26 @@ index d2d82e4f22bfeac8881b6815e4bef56c254fded9..3e307274084df5304e801acdde2ae3b8
}
diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
-index eb54f0cc67ca25e0ff6e423bcbcebab294bd5d95..c907e7a244f3eaeb264846f477ada086eb29994c 100644
+index b6b79e6482d04098b4086bc307a83921df322760..83f309323586f96a97246b65e25e1592b9cd3395 100644
--- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
+++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java
-@@ -15,7 +15,7 @@ import java.util.Map.Entry;
- import net.minecraft.core.HolderLookup;
+@@ -17,7 +17,7 @@ import net.minecraft.core.Registry;
import net.minecraft.resources.FileToIdConverter;
+ import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang profiler
import org.slf4j.Logger;
public abstract class SimpleJsonResourceReloadListener extends SimplePreparableReloadListener