From fb72bc56c3e5467ba23252e614fb46411036c5a9 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Sun, 23 Feb 2025 20:19:56 +0900 Subject: [PATCH] [ci skip] Cleanup unapplied patches --- .../0002-Use-Gradle-Version-Catalogs.patch | 157 - .../api/0003-Fork-friendly-Rebranding.patch | 93 - patches/api/0004-Plazma-Configurations.patch | 24 - ...etely-remove-timings-implementations.patch | 2520 ----- .../0009-Temporary-javadoc-build-fix.patch | 19 - .../0007-Reduce-allocations.patch | 0 ...dd-ClientboundPacketPreDispatchEvent.patch | 0 ...002-Add-PlayerBlockDestroySpeedEvent.patch | 0 .../0003-Add-CraftItemRecipeEvent.patch | 0 ...dd-ClientboundPacketPreDispatchEvent.patch | 0 ...019-Add-PlayerBlockDestroySpeedEvent.patch | 0 .../0020-Add-CraftItemRecipeEvent.patch | 0 .../0004-Optimize-Spigot-event-bus.patch | 0 .../0011-LivingEntity-safeFallDistance.patch | 0 ...0016-LivingEntity-broadcastItemBreak.patch | 0 .../purpur/0032-Potion-NamespacedKey.patch | 0 ...0041-Add-item-packet-serialize-event.patch | 0 .../purpur/0049-Add-hover-lines-API.patch | 0 ...0012-Optimize-default-configurations.patch | 12 + ...-when-running-the-test-server-with-g.patch | 19 - ...letely-remove-timings-implementation.patch | 62 - ...042-Remove-persist-isClientSide-flag.patch | 8240 ----------------- ...0025-Add-entity-spawn-deadlock-timer.patch | 0 .../0026-Lithium-HashedList.patch | 0 .../0031-Implement-FreedomChat.patch | 0 .../0035-Implement-Rail-Optimazition.patch | 0 ...urable-RandomSource-factory-provider.patch | 0 ...3-Process-pathfinding-asynchronously.patch | 0 ...nt-alternative-noise-chunk-generator.patch | 0 .../0045-Reduce-allocations.patch | 0 .../0046-Hashed-rcon-password.patch | 0 .../0057-Ticking-Controller.patch | 0 .../0064-Bundle-as-quivers.patch | 0 .../0057-Implement-CarpetFixes.patch | 0 ...flag-when-loading-maps-from-the-disk.patch | 0 ...-hopper-checks-if-the-target-contain.patch | 0 ...0050-Port-minor-SparklyPaper-patches.patch | 0 ...-Optimize-framed-map-tracker-ticking.patch | 0 ...p-executeTick-check-if-there-s-no-ta.patch | 0 .../0053-SparklyPaper-MSPT-by-World.patch | 0 ...054-SparklyPaper-Optimize-farm-check.patch | 0 ...5-SparklyPaper-Optimize-season-check.patch | 0 ...klyPaper-Optimize-tickingBlockEntity.patch | 0 ...117075-Block-entity-unload-lag-spike.patch | 0 .../0014-Optimize-tickBlockEntities.patch | 0 .../0018-Helpful-NMS-packet-changes.patch | 0 .../0023-Parallel-world-ticking.patch | 0 .../0003-Optimize-entity-coordinate-key.patch | 0 ...-unnecessary-ItemFrame-getItem-calls.patch | 0 ...ering-once-per-world-instead-for-eve.patch | 0 ...ntityLookup.ArrayIterable.-init-call.patch | 0 ...EntityTickersList-optimization-tests.patch | 0 .../0022-Ignore-useless-entity-packets.patch | 0 .../0032-Optimize-spigot-event-bus.patch | 0 .../0037-Implement-FerriteCore.patch | 0 .../0013-LivingEntity-safeFallDistance.patch | 0 ...hould-check-if-entity-can-use-portal.patch | 0 ...0082-LivingEntity-broadcastItemBreak.patch | 0 ...te-and-mending-enchantments-together.patch | 0 .../0142-Allow-infinity-on-crossbows.patch | 0 .../purpur/0220-Potion-NamespacedKey.patch | 0 .../0236-Configurable-food-attributes.patch | 0 .../0255-Send-client-custom-name-of-BE.patch | 0 .../purpur/0263-Allay-respect-item-NBT.patch | 0 ...0271-Add-item-packet-serialize-event.patch | 0 .../purpur/0282-Add-mending-multiplier.patch | 0 .../purpur/0292-Add-hover-lines-API.patch | 0 ...dd-missing-Pufferfish-configurations.patch | 0 .../server/0004-Build-System-Changes.patch | 129 - ...0011-Optimize-default-configurations.patch | 14 - patches/unapplied/server/placeholder/.gitkeep | 0 .../0004-SPARKLYPOWER-Add-custom-blocks.patch | 61 - plazma-server/build.gradle.kts.patch | 9 + 73 files changed, 21 insertions(+), 11338 deletions(-) delete mode 100644 patches/api/0002-Use-Gradle-Version-Catalogs.patch delete mode 100644 patches/api/0003-Fork-friendly-Rebranding.patch delete mode 100644 patches/api/0004-Plazma-Configurations.patch delete mode 100644 patches/api/0006-Completely-remove-timings-implementations.patch delete mode 100644 patches/api/0009-Temporary-javadoc-build-fix.patch rename patches/api/{ => feature}/0007-Reduce-allocations.patch (100%) rename patches/{unapplied/sparklypaper/api => api/feature/sparklypaper}/0001-Add-ClientboundPacketPreDispatchEvent.patch (100%) rename patches/{unapplied/sparklypaper/api => api/feature/sparklypaper}/0002-Add-PlayerBlockDestroySpeedEvent.patch (100%) rename patches/{unapplied/sparklypaper/api => api/feature/sparklypaper}/0003-Add-CraftItemRecipeEvent.patch (100%) rename patches/{unapplied => api/feature}/sparklypaper/server/0017-Add-ClientboundPacketPreDispatchEvent.patch (100%) rename patches/{unapplied => api/feature}/sparklypaper/server/0019-Add-PlayerBlockDestroySpeedEvent.patch (100%) rename patches/{unapplied => api/feature}/sparklypaper/server/0020-Add-CraftItemRecipeEvent.patch (100%) rename patches/{unapplied/api => api/outdated}/dropped/0004-Optimize-Spigot-event-bus.patch (100%) rename patches/{unapplied/api => api/outdated}/purpur/0011-LivingEntity-safeFallDistance.patch (100%) rename patches/{unapplied/api => api/outdated}/purpur/0016-LivingEntity-broadcastItemBreak.patch (100%) rename patches/{unapplied/api => api/outdated}/purpur/0032-Potion-NamespacedKey.patch (100%) rename patches/{unapplied/api => api/outdated}/purpur/0041-Add-item-packet-serialize-event.patch (100%) rename patches/{unapplied/api => api/outdated}/purpur/0049-Add-hover-lines-API.patch (100%) delete mode 100644 patches/server/0029-Use-Akair-s-flag-when-running-the-test-server-with-g.patch delete mode 100644 patches/server/0041-Completely-remove-timings-implementation.patch delete mode 100644 patches/server/0042-Remove-persist-isClientSide-flag.patch rename patches/server/{ => features}/0025-Add-entity-spawn-deadlock-timer.patch (100%) rename patches/server/{ => features}/0026-Lithium-HashedList.patch (100%) rename patches/server/{ => features}/0031-Implement-FreedomChat.patch (100%) rename patches/server/{ => features}/0035-Implement-Rail-Optimazition.patch (100%) rename patches/server/{ => features}/0037-Configurable-RandomSource-factory-provider.patch (100%) rename patches/server/{ => features}/0043-Process-pathfinding-asynchronously.patch (100%) rename patches/server/{ => features}/0044-Implement-alternative-noise-chunk-generator.patch (100%) rename patches/server/{ => features}/0045-Reduce-allocations.patch (100%) rename patches/server/{ => features}/0046-Hashed-rcon-password.patch (100%) rename patches/server/{ => features}/0057-Ticking-Controller.patch (100%) rename patches/server/{ => features}/0064-Bundle-as-quivers.patch (100%) rename patches/{unapplied/server => server/features/outdated}/0057-Implement-CarpetFixes.patch (100%) rename patches/server/{ => features/sparklypaper}/0032-Reset-dirty-flag-when-loading-maps-from-the-disk.patch (100%) rename patches/server/{ => features/sparklypaper}/0033-Allow-throttling-hopper-checks-if-the-target-contain.patch (100%) rename patches/server/{ => features/sparklypaper}/0050-Port-minor-SparklyPaper-patches.patch (100%) rename patches/server/{ => features/sparklypaper}/0051-SparklyPaper-Optimize-framed-map-tracker-ticking.patch (100%) rename patches/server/{ => features/sparklypaper}/0052-SparklyPaper-Skip-executeTick-check-if-there-s-no-ta.patch (100%) rename patches/server/{ => features/sparklypaper}/0053-SparklyPaper-MSPT-by-World.patch (100%) rename patches/server/{ => features/sparklypaper}/0054-SparklyPaper-Optimize-farm-check.patch (100%) rename patches/server/{ => features/sparklypaper}/0055-SparklyPaper-Optimize-season-check.patch (100%) rename patches/server/{ => features/sparklypaper}/0056-SparklyPaper-Optimize-tickingBlockEntity.patch (100%) rename patches/{unapplied/sparklypaper/server => server/features/sparklypaper/unapplied}/0012-Revert-Fix-MC-117075-Block-entity-unload-lag-spike.patch (100%) rename patches/{unapplied/sparklypaper/server => server/features/sparklypaper/unapplied}/0014-Optimize-tickBlockEntities.patch (100%) rename patches/{unapplied/sparklypaper/server => server/features/sparklypaper/unapplied}/0018-Helpful-NMS-packet-changes.patch (100%) rename patches/{unapplied/sparklypaper/server => server/features/sparklypaper/unapplied}/0023-Parallel-world-ticking.patch (100%) rename patches/{unapplied/sparklypaper/removed/server => server/features/sparklypaper/unapplied/removed}/0003-Optimize-entity-coordinate-key.patch (100%) rename patches/{unapplied/sparklypaper/removed/server => server/features/sparklypaper/unapplied/removed}/0009-Avoid-unnecessary-ItemFrame-getItem-calls.patch (100%) rename patches/{unapplied/sparklypaper/removed/server => server/features/sparklypaper/unapplied/removed}/0016-Only-check-thundering-once-per-world-instead-for-eve.patch (100%) rename patches/{unapplied/sparklypaper/removed/server => server/features/sparklypaper/unapplied/removed}/0017-Optimize-heavy-EntityLookup.ArrayIterable.-init-call.patch (100%) rename patches/{unapplied/sparklypaper/removed/server => server/features/sparklypaper/unapplied/removed}/0019-BlockEntityTickersList-optimization-tests.patch (100%) rename patches/{unapplied/server => server/outdated}/0022-Ignore-useless-entity-packets.patch (100%) rename patches/{unapplied/server/dropped => server/outdated}/0032-Optimize-spigot-event-bus.patch (100%) rename patches/{unapplied/server/dropped => server/outdated}/0037-Implement-FerriteCore.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0013-LivingEntity-safeFallDistance.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0040-End-gateway-should-check-if-entity-can-use-portal.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0082-LivingEntity-broadcastItemBreak.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0094-Allow-infinite-and-mending-enchantments-together.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0142-Allow-infinity-on-crossbows.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0220-Potion-NamespacedKey.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0236-Configurable-food-attributes.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0255-Send-client-custom-name-of-BE.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0263-Allay-respect-item-NBT.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0271-Add-item-packet-serialize-event.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0282-Add-mending-multiplier.patch (100%) rename patches/{unapplied/server => server/outdated}/purpur/0292-Add-hover-lines-API.patch (100%) rename patches/server/{ => pufferfish}/0015-Add-missing-Pufferfish-configurations.patch (100%) delete mode 100644 patches/unapplied/server/0004-Build-System-Changes.patch delete mode 100644 patches/unapplied/server/0011-Optimize-default-configurations.patch delete mode 100644 patches/unapplied/server/placeholder/.gitkeep delete mode 100644 patches/unapplied/sparklypaper/api/0004-SPARKLYPOWER-Add-custom-blocks.patch diff --git a/patches/api/0002-Use-Gradle-Version-Catalogs.patch b/patches/api/0002-Use-Gradle-Version-Catalogs.patch deleted file mode 100644 index 9b9bbff..0000000 --- a/patches/api/0002-Use-Gradle-Version-Catalogs.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Sun, 14 Jan 2024 19:50:29 +0900 -Subject: [PATCH] Use Gradle Version Catalogs - - -diff --git a/build.gradle.kts b/build.gradle.kts -index 49546dfbb4dd006b5a2419908890ba4c2a0e207a..d3c92a382acbf414bf7e704870d252cc88c5d9db 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -9,11 +9,13 @@ java { - withJavadocJar() - } - -+/* // Plazma - Use Gradle Version Catalogs - val annotationsVersion = "24.1.0" - val bungeeCordChatVersion = "1.20-R0.2" - val adventureVersion = "4.17.0" - val slf4jVersion = "2.0.9" - val log4jVersion = "2.17.1" -+ */ // Plazma - Use Gradle Version Catalogs - val apiAndDocs: Configuration by configurations.creating { - attributes { - attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) -@@ -39,60 +41,31 @@ 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: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.19") { -- exclude("com.google.guava", "guava") -- } -- // Paper - adventure -- api("org.yaml:snakeyaml:2.2") -- 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.15") -- apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) -- apiAndDocs("net.kyori:adventure-api") -- apiAndDocs("net.kyori:adventure-text-minimessage") -- apiAndDocs("net.kyori:adventure-text-serializer-gson") -- apiAndDocs("net.kyori:adventure-text-serializer-legacy") -- apiAndDocs("net.kyori:adventure-text-serializer-plain") -- apiAndDocs("net.kyori:adventure-text-logger-slf4j") -- api("org.apache.logging.log4j:log4j-api:$log4jVersion") -- api("org.slf4j:slf4j-api:$slf4jVersion") -- api("io.sentry:sentry:5.4.0") // Pufferfish -- -- implementation("org.ow2.asm:asm:9.7.1") -- implementation("org.ow2.asm:asm-commons:9.7.1") -- // Paper end -- -- api("org.apache.maven:maven-resolver-provider:3.9.6") // Paper - make API dependency for Paper Plugins -- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") -- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") -- -- val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations... -- compileOnly(annotations) -- testCompileOnly(annotations) -- -- // Paper start - add checker -- val checkerQual = "org.checkerframework:checker-qual:3.33.0" -- compileOnlyApi(checkerQual) -- testCompileOnly(checkerQual) -- // Paper end -- api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify -- -- testImplementation("org.apache.commons:commons-lang3:3.12.0") -- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") -- testImplementation("org.hamcrest:hamcrest:2.2") -- testImplementation("org.mockito:mockito-core:5.14.1") -- testImplementation("org.ow2.asm:asm-tree:9.7.1") -- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions -+ // Plazma start - Use Gradle Version Catalogs -+ api(api.bundles.api) -+ api(api.bungeechat) { exclude("com.google.guava", "guava") } -+ api(common.snakeyaml) -+ api(api.joml) { isTransitive = false } -+ api(api.jsonsimple) { isTransitive = false } -+ apiAndDocs(platform(common.adventure.bom)) -+ apiAndDocs(common.bundles.adventure) -+ api(common.log4j.api) -+ -+ implementation(common.bundles.asm) -+ -+ api(common.mvn) -+ compileOnly(common.bundles.mvn) -+ -+ compileOnly(api.annotations) -+ testCompileOnly(api.annotations) -+ -+ compileOnlyApi(api.checkerqual) -+ testCompileOnly(api.checkerqual) -+ -+ testImplementation(common.commons.lang3) -+ testImplementation(common.bundles.test) -+ mockitoAgent(common.mockito) { isTransitive = false } -+ // Plazma end - } - - // Paper start -@@ -177,27 +150,25 @@ tasks.withType { - options.use() - options.isDocFilesSubDirs = true - options.links( -- "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.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 -- "https://jd.advntr.dev/api/$adventureVersion/", -- "https://jd.advntr.dev/key/$adventureVersion/", -- "https://jd.advntr.dev/text-minimessage/$adventureVersion/", -- "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/", -- "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/", -- "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", -- "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", -- "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/", -- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/", -- // Paper end -- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper -+ // Plazma start - Use Gradle Version Catalogs -+ "https://guava.dev/releases/${api.guava.orNull?.version}/api/docs/", -+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/", -+ "https://javadoc.io/doc/org.jetbrains/annotations/${api.annotations.orNull?.version}/", -+ "https://javadoc.io/doc/org.joml/joml/${api.joml.orNull?.version}/index.html", -+ "https://www.javadoc.io/doc/com.google.code.gson/gson/${api.gson.orNull?.version}", -+ "https://jspecify.dev/docs/api/", //diff on change -+ "https://jd.advntr.dev/api/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/key/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/text-minimessage/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/text-serializer-gson/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/text-serializer-legacy/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/text-serializer-plain/${common.adventure.api.orNull?.version}/", -+ "https://jd.advntr.dev/text-logger-slf4j/${common.adventure.api.orNull?.version}/", -+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/", -+ "https://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.orNull?.version}/", -+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/", -+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.mvn.connector.orNull?.version}", -+ // Plazma end - ) - options.tags("apiNote:a:API Note:") - diff --git a/patches/api/0003-Fork-friendly-Rebranding.patch b/patches/api/0003-Fork-friendly-Rebranding.patch deleted file mode 100644 index ad5a528..0000000 --- a/patches/api/0003-Fork-friendly-Rebranding.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Tue, 14 May 2024 18:36:30 +0900 -Subject: [PATCH] Fork-friendly Rebranding - - -diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java -index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..41d10421e1e79711e2e90ff2dc225bfd9cac9284 100644 ---- a/src/main/java/co/aikar/timings/TimingHandler.java -+++ b/src/main/java/co/aikar/timings/TimingHandler.java -@@ -127,7 +127,7 @@ class TimingHandler implements Timing { - while ((last = TIMING_STACK.removeLast()) != this) { - last.timingDepth = 0; - if ("Minecraft".equalsIgnoreCase(last.identifier.group)) { -- Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to Paper unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)"); -+ Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)"); // Plazma - Fork-friendly Rebranding - } else { - Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to the plugin " + last.identifier.group + " (Look for errors above this in the logs) (" + last.identifier + " did not stopTiming)", new Throwable()); - } -diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java -index 7196594e07af19a14c320d77df893978525fe386..6ac3376f12df2ee3e0519ab8b5a0c8211350e550 100644 ---- a/src/main/java/io/papermc/paper/ServerBuildInfo.java -+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java -@@ -33,6 +33,29 @@ public interface ServerBuildInfo { - Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur"); - // Purpur end - -+ // Plazma start - Fork-friendly Rebranding -+ /** -+ * The brand id for Plazma. -+ */ -+ Key BRAND_PLAZMA_ID = Key.key("plazmamc", "plazma"); -+ -+ // For those who fork Plazma - please add the new branding key here -+ -+ /** -+ * The brand id of the server. -+ */ -+ Key BRAND_ID = BRAND_PLAZMA_ID; -+ -+ /** -+ * Supported brands of the server. -+ */ -+ java.util.List SUPPORTED_BRANDS = java.util.Arrays.asList( -+ BRAND_PAPER_ID, -+ BRAND_PURPUR_ID, -+ BRAND_PLAZMA_ID -+ ); -+ // Plazma end - Fork-friendly Rebranding -+ - /** - * Gets the {@code ServerBuildInfo}. - * -diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java -index c880d0010849ab733ad13bbd18fab3c864d0cf61..316317222a137c2781b9b0c38948912e9dd08c76 100644 ---- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java -+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java -@@ -259,7 +259,7 @@ public class VersionCommand extends BukkitCommand { - // Purpur start - int distance = getVersionFetcher().distance(); - final Component message = Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), -- ChatColor.parseMM("Current Purpur Version: %s%s*", distance == 0 ? "" : distance > 0 ? "" : "", Bukkit.getVersion()), -+ ChatColor.parseMM("Current " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Version: %s%s*", distance == 0 ? "" : distance > 0 ? "" : "", Bukkit.getVersion()), // Plazma - Fork-friendly Rebranding - // Purpur end - msg - ); -@@ -282,6 +282,7 @@ public class VersionCommand extends BukkitCommand { - } - } - -+ /* // Plazma - Fork-friendly Rebranding - private static int getDistance(@NotNull String repo, @NotNull String hash) { - try { - BufferedReader reader = Resources.asCharSource( -@@ -302,4 +303,5 @@ public class VersionCommand extends BukkitCommand { - return -1; - } - } -+ */ // Plazma - Fork-friendly Rebranding - } -diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java -index 60e086be70529e0804280b24a2a3e7ae72d8d363..dcf1d53af919e94a6947bc3f81121bd4fad1a163 100644 ---- a/src/main/java/org/bukkit/plugin/EventExecutor.java -+++ b/src/main/java/org/bukkit/plugin/EventExecutor.java -@@ -54,7 +54,7 @@ public interface EventExecutor { - if (m.getReturnType() != Void.TYPE) { - final org.bukkit.plugin.java.JavaPlugin plugin = org.bukkit.plugin.java.JavaPlugin.getProvidingPlugin(m.getDeclaringClass()); - org.bukkit.Bukkit.getLogger().warning("@EventHandler method " + m.getDeclaringClass().getName() + (Modifier.isStatic(m.getModifiers()) ? '.' : '#') + m.getName() -- + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of Paper." -+ + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + "." // Plazma - Fork-friendly Rebranding - + " This should be reported to the developers of " + plugin.getPluginMeta().getDisplayName() + " (" + String.join(",", plugin.getPluginMeta().getAuthors()) + ')'); - } - if (Modifier.isStatic(m.getModifiers())) { diff --git a/patches/api/0004-Plazma-Configurations.patch b/patches/api/0004-Plazma-Configurations.patch deleted file mode 100644 index 0ac07f6..0000000 --- a/patches/api/0004-Plazma-Configurations.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Thu, 22 Dec 2022 20:20:03 +0900 -Subject: [PATCH] Plazma Configurations - - -diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ddb1ff894910761a78b91a343f32e129f03a03c4..bebe4116e50f0b0f64f6bdbd3f05f0b998225435 100644 ---- a/src/main/java/org/bukkit/Server.java -+++ b/src/main/java/org/bukkit/Server.java -@@ -2295,6 +2295,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi - } - // Purpur end - -+ // Plazma start - Plazma Configuration API -+ @NotNull -+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfig() { -+ throw new UnsupportedOperationException("Not supported yet."); -+ } -+ // Plazma end -+ - /** - * Sends the component to the player - * diff --git a/patches/api/0006-Completely-remove-timings-implementations.patch b/patches/api/0006-Completely-remove-timings-implementations.patch deleted file mode 100644 index f8175d0..0000000 --- a/patches/api/0006-Completely-remove-timings-implementations.patch +++ /dev/null @@ -1,2520 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Wed, 15 May 2024 12:43:03 +0900 -Subject: [PATCH] Completely remove timings implementations - - -diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java -deleted file mode 100644 -index 73b125979e2f2dfd13cbf689a90b29cc68a36e09..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/FullServerTickHandler.java -+++ /dev/null -@@ -1,89 +0,0 @@ --package co.aikar.timings; -- --import static co.aikar.timings.TimingsManager.*; -- --import org.bukkit.Bukkit; --import org.jetbrains.annotations.NotNull; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --public class FullServerTickHandler extends TimingHandler { -- private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null); -- final TimingData minuteData; -- double avgFreeMemory = -1D; -- double avgUsedMemory = -1D; -- FullServerTickHandler() { -- super(IDENTITY); -- minuteData = new TimingData(id); -- -- TIMING_MAP.put(IDENTITY, this); -- } -- -- @NotNull -- @Override -- public Timing startTiming() { -- if (TimingsManager.needsFullReset) { -- TimingsManager.resetTimings(); -- } else if (TimingsManager.needsRecheckEnabled) { -- TimingsManager.recheckEnabled(); -- } -- return super.startTiming(); -- } -- -- @Override -- public void stopTiming() { -- super.stopTiming(); -- if (!isEnabled()) { -- return; -- } -- if (TimingHistory.timedTicks % 20 == 0) { -- final Runtime runtime = Runtime.getRuntime(); -- double usedMemory = runtime.totalMemory() - runtime.freeMemory(); -- double freeMemory = runtime.maxMemory() - usedMemory; -- if (this.avgFreeMemory == -1) { -- this.avgFreeMemory = freeMemory; -- } else { -- this.avgFreeMemory = (this.avgFreeMemory * (59 / 60D)) + (freeMemory * (1 / 60D)); -- } -- -- if (this.avgUsedMemory == -1) { -- this.avgUsedMemory = usedMemory; -- } else { -- this.avgUsedMemory = (this.avgUsedMemory * (59 / 60D)) + (usedMemory * (1 / 60D)); -- } -- } -- -- long start = System.nanoTime(); -- TimingsManager.tick(); -- long diff = System.nanoTime() - start; -- TIMINGS_TICK.addDiff(diff, null); -- // addDiff for TIMINGS_TICK incremented this, bring it back down to 1 per tick. -- record.setCurTickCount(record.getCurTickCount()-1); -- -- minuteData.setCurTickTotal(record.getCurTickTotal()); -- minuteData.setCurTickCount(1); -- -- boolean violated = isViolated(); -- minuteData.processTick(violated); -- TIMINGS_TICK.processTick(violated); -- processTick(violated); -- -- -- if (TimingHistory.timedTicks % 1200 == 0) { -- MINUTE_REPORTS.add(new TimingHistory.MinuteReport()); -- TimingHistory.resetTicks(false); -- minuteData.reset(); -- } -- if (TimingHistory.timedTicks % Timings.getHistoryInterval() == 0) { -- TimingsManager.HISTORY.add(new TimingHistory()); -- TimingsManager.resetTimings(); -- } -- //Bukkit.getUnsafe().reportTimings(); -- } -- -- boolean isViolated() { -- return record.getCurTickTotal() > 50000000; -- } --} -diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java -deleted file mode 100644 -index 42e7e712403676171d34d5f2be27e48e7a071ebd..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/NullTimingHandler.java -+++ /dev/null -@@ -1,72 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --public final class NullTimingHandler implements Timing { -- public static final Timing NULL = new NullTimingHandler(); -- @NotNull -- @Override -- public Timing startTiming() { -- return this; -- } -- -- @Override -- public void stopTiming() { -- -- } -- -- @NotNull -- @Override -- public Timing startTimingIfSync() { -- return this; -- } -- -- @Override -- public void stopTimingIfSync() { -- -- } -- -- @Override -- public void abort() { -- -- } -- -- @Nullable -- @Override -- public TimingHandler getTimingHandler() { -- return null; -- } -- -- @Override -- public void close() { -- -- } --} -diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java -deleted file mode 100644 -index 438a9c76381ea3f5b774e2232ff56c5dc6f82586..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimedEventExecutor.java -+++ /dev/null -@@ -1,93 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import org.bukkit.Bukkit; --import org.bukkit.event.Event; --import org.bukkit.event.EventException; --import org.bukkit.event.Listener; --import org.bukkit.plugin.EventExecutor; --import org.bukkit.plugin.Plugin; -- --import java.lang.reflect.Method; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --public class TimedEventExecutor implements EventExecutor { -- -- private final EventExecutor executor; -- private final Timing timings; -- -- /** -- * Wraps an event executor and associates a timing handler to it. -- * -- * @param executor Executor to wrap -- * @param plugin Owning plugin -- * @param method EventHandler method -- * @param eventClass Owning class -- */ -- public TimedEventExecutor(@NotNull EventExecutor executor, @NotNull Plugin plugin, @Nullable Method method, @NotNull Class eventClass) { -- this.executor = executor; -- String id; -- -- if (method == null) { -- if (executor.getClass().getEnclosingClass() != null) { // Oh Skript, how we love you -- method = executor.getClass().getEnclosingMethod(); -- } -- } -- -- if (method != null) { -- id = method.getDeclaringClass().getName(); -- } else { -- id = executor.getClass().getName(); -- } -- -- -- final String eventName = eventClass.getSimpleName(); -- boolean verbose = "BlockPhysicsEvent".equals(eventName); -- this.timings = Timings.ofSafe(plugin, (verbose ? "## " : "") + -- "Event: " + id + " (" + eventName + ")"); -- } -- -- @Override -- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { -- if (event.isAsynchronous() || !Timings.timingsEnabled || !Bukkit.isPrimaryThread()) { -- executor.execute(listener, event); -- return; -- } -- //try (Timing ignored = timings.startTiming()){ // Purpur -- executor.execute(listener, event); -- //} // Purpur -- } -- -- @Override -- @NotNull -- public String toString() { -- return "TimedEventExecutor['" + this.executor.toString() + "']"; -- } --} -diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java -index 8709c955bac34bc546a8e022cfac808bc61ee793..228a9fa4ad569d69166ea990b5cc7e07b15e567a 100644 ---- a/src/main/java/co/aikar/timings/Timing.java -+++ b/src/main/java/co/aikar/timings/Timing.java -@@ -40,7 +40,12 @@ public interface Timing extends AutoCloseable { - */ - @NotNull - @io.papermc.paper.annotation.DoNotUse // Purpur -- Timing startTiming(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ default Timing startTiming() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation - - /** - *

Stops timing and records the data. Propagates the data up to group handlers.

-@@ -48,7 +53,12 @@ public interface Timing extends AutoCloseable { - * Will automatically be called when this Timing is used with try-with-resources - */ - @io.papermc.paper.annotation.DoNotUse // Purpur -- void stopTiming(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ default void stopTiming() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation - - /** - * Starts timing the execution until {@link #stopTiming()} is called. -@@ -59,7 +69,12 @@ public interface Timing extends AutoCloseable { - */ - @NotNull - @io.papermc.paper.annotation.DoNotUse // Purpur -- Timing startTimingIfSync(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ default Timing startTimingIfSync() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation - - /** - *

Stops timing and records the data. Propagates the data up to group handlers.

-@@ -69,14 +84,23 @@ public interface Timing extends AutoCloseable { - * But only if we are on the primary thread. - */ - @io.papermc.paper.annotation.DoNotUse // Purpur -- void stopTimingIfSync(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ default void stopTimingIfSync() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation - - /** - * @deprecated Doesn't do anything - Removed - */ -- @Deprecated -+ @Deprecated(forRemoval = true) - @io.papermc.paper.annotation.DoNotUse // Purpur -- void abort(); -+ // Plazma start - Completely remove timings implementation -+ default void abort() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation - - /** - * Used internally to get the actual backing Handler in the case of delegated Handlers -@@ -84,9 +108,22 @@ public interface Timing extends AutoCloseable { - * @return TimingHandler - */ - @Nullable -- TimingHandler getTimingHandler(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ @io.papermc.paper.annotation.DoNotUse -+ default TimingHandler getTimingHandler() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation -+ - - @Override - @io.papermc.paper.annotation.DoNotUse // Purpur -- void close(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ default void close() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); -+ } -+ // Plazma end - Completely remove timings implementation -+ - } -diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java -deleted file mode 100644 -index a5d13a1e44edb861f45c83a9b4309fbf799d407d..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingData.java -+++ /dev/null -@@ -1,122 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import java.util.List; --import org.jetbrains.annotations.NotNull; -- --import static co.aikar.util.JSONUtil.toArray; -- --/** -- *

Lightweight object for tracking timing data

-- * -- * This is broken out to reduce memory usage -- */ --class TimingData { -- private final int id; -- private int count = 0; -- private int lagCount = 0; -- private long totalTime = 0; -- private long lagTotalTime = 0; -- private int curTickCount = 0; -- private long curTickTotal = 0; -- -- TimingData(int id) { -- this.id = id; -- } -- -- private TimingData(TimingData data) { -- this.id = data.id; -- this.totalTime = data.totalTime; -- this.lagTotalTime = data.lagTotalTime; -- this.count = data.count; -- this.lagCount = data.lagCount; -- } -- -- void add(long diff) { -- ++curTickCount; -- curTickTotal += diff; -- } -- -- void processTick(boolean violated) { -- totalTime += curTickTotal; -- count += curTickCount; -- if (violated) { -- lagTotalTime += curTickTotal; -- lagCount += curTickCount; -- } -- curTickTotal = 0; -- curTickCount = 0; -- } -- -- void reset() { -- count = 0; -- lagCount = 0; -- curTickTotal = 0; -- curTickCount = 0; -- totalTime = 0; -- lagTotalTime = 0; -- } -- -- protected TimingData clone() { -- return new TimingData(this); -- } -- -- @NotNull -- List export() { -- List list = toArray( -- id, -- count, -- totalTime); -- if (lagCount > 0) { -- list.add(lagCount); -- list.add(lagTotalTime); -- } -- return list; -- } -- -- boolean hasData() { -- return count > 0; -- } -- -- long getTotalTime() { -- return totalTime; -- } -- -- int getCurTickCount() { -- return curTickCount; -- } -- -- void setCurTickCount(int curTickCount) { -- this.curTickCount = curTickCount; -- } -- -- long getCurTickTotal() { -- return curTickTotal; -- } -- -- void setCurTickTotal(long curTickTotal) { -- this.curTickTotal = curTickTotal; -- } --} -diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java -index 41d10421e1e79711e2e90ff2dc225bfd9cac9284..3bd19b990078a177a4bd197f617c0f871ceb9d3a 100644 ---- a/src/main/java/co/aikar/timings/TimingHandler.java -+++ b/src/main/java/co/aikar/timings/TimingHandler.java -@@ -1,226 +1,3 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ - package co.aikar.timings; - --import co.aikar.util.LoadingIntMap; --import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -- --import java.util.ArrayDeque; --import java.util.Deque; --import java.util.concurrent.atomic.AtomicInteger; --import java.util.logging.Level; --import java.util.logging.Logger; -- --import org.bukkit.Bukkit; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --class TimingHandler implements Timing { -- -- private static AtomicInteger idPool = new AtomicInteger(1); -- private static Deque TIMING_STACK = new ArrayDeque<>(); -- final int id = idPool.getAndIncrement(); -- -- final TimingIdentifier identifier; -- private final boolean verbose; -- -- private final Int2ObjectOpenHashMap children = new LoadingIntMap<>(TimingData::new); -- -- final TimingData record; -- private TimingHandler startParent; -- private final TimingHandler groupHandler; -- -- private long start = 0; -- private int timingDepth = 0; -- private boolean added; -- private boolean timed; -- private boolean enabled; -- -- TimingHandler(@NotNull TimingIdentifier id) { -- this.identifier = id; -- this.verbose = id.name.startsWith("##"); -- this.record = new TimingData(this.id); -- this.groupHandler = id.groupHandler; -- -- TimingIdentifier.getGroup(id.group).handlers.add(this); -- checkEnabled(); -- } -- -- final void checkEnabled() { -- enabled = Timings.timingsEnabled && (!verbose || Timings.verboseEnabled); -- } -- -- void processTick(boolean violated) { -- if (timingDepth != 0 || record.getCurTickCount() == 0) { -- timingDepth = 0; -- start = 0; -- return; -- } -- -- record.processTick(violated); -- for (TimingData handler : children.values()) { -- handler.processTick(violated); -- } -- } -- -- @NotNull -- @Override -- public Timing startTimingIfSync() { -- startTiming(); -- return this; -- } -- -- @Override -- public void stopTimingIfSync() { -- stopTiming(); -- } -- -- @NotNull -- public Timing startTiming() { -- if (!enabled || !Bukkit.isPrimaryThread()) { -- return this; -- } -- if (++timingDepth == 1) { -- startParent = TIMING_STACK.peekLast(); -- start = System.nanoTime(); -- } -- TIMING_STACK.addLast(this); -- return this; -- } -- -- public void stopTiming() { -- if (!enabled || timingDepth <= 0 || start == 0 || !Bukkit.isPrimaryThread()) { -- return; -- } -- -- popTimingStack(); -- if (--timingDepth == 0) { -- addDiff(System.nanoTime() - start, startParent); -- startParent = null; -- start = 0; -- } -- } -- -- private void popTimingStack() { -- TimingHandler last; -- while ((last = TIMING_STACK.removeLast()) != this) { -- last.timingDepth = 0; -- if ("Minecraft".equalsIgnoreCase(last.identifier.group)) { -- Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)"); // Plazma - Fork-friendly Rebranding -- } else { -- Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to the plugin " + last.identifier.group + " (Look for errors above this in the logs) (" + last.identifier + " did not stopTiming)", new Throwable()); -- } -- -- boolean found = TIMING_STACK.contains(this); -- if (!found) { -- // We aren't even in the stack... Don't pop everything -- TIMING_STACK.addLast(last); -- break; -- } -- } -- } -- -- @Override -- public final void abort() { -- -- } -- -- void addDiff(long diff, @Nullable TimingHandler parent) { -- if (parent != null) { -- parent.children.get(id).add(diff); -- } -- -- record.add(diff); -- if (!added) { -- added = true; -- timed = true; -- TimingsManager.HANDLERS.add(this); -- } -- if (groupHandler != null) { -- groupHandler.addDiff(diff, parent); -- groupHandler.children.get(id).add(diff); -- } -- } -- -- /** -- * Reset this timer, setting all values to zero. -- */ -- void reset(boolean full) { -- record.reset(); -- if (full) { -- timed = false; -- } -- start = 0; -- timingDepth = 0; -- added = false; -- children.clear(); -- checkEnabled(); -- } -- -- @NotNull -- @Override -- public TimingHandler getTimingHandler() { -- return this; -- } -- -- @Override -- public boolean equals(Object o) { -- return (this == o); -- } -- -- @Override -- public int hashCode() { -- return id; -- } -- -- /** -- * This is simply for the Closeable interface so it can be used with try-with-resources () -- */ -- @Override -- public void close() { -- stopTimingIfSync(); -- } -- -- public boolean isSpecial() { -- return this == TimingsManager.FULL_SERVER_TICK || this == TimingsManager.TIMINGS_TICK; -- } -- -- boolean isTimed() { -- return timed; -- } -- -- public boolean isEnabled() { -- return enabled; -- } -- -- @NotNull -- TimingData[] cloneChildren() { -- final TimingData[] clonedChildren = new TimingData[children.size()]; -- int i = 0; -- for (TimingData child : children.values()) { -- clonedChildren[i++] = child.clone(); -- } -- return clonedChildren; -- } --} -+@Deprecated(forRemoval = true) interface TimingHandler {} // Plazma - Completely remove timings implementation -diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java -deleted file mode 100644 -index 6f6eb1a2e6c8d49014a7ae44540ee282bae5200e..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingHistory.java -+++ /dev/null -@@ -1,357 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import co.aikar.timings.TimingHistory.RegionData.RegionId; --import com.google.common.base.Function; --import com.google.common.collect.Sets; --import org.bukkit.Bukkit; --import org.bukkit.Chunk; --import org.bukkit.Material; --import org.bukkit.World; --import org.bukkit.block.BlockState; --import org.bukkit.entity.Entity; --import org.bukkit.entity.EntityType; --import org.bukkit.entity.Player; --import co.aikar.util.LoadingMap; --import co.aikar.util.MRUMapCache; -- --import java.lang.management.ManagementFactory; --import java.util.Collection; --import java.util.EnumMap; --import java.util.List; --import java.util.Map; --import java.util.Set; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --import static co.aikar.timings.TimingsManager.FULL_SERVER_TICK; --import static co.aikar.timings.TimingsManager.MINUTE_REPORTS; --import static co.aikar.util.JSONUtil.*; -- --/** -- * Internal. -- * -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"}) --public class TimingHistory { -- public static long lastMinuteTime; -- public static long timedTicks; -- public static long playerTicks; -- public static long entityTicks; -- public static long tileEntityTicks; -- public static long activatedEntityTicks; -- private static int worldIdPool = 1; -- static Map worldMap = LoadingMap.newHashMap(new Function() { -- @NotNull -- @Override -- public Integer apply(@Nullable String input) { -- return worldIdPool++; -- } -- }); -- private final long endTime; -- private final long startTime; -- private final long totalTicks; -- private final long totalTime; // Represents all time spent running the server this history -- private final MinuteReport[] minuteReports; -- -- private final TimingHistoryEntry[] entries; -- final Set tileEntityTypeSet = Sets.newHashSet(); -- final Set entityTypeSet = Sets.newHashSet(); -- private final Map worlds; -- -- TimingHistory() { -- this.endTime = System.currentTimeMillis() / 1000; -- this.startTime = TimingsManager.historyStart / 1000; -- if (timedTicks % 1200 != 0 || MINUTE_REPORTS.isEmpty()) { -- this.minuteReports = MINUTE_REPORTS.toArray(new MinuteReport[MINUTE_REPORTS.size() + 1]); -- this.minuteReports[this.minuteReports.length - 1] = new MinuteReport(); -- } else { -- this.minuteReports = MINUTE_REPORTS.toArray(new MinuteReport[MINUTE_REPORTS.size()]); -- } -- long ticks = 0; -- for (MinuteReport mp : this.minuteReports) { -- ticks += mp.ticksRecord.timed; -- } -- this.totalTicks = ticks; -- this.totalTime = FULL_SERVER_TICK.record.getTotalTime(); -- this.entries = new TimingHistoryEntry[TimingsManager.HANDLERS.size()]; -- -- int i = 0; -- for (TimingHandler handler : TimingsManager.HANDLERS) { -- entries[i++] = new TimingHistoryEntry(handler); -- } -- -- // Information about all loaded chunks/entities -- //noinspection unchecked -- this.worlds = toObjectMapper(Bukkit.getWorlds(), new Function() { -- @NotNull -- @Override -- public JSONPair apply(World world) { -- Map regions = LoadingMap.newHashMap(RegionData.LOADER); -- -- for (Chunk chunk : world.getLoadedChunks()) { -- RegionData data = regions.get(new RegionId(chunk.getX(), chunk.getZ())); -- -- for (Entity entity : chunk.getEntities()) { -- if (entity == null) { -- Bukkit.getLogger().warning("Null entity detected in chunk at position x: " + chunk.getX() + ", z: " + chunk.getZ()); -- continue; -- } -- -- data.entityCounts.get(entity.getType()).increment(); -- } -- -- for (BlockState tileEntity : chunk.getTileEntities(false)) { -- if (tileEntity == null) { -- Bukkit.getLogger().warning("Null tileentity detected in chunk at position x: " + chunk.getX() + ", z: " + chunk.getZ()); -- continue; -- } -- -- data.tileEntityCounts.get(tileEntity.getBlock().getType()).increment(); -- } -- } -- return pair( -- worldMap.get(world.getName()), -- toArrayMapper(regions.values(),new Function() { -- @NotNull -- @Override -- public Object apply(RegionData input) { -- return toArray( -- input.regionId.x, -- input.regionId.z, -- toObjectMapper(input.entityCounts.entrySet(), -- new Function, JSONPair>() { -- @NotNull -- @Override -- public JSONPair apply(Map.Entry entry) { -- entityTypeSet.add(entry.getKey()); -- return pair( -- String.valueOf(entry.getKey().ordinal()), -- entry.getValue().count() -- ); -- } -- } -- ), -- toObjectMapper( -- input.tileEntityCounts.entrySet(), -- entry -> { -- tileEntityTypeSet.add(entry.getKey()); -- return pair( -- String.valueOf(entry.getKey().ordinal()), -- entry.getValue().count() -- ); -- } -- ) -- ); -- } -- }) -- ); -- } -- }); -- } -- static class RegionData { -- final RegionId regionId; -- @SuppressWarnings("Guava") -- static Function LOADER = new Function() { -- @NotNull -- @Override -- public RegionData apply(@NotNull RegionId id) { -- return new RegionData(id); -- } -- }; -- RegionData(@NotNull RegionId id) { -- this.regionId = id; -- } -- -- @Override -- public boolean equals(Object o) { -- if (this == o) { -- return true; -- } -- if (o == null || getClass() != o.getClass()) { -- return false; -- } -- -- RegionData that = (RegionData) o; -- -- return regionId.equals(that.regionId); -- -- } -- -- @Override -- public int hashCode() { -- return regionId.hashCode(); -- } -- -- @SuppressWarnings("unchecked") -- final Map entityCounts = MRUMapCache.of(LoadingMap.of( -- new EnumMap(EntityType.class), k -> new Counter() -- )); -- @SuppressWarnings("unchecked") -- final Map tileEntityCounts = MRUMapCache.of(LoadingMap.of( -- new EnumMap(Material.class), k -> new Counter() -- )); -- -- static class RegionId { -- final int x, z; -- final long regionId; -- RegionId(int x, int z) { -- this.x = x >> 5 << 5; -- this.z = z >> 5 << 5; -- this.regionId = ((long) (this.x) << 32) + (this.z >> 5 << 5) - Integer.MIN_VALUE; -- } -- -- @Override -- public boolean equals(Object o) { -- if (this == o) return true; -- if (o == null || getClass() != o.getClass()) return false; -- -- RegionId regionId1 = (RegionId) o; -- -- return regionId == regionId1.regionId; -- -- } -- -- @Override -- public int hashCode() { -- return (int) (regionId ^ (regionId >>> 32)); -- } -- } -- } -- static void resetTicks(boolean fullReset) { -- if (fullReset) { -- // Non full is simply for 1 minute reports -- timedTicks = 0; -- } -- lastMinuteTime = System.nanoTime(); -- playerTicks = 0; -- tileEntityTicks = 0; -- entityTicks = 0; -- activatedEntityTicks = 0; -- } -- -- @NotNull -- Object export() { -- return createObject( -- pair("s", startTime), -- pair("e", endTime), -- pair("tk", totalTicks), -- pair("tm", totalTime), -- pair("w", worlds), -- pair("h", toArrayMapper(entries, new Function() { -- @Nullable -- @Override -- public Object apply(TimingHistoryEntry entry) { -- TimingData record = entry.data; -- if (!record.hasData()) { -- return null; -- } -- return entry.export(); -- } -- })), -- pair("mp", toArrayMapper(minuteReports, new Function() { -- @NotNull -- @Override -- public Object apply(MinuteReport input) { -- return input.export(); -- } -- })) -- ); -- } -- -- static class MinuteReport { -- final long time = System.currentTimeMillis() / 1000; -- -- final TicksRecord ticksRecord = new TicksRecord(); -- final PingRecord pingRecord = new PingRecord(); -- final TimingData fst = TimingsManager.FULL_SERVER_TICK.minuteData.clone(); -- final double tps = 1E9 / ( System.nanoTime() - lastMinuteTime ) * ticksRecord.timed; -- final double usedMemory = TimingsManager.FULL_SERVER_TICK.avgUsedMemory; -- final double freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory; -- final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage(); -- -- @NotNull -- List export() { -- return toArray( -- time, -- Math.round(tps * 100D) / 100D, -- Math.round(pingRecord.avg * 100D) / 100D, -- fst.export(), -- toArray(ticksRecord.timed, -- ticksRecord.player, -- ticksRecord.entity, -- ticksRecord.activatedEntity, -- ticksRecord.tileEntity -- ), -- usedMemory, -- freeMemory, -- loadAvg -- ); -- } -- } -- -- private static class TicksRecord { -- final long timed; -- final long player; -- final long entity; -- final long tileEntity; -- final long activatedEntity; -- -- TicksRecord() { -- timed = timedTicks - (TimingsManager.MINUTE_REPORTS.size() * 1200); -- player = playerTicks; -- entity = entityTicks; -- tileEntity = tileEntityTicks; -- activatedEntity = activatedEntityTicks; -- } -- -- } -- -- private static class PingRecord { -- final double avg; -- -- PingRecord() { -- final Collection onlinePlayers = Bukkit.getOnlinePlayers(); -- int totalPing = 0; -- for (Player player : onlinePlayers) { -- totalPing += player.spigot().getPing(); -- } -- avg = onlinePlayers.isEmpty() ? 0 : totalPing / onlinePlayers.size(); -- } -- } -- -- -- private static class Counter { -- private int count = 0; -- public int increment() { -- return ++count; -- } -- public int count() { -- return count; -- } -- } --} -diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java -deleted file mode 100644 -index 86d5ac6bd0d7d0003688761aceb3f3343575319f..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingHistoryEntry.java -+++ /dev/null -@@ -1,58 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import com.google.common.base.Function; -- --import java.util.List; --import org.jetbrains.annotations.NotNull; -- --import static co.aikar.util.JSONUtil.toArrayMapper; -- --class TimingHistoryEntry { -- final TimingData data; -- private final TimingData[] children; -- -- TimingHistoryEntry(@NotNull TimingHandler handler) { -- this.data = handler.record.clone(); -- children = handler.cloneChildren(); -- } -- -- @NotNull -- List export() { -- List result = data.export(); -- if (children.length > 0) { -- result.add( -- toArrayMapper(children, new Function() { -- @NotNull -- @Override -- public Object apply(TimingData child) { -- return child.export(); -- } -- }) -- ); -- } -- return result; -- } --} -diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java -deleted file mode 100644 -index df142a89b8c43acb81eb383eac0ef048a1f49a6e..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingIdentifier.java -+++ /dev/null -@@ -1,116 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import co.aikar.util.LoadingMap; -- --import java.util.ArrayList; --import java.util.Collections; --import java.util.List; --import java.util.Map; --import java.util.Objects; --import java.util.concurrent.ConcurrentHashMap; --import java.util.concurrent.atomic.AtomicInteger; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --/** -- *

Used as a basis for fast HashMap key comparisons for the Timing Map.

-- * -- * This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings -- */ --final class TimingIdentifier { -- /** -- * Holds all groups. Autoloads on request for a group by name. -- */ -- static final Map GROUP_MAP = LoadingMap.of(new ConcurrentHashMap<>(64, .5F), TimingGroup::new); -- private static final TimingGroup DEFAULT_GROUP = getGroup("Minecraft"); -- final String group; -- final String name; -- final TimingHandler groupHandler; -- private final int hashCode; -- -- TimingIdentifier(@Nullable String group, @NotNull String name, @Nullable Timing groupHandler) { -- this.group = group != null ? group: DEFAULT_GROUP.name; -- this.name = name; -- this.groupHandler = groupHandler != null ? groupHandler.getTimingHandler() : null; -- this.hashCode = (31 * this.group.hashCode()) + this.name.hashCode(); -- } -- -- @NotNull -- static TimingGroup getGroup(@Nullable String groupName) { -- if (groupName == null) { -- //noinspection ConstantConditions -- return DEFAULT_GROUP; -- } -- -- return GROUP_MAP.get(groupName); -- } -- -- @Override -- public boolean equals(Object o) { -- if (o == null) { -- return false; -- } -- -- TimingIdentifier that = (TimingIdentifier) o; -- return Objects.equals(group, that.group) && Objects.equals(name, that.name); -- } -- -- @Override -- public int hashCode() { -- return hashCode; -- } -- -- @Override -- public String toString() { -- return "TimingIdentifier{id=" + group + ":" + name +'}'; -- } -- -- static class TimingGroup { -- -- private static AtomicInteger idPool = new AtomicInteger(1); -- final int id = idPool.getAndIncrement(); -- -- final String name; -- final List handlers = Collections.synchronizedList(new ArrayList<>(64)); -- -- private TimingGroup(String name) { -- this.name = name; -- } -- -- @Override -- public boolean equals(Object o) { -- if (this == o) return true; -- if (o == null || getClass() != o.getClass()) return false; -- TimingGroup that = (TimingGroup) o; -- return id == that.id; -- } -- -- @Override -- public int hashCode() { -- return id; -- } -- } --} -diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java -index 27a02f0c3261067d8e4ee6169c62cecbbfe50d42..3d0cf82b59d0d6ebc84fc589d75b508bf6acbded 100644 ---- a/src/main/java/co/aikar/timings/Timings.java -+++ b/src/main/java/co/aikar/timings/Timings.java -@@ -44,18 +44,8 @@ import org.jetbrains.annotations.Nullable; - * @deprecated Timings will be removed in the future - */ - @Deprecated(forRemoval = true) --@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"}) - public final class Timings { - -- final static List requestingReport = Lists.newArrayList(); -- private static final int MAX_HISTORY_FRAMES = 12; -- public static final Timing NULL_HANDLER = new NullTimingHandler(); -- static boolean timingsEnabled = false; -- static boolean verboseEnabled = false; -- private static int historyInterval = -1; -- private static int historyLength = -1; -- private static boolean warnedAboutDeprecationOnEnable; -- - private Timings() {} - - /** -@@ -66,12 +56,10 @@ public final class Timings { - * @return Handler - */ - @NotNull -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static Timing of(@NotNull Plugin plugin, @NotNull String name) { -- Timing pluginHandler = null; -- if (plugin != null) { -- pluginHandler = ofSafe(plugin.getName(), "Combined Total", TimingsManager.PLUGIN_GROUP_HANDLER); -- } -- return of(plugin, name, pluginHandler); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -87,10 +75,10 @@ public final class Timings { - * @return Timing Handler - */ - @NotNull -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static Timing of(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) { -- Preconditions.checkNotNull(plugin, "Plugin can not be null"); -- Bukkit.getLogger().warning(String.format("Plugin '%s' is creating timing '%s' - this is deprecated behavior, please report it to the authors: %s", plugin.getName(), name, String.join(", ", plugin.getDescription().getAuthors()))); -- return TimingsManager.getHandler(plugin.getName(), name, groupHandler); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -105,8 +93,10 @@ public final class Timings { - * @return Timing Handler - */ - @NotNull -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name) { -- return ofStart(plugin, name, null); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -122,10 +112,10 @@ public final class Timings { - * @return Timing Handler - */ - @NotNull -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) { -- Timing timing = of(plugin, name, groupHandler); -- //timing.startTiming(); // Purpur -- return timing; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -133,8 +123,10 @@ public final class Timings { - * - * @return Enabled or not - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static boolean isTimingsEnabled() { -- return timingsEnabled; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -144,28 +136,16 @@ public final class Timings { - * - * @param enabled Should timings be reported - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void setTimingsEnabled(boolean enabled) { -- if (enabled && !warnedAboutDeprecationOnEnable) { -- //Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); -- warnedAboutDeprecationOnEnable = true; -- } -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static Component deprecationMessage() { -- return Component.text() -- .color(TextColor.color(0xffc93a)) -- .append(Component.text("[!] The timings profiler is in no-op mode and will be fully removed in a later update.")) -- .append(Component.newline()) -- .append(Component.text(" We recommend migrating to the spark profiler.")) -- .append(Component.newline()) -- .append( -- Component.text(" For more information please visit: ") -- .append( -- Component.text() -- .content("https://github.com/PaperMC/Paper/discussions/10565") -- .clickEvent(ClickEvent.openUrl("https://github.com/PaperMC/Paper/discussions/10565"))) -- ) -- .build(); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -175,8 +155,10 @@ public final class Timings { - * - * @return Enabled or not - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static boolean isVerboseTimingsEnabled() { -- return verboseEnabled; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -187,9 +169,10 @@ public final class Timings { - * - * @param enabled Should high-frequency timings be reported - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void setVerboseTimingsEnabled(boolean enabled) { -- verboseEnabled = enabled; -- TimingsManager.needsRecheckEnabled = true; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -199,8 +182,10 @@ public final class Timings { - * - * @return Interval in ticks - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static int getHistoryInterval() { -- return historyInterval; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -213,12 +198,10 @@ public final class Timings { - * - * @param interval Interval in ticks - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void setHistoryInterval(int interval) { -- historyInterval = Math.max(20*60, interval); -- // Recheck the history length with the new Interval -- if (historyLength != -1) { -- setHistoryLength(historyLength); -- } -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -228,8 +211,10 @@ public final class Timings { - * - * @return Duration in Ticks - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static int getHistoryLength() { -- return historyLength; -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -243,30 +228,19 @@ public final class Timings { - * - * @param length Duration in ticks - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void setHistoryLength(int length) { -- // Cap at 12 History Frames, 1 hour at 5 minute frames. -- int maxLength = historyInterval * MAX_HISTORY_FRAMES; -- // For special cases of servers with special permission to bypass the max. -- // This max helps keep data file sizes reasonable for processing on Aikar's Timing parser side. -- // Setting this will not help you bypass the max unless Aikar has added an exception on the API side. -- if (System.getProperty("timings.bypassMax") != null) { -- maxLength = Integer.MAX_VALUE; -- } -- historyLength = Math.max(Math.min(maxLength, length), historyInterval); -- Queue oldQueue = TimingsManager.HISTORY; -- int frames = (getHistoryLength() / getHistoryInterval()); -- if (length > maxLength) { -- Bukkit.getLogger().log(Level.WARNING, "Timings Length too high. Requested " + length + ", max is " + maxLength + ". To get longer history, you must increase your interval. Set Interval to " + Math.ceil(length / MAX_HISTORY_FRAMES) + " to achieve this length."); -- } -- TimingsManager.HISTORY = EvictingQueue.create(frames); -- TimingsManager.HISTORY.addAll(oldQueue); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** - * Resets all Timing Data - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void reset() { -- TimingsManager.reset(); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -275,11 +249,10 @@ public final class Timings { - * If sender is null, ConsoleCommandSender will be used. - * @param sender The sender to send to, or null to use the ConsoleCommandSender - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void generateReport(@Nullable CommandSender sender) { -- if (sender == null) { -- sender = Bukkit.getConsoleSender(); -- } -- requestingReport.add(sender); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - - /** -@@ -287,39 +260,11 @@ public final class Timings { - * Use with {@link org.bukkit.command.BufferedCommandSender} to get full response when done! - * @param sender The listener to send responses too. - */ -+ @Deprecated(forRemoval = true) // Plazma - Completely remove timings implementation -+ @io.papermc.paper.annotation.DoNotUse // Plazma - Completely remove timings implementation - public static void generateReport(@NotNull TimingsReportListener sender) { -- Preconditions.checkNotNull(sender); -- requestingReport.add(sender); -- } -- -- /* -- ================= -- Protected API: These are for internal use only in Bukkit/CraftBukkit -- These do not have isPrimaryThread() checks in the startTiming/stopTiming -- ================= -- */ -- @NotNull -- static TimingHandler ofSafe(@NotNull String name) { -- return ofSafe(null, name, null); -- } -- -- @NotNull -- static Timing ofSafe(@Nullable Plugin plugin, @NotNull String name) { -- Timing pluginHandler = null; -- if (plugin != null) { -- pluginHandler = ofSafe(plugin.getName(), "Combined Total", TimingsManager.PLUGIN_GROUP_HANDLER); -- } -- return ofSafe(plugin != null ? plugin.getName() : "Minecraft - Invalid Plugin", name, pluginHandler); -- } -- -- @NotNull -- static TimingHandler ofSafe(@NotNull String name, @Nullable Timing groupHandler) { -- return ofSafe(null, name, groupHandler); -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use spark instead."); // Plazma - Completely remove timings implementation - } - -- @NotNull -- static TimingHandler ofSafe(@Nullable String groupName, @NotNull String name, @Nullable Timing groupHandler) { -- return TimingsManager.getHandler(groupName, name, groupHandler); -- } - } - -diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java -deleted file mode 100644 -index f28eec202237461cb489a2b13289d813381a25bc..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingsCommand.java -+++ /dev/null -@@ -1,130 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import com.google.common.base.Preconditions; --import com.google.common.collect.ImmutableList; --import net.kyori.adventure.text.format.NamedTextColor; --import org.bukkit.command.CommandSender; --import org.bukkit.command.defaults.BukkitCommand; --import org.bukkit.util.StringUtil; -- --import java.util.ArrayList; --import java.util.List; --import org.jetbrains.annotations.NotNull; -- --import static net.kyori.adventure.text.Component.text; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --public class TimingsCommand extends BukkitCommand { -- private static final List TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff"); -- private long lastResetAttempt = 0; -- -- public TimingsCommand(@NotNull String name) { -- super(name); -- this.description = "Manages Spigot Timings data to see performance of the server."; -- this.usageMessage = "/timings";// "; // Purpur -- this.setPermission("bukkit.command.timings"); -- } -- -- @Override -- public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { -- if (!testPermission(sender)) { -- return true; -- } -- if (true) { -- net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage(); -- sender.sendMessage(mm.deserialize("Purpur has removed timings to save your performance. Please use /spark instead")); -- sender.sendMessage(mm.deserialize("For more information, view its documentation at")); -- sender.sendMessage(mm.deserialize("https://spark.lucko.me/docs/Command-Usage")); // Purpur -- return true; -- } -- if (args.length < 1) { -- sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED)); -- return true; -- } -- final String arg = args[0]; -- if ("on".equalsIgnoreCase(arg)) { -- Timings.setTimingsEnabled(true); -- sender.sendMessage(text("Enabled Timings & Reset")); -- return true; -- } else if ("off".equalsIgnoreCase(arg)) { -- Timings.setTimingsEnabled(false); -- sender.sendMessage(text("Disabled Timings")); -- return true; -- } -- -- if (!Timings.isTimingsEnabled()) { -- sender.sendMessage(text("Please enable timings by typing /timings on")); -- return true; -- } -- -- long now = System.currentTimeMillis(); -- if ("verbon".equalsIgnoreCase(arg)) { -- Timings.setVerboseTimingsEnabled(true); -- sender.sendMessage(text("Enabled Verbose Timings")); -- return true; -- } else if ("verboff".equalsIgnoreCase(arg)) { -- Timings.setVerboseTimingsEnabled(false); -- sender.sendMessage(text("Disabled Verbose Timings")); -- return true; -- } else if ("reset".equalsIgnoreCase(arg)) { -- if (now - lastResetAttempt < 30000) { -- TimingsManager.reset(); -- sender.sendMessage(text("Timings reset. Please wait 5-10 minutes before using /timings report.", NamedTextColor.RED)); -- } else { -- lastResetAttempt = now; -- sender.sendMessage(text("WARNING: Timings v2 should not be reset. If you are experiencing lag, please wait 3 minutes and then issue a report. The best timings will include 10+ minutes, with data before and after your lag period. If you really want to reset, run this command again within 30 seconds.", NamedTextColor.RED)); -- } -- } else if ( -- "paste".equalsIgnoreCase(arg) || -- "report".equalsIgnoreCase(arg) || -- "get".equalsIgnoreCase(arg) || -- "merged".equalsIgnoreCase(arg) || -- "separate".equalsIgnoreCase(arg) -- ) { -- Timings.generateReport(sender); -- } else { -- sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED)); -- } -- return true; -- } -- -- @NotNull -- @Override -- public List tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) { -- Preconditions.checkNotNull(sender, "Sender cannot be null"); -- Preconditions.checkNotNull(args, "Arguments cannot be null"); -- Preconditions.checkNotNull(alias, "Alias cannot be null"); -- -- if (false && args.length == 1) { // Purpur -- return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, -- new ArrayList(TIMINGS_SUBCOMMANDS.size())); -- } -- return ImmutableList.of(); -- } --} -diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java -deleted file mode 100644 -index e72ad05abada04426e32a73d02b21cb69079d268..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingsManager.java -+++ /dev/null -@@ -1,192 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import co.aikar.util.LoadingMap; --import com.google.common.collect.EvictingQueue; --import org.bukkit.Bukkit; --import org.bukkit.Server; --import org.bukkit.command.Command; --import org.bukkit.plugin.Plugin; --import org.bukkit.plugin.java.PluginClassLoader; -- --import java.util.ArrayList; --import java.util.List; --import java.util.Map; --import java.util.concurrent.ConcurrentHashMap; --import java.util.logging.Level; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --public final class TimingsManager { -- static final Map TIMING_MAP = LoadingMap.of( -- new ConcurrentHashMap<>(4096, .5F), TimingHandler::new -- ); -- public static final FullServerTickHandler FULL_SERVER_TICK = new FullServerTickHandler(); -- public static final TimingHandler TIMINGS_TICK = Timings.ofSafe("Timings Tick", FULL_SERVER_TICK); -- public static final Timing PLUGIN_GROUP_HANDLER = Timings.ofSafe("Plugins"); -- public static String url = "https://timings.aikar.co/"; -- public static List hiddenConfigs = new ArrayList(); -- public static boolean privacy = false; -- -- static final List HANDLERS = new ArrayList<>(1024); -- static final List MINUTE_REPORTS = new ArrayList<>(64); -- -- static EvictingQueue HISTORY = EvictingQueue.create(12); -- static long timingStart = 0; -- static long historyStart = 0; -- static boolean needsFullReset = false; -- static boolean needsRecheckEnabled = false; -- -- private TimingsManager() {} -- -- /** -- * Resets all timing data on the next tick -- */ -- static void reset() { -- needsFullReset = true; -- } -- -- /** -- * Ticked every tick by CraftBukkit to count the number of times a timer -- * caused TPS loss. -- */ -- static void tick() { -- if (Timings.timingsEnabled) { -- boolean violated = FULL_SERVER_TICK.isViolated(); -- -- for (TimingHandler handler : HANDLERS) { -- if (handler.isSpecial()) { -- // We manually call this -- continue; -- } -- handler.processTick(violated); -- } -- -- TimingHistory.playerTicks += Bukkit.getOnlinePlayers().size(); -- TimingHistory.timedTicks++; -- // Generate TPS/Ping/Tick reports every minute -- } -- } -- static void stopServer() { -- Timings.timingsEnabled = false; -- recheckEnabled(); -- } -- static void recheckEnabled() { -- synchronized (TIMING_MAP) { -- for (TimingHandler timings : TIMING_MAP.values()) { -- timings.checkEnabled(); -- } -- } -- needsRecheckEnabled = false; -- } -- static void resetTimings() { -- if (needsFullReset) { -- // Full resets need to re-check every handlers enabled state -- // Timing map can be modified from async so we must sync on it. -- synchronized (TIMING_MAP) { -- for (TimingHandler timings : TIMING_MAP.values()) { -- timings.reset(true); -- } -- } -- Bukkit.getLogger().log(Level.INFO, "Timings Reset"); -- HISTORY.clear(); -- needsFullReset = false; -- needsRecheckEnabled = false; -- timingStart = System.currentTimeMillis(); -- } else { -- // Soft resets only need to act on timings that have done something -- // Handlers can only be modified on main thread. -- for (TimingHandler timings : HANDLERS) { -- timings.reset(false); -- } -- } -- -- HANDLERS.clear(); -- MINUTE_REPORTS.clear(); -- -- TimingHistory.resetTicks(true); -- historyStart = System.currentTimeMillis(); -- } -- -- @NotNull -- static TimingHandler getHandler(@Nullable String group, @NotNull String name, @Nullable Timing parent) { -- return TIMING_MAP.get(new TimingIdentifier(group, name, parent)); -- } -- -- -- /** -- *

Due to access restrictions, we need a helper method to get a Command TimingHandler with String group

-- * -- * Plugins should never call this -- * -- * @param pluginName Plugin this command is associated with -- * @param command Command to get timings for -- * @return TimingHandler -- */ -- @NotNull -- public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) { -- Plugin plugin = null; -- final Server server = Bukkit.getServer(); -- if (!( server == null || pluginName == null || -- "minecraft".equals(pluginName) || "bukkit".equals(pluginName) || -- "spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName) -- )) { -- plugin = server.getPluginManager().getPlugin(pluginName); -- } -- if (plugin == null) { -- // Plugin is passing custom fallback prefix, try to look up by class loader -- plugin = getPluginByClassloader(command.getClass()); -- } -- if (plugin == null) { -- return Timings.ofSafe("Command: " + pluginName + ":" + command.getTimingName()); -- } -- -- return Timings.ofSafe(plugin, "Command: " + pluginName + ":" + command.getTimingName()); -- } -- -- /** -- * Looks up the class loader for the specified class, and if it is a PluginClassLoader, return the -- * Plugin that created this class. -- * -- * @param clazz Class to check -- * @return Plugin if created by a plugin -- */ -- @Nullable -- public static Plugin getPluginByClassloader(@Nullable Class clazz) { -- if (clazz == null) { -- return null; -- } -- final ClassLoader classLoader = clazz.getClassLoader(); -- if (classLoader instanceof PluginClassLoader) { -- PluginClassLoader pluginClassLoader = (PluginClassLoader) classLoader; -- return pluginClassLoader.getPlugin(); -- } -- return null; -- } --} -diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java -index df066d6f8d55afbc0c1897c486d638657a5f8df9..2ff0c2f9771a39a01f7fee879487eaaed1fe4c8e 100644 ---- a/src/main/java/co/aikar/timings/TimingsReportListener.java -+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java -@@ -1,90 +1,3 @@ - package co.aikar.timings; - --import com.google.common.base.Preconditions; --import com.google.common.collect.Lists; --import org.bukkit.Bukkit; --import org.bukkit.command.CommandSender; --import org.bukkit.command.ConsoleCommandSender; --import org.bukkit.command.MessageCommandSender; --import org.bukkit.command.RemoteConsoleCommandSender; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --import java.util.List; -- --/** -- * @deprecated Timings will be removed in the future -- */ --@Deprecated(forRemoval = true) --@SuppressWarnings("WeakerAccess") --public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender { -- private final List senders; -- private final Runnable onDone; -- private String timingsURL; -- -- public TimingsReportListener(@NotNull CommandSender senders) { -- this(senders, null); -- } -- public TimingsReportListener(@NotNull CommandSender sender, @Nullable Runnable onDone) { -- this(Lists.newArrayList(sender), onDone); -- } -- public TimingsReportListener(@NotNull List senders) { -- this(senders, null); -- } -- public TimingsReportListener(@NotNull List senders, @Nullable Runnable onDone) { -- Preconditions.checkNotNull(senders); -- Preconditions.checkArgument(!senders.isEmpty(), "senders is empty"); -- -- this.senders = Lists.newArrayList(senders); -- this.onDone = onDone; -- } -- -- @Nullable -- public String getTimingsURL() { -- return timingsURL; -- } -- -- public void done() { -- done(null); -- } -- -- public void done(@Nullable String url) { -- this.timingsURL = url; -- if (onDone != null) { -- onDone.run(); -- } -- for (CommandSender sender : senders) { -- if (sender instanceof TimingsReportListener) { -- ((TimingsReportListener) sender).done(); -- } -- } -- } -- -- @Override -- public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) { -- net.kyori.adventure.audience.ForwardingAudience.super.sendMessage(source, message, type); -- } -- -- @NotNull -- @Override -- public Iterable audiences() { -- return this.senders; -- } -- -- @Override -- public void sendMessage(@NotNull String message) { -- senders.forEach((sender) -> sender.sendMessage(message)); -- } -- -- public void addConsoleIfNeeded() { -- boolean hasConsole = false; -- for (CommandSender sender : this.senders) { -- if (sender instanceof ConsoleCommandSender || sender instanceof RemoteConsoleCommandSender) { -- hasConsole = true; -- } -- } -- if (!hasConsole) { -- this.senders.add(Bukkit.getConsoleSender()); -- } -- } --} -+@Deprecated(forRemoval = true) interface TimingsReportListener {} // Plazma - Completely remove timings implementation -diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java -deleted file mode 100644 -index 632c4961515f5052551f841cfa840e60bba7a257..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java -+++ /dev/null -@@ -1,53 +0,0 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package co.aikar.timings; -- --import org.bukkit.Bukkit; --import org.jetbrains.annotations.NotNull; -- --class UnsafeTimingHandler extends TimingHandler { -- -- UnsafeTimingHandler(@NotNull TimingIdentifier id) { -- super(id); -- } -- -- private static void checkThread() { -- if (!Bukkit.isPrimaryThread()) { -- throw new IllegalStateException("Calling Timings from Async Operation"); -- } -- } -- -- @NotNull -- @Override -- public Timing startTiming() { -- checkThread(); -- return super.startTiming(); -- } -- -- @Override -- public void stopTiming() { -- checkThread(); -- super.stopTiming(); -- } --} -diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -index abe256e1e45ce28036da4aa1586715bc8a1a3414..cf055d721c4c66eba9479ad88f3b6a514bf9677d 100644 ---- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java -+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -@@ -12,7 +12,7 @@ public class FormattedCommandAlias extends Command { - - public FormattedCommandAlias(@NotNull String alias, @NotNull String[] formatStrings) { - super(alias); -- timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot -+ // timings = co.aikar.timings.TimingsManager.getCommandTiming("minecraft", this); // Spigot // Thunderbolt - Remove remaining timings implementations - this.formatStrings = formatStrings; - } - -diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 7740ad53796d08584bb0110f99af5639993e4d71..3806c3887d9ba58370747ed165c2a644d811f5e1 100644 ---- a/src/main/java/org/bukkit/command/SimpleCommandMap.java -+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -39,7 +39,7 @@ public class SimpleCommandMap implements CommandMap { - register("bukkit", new VersionCommand("version")); - register("bukkit", new ReloadCommand("reload")); - //register("bukkit", new PluginsCommand("plugins")); // Paper -- register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper -+ //register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper // Plazma - Completely remove timings implementation - } - - public void setFallbackCommands() { -@@ -71,7 +71,7 @@ public class SimpleCommandMap implements CommandMap { - */ - @Override - public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) { -- command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper -+ //command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper // Plazma - Completely remove timings implementation - label = label.toLowerCase(Locale.ROOT).trim(); - fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim(); - boolean registered = register(label, command, false, fallbackPrefix); -@@ -166,11 +166,13 @@ public class SimpleCommandMap implements CommandMap { - parsedArgs = event.getArgs(); - // Purpur end - -+ /* // Plazma - Completely remove timings implementation - // Paper start - Plugins do weird things to workaround normal registration - if (target.timings == null) { - target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target); - } - // Paper end -+ */ // Plazma - Completely remove timings implementation - - try { - //try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur -diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java -index 47153dee66782a00b980ecf15e8774ab6f3d887d..25d8b2f57c42890b05433fac04ce60efdc6ae34d 100644 ---- a/src/main/java/org/bukkit/plugin/PluginManager.java -+++ b/src/main/java/org/bukkit/plugin/PluginManager.java -@@ -312,7 +312,13 @@ public interface PluginManager extends io.papermc.paper.plugin.PermissionManager - * - * @return True if event timings are to be used - */ -- public boolean useTimings(); -+ // Plazma start - Completely remove timings implementation -+ @Deprecated(forRemoval = true) -+ @io.papermc.paper.annotation.DoNotUse -+ default boolean useTimings() { -+ return false; -+ } -+ // Plazma end - Completely remove timings implementation - - // Paper start - @org.jetbrains.annotations.ApiStatus.Internal -diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 6b6edf9007997d9672e4c850464c1b71cb55f6b4..11b973b70ce62a6e227d343bdef6dcb9ece3f97d 100644 ---- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java -+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -61,7 +61,7 @@ public final class SimplePluginManager implements PluginManager { - public final Map> defSubs = new HashMap>(); - public PluginManager paperPluginManager; - // Paper end -- private boolean useTimings = false; -+ //private boolean useTimings = false; // Plazma - Completely remove timings implementation - - public SimplePluginManager(@NotNull Server instance, @NotNull SimpleCommandMap commandMap) { - server = instance; -@@ -718,18 +718,7 @@ public final class SimplePluginManager implements PluginManager { - Preconditions.checkArgument(priority != null, "Priority cannot be null"); - Preconditions.checkArgument(executor != null, "Executor cannot be null"); - Preconditions.checkArgument(plugin != null, "Plugin cannot be null"); -- if (true) {this.paperPluginManager.registerEvent(event, listener, priority, executor, plugin, ignoreCancelled); return;} // Paper -- -- if (!plugin.isEnabled()) { -- throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled"); -- } -- -- executor = new co.aikar.timings.TimedEventExecutor(executor, plugin, null, event); // Paper -- if (false) { // Spigot - RL handles useTimings check now // Paper -- getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); -- } else { -- getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); -- } -+ this.paperPluginManager.registerEvent(event, listener, priority, executor, plugin, ignoreCancelled); // Paper // Plazma - Completely remove timings implementation - } - - @NotNull -@@ -959,8 +948,8 @@ public final class SimplePluginManager implements PluginManager { - - @Override - public boolean useTimings() { -- if (true) {return this.paperPluginManager.useTimings();} // Paper -- return co.aikar.timings.Timings.isTimingsEnabled(); // Spigot -+ // TODO: Plazma - warn on use -+ return false; // Plazma - Completely remove timings implementation - } - - /** -@@ -970,7 +959,7 @@ public final class SimplePluginManager implements PluginManager { - */ - @Deprecated(forRemoval = true) - public void useTimings(boolean use) { -- co.aikar.timings.Timings.setTimingsEnabled(use); // Paper -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use Spark instead."); // Plazma - Completely remove timings implementation - } - - // Paper start -diff --git a/src/main/java/org/bukkit/plugin/TimedRegisteredListener.java b/src/main/java/org/bukkit/plugin/TimedRegisteredListener.java -deleted file mode 100644 -index 1d76e30b82ca56bb4cf3b9a33f5a129ab829e3f0..0000000000000000000000000000000000000000 ---- a/src/main/java/org/bukkit/plugin/TimedRegisteredListener.java -+++ /dev/null -@@ -1,101 +0,0 @@ --package org.bukkit.plugin; -- --import org.bukkit.event.Event; --import org.bukkit.event.EventException; --import org.bukkit.event.EventPriority; --import org.bukkit.event.Listener; --import org.jetbrains.annotations.NotNull; --import org.jetbrains.annotations.Nullable; -- --/** -- * Extends RegisteredListener to include timing information -- */ --public class TimedRegisteredListener extends RegisteredListener { -- private int count; -- private long totalTime; -- private Class eventClass; -- private boolean multiple = false; -- -- public TimedRegisteredListener(@NotNull final Listener pluginListener, @NotNull final EventExecutor eventExecutor, @NotNull final EventPriority eventPriority, @NotNull final Plugin registeredPlugin, final boolean listenCancelled) { -- super(pluginListener, eventExecutor, eventPriority, registeredPlugin, listenCancelled); -- } -- -- @Override -- public void callEvent(@NotNull Event event) throws EventException { -- if (event.isAsynchronous()) { -- super.callEvent(event); -- return; -- } -- count++; -- Class newEventClass = event.getClass(); -- if (this.eventClass == null) { -- this.eventClass = newEventClass; -- } else if (!this.eventClass.equals(newEventClass)) { -- multiple = true; -- this.eventClass = getCommonSuperclass(newEventClass, this.eventClass).asSubclass(Event.class); -- } -- long start = System.nanoTime(); -- super.callEvent(event); -- totalTime += System.nanoTime() - start; -- } -- -- @NotNull -- private static Class getCommonSuperclass(@NotNull Class class1, @NotNull Class class2) { -- while (!class1.isAssignableFrom(class2)) { -- class1 = class1.getSuperclass(); -- } -- return class1; -- } -- -- /** -- * Resets the call count and total time for this listener -- */ -- public void reset() { -- count = 0; -- totalTime = 0; -- } -- -- /** -- * Gets the total times this listener has been called -- * -- * @return Times this listener has been called -- */ -- public int getCount() { -- return count; -- } -- -- /** -- * Gets the total time calls to this listener have taken -- * -- * @return Total time for all calls of this listener -- */ -- public long getTotalTime() { -- return totalTime; -- } -- -- /** -- * Gets the class of the events this listener handled. If it handled -- * multiple classes of event, the closest shared superclass will be -- * returned, such that for any event this listener has handled, -- * this.getEventClass().isAssignableFrom(event.getClass()) -- * and no class this.getEventClass().isAssignableFrom(clazz) -- * {@literal && this.getEventClass() != clazz &&} -- * event.getClass().isAssignableFrom(clazz) for all handled events. -- * -- * @return the event class handled by this RegisteredListener -- */ -- @Nullable -- public Class getEventClass() { -- return eventClass; -- } -- -- /** -- * Gets whether this listener has handled multiple events, such that for -- * some two events, eventA.getClass() != eventB.getClass(). -- * -- * @return true if this listener has handled multiple events -- */ -- public boolean hasMultiple() { -- return multiple; -- } --} -diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 0c6ca7588fb3d6b6497ddf032fe75e5c6c9719e5..e20dc7bdbd7f6040af82f638576e5ccc2d48f12f 100644 ---- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -39,11 +39,11 @@ import org.bukkit.plugin.PluginDescriptionFile; - import org.bukkit.plugin.PluginLoader; - import org.bukkit.plugin.RegisteredListener; - import org.bukkit.plugin.SimplePluginManager; --import org.bukkit.plugin.TimedRegisteredListener; -+//import org.bukkit.plugin.TimedRegisteredListener; // Plazma - Completely remove timings implementation - import org.bukkit.plugin.UnknownDependencyException; - import org.jetbrains.annotations.NotNull; - import org.jetbrains.annotations.Nullable; --import org.spigotmc.CustomTimingsHandler; // Spigot -+// import org.spigotmc.CustomTimingsHandler; // Spigot // Thunderbolt - Remove remaining timings implementations - import org.yaml.snakeyaml.error.YAMLException; - - /** -@@ -233,7 +233,7 @@ public final class JavaPluginLoader implements PluginLoader { - Preconditions.checkArgument(plugin != null, "Plugin can not be null"); - Preconditions.checkArgument(listener != null, "Listener can not be null"); - -- boolean useTimings = server.getPluginManager().useTimings(); -+ //boolean useTimings = server.getPluginManager().useTimings(); // Plazma - Completely remove timings implementation - Map, Set> ret = new HashMap, Set>(); - Set methods; - try { -@@ -294,26 +294,22 @@ public final class JavaPluginLoader implements PluginLoader { - } - } - -- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper -- @Override -- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper -- try { -- if (!eventClass.isAssignableFrom(event.getClass())) { -- return; -- } -- method.invoke(listener, event); -- } catch (InvocationTargetException ex) { -- throw new EventException(ex.getCause()); -- } catch (Throwable t) { -- throw new EventException(t); -+ // Thunderbolt start - Remove remaining timings implementations -+ // Paper -+ EventExecutor executor = (listener1, event) -> { // Paper -+ try { -+ if (!eventClass.isAssignableFrom(event.getClass())) { -+ return; - } -+ method.invoke(listener1, event); -+ } catch (InvocationTargetException ex) { -+ throw new EventException(ex.getCause()); -+ } catch (Throwable t) { -+ throw new EventException(t); - } -- }, plugin, method, eventClass); // Paper -- if (false) { // Spigot - RL handles useTimings check now -- eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); -- } else { -- eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); -- } -+ }; // Paper -+ eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); -+ // Thunderbolt end - Remove remaining timings implementations - } - return ret; - } -diff --git a/src/main/java/org/plazmamc/plazma/DeprecationException.java b/src/main/java/org/plazmamc/plazma/DeprecationException.java -new file mode 100644 -index 0000000000000000000000000000000000000000..70114a474f92bd605b27f7e610946c0467b78f24 ---- /dev/null -+++ b/src/main/java/org/plazmamc/plazma/DeprecationException.java -@@ -0,0 +1,7 @@ -+package org.plazmamc.plazma; -+ -+public class DeprecationException extends RuntimeException { -+ public DeprecationException(String message) { -+ super(message); -+ } -+} -diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -index 9c2d605c50cbf9aefa56ec209df9f6cea1392e89..d799c5131abd81a987472aaa7cf105f1e958337f 100644 ---- a/src/main/java/org/spigotmc/CustomTimingsHandler.java -+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java -@@ -1,67 +1,28 @@ --/* -- * This file is licensed under the MIT License (MIT). -- * -- * Copyright (c) 2014 Daniel Ennis -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ -+// Plazma start - Completely remove timings implementation - package org.spigotmc; - --import org.bukkit.Bukkit; --import org.jetbrains.annotations.NotNull; --import org.bukkit.plugin.AuthorNagException; --import co.aikar.timings.Timing; --import co.aikar.timings.Timings; --import co.aikar.timings.TimingsManager; -+import io.papermc.paper.annotation.DoNotUse; - --import java.lang.reflect.Method; --import java.util.logging.Level; -- --/** -- * This is here for legacy purposes incase any plugin used it. -- * -- * If you use this, migrate ASAP as this will be removed in the future! -- * -- * @deprecated -- * @see co.aikar.timings.Timings#of -- */ - @Deprecated(forRemoval = true) - public final class CustomTimingsHandler { -- private final Timing handler; - -- public CustomTimingsHandler(@NotNull String name) { -- Timing timing; -+ @Deprecated(forRemoval = true) -+ @DoNotUse -+ public CustomTimingsHandler(String name) { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use Spark instead."); -+ } - -- new AuthorNagException("Deprecated use of CustomTimingsHandler. Please Switch to Timings.of ASAP").printStackTrace(); -- try { -- final Method ofSafe = TimingsManager.class.getDeclaredMethod("getHandler", String.class, String.class, Timing.class); -- ofSafe.setAccessible(true); -- timing = (Timing) ofSafe.invoke(null,"Minecraft", "(Deprecated API) " + name, null); -- } catch (Exception e) { -- e.printStackTrace(); -- Bukkit.getLogger().log(Level.SEVERE, "This handler could not be registered"); -- timing = Timings.NULL_HANDLER; -- } -- handler = timing; -+ @Deprecated(forRemoval = true) -+ @DoNotUse -+ public void startTiming() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use Spark instead."); - } - -- public void startTiming() { /*handler.startTiming();*/ } // Purpur -- public void stopTiming() { /*handler.stopTiming();*/ } // Purpur -+ @Deprecated(forRemoval = true) -+ @DoNotUse -+ public void stopTiming() { -+ throw new org.plazmamc.plazma.DeprecationException("Timings are deprecated and removed. Use Spark instead."); -+ } - - } -+// Plazma end - Completely remove timings implementation -diff --git a/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java b/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java -deleted file mode 100644 -index 9ed416ed57676c845833736f93ed6088513c6da4..0000000000000000000000000000000000000000 ---- a/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java -+++ /dev/null -@@ -1,56 +0,0 @@ --package org.bukkit.plugin; -- --import static org.bukkit.support.MatcherAssert.*; --import static org.hamcrest.Matchers.*; --import org.bukkit.event.Event; --import org.bukkit.event.EventException; --import org.bukkit.event.EventPriority; --import org.bukkit.event.Listener; --import org.bukkit.event.block.BlockBreakEvent; --import org.bukkit.event.player.PlayerEvent; --import org.bukkit.event.player.PlayerInteractEvent; --import org.bukkit.event.player.PlayerMoveEvent; --import org.junit.jupiter.api.Test; -- --public class TimedRegisteredListenerTest { -- -- @Test -- public void testEventClass() throws EventException { -- Listener listener = new Listener() {}; -- EventExecutor executor = new EventExecutor() { -- @Override -- public void execute(Listener listener, Event event) {} -- }; -- TestPlugin plugin = new TestPlugin("Test"); -- -- PlayerInteractEvent interactEvent = new PlayerInteractEvent(null, null, null, null, null); -- PlayerMoveEvent moveEvent = new PlayerMoveEvent(null, null, null); -- BlockBreakEvent breakEvent = new BlockBreakEvent(null, null); -- -- TimedRegisteredListener trl = new TimedRegisteredListener(listener, executor, EventPriority.NORMAL, plugin, false); -- -- // Ensure that the correct event type is reported for a single event -- trl.callEvent(interactEvent); -- assertThat(trl.getEventClass(), is((Object) PlayerInteractEvent.class)); -- // Ensure that no superclass is used in lieu of the actual event, after two identical event types -- trl.callEvent(interactEvent); -- assertThat(trl.getEventClass(), is((Object) PlayerInteractEvent.class)); -- // Ensure that the closest superclass of the two events is chosen -- trl.callEvent(moveEvent); -- assertThat(trl.getEventClass(), is((Object) PlayerEvent.class)); -- // As above, so below -- trl.callEvent(breakEvent); -- assertThat(trl.getEventClass(), is((Object) Event.class)); -- // In the name of being thorough, check that it never travels down the hierarchy again. -- trl.callEvent(breakEvent); -- assertThat(trl.getEventClass(), is((Object) Event.class)); -- -- trl = new TimedRegisteredListener(listener, executor, EventPriority.NORMAL, plugin, false); -- -- trl.callEvent(breakEvent); -- assertThat(trl.getEventClass(), is((Object) BlockBreakEvent.class)); -- // Test moving up the class hierarchy by more than one class at a time -- trl.callEvent(moveEvent); -- assertThat(trl.getEventClass(), is((Object) Event.class)); -- } --} diff --git a/patches/api/0009-Temporary-javadoc-build-fix.patch b/patches/api/0009-Temporary-javadoc-build-fix.patch deleted file mode 100644 index 9b789c4..0000000 --- a/patches/api/0009-Temporary-javadoc-build-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -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 d3c92a382acbf414bf7e704870d252cc88c5d9db..64639737e96f0a0b41899fef09677a89d319c2eb 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -166,7 +166,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/api/0007-Reduce-allocations.patch b/patches/api/feature/0007-Reduce-allocations.patch similarity index 100% rename from patches/api/0007-Reduce-allocations.patch rename to patches/api/feature/0007-Reduce-allocations.patch diff --git a/patches/unapplied/sparklypaper/api/0001-Add-ClientboundPacketPreDispatchEvent.patch b/patches/api/feature/sparklypaper/0001-Add-ClientboundPacketPreDispatchEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/api/0001-Add-ClientboundPacketPreDispatchEvent.patch rename to patches/api/feature/sparklypaper/0001-Add-ClientboundPacketPreDispatchEvent.patch diff --git a/patches/unapplied/sparklypaper/api/0002-Add-PlayerBlockDestroySpeedEvent.patch b/patches/api/feature/sparklypaper/0002-Add-PlayerBlockDestroySpeedEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/api/0002-Add-PlayerBlockDestroySpeedEvent.patch rename to patches/api/feature/sparklypaper/0002-Add-PlayerBlockDestroySpeedEvent.patch diff --git a/patches/unapplied/sparklypaper/api/0003-Add-CraftItemRecipeEvent.patch b/patches/api/feature/sparklypaper/0003-Add-CraftItemRecipeEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/api/0003-Add-CraftItemRecipeEvent.patch rename to patches/api/feature/sparklypaper/0003-Add-CraftItemRecipeEvent.patch diff --git a/patches/unapplied/sparklypaper/server/0017-Add-ClientboundPacketPreDispatchEvent.patch b/patches/api/feature/sparklypaper/server/0017-Add-ClientboundPacketPreDispatchEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0017-Add-ClientboundPacketPreDispatchEvent.patch rename to patches/api/feature/sparklypaper/server/0017-Add-ClientboundPacketPreDispatchEvent.patch diff --git a/patches/unapplied/sparklypaper/server/0019-Add-PlayerBlockDestroySpeedEvent.patch b/patches/api/feature/sparklypaper/server/0019-Add-PlayerBlockDestroySpeedEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0019-Add-PlayerBlockDestroySpeedEvent.patch rename to patches/api/feature/sparklypaper/server/0019-Add-PlayerBlockDestroySpeedEvent.patch diff --git a/patches/unapplied/sparklypaper/server/0020-Add-CraftItemRecipeEvent.patch b/patches/api/feature/sparklypaper/server/0020-Add-CraftItemRecipeEvent.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0020-Add-CraftItemRecipeEvent.patch rename to patches/api/feature/sparklypaper/server/0020-Add-CraftItemRecipeEvent.patch diff --git a/patches/unapplied/api/dropped/0004-Optimize-Spigot-event-bus.patch b/patches/api/outdated/dropped/0004-Optimize-Spigot-event-bus.patch similarity index 100% rename from patches/unapplied/api/dropped/0004-Optimize-Spigot-event-bus.patch rename to patches/api/outdated/dropped/0004-Optimize-Spigot-event-bus.patch diff --git a/patches/unapplied/api/purpur/0011-LivingEntity-safeFallDistance.patch b/patches/api/outdated/purpur/0011-LivingEntity-safeFallDistance.patch similarity index 100% rename from patches/unapplied/api/purpur/0011-LivingEntity-safeFallDistance.patch rename to patches/api/outdated/purpur/0011-LivingEntity-safeFallDistance.patch diff --git a/patches/unapplied/api/purpur/0016-LivingEntity-broadcastItemBreak.patch b/patches/api/outdated/purpur/0016-LivingEntity-broadcastItemBreak.patch similarity index 100% rename from patches/unapplied/api/purpur/0016-LivingEntity-broadcastItemBreak.patch rename to patches/api/outdated/purpur/0016-LivingEntity-broadcastItemBreak.patch diff --git a/patches/unapplied/api/purpur/0032-Potion-NamespacedKey.patch b/patches/api/outdated/purpur/0032-Potion-NamespacedKey.patch similarity index 100% rename from patches/unapplied/api/purpur/0032-Potion-NamespacedKey.patch rename to patches/api/outdated/purpur/0032-Potion-NamespacedKey.patch diff --git a/patches/unapplied/api/purpur/0041-Add-item-packet-serialize-event.patch b/patches/api/outdated/purpur/0041-Add-item-packet-serialize-event.patch similarity index 100% rename from patches/unapplied/api/purpur/0041-Add-item-packet-serialize-event.patch rename to patches/api/outdated/purpur/0041-Add-item-packet-serialize-event.patch diff --git a/patches/unapplied/api/purpur/0049-Add-hover-lines-API.patch b/patches/api/outdated/purpur/0049-Add-hover-lines-API.patch similarity index 100% rename from patches/unapplied/api/purpur/0049-Add-hover-lines-API.patch rename to patches/api/outdated/purpur/0049-Add-hover-lines-API.patch diff --git a/patches/server/0012-Optimize-default-configurations.patch b/patches/server/0012-Optimize-default-configurations.patch index 911f65a..00e907f 100644 --- a/patches/server/0012-Optimize-default-configurations.patch +++ b/patches/server/0012-Optimize-default-configurations.patch @@ -8,6 +8,18 @@ Subject: [PATCH] Optimize default configurations - AkiraDevelopment/SimplyMC - YouHaveTrouble/minecraft-exploits-and-how-to-fix-them +diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +index c867796f6..ecced2072 100644 +--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java ++++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +@@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart { + @MergeMap + public Reference2IntMap spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); + @MergeMap +- public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance()))); ++ public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8 : category.getDespawnDistance()))); // Plazma - Optimize default configurations + @MergeMap + public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java index 3ff4f092a59242a8cb930c084915a774db881652..66f797f5205b9b259cc6f6cfd710293fc73cdf59 100644 --- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java diff --git a/patches/server/0029-Use-Akair-s-flag-when-running-the-test-server-with-g.patch b/patches/server/0029-Use-Akair-s-flag-when-running-the-test-server-with-g.patch deleted file mode 100644 index afd74f3..0000000 --- a/patches/server/0029-Use-Akair-s-flag-when-running-the-test-server-with-g.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Mon, 6 May 2024 12:25:59 +0900 -Subject: [PATCH] Use Akair's flag when running the test server with gradle - - -diff --git a/build.gradle.kts b/build.gradle.kts -index a40dc8b2560b8cd124d961f3dfd5865efd2a3b9e..e4dfd79840913e776a84bacda776329cb32e2be9 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -164,7 +164,7 @@ fun TaskContainer.registerRunTask( - languageVersion.set(JavaLanguageVersion.of(21)) - vendor.set(JvmVendorSpec.JETBRAINS) - }) -- jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods") -+ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods", "--add-modules=jdk.incubator.vector", "-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled", "-XX:MaxGCPauseMillis=200", "-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4", "-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90", "-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem", "-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs", "-Daikars.new.flags=true", "-XX:G1NewSizePercent=40", "-XX:G1MaxNewSizePercent=50", "-XX:G1HeapRegionSize=16M", "-XX:G1ReservePercent=15") // Plazma - Always agree EULA on development mode; Use Akair's flag when running the test server with gradle - - if (rootProject.childProjects["test-plugin"] != null) { - val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile } diff --git a/patches/server/0041-Completely-remove-timings-implementation.patch b/patches/server/0041-Completely-remove-timings-implementation.patch deleted file mode 100644 index f72a449..0000000 --- a/patches/server/0041-Completely-remove-timings-implementation.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Wed, 15 May 2024 14:12:50 +0900 -Subject: [PATCH] Completely remove timings implementation - - -diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java -index 23594fb7eb4b2f33146592866608c2858ef23937..8acdea0f086129854cb44bc5ce8bbbc4e810b9ad 100644 ---- a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java -+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java -@@ -1,6 +1,6 @@ - package io.papermc.paper.plugin.manager; - --import co.aikar.timings.TimedEventExecutor; -+//import co.aikar.timings.TimedEventExecutor; // Plazma - Completely remove timings implementation - import com.destroystokyo.paper.event.server.ServerExceptionEvent; - import com.destroystokyo.paper.exception.ServerEventException; - import com.google.common.collect.Sets; -@@ -96,7 +96,7 @@ class PaperEventManager { - throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled"); - } - -- executor = new TimedEventExecutor(executor, plugin, null, event); -+ //executor = new TimedEventExecutor(executor, plugin, null, event); // Plazma - Completely remove timings implementation - this.getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); - } - -@@ -183,7 +183,7 @@ class PaperEventManager { - } - } - -- EventExecutor executor = new TimedEventExecutor(EventExecutor.create(method, eventClass), plugin, method, eventClass); -+ EventExecutor executor = EventExecutor.create(method, eventClass); // Plazma - Completely remove timings implementation - eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); - } - return ret; -diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java -index 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 - - @Override - public boolean useTimings() { -- return co.aikar.timings.Timings.isTimingsEnabled(); -+ 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 657f118713b2188cb2e7fe5ec3be455189b50623..854f19306100289dabce523c973edcf6fbcdb6cc 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -3,7 +3,7 @@ package net.minecraft.server; - import com.google.common.base.Preconditions; - import com.google.common.base.Splitter; - import com.google.common.collect.ImmutableList; --import co.aikar.timings.Timings; -+//import co.aikar.timings.Timings; // Plazma - Completely remove timings implementation - import com.destroystokyo.paper.event.server.PaperServerListPingEvent; - import com.google.common.base.Stopwatch; - import com.google.common.collect.Lists; diff --git a/patches/server/0042-Remove-persist-isClientSide-flag.patch b/patches/server/0042-Remove-persist-isClientSide-flag.patch deleted file mode 100644 index 10f4617..0000000 --- a/patches/server/0042-Remove-persist-isClientSide-flag.patch +++ /dev/null @@ -1,8240 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Sat, 2 Nov 2024 15:09:42 +0900 -Subject: [PATCH] Remove persist 'isClientSide' flag - - -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java -index fa7b784a89626e8528c249d7889a598bd7ee3d49..bfb4d26549ce1d7e89a175dd9f2bf6b40adee5ef 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java -@@ -46,7 +46,7 @@ public final class BlockStarLightEngine extends StarLightEngine { - - @Override - protected boolean canUseChunk(final ChunkAccess chunk) { -- return chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT) && (this.isClientSide || chunk.isLightCorrect()); -+ return chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT) && (/*this.isClientSide ||*/ chunk.isLightCorrect()); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java -index f9aef289e9a2d6f63c98c72c56ef32b8793f57f4..7bd27bceb90b1f612a393dc55ecd455f00498fdb 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java -@@ -229,7 +229,7 @@ public final class SkyStarLightEngine extends StarLightEngine { - @Override - protected boolean canUseChunk(final ChunkAccess chunk) { - // can only use chunks for sky stuff if their sections have been init'd -- return chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT) && (this.isClientSide || chunk.isLightCorrect()); -+ return chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT) && (/*this.isClientSide ||*/ chunk.isLightCorrect()); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java -index 8aeb5fb87f94a35659347a09a638420699b52a6f..ef40af5c6ac60fe00c05adcb664c811b28330819 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java -@@ -124,7 +124,7 @@ public abstract class StarLightEngine { - - protected final boolean skylightPropagator; - protected final int emittedLightMask; -- protected final boolean isClientSide; -+ // protected final boolean isClientSide; // Plazma - Remove persist 'isClientSide' flag - - protected final Level world; - protected final int minLightSection; -@@ -135,7 +135,7 @@ public abstract class StarLightEngine { - protected StarLightEngine(final boolean skylightPropagator, final Level world) { - this.skylightPropagator = skylightPropagator; - this.emittedLightMask = skylightPropagator ? 0 : 0xF; -- this.isClientSide = world.isClientSide; -+ // this.isClientSide = world.isClientSide; // Plazma - Remove persist 'isClientSide' flag - this.world = world; - this.minLightSection = WorldUtil.getMinLightSection(world); - this.maxLightSection = WorldUtil.getMaxLightSection(world); -@@ -275,9 +275,11 @@ public abstract class StarLightEngine { - Arrays.fill(this.nibbleCache, null); - Arrays.fill(this.chunkCache, null); - Arrays.fill(this.emptinessMapCache, null); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.isClientSide) { - Arrays.fill(this.notifyUpdateCache, false); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - protected final BlockState getBlockState(final int worldX, final int worldY, final int worldZ) { -@@ -318,6 +320,7 @@ public abstract class StarLightEngine { - - if (nibble != null) { - nibble.set((worldX & 15) | ((worldZ & 15) << 4) | ((worldY & 15) << 8), level); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.isClientSide) { - int cx1 = (worldX - 1) >> 4; - int cx2 = (worldX + 1) >> 4; -@@ -333,9 +336,11 @@ public abstract class StarLightEngine { - } - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - protected final void postLightUpdate(final int worldX, final int worldY, final int worldZ) { - if (this.isClientSide) { - int cx1 = (worldX - 1) >> 4; -@@ -353,12 +358,14 @@ public abstract class StarLightEngine { - } - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - protected final void setLightLevel(final int sectionIndex, final int localIndex, final int worldX, final int worldY, final int worldZ, final int level) { - final SWMRNibbleArray nibble = this.nibbleCache[sectionIndex]; - - if (nibble != null) { - nibble.set(localIndex, level); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.isClientSide) { - int cx1 = (worldX - 1) >> 4; - int cx2 = (worldX + 1) >> 4; -@@ -374,6 +381,7 @@ public abstract class StarLightEngine { - } - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - } - -@@ -1166,7 +1174,7 @@ public abstract class StarLightEngine { - } - - currentNibble.set(localIndex, targetLevel); -- this.postLightUpdate(offX, offY, offZ); -+ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove persist 'isClientSide' flag - - if (targetLevel > 1) { - if (queueLength >= queue.length) { -@@ -1225,7 +1233,7 @@ public abstract class StarLightEngine { - } - - currentNibble.set(localIndex, targetLevel); -- this.postLightUpdate(offX, offY, offZ); -+ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove persist 'isClientSide' flag - - if (targetLevel > 1) { - if (queueLength >= queue.length) { -@@ -1331,7 +1339,7 @@ public abstract class StarLightEngine { - } - - currentNibble.set(localIndex, 0); -- this.postLightUpdate(offX, offY, offZ); -+ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove persist 'isClientSide' flag - - if (targetLevel > 0) { - if (queueLength >= queue.length) { -@@ -1414,7 +1422,7 @@ public abstract class StarLightEngine { - } - - currentNibble.set(localIndex, 0); -- this.postLightUpdate(offX, offY, offZ); -+ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove persist 'isClientSide' flag - - if (targetLevel > 0) { // we actually need to propagate 0 just in case we find a neighbour... - if (queueLength >= queue.length) { -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java -index 571db5f9bf94745a8afe2cd313e593fb15db5e37..43e42d265513feedc54f3780f37427a50d8f7df7 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java -@@ -57,7 +57,7 @@ public final class StarLightInterface { - - private final LayerLightEventListener skyReader; - private final LayerLightEventListener blockReader; -- private final boolean isClientSide; -+ //private final boolean isClientSide; // Plazma - Remove persist 'isClientSide' flag - - public final int minSection; - public final int maxSection; -@@ -74,7 +74,7 @@ public final class StarLightInterface { - this.world = lightAccess == null ? null : (Level)lightAccess.getLevel(); - this.cachedSkyPropagators = hasSkyLight && lightAccess != null ? new ArrayDeque<>() : null; - this.cachedBlockPropagators = hasBlockLight && lightAccess != null ? new ArrayDeque<>() : null; -- this.isClientSide = !(this.world instanceof ServerLevel); -+ //this.isClientSide = !(this.world instanceof ServerLevel); // Plazma - Remove persist 'isClientSide' flag - if (this.world == null) { - this.minSection = -4; - this.maxSection = 19; -@@ -126,7 +126,7 @@ public final class StarLightInterface { - @Override - public DataLayer getDataLayerData(final SectionPos pos) { - final ChunkAccess chunk = StarLightInterface.this.getAnyChunkNow(pos.getX(), pos.getZ()); -- if (chunk == null || (!StarLightInterface.this.isClientSide && !chunk.isLightCorrect()) || !chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT)) { -+ if (chunk == null || (/*!StarLightInterface.this.isClientSide &&*/ !chunk.isLightCorrect()) || !chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT)) { // Plazma - Remove persist 'isClientSide' flag - return null; - } - -@@ -238,7 +238,7 @@ public final class StarLightInterface { - final int minLightSection = this.minLightSection; - final int maxLightSection = this.maxLightSection; - -- if (chunk == null || (!this.isClientSide && !chunk.isLightCorrect()) || !chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT)) { -+ if (chunk == null || (/*!this.isClientSide &&*/ !chunk.isLightCorrect()) || !chunk.getPersistedStatus().isOrAfter(ChunkStatus.LIGHT)) { // Plazma - Remove persist 'isClientSide' flag - return 15; - } - -@@ -337,9 +337,11 @@ public final class StarLightInterface { - return this.blockReader; - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - public boolean isClientSide() { - return this.isClientSide; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - public ChunkAccess getAnyChunkNow(final int chunkX, final int chunkZ) { - if (this.world == null) { -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 -+++ b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java -@@ -72,7 +72,7 @@ public interface CauldronInteraction { - PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS); - - if (potioncontents != null && potioncontents.is(Potions.WATER)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent - return InteractionResult.SUCCESS; -@@ -86,7 +86,7 @@ public interface CauldronInteraction { - // world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit - world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -@@ -102,7 +102,7 @@ public interface CauldronInteraction { - }, SoundEvents.BUCKET_FILL, hitDirection); // Paper - add hitDirection - }); - map1.put(Items.GLASS_BOTTLE, (iblockdata, world, blockposition, entityhuman, enumhand, itemstack, hitDirection) -> { // Paper - add hitDirection -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) { - return InteractionResult.SUCCESS; -@@ -116,7 +116,7 @@ public interface CauldronInteraction { - // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit - world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_FILL, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, blockposition); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - }); -@@ -127,7 +127,7 @@ public interface CauldronInteraction { - PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS); - - if (potioncontents != null && potioncontents.is(Potions.WATER)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent - return InteractionResult.SUCCESS; -@@ -139,7 +139,7 @@ public interface CauldronInteraction { - // world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.cycle(LayeredCauldronBlock.LEVEL)); // CraftBukkit - world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -@@ -218,7 +218,7 @@ public interface CauldronInteraction { - if (!fullPredicate.test(state)) { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - fire PlayerBucketFillEvent - if (hitDirection != null) { - org.bukkit.event.player.PlayerBucketEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerBucketFillEvent((net.minecraft.server.level.ServerLevel) world, player, pos, pos, hitDirection, stack, output.getItem(), hand); -@@ -241,7 +241,7 @@ public interface CauldronInteraction { - // world.setBlockAndUpdate(blockposition, Blocks.CAULDRON.defaultBlockState()); // CraftBukkit - world.playSound((Player) null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -@@ -253,7 +253,7 @@ public interface CauldronInteraction { - } - static InteractionResult emptyBucket(Level world, BlockPos pos, Player player, InteractionHand hand, ItemStack stack, BlockState state, SoundEvent soundEvent, @javax.annotation.Nullable net.minecraft.core.Direction hitDirection) { - // Paper end - add hitDirection -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - fire PlayerBucketEmptyEvent - ItemStack output = new ItemStack(Items.BUCKET); - if (hitDirection != null) { -@@ -277,7 +277,7 @@ public interface CauldronInteraction { - // world.setBlockAndUpdate(blockposition, iblockdata); // CraftBukkit - world.playSound((Player) null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -@@ -300,7 +300,7 @@ public interface CauldronInteraction { - if (!(block instanceof ShulkerBoxBlock)) { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.SHULKER_WASH)) { - return InteractionResult.SUCCESS; -@@ -311,7 +311,7 @@ public interface CauldronInteraction { - player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemstack1, false)); - player.awardStat(Stats.CLEAN_SHULKER_BOX); - // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - return InteractionResult.SUCCESS; - } - } -@@ -322,7 +322,7 @@ public interface CauldronInteraction { - if (bannerpatternlayers.layers().isEmpty()) { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) { - return InteractionResult.SUCCESS; -@@ -334,7 +334,7 @@ public interface CauldronInteraction { - player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemstack1, false)); - player.awardStat(Stats.CLEAN_BANNER); - // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -@@ -346,7 +346,7 @@ public interface CauldronInteraction { - } else if (!stack.has(DataComponents.DYED_COLOR)) { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) { - return InteractionResult.SUCCESS; -@@ -355,7 +355,7 @@ public interface CauldronInteraction { - stack.remove(DataComponents.DYED_COLOR); - player.awardStat(Stats.CLEAN_ARMOR); - // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - if (!BoneMealItem.growCrop(stack, worldserver, blockposition) && !BoneMealItem.growWaterPlant(stack, worldserver, blockposition, (Direction) null)) { - this.setSuccess(false); -- } else if (!worldserver.isClientSide) { -+ } else /*if (!worldserver.isClientSide)*/ { // Plazma - Remove persist 'isClientSide' flag - worldserver.levelEvent(1505, blockposition, 15); - } - // CraftBukkit start -@@ -700,10 +700,10 @@ public interface DispenseItemBehavior { - // CraftBukkit end - - if (worldserver.isEmptyBlock(blockposition) && blockpumpkincarved.canSpawnGolem(worldserver, blockposition)) { -- if (!worldserver.isClientSide) { -+ //if (!worldserver.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - worldserver.setBlock(blockposition, blockpumpkincarved.defaultBlockState(), 3); - worldserver.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_PLACE, blockposition); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - stack.shrink(1); - this.setSuccess(true); -@@ -910,11 +910,11 @@ public interface DispenseItemBehavior { - return result; - } - // Paper end - Call missing BlockDispenseEvent -- if (!worldserver.isClientSide) { -+ //if (!worldserver.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - for (int k = 0; k < 5; ++k) { - worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - worldserver.playSound((Player) null, blockposition, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); - worldserver.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition); -diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java -index 65ed3d77a51b8299517e0c165403b0c5ac413475..5c7dbb218b6a9a7ccb2c9dbab93a7d8be26ee3e6 100644 ---- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java -+++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java -@@ -60,7 +60,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { - } - // CraftBukkit end - -- if (!worldserver.isClientSide()) { -+ //if (!worldserver.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING)); - - this.setSuccess(ShearsDispenseItemBehavior.tryShearBeehive(worldserver, blockposition) || ShearsDispenseItemBehavior.tryShearLivingEntity(worldserver, blockposition, stack, bukkitBlock, craftItem)); // CraftBukkit -@@ -68,7 +68,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { - stack.hurtAndBreak(1, worldserver, (ServerPlayer) null, (item) -> { - }); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return stack; - } -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 854f19306100289dabce523c973edcf6fbcdb6cc..3e0d878c3b3dcefb8f223bc93a5fc6d594998565 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(), /*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(); - } -@@ -2688,16 +2690,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..eb7b4b89d6eb93141c5ec1ca2b67684899db4343 100644 ---- a/src/main/java/net/minecraft/server/commands/KickCommand.java -+++ b/src/main/java/net/minecraft/server/commands/KickCommand.java -@@ -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) { -- if (!source.getServer().isSingleplayerOwner(serverPlayer.getGameProfile())) { -+ //if (!source.getServer().isSingleplayerOwner(serverPlayer.getGameProfile())) { // Plazma - Remove persist 'isClientSide' flag - serverPlayer.connection.disconnect(reason, org.bukkit.event.player.PlayerKickEvent.Cause.KICK_COMMAND); // Paper - kick event cause - source.sendSuccess(() -> Component.translatable("commands.kick.success", serverPlayer.getDisplayName(), reason), true); - i++; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 214bd8084182ebd0d36cf9ddfac4411a5dce78be..3e211e6ea16c8110e662d6201e8325ecd3d6a93b 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 - DedicatedServer.LOGGER.info("Loading properties"); - DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties(); - -- if (this.isSingleplayer()) { -+ /*if (this.isSingleplayer()) { // Plazma - Remove persist 'isClientSide' flag - this.setLocalIp("127.0.0.1"); -- } else { -+ } else {*/ // Plazma - Remove persist 'isClientSide' flag - this.setUsesAuthentication(dedicatedserverproperties.onlineMode); - this.setPreventProxyConnections(dedicatedserverproperties.preventProxyConnections); - this.setLocalIp(dedicatedserverproperties.serverIp); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - // Spigot start - this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); - org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings")); -@@ -560,10 +560,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() { -@@ -580,10 +582,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() { -@@ -848,10 +852,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface - SkullBlockEntity.clear(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isSingleplayerOwner(GameProfile profile) { - return false; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public int getScaledTrackingDistance(int initialDistance) { -@@ -884,11 +890,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface - return this.settings.getProperties().serverResourcePackInfo; - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void endMetricsRecordingTick() { - super.endMetricsRecordingTick(); - this.debugSampleSubscriptionTracker.tick(this.getTickCount()); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @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 fd175eb4e58479e588c8e2b436dab15c7647b870..25b646c973cc1d304b8adb3cef4cf443d459b489 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -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 - Remove persist 'isClientSide' flag - iworlddataserver.setGameType(minecraftserver.getDefaultGameType()); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - long l = minecraftserver.getWorldData().worldGenOptions().seed(); - -@@ -1150,43 +1150,38 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe - } - - private void announceSleepStatus() { -- if (this.canSleepThroughNights()) { -- if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) { -- int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); -- Component ichatmutablecomponent; -- -- if (this.sleepStatus.areEnoughSleeping(i)) { -- // Purpur start -- 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 { -- 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)); -- } -+ // Plazma start - Remove persist 'isClientSide' flag -+ if (!this.canSleepThroughNights()) return; - -- Iterator iterator = this.players.iterator(); -- -- while (iterator.hasNext()) { -- ServerPlayer entityplayer = (ServerPlayer) iterator.next(); -- -- entityplayer.displayClientMessage(ichatmutablecomponent, true); -- } -+ int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); -+ Component ichatmutablecomponent; - -+ if (this.sleepStatus.areEnoughSleeping(i)) { -+ // Purpur start -+ 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 { -+ 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)); -+ } -+ -+ 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/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 -+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -@@ -432,10 +432,12 @@ public class WorldGenRegion implements WorldGenLevel { - return this.level.getWorldBorder(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isClientSide() { - return false; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - /** @deprecated */ - @Deprecated -diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index df48c2754dc1ebd52addd8ae768cba5916ce3969..10120b2ac4c4aea480ee4bb23b3203bad74dc9ae 100644 ---- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -122,12 +122,13 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - this.onDisconnect(info, null); - } - public void onDisconnect(DisconnectionDetails info, @Nullable net.kyori.adventure.text.Component quitMessage) { -+ /* // Plazma - Remove persist 'isClientSide' flag - // Paper end - Fix kick event leave message not being sent - if (this.isSingleplayerOwner()) { - ServerCommonPacketListenerImpl.LOGGER.info("Stopping singleplayer server as player logged out"); - this.server.halt(false); - } -- -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -154,7 +155,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - - this.latency = (this.latency * 3 + i) / 4; - this.keepAlivePending = false; -- } else if (!this.isSingleplayerOwner()) { -+ } else /*if (!this.isSingleplayerOwner())*/ { // Plazma - Remove persist 'isClientSide' flag - this.disconnectAsync(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE, PlayerKickEvent.Cause.TIMEOUT); // Paper - add proper async disconnect - } - -@@ -295,7 +296,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - } else - // Purpur end - -- if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // Paper - use vanilla's 15000L between keep alive packets -+ if (/*!this.isSingleplayerOwner() &&*/ elapsedTime >= 15000L) { // Paper - use vanilla's 15000L between keep alive packets // Plazma - Remove persist 'isClientSide' flag - 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 - } else if (this.checkIfClosed(currentTime)) { // Paper -@@ -466,9 +467,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - } - // Paper end - add proper async disconnect - -+ /* // Plazma - Remove persist 'isClientSide' flag - protected boolean isSingleplayerOwner() { - return this.server.isSingleplayerOwner(this.playerProfile()); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 611de28d27d75b73e33a552c8a23d6c0f53582da..441cef4b6422fa8188df55fe52159e56aa0a358e 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -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((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(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 -- if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) { // Paper - configurable tab spam limits -+ if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) /*&& !this.server.isSingleplayerOwner(this.player.getGameProfile())*/) { // Paper - configurable tab spam limits // Plazma - Remove persist 'isClientSide' flag - this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect - return; - } -@@ -1756,9 +1756,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - - private boolean shouldCheckPlayerMovement0(boolean elytra) { - // Plazma end - Add option to bypass moved to quickly check -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.isSingleplayerOwner()) { - return false; -- } else if (this.player.isChangingDimension()) { -+ } else*/ if (this.player.isChangingDimension()) { // Plazma - Remove persist 'isClientSide' flag - return false; - } else { - GameRules gamerules = this.player.serverLevel().getGameRules(); -@@ -2717,7 +2718,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - } - // Spigot end - // this.chatSpamThrottler.increment(); -- if (!this.chatSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) { -+ if (!this.chatSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) /*&& !this.server.isSingleplayerOwner(this.player.getGameProfile())*/) { // Plazma - Remove persist 'isClientSide' flag - // 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 - } -@@ -3738,7 +3739,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - @Override - public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); -- 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 - } - } -@@ -3746,7 +3747,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - @Override - public void handleLockDifficulty(ServerboundLockDifficultyPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); -- if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) { -+ if (this.player.hasPermissions(2) /*|| this.isSingleplayerOwner()*/) { // Plazma - Remove persist 'isClientSide' flag - this.server.setDifficultyLocked(packet.isLocked()); - } - } -diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index bb10892f33ba0d7fc3959debef1045073868f8b8..ab6a7d20f5473d8bffa7f8d136c1d55f17bbfaff 100644 ---- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -181,48 +181,39 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - } - // Paper end - Validate usernames - this.requestedUsername = packet.name(); -- GameProfile gameprofile = this.server.getSingleplayerProfile(); -- -- if (gameprofile != null && this.requestedUsername.equalsIgnoreCase(gameprofile.getName())) { -- this.startClientVerification(gameprofile); -+ // Plazma start - Remove persist 'isClientSide' flag -+ if (this.server.usesAuthentication() && !this.connection.isMemoryConnection()) { -+ this.state = ServerLoginPacketListenerImpl.State.KEY; -+ this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true)); - } else { -- if (this.server.usesAuthentication() && !this.connection.isMemoryConnection()) { -- this.state = ServerLoginPacketListenerImpl.State.KEY; -- this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true)); -- } else { -- // Paper start - Add Velocity IP Forwarding Support -- if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { -- this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); -- net.minecraft.network.FriendlyByteBuf buf = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.buffer()); -- buf.writeByte(com.destroystokyo.paper.proxy.VelocityProxy.MAX_SUPPORTED_FORWARDING_VERSION); -- net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket.PlayerInfoChannelPayload(com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, buf)); -- this.connection.send(packet1); -- return; -- } -- // Paper end - Add Velocity IP Forwarding Support -- // CraftBukkit start -- // Paper start - Cache authenticator threads -- authenticatorPool.execute(new Runnable() { -- -- @Override -- public void run() { -- try { -- GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot -- -- gameprofile = ServerLoginPacketListenerImpl.this.callPlayerPreLoginEvents(gameprofile); // Paper - Add more fields to AsyncPlayerPreLoginEvent -- ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId()); -- ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile); -- } catch (Exception ex) { -- ServerLoginPacketListenerImpl.this.disconnect("Failed to verify username!"); -- ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex); -- } -- } -- }); -- // Paper end - Cache authenticator threads -- // CraftBukkit end -+ // Paper start - Add Velocity IP Forwarding Support -+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { -+ this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); -+ net.minecraft.network.FriendlyByteBuf buf = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.buffer()); -+ buf.writeByte(com.destroystokyo.paper.proxy.VelocityProxy.MAX_SUPPORTED_FORWARDING_VERSION); -+ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket.PlayerInfoChannelPayload(com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, buf)); -+ this.connection.send(packet1); -+ return; - } -+ // Paper end - Add Velocity IP Forwarding Support -+ // CraftBukkit start -+ // Paper start - Cache authenticator threads -+ authenticatorPool.execute(() -> { -+ try { -+ GameProfile gameprofile = ServerLoginPacketListenerImpl.this.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername); // Spigot - -+ gameprofile = ServerLoginPacketListenerImpl.this.callPlayerPreLoginEvents(gameprofile); // Paper - Add more fields to AsyncPlayerPreLoginEvent -+ ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId()); -+ ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile); -+ } catch (Exception ex) { -+ ServerLoginPacketListenerImpl.this.disconnect("Failed to verify username!"); -+ ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex); -+ } -+ }); -+ // Paper end - Cache authenticator threads -+ // CraftBukkit end - } -+ // Plazma end - Remove persist 'isClientSide' flag - } - - void startClientVerification(GameProfile profile) { -@@ -318,21 +309,21 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, - // CraftBukkit end - ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId()); - ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile); -- } else if (ServerLoginPacketListenerImpl.this.server.isSingleplayer()) { -+ } /*else if (ServerLoginPacketListenerImpl.this.server.isSingleplayer()) { // Plazma - Remove persist 'isClientSide' flag - ServerLoginPacketListenerImpl.LOGGER.warn("Failed to verify username but will let them in anyway!"); - ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot -- } else { -+ }*/ else { // Plazma - Remove persist 'isClientSide' flag - ServerLoginPacketListenerImpl.this.disconnect(org.purpurmc.purpur.PurpurConfig.unverifiedUsername.equals("default") ? Component.translatable("multiplayer.disconnect.unverified_username") : io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.purpurmc.purpur.PurpurConfig.unverifiedUsername))); // Purpur - ServerLoginPacketListenerImpl.LOGGER.error("Username '{}' tried to join with an invalid session", s1); - } - } catch (AuthenticationUnavailableException authenticationunavailableexception) { -- if (ServerLoginPacketListenerImpl.this.server.isSingleplayer()) { -+ /*if (ServerLoginPacketListenerImpl.this.server.isSingleplayer()) { // Plazma - Remove persist 'isClientSide' flag - ServerLoginPacketListenerImpl.LOGGER.warn("Authentication servers are down but will let them in anyway!"); - ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot -- } else { -+ } else {*/ // Plazma - Remove persist 'isClientSide' flag - ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.authenticationServersDown)); // Paper - Configurable kick message - ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable"); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - catch all exceptions - } catch (Exception exception) { - ServerLoginPacketListenerImpl.this.disconnect("Failed to verify username!"); -diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java -index 653856d0b8dcf2baf4cc77a276f17c8cc1fa717e..1f2958d21c279ecb377b7c90ba643ea83e217eca 100644 ---- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java -+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java -@@ -275,7 +275,7 @@ public class OldUsersConverter { - - if (optional.isPresent()) { - return (UUID) optional.get(); -- } else if (!server.isSingleplayer() && server.usesAuthentication()) { -+ } else if (/*!server.isSingleplayer() &&*/ server.usesAuthentication()) { // Plazma - Remove persist 'isClientSide' flag - final List list = Lists.newArrayList(); - 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 c18868796957c0756aca3b5a15fd0d0c8a5221f4..d5d09bf63f4b7fba73188f75d5fe9599b8da2844 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 { - CompoundTag nbttagcompound = this.server.getWorldData().getLoadedPlayerTag(); - Optional optional; - -- if (this.server.isSingleplayerOwner(player.getGameProfile()) && nbttagcompound != null) { -+ if (/*this.server.isSingleplayerOwner(player.getGameProfile()) &&*/ nbttagcompound != null) { // Plazma - Remove persist 'isClientSide' flag - optional = Optional.of(nbttagcompound); - player.load(nbttagcompound); - PlayerList.LOGGER.debug("loading single player"); -@@ -1176,7 +1176,7 @@ public abstract class PlayerList { - } - - public boolean isOp(GameProfile profile) { -- return this.ops.contains(profile) || this.server.isSingleplayerOwner(profile) && this.server.getWorldData().isAllowCommands() || this.allowCommandsForAllPlayers; -+ return this.ops.contains(profile) || /*this.server.isSingleplayerOwner(profile) &&*/ this.server.getWorldData().isAllowCommands() || this.allowCommandsForAllPlayers; // Plazma - Remove persist 'isClientSide' flag - } - - @Nullable -diff --git a/src/main/java/net/minecraft/util/profiling/jfr/Environment.java b/src/main/java/net/minecraft/util/profiling/jfr/Environment.java -index 5250e97ccfe3c5bcb98980d46d2257165ad508a6..17953a59188048ad3ab388d9713ada6148a682b6 100644 ---- a/src/main/java/net/minecraft/util/profiling/jfr/Environment.java -+++ b/src/main/java/net/minecraft/util/profiling/jfr/Environment.java -@@ -3,7 +3,6 @@ package net.minecraft.util.profiling.jfr; - import net.minecraft.server.MinecraftServer; - - public enum Environment { -- CLIENT("client"), - SERVER("server"); - - private final String description; -@@ -13,7 +12,7 @@ public enum Environment { - } - - public static Environment from(MinecraftServer server) { -- return server.isDedicatedServer() ? SERVER : CLIENT; -+ return SERVER; // Plazma - Remove persist 'isClientSide' flag - } - - public String getDescription() { -diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java -index 119856b22df5bbcd4e5bf5f95645156f774c6168..809b72d0eb69f21d0d71515259e5e2f9d01d6232 100644 ---- a/src/main/java/net/minecraft/world/entity/AgeableMob.java -+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java -@@ -32,7 +32,7 @@ public abstract class AgeableMob extends PathfinderMob { - public void inactiveTick() - { - super.inactiveTick(); -- if ( this.level().isClientSide || this.ageLocked ) -+ if ( /*this.level().isClientSide ||*/ this.ageLocked ) // Plazma - Remove persist 'isClientSide' flag - { // CraftBukkit - this.refreshDimensions(); - } else -@@ -82,7 +82,7 @@ public abstract class AgeableMob extends PathfinderMob { - } - - public int getAge() { -- return this.level().isClientSide ? ((Boolean) this.entityData.get(AgeableMob.DATA_BABY_ID) ? -1 : 1) : this.age; -+ return /*this.level().isClientSide ? ((Boolean) this.entityData.get(AgeableMob.DATA_BABY_ID) ? -1 : 1) :*/ this.age; // Plazma - Remove persist 'isClientSide' flag - } - - public void ageUp(int age, boolean overGrow) { -@@ -154,7 +154,7 @@ public abstract class AgeableMob extends PathfinderMob { - @Override - public void aiStep() { - super.aiStep(); -- if (this.level().isClientSide || this.ageLocked) { // CraftBukkit -+ if (/*this.level().isClientSide ||*/ this.ageLocked) { // CraftBukkit // Plazma - Remove persist 'isClientSide' flag - if (this.forcedAgeTimer > 0) { - 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 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 { - } - - public void setRadius(float radius) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.getEntityData().set(AreaEffectCloud.DATA_RADIUS, Mth.clamp(radius, 0.0F, 32.0F)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -170,12 +170,15 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { - - if (world instanceof ServerLevel worldserver) { - this.serverTick(worldserver); -+ /* // Plazma - Remove persist 'isClientSide' flag - } else { - this.clientTick(); -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - private void clientTick() { - boolean flag = this.isWaiting(); - float f = this.getRadius(); -@@ -215,6 +218,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { - - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - private void serverTick(ServerLevel world) { - if (this.tickCount >= this.waitTime + this.duration) { -diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java -index e6cbf4506c75046a89fad778e138b448fb4a29a9..adb30845aaf8f3f0f6ede5b8480ffcdd11b887db 100644 ---- a/src/main/java/net/minecraft/world/entity/Display.java -+++ b/src/main/java/net/minecraft/world/entity/Display.java -@@ -147,6 +147,7 @@ public abstract class Display extends Entity { - this.stopRiding(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - if (this.updateStartTick) { - this.updateStartTick = false; -@@ -185,6 +186,7 @@ public abstract class Display extends Entity { - } - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - 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 8001ae563ac06d8ba9fd1de0b4111a3c8241de8c..9b5379edf00ab7256e7e90702e319de9b20ac0b4 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 - - // Purpur start - copied from Mob - API for any mob to burn daylight - public boolean isSunBurnTick() { -- if (this.level().isDay() && !this.level().isClientSide) { -+ if (this.level().isDay() /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - float f = this.getLightLevelDependentMagicValue(); - BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ()); - boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow; -@@ -978,9 +978,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - - this.checkBelowWorld(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setSharedFlagOnFire(this.remainingFireTicks > 0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.firstTick = false; - world = this.level(); -@@ -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,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - BlockPos blockposition = this.getOnPosLegacy(); - BlockState iblockdata = this.level().getBlockState(blockposition); - -+ /* // Plazma - Remove persist 'isClientSide' flag - if ((!this.level().isClientSide() || this.isControlledByLocalInstance()) && !this.isControlledByClient()) { - this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.isRemoved()) { - gameprofilerfiller.pop(); -@@ -1317,13 +1319,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - // CraftBukkit end - -- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { -+ //if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag - Entity.MovementEmission entity_movementemission = this.getMovementEmission(); - - if (entity_movementemission.emitsAnything() && !this.isPassenger()) { - this.applyMovementEmissionAndPlaySound(entity_movementemission, vec3d1, blockposition, iblockdata); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - float f = this.getBlockSpeedFactor(); - -@@ -1455,7 +1457,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 - this.playEntityOnFireExtinguishedSound(); - } - -@@ -3150,7 +3152,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) { -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur - Allow leashing villagers - // CraftBukkit start - fire PlayerUnleashEntityEvent - // Paper start - Expand EntityUnleashEvent -@@ -3168,7 +3170,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - - this.gameEvent(GameEvent.ENTITY_INTERACT, player); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS.withoutItem(); - } -@@ -3176,7 +3178,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - ItemStack itemstack = player.getItemInHand(hand); - - if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) { -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - // 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 -@@ -3186,7 +3188,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - // CraftBukkit end - leashable.setLeashedTo(player, true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - itemstack.shrink(1); - return InteractionResult.SUCCESS; -@@ -3258,7 +3260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - return false; - } else if (!entity.couldAcceptPassenger()) { - return false; -- } else if (!force && !this.level().isClientSide() && !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities -+ } else if (!force && /*!this.level().isClientSide() &&*/ !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities // Plazma - Remove persist 'isClientSide' flag - return false; - } else { - for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { -@@ -3353,7 +3355,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } else { - List list = Lists.newArrayList(this.passengers); - -- if (!this.level().isClientSide && passenger instanceof Player && !(this.getFirstPassenger() instanceof Player)) { -+ if (/*!this.level().isClientSide &&*/ passenger instanceof Player && !(this.getFirstPassenger() instanceof Player)) { // Plazma - Remove persist 'isClientSide' flag - list.add(0, passenger); - } else { - list.add(passenger); -@@ -3558,17 +3560,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - public void handleDamageEvent(DamageSource damageSource) {} - - 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 - - return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0)); - } -@@ -3658,7 +3662,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - - public boolean isCurrentlyGlowing() { -- return this.level().isClientSide() ? this.getSharedFlag(6) : this.hasGlowingTag; -+ return /*this.level().isClientSide() ? this.getSharedFlag(6) :*/ this.hasGlowingTag; // Plazma - Remove persist 'isClientSide' flag - } - - public boolean isInvisible() { -@@ -4429,7 +4433,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - this.reapplyPosition(); - boolean flag = entitysize1.width() <= 4.0F && entitysize1.height() <= 4.0F; - -- if (!this.level.isClientSide && !this.firstTick && !this.noPhysics && flag && (entitysize1.width() > entitysize.width() || entitysize1.height() > entitysize.height()) && !(this instanceof Player)) { -+ if (/*!this.level.isClientSide &&*/ !this.firstTick && !this.noPhysics && flag && (entitysize1.width() > entitysize.width() || entitysize1.height() > entitysize.height()) && !(this instanceof Player)) { // Plazma - Remove persist 'isClientSide' flag - this.fudgePositionAfterSizeChange(entitysize); - } - -@@ -4695,6 +4699,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - public boolean isControlledByOrIsLocalPlayer() { - if (this instanceof Player entityhuman) { - return entityhuman.isLocalPlayer(); -@@ -4702,17 +4707,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - return this.isControlledByLocalInstance(); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - public boolean isControlledByLocalInstance() { -- net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger(); -- -- if (entityliving instanceof Player entityhuman) { -- return entityhuman.isLocalPlayer(); -- } else { -- return this.isEffectiveAi(); -- } -+ return !(this.getControllingPassenger() instanceof Player); // Plazma - Remove persist 'isClientSide' flag - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - public boolean isControlledByClient() { - net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger(); - -@@ -4722,6 +4723,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - public boolean isEffectiveAi() { - return !this.level().isClientSide; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 d09664949f924b4bd240abcc4a9f96f142310aa9..88e5315934ba5c45f1e84be275d5c1dce4a7009e 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityType.java -+++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -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/Interaction.java b/src/main/java/net/minecraft/world/entity/Interaction.java -index c838dc018fad67ae0a9b602a3b477aaea137bca2..764b576e5fd546a23ab498b9593404fb32c1b963 100644 ---- a/src/main/java/net/minecraft/world/entity/Interaction.java -+++ b/src/main/java/net/minecraft/world/entity/Interaction.java -@@ -176,12 +176,14 @@ public class Interaction extends Entity implements Attackable, Targeting { - - @Override - public InteractionResult interact(Player player, InteractionHand hand) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - return this.getResponse() ? InteractionResult.SUCCESS : InteractionResult.CONSUME; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - this.interaction = new Interaction.PlayerAction(player.getUUID(), this.level().getGameTime()); - return InteractionResult.CONSUME; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java -index 48f89ec0f02b85092d03fddeec961f1eba5d4a2a..b6186f518393e325c276addc4f767c614dc3485a 100644 ---- a/src/main/java/net/minecraft/world/entity/Leashable.java -+++ b/src/main/java/net/minecraft/world/entity/Leashable.java -@@ -301,6 +301,7 @@ public interface Leashable { - if (leashable_a == null) { - return null; - } else { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (leashable_a.delayedLeashHolderId != 0 && entity.level().isClientSide) { - Entity entity1 = entity.level().getEntity(leashable_a.delayedLeashHolderId); - -@@ -308,6 +309,7 @@ public interface Leashable { - leashable_a.setLeashHolder(entity1); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - return leashable_a.leashHolder; - } -diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java -index 12127b14babf646711d3a118416453c4f1ac1460..447bcaf2a13d0f6f2752de9862ae1276811a329d 100644 ---- a/src/main/java/net/minecraft/world/entity/LightningBolt.java -+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java -@@ -88,10 +88,12 @@ public class LightningBolt extends Entity { - public void tick() { - super.tick(); - if (!this.isEffect && this.life == 2) { // Paper - Properly handle lightning effects api -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide()) { - this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.LIGHTNING_BOLT_THUNDER, SoundSource.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F, false); - this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.LIGHTNING_BOLT_IMPACT, SoundSource.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F, false); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - Difficulty enumdifficulty = this.level().getDifficulty(); - - if (enumdifficulty == Difficulty.NORMAL || enumdifficulty == Difficulty.HARD) { -@@ -101,7 +103,7 @@ public class LightningBolt extends Entity { - this.powerLightningRod(); - LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - Call EntityChangeBlockEvent - this.gameEvent(GameEvent.LIGHTNING_STRIKE); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - --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 684e747255472b85a573e004f85e0319e2145d8e..9940c74dac4ebcfacdaf88d0b1e95e78e964e1ba 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -458,7 +458,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - ProfilerFiller gameprofilerfiller = Profiler.get(); - - gameprofilerfiller.push("livingEntityBaseTick"); -- if (this.fireImmune() || this.level().isClientSide) { -+ if (this.fireImmune() /*|| this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - this.clearFire(); - } - -@@ -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()) { -+ if (/*!this.level().isClientSide &&*/ this.isPassenger() && this.getVehicle() != null && this.getVehicle().dismountsUnderwater()) { // Plazma - Remove persist 'isClientSide' flag - this.stopRiding(); - } - } else if (this.getAirSupply() < this.getMaxAirSupply()) { -@@ -646,7 +646,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - protected void tickDeath() { - ++this.deathTime; -- if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) { -+ if (this.deathTime >= 20 /*&& !this.level().isClientSide()*/ && !this.isRemoved()) { // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 60); - this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause - } -@@ -760,7 +760,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - public void onEquipItem(EquipmentSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1, boolean silent) { - // CraftBukkit end -- if (!this.level().isClientSide() && !this.isSpectator()) { -+ if (/*!this.level().isClientSide() &&*/ !this.isSpectator()) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = itemstack1.isEmpty() && itemstack.isEmpty(); - - if (!flag && !ItemStack.isSameItemSameComponents(itemstack, itemstack1) && !this.firstTick) { -@@ -875,7 +875,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - } - // Paper end - Friction API -- if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { -+ if (nbt.contains("attributes", 9) && this.level() != null /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - this.getAttributes().load(nbt.getList("attributes", 10)); - } - -@@ -983,7 +983,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (!mobeffect.tick(this, () -> { - this.onEffectUpdated(mobeffect, true, (Entity) null); - })) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect, null, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.EXPIRATION); - if (event.isCancelled()) { -@@ -992,7 +992,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - // CraftBukkit end - iterator.remove(); - this.onEffectsRemoved(List.of(mobeffect)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else if (mobeffect.getDuration() % 600 == 0) { - this.onEffectUpdated(mobeffect, false, (Entity) null); - } -@@ -1013,10 +1013,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - // CraftBukkit end - - if (this.effectsDirty) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.updateInvisibilityStatus(); - this.updateGlowingStatus(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.effectsDirty = false; - } -@@ -1151,9 +1151,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - - public boolean removeAllEffects(EntityPotionEffectEvent.Cause cause) { - // CraftBukkit end -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - return false; -- } else if (this.activeEffects.isEmpty()) { -+ } else*/ if (this.activeEffects.isEmpty()) { // Plazma - Remove persist 'isClientSide' flag - return false; - } else { - // CraftBukkit start -@@ -1326,10 +1327,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - - protected void onEffectAdded(MobEffectInstance effect, @Nullable Entity source) { - this.effectsDirty = true; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ((MobEffect) effect.getEffect().value()).addAttributeModifiers(this.getAttributes(), effect.getAmplifier()); - this.sendEffectToPassengers(effect); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -1348,7 +1349,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - protected void onEffectUpdated(MobEffectInstance effect, boolean reapplyEffect, @Nullable Entity source) { - this.effectsDirty = true; -- if (reapplyEffect && !this.level().isClientSide) { -+ if (reapplyEffect /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - MobEffect mobeffectlist = (MobEffect) effect.getEffect().value(); - - mobeffectlist.removeAttributeModifiers(this.getAttributes()); -@@ -1356,15 +1357,15 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.refreshDirtyAttributes(); - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.sendEffectToPassengers(effect); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - - protected void onEffectsRemoved(Collection effects) { - this.effectsDirty = true; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - Iterator iterator = effects.iterator(); - - while (iterator.hasNext()) { -@@ -1385,7 +1386,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - this.refreshDirtyAttributes(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -1929,7 +1930,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.stopSleeping(); - } - -- if (!this.level().isClientSide && this.hasCustomName()) { -+ if (/*!this.level().isClientSide &&*/ this.hasCustomName()) { // Plazma - Remove persist 'isClientSide' flag - if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot - } - -@@ -2790,9 +2791,11 @@ public abstract class LivingEntity extends Entity implements Attackable { - case 52: - this.breakItem(this.getItemBySlot(EquipmentSlot.FEET)); - break; -+ /* // Plazma - Remove persist 'isClientSide' flags - case 54: - HoneyBlock.showJumpParticles(this); - break; -+ */ // Plazma - Remove persist 'isClientSide' flags - case 55: - this.swapHandItems(); - break; -@@ -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 - } 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 - } else { - d0 -= this.getEffectiveGravity(); - } -@@ -3210,11 +3215,11 @@ public abstract class LivingEntity extends Entity implements Attackable { - - this.setDeltaMovement(this.updateFallFlyingMovement(vec3d)); - this.move(MoverType.SELF, this.getDeltaMovement()); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - double d1 = this.getDeltaMovement().horizontalDistance(); - - this.handleFallFlyingCollisions(d0, d1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -3264,7 +3269,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - Vec3 vec3d1 = this.getRiddenInput(controllingPlayer, movementInput); - - this.tickRidden(controllingPlayer, vec3d1); -- if (this.isControlledByLocalInstance()) { -+ if (this.isControlledByLocalInstance()) { // Plazma - Remove persist 'isClientSide' flag - this.setSpeed(this.getRiddenSpeed(controllingPlayer)); - this.travel(vec3d1); - } else { -@@ -3373,7 +3378,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - super.tick(); - this.updatingUsingItem(); - this.updateSwimAmount(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - int i = this.getArrowCount(); - - if (i > 0) { -@@ -3408,7 +3413,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (this.isSleeping() && !this.checkBedExists()) { - this.stopSleeping(); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (!this.isRemoved()) { - this.aiStep(); -@@ -3666,8 +3671,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; -+ /* // Plazma - Remove persist 'isClientSide' flag - } else if (!this.isEffectiveAi()) { - this.setDeltaMovement(this.getDeltaMovement().scale(0.98D)); -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - if (this.lerpHeadSteps > 0) { -@@ -3700,7 +3707,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.jumping = false; - this.xxa = 0.0F; - this.zza = 0.0F; -- } else if (this.isEffectiveAi()) { -+ } else /*if (this.isEffectiveAi())*/ { // Plazma - Remove persist 'isClientSide' flag - gameprofilerfiller.push("newAi"); - this.serverAiStep(); - gameprofilerfiller.pop(); -@@ -3763,14 +3770,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 - this.applyEffectsFromBlocks(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.calculateEntityAnimation(this instanceof FlyingAnimal); - gameprofilerfiller.pop(); - gameprofilerfiller.push("freezing"); -- if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API -+ if (/*!this.level().isClientSide &&*/ !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API // Plazma - Remove persist 'isClientSide' flag - int i = this.getTicksFrozen(); - - if (this.isInPowderSnow && this.canFreeze()) { -@@ -3873,7 +3880,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - protected void updateFallFlying() { - this.checkSlowFallDistance(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (!this.canGlide()) { - if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit - this.setSharedFlag(7, false); -@@ -3906,7 +3913,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - this.gameEvent(GameEvent.ELYTRA_GLIDE); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -4009,7 +4016,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.autoSpinAttackTicks = 0; - } - -- if (!this.level().isClientSide && this.autoSpinAttackTicks <= 0) { -+ if (/*!this.level().isClientSide &&*/ this.autoSpinAttackTicks <= 0) { // Plazma - Remove persist 'isClientSide' flag - this.setLivingEntityFlag(4, false); - this.autoSpinAttackDmg = 0.0F; - this.autoSpinAttackItemStack = null; -@@ -4038,7 +4045,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - Entity entity = this.getVehicle(); - - super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation -- if (entity != null && entity != this.getVehicle() && !this.level().isClientSide && entity.valid) { // Paper - don't process on world gen -+ if (entity != null && entity != this.getVehicle() /*&& !this.level().isClientSide*/ && entity.valid) { // Paper - don't process on world gen // Plazma - Remove persist 'isClientSide' flag - this.dismountVehicle(entity); - } - -@@ -4112,7 +4119,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - public void take(Entity item, int count) { -- if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) { -+ if (!item.isRemoved() /*&& !this.level().isClientSide*/ && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) { // Plazma - Remove persist 'isClientSide' flag - ((ServerLevel) this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); // Paper - broadcast with collector as source - } - -@@ -4253,7 +4260,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 - this.useItemRemaining = 0; - // Paper end - lag compensate eating - this.completeUsingItem(); -@@ -4297,15 +4304,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 -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setLivingEntityFlag(1, true); - this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); - this.gameEvent(GameEvent.ITEM_INTERACT_START); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void onSyncedDataUpdated(EntityDataAccessor data) { - super.onSyncedDataUpdated(data); -@@ -4329,6 +4337,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public void lookAt(EntityAnchorArgument.Anchor anchorPoint, Vec3 target) { -@@ -4361,7 +4370,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - public void completeUsingItem() { -- if (!this.level().isClientSide || this.isUsingItem()) { -+ //if (!this.level().isClientSide || this.isUsingItem()) { // Plazma - Remove persist 'isClientSide' flag - InteractionHand enumhand = this.getUsedItemHand(); - - if (!this.useItem.equals(this.getItemInHand(enumhand))) { -@@ -4415,7 +4424,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - public void handleExtraItemsCreatedOnUse(ItemStack stack) {} -@@ -4445,14 +4454,14 @@ public abstract class LivingEntity extends Entity implements Attackable { - } - - public void stopUsingItem() { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = this.isUsingItem(); - - this.setLivingEntityFlag(1, false); - if (flag) { - this.gameEvent(GameEvent.ITEM_INTERACT_FINISH); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.useItem = ItemStack.EMPTY; - // Paper start - lag compensate eating -@@ -4890,7 +4899,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - - @Override - public boolean isCurrentlyGlowing() { -- return !this.level().isClientSide() && this.hasEffect(MobEffects.GLOWING) || super.isCurrentlyGlowing(); -+ return /*!this.level().isClientSide() &&*/ this.hasEffect(MobEffects.GLOWING) || super.isCurrentlyGlowing(); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 98b08a2e83cf1c4e1e45a42ddcad2198f42a05e2..ae1dcf013b03c6d04ccf34be4e54048581479183 100644 ---- a/src/main/java/net/minecraft/world/entity/Mob.java -+++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -440,11 +440,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - } - - public void spawnAnim() { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.makePoofParticles(); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 20); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -461,7 +463,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - @Override - public void tick() { - super.tick(); -- if (!this.level().isClientSide && this.tickCount % 5 == 0) { -+ if (/*!this.level().isClientSide &&*/ this.tickCount % 5 == 0) { // Plazma - Remove persist 'isClientSide' flag - this.updateControlFlags(); - } - -@@ -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; - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isEffectiveAi() { - return super.isEffectiveAi() && !this.isNoAi(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 07e3e727e339765284095aa8fd6b5edd41dc4158..895e69364778ddfa95f686e8f907d555b6d19295 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java -@@ -86,10 +86,10 @@ public class RemoveBlockGoal extends MoveToBlockGoal { - if (this.ticksSinceReachedGoal > 0) { - vec3d = this.removerMob.getDeltaMovement(); - this.removerMob.setDeltaMovement(vec3d.x, 0.3D, vec3d.z); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - d0 = 0.08D; - ((ServerLevel) world).sendParticles(new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.EGG)), (double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.7D, (double) blockposition1.getZ() + 0.5D, 3, ((double) randomsource.nextFloat() - 0.5D) * 0.08D, ((double) randomsource.nextFloat() - 0.5D) * 0.08D, ((double) randomsource.nextFloat() - 0.5D) * 0.08D, 0.15000000596046448D); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - if (this.ticksSinceReachedGoal % 2 == 0) { -@@ -107,7 +107,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal { - } - // CraftBukkit end - world.removeBlock(blockposition1, false); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - for (int i = 0; i < 20; ++i) { - d0 = randomsource.nextGaussian() * 0.02D; - double d1 = randomsource.nextGaussian() * 0.02D; -@@ -117,7 +117,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal { - } - - this.playBreakSound(world, blockposition1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - ++this.ticksSinceReachedGoal; -diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -index d1eb633416ff5090253e77583ec97aff3171c484..737e9d8b75df05ca0e032916564599d5abad45ff 100644 ---- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java -+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -@@ -48,9 +48,9 @@ public class Bat extends AmbientCreature { - public Bat(EntityType type, Level world) { - super(type, world); - this.moveControl = new org.purpurmc.purpur.controller.FlyingWithSpacebarMoveControllerWASD(this, 0.075F); // Purpur - Ridables -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setResting(true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java -index 8df1682dca61b0f771a1c08f5bcd797506badf19..23bb616f0bb97b63f7f1ba0ef095163c1945914b 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Animal.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java -@@ -158,7 +158,7 @@ public abstract class Animal extends AgeableMob { - if (this.isFood(itemstack)) { - int i = this.getAge(); - -- if (!this.level().isClientSide && i == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur -+ if (/*!this.level().isClientSide &&*/ i == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur // Plazma - Remove persist 'isClientSide' flag - final ItemStack breedCopy = itemstack.copy(); // Paper - Fix EntityBreedEvent copying - this.usePlayerItem(player, hand, itemstack); - this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying -@@ -173,9 +173,11 @@ public abstract class Animal extends AgeableMob { - return InteractionResult.SUCCESS; - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - return InteractionResult.CONSUME; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - 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 d2ac2c3a2481ee216a491333b173625da3881737..ba0b72e648fad219d7b42f5d489b53ec41046826 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Bee.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -583,7 +583,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { - @Override - public void aiStep() { - super.aiStep(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (this.stayOutOfHiveCountdown > 0) { - --this.stayOutOfHiveCountdown; - } -@@ -602,7 +602,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { - if (this.tickCount % 20 == 0 && !this.isHiveValid()) { - this.hivePos = null; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -710,9 +710,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 -+++ b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java -@@ -118,9 +118,9 @@ public interface Bucketable { - player.setItemInHand(hand, itemstack2); - Level world = entity.level(); - -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) player, itemstack1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 5a3348ca39b86cfea941fdfb98ca90a7a0ef908d..6596add7dc43d1e292dfeacc3e426186a4f8410d 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Cat.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java -@@ -454,22 +454,22 @@ public class Cat extends TamableAnimal implements VariantHolder 0.03D) { - Vec3 vec3d = this.getViewVector(0.0F); - float f = Mth.cos(this.getYRot() * 0.017453292F) * 0.3F; -@@ -392,6 +393,7 @@ public class Dolphin extends AgeableWaterCreature { - this.level().addParticle(ParticleTypes.DOLPHIN, this.getX() - vec3d.x * (double) f2 - (double) f, this.getY() - vec3d.y, this.getZ() - vec3d.z * (double) f2 - (double) f1, 0.0D, 0.0D, 0.0D); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - } - } -@@ -422,9 +424,9 @@ public class Dolphin extends AgeableWaterCreature { - ItemStack itemstack = player.getItemInHand(hand); - - if (!itemstack.isEmpty() && itemstack.is(ItemTags.FISHES)) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.playSound(SoundEvents.DOLPHIN_EAT, 1.0F, 1.0F); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (this.isBaby()) { - itemstack.consume(1, player); -diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index fb75b983f7c522708964a9352546ae29611bf4e9..071792e842c064d01fd68b5deeb523019f3fd826 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Fox.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -261,7 +261,7 @@ public class Fox extends Animal implements VariantHolder { - - @Override - public void aiStep() { -- if (!this.level().isClientSide && this.isAlive() && this.isEffectiveAi()) { -+ if (this.isAlive()) { // Plazma - Remove persist 'isClientSide' flag - ++this.ticksSinceEaten; - ItemStack itemstack = this.getItemBySlot(EquipmentSlot.MAINHAND); - -@@ -563,7 +563,7 @@ public class Fox extends Animal implements VariantHolder { - } - - private void spitOutItem(ItemStack stack) { -- if (!stack.isEmpty() && !this.level().isClientSide) { -+ 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); -@@ -605,7 +605,7 @@ public class Fox extends Animal implements VariantHolder { - @Override - public void tick() { - super.tick(); -- if (this.isEffectiveAi()) { -+ //if (this.isEffectiveAi()) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = this.isInWater(); - - if (flag || this.getTarget() != null || this.level().isThundering()) { -@@ -622,7 +622,7 @@ public class Fox extends Animal implements VariantHolder { - - this.level().levelEvent(2001, blockposition, Block.getId(iblockdata)); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.interestedAngleO = this.interestedAngle; - if (this.isInterested()) { -diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index caa29df16214c60c4e0a471ad6320ea5d62ba7d0..1c918dfcb8b3c05394fea6dcc50c5bfc48cb3634 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -@@ -166,9 +166,9 @@ public class IronGolem extends AbstractGolem implements NeutralMob { - --this.offerFlowerTick; - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.updatePersistentAnger((ServerLevel) this.level(), true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -index 79db05362cddbef624e5f5e19e11faa951b6f81c..f8d16ae7f8bd7c17fa5b91322ef98e37e40d80f7 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -@@ -210,7 +210,7 @@ public class Ocelot extends Animal { - - if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemstack) && player.distanceToSqr((Entity) this) < 9.0D) { - this.usePlayerItem(player, hand, itemstack); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check - this.setTrusting(true); - this.spawnTrustingParticles(true); -@@ -219,7 +219,7 @@ public class Ocelot extends Animal { - this.spawnTrustingParticles(false); - this.level().broadcastEntityEvent(this, (byte) 40); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index 18bda7f4d0e0dfb2074b70e1369915c3a486e5cd..adeb06f913b53d802f03d3def1303e298fe589e4 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Panda.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java -@@ -467,12 +467,12 @@ public class Panda extends Animal { - - if (this.isEating()) { - this.addEatingParticles(); -- if (!this.level().isClientSide && this.getEatCounter() > 80 && this.random.nextInt(20) == 1) { -+ if (/*!this.level().isClientSide &&*/ this.getEatCounter() > 80 && this.random.nextInt(20) == 1) { // Plazma - Remove persist 'isClientSide' flag - if (this.getEatCounter() > 100 && this.getItemBySlot(EquipmentSlot.MAINHAND).is(ItemTags.PANDA_EATS_FROM_GROUND)) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); - this.gameEvent(GameEvent.EAT); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.sit(false); - } -@@ -553,7 +553,7 @@ public class Panda extends Animal { - if (this.rollCounter > 32) { - this.roll(false); - } else { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - Vec3 vec3d = this.getDeltaMovement(); - - if (this.rollCounter == 1) { -@@ -567,7 +567,7 @@ public class Panda extends Animal { - } else { - this.setDeltaMovement(0.0D, this.onGround() ? 0.27D : vec3d.y, 0.0D); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } -@@ -709,7 +709,7 @@ public class Panda extends Animal { - if (this.isBaby()) { - this.usePlayerItem(player, hand, itemstack); - this.ageUp((int) ((float) (-this.getAge() / 20) * 0.1F), true); -- } else if (!this.level().isClientSide && this.getAge() == 0 && this.canFallInLove()) { -+ } else if (/*!this.level().isClientSide &&*/ this.getAge() == 0 && this.canFallInLove()) { // Plazma - Remove persist 'isClientSide' flag - final ItemStack breedCopy = itemstack.copy(); // Paper - Fix EntityBreedEvent copying - this.usePlayerItem(player, hand, itemstack); - this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying -@@ -884,25 +884,19 @@ public class Panda extends Animal { - - @Override - public boolean canUse() { -- if (super.canUse() && this.panda.getUnhappyCounter() == 0) { -- if (!this.canFindBamboo()) { -- if (this.unhappyCooldown <= this.panda.tickCount) { -- this.panda.setUnhappyCounter(32); -- this.unhappyCooldown = this.panda.tickCount + 600; -- if (this.panda.isEffectiveAi()) { -- Player entityhuman = this.level.getNearestPlayer(Panda.BREED_TARGETING, this.panda); -- -- this.panda.lookAtPlayerGoal.setTarget(entityhuman); -- } -- } -+ // Plazma start - Remove persist 'isClientSide' flag -+ if (!super.canUse() && this.panda.getUnhappyCounter() != 0) return false; -+ if (this.canFindBamboo()) return true; - -- return false; -- } else { -- return true; -- } -- } else { -- return false; -- } -+ if (this.unhappyCooldown > this.panda.tickCount) return false; -+ -+ this.panda.setUnhappyCounter(32); -+ this.unhappyCooldown = this.panda.tickCount + 600; -+ Player player = this.level.getNearestPlayer(Panda.BREED_TARGETING, this.panda); -+ -+ this.panda.lookAtPlayerGoal.setTarget(player); -+ return false; -+ // Plazma end - Remove persist 'isClientSide' flag - } - - 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 724e7e77b1c781c3c91689eb7dfc3aed21133fd0..6a5210dd9256dedf30f2d66b94b806a739f3ba73 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -331,22 +331,22 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder data) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (Pig.DATA_BOOST_TIME.equals(data) && this.level().isClientSide) { - this.steering.onSynced(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - super.onSyncedDataUpdated(data); - } -@@ -211,9 +213,9 @@ public class Pig extends Animal implements ItemSteerable, Saddleable { - } - - if (!flag && this.isSaddled() && !this.isVehicle() && !player.isSecondaryUseActive()) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.startRiding(this); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/entity/animal/PolarBear.java b/src/main/java/net/minecraft/world/entity/animal/PolarBear.java -index 986fad77b0340c344ba3a3e3a3e5bc0105625439..1932e396a36a4c5e17402c06a547672437dbbf73 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/PolarBear.java -+++ b/src/main/java/net/minecraft/world/entity/animal/PolarBear.java -@@ -268,6 +268,7 @@ public class PolarBear extends Animal implements NeutralMob { - @Override - public void tick() { - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - if (this.clientSideStandAnimation != this.clientSideStandAnimationO) { - this.refreshDimensions(); -@@ -280,14 +281,15 @@ public class PolarBear extends Animal implements NeutralMob { - this.clientSideStandAnimation = Mth.clamp(this.clientSideStandAnimation - 1.0F, 0.0F, 6.0F); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.warningSoundTicks > 0) { - this.warningSoundTicks--; - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.updatePersistentAnger((ServerLevel)this.level(), true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - // Purpur start - Ridables - if (isStanding() && --standTimer <= 0) { -diff --git a/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java b/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java -index a612f3e8034dd20566370c846f093b50ddef904c..cc5208e7907d58492c8096438772ca63693c3a7a 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java -@@ -130,7 +130,7 @@ public class Pufferfish extends AbstractFish { - - @Override - public void tick() { -- if (!this.level().isClientSide && this.isAlive() && this.isEffectiveAi()) { -+ if (/*!this.level().isClientSide &&*/ this.isAlive() /*&& this.isEffectiveAi()*/) { // Plazma - Remove persist 'isClientSide' flag - if (this.inflateCounter > 0) { - boolean increase = true; // Paper - Add PufferFishStateChangeEvent - if (this.getPuffState() == 0) { -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 080551d9b55d12ef15fa2efbde1d195bc82d065c..761745f759614c43426b1bdf7bc8ca7b5aff100a 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java -@@ -230,9 +230,9 @@ public class Rabbit extends Animal implements VariantHolder { - } - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 8c8c587646a1db8dc35fcbd85868e84a2f2697b2..b24d781dd4331a227fac5611458bdfa597e56c30 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java -@@ -154,6 +154,7 @@ public class Sheep extends Animal implements Shearable { - super.customServerAiStep(world); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void aiStep() { - if (this.level().isClientSide) { -@@ -162,6 +163,7 @@ public class Sheep extends Animal implements Shearable { - - super.aiStep(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 c7a7d1df79beb527ff94f876ca36a861c37c4947..39dfed25678307555a6c30a068be14cdf5437f22 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Squid.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java -@@ -171,16 +171,18 @@ public class Squid extends AgeableWaterCreature { - this.oldTentacleAngle = this.tentacleAngle; - this.tentacleMovement = this.tentacleMovement + this.tentacleSpeed; - if ((double)this.tentacleMovement > Math.PI * 2) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.tentacleMovement = (float) (Math.PI * 2); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - this.tentacleMovement -= (float) (Math.PI * 2); - if (this.random.nextInt(10) == 0) { - this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; - } - - this.level().broadcastEntityEvent(this, (byte)19); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - if (this.isInWaterOrBubble()) { -@@ -214,7 +216,7 @@ public class Squid extends AgeableWaterCreature { - this.xBodyRot = this.xBodyRot + (-((float)Mth.atan2(d, vec3.y)) * (180.0F / (float)Math.PI) - this.xBodyRot) * 0.1F; - } else { - this.tentacleAngle = Mth.abs(Mth.sin(this.tentacleMovement)) * (float) Math.PI * 0.25F; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - double e = this.getDeltaMovement().y; - if (this.hasEffect(MobEffects.LEVITATION)) { - e = 0.05 * (double)(this.getEffect(MobEffects.LEVITATION).getAmplifier() + 1); -@@ -223,7 +225,7 @@ public class Squid extends AgeableWaterCreature { - } - - this.setDeltaMovement(0.0, e * 0.98F, 0.0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.xBodyRot = this.xBodyRot + (-90.0F - this.xBodyRot) * 0.02F; - } -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 30b4c09c6046c1d0843ccb8e4ff326e189b6cb95..9f4681cb70f0e42e07968024cee010990644ba53 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java -@@ -373,16 +373,16 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder getLikedPlayer(LivingEntity allay) { - Level level = allay.level(); -- if (!level.isClientSide() && level instanceof ServerLevel serverLevel) { -+ if (/*!level.isClientSide() &&*/ level instanceof ServerLevel serverLevel) { // Plazma - Remove persist 'isClientSide' flag - Optional optional = allay.getBrain().getMemory(MemoryModuleType.LIKED_PLAYER); - if (optional.isPresent()) { - if (serverLevel.getEntity(optional.get()) instanceof ServerPlayer serverPlayer -diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index a1612c503c12b9a4d03c1a62320801f41c0ffa2e..d239c8325468c72fc7acf3831115c3cdf1f77f43 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java -+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -196,9 +196,11 @@ public class Armadillo extends Animal { - @Override - public void tick() { - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide()) { - this.setupAnimationStates(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.isScared()) { - this.clampHeadRotationToBody(); -@@ -249,12 +251,14 @@ public class Armadillo extends Animal { - - @Override - public void handleEntityEvent(byte status) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (status == 64 && this.level().isClientSide) { - this.peekReceivedClient = true; - this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ARMADILLO_PEEK, this.getSoundSource(), 1.0F, 1.0F, false); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - super.handleEntityEvent(status); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -422,7 +426,7 @@ public class Armadillo extends Animal { - - @Override - protected BodyRotationControl createBodyControl() { -- return new BodyRotationControl(this) { -+ return new BodyRotationControl(this) /* // Plazma - Remove persist 'isClientSide' flag{ - @Override - public void clientTick() { - if (!Armadillo.this.isScared()) { -@@ -430,7 +434,7 @@ public class Armadillo extends Animal { - } - - } -- }; -+ }*/; // Plazma - Remove persist 'isClientSide' flag - } - - public static enum ArmadilloState implements StringRepresentable { -diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index 4bff73b108ba9d76409baeed7c26682868e5cc1a..a38bca8cf5fbb218f8dbd2fb27705051c4d4836f 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -211,9 +211,11 @@ public class Axolotl extends Animal implements VariantHolder, B - this.handleAirSupply(i); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide()) { - this.tickAnimations(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index d364866de67341e4a781b4f2bf3e7c187ee2bc8c..70c3bb5d0c35fa79f74f76f452e9b34ebfe8041e 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -197,9 +197,11 @@ public class Camel extends AbstractHorse { - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide()) { - this.setupAnimationStates(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.refuseToMove()) { - this.clampHeadRotationToBody(); -@@ -445,9 +447,9 @@ public class Camel extends AbstractHorse { - - if (flag2) { - this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.ageUp(10); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - if (!flag && !flag1 && !flag2) { -@@ -673,9 +675,9 @@ public class Camel extends AbstractHorse { - - @Override - public void openCustomInventoryScreen(Player player) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.openHorseInventory(this, this.inventory); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -721,6 +723,7 @@ public class Camel extends AbstractHorse { - super(camel); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void clientTick() { - if (!Camel.this.refuseToMove()) { -@@ -728,5 +731,6 @@ public class Camel extends AbstractHorse { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - } -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 70772863011ce270bceaf679ea3776fb36d4f0b9..05e5bb907edb77f2479b29d6e4a15ae446ab0620 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 -@@ -271,6 +271,7 @@ public class Frog extends Animal implements VariantHolder> { - super.customServerAiStep(world); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void tick() { - if (this.level().isClientSide()) { -@@ -279,6 +280,7 @@ public class Frog extends Animal implements VariantHolder> { - - super.tick(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public void onSyncedDataUpdated(EntityDataAccessor data) { -diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -index fee263bd88c19188f6ec8017893dfc12bdd15737..e5affd87506a717f4cffa9fad4873c1efbded295 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -159,7 +159,7 @@ public class Tadpole extends AbstractFish { - @Override - public void aiStep() { - super.aiStep(); -- if (!this.level().isClientSide && !this.ageLocked) { // Paper -+ if (/*!this.level().isClientSide &&*/ !this.ageLocked) { // Paper // Plazma - Remove persist 'isClientSide' flag - this.setAge(this.age + 1); - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index f58a0f50d04004587d342c1bb5f681cd485cf302..8ce558ddfc6dcf8fe9e6c2289fecb294a81001db 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -492,9 +492,9 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - } - - protected void syncSaddleToClients() { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setFlag(4, !this.inventory.getItem(0).isEmpty()); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -592,7 +592,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - - @Override - public void openCustomInventoryScreen(Player player) { -- if (!this.level().isClientSide && (!this.isVehicle() || this.hasPassenger((Entity) player)) && this.isTamed()) { -+ if (/*!this.level().isClientSide &&*/ (!this.isVehicle() || this.hasPassenger((Entity) player)) && this.isTamed()) { // Plazma - Remove persist 'isClientSide' flag - player.openHorseInventory(this, this.inventory); - } - -@@ -605,7 +605,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - stack.consume(1, player); - } - -- return (InteractionResult) (!flag && !this.level().isClientSide ? InteractionResult.PASS : InteractionResult.SUCCESS_SERVER); -+ return !flag /*&& !this.level().isClientSide*/ ? InteractionResult.PASS : InteractionResult.SUCCESS_SERVER; // Plazma - Remove persist 'isClientSide' flag - } - - protected boolean handleEating(Player player, ItemStack item) { -@@ -633,7 +633,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - f = 4.0F; - short0 = 60; - b0 = 5; -- if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) { -+ if (/*!this.level().isClientSide &&*/ this.isTamed() && this.getAge() == 0 && !this.isInLove()) { // Plazma - Remove persist 'isClientSide' flag - flag = true; - this.setInLove(player, item.copy()); // Paper - Fix EntityBreedEvent copying - } -@@ -641,7 +641,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - f = 10.0F; - short0 = 240; - b0 = 10; -- if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) { -+ if (/*!this.level().isClientSide &&*/ this.isTamed() && this.getAge() == 0 && !this.isInLove()) { // Plazma - Remove persist 'isClientSide' flag - flag = true; - this.setInLove(player, item.copy()); // Paper - Fix EntityBreedEvent copying - } -@@ -654,13 +654,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - - if (this.isBaby() && short0 > 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); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.ageUp(short0); - flag = true; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - -- if (b0 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper() && !this.level().isClientSide) { -+ if (b0 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper() /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - this.modifyTemper(b0); - flag = true; - } -@@ -676,11 +676,11 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - protected void doPlayerRide(Player player) { - this.setEating(false); - this.setStanding(false); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.setYRot(this.getYRot()); - player.setXRot(this.getXRot()); - player.startRiding(this); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -769,7 +769,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - this.setFlag(64, false); - } - -- if (this.isEffectiveAi() && this.standCounter > 0 && ++this.standCounter > 20) { -+ if (/*this.isEffectiveAi() &&*/ this.standCounter > 0 && ++this.standCounter > 20) { // Plazma - Remove persist 'isClientSide' flag - this.standCounter = 0; - this.setStanding(false); - } -@@ -869,10 +869,10 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - } - - private void openMouth() { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.mouthCounter = 1; - this.setFlag(64, true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -899,10 +899,12 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, - } - - public void standIfPossible() { -- if (this.canPerformRearing() && this.isEffectiveAi()) { -- this.standCounter = 1; -- this.setStanding(true); -- } -+ // Plazma start - Remove persist 'isClientSide' flag -+ if (!this.canPerformRearing()) return; -+ -+ this.standCounter = 1; -+ this.setStanding(true); -+ // Plazma end - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 3c265a80f55eee38406066cd02460b18fbac896d..c53e518e8455d6a54b71e538ec65629ce9720b38 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -271,18 +271,18 @@ public class Llama extends AbstractChestedHorse implements VariantHolder 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); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.ageUp(b0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - flag = true; - } - - if (b1 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper()) { - flag = true; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.modifyTemper(b1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 48c642308193243407353ea7a6849219b94b70e2..141e8cb85eb06f85143d7fb4c187e15fc88c4319 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 -@@ -142,9 +142,9 @@ public class TraderLlama extends Llama { - @Override - public void aiStep() { - super.aiStep(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.maybeDespawn(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 86988932dc79e9ca33998044995187709ad5373b..5a101b5ff1f2e3f6f3882f84e219ba7c502ec462 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -406,9 +406,11 @@ public class Sniffer extends Animal { - @Override - public void tick() { - switch (this.getState().ordinal()) { -+ /* // Plazma - Remove persist 'isClientSide' flag - case 4: - this.playSearchingSound(); - break; -+ */ // Plazma - Remove persist 'isClientSide' flag - case 5: - this.emitDiggingParticles(this.diggingAnimationState).dropSeed(); - } -@@ -434,12 +436,14 @@ public class Sniffer extends Animal { - this.level().playSound((Player) null, (Entity) this, SoundEvents.SNIFFER_EAT, SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F)); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - private void playSearchingSound() { - if (this.level().isClientSide() && this.tickCount % 20 == 0) { - this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.SNIFFER_SEARCHING, this.getSoundSource(), 1.0F, 1.0F, false); - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @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 d3721fcd9a537ad1e3c5712cd78bd436ac3e1a8b..0d66cc209ddcfde21686fa85bc88d738e47c6b63 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 -@@ -223,6 +223,7 @@ public class EnderDragon extends Mob implements Enemy { - return f1 <= -0.3F && f >= -0.3F; - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void onFlap() { - if (this.level().isClientSide && !this.isSilent()) { -@@ -230,6 +231,7 @@ public class EnderDragon extends Mob implements Enemy { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { -@@ -271,6 +273,7 @@ public class EnderDragon extends Mob implements Enemy { - // Purpur end - Ridables - - this.processFlappingMovement(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.setHealth(this.getHealth()); - if (!this.isSilent() && !this.phaseManager.getCurrentPhase().isSitting() && --this.growlTime < 0) { -@@ -278,6 +281,7 @@ public class EnderDragon extends Mob implements Enemy { - this.growlTime = 200 + this.random.nextInt(200); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.dragonFight == null) { - Level world = this.level(); -@@ -388,9 +392,9 @@ public class EnderDragon extends Mob implements Enemy { - this.phaseManager.getCurrentPhase().doClientTick(); - } - -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - this.applyEffectsFromBlocks(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.yBodyRot = this.getYRot(); - Vec3[] avec3d = new Vec3[this.subEntities.length]; -@@ -1146,6 +1150,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) { - if (EnderDragon.DATA_PHASE.equals(data) && this.level().isClientSide) { -@@ -1154,6 +1159,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 -+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java -@@ -43,11 +43,11 @@ public class EnderDragonPhaseManager { - // CraftBukkit end - - this.currentPhase = this.getPhase(type); -- if (!this.dragon.level().isClientSide) { -+ //if (!this.dragon.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.dragon.getEntityData().set(EnderDragon.DATA_PHASE, type.getId()); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - -- EnderDragonPhaseManager.LOGGER.debug("Dragon is now in phase {} on the {}", type, this.dragon.level().isClientSide ? "client" : "server"); -+ EnderDragonPhaseManager.LOGGER.debug("Dragon is now in phase {} on the {}", type, /*this.dragon.level().isClientSide ? "client" :*/ "server"); // Plazma - Remove persist 'isClientSide' flag - this.currentPhase.begin(); - } - } -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 505c84731b4731588b4568d82a852a17121e5ec8..08bff1102179551eeeeed7f65aaa1ab501ca8683 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 -@@ -323,7 +323,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { - public void aiStep() { - Vec3 vec3d = this.getDeltaMovement().multiply(1.0D, 0.6D, 1.0D); - -- if (!this.level().isClientSide && this.getAlternativeTarget(0) > 0) { -+ if (/*!this.level().isClientSide &&*/ this.getAlternativeTarget(0) > 0) { // Plazma - Remove persist 'isClientSide' flag - Entity entity = this.level().getEntity(this.getAlternativeTarget(0)); - - if (entity != null) { -diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 572bb7e1f6ae75f6dfe53b0e100b3654e42bf4c2..cbb2b28190cd05ced325359dbb466a50091213f6 100644 ---- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -161,10 +161,12 @@ public class ArmorStand extends LivingEntity { - return !this.isMarker() && !this.isNoGravity(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isEffectiveAi() { - return super.isEffectiveAi() && this.hasPhysics(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { -@@ -387,8 +389,10 @@ public class ArmorStand extends LivingEntity { - if (!this.isMarker() && !itemstack.is(Items.NAME_TAG)) { - if (player.isSpectator()) { - return InteractionResult.SUCCESS; -+ /* // Plazma - Remove persist 'isClientSide' flag - } else if (player.level().isClientSide) { - return InteractionResult.SUCCESS_SERVER; -+ */ // Plazma - Remove persist 'isClientSide' flag - } else { - net.minecraft.world.entity.EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(itemstack); - -@@ -571,15 +575,8 @@ public class ArmorStand extends LivingEntity { - - @Override - public void handleEntityEvent(byte status) { -- if (status == 32) { -- if (this.level().isClientSide) { -- this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ARMOR_STAND_HIT, this.getSoundSource(), 0.3F, 1.0F, false); -- this.lastHit = this.level().getGameTime(); -- } -- } else { -- super.handleEntityEvent(status); -- } -- -+ if (status == 32) return; // Plazma - Remove persist 'isClientSide' flag -+ super.handleEntityEvent(status); // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 { - - if (this.fixed) { - return InteractionResult.PASS; -- } else if (!player.level().isClientSide) { -+ } else /*if (!player.level().isClientSide)*/ { // Plazma - Remove persist 'isClientSide' flag - if (!flag) { - if (flag1 && !this.isRemoved()) { - MapItemSavedData worldmap = MapItem.getSavedData(itemstack, this.level()); -@@ -454,8 +454,10 @@ public class ItemFrame extends HangingEntity { - this.gameEvent(GameEvent.BLOCK_CHANGE, player); - return InteractionResult.SUCCESS; - } -+ /* // Plazma - Remove persist 'isClientSide' flag - } else { - return (InteractionResult) (!flag && !flag1 ? InteractionResult.PASS : InteractionResult.SUCCESS); -+ */ // Plazma - Remove persist 'isClientSide' flag - } - } - -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 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,9 +75,11 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity { - - @Override - public InteractionResult interact(Player player, InteractionHand hand) { -+ /* // 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; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 09403344ad63c538a2a221c6b726ebab1aab5642..4aaaadce69e62fa371d5b441e5e69c1384e5d63e 100644 ---- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -178,14 +178,16 @@ public class ItemEntity extends Entity implements TraceableEntity { - this.applyGravity(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.noPhysics = false; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - this.noPhysics = !this.level().noCollision(this, this.getBoundingBox().deflate(1.0E-7D)); - if (this.noPhysics) { - this.moveTowardsClosestSpace(this.getX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.getZ()); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change; ActivationRange immunity - this.move(MoverType.SELF, this.getDeltaMovement()); -@@ -213,7 +215,7 @@ public class ItemEntity extends Entity implements TraceableEntity { - boolean flag = Mth.floor(this.xo) != Mth.floor(this.getX()) || Mth.floor(this.yo) != Mth.floor(this.getY()) || Mth.floor(this.zo) != Mth.floor(this.getZ()); - int i = flag ? 2 : 40; - -- if (this.tickCount % i == 0 && !this.level().isClientSide && this.isMergable()) { -+ if (this.tickCount % i == 0 && /*!this.level().isClientSide &&*/ this.isMergable()) { // Plazma - Remove persist 'isClientSide' flag - this.mergeWithNeighbours(); - } - -@@ -224,15 +226,15 @@ public class ItemEntity extends Entity implements TraceableEntity { - // CraftBukkit end */ - - this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - double d0 = this.getDeltaMovement().subtract(vec3d).lengthSqr(); - - if (d0 > 0.01D) { - this.hasImpulse = true; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - -- if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate -+ if (/*!this.level().isClientSide &&*/ this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - fire ItemDespawnEvent - if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { - this.age = 0; -@@ -257,7 +259,7 @@ public class ItemEntity extends Entity implements TraceableEntity { - } - // Paper end - remove anti tick skipping measures / wall time - copied from above - -- if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate -+ if (/*!this.level().isClientSide &&*/ this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - fire ItemDespawnEvent - if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { - this.age = 0; -@@ -496,87 +498,78 @@ public class ItemEntity extends Entity implements TraceableEntity { - - @Override - public void playerTouch(net.minecraft.world.entity.player.Player player) { -- if (!this.level().isClientSide) { -- ItemStack itemstack = this.getItem(); -- Item item = itemstack.getItem(); -- int i = itemstack.getCount(); -- -- // CraftBukkit start - fire PlayerPickupItemEvent -- int canHold = player.getInventory().canHold(itemstack); -- int remaining = i - canHold; -- boolean flyAtPlayer = false; // Paper -- -- // Paper start - PlayerAttemptPickupItemEvent -- if (this.pickupDelay <= 0) { -- PlayerAttemptPickupItemEvent attemptEvent = new PlayerAttemptPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -- this.level().getCraftServer().getPluginManager().callEvent(attemptEvent); -- -- flyAtPlayer = attemptEvent.getFlyAtPlayer(); -- if (attemptEvent.isCancelled()) { -- if (flyAtPlayer) { -- player.take(this, i); -- } -+ // Plazma start - Remove persist 'isClientSide' flag & Apply some optimizations -+ ItemStack itemstack = this.getItem(); -+ Item item = itemstack.getItem(); -+ int i = itemstack.getCount(); - -- return; -- } -- } -- // Paper end - PlayerAttemptPickupItemEvent -- -- if (this.pickupDelay <= 0 && canHold > 0) { -- itemstack.setCount(canHold); -- // Call legacy event -- PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -- playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); -- this.level().getCraftServer().getPluginManager().callEvent(playerEvent); -- flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper -- if (playerEvent.isCancelled()) { -- itemstack.setCount(i); // SPIGOT-5294 - restore count -- // Paper start -- if (flyAtPlayer) { -- player.take(this, i); -- } -- // Paper end -- return; -- } -+ // CraftBukkit start - fire PlayerPickupItemEvent -+ int canHold = player.getInventory().canHold(itemstack); -+ int remaining = i - canHold; -+ boolean flyAtPlayer = false; // Paper - -- // Call newer event afterwards -- EntityPickupItemEvent entityEvent = new EntityPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -- entityEvent.setCancelled(!entityEvent.getEntity().getCanPickupItems()); -- this.level().getCraftServer().getPluginManager().callEvent(entityEvent); -- if (entityEvent.isCancelled()) { -- itemstack.setCount(i); // SPIGOT-5294 - restore count -- return; -- } -+ // Paper start - PlayerAttemptPickupItemEvent -+ if (this.pickupDelay <= 0) { -+ PlayerAttemptPickupItemEvent attemptEvent = new PlayerAttemptPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -+ this.level().getCraftServer().getPluginManager().callEvent(attemptEvent); - -- // Update the ItemStack if it was changed in the event -- ItemStack current = this.getItem(); -- if (!itemstack.equals(current)) { -- itemstack = current; -- } else { -- itemstack.setCount(canHold + remaining); // = i -- } -+ flyAtPlayer = attemptEvent.getFlyAtPlayer(); -+ if (attemptEvent.isCancelled()) { -+ if (flyAtPlayer) player.take(this, i); - -- // Possibly < 0; fix here so we do not have to modify code below -- this.pickupDelay = 0; -- } else if (this.pickupDelay == 0) { -- // ensure that the code below isn't triggered if canHold says we can't pick the items up -- this.pickupDelay = -1; -+ return; - } -- // CraftBukkit end -+ } -+ // Paper end - PlayerAttemptPickupItemEvent -+ -+ if (this.pickupDelay <= 0 && canHold > 0) { -+ itemstack.setCount(canHold); -+ // Call legacy event -+ PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -+ playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); -+ this.level().getCraftServer().getPluginManager().callEvent(playerEvent); -+ flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper -+ if (playerEvent.isCancelled()) { -+ itemstack.setCount(i); // SPIGOT-5294 - restore count -+ if (flyAtPlayer) player.take(this, i); // Paper - -- if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) { -- if (flyAtPlayer) // Paper - PlayerPickupItemEvent -- player.take(this, i); -- if (itemstack.isEmpty()) { -- this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause -- itemstack.setCount(i); -- } -+ return; -+ } -+ -+ // Call newer event afterwards -+ EntityPickupItemEvent entityEvent = new EntityPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); -+ entityEvent.setCancelled(!entityEvent.getEntity().getCanPickupItems()); -+ this.level().getCraftServer().getPluginManager().callEvent(entityEvent); -+ if (entityEvent.isCancelled()) { -+ itemstack.setCount(i); // SPIGOT-5294 - restore count -+ return; -+ } -+ -+ // Update the ItemStack if it was changed in the event -+ ItemStack current = this.getItem(); -+ if (!itemstack.equals(current)) itemstack = current; -+ else itemstack.setCount(canHold + remaining); // = i -+ -+ // Possibly < 0; fix here so we do not have to modify code below -+ this.pickupDelay = 0; -+ } else if (this.pickupDelay == 0) { -+ // ensure that the code below isn't triggered if canHold says we can't pick the items up -+ this.pickupDelay = -1; -+ } -+ // CraftBukkit end -+ -+ if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) { -+ if (flyAtPlayer) player.take(this, i); // Paper - PlayerPickupItemEvent - -- player.awardStat(Stats.ITEM_PICKED_UP.get(item), i); -- player.onItemPickup(this); -+ if (itemstack.isEmpty()) { -+ this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause -+ itemstack.setCount(i); - } - -+ player.awardStat(Stats.ITEM_PICKED_UP.get(item), i); -+ player.onItemPickup(this); - } -+ // Plazma end - Remove persist 'isClientSide' flag & Apply some optimizations - } - - @Override -@@ -596,7 +589,7 @@ public class ItemEntity extends Entity implements TraceableEntity { - public Entity teleport(TeleportTransition teleportTarget) { - Entity entity = super.teleport(teleportTarget); - -- if (!this.level().isClientSide && entity instanceof ItemEntity entityitem) { -+ if (/*!this.level().isClientSide &&*/ entity instanceof ItemEntity entityitem) { // Plazma - Remove persist 'isClientSide' flag - entityitem.mergeWithNeighbours(); - } - -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 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 { - if (i <= 0) { - // CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event - // this.discard(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.explode(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause - // CraftBukkit end - } else { - this.updateInWaterStateAndDoFluidPushing(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - // 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 26b64d83b7466863b7340c3292494091e9fb89c1..2ff72241928a1d07be936cd764e7408d202f39e0 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -150,7 +150,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - } - - public void reassessWeaponGoal() { -- if (this.level() != null && !this.level().isClientSide) { -+ if (this.level() != null /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - this.goalSelector.removeGoal(this.meleeGoal); - this.goalSelector.removeGoal(this.bowGoal); - ItemStack itemstack = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)); -@@ -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 -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.reassessWeaponGoal(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/monster/Blaze.java b/src/main/java/net/minecraft/world/entity/monster/Blaze.java -index 000d18bdcc2d26b7cc175c4f72e32ac7a882f2a6..8ff77974b39cdbc49b73bc0ae02120d2ab59051f 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Blaze.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Blaze.java -@@ -137,6 +137,7 @@ public class Blaze extends Monster { - this.setDeltaMovement(this.getDeltaMovement().multiply(1.0, 0.6, 1.0)); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - if (this.random.nextInt(24) == 0 && !this.isSilent()) { - this.level() -@@ -156,6 +157,7 @@ public class Blaze extends Monster { - this.level().addParticle(ParticleTypes.LARGE_SMOKE, this.getRandomX(0.5), this.getRandomY(), this.getRandomZ(0.5), 0.0, 0.0, 0.0); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - super.aiStep(); - } -diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index b87a961c1f69f0cf51d8e1e462915234ee74d0a9..7a6c3eb850e463a64bfc23c7d3c46ddabeeb251d 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -361,7 +361,7 @@ public class Creeper extends Monster { - SoundEvent soundeffect = itemstack.is(Items.FIRE_CHARGE) ? SoundEvents.FIRECHARGE_USE : SoundEvents.FLINTANDSTEEL_USE; - - this.level().playSound(player, this.getX(), this.getY(), this.getZ(), soundeffect, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.entityIgniter = player; // CraftBukkit - this.ignite(); - if (itemstack.getMaxDamage() == 0) { // CraftBukkit - fix MC-264285: unbreakable flint and steels are completely consumed when igniting a creeper -@@ -369,7 +369,7 @@ public class Creeper extends Monster { - } else { - itemstack.hurtAndBreak(1, player, getSlotForHand(hand)); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 76db5a2d27ab435fdfd1e0ec0c77ef5012e128d4..902b4aff751a0f2a4fb8569eb2d88b7ceec7c40f 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -@@ -291,15 +291,15 @@ public class Drowned extends Zombie implements RangedAttackMob { - - @Override - public void updateSwimming() { -- if (!this.level().isClientSide) { -- if (this.isEffectiveAi() && this.isUnderWater() && this.wantsToSwim()) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag -+ if (/*this.isEffectiveAi() &&*/ this.isUnderWater() && this.wantsToSwim()) { // Plazma - Remove persist 'isClientSide' flag - this.navigation = this.waterNavigation; - this.setSwimming(true); - } else { - this.navigation = this.groundNavigation; - this.setSwimming(false); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 6ab8abd52836a2a06496652a134dafc21a456a9e..017c86be270ae395be84f6bc30c9288af6278fb7 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -227,6 +227,7 @@ public class EnderMan extends Monster implements NeutralMob { - - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void onSyncedDataUpdated(EntityDataAccessor data) { - if (EnderMan.DATA_CREEPY.equals(data) && this.hasBeenStaredAt() && this.level().isClientSide) { -@@ -235,6 +236,7 @@ public class EnderMan extends Monster implements NeutralMob { - - super.onSyncedDataUpdated(data); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public void addAdditionalSaveData(CompoundTag nbt) { -@@ -278,16 +280,18 @@ public class EnderMan extends Monster implements NeutralMob { - - @Override - public void aiStep() { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - for (int i = 0; i < 2; ++i) { - this.level().addParticle(ParticleTypes.PORTAL, this.getRandomX(0.5D), this.getRandomY() - 0.25D, this.getRandomZ(0.5D), (this.random.nextDouble() - 0.5D) * 2.0D, -this.random.nextDouble(), (this.random.nextDouble() - 0.5D) * 2.0D); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - this.jumping = false; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.updatePersistentAnger((ServerLevel) this.level(), true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - super.aiStep(); - } -@@ -312,7 +316,7 @@ public class EnderMan extends Monster implements NeutralMob { - } - - public boolean teleport() { -- if (!this.level().isClientSide() && this.isAlive()) { -+ if (/*!this.level().isClientSide() &&*/ this.isAlive()) { // Plazma - Remove persist 'isClientSide' flag - double d0 = this.getX() + (this.random.nextDouble() - 0.5D) * 64.0D; - double d1 = this.getY() + (double) (this.random.nextInt(64) - 32); - double d2 = this.getZ() + (this.random.nextDouble() - 0.5D) * 64.0D; -diff --git a/src/main/java/net/minecraft/world/entity/monster/Endermite.java b/src/main/java/net/minecraft/world/entity/monster/Endermite.java -index b5e957f101a1bd14501a043fb1b528de25cf2f75..fd292373f5f8bf6f5773d5eea1a7470e8eae4231 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Endermite.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Endermite.java -@@ -156,11 +156,13 @@ public class Endermite extends Monster { - @Override - public void aiStep() { - super.aiStep(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - for (int i = 0; i < 2; ++i) { - this.level().addParticle(ParticleTypes.PORTAL, this.getRandomX(0.5D), this.getRandomY(), this.getRandomZ(0.5D), (this.random.nextDouble() - 0.5D) * 2.0D, -this.random.nextDouble(), (this.random.nextDouble() - 0.5D) * 2.0D); - } - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - if (!this.isPersistenceRequired()) { - ++this.life; - } -@@ -168,7 +170,7 @@ public class Endermite extends Monster { - if (this.life >= 2400) { - this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/monster/Guardian.java b/src/main/java/net/minecraft/world/entity/monster/Guardian.java -index 929864ee4e5e6e9c87d10bb1bb06118cd94bd5d7..336d68dc9cb9c0658a9ec204f75dfe59c6c5fe6d 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Guardian.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Guardian.java -@@ -168,6 +168,7 @@ public class Guardian extends Monster { - public LivingEntity getActiveAttackTarget() { - if (!this.hasActiveAttackTarget()) { - return null; -+ /* // Plazma - Remove persist 'isClientSide' flag - } else if (this.level().isClientSide) { - if (this.clientSideCachedAttackTarget != null) { - return this.clientSideCachedAttackTarget; -@@ -181,6 +182,7 @@ public class Guardian extends Monster { - return null; - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } else { - return this.getTarget(); - } -@@ -229,6 +231,7 @@ public class Guardian extends Monster { - @Override - public void aiStep() { - if (this.isAlive()) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.clientSideTailAnimationO = this.clientSideTailAnimation; - Vec3 vec3d; -@@ -297,6 +300,7 @@ public class Guardian extends Monster { - } - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.isInWaterOrBubble()) { - this.setAirSupply(300); -diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -index 83b64a8091a85b9eb940af33e4d44bd4a906b248..f6097d496e8af416635dfae88a1b8d66b0a06796 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -@@ -127,6 +127,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { - return super.finalizeSpawn(world, difficulty, spawnReason, entityData); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void aiStep() { - super.aiStep(); -@@ -166,6 +167,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public SoundEvent getCelebrateSound() { -diff --git a/src/main/java/net/minecraft/world/entity/monster/MagmaCube.java b/src/main/java/net/minecraft/world/entity/monster/MagmaCube.java -index 2449a960493cbd99a22ce9b8d2fe852d1ec4b20d..3941468b65fb62fe0119dc69ecefb5c49722497c 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/MagmaCube.java -+++ b/src/main/java/net/minecraft/world/entity/monster/MagmaCube.java -@@ -142,7 +142,7 @@ public class MagmaCube extends Slime { - - @Override - protected boolean isDealsDamage() { -- return this.isEffectiveAi(); -+ return true; //this.isEffectiveAi(); // Plazma - Remove persist 'isClientSide' flag - } - - @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 860162797972263283737e8f30d8b784955206be..4b7a54af07ed7d76c23a57659b40bcfd779346c1 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -@@ -236,6 +236,7 @@ public class Phantom extends FlyingMob implements Enemy { - @Override - public void tick() { - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - float f = Mth.cos((float) (this.getUniqueFlapTickOffset() + this.tickCount) * 7.448451F * 0.017453292F + 3.1415927F); - float f1 = Mth.cos((float) (this.getUniqueFlapTickOffset() + this.tickCount + 1) * 7.448451F * 0.017453292F + 3.1415927F); -@@ -252,6 +253,7 @@ public class Phantom extends FlyingMob implements Enemy { - this.level().addParticle(ParticleTypes.MYCELIUM, this.getX() + (double) f3, this.getY() + (double) f5, this.getZ() + (double) f4, 0.0D, 0.0D, 0.0D); - this.level().addParticle(ParticleTypes.MYCELIUM, this.getX() - (double) f3, this.getY() + (double) f5, this.getZ() - (double) f4, 0.0D, 0.0D, 0.0D); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (level().purpurConfig.phantomFlamesOnSwoop && attackPhase == AttackPhase.SWOOP) shoot(); // Purpur - } -@@ -594,11 +596,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/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -index 78ac42c89cb768e0dfb17197a850a029937c145c..ecd71d8ef468f498a21d382f5f9b265cc436d977 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java -@@ -230,7 +230,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 0) { - --this.clientSideTeleportInterpolation; -@@ -245,6 +246,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 1 && this.isDeadOrDying()) { -+ if (/*!this.level().isClientSide &&*/ i > 1 && this.isDeadOrDying()) { // Plazma - Remove persist 'isClientSide' flag - float f = this.getDimensions(this.getPose()).width(); - float f1 = f / 2.0F; - int j = i / 2; -@@ -394,7 +394,7 @@ public class Slime extends Mob implements Enemy { - } - - protected boolean isDealsDamage() { -- return !this.isTiny() && this.isEffectiveAi(); -+ return !this.isTiny(); //&& this.isEffectiveAi(); // Plazma - Remove persist 'isClientSide' flag - } - - protected float getAttackDamage() { -diff --git a/src/main/java/net/minecraft/world/entity/monster/SpellcasterIllager.java b/src/main/java/net/minecraft/world/entity/monster/SpellcasterIllager.java -index 4b6b842d411e433237b376df378da96afe7e484c..985a770042c7b790413ee2e7b49c9888b9f78863 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/SpellcasterIllager.java -+++ b/src/main/java/net/minecraft/world/entity/monster/SpellcasterIllager.java -@@ -56,7 +56,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { - } - - public boolean isCastingSpell() { -- return this.level().isClientSide ? (Byte) this.entityData.get(SpellcasterIllager.DATA_SPELL_CASTING_ID) > 0 : this.spellCastingTickCount > 0; -+ return /*this.level().isClientSide ? (Byte) this.entityData.get(SpellcasterIllager.DATA_SPELL_CASTING_ID) > 0 :*/ this.spellCastingTickCount > 0; // Plazma - Remove persist 'isClientSide' flag - } - - public void setIsCastingSpell(SpellcasterIllager.IllagerSpell spell) { -@@ -65,7 +65,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { - } - - public SpellcasterIllager.IllagerSpell getCurrentSpell() { -- return !this.level().isClientSide ? this.currentSpell : SpellcasterIllager.IllagerSpell.byId((Byte) this.entityData.get(SpellcasterIllager.DATA_SPELL_CASTING_ID)); -+ return /*!this.level().isClientSide ?*/ this.currentSpell /*: SpellcasterIllager.IllagerSpell.byId((Byte) this.entityData.get(SpellcasterIllager.DATA_SPELL_CASTING_ID))*/; // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -77,6 +77,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { - - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void tick() { - super.tick(); -@@ -96,6 +97,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - protected int getSpellCastingTime() { - return this.spellCastingTickCount; -diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java -index 12bae0aa2f1cf3059b9c70f5377649cd9f8257aa..49fa54b2d46c916d8f43c78080ea04eb37e60717 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Spider.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java -@@ -119,9 +119,9 @@ public class Spider extends Monster { - @Override - public void tick() { - super.tick(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setClimbing(this.horizontalCollision && (this.level().paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !(ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.isCollidingWithBorder(this.level().getWorldBorder(), this.getBoundingBox().inflate(ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON)) && this.level().getWorldBorder().isInsideCloseToBorder(this, this.getBoundingBox())))); // Paper - Add config option for spider worldborder climbing (Inflate by +EPSILON as collision will just barely place us outside border) -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 df44d9fbb71ff252cd261fc8da6de14383e054de..1cee20de1b691a92bee625a877e0ee9769e30b0b 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Strider.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java -@@ -143,6 +143,7 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { - return world.getBlockState(blockposition_mutableblockposition).isAir(); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void onSyncedDataUpdated(EntityDataAccessor data) { - if (Strider.DATA_BOOST_TIME.equals(data) && this.level().isClientSide) { -@@ -151,6 +152,7 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { - - super.onSyncedDataUpdated(data); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { -@@ -505,9 +507,9 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { - // Purpur end - - if (!flag && this.isSaddled() && !this.isVehicle() && !player.isSecondaryUseActive()) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.startRiding(this); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 8e7f4cb8ede8721f05c6c35e9b4d08884254853e..8cbd9968b50d0afa2eb551e4f86a651a18032402 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Witch.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -147,7 +147,7 @@ public class Witch extends Raider implements RangedAttackMob { - - @Override - public void aiStep() { -- if (!this.level().isClientSide && this.isAlive()) { -+ if (/*!this.level().isClientSide &&*/ this.isAlive()) { // Plazma - Remove persist 'isClientSide' flag - this.healRaidersGoal.decrementCooldown(); - if (this.healRaidersGoal.getCooldown() <= 0) { - this.attackPlayersGoal.setCanAttack(true); -diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java -index 8aec50e7330d16bd3d0bc027c191fa1a4ce4552b..a933e33a1b30d53e90d10bea3dadf1f35ed94398 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java -@@ -295,7 +295,7 @@ public class Zoglin extends Monster implements HoglinBase { - @Override - public void setBaby(boolean baby) { - this.getEntityData().set(DATA_BABY_ID, baby); -- if (!this.level().isClientSide && baby) { -+ if (/*!this.level().isClientSide &&*/ baby) { // Plazma - Remove persist 'isClientSide' flag - this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(0.5); - } - } -@@ -331,11 +331,13 @@ public class Zoglin extends Monster implements HoglinBase { - - @Override - protected SoundEvent getAmbientSound() { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - return null; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - return this.brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET) ? SoundEvents.ZOGLIN_ANGRY : SoundEvents.ZOGLIN_AMBIENT; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 867d9ddce630482a7d3fadfe5aab213a0f912ca4..68a928e42df03f111cfc000945a6020e484e6e7f 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java -+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -253,7 +253,7 @@ public class Zombie extends Monster { - @Override - public void setBaby(boolean baby) { - this.getEntityData().set(Zombie.DATA_BABY_ID, baby); -- if (this.level() != null && !this.level().isClientSide) { -+ if (this.level() != null /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); - - attributemodifiable.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable -@@ -279,7 +279,7 @@ public class Zombie extends Monster { - - @Override - public void tick() { -- if (!this.level().isClientSide && this.isAlive() && !this.isNoAi()) { -+ if (/*!this.level().isClientSide &&*/ this.isAlive() && !this.isNoAi()) { // Plazma - Remove persist 'isClientSide' flag - if (this.isUnderWaterConverting()) { - --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 bba3562bf316878e7b8ba6a138889d9583a1b0f6..7e79aeb7e4a41152162977a426d53699beffc36f 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -211,7 +211,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - - @Override - public void tick() { -- if (!this.level().isClientSide && this.isAlive() && this.isConverting()) { -+ if (/*!this.level().isClientSide &&*/ this.isAlive() && this.isConverting()) { // Plazma - Remove persist 'isClientSide' flag - int i = this.getConversionProgress(); - // CraftBukkit start - Use wall time instead of ticks for villager conversion - int elapsedTicks = MinecraftServer.currentTick - this.lastTick; -@@ -235,9 +235,9 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - if (itemstack.is(Items.GOLDEN_APPLE)) { - if (this.hasEffect(MobEffects.WEAKNESS) && level().purpurConfig.zombieVillagerCureEnabled) { // Purpur - itemstack.consume(1, player); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur - Customizeable Zombie Villager curing times -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -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) { - if (this.level().isClientSide() && Breeze.DATA_POSE.equals(data)) { -@@ -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 1f37384368c26b4bdd69533887a8e9b8456f7096..cff47b1e136c07b0fa21efa76b7fd5675d0d0b02 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 -@@ -259,7 +259,7 @@ public class Creaking extends Monster { - --this.attackAnimationRemainingTicks; - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = (Boolean) this.entityData.get(Creaking.CAN_MOVE); - boolean flag1 = this.checkCanMove(); - -@@ -274,14 +274,14 @@ public class Creaking extends Monster { - } - - this.entityData.set(Creaking.CAN_MOVE, flag1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - super.aiStep(); - } - - @Override - public void tick() { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockposition = this.getHomePos(); - - if (blockposition != null) { -@@ -308,13 +308,15 @@ public class Creaking extends Monster { - this.setHealth(0.0F); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.setupAnimationStates(); - this.checkEyeBlink(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -322,7 +324,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 { -@@ -658,6 +660,7 @@ public class Creaking extends Monster { - super(creaking); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void clientTick() { - if (Creaking.this.canMove()) { -@@ -665,6 +668,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 e140d068b08d94c55945b30eab11adbface6fa09..5ff8c677d54a9538c07425ac1a6336e17be51760 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -377,7 +377,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { - - @Override - protected SoundEvent getAmbientSound() { -- return this.level().isClientSide ? null : (SoundEvent) HoglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - decompile error -+ return /*this.level().isClientSide ? null :*/ (SoundEvent) HoglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - decompile error // Plazma - Remove persist 'isClientSide' flag - } - - @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 e6cb1f067f9920252e0bba9a493365c23b12cea7..60dadde71ae0d32dfe04d7aad282b9f17cf05823 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 -@@ -318,14 +318,14 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento - @Override - public void setBaby(boolean baby) { - this.getEntityData().set(Piglin.DATA_BABY_ID, baby); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); - - attributemodifiable.removeModifier(Piglin.SPEED_MODIFIER_BABY.id()); - if (baby) { - attributemodifiable.addTransientModifier(Piglin.SPEED_MODIFIER_BABY); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -497,7 +497,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento - - @Override - protected SoundEvent getAmbientSound() { -- return this.level().isClientSide ? null : (SoundEvent) PiglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - Decompile error -+ return /*this.level().isClientSide ? null :*/ (SoundEvent) PiglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - Decompile error // Plazma - Remove persist 'isClientSide' flag - } - - @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 5313f4c1ca76b120c0eb6beddc993b562f79344e..771e1b5ecc1803079bbb9e4233c616cb3075470e 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 { - } - - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide()) { - if (this.tickCount % this.getHeartBeatDelay() == 0) { - this.heartAnimation = 10; -@@ -313,6 +314,7 @@ public class Warden extends Monster implements VibrationSystem { - this.clientDiggingParticles(this.diggingAnimationState); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - } - -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 94ba68e063e63f77f7951d482af7a3586ba4ffdf..05cda0b35bcaa56ef082777d3d42eb8b9b6b1393 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 - - @Override - public MerchantOffers getOffers() { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - throw new IllegalStateException("Cannot load Villager offers on the client"); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - if (this.offers == null) { - this.offers = new MerchantOffers(); - this.updateTrades(); - } - - return this.offers; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -175,7 +177,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa - - @Override - public void notifyTradeUpdated(ItemStack stack) { -- if (!this.level().isClientSide && this.ambientSoundTime > -this.getAmbientSoundInterval() + 20) { -+ if (/*!this.level().isClientSide &&*/ this.ambientSoundTime > -this.getAmbientSoundInterval() + 20) { // Plazma - Remove persist 'isClientSide' flag - this.ambientSoundTime = -this.getAmbientSoundInterval(); - this.makeSound(this.getTradeUpdatedSound(!stack.isEmpty())); - } -@@ -198,13 +200,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa - @Override - public void addAdditionalSaveData(CompoundTag nbt) { - super.addAdditionalSaveData(nbt); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - MerchantOffers merchantrecipelist = this.getOffers(); - - if (!merchantrecipelist.isEmpty()) { - nbt.put("Offers", (Tag) MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), merchantrecipelist).getOrThrow()); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.writeInventoryToTag(nbt, this.registryAccess()); - } -@@ -308,10 +310,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa - return this.getPosition(delta).add(vec3d.yRot(-f1)); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isClientSide() { - 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 6f691a7b7e7e335cc564577854ea404f9f5e81d7..e15d07f33db78872363f02cc5a631b7ab1255314 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/Villager.java -+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -328,13 +328,13 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - if (this.getUnhappyCounter() > 0) { - this.setUnhappyCounter(this.getUnhappyCounter() - 1); - } -- if (this.isEffectiveAi()) { -+ //if (this.isEffectiveAi()) { // Plazma - Remove persist 'isClientSide' flag - if (this.level().spigotConfig.tickInactiveVillagers) { - this.customServerAiStep(this.level().getMinecraftWorld()); - } else { - this.customServerAiStep(this.level().getMinecraftWorld(), true); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - maybeDecayGossip(); - // Paper end - super.inactiveTick(); -@@ -423,7 +423,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - this.setUnhappy(); - return tryRide(player, hand, InteractionResult.SUCCESS); // Purpur - Ridables - } else { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = this.getOffers().isEmpty(); - - if (hand == InteractionHand.MAIN_HAND) { -@@ -441,7 +441,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - if (level().purpurConfig.villagerRidable && itemstack.isEmpty()) return tryRide(player, hand); // Purpur - Ridables - if (this.level().purpurConfig.villagerAllowTrading) // Purpur - Add config for villager trading - this.startTrading(player); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -@@ -452,9 +452,9 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - - public void setUnhappy() { - this.setUnhappyCounter(40); -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - this.makeSound(SoundEvents.VILLAGER_NO); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -482,7 +482,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - } - - private void resetSpecialPrices() { -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - Iterator iterator = this.getOffers().iterator(); - - while (iterator.hasNext()) { -@@ -491,7 +491,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - merchantrecipe.resetSpecialPriceDiff(); - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index 2dc7afa79126b52be42fc986926d6a63f9994d12..ed1c58948716750b0b7da8187c56a9a144cf707f 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -166,7 +166,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill - player.awardStat(Stats.TALKED_TO_VILLAGER); - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (this.getOffers().isEmpty()) { - return tryRide(player, hand, InteractionResult.CONSUME); // Purpur - Ridables - } -@@ -175,7 +175,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill - this.setTradingPlayer(player); - this.openTradingScreen(player, this.getDisplayName(), 1); - } // Purpur - Add config for villager trading -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -@@ -308,9 +308,9 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill - @Override - public void aiStep() { - super.aiStep(); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.maybeDespawn(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 7893d257deef3c1bb0187c6a0b04659716b520f9..5a9e85c44fbb716dc1e8616645732cb8db947ee9 100644 ---- a/src/main/java/net/minecraft/world/entity/player/Player.java -+++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -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, /*!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; -@@ -306,7 +306,7 @@ public abstract class Player extends LivingEntity { - this.sleepCounter = 100; - } - -- if (!this.level().isClientSide && this.level().isDay()) { -+ if (/*!this.level().isClientSide &&*/ this.level().isDay()) { // Plazma - Remove persist 'isClientSide' flag - this.stopSleepInBed(false, true); - } - } else if (this.sleepCounter > 0) { -@@ -318,7 +318,7 @@ public abstract class Player extends LivingEntity { - - this.updateIsUnderwater(); - super.tick(); -- if (!this.level().isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) { -+ if (/*!this.level().isClientSide &&*/ this.containerMenu != null && !this.containerMenu.stillValid(this)) { // Plazma - Remove persist 'isClientSide' flag - this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason - this.containerMenu = this.inventoryMenu; - } -@@ -602,7 +602,7 @@ public abstract class Player extends LivingEntity { - - @Override - public void rideTick() { -- if (!this.level().isClientSide && this.wantsToStopRiding() && this.isPassenger()) { -+ if (/*!this.level().isClientSide &&*/ this.wantsToStopRiding() && this.isPassenger()) { // Plazma - Remove persist 'isClientSide' flag - this.stopRiding(); - // CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return - if (!this.isPassenger()) { -@@ -679,7 +679,7 @@ public abstract class Player extends LivingEntity { - - this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft()); - this.playShoulderEntityAmbientSound(this.getShoulderEntityRight()); -- if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { -+ if (/*!this.level().isClientSide &&*/ (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { // Plazma - Remove persist 'isClientSide' flag - if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Add option to make parrots stay - this.removeEntitiesOnShoulder(); - } -@@ -726,10 +726,10 @@ public abstract class Player extends LivingEntity { - this.autoSpinAttackTicks = riptideTicks; - this.autoSpinAttackDmg = riptideAttackDamage; - this.autoSpinAttackItemStack = stack; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.removeEntitiesOnShoulder(); - this.setLivingEntityFlag(4, true); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -814,9 +814,11 @@ public abstract class Player extends LivingEntity { - @Nullable - public ItemEntity drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) { - // CraftBukkit end -+ /* // Plazma - Remove persist 'isClientSide' flag - if (!itemstack.isEmpty() && this.level().isClientSide) { - this.swing(InteractionHand.MAIN_HAND); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - return null; - } -@@ -1062,9 +1064,9 @@ public abstract class Player extends LivingEntity { - @Override - protected void hurtCurrentlyUsedShield(float amount) { - if (this.useItem.is(Items.SHIELD)) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.awardStat(Stats.ITEM_USED.get(this.useItem.getItem())); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (amount >= 3.0F) { - int i = 1 + Mth.floor(amount); -@@ -1457,7 +1459,7 @@ public abstract class Player extends LivingEntity { - EnchantmentHelper.doPostAttackEffects(worldserver1, target, damagesource); - } - -- if (!this.level().isClientSide && !itemstack.isEmpty() && object instanceof LivingEntity) { -+ if (/*!this.level().isClientSide &&*/ !itemstack.isEmpty() && object instanceof LivingEntity) { // Plazma - Remove persist 'isClientSide' flag - if (flag5) { - itemstack.postHurtEnemy((LivingEntity) object, this); - } -@@ -1558,9 +1560,11 @@ public abstract class Player extends LivingEntity { - - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - public boolean isLocalPlayer() { - return false; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - public GameProfile getGameProfile() { - return this.gameProfile; -@@ -1898,14 +1902,14 @@ public abstract class Player extends LivingEntity { - public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) { - // CraftBukkit end - if (!this.abilities.invulnerable) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - EntityExhaustionEvent event = CraftEventFactory.callPlayerExhaustionEvent(this, reason, f); - if (!event.isCancelled()) { - this.foodData.addExhaustion(event.getExhaustion()); - } - // CraftBukkit end -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } -@@ -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 -- if (!this.level().isClientSide && !nbttagcompound.isEmpty()) { -+ if (/*!this.level().isClientSide &&*/ !nbttagcompound.isEmpty()) { // Plazma - Remove persist 'isClientSide' flag - 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 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 -@@ -231,13 +231,13 @@ public abstract class AbstractArrow extends Projectile { - } - - if (this.isInGround() && flag) { -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - if (this.lastState != iblockdata && this.shouldFall()) { - this.startFalling(); - } else { - this.tickDespawn(); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - ++this.inGroundTime; - if (this.isAlive()) { -@@ -501,7 +501,7 @@ public abstract class AbstractArrow extends Projectile { - if (entity instanceof LivingEntity) { - LivingEntity entityliving1 = (LivingEntity) entity; - -- if (!this.level().isClientSide && this.getPierceLevel() <= 0) { -+ if (/*!this.level().isClientSide &&*/ this.getPierceLevel() <= 0) { // Plazma - Remove persist 'isClientSide' flag - entityliving1.setArrowCount(entityliving1.getArrowCount() + 1); - } - -@@ -523,7 +523,7 @@ public abstract class AbstractArrow extends Projectile { - this.piercedAndKilledEntities.add(entityliving1); - } - -- if (!this.level().isClientSide && entity1 instanceof ServerPlayer) { -+ if (/*!this.level().isClientSide &&*/ entity1 instanceof ServerPlayer) { // Plazma - Remove persist 'isClientSide' flag - ServerPlayer entityplayer = (ServerPlayer) entity1; - - if (this.piercedAndKilledEntities != null) { -@@ -779,7 +779,7 @@ public abstract class AbstractArrow extends Projectile { - - @Override - public void playerTouch(Player player) { -- if (!this.level().isClientSide && (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) { -+ if (/*!this.level().isClientSide &&*/ (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - ItemStack itemstack = this.getPickupItem(); - if (this.pickup == Pickup.ALLOWED && !itemstack.isEmpty() && player.getInventory().canHold(itemstack) > 0) { -@@ -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 - } - - @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 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 -@@ -73,7 +73,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { - Entity entity = this.getOwner(); - - this.applyInertia(); -- if (!this.level().isClientSide && (entity != null && entity.isRemoved() || !this.level().hasChunkAt(this.blockPosition()))) { -+ if (/*!this.level().isClientSide &&*/ (entity != null && entity.isRemoved() || !this.level().hasChunkAt(this.blockPosition()))) { // Plazma - Remove persist 'isClientSide' flag - this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause - } else { - HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType()); -diff --git a/src/main/java/net/minecraft/world/entity/projectile/Arrow.java b/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -index 50ebe1bfad07f75a12431438cbdc5b909502b201..1efc431401de9678b5a949462cc4617974aba3d9 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -@@ -74,6 +74,7 @@ public class Arrow extends AbstractArrow { - @Override - public void tick() { - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - if (this.isInGround()) { - if (this.inGroundTime % 5 == 0) { -@@ -82,7 +83,7 @@ public class Arrow extends AbstractArrow { - } else { - this.makeParticle(2); - } -- } else if (this.isInGround() && this.inGroundTime != 0 && !this.getPotionContents().equals(PotionContents.EMPTY) && this.inGroundTime >= 600) { -+ } else*/ if (this.isInGround() && this.inGroundTime != 0 && !this.getPotionContents().equals(PotionContents.EMPTY) && this.inGroundTime >= 600) { // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 0); - this.setPickupItemStack(new ItemStack(Items.ARROW)); - } -diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -index c68ddccd5fbe27f6a62cedbdc2337f1b6e4d3273..2f08a7ee8ddfbe4eb70b163e57918c6edc91ff02 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -@@ -34,7 +34,7 @@ public class DragonFireball extends AbstractHurtingProjectile { - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); - if (hitResult.getType() != HitResult.Type.ENTITY || !this.ownedBy(((EntityHitResult) hitResult).getEntity())) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - List list = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D)); - AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ()); - Entity entity = this.getOwner(); -@@ -67,7 +67,7 @@ public class DragonFireball extends AbstractHurtingProjectile { - this.level().addFreshEntity(entityareaeffectcloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper - use correct spawn reason - } else entityareaeffectcloud.discard(null); // Paper - EnderDragon Events - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } -diff --git a/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java b/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java -index ccc72a2cf02a633655b95f961be310879d8f904f..d56fbb70b9060ce8e012d4aa18db382d755bf59f 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java -@@ -90,6 +90,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { - @Override - public void tick() { - super.tick(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - if (this.clientSideAttackStarted) { - --this.lifeTicks; -@@ -106,7 +107,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { - } - } - } -- } else if (--this.warmupDelayTicks < 0) { -+ } else*/ if (--this.warmupDelayTicks < 0) { // Plazma - Remove persist 'isClientSide' flag - if (this.warmupDelayTicks == -8) { - List list = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(0.2D, 0.0D, 0.2D)); - Iterator iterator = list.iterator(); -diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java -index fd1f5de7dc151dfd187d23e022b2c5435ed8accc..bb4d1b5d76769dfcbdfc49b49ca9d0973a720cc4 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java -@@ -129,7 +129,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { - - this.setXRot(Projectile.lerpRotation(this.xRotO, (float) (Mth.atan2(vec3d.y, d3) * 57.2957763671875D))); - this.setYRot(Projectile.lerpRotation(this.yRotO, (float) (Mth.atan2(vec3d.x, vec3d.z) * 57.2957763671875D))); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - double d4 = this.tx - d0; - double d5 = this.tz - d2; - float f = (float) Math.sqrt(d4 * d4 + d5 * d5); -@@ -146,7 +146,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { - - vec3d = new Vec3(Math.cos((double) f1) * d6, d7 + ((double) i - d7) * 0.014999999664723873D, Math.sin((double) f1) * d6); - this.setDeltaMovement(vec3d); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - float f2 = 0.25F; - -@@ -158,10 +158,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier { - this.level().addParticle(ParticleTypes.PORTAL, d0 - vec3d.x * 0.25D + this.random.nextDouble() * 0.6D - 0.3D, d1 - vec3d.y * 0.25D - 0.5D, d2 - vec3d.z * 0.25D + this.random.nextDouble() * 0.6D - 0.3D, vec3d.x, vec3d.y, vec3d.z); - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { - this.setPos(d0, d1, d2); - ++this.life; -- if (this.life > 80 && !this.level().isClientSide) { -+ if (this.life > 80 /*&& !this.level().isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - this.playSound(SoundEvents.ENDER_EYE_DEATH, 1.0F, 1.0F); - this.discard(this.surviveAfterDeath ? EntityRemoveEvent.Cause.DROP : EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause - if (this.surviveAfterDeath) { -@@ -170,9 +170,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { - this.level().levelEvent(2003, this.blockPosition(), 0); - } - } -+ /* // Plazma - Remove persist 'isClientSide' flag - } else { - this.setPosRaw(d0, d1, d2); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index 8a4e7e1c0c4919d2ee34121c14f9665b9ad95273..f07ad352ea991752625a5c6bdf6ae9cccaa83ddf 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -@@ -188,9 +188,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { - } - - ++this.life; -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide && this.life % 2 < 2) { - this.level().addParticle(ParticleTypes.FIREWORK, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - if (this.life > this.lifetime) { - Level world = this.level(); -@@ -309,11 +311,13 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { - - @Override - public void handleEntityEvent(byte status) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (status == 17 && this.level().isClientSide) { - Vec3 vec3d = this.getDeltaMovement(); - - this.level().createFireworks(this.getX(), this.getY(), this.getZ(), vec3d.x, vec3d.y, vec3d.z, this.getExplosions()); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - if (entityhuman == null) { - this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause -- } else if (this.level().isClientSide || !this.shouldStopFishing(entityhuman)) { -+ } else if (/*this.level().isClientSide ||*/ !this.shouldStopFishing(entityhuman)) { // Plazma - Remove persist 'isClientSide' flag - if (this.onGround()) { - ++this.life; - if (this.life >= 1200) { -@@ -245,9 +245,9 @@ public class FishingHook extends Projectile { - this.setDeltaMovement(this.getDeltaMovement().add(0.0D, -0.1D * (double) this.syncronizedRandom.nextFloat() * (double) this.syncronizedRandom.nextFloat(), 0.0D)); - } - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.catchingFish(blockposition); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - this.outOfWaterTime = Math.min(10, this.outOfWaterTime + 1); - } -@@ -300,9 +300,9 @@ public class FishingHook extends Projectile { - @Override - protected void onHitEntity(EntityHitResult entityHitResult) { - super.onHitEntity(entityHitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.setHookedEntity(entityHitResult.getEntity()); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -507,7 +507,7 @@ public class FishingHook extends Projectile { - // Paper end - Add hand parameter to PlayerFishEvent - net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner(); - -- if (!this.level().isClientSide && entityhuman != null && !this.shouldStopFishing(entityhuman)) { -+ if (/*!this.level().isClientSide &&*/ entityhuman != null && !this.shouldStopFishing(entityhuman)) { // Plazma - Remove persist 'isClientSide' flag - int i = 0; - - if (this.hookedIn != null) { -@@ -603,6 +603,7 @@ public class FishingHook extends Projectile { - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void handleEntityEvent(byte status) { - if (status == 31 && this.level().isClientSide && this.hookedIn instanceof net.minecraft.world.entity.player.Player && ((net.minecraft.world.entity.player.Player) this.hookedIn).isLocalPlayer()) { -@@ -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 f8ff53488d886bfd67ca3bfe4431b42010052d87..2bf13425b86dfc75fdd46050583b570a490d7251 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java -@@ -91,9 +91,9 @@ public class LlamaSpit extends Projectile { - @Override - protected void onHitBlock(BlockHitResult blockHitResult) { - super.onHitBlock(blockHitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 51160e98090c031f2d6394c824a5b1d6c0fbb7f6..cac4bc16aac73486d7e8a0538ddcd0c2ed097415 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 { - - public boolean deflect(ProjectileDeflection deflection, @Nullable Entity deflector, @Nullable Entity owner, boolean fromAttack) { - deflection.deflect(this, deflector, this.random); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - Fix PickupStatus getting reset - if (this instanceof AbstractArrow arrow) { - arrow.setOwner(owner, false); -@@ -392,7 +392,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { - } - // Paper end - Fix PickupStatus getting reset - this.onDeflection(deflector, fromAttack); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return true; - } -diff --git a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -index 347b1cab11529cb5399e607626c84bc985d5c513..f65bd1693d3395357da07bceaf1e2480ad3db9f8 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -@@ -226,7 +226,7 @@ public class ShulkerBullet extends Projectile { - HitResult movingobjectposition = null; - Vec3 vec3d; - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (this.finalTarget == null && this.targetId != null) { - this.finalTarget = ((ServerLevel) this.level()).getEntity(this.targetId); - if (this.finalTarget == null) { -@@ -245,7 +245,7 @@ public class ShulkerBullet extends Projectile { - } - - movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - vec3d = this.getDeltaMovement(); - this.setPos(this.position().add(vec3d)); -@@ -259,9 +259,10 @@ public class ShulkerBullet extends Projectile { - } - - ProjectileUtil.rotateTowardsMovement(this, 0.5F); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.level().addParticle(ParticleTypes.END_ROD, this.getX() - vec3d.x, this.getY() - vec3d.y + 0.15D, this.getZ() - vec3d.z, 0.0D, 0.0D, 0.0D); -- } else if (this.finalTarget != null && !this.finalTarget.isRemoved()) { -+ } else*/ if (this.finalTarget != null && !this.finalTarget.isRemoved()) { // Plazma - Remove persist 'isClientSide' flag - if (this.flightSteps > 0) { - --this.flightSteps; - if (this.flightSteps == 0) { -diff --git a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java -index f1786d17ce8ffd221674c887be01c7907f36f129..9bbfb659cf14110766956bb4ed1874b9966bbec9 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java -@@ -90,9 +90,9 @@ public class SmallFireball extends Fireball { - @Override - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } -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 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 { - protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult) { - super.onHitBlock(blockHitResult); - -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - net.minecraft.core.BlockPos blockposition = blockHitResult.getBlockPos(); - net.minecraft.core.BlockPos blockposition1 = blockposition.relative(blockHitResult.getDirection()); - -@@ -89,17 +89,17 @@ public class Snowball extends ThrowableItemProjectile { - this.level().setBlockAndUpdate(blockposition, iblockdata.setValue(net.minecraft.world.level.block.CampfireBlock.LIT, false)); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - // Purpur end - - @Override - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 3); - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - } -diff --git a/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java b/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -index 85b3cdaaa1a90ad4e712955d3c8bfe3f7758b6a9..969667fb486befd1dedac9b89db95a854fee85ac 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -@@ -27,6 +27,7 @@ public class SpectralArrow extends AbstractArrow { - super(EntityType.SPECTRAL_ARROW, x, y, z, world, stack, shotFrom); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public void tick() { - super.tick(); -@@ -35,6 +36,7 @@ public class SpectralArrow extends AbstractArrow { - } - - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - protected void doPostHurtEffects(LivingEntity target) { -diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -index 155c2bbd35adacb7c3668fbe81a7c454e5102c8b..ad30bae96d147e0d2aa4f3ae5469fbf74e3010af 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -@@ -57,7 +57,7 @@ public class ThrownEgg extends ThrowableItemProjectile { - @Override - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - boolean hatching = this.random.nextInt(8) == 0; - if (true) { -@@ -117,7 +117,7 @@ public class ThrownEgg extends ThrowableItemProjectile { - - this.level().broadcastEntityEvent(this, (byte) 3); - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index 9d79b193fe2a737a20d1709548b2cd6c454ff27b..15662c7161e8fe9b4a4a88d75c15908140014a33 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -@@ -78,7 +78,7 @@ public class ThrownPotion extends ThrowableItemProjectile { - @Override - protected void onHitBlock(BlockHitResult blockHitResult) { - super.onHitBlock(blockHitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ItemStack itemstack = this.getItem(); - Direction enumdirection = blockHitResult.getDirection(); - BlockPos blockposition = blockHitResult.getBlockPos(); -@@ -97,7 +97,7 @@ public class ThrownPotion extends ThrowableItemProjectile { - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -index eeb91f7e744d20c1a05212308a23102a347b9c19..2a474abb8c99e18fd80c92d8a96820d6b0d33bbd 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -@@ -100,7 +100,7 @@ public class WitherSkull extends AbstractHurtingProjectile { - @Override - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - // this.level().explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, World.a.MOB); - ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), this.level().purpurConfig.witherExplosionRadius, false); // Purpur -@@ -111,7 +111,7 @@ public class WitherSkull extends AbstractHurtingProjectile { - } - // CraftBukkit end - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 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 - @Override - protected void onHitBlock(BlockHitResult blockHitResult) { - super.onHitBlock(blockHitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - Vec3i baseblockposition = blockHitResult.getDirection().getUnitVec3i(); - Vec3 vec3d = Vec3.atLowerCornerOf(baseblockposition).multiply(0.25D, 0.25D, 0.25D); - Vec3 vec3d1 = blockHitResult.getLocation().add(vec3d); - - this.explode(vec3d1); - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - - @Override - protected void onHit(HitResult hitResult) { - super.onHit(hitResult); -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -156,7 +156,7 @@ public abstract class AbstractWindCharge extends AbstractHurtingProjectile imple - - @Override - public void tick() { -- if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) { -+ if (/*!this.level().isClientSide &&*/ this.getBlockY() > this.level().getMaxY() + 30) { // Plazma - Remove persist 'isClientSide' flag - this.explode(this.position()); - 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 1a4fb057025689a22b3dd05f531f0d8639d7e47b..0c485282c3653fb9fb57ca498557675d895f0750 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 { - - @Override - public void onAboveBubbleCol(boolean drag) { -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.isAboveBubbleColumn = true; - this.bubbleColumnDirectionIsDown = drag; - if (this.getBubbleTime() == 0) { - this.setBubbleTime(60); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - this.level().addParticle(ParticleTypes.SPLASH, this.getX() + (double) this.random.nextFloat(), this.getY() + 0.7D, this.getZ() + (double) this.random.nextFloat(), 0.0D, 0.0D, 0.0D); - if (this.random.nextInt(20) == 0) { -@@ -295,7 +295,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - ++this.outOfControlTicks; - } - -- if (!this.level().isClientSide && this.outOfControlTicks >= 60.0F) { -+ if (/*!this.level().isClientSide &&*/ this.outOfControlTicks >= 60.0F) { // Plazma - Remove persist 'isClientSide' flag - this.ejectPassengers(); - } - -@@ -315,10 +315,12 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - } - - this.floatBoat(); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - this.controlBoat(); - this.level().sendPacketToServer(new ServerboundPaddleBoatPacket(this.getPaddleState(0), this.getPaddleState(1))); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - this.move(MoverType.SELF, this.getDeltaMovement()); - } else { -@@ -367,7 +369,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - List list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, -0.009999999776482582D, 0.20000000298023224D), EntitySelector.pushableBy(this)); - - if (!list.isEmpty()) { -- boolean flag = !this.level().isClientSide && !(this.getControllingPassenger() instanceof Player); -+ boolean flag = /*!this.level().isClientSide &&*/ !(this.getControllingPassenger() instanceof Player); // Plazma - Remove persist 'isClientSide' flag - Iterator iterator = list.iterator(); - - while (iterator.hasNext()) { -@@ -388,6 +390,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - private void tickBubbleColumn() { - int i; - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide) { - i = this.getBubbleTime(); - if (i > 0) { -@@ -400,6 +403,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - this.bubbleAngleO = this.bubbleAngle; - this.bubbleAngle = 10.0F * (float) Math.sin((double) (0.5F * (float) this.level().getGameTime())) * this.bubbleMultiplier; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - if (!this.isAboveBubbleColumn) { - this.setBubbleTime(0); - } -@@ -426,7 +430,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - - this.isAboveBubbleColumn = false; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -839,7 +843,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - public InteractionResult interact(Player player, InteractionHand hand) { - InteractionResult enuminteractionresult = super.interact(player, hand); - -- return (InteractionResult) (enuminteractionresult != InteractionResult.PASS ? enuminteractionresult : (!player.isSecondaryUseActive() && this.outOfControlTicks < 60.0F && (this.level().isClientSide || player.startRiding(this)) ? InteractionResult.SUCCESS : InteractionResult.PASS)); -+ return (InteractionResult) (enuminteractionresult != InteractionResult.PASS ? enuminteractionresult : (!player.isSecondaryUseActive() && this.outOfControlTicks < 60.0F && (/*this.level().isClientSide ||*/ player.startRiding(this)) ? InteractionResult.SUCCESS : InteractionResult.PASS)); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -851,7 +855,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { - @Override - public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) { - // 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(); - } - -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -index f888f1dd2e3c228b0a370fe920b63d547bbba571..6ab21ca26499e7d98da87f7dfefd385239caf996 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -@@ -86,7 +86,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto - @Override - public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) { - // CraftBukkit end -- if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) { -+ if (/*!this.level().isClientSide &&*/ entity_removalreason.shouldDestroy()) { // Plazma - Remove persist 'isClientSide' flag - Containers.dropContents(this.level(), (Entity) this, (Container) this); - } - -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index d0c93f87795d7162bbfb3fdadadb6ae1c5fdaeeb..f24073c1f00f93c73890e26380b5cb796d442ecd 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -649,51 +649,44 @@ public abstract class AbstractMinecart extends VehicleEntity { - - @Override - public void push(Entity entity) { -- if (!this.level().isClientSide) { -- if (!entity.noPhysics && !this.noPhysics) { -- if (!this.level().paperConfig().collisions.allowVehicleCollisions && this.level().paperConfig().collisions.onlyPlayersCollide && !(entity instanceof Player)) return; // Paper - Collision option for requiring a player participant -- if (!this.hasPassenger(entity)) { -- // CraftBukkit start -- VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity()); -- this.level().getCraftServer().getPluginManager().callEvent(collisionEvent); -- -- if (collisionEvent.isCancelled()) { -- return; -- } -- // CraftBukkit end -- double d0 = entity.getX() - this.getX(); -- double d1 = entity.getZ() - this.getZ(); -- double d2 = d0 * d0 + d1 * d1; -- -- if (d2 >= 9.999999747378752E-5D) { -- d2 = Math.sqrt(d2); -- d0 /= d2; -- d1 /= d2; -- double d3 = 1.0D / d2; -- -- if (d3 > 1.0D) { -- d3 = 1.0D; -- } -+ // Plazma start - Remove persist 'isClientSide' flag -+ if (entity.noPhysics || this.noPhysics) return; -+ if (!this.level().paperConfig().collisions.allowVehicleCollisions && this.level().paperConfig().collisions.onlyPlayersCollide && !(entity instanceof Player)) return; // Paper - Collision option for requiring a player participant -+ if (!this.hasPassenger(entity)) return; - -- d0 *= d3; -- d1 *= d3; -- d0 *= 0.10000000149011612D; -- d1 *= 0.10000000149011612D; -- d0 *= 0.5D; -- d1 *= 0.5D; -- if (entity instanceof AbstractMinecart) { -- AbstractMinecart entityminecartabstract = (AbstractMinecart) entity; -- -- this.pushOtherMinecart(entityminecartabstract, d0, d1); -- } else { -- this.push(-d0, 0.0D, -d1); -- entity.push(d0 / 4.0D, 0.0D, d1 / 4.0D); -- } -- } -+ // CraftBukkit start -+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity()); -+ this.level().getCraftServer().getPluginManager().callEvent(collisionEvent); -+ if (collisionEvent.isCancelled()) return; -+ // CraftBukkit end - -- } -- } -+ double dX = entity.getX() - this.getX(); -+ double dZ = entity.getZ() - this.getZ(); -+ double dL = dX * dX + dZ * dZ; // deltaLength -+ if (dL < 9.999999747378752E-5D) return; -+ -+ dL = Math.sqrt(dL); -+ dX /= dL; -+ dZ /= dL; -+ -+ double dLp = 1.0D / dL; // deltaLength%p -+ if (dLp > 1.0D) dLp = 1.0D; -+ -+ dX *= dLp; -+ dZ *= dLp; -+ dX *= 0.10000000149011612D; -+ dZ *= 0.10000000149011612D; -+ dX *= 0.5D; -+ dZ *= 0.5D; -+ -+ if (entity instanceof AbstractMinecart entityminecartabstract) { -+ this.pushOtherMinecart(entityminecartabstract, dX, dZ); -+ return; - } -+ -+ this.push(-dX, 0.0D, -dZ); -+ entity.push(dX / 4.0D, 0.0D, dZ / 4.0D); -+ // Plazma end - Remove persist 'isClientSide' flag - } - - private void pushOtherMinecart(AbstractMinecart entity, double xDiff, double zDiff) { -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java -index d528e8e4aea266c495377365f01e314001eb1970..fb1c8f1133809ce3f25b50da889f3539ebc0bdaa 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java -@@ -138,7 +138,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme - @Override - public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) { - // CraftBukkit end -- if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) { -+ if (/*!this.level().isClientSide &&*/ entity_removalreason.shouldDestroy()) { // Plazma - Remove persist 'isClientSide' flag - Containers.dropContents(this.level(), (Entity) this, (Container) this); - } - -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Minecart.java b/src/main/java/net/minecraft/world/entity/vehicle/Minecart.java -index f7b7b63d7a61503590191e4edae3926b591549be..a43f8386e9178c7deeb3c8c2b9f39ac6448f6c3a 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/Minecart.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/Minecart.java -@@ -22,13 +22,15 @@ public class Minecart extends AbstractMinecart { - - @Override - public InteractionResult interact(Player player, InteractionHand hand) { -- if (!player.isSecondaryUseActive() && !this.isVehicle() && (this.level().isClientSide || player.startRiding(this))) { -+ if (!player.isSecondaryUseActive() && !this.isVehicle() && (/*this.level().isClientSide ||*/ player.startRiding(this))) { // Plazma - Remove persist 'isClientSide' flag - this.playerRotationOffset = this.rotationOffset; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - return (InteractionResult)(player.startRiding(this) ? InteractionResult.CONSUME : InteractionResult.PASS); -+ /* // Plazma - Remove persist 'isClientSide' flag - } else { - return InteractionResult.SUCCESS; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } else { - return InteractionResult.PASS; - } -@@ -71,19 +73,23 @@ public class Minecart extends AbstractMinecart { - Vec3 vec3 = this.position(); - super.tick(); - double e = ((double)this.getYRot() - d) % 360.0; -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide && vec3.distanceTo(this.position()) > 0.01) { - this.rotationOffset += (float)e; - this.rotationOffset %= 360.0F; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - @Override - protected void positionRider(Entity passenger, Entity.MoveFunction positionUpdater) { - super.positionRider(passenger, positionUpdater); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (this.level().isClientSide && passenger instanceof Player player && player.shouldRotateWithMinecart() && useExperimentalMovement(this.level())) { - float f = (float)Mth.rotLerp(0.5, (double)this.playerRotationOffset, (double)this.rotationOffset); - player.setYRot(player.getYRot() - (f - this.playerRotationOffset)); - this.playerRotationOffset = f; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartFurnace.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartFurnace.java -index 38c7cb9a4112b7bb98942aa05533f54b3a0827c4..0ef2244e291ee2683c0ae76ad5622c8a699cd714 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartFurnace.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartFurnace.java -@@ -46,7 +46,7 @@ public class MinecartFurnace extends AbstractMinecart { - @Override - public void tick() { - super.tick(); -- if (!this.level().isClientSide()) { -+ //if (!this.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - if (this.fuel > 0) { - this.fuel--; - } -@@ -56,7 +56,7 @@ public class MinecartFurnace extends AbstractMinecart { - } - - this.setHasFuel(this.fuel > 0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (this.hasFuel() && this.random.nextInt(4) == 0) { - this.level().addParticle(ParticleTypes.LARGE_SMOKE, this.getX(), this.getY() + 0.8, this.getZ(), 0.0, 0.0, 0.0); -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java -index d81a6874e8b25f098df619f84c359e146c7f64de..10bf3173b970f02029e680955b622104c1ae1c0f 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java -@@ -93,7 +93,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper - } - - private void tryConsumeItems() { -- if (!this.level().isClientSide && this.isAlive() && this.isEnabled() && !this.consumedItemThisFrame && this.suckInItems()) { -+ if (/*!this.level().isClientSide &&*/ this.isAlive() && this.isEnabled() && !this.consumedItemThisFrame && this.suckInItems()) { // Plazma - Remove persist 'isClientSide' flag - 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 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 -@@ -173,12 +173,12 @@ public class MinecartTNT extends AbstractMinecart { - - public void primeFuse() { - this.fuse = 80; -- if (!this.level().isClientSide) { -+ //if (!this.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.level().broadcastEntityEvent(this, (byte) 10); - if (!this.isSilent()) { - this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -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 { - @Override - public void removed(Player player) { - super.removed(player); -- if (!player.level().isClientSide) { -+ //if (!player.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ItemStack itemstack = this.paymentSlot.remove(this.paymentSlot.getMaxStackSize()); - - if (!itemstack.isEmpty()) { - player.drop(itemstack, false); - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/inventory/InventoryMenu.java b/src/main/java/net/minecraft/world/inventory/InventoryMenu.java -index 8f2de12971787f54917b1c4455394d83cad0250c..1c96e59b73385144d61ec923ca2be55245125ef6 100644 ---- a/src/main/java/net/minecraft/world/inventory/InventoryMenu.java -+++ b/src/main/java/net/minecraft/world/inventory/InventoryMenu.java -@@ -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, /*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); -@@ -96,9 +96,9 @@ public class InventoryMenu extends AbstractCraftingMenu { - public void removed(Player player) { - super.removed(player); - this.resultSlots.clearContent(); -- if (!player.level().isClientSide) { -+ //if (!player.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.clearContainer(player, this.craftSlots); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java -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 { - } - - private void playTradeSound() { -- if (!this.trader.isClientSide() && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035 -+ if (/*!this.trader.isClientSide() &&*/ this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035 // Plazma - Remove persist 'isClientSide' flag - Entity entity = (Entity) this.trader; - - entity.level().playLocalSound(entity.getX(), entity.getY(), entity.getZ(), this.trader.getNotifyTradeSound(), SoundSource.NEUTRAL, 1.0F, 1.0F, false); -@@ -186,7 +186,7 @@ public class MerchantMenu extends AbstractContainerMenu { - public void removed(Player player) { - super.removed(player); - this.trader.setTradingPlayer((Player) null); -- if (!this.trader.isClientSide()) { -+ //if (!this.trader.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - if (player.isAlive() && (!(player instanceof ServerPlayer) || !((ServerPlayer) player).hasDisconnected())) { - if (player instanceof ServerPlayer) { - player.getInventory().placeItemBackInInventory(this.tradeContainer.removeItemNoUpdate(0)); -@@ -205,7 +205,7 @@ public class MerchantMenu extends AbstractContainerMenu { - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 3d7a09c81b10f7a34d55670b7f2cc50b80550380..89d121a0c7497fd130bc84b37fcc829d46a86a95 100644 ---- a/src/main/java/net/minecraft/world/item/BlockItem.java -+++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -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 -+++ b/src/main/java/net/minecraft/world/item/BoatItem.java -@@ -79,7 +79,7 @@ public class BoatItem extends Item { - if (!world.noCollision(abstractboat, abstractboat.getBoundingBox())) { - return InteractionResult.FAIL; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(world, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), user, abstractboat, hand).isCancelled()) { - return InteractionResult.FAIL; -@@ -91,7 +91,7 @@ public class BoatItem extends Item { - // CraftBukkit end - world.gameEvent((Entity) user, (Holder) GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation()); - itemstack.consume(1, user); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - user.awardStat(Stats.ITEM_USED.get(this)); - return InteractionResult.SUCCESS; -diff --git a/src/main/java/net/minecraft/world/item/BoneMealItem.java b/src/main/java/net/minecraft/world/item/BoneMealItem.java -index c7d4a09c11f933494ab047921660451c6c1c7280..69125b16efeee7554ca48fd28b97aca5a98d62fe 100644 ---- a/src/main/java/net/minecraft/world/item/BoneMealItem.java -+++ b/src/main/java/net/minecraft/world/item/BoneMealItem.java -@@ -46,10 +46,10 @@ public class BoneMealItem extends Item { - BlockPos blockposition1 = blockposition.relative(itemactioncontext.getClickedFace()); - - if (BoneMealItem.growCrop(itemactioncontext.getItemInHand(), world, blockposition)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 - world.levelEvent(1505, blockposition, 15); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -@@ -57,10 +57,10 @@ public class BoneMealItem extends Item { - boolean flag = iblockdata.isFaceSturdy(world, blockposition, itemactioncontext.getClickedFace()); - - if (flag && BoneMealItem.growWaterPlant(itemactioncontext.getItemInHand(), world, blockposition1, itemactioncontext.getClickedFace())) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 - world.levelEvent(1505, blockposition1, 15); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 b9190acbcb256a3072f0a5f1c4c731f1222b459f..d4306837b6e5ce215975777d7720cf57312e2108 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 { - world.gameEvent((Entity) user, (Holder) GameEvent.FLUID_PICKUP, blockposition); - ItemStack itemstack2 = ItemUtils.createFilledResult(itemstack, user, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit - -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) user, itemstack1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS.heldItemTransformedTo(itemstack2); - } -@@ -218,7 +218,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { - } - } - -- if (!world.isClientSide && flag && !iblockdata.liquid()) { -+ if (/*!world.isClientSide &&*/ flag && !iblockdata.liquid()) { // Plazma - Remove persist 'isClientSide' flag - world.destroyBlock(blockposition, true); - } - -diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java -index cac4de9877b91bd805a5a8f4b84d27449fc5001f..f8946704838d96ad522182d2b9f41ac8bfe92ac4 100644 ---- a/src/main/java/net/minecraft/world/item/CrossbowItem.java -+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java -@@ -223,7 +223,7 @@ public class CrossbowItem extends ProjectileWeaponItem { - - @Override - public void onUseTick(Level world, LivingEntity user, ItemStack stack, int remainingUseTicks) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack); - float f = (float)(stack.getUseDuration(user) - remainingUseTicks) / (float)getChargeDuration(stack, user); - if (f < 0.2F) { -@@ -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)); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/item/DebugStickItem.java b/src/main/java/net/minecraft/world/item/DebugStickItem.java -index 97fc76c9b93e61445fe73390d088a6e512b2cb47..d4245a0103fcb89895c9e355e34ea966f0221df9 100644 ---- a/src/main/java/net/minecraft/world/item/DebugStickItem.java -+++ b/src/main/java/net/minecraft/world/item/DebugStickItem.java -@@ -29,9 +29,9 @@ public class DebugStickItem extends Item { - - @Override - public boolean canAttackBlock(BlockState state, Level world, BlockPos pos, Player miner) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.handleInteraction(miner, state, world, pos, false, miner.getItemInHand(InteractionHand.MAIN_HAND)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return false; - } -@@ -41,7 +41,7 @@ public class DebugStickItem extends Item { - Player entityhuman = context.getPlayer(); - Level world = context.getLevel(); - -- if (!world.isClientSide && entityhuman != null) { -+ if (/*!world.isClientSide &&*/ entityhuman != null) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockposition = context.getClickedPos(); - - if (!this.handleInteraction(entityhuman, world.getBlockState(blockposition), world, blockposition, true, context.getItemInHand())) { -diff --git a/src/main/java/net/minecraft/world/item/DyeItem.java b/src/main/java/net/minecraft/world/item/DyeItem.java -index a3e82a50b0cfd02d2b8e27074e1f97557bb1c9bb..6fb374632d9b90df013fe07fafcc79c96e29adda 100644 ---- a/src/main/java/net/minecraft/world/item/DyeItem.java -+++ b/src/main/java/net/minecraft/world/item/DyeItem.java -@@ -30,7 +30,7 @@ public class DyeItem extends Item implements SignApplicator { - if (entity instanceof Sheep entitysheep) { - if (entitysheep.isAlive() && !entitysheep.isSheared() && entitysheep.getColor() != this.dyeColor) { - entitysheep.level().playSound(user, (Entity) entitysheep, SoundEvents.DYE_USE, SoundSource.PLAYERS, 1.0F, 1.0F); -- if (!user.level().isClientSide) { -+ //if (!user.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - byte bColor = (byte) this.dyeColor.getId(); - SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor), (org.bukkit.entity.Player) user.getBukkitEntity()); -@@ -43,7 +43,7 @@ public class DyeItem extends Item implements SignApplicator { - entitysheep.setColor(DyeColor.byId((byte) event.getColor().getWoolData())); - // CraftBukkit end - stack.shrink(1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/item/EmptyMapItem.java b/src/main/java/net/minecraft/world/item/EmptyMapItem.java -index 588b6c94bb9a3372e1e5e32e177379dcc7709a84..ad95332084072c1c932ad1dd077346d9c4830d7b 100644 ---- a/src/main/java/net/minecraft/world/item/EmptyMapItem.java -+++ b/src/main/java/net/minecraft/world/item/EmptyMapItem.java -@@ -15,9 +15,11 @@ public class EmptyMapItem extends Item { - @Override - public InteractionResult use(Level world, Player user, InteractionHand hand) { - ItemStack itemStack = user.getItemInHand(hand); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.SUCCESS; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - itemStack.consume(1, user); - user.awardStat(Stats.ITEM_USED.get(this)); - user.level().playSound(null, user, SoundEvents.UI_CARTOGRAPHY_TABLE_TAKE_RESULT, user.getSoundSource(), 1.0F, 1.0F); -@@ -31,6 +33,6 @@ public class EmptyMapItem extends Item { - - return InteractionResult.SUCCESS; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -index c71a426c47e0ebc57ecb8c9c1d171737a084ccab..05264c4f0d2f13758d5726ab8b145d20fed4187c 100644 ---- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java -+++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -@@ -41,9 +41,11 @@ public class EnderEyeItem extends Item { - BlockState iblockdata = world.getBlockState(blockposition); - - if (iblockdata.is(Blocks.END_PORTAL_FRAME) && !(Boolean) iblockdata.getValue(EndPortalFrameBlock.HAS_EYE)) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.SUCCESS; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - BlockState iblockdata1 = (BlockState) iblockdata.setValue(EndPortalFrameBlock.HAS_EYE, true); - // Paper start - if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockposition, iblockdata1)) { -@@ -91,7 +93,7 @@ public class EnderEyeItem extends Item { - } - - return InteractionResult.SUCCESS; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - 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 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 { - ItemStack itemstack = user.getItemInHand(hand); - - if (user.fishing != null) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - int i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent - - itemstack.hurtAndBreak(i, user, LivingEntity.getSlotForHand(hand)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); - user.gameEvent(GameEvent.ITEM_INTERACT_FINISH); -diff --git a/src/main/java/net/minecraft/world/item/FoodOnAStickItem.java b/src/main/java/net/minecraft/world/item/FoodOnAStickItem.java -index a8188a10d3569c9aef16d64f6e56db367769af61..9e42239f6dc236c304e7cd61c1aa8f98ed4b455c 100644 ---- a/src/main/java/net/minecraft/world/item/FoodOnAStickItem.java -+++ b/src/main/java/net/minecraft/world/item/FoodOnAStickItem.java -@@ -24,9 +24,11 @@ public class FoodOnAStickItem extends Item { - @Override - public InteractionResult use(Level world, Player user, InteractionHand hand) { - ItemStack itemStack = user.getItemInHand(hand); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.PASS; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - Entity entity = user.getControlledVehicle(); - if (user.isPassenger() && entity instanceof ItemSteerable itemSteerable && entity.getType() == this.canInteractWith && itemSteerable.boost()) { - EquipmentSlot equipmentSlot = LivingEntity.getSlotForHand(hand); -@@ -36,6 +38,6 @@ public class FoodOnAStickItem extends Item { - - user.awardStat(Stats.ITEM_USED.get(this)); - return InteractionResult.PASS; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/item/HangingEntityItem.java b/src/main/java/net/minecraft/world/item/HangingEntityItem.java -index 44a7cee7df2927a923455e8cedaab59307b42506..267c30b20e1dba9f7c13bf770f4e8d3c28c6808e 100644 ---- a/src/main/java/net/minecraft/world/item/HangingEntityItem.java -+++ b/src/main/java/net/minecraft/world/item/HangingEntityItem.java -@@ -83,7 +83,7 @@ public class HangingEntityItem extends Item { - } - - if (((HangingEntity) object).survives()) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - fire HangingPlaceEvent - Player who = (context.getPlayer() == null) ? null : (Player) context.getPlayer().getBukkitEntity(); - org.bukkit.block.Block blockClicked = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -100,7 +100,7 @@ public class HangingEntityItem extends Item { - ((HangingEntity) object).playPlacementSound(); - world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, ((HangingEntity) object).position()); - world.addFreshEntity((Entity) object); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - itemstack.shrink(1); - return InteractionResult.SUCCESS; -diff --git a/src/main/java/net/minecraft/world/item/HoeItem.java b/src/main/java/net/minecraft/world/item/HoeItem.java -index 0936bdc945f73c7750c20a34276aead2921eeb61..0b530ae9aa19a2f6917fc8a25a64a6287eebf554 100644 ---- a/src/main/java/net/minecraft/world/item/HoeItem.java -+++ b/src/main/java/net/minecraft/world/item/HoeItem.java -@@ -63,12 +63,12 @@ public class HoeItem extends DiggerItem { - if (predicate.test(context)) { - Player player = context.getPlayer(); - if (!TILLABLES.containsKey(clickedBlock)) level.playSound(null, blockPos, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound -- if (!level.isClientSide) { -+ //if (!level.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - consumer.accept(context); - if (player != null) { - context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - if (tool == null) { - return false; - } else { -- if (!world.isClientSide && state.getDestroySpeed(world, pos) != 0.0F && tool.damagePerBlock() > 0) { -+ if (/*!world.isClientSide &&*/ state.getDestroySpeed(world, pos) != 0.0F && tool.damagePerBlock() > 0) { // Plazma - Remove persist 'isClientSide' flag - stack.hurtAndBreak(tool.damagePerBlock(), miner, EquipmentSlot.MAINHAND); - } - -diff --git a/src/main/java/net/minecraft/world/item/ItemUtils.java b/src/main/java/net/minecraft/world/item/ItemUtils.java -index 0c4074ed8b4fd9d6fcb838e8843d66f6f286ed5d..c2c075c9372d34ba94af8367709af0993d359309 100644 ---- a/src/main/java/net/minecraft/world/item/ItemUtils.java -+++ b/src/main/java/net/minecraft/world/item/ItemUtils.java -@@ -40,7 +40,7 @@ public class ItemUtils { - - public static void onContainerDestroyed(ItemEntity itemEntity, Iterable contents) { - Level level = itemEntity.level(); -- if (!level.isClientSide) { -+ //if (!level.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - call EntityDropItemEvent - contents.forEach(stack -> { - ItemEntity droppedItem = new ItemEntity(level, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), stack); -@@ -50,6 +50,6 @@ public class ItemUtils { - } - }); - // Paper end - call EntityDropItemEvent -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/item/JukeboxPlayable.java b/src/main/java/net/minecraft/world/item/JukeboxPlayable.java -index 295db20dcb4d637a834530687577a844d62a6fc9..f4a18d82e169ccdf33f00d4dc92db24f097dbf19 100644 ---- a/src/main/java/net/minecraft/world/item/JukeboxPlayable.java -+++ b/src/main/java/net/minecraft/world/item/JukeboxPlayable.java -@@ -65,7 +65,7 @@ public record JukeboxPlayable(EitherHolder song, boolean showInTool - } else { - BlockState blockState = world.getBlockState(pos); - if (blockState.is(Blocks.JUKEBOX) && !blockState.getValue(JukeboxBlock.HAS_RECORD)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ItemStack itemStack = stack.consumeAndReturn(1, player); - if (world.getBlockEntity(pos) instanceof JukeboxBlockEntity jukeboxBlockEntity) { - jukeboxBlockEntity.setTheItem(itemStack); -@@ -73,7 +73,7 @@ public record JukeboxPlayable(EitherHolder song, boolean showInTool - } - - player.awardStat(Stats.PLAY_RECORD); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/item/KnowledgeBookItem.java b/src/main/java/net/minecraft/world/item/KnowledgeBookItem.java -index f378bbd2fec6b74020417728c45d48d13c9d1a98..48eab51b8e050daa21f4834d946fccc5a9d5fb7b 100644 ---- a/src/main/java/net/minecraft/world/item/KnowledgeBookItem.java -+++ b/src/main/java/net/minecraft/world/item/KnowledgeBookItem.java -@@ -31,7 +31,7 @@ public class KnowledgeBookItem extends Item { - if (list.isEmpty()) { - return InteractionResult.FAIL; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - RecipeManager recipeManager = world.getServer().getRecipeManager(); - List> list2 = new ArrayList<>(list.size()); - -@@ -47,7 +47,7 @@ public class KnowledgeBookItem extends Item { - - user.awardRecipes(list2); - user.awardStat(Stats.ITEM_USED.get(this)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/item/LeadItem.java b/src/main/java/net/minecraft/world/item/LeadItem.java -index 7c910d96edac066d4634bc6f6049a72238884ae9..6d12dce8e50ce73602341fd7d78e314146151501 100644 ---- a/src/main/java/net/minecraft/world/item/LeadItem.java -+++ b/src/main/java/net/minecraft/world/item/LeadItem.java -@@ -39,7 +39,7 @@ public class LeadItem extends Item { - if (iblockdata.is(BlockTags.FENCES)) { - Player entityhuman = context.getPlayer(); - -- if (!world.isClientSide && entityhuman != null) { -+ if (/*!world.isClientSide &&*/ entityhuman != null) { // Plazma - Remove persist 'isClientSide' flag - return LeadItem.bindPlayerMobs(entityhuman, world, blockposition, context.getHand()); // CraftBukkit - Pass hand - } - } -diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -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 { - - @Override - public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - MapItemSavedData mapItemSavedData = getSavedData(stack, world); - if (mapItemSavedData != null) { - if (entity instanceof Player player) { -@@ -280,7 +280,7 @@ public class MapItem extends Item { - this.update(world, entity, mapItemSavedData); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -349,12 +349,12 @@ public class MapItem extends Item { - public InteractionResult useOn(UseOnContext context) { - BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); - if (blockState.is(BlockTags.BANNERS)) { -- if (!context.getLevel().isClientSide) { -+ //if (!context.getLevel().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - MapItemSavedData mapItemSavedData = getSavedData(context.getItemInHand(), context.getLevel()); - if (mapItemSavedData != null && !mapItemSavedData.toggleBanner(context.getLevel(), context.getClickedPos())) { - return InteractionResult.FAIL; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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() && entity.canBeNameTagged()) { -- if (!user.level().isClientSide && entity.isAlive()) { -+ if (/*!user.level().isClientSide &&*/ entity.isAlive()) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - Add PlayerNameEntityEvent - io.papermc.paper.event.player.PlayerNameEntityEvent event = new io.papermc.paper.event.player.PlayerNameEntityEvent(((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity(), entity.getBukkitLivingEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(stack.getHoverName()), true); - if (!event.callEvent()) return InteractionResult.PASS; -diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java -index f19bd2c25d3c84d9f16cad38ac5c32736f0f3a8d..a4d6781bb0e3173f30601bd6f1cef6d9a0cf2934 100644 ---- a/src/main/java/net/minecraft/world/item/PotionItem.java -+++ b/src/main/java/net/minecraft/world/item/PotionItem.java -@@ -51,7 +51,7 @@ public class PotionItem extends Item { - level.playSound(null, blockPos, SoundEvents.GENERIC_SPLASH, SoundSource.BLOCKS, 1.0F, 1.0F); - player.setItemInHand(context.getHand(), ItemUtils.createFilledResult(itemStack, player, new ItemStack(Items.GLASS_BOTTLE))); - player.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); -- if (!level.isClientSide) { -+ //if (!level.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ServerLevel serverLevel = (ServerLevel)level; - - for (int i = 0; i < 5; i++) { -@@ -67,7 +67,7 @@ public class PotionItem extends Item { - 1.0 - ); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - level.playSound(null, blockPos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); - level.gameEvent(null, GameEvent.FLUID_PLACE, blockPos); -diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java -index 5616d137fc67c1c5527e3cc7c10fea36a556d21a..78cc14c737aaa8b74279253ab3c4d537a549dda7 100644 ---- a/src/main/java/net/minecraft/world/item/SaddleItem.java -+++ b/src/main/java/net/minecraft/world/item/SaddleItem.java -@@ -16,10 +16,10 @@ public class SaddleItem extends Item { - @Override - public InteractionResult interactLivingEntity(ItemStack stack, Player user, LivingEntity entity, InteractionHand hand) { - if (entity instanceof Saddleable saddleable && entity.isAlive() && !saddleable.isSaddled() && saddleable.isSaddleable()) { -- if (!user.level().isClientSide) { -+ //if (!user.level().isClientSide) { // Plazma - Remove persist 'isClientSide' flag - saddleable.equipSaddle(stack.split(1), SoundSource.NEUTRAL); - entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/item/ScaffoldingBlockItem.java b/src/main/java/net/minecraft/world/item/ScaffoldingBlockItem.java -index b16e47bd57dea6815ed1ebbd2aa432e97a497d52..dbdccf42c586a94812d708027b7d67b78dd4fcff 100644 ---- a/src/main/java/net/minecraft/world/item/ScaffoldingBlockItem.java -+++ b/src/main/java/net/minecraft/world/item/ScaffoldingBlockItem.java -@@ -39,7 +39,7 @@ public class ScaffoldingBlockItem extends BlockItem { - BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable().move(direction); - - while (i < 7) { -- if (!level.isClientSide && !level.isInWorldBounds(mutableBlockPos)) { -+ if (/*!level.isClientSide &&*/ !level.isInWorldBounds(mutableBlockPos)) { // Plazma - Remove persist 'isClientSide' flag - Player player = context.getPlayer(); - int j = level.getMaxY(); - if (player instanceof ServerPlayer && mutableBlockPos.getY() > j) { -diff --git a/src/main/java/net/minecraft/world/item/ShearsItem.java b/src/main/java/net/minecraft/world/item/ShearsItem.java -index 374d51da03ce47ff744b64b8cfe98ad6d72ebdb4..90259b0156f32a6c2693ba750d055df1bfdc480c 100644 ---- a/src/main/java/net/minecraft/world/item/ShearsItem.java -+++ b/src/main/java/net/minecraft/world/item/ShearsItem.java -@@ -44,7 +44,7 @@ public class ShearsItem extends Item { - - @Override - public boolean mineBlock(ItemStack stack, Level world, BlockState state, BlockPos pos, LivingEntity miner) { -- if (!world.isClientSide && !state.is(BlockTags.FIRE)) { -+ if (/*!world.isClientSide &&*/ !state.is(BlockTags.FIRE)) { // Plazma - Remove persist 'isClientSide' flag - stack.hurtAndBreak(1, miner, EquipmentSlot.MAINHAND); - } - -diff --git a/src/main/java/net/minecraft/world/item/ShovelItem.java b/src/main/java/net/minecraft/world/item/ShovelItem.java -index d10c4705cc9e7faabd4a5619e1da107231bdb37e..43e0a8c66e0b56094c4846c36932a9ed76d139b0 100644 ---- a/src/main/java/net/minecraft/world/item/ShovelItem.java -+++ b/src/main/java/net/minecraft/world/item/ShovelItem.java -@@ -55,9 +55,9 @@ public class ShovelItem extends DiggerItem { - // Purpur end - } else if (blockState.getBlock() instanceof CampfireBlock && blockState.getValue(CampfireBlock.LIT)) { - afterAction = () -> { // Paper -- if (!level.isClientSide()) { -+ //if (!level.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - level.levelEvent(null, 1009, blockPos, 0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - CampfireBlock.dowse(context.getPlayer(), level, blockPos, blockState); - }; // Paper -@@ -65,7 +65,7 @@ public class ShovelItem extends DiggerItem { - } - - if (blockState3 != null) { -- if (!level.isClientSide) { -+ //if (!level.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockPos, blockState3)) { - return InteractionResult.PASS; -@@ -77,7 +77,7 @@ public class ShovelItem extends DiggerItem { - if (player != null) { - context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/item/SignItem.java b/src/main/java/net/minecraft/world/item/SignItem.java -index fcc78491cef1cf1535888c4ed43c3b71fb597848..2b160d620624187d1d96068b8095844f623505bb 100644 ---- a/src/main/java/net/minecraft/world/item/SignItem.java -+++ b/src/main/java/net/minecraft/world/item/SignItem.java -@@ -27,7 +27,7 @@ public class SignItem extends StandingAndWallBlockItem { - protected boolean updateCustomBlockEntityTag(BlockPos pos, Level world, @Nullable Player player, ItemStack stack, BlockState state) { - boolean flag = super.updateCustomBlockEntityTag(pos, world, player, stack, state); - -- if (!world.isClientSide && !flag && player != null) { -+ if (/*!world.isClientSide &&*/ !flag && player != null) { // Plazma - Remove persist 'isClientSide' flag - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof SignBlockEntity) { -diff --git a/src/main/java/net/minecraft/world/item/SolidBucketItem.java b/src/main/java/net/minecraft/world/item/SolidBucketItem.java -index 867b1326eaaa4a0ff7c5773e0098ebf68a55c519..d856dfd4a59de600291f2cdc139ce553b2d5cee0 100644 ---- a/src/main/java/net/minecraft/world/item/SolidBucketItem.java -+++ b/src/main/java/net/minecraft/world/item/SolidBucketItem.java -@@ -40,9 +40,9 @@ public class SolidBucketItem extends BlockItem implements DispensibleContainerIt - @Override - public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) { - if (world.isInWorldBounds(pos) && world.isEmptyBlock(pos)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - world.setBlock(pos, this.getBlock().defaultBlockState(), 3); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 a185d098175e504b7bb93d2cff03ca99eabc11eb..356181e73697d5b9896892086e1c5ea670460541 100644 ---- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java -+++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java -@@ -52,9 +52,11 @@ public class SpawnEggItem extends Item { - public InteractionResult useOn(UseOnContext context) { - Level world = context.getLevel(); - -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.SUCCESS; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - ItemStack itemstack = context.getItemInHand(); - BlockPos blockposition = context.getClickedPos(); - Direction enumdirection = context.getClickedFace(); -@@ -107,7 +109,7 @@ public class SpawnEggItem extends Item { - - return InteractionResult.SUCCESS; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -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 -+++ b/src/main/java/net/minecraft/world/item/component/Consumable.java -@@ -73,7 +73,7 @@ public record Consumable(float consumeSeconds, ItemUseAnimation animation, Holde - stack.getAllOfType(ConsumableListener.class).forEach((consumablelistener) -> { - consumablelistener.onConsume(world, user, stack, this); - }); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - EntityPotionEffectEvent.Cause cause; - if (stack.is(Items.MILK_BUCKET)) { -@@ -88,7 +88,7 @@ public record Consumable(float consumeSeconds, ItemUseAnimation animation, Holde - consumeeffect.apply(world, stack, user, cause); - // CraftBukkit end - }); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -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)) { -- if (!player.level().isClientSide()) { -+ //if (!player.level().isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.ITEM_USED.get(stack.getItem())); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - } - -- boolean isClientSide(); -+ //boolean isClientSide(); // Plazma - Remove persist 'isClientSide' flag - - 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 -+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java -@@ -117,7 +117,7 @@ public abstract class BaseCommandBlock implements CommandSource { - } - - public boolean performCommand(Level world) { -- if (!world.isClientSide && world.getGameTime() != this.lastExecution) { -+ if (/*!world.isClientSide &&*/ world.getGameTime() != this.lastExecution) { // Plazma - Remove persist 'isClientSide' flag - if ("Searge".equalsIgnoreCase(this.command)) { - this.lastOutput = Component.literal("#itzlipofutzli"); - this.successCount = 1; -@@ -208,9 +208,11 @@ public abstract class BaseCommandBlock implements CommandSource { - if (!player.canUseGameMasterBlocks() && (!player.isCreative() || !player.getBukkitEntity().hasPermission("minecraft.commandblock"))) { // Paper - command block permission - return InteractionResult.PASS; - } else { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (player.getCommandSenderWorld().isClientSide) { - player.openMinecartCommandBlock(this); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 ac3b0f95926aba8e99375f74dfca9d83ca1fbd57..54832a4163dc6dee5393c907d084ea3c087eb56f 100644 ---- a/src/main/java/net/minecraft/world/level/BaseSpawner.java -+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -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) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - this.spawnDelay = this.minSpawnDelay; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - 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 90df89b67c34540901190cac6063bc5721d95ae0..9a6152fc74ba6c71b32da7519cec537e34291fa2 100644 ---- a/src/main/java/net/minecraft/world/level/Level.java -+++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -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' flags - private final WorldBorder worldBorder; - private final BiomeManager biomeManager; - private final ResourceKey dimension; -@@ -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' flags - if (dimensionmanager.coordinateScale() != 1.0D) { - this.worldBorder = new WorldBorder() { // CraftBukkit - decompile error - @Override -@@ -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' flags - @Override - public boolean isClientSide() { - return this.isClientSide; - } -+ */ // Plazma - Remove persist 'isClientSide' flags - - @Nullable - @Override -@@ -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' flags - return false; - } else { - LevelChunk chunk = this.getChunkAt(pos); -@@ -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' 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()) { - this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock()); - } - } -@@ -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' flags - } - - public void setBlockEntity(BlockEntity blockEntity) { -diff --git a/src/main/java/net/minecraft/world/level/LevelReader.java b/src/main/java/net/minecraft/world/level/LevelReader.java -index ade435de0af4ee3566fa4a490df53cddd2f6531c..98e4c19e448d2afd6bc76b454fe46bf99455c766 100644 ---- a/src/main/java/net/minecraft/world/level/LevelReader.java -+++ b/src/main/java/net/minecraft/world/level/LevelReader.java -@@ -76,7 +76,7 @@ public interface LevelReader extends ca.spottedleaf.moonrise.patches.chunk_syste - - Holder getUncachedNoiseBiome(int biomeX, int biomeY, int biomeZ); - -- boolean isClientSide(); -+ //boolean isClientSide(); // Plazma - Remove persist 'isClientSide' flag - - int getSeaLevel(); - -diff --git a/src/main/java/net/minecraft/world/level/block/AbstractCandleBlock.java b/src/main/java/net/minecraft/world/level/block/AbstractCandleBlock.java -index 53e85641cbbc49ad7e588741acc4227828c8dca1..3f0e466578188bf5dbdeb905908fea4f663292a2 100644 ---- a/src/main/java/net/minecraft/world/level/block/AbstractCandleBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/AbstractCandleBlock.java -@@ -46,7 +46,7 @@ public abstract class AbstractCandleBlock extends Block { - - @Override - protected void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) { -- if (!world.isClientSide && projectile.isOnFire() && this.canBeLit(state)) { -+ if (/*!world.isClientSide &&*/ projectile.isOnFire() && this.canBeLit(state)) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - 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 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 { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.openContainer(world, pos, player); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/AbstractSkullBlock.java b/src/main/java/net/minecraft/world/level/block/AbstractSkullBlock.java -index bd7a54744de84c2da642d63778e71f590f4c6ca9..39a22ef4025ea5ddc74b2872206cf420a7d31ab2 100644 ---- a/src/main/java/net/minecraft/world/level/block/AbstractSkullBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/AbstractSkullBlock.java -@@ -38,12 +38,14 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - boolean bl = state.is(Blocks.DRAGON_HEAD) || state.is(Blocks.DRAGON_WALL_HEAD) || state.is(Blocks.PIGLIN_HEAD) || state.is(Blocks.PIGLIN_WALL_HEAD); - if (bl) { - return createTickerHelper(type, BlockEntityType.SKULL, SkullBlockEntity::animation); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - return null; - } -@@ -69,11 +71,11 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean bl = world.hasNeighborSignal(pos); - if (bl != state.getValue(POWERED)) { - world.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(bl)), 2); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/AmethystBlock.java b/src/main/java/net/minecraft/world/level/block/AmethystBlock.java -index 8a900fd00b97a6c068ef76ec1d17abffaaef15b6..61f50cfe860b59570b0a2ae5c2789edc3b88038b 100644 ---- a/src/main/java/net/minecraft/world/level/block/AmethystBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/AmethystBlock.java -@@ -24,9 +24,9 @@ public class AmethystBlock extends Block { - - @Override - protected void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockPos = hit.getBlockPos(); - world.playSound(null, blockPos, SoundEvents.AMETHYST_BLOCK_CHIME, SoundSource.BLOCKS, 1.0F, 0.5F + world.random.nextFloat() * 1.2F); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java -index f9a2d2d4f798efa0d691996ec5ff7fe00260b36c..dd64b024d30df7685f5819843f2279cd7329bd52 100644 ---- a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java -@@ -108,11 +108,11 @@ public class AnvilBlock extends FallingBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_ANVIL); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index 0cf4133849ed8ff6d4038cc41ede9d3645b31da1..af52ca942bbdd588017759017ff466216e0f3d18 100644 ---- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -@@ -186,9 +186,9 @@ public abstract class BaseFireBlock extends Block { - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - world.levelEvent((Player) null, 1009, pos, 0); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return super.playerWillDestroy(world, pos, state, player); - } -diff --git a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java -index 9afa811579ac2e556b5c5c23b3b49587439dfadc..98912bd1d29e7946430de6577efe28b56bef6cde 100644 ---- a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java -@@ -78,14 +78,14 @@ public abstract class BasePressurePlateBlock extends Block { - @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) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - int i = this.getSignalForState(state); - - if (i == 0) { - this.checkPressed(entity, world, pos, state, i); - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - private void checkPressed(@Nullable Entity entity, Level world, BlockPos pos, BlockState state, int output) { -diff --git a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java -index f9a55f76fed8609bca167b2ea37464e8079de0c0..dbba3e6d9d1d631b8bc5c15e6032685be2aad28f 100644 ---- a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java -@@ -79,7 +79,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide && world.getBlockState(pos).is(this)) { -+ if (/*!world.isClientSide &&*/ world.getBlockState(pos).is(this)) { // Plazma - Remove persist 'isClientSide' flag - RailShape railShape = state.getValue(this.getShapeProperty()); - if (shouldBeRemoved(pos, world, railShape)) { - dropResources(state, world, pos); -@@ -113,12 +113,14 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl - } - - protected BlockState updateDir(Level world, BlockPos pos, BlockState state, boolean forceUpdate) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return state; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - RailShape railShape = state.getValue(this.getShapeProperty()); - return new RailState(world, pos, state).place(world.hasNeighborSignal(pos), forceUpdate, railShape).getState(); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide && world.getBlockEntity(pos) instanceof BeaconBlockEntity beaconBlockEntity && player.openMenu(beaconBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation -+ if (/*!world.isClientSide &&*/ world.getBlockEntity(pos) instanceof BeaconBlockEntity beaconBlockEntity && player.openMenu(beaconBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.INTERACT_WITH_BEACON); - } - -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 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 - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.SUCCESS_SERVER; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - if (state.getValue(BedBlock.PART) != BedPart.HEAD) { - pos = pos.relative((Direction) state.getValue(BedBlock.FACING)); - state = world.getBlockState(pos); -@@ -142,7 +144,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock - }); - return InteractionResult.SUCCESS_SERVER; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - // CraftBukkit start -@@ -218,7 +220,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide && player.isCreative()) { -+ if (/*!world.isClientSide &&*/ player.isCreative()) { // Plazma - Remove persist 'isClientSide' flag - BedPart blockpropertybedpart = (BedPart) state.getValue(BedBlock.PART); - - if (blockpropertybedpart == BedPart.FOOT) { -@@ -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); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockposition1 = pos.relative((Direction) state.getValue(BedBlock.FACING)); - - world.setBlock(blockposition1, (BlockState) state.setValue(BedBlock.PART, BedPart.HEAD), 3); -@@ -368,7 +370,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock - // CraftBukkit end - world.blockUpdated(pos, Blocks.AIR); - state.updateNeighbourShapes(world, pos, 3); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -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 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 { - @Override - public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool, boolean includeDrops, boolean dropExp) { // Paper - fix drops not preventing stats/food exhaustion - super.playerDestroy(world, player, pos, state, blockEntity, tool, includeDrops, dropExp); // Paper - fix drops not preventing stats/food exhaustion -- if (!world.isClientSide && blockEntity instanceof BeehiveBlockEntity tileentitybeehive) { -+ if (/*!world.isClientSide &&*/ blockEntity instanceof BeehiveBlockEntity tileentitybeehive) { // Plazma - Remove persist 'isClientSide' flag - if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MINING)) { - tileentitybeehive.emptyAllLivingFromHive(player, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); - world.updateNeighbourForOutputSignal(pos, this); -@@ -182,7 +182,7 @@ public class BeehiveBlock extends BaseEntityBlock { - world.gameEvent((Entity) player, (Holder) GameEvent.FLUID_PICKUP, pos); - } - -- if (!world.isClientSide() && flag) { -+ if (/*!world.isClientSide() &&*/ flag) { // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.ITEM_USED.get(item)); - } - } -@@ -290,7 +290,7 @@ public class BeehiveBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return world.isClientSide ? null : createTickerHelper(type, BlockEntityType.BEEHIVE, BeehiveBlockEntity::serverTick); -+ return /*world.isClientSide ? null :*/ createTickerHelper(type, BlockEntityType.BEEHIVE, BeehiveBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 { - public boolean attemptToRing(@Nullable Entity entity, Level world, BlockPos pos, @Nullable Direction direction) { - BlockEntity tileentity = world.getBlockEntity(pos); - -- if (!world.isClientSide && tileentity instanceof BellBlockEntity) { -+ if (/*!world.isClientSide &&*/ tileentity instanceof BellBlockEntity) { // Plazma - Remove persist 'isClientSide' flag - if (direction == null) { - direction = (Direction) world.getBlockState(pos).getValue(BellBlock.FACING); - } -@@ -276,7 +276,7 @@ public class BellBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return createTickerHelper(type, BlockEntityType.BELL, world.isClientSide ? BellBlockEntity::clientTick : BellBlockEntity::serverTick); -+ return createTickerHelper(type, BlockEntityType.BELL, /*world.isClientSide ? BellBlockEntity::clientTick :*/ BellBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -index 2535e6d71b690f8dfde41a7d9cb76b6f010f5aa7..bf4c5d6f2b7c24a7f439f9026e4056663c7462d3 100644 ---- a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -@@ -181,7 +181,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone - @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) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (state.getValue(BigDripleafBlock.TILT) == Tilt.NONE && BigDripleafBlock.canEntityTilt(pos, entity) && !world.hasNeighborSignal(pos)) { - // CraftBukkit start - tilt dripleaf - org.bukkit.event.Cancellable cancellable; -@@ -199,7 +199,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone - // CraftBukkit end - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 f00526753a83f95689fad2a132bef79f4479eec6..a21e65839dcb94f536a679129b934d25bf599872 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 { - public static void updateOrDestroy(BlockState state, BlockState newState, LevelAccessor world, BlockPos pos, int flags, int maxUpdateDepth) { - if (newState != state) { - if (newState.isAir()) { -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - world.destroyBlock(pos, (flags & 32) == 0, (Entity) null, maxUpdateDepth); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - 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 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 -@@ -58,7 +58,7 @@ public class BrewingStandBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return world.isClientSide ? null : createTickerHelper(type, BlockEntityType.BREWING_STAND, BrewingStandBlockEntity::serverTick); -+ return /*world.isClientSide ? null :*/ createTickerHelper(type, BlockEntityType.BREWING_STAND, BrewingStandBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -68,7 +68,7 @@ public class BrewingStandBlock extends BaseEntityBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide && world.getBlockEntity(pos) instanceof BrewingStandBlockEntity brewingStandBlockEntity && player.openMenu(brewingStandBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation -+ if (/*!world.isClientSide &&*/ world.getBlockEntity(pos) instanceof BrewingStandBlockEntity brewingStandBlockEntity && player.openMenu(brewingStandBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.INTERACT_WITH_BREWINGSTAND); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java -index c65016cba376a41c267fb4b6499ec0a263851558..0e9e4a5a6666b6536411fbebc45c2a174c02d7c2 100644 ---- a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java -@@ -52,7 +52,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { - BlockState blockState = world.getBlockState(pos.above()); - if (blockState.isAir()) { - entity.onAboveBubbleCol(state.getValue(DRAG_DOWN)); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ServerLevel serverLevel = (ServerLevel)world; - - for (int i = 0; i < 2; i++) { -@@ -79,7 +79,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { - 0.2 - ); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - entity.onInsideBubbleColumn(state.getValue(DRAG_DOWN)); - } -diff --git a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -index 061a8f8b58d9fa7959333e2f59d3b7ee03cbf92d..bb2efe06e04d9628f4e1a159e668e48d4e44d704 100644 ---- a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -@@ -209,7 +209,7 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { - @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 && this.type.canButtonBeActivatedByArrows() && !(Boolean) state.getValue(ButtonBlock.POWERED)) { -+ if (/*!world.isClientSide &&*/ this.type.canButtonBeActivatedByArrows() && !(Boolean) state.getValue(ButtonBlock.POWERED)) { // Plazma - Remove persist 'isClientSide' flag - this.checkPressed(state, world, pos); - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/CakeBlock.java b/src/main/java/net/minecraft/world/level/block/CakeBlock.java -index 3563a241c0b697dc0167cf7b1aa73fef7d1e7934..b25560f11a5004d122253c7c9b86e2a4967890c7 100644 ---- a/src/main/java/net/minecraft/world/level/block/CakeBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CakeBlock.java -@@ -86,6 +86,7 @@ public class CakeBlock extends Block { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - if (CakeBlock.eat(world, pos, state, player).consumesAction()) { - return InteractionResult.SUCCESS; -@@ -95,6 +96,7 @@ public class CakeBlock extends Block { - return InteractionResult.CONSUME; - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - return CakeBlock.eat(world, pos, state, player); - } -diff --git a/src/main/java/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java b/src/main/java/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java -index ddd1504ed9516f8f247cd63c42d5d1db0c01ce67..38fee8cda4b95a5bb9dd02ca6eca776c53bda43c 100644 ---- a/src/main/java/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java -@@ -41,13 +41,13 @@ public class CalibratedSculkSensorBlock extends SculkSensorBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return !world.isClientSide -- ? createTickerHelper( -+ return /*!world.isClientSide // Plazma - Remove persist 'isClientSide' flag -+ ?*/ createTickerHelper( // Plazma - Remove persist 'isClientSide' flag - type, - BlockEntityType.CALIBRATED_SCULK_SENSOR, - (worldx, pos, statex, blockEntity) -> VibrationSystem.Ticker.tick(worldx, blockEntity.getVibrationData(), blockEntity.getVibrationUser()) -- ) -- : null; -+ ); // Plazma - Remove persist 'isClientSide' flag -+ //: null; // Plazma - Remove persist 'isClientSide' flag - } - - @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 b6ba6ebe6ac15cbcb5d3a6221b47762e37c4a56f..fc370e915c527420447c0deffb2fb94684373246 100644 ---- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java -@@ -178,11 +178,13 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB - } - - public static void dowse(@Nullable Entity entity, LevelAccessor world, BlockPos pos, BlockState state) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide()) { - for (int i = 0; i < 20; ++i) { - CampfireBlock.makeParticles((Level) world, pos, (Boolean) state.getValue(CampfireBlock.SIGNAL_FIRE), true); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - BlockEntity tileentity = world.getBlockEntity(pos); - -@@ -199,9 +201,9 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB - boolean flag = (Boolean) state.getValue(CampfireBlock.LIT); - - if (flag) { -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - world.playSound((Player) null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - CampfireBlock.dowse((Entity) null, world, pos, state); - } -diff --git a/src/main/java/net/minecraft/world/level/block/CartographyTableBlock.java b/src/main/java/net/minecraft/world/level/block/CartographyTableBlock.java -index 9e7066ec9fa5a0a852f6e38052887a47be98cb55..06006f5a55e0543d06a99cbeb1a6b6360f5c1dde 100644 ---- a/src/main/java/net/minecraft/world/level/block/CartographyTableBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CartographyTableBlock.java -@@ -31,11 +31,11 @@ public class CartographyTableBlock extends Block { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_CARTOGRAPHY_TABLE); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -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 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 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 -@@ -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) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.ITEM_USED.get(stack.getItem())); - SoundEvent soundEvent = stack.is(Items.ENCHANTED_BOOK) ? SoundEvents.CHISELED_BOOKSHELF_INSERT_ENCHANTED : SoundEvents.CHISELED_BOOKSHELF_INSERT; - blockEntity.setItem(slot, stack.consumeAndReturn(1, player)); - world.playSound(null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - private static void removeBook(Level world, BlockPos pos, Player player, ChiseledBookShelfBlockEntity blockEntity, int slot) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ItemStack itemStack = blockEntity.removeItem(slot, 1); - SoundEvent soundEvent = itemStack.is(Items.ENCHANTED_BOOK) - ? SoundEvents.CHISELED_BOOKSHELF_PICKUP_ENCHANTED -@@ -160,7 +160,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { - } - - world.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Nullable -@@ -225,12 +225,14 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { - - @Override - protected int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide()) { - return 0; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - return world.getBlockEntity(pos) instanceof ChiseledBookShelfBlockEntity chiseledBookShelfBlockEntity - ? chiseledBookShelfBlockEntity.getLastInteractedSlot() + 1 - : 0; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } -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 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 { - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof CommandBlockEntity) { -@@ -75,7 +75,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { - this.setPoweredAndUpdate(world, pos, tileentitycommand, world.hasNeighborSignal(pos)); - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 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 -@@ -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) { -- if (level < 7 && !world.isClientSide) { -+ if (level < 7 /*&& !world.isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack); - // Paper start - handle cancelled events - if (iblockdata1 == null) { -@@ -336,13 +336,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { - } - } - // CraftBukkit end -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - Vec3 vec3d = Vec3.atLowerCornerWithOffset(pos, 0.5D, 1.01D, 0.5D).offsetRandom(world.random, 0.7F); - ItemEntity entityitem = new ItemEntity(world, vec3d.x(), vec3d.y(), vec3d.z(), new ItemStack(Items.BONE_MEAL)); - - entityitem.setDefaultPickUpDelay(); - world.addFreshEntity(entityitem); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 - @Nullable - @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); - } - - @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 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 { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return world.isClientSide ? null : createTickerHelper(type, BlockEntityType.CRAFTER, CrafterBlockEntity::serverTick); -+ return /*world.isClientSide ? null :*/ createTickerHelper(type, BlockEntityType.CRAFTER, CrafterBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - private void setBlockEntityTriggered(@Nullable BlockEntity blockEntity, boolean triggered) { -@@ -170,7 +170,7 @@ public class CrafterBlock extends BaseEntityBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof CrafterBlockEntity) { -@@ -178,7 +178,7 @@ public class CrafterBlock extends BaseEntityBlock { - - player.openMenu(crafterblockentity); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/CraftingTableBlock.java b/src/main/java/net/minecraft/world/level/block/CraftingTableBlock.java -index 6a2123cd808fa79f3cdb1cb56632d29bfe99058d..55e4863038b958eda589d0c6e2ea1db0694377aa 100644 ---- a/src/main/java/net/minecraft/world/level/block/CraftingTableBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/CraftingTableBlock.java -@@ -30,11 +30,11 @@ public class CraftingTableBlock extends Block { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_CRAFTING_TABLE); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -56,11 +56,13 @@ public class CreakingHeartBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return null; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - return state.getValue(ACTIVE) ? createTickerHelper(type, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick) : null; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 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 { - if (!player.mayBuild()) { - return super.useWithoutItem(state, world, pos, player, hit); - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockState iblockdata1 = (BlockState) state.cycle(DaylightDetectorBlock.INVERTED); - - world.setBlock(pos, iblockdata1, 2); - world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(player, iblockdata1)); - DaylightDetectorBlock.updateSignalStrength(iblockdata1, world, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -@@ -110,7 +110,7 @@ public class DaylightDetectorBlock extends BaseEntityBlock { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return !world.isClientSide && world.dimensionType().hasSkyLight() ? createTickerHelper(type, BlockEntityType.DAYLIGHT_DETECTOR, DaylightDetectorBlock::tickEntity) : null; -+ return /*!world.isClientSide &&*/ world.dimensionType().hasSkyLight() ? createTickerHelper(type, BlockEntityType.DAYLIGHT_DETECTOR, DaylightDetectorBlock::tickEntity) : null; // Plazma - Remove persist 'isClientSide' flag - } - - 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 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 - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof DecoratedPotBlockEntity decoratedpotblockentity) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return InteractionResult.SUCCESS; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - ItemStack itemstack1 = decoratedpotblockentity.getTheItem(); - - if (!stack.isEmpty() && (itemstack1.isEmpty() || ItemStack.isSameItemSameComponents(itemstack1, stack) && itemstack1.getCount() < itemstack1.getMaxStackSize())) { -@@ -131,7 +133,7 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog - } else { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - return InteractionResult.PASS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java -index fa1c4defd0d4e4cd888eb26eed131539d0ed573f..cf8b8eaed8932d53ddafae24148d20013ebd784e 100644 ---- a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java -@@ -53,11 +53,11 @@ public class DetectorRailBlock extends BaseRailBlock { - @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) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (!(Boolean) state.getValue(DetectorRailBlock.POWERED)) { - this.checkPressed(world, pos, state); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof DispenserBlockEntity) { -@@ -84,7 +84,7 @@ public class DispenserBlock extends BaseEntityBlock { - player.awardStat(tileentitydispenser instanceof DropperBlockEntity ? Stats.INSPECT_DROPPER : Stats.INSPECT_DISPENSER); - } // Paper - Fix InventoryOpenEvent cancellation - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/DoorBlock.java b/src/main/java/net/minecraft/world/level/block/DoorBlock.java -index f8356e468841137dcc92b2fe5db1cafa24619eaf..fffaa3867cd3072619d39506414063c2dc717163 100644 ---- a/src/main/java/net/minecraft/world/level/block/DoorBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/DoorBlock.java -@@ -114,7 +114,7 @@ public class DoorBlock extends Block { - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide && (player.isCreative() || !player.hasCorrectToolForDrops(state))) { -+ if (/*!world.isClientSide &&*/ (player.isCreative() || !player.hasCorrectToolForDrops(state))) { // Plazma - Remove persist 'isClientSide' flag - DoublePlantBlock.preventDropFromBottomPart(world, pos, state, player); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -index 4fe83bd0f355549847b66afb7e61f6f2a6d97016..47b1f716e7a130402cb74229afa65893278c8a0c 100644 ---- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -@@ -86,13 +86,13 @@ public class DoublePlantBlock extends BushBlock { - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.isCreative()) { - DoublePlantBlock.preventDropFromBottomPart(world, pos, state, player); - } else { - dropResources(state, world, pos, (BlockEntity) null, player, player.getMainHandItem()); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return super.playerWillDestroy(world, pos, state, player); - } -diff --git a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java -index b6799db00e157892dd4339a01d2ca36092c8e491..74a42da0cf747670761d7f19484fa00471130866 100644 ---- a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java -@@ -66,6 +66,7 @@ public class DragonEggBlock extends FallingBlock { - - blockposition1 = new BlockPos(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ()); - // CraftBukkit end -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - for (int j = 0; j < 128; ++j) { - double d0 = world.random.nextDouble(); -@@ -79,9 +80,10 @@ public class DragonEggBlock extends FallingBlock { - world.addParticle(ParticleTypes.PORTAL, d1, d2, d3, (double) f, (double) f1, (double) f2); - } - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - world.setBlock(blockposition1, state, 2); - world.removeBlock(pos, false); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -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 null; //world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null; // Plazma - Remove persist 'isClientSide' flag - } - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - player.openMenu(state.getMenuProvider(world, pos)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return createTickerHelper(type, BlockEntityType.END_GATEWAY, world.isClientSide ? TheEndGatewayBlockEntity::beamAnimationTick : TheEndGatewayBlockEntity::portalTick); -+ return createTickerHelper(type, BlockEntityType.END_GATEWAY, /*world.isClientSide ? TheEndGatewayBlockEntity::beamAnimationTick :*/ TheEndGatewayBlockEntity::portalTick); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -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 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 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,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) { -- 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 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 -@@ -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 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 -+++ b/src/main/java/net/minecraft/world/level/block/FenceBlock.java -@@ -74,7 +74,7 @@ public class FenceBlock extends CrossCollisionBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- return (InteractionResult)(!world.isClientSide() ? LeadItem.bindPlayerMobs(player, world, pos) : InteractionResult.PASS); -+ return (InteractionResult)(/*!world.isClientSide() ?*/ LeadItem.bindPlayerMobs(player, world, pos)); //: InteractionResult.PASS); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/FenceGateBlock.java b/src/main/java/net/minecraft/world/level/block/FenceGateBlock.java -index 5201a11503362c2d43a9eee028613137ac9ae451..f664f78058f6045db26baa96666aceae41764c5c 100644 ---- a/src/main/java/net/minecraft/world/level/block/FenceGateBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/FenceGateBlock.java -@@ -171,7 +171,7 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag1 = world.hasNeighborSignal(pos); - // CraftBukkit start - boolean oldPowered = state.getValue(FenceGateBlock.POWERED); -@@ -193,7 +193,7 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 -@@ -151,11 +151,11 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_GRINDSTONE); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/HoneyBlock.java b/src/main/java/net/minecraft/world/level/block/HoneyBlock.java -index 5c360c6768582c1a35431739613e9b406875cc21..3536d74b4d422e6548d73bcba6d943684c5462b5 100644 ---- a/src/main/java/net/minecraft/world/level/block/HoneyBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/HoneyBlock.java -@@ -49,9 +49,9 @@ public class HoneyBlock extends HalfTransparentBlock { - @Override - public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { - entity.playSound(SoundEvents.HONEY_BLOCK_SLIDE, 1.0F, 1.0F); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - world.broadcastEntityEvent(entity, (byte)54); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - if (entity.causeFallDamage(fallDistance, 0.2F, world.damageSources().fall())) { - entity.playSound(this.soundType.getFallSound(), this.soundType.getVolume() * 0.5F, this.soundType.getPitch() * 0.75F); -@@ -117,12 +117,13 @@ public class HoneyBlock extends HalfTransparentBlock { - entity.playSound(SoundEvents.HONEY_BLOCK_SLIDE, 1.0F, 1.0F); - } - -- if (!world.isClientSide && world.random.nextInt(5) == 0) { -+ if (/*!world.isClientSide &&*/ world.random.nextInt(5) == 0) { // Plazma - Remove persist 'isClientSide' flag - world.broadcastEntityEvent(entity, (byte)53); - } - } - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - public static void showSlideParticles(Entity entity) { - showParticles(entity, 5); - } -@@ -141,4 +142,5 @@ public class HoneyBlock extends HalfTransparentBlock { - } - } - } -+ */ // 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 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 { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return world.isClientSide ? null : createTickerHelper(type, BlockEntityType.HOPPER, HopperBlockEntity::pushItemsTick); -+ return /*world.isClientSide ? null :*/ createTickerHelper(type, BlockEntityType.HOPPER, HopperBlockEntity::pushItemsTick); // Plazma - Remove persist 'isClientSide' flag - } - - @Override -@@ -125,7 +125,7 @@ public class HopperBlock extends BaseEntityBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide && world.getBlockEntity(pos) instanceof HopperBlockEntity hopperBlockEntity && player.openMenu(hopperBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation -+ if (/*!world.isClientSide &&*/ world.getBlockEntity(pos) instanceof HopperBlockEntity hopperBlockEntity && player.openMenu(hopperBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // Plazma - Remove persist 'isClientSide' flag - player.awardStat(Stats.INSPECT_HOPPER); - } - -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 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 -@@ -85,7 +85,7 @@ public class LecternBlock extends BaseEntityBlock { - Player entityhuman = ctx.getPlayer(); - boolean flag = false; - -- if (!world.isClientSide && entityhuman != null && entityhuman.canUseGameMasterBlocks()) { -+ if (/*!world.isClientSide &&*/ entityhuman != null && entityhuman.canUseGameMasterBlocks()) { // Plazma - Remove persist 'isClientSide' flag - CustomData customdata = (CustomData) itemstack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY); - - if (customdata.contains("Book")) { -@@ -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)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - LecternBlock.placeBook(user, world, pos, state, stack); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return true; - } else { -@@ -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)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.openScreen(world, pos, player); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -diff --git a/src/main/java/net/minecraft/world/level/block/LeverBlock.java b/src/main/java/net/minecraft/world/level/block/LeverBlock.java -index 1e7fec5c89c38943d13150a527b5acd239c21901..bd372e8af221783ffdbdbea4eb594c25674cc5db 100644 ---- a/src/main/java/net/minecraft/world/level/block/LeverBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/LeverBlock.java -@@ -96,6 +96,7 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - BlockState iblockdata1 = (BlockState) state.cycle(LeverBlock.POWERED); - -@@ -103,6 +104,7 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { - LeverBlock.makeParticle(iblockdata1, world, pos, 1.0F); - } - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - Interact Lever - boolean powered = state.getValue(LeverBlock.POWERED); // Old powered state - org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); -@@ -118,7 +120,7 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { - // CraftBukkit end - - this.pull(state, world, pos, (Player) null); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide && player.canUseGameMasterBlocks()) { -+ if (/*!world.isClientSide &&*/ player.canUseGameMasterBlocks()) { // Plazma - Remove persist 'isClientSide' flag - world.setBlock(pos, state.cycle(LEVEL), 2); - return InteractionResult.SUCCESS_SERVER; - } else { -diff --git a/src/main/java/net/minecraft/world/level/block/LoomBlock.java b/src/main/java/net/minecraft/world/level/block/LoomBlock.java -index 1b57f8cf3f4f27f6a76fec82a542ec1c582470c9..c315b61b2f077f62d70779465474d60b6af2ca89 100644 ---- a/src/main/java/net/minecraft/world/level/block/LoomBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/LoomBlock.java -@@ -32,11 +32,11 @@ public class LoomBlock extends HorizontalDirectionalBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_LOOM); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -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) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - RandomSource randomSource = world.getRandom(); - BlockState blockState = createTopperWithSideChance(world, pos, randomSource::nextBoolean); - if (!blockState.isAir()) { - world.setBlock(pos.above(), blockState, 3); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - private static BlockState createTopperWithSideChance(BlockGetter world, BlockPos pos, BooleanSupplier booleanSupplier) { -diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index f9015d4e478efeec8a796b7a897638f76064db20..bbb9be690d1718022902aa214bdb666ca74b9e2b 100644 ---- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -@@ -118,22 +118,22 @@ public class NoteBlock extends Block { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableNoteblockUpdates) state = (BlockState) state.cycle(NoteBlock.NOTE); // Paper - prevent noteblock note from updating - world.setBlock(pos, state, 3); - this.playNote(player, state, world, pos); - player.awardStat(Stats.TUNE_NOTEBLOCK); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } - - @Override - protected void attack(BlockState state, Level world, BlockPos pos, Player player) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.playNote(player, state, world, pos); - player.awardStat(Stats.PLAY_NOTEBLOCK); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - public static float getPitchFromNote(int note) { -diff --git a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java -index 26cb9990b91991e0a2eadc2dcbbf229e2e88fb2d..911bf8081841cc9fbd9289c0b7618594c9bc9db2 100644 ---- a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java -@@ -83,7 +83,7 @@ public class ObserverBlock extends DirectionalBlock { - } - - private void startSignal(LevelReader world, ScheduledTickAccess tickView, BlockPos pos) { -- if (!world.isClientSide() && !tickView.getBlockTicks().hasScheduledTick(pos, this)) { -+ if (/*!world.isClientSide() &&*/ !tickView.getBlockTicks().hasScheduledTick(pos, this)) { // Plazma - Remove persist 'isClientSide' flag - tickView.scheduleTick(pos, (Block) this, 2); - } - -@@ -116,7 +116,7 @@ public class ObserverBlock extends DirectionalBlock { - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - if (!state.is(oldState.getBlock())) { -- if (!world.isClientSide() && (Boolean) state.getValue(ObserverBlock.POWERED) && !world.getBlockTicks().hasScheduledTick(pos, this)) { -+ if (/*!world.isClientSide() &&*/ (Boolean) state.getValue(ObserverBlock.POWERED) && !world.getBlockTicks().hasScheduledTick(pos, this)) { // Plazma - Remove persist 'isClientSide' flag - BlockState iblockdata2 = (BlockState) state.setValue(ObserverBlock.POWERED, false); - - world.setBlock(pos, iblockdata2, 18); -@@ -129,7 +129,7 @@ public class ObserverBlock extends DirectionalBlock { - @Override - protected void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { - if (!state.is(newState.getBlock())) { -- if (!world.isClientSide && (Boolean) state.getValue(ObserverBlock.POWERED) && world.getBlockTicks().hasScheduledTick(pos, this)) { -+ if (/*!world.isClientSide &&*/ (Boolean) state.getValue(ObserverBlock.POWERED) && world.getBlockTicks().hasScheduledTick(pos, this)) { // Plazma - Remove persist 'isClientSide' flag - this.updateNeighborsInFront(world, pos, (BlockState) state.setValue(ObserverBlock.POWERED, false)); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -index fd5489993dca0f940da69e9163f78e5c2e6ee063..cd049a28ff2d4f748b154feb99b64e45af25b406 100644 ---- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -129,7 +129,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate - - @Override - protected void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockposition = hit.getBlockPos(); - - if (world instanceof ServerLevel) { -@@ -145,7 +145,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java -index f91c845061fa632e53efb31c63cf0c67c9c2e86a..75da3a36ae7af4c9b0156dbec4e6560cbdfa4cb2 100644 ---- a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java -@@ -62,6 +62,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { - if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent - if (!(entity instanceof LivingEntity) || entity.getInBlockState().is((Block) this)) { - entity.makeStuckInBlock(state, new Vec3(0.8999999761581421D, 1.5D, 0.8999999761581421D)); -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - RandomSource randomsource = world.getRandom(); - boolean flag = entity.xOld != entity.getX() || entity.zOld != entity.getZ(); -@@ -70,6 +71,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { - world.addParticle(ParticleTypes.SNOWFLAKE, entity.getX(), (double) (pos.getY() + 1), entity.getZ(), (double) (Mth.randomBetween(randomsource, -1.0F, 1.0F) * 0.083333336F), 0.05000000074505806D, (double) (Mth.randomBetween(randomsource, -1.0F, 1.0F) * 0.083333336F)); - } - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } - - entity.setIsInPowderSnow(true); -@@ -131,9 +133,9 @@ public class PowderSnowBlock extends Block implements BucketPickup { - @Override - public ItemStack pickupBlock(@Nullable Player player, LevelAccessor world, BlockPos pos, BlockState state) { - world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11); -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - world.levelEvent(2001, pos, Block.getId(state)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return new ItemStack(Items.POWDER_SNOW_BUCKET); - } -diff --git a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java -index 2b43c77d5aa609d4716df827cefcf008dfd13a06..9f902c34e7a4d621cdb4af47f9a83bc217803bd1 100644 ---- a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java -@@ -35,8 +35,8 @@ public class PumpkinBlock extends Block { - protected InteractionResult useItemOn(ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { - if (!stack.is(Items.SHEARS)) { - return super.useItemOn(stack, state, world, pos, player, hand, hit); -- } else if (world.isClientSide) { -- return InteractionResult.SUCCESS; -+ //} else if (world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag -+ // return InteractionResult.SUCCESS; // Plazma - Remove persist 'isClientSide' flag - } else { - // Paper start - Add PlayerShearBlockEvent - io.papermc.paper.event.block.PlayerShearBlockEvent event = new io.papermc.paper.event.block.PlayerShearBlockEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand), new java.util.ArrayList<>()); -diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneOreBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneOreBlock.java -index e9c7f5d2c7072568e0d451f43125816e27138872..2fc7bdc0362f2f5a21e3459375d8d06b3aeabcbb 100644 ---- a/src/main/java/net/minecraft/world/level/block/RedStoneOreBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RedStoneOreBlock.java -@@ -70,11 +70,13 @@ public class RedStoneOreBlock extends Block { - - @Override - protected InteractionResult useItemOn(ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - RedStoneOreBlock.spawnParticles(world, pos); - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - RedStoneOreBlock.interact(state, world, pos, player); // CraftBukkit - add entityhuman -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return (InteractionResult) (stack.getItem() instanceof BlockItem && (new BlockPlaceContext(player, hand, stack, hit)).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS); - } -diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -index 21f2c61023fadcce30452a02f067cd5d87e5d8dc..1250126ce9ba5d5aec30d855c7e11bf158d57c1c 100644 ---- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -@@ -371,7 +371,7 @@ public class RedStoneWireBlock extends Block { - - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { -- if (!oldState.is(state.getBlock()) && !world.isClientSide) { -+ if (!oldState.is(state.getBlock()) /*&& !world.isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - optimize redstone - replace call to updatePowerStrength - if (world.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) { - world.getWireHandler().onWireAdded(pos, state); // Alternate Current -@@ -392,7 +392,7 @@ public class RedStoneWireBlock extends Block { - protected void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { - if (!moved && !state.is(newState.getBlock())) { - super.onRemove(state, world, pos, newState, moved); -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - for (Direction direction : Direction.values()) { - world.updateNeighborsAt(pos.relative(direction), this); - } -@@ -404,7 +404,7 @@ public class RedStoneWireBlock extends Block { - this.updateSurroundingRedstone(world, pos, state, null, false); // Vanilla/Eigencraft - } - this.updateNeighborsOfNeighboringWires(world, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - } - -@@ -425,7 +425,7 @@ public class RedStoneWireBlock extends Block { - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - // Paper start - optimize redstone (Alternate Current) - // Alternate Current handles breaking of redstone wires in the WireHandler. - if (world.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) { -@@ -440,7 +440,7 @@ public class RedStoneWireBlock extends Block { - world.removeBlock(pos, false); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - private static boolean useExperimentalEvaluator(Level world) { -diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneLampBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneLampBlock.java -index ebb2aca86930a907a43445cfbc878e3cafaf6632..40392a4c6e975fce9dbb71e28d16a865f711a26d 100644 ---- a/src/main/java/net/minecraft/world/level/block/RedstoneLampBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RedstoneLampBlock.java -@@ -38,7 +38,7 @@ public class RedstoneLampBlock extends Block { - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag1 = (Boolean) state.getValue(RedstoneLampBlock.LIT); - - if (flag1 != world.hasNeighborSignal(pos)) { -@@ -54,7 +54,7 @@ public class RedstoneLampBlock extends Block { - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/RepeaterBlock.java b/src/main/java/net/minecraft/world/level/block/RepeaterBlock.java -index 007906dddcf4ae92db28aa3e22a87264a91a9bcb..fea77c0b95703cc38b203cd8a11121ed09673db0 100644 ---- a/src/main/java/net/minecraft/world/level/block/RepeaterBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RepeaterBlock.java -@@ -76,7 +76,7 @@ public class RepeaterBlock extends DiodeBlock { - if (direction == Direction.DOWN && !this.canSurviveOn(world, neighborPos, neighborState)) { - return Blocks.AIR.defaultBlockState(); - } else { -- return !world.isClientSide() && direction.getAxis() != state.getValue(FACING).getAxis() -+ return /*!world.isClientSide() &&*/ direction.getAxis() != state.getValue(FACING).getAxis() // Plazma - Remove persist 'isClientSide' flag - ? state.setValue(LOCKED, Boolean.valueOf(this.isLocked(world, pos, state))) - : super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random); - } -diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -index 2c5e394156dbf76107adb4913a094dfd4a598dd7..5f0037057f3ecf283d7acb662cf96f8212e5894a 100644 ---- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -@@ -78,13 +78,13 @@ public class RespawnAnchorBlock extends Block { - if ((Integer) state.getValue(RespawnAnchorBlock.CHARGE) == 0) { - return InteractionResult.PASS; - } else if (!RespawnAnchorBlock.canSetSpawn(world)) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.explode(state, world, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } else { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - ServerPlayer entityplayer = (ServerPlayer) player; - - if (entityplayer.getRespawnDimension() != world.dimension() || !pos.equals(entityplayer.getRespawnPosition())) { -@@ -97,7 +97,7 @@ public class RespawnAnchorBlock extends Block { - } - // Paper end - Add PlayerSetSpawnEvent - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.CONSUME; - } -diff --git a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java -index 2d3f425778302490dd3654d487cfa3cfed6fb9e8..0bc2a449f711f3c75858165af93588c56186a929 100644 ---- a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java -@@ -79,9 +79,9 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { - - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - world.scheduleTick(pos, (Block) this, 1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -@@ -91,9 +91,9 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { - tickView.scheduleTick(pos, (Fluid) Fluids.WATER, Fluids.WATER.getTickDelay(world)); - } - -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - tickView.scheduleTick(pos, (Block) this, 1); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return world.isClientSide ? null : createTickerHelper(type, BlockEntityType.SCULK_CATALYST, SculkCatalystBlockEntity::serverTick); -+ return /*world.isClientSide ? null :*/ createTickerHelper(type, BlockEntityType.SCULK_CATALYST, SculkCatalystBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 - - @Override - public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) { -- if (!world.isClientSide() && SculkSensorBlock.canActivate(state) && entity.getType() != EntityType.WARDEN) { -+ if (/*!world.isClientSide() &&*/ SculkSensorBlock.canActivate(state) && entity.getType() != EntityType.WARDEN) { // Plazma - Remove persist 'isClientSide' flag - // CraftBukkit start - org.bukkit.event.Cancellable cancellable; - if (entity instanceof Player) { -@@ -140,7 +140,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg - - @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())) { - if ((Integer) state.getValue(SculkSensorBlock.POWER) > 0 && !world.getBlockTicks().hasScheduledTick(pos, this)) { - world.setBlock(pos, (BlockState) state.setValue(SculkSensorBlock.POWER, 0), 18); - } -@@ -184,9 +184,9 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return !world.isClientSide ? createTickerHelper(type, BlockEntityType.SCULK_SENSOR, (world1, blockposition, iblockdata1, sculksensorblockentity) -> { -+ return /*!world.isClientSide ?*/ createTickerHelper(type, BlockEntityType.SCULK_SENSOR, (world1, blockposition, iblockdata1, sculksensorblockentity) -> { // Plazma - Remove persist 'isClientSide' flag - VibrationSystem.Ticker.tick(world1, sculksensorblockentity.getVibrationData(), sculksensorblockentity.getVibrationUser()); -- }) : null; -+ }); //: null; // Plazma - Remove persist 'isClientSide' flag - } - - @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 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 -@@ -157,8 +157,8 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return !world.isClientSide ? BaseEntityBlock.createTickerHelper(type, BlockEntityType.SCULK_SHRIEKER, (world1, blockposition, iblockdata1, sculkshriekerblockentity) -> { -+ return /*!world.isClientSide ?*/ BaseEntityBlock.createTickerHelper(type, BlockEntityType.SCULK_SHRIEKER, (world1, blockposition, iblockdata1, sculkshriekerblockentity) -> { // Plazma - Remove persist 'isClientSide' flag - VibrationSystem.Ticker.tick(world1, sculkshriekerblockentity.getVibrationData(), sculkshriekerblockentity.getVibrationUser()); -- }) : null; -+ }); //: null; // Plazma - Remove persist 'isClientSide' flag - } - } -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 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 -@@ -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) { -- if (!world.isClientSide && player.isCreative() && !shulkerBoxBlockEntity.isEmpty()) { -+ if (/*!world.isClientSide &&*/ player.isCreative() && !shulkerBoxBlockEntity.isEmpty()) { // Plazma - Remove persist 'isClientSide' flag - ItemStack itemStack = getColoredItemStack(this.getColor()); - itemStack.applyComponents(blockEntity.collectComponents()); - ItemEntity itemEntity = new ItemEntity(world, (double)pos.getX() + 0.5, (double)pos.getY() + 0.5, (double)pos.getZ() + 0.5, itemStack); -diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java -index b212fe323f048dab40c0ccbb9327c9fc73b9e03a..308a9143a25828b749a545e22a2cb8a3c91eb7e2 100644 ---- a/src/main/java/net/minecraft/world/level/block/SignBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java -@@ -98,7 +98,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo - SignApplicator signapplicator2 = signapplicator; - boolean flag = signapplicator2 != null && player.mayBuild(); - -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (flag && !tileentitysign.isWaxed() && !this.otherPlayerIsEditingSign(player, tileentitysign)) { - boolean flag1 = tileentitysign.isFacingFrontText(player); - -@@ -114,9 +114,11 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo - } else { - return InteractionResult.TRY_WITH_EMPTY_HAND; - } -+ /* // Plazma - Remove persist 'isClientSide' flag - } else { - return !flag && !tileentitysign.isWaxed() ? InteractionResult.CONSUME : InteractionResult.SUCCESS; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - } else { - return InteractionResult.PASS; - } -@@ -127,9 +129,11 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo - BlockEntity tileentity = world.getBlockEntity(pos); - - if (tileentity instanceof SignBlockEntity tileentitysign) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - Util.pauseInIde(new IllegalStateException("Expected to only call this on server")); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - boolean flag = tileentitysign.isFacingFrontText(player); - boolean flag1 = tileentitysign.executeClickCommandsIfPresent(player, world, pos, flag); -diff --git a/src/main/java/net/minecraft/world/level/block/SimpleWaterloggedBlock.java b/src/main/java/net/minecraft/world/level/block/SimpleWaterloggedBlock.java -index 581475cf6642447ed83dcc1bd9551995dbb10c55..0a5e2be4e249f92fd950b03c7de63ae1ecdc9220 100644 ---- a/src/main/java/net/minecraft/world/level/block/SimpleWaterloggedBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/SimpleWaterloggedBlock.java -@@ -24,10 +24,10 @@ public interface SimpleWaterloggedBlock extends BucketPickup, LiquidBlockContain - @Override - default boolean placeLiquid(LevelAccessor world, BlockPos pos, BlockState state, FluidState fluidState) { - if (!state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) { -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - world.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)), 3); - world.scheduleTick(pos, fluidState.getType(), fluidState.getType().getTickDelay(world)); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return true; - } else { -diff --git a/src/main/java/net/minecraft/world/level/block/SmallDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/SmallDripleafBlock.java -index 62407b0f9fb11671b2d9c741d4ec17020528be2c..1e1cf238c9e91ae32f6fdda9756d6d34e538397d 100644 ---- a/src/main/java/net/minecraft/world/level/block/SmallDripleafBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/SmallDripleafBlock.java -@@ -67,13 +67,13 @@ public class SmallDripleafBlock extends DoublePlantBlock implements Bonemealable - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { -- if (!world.isClientSide()) { -+ //if (!world.isClientSide()) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockPos = pos.above(); - BlockState blockState = DoublePlantBlock.copyWaterloggedFrom( - world, blockPos, this.defaultBlockState().setValue(HALF, DoubleBlockHalf.UPPER).setValue(FACING, state.getValue(FACING)) - ); - world.setBlock(blockPos, blockState, 3); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/SmithingTableBlock.java b/src/main/java/net/minecraft/world/level/block/SmithingTableBlock.java -index 43dc3d2c419a8b4a76de49a1e625076741a98c73..100a9cfb1548bc451ee16749f32747ab04244eca 100644 ---- a/src/main/java/net/minecraft/world/level/block/SmithingTableBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/SmithingTableBlock.java -@@ -37,11 +37,11 @@ public class SmithingTableBlock extends CraftingTableBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_SMITHING_TABLE); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - return InteractionResult.SUCCESS; - } -diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -index ec04fcc23c86d34a6dc1eaadda7f9d876f3d8ffe..ac52cdacf66dcf48213aaa327360c5a01886957b 100644 ---- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -@@ -101,7 +101,7 @@ public class SnifferEggBlock extends Block { - @Override - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - boolean bl = hatchBoost(world, pos); -- if (!world.isClientSide() && bl) { -+ if (/*!world.isClientSide() &&*/ bl) { // Plazma - Remove persist 'isClientSide' flag - world.levelEvent(3009, pos, 0); - } - -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 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 { - @Nullable - @Override - public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { -- return createTickerHelper(type, BlockEntityType.MOB_SPAWNER, world.isClientSide ? SpawnerBlockEntity::clientTick : SpawnerBlockEntity::serverTick); -+ return createTickerHelper(type, BlockEntityType.MOB_SPAWNER, /*world.isClientSide ? SpawnerBlockEntity::clientTick :*/ SpawnerBlockEntity::serverTick); // Plazma - Remove persist 'isClientSide' flag - } - - // 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 e93d1eba4fcd02e15287a1a66da94e695806a470..32c240d3d7739b1a740bdec010d6f95e2cc250ae 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 { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (player.openMenu(state.getMenuProvider(world, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation - player.awardStat(Stats.INTERACT_WITH_STONECUTTER); - } // Paper - Fix InventoryOpenEvent cancellation -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (placer != null) { - BlockEntity blockEntity = world.getBlockEntity(pos); - if (blockEntity instanceof StructureBlockEntity) { - ((StructureBlockEntity)blockEntity).createdBy(placer); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @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 -+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java -@@ -130,7 +130,7 @@ public class TargetBlock extends Block { - - @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 (state.getValue(OUTPUT_POWER) > 0 && !world.getBlockTicks().hasScheduledTick(pos, this)) { - world.setBlock(pos, state.setValue(OUTPUT_POWER, Integer.valueOf(0)), 18); - } -diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index 2cbe2053dd5d0bcdcd89de69762c77b400b8697a..b0ffae3d3c21c9c8118f9eafae30ed42a8a75033 100644 ---- a/src/main/java/net/minecraft/world/level/block/TntBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java -@@ -82,7 +82,7 @@ public class TntBlock extends Block { - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide() && !player.isCreative() && (Boolean) state.getValue(TntBlock.UNSTABLE) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.BLOCK_BREAK, player, null)) { // CraftBukkit - TNTPrimeEvent -+ if (/*!world.isClientSide() &&*/ !player.isCreative() && (Boolean) state.getValue(TntBlock.UNSTABLE) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.BLOCK_BREAK, player, null)) { // CraftBukkit - TNTPrimeEvent // Plazma - Remove persist 'isClientSide' flag - TntBlock.explode(world, pos); - } - -@@ -110,13 +110,13 @@ public class TntBlock extends Block { - } - - private static void explode(Level world, BlockPos pos, @Nullable LivingEntity igniter) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, igniter); - - world.addFreshEntity(entitytntprimed); - world.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); - world.gameEvent((Entity) igniter, (Holder) GameEvent.PRIME_FUSE, pos); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java -index 872e52e13293a99d45f93d90d8fa7f6aa99d1f3a..d3716e33a8be0d894972ef8ed1624bf311fccb4d 100644 ---- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java -@@ -140,7 +140,7 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag1 = world.hasNeighborSignal(pos); - - if (flag1 != (Boolean) state.getValue(TrapDoorBlock.POWERED)) { -@@ -187,7 +187,7 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW - } - } - -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -index 74cce7874809dcbce2718ec3840bb6bb3127e871..b7e8431198be8ed5a7f221e43d5a92a081d09965 100644 ---- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -@@ -100,7 +100,7 @@ public class TripWireBlock extends Block { - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { - if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent disarming tripwires -- if (!world.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { -+ if (/*!world.isClientSide &&*/ !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { // Plazma - Remove persist 'isClientSide' flag - world.setBlock(pos, (BlockState) state.setValue(TripWireBlock.DISARMED, true), 4); - world.gameEvent((Entity) player, (Holder) GameEvent.SHEAR, pos); - } -@@ -149,11 +149,11 @@ public class TripWireBlock extends Block { - protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { - if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent tripwires from detecting collision - 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) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - if (!(Boolean) state.getValue(TripWireBlock.POWERED)) { - this.checkPressed(world, pos, List.of(entity)); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - @Override -diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java -index cf86448e2067712863d30c9aecc48daedefd227f..a38b8104a6a27164f791d732f027af3c4eee4a21 100644 ---- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java -@@ -162,7 +162,7 @@ public class TurtleEggBlock extends Block { - - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { -- if (TurtleEggBlock.onSand(world, pos) && !world.isClientSide) { -+ if (TurtleEggBlock.onSand(world, pos) /*&& !world.isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - world.levelEvent(2012, pos, 15); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java b/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java -index 11d6427682d8778d1cf668ee4c1d5760af2c185e..325582b5286dd3e81237a0d3c53de2eb2d7ea194 100644 ---- a/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/WitherSkullBlock.java -@@ -63,7 +63,7 @@ public class WitherSkullBlock extends SkullBlock { - - public static void checkSpawn(Level world, BlockPos pos, SkullBlockEntity blockEntity) { - if (world.captureBlockStates) return; // CraftBukkit -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { - BlockState iblockdata = blockEntity.getBlockState(); - boolean flag = iblockdata.is(Blocks.WITHER_SKELETON_SKULL) || iblockdata.is(Blocks.WITHER_SKELETON_WALL_SKULL); - -@@ -101,11 +101,11 @@ public class WitherSkullBlock extends SkullBlock { - - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - public static boolean canSpawnMob(Level world, BlockPos pos, ItemStack stack) { -- return stack.is(Items.WITHER_SKELETON_SKULL) && pos.getY() >= world.getMinY() + 2 && world.getDifficulty() != Difficulty.PEACEFUL && !world.isClientSide ? WitherSkullBlock.getOrCreateWitherBase().find(world, pos) != null : false; -+ return stack.is(Items.WITHER_SKELETON_SKULL) && pos.getY() >= world.getMinY() + 2 && world.getDifficulty() != Difficulty.PEACEFUL && /*!world.isClientSide ?*/ WitherSkullBlock.getOrCreateWitherBase().find(world, pos) != null; //: false; // Plazma - Remove persist 'isClientSide' flag - } - - private static BlockPattern getOrCreateWitherFull() { -diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 98e3d0a6f1be8cef8678b4048a3a484012092f08..c8ac3df678bc62985972d520f84f26a44ddd6970 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -154,7 +154,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - BeaconBlockEntity.this.levels = value; - break; - case 1: -- if (!BeaconBlockEntity.this.level.isClientSide && !BeaconBlockEntity.this.beamSections.isEmpty()) { -+ if (/*!BeaconBlockEntity.this.level.isClientSide &&*/ !BeaconBlockEntity.this.beamSections.isEmpty()) { // Plazma - Remove persist 'isClientSide' flag - BeaconBlockEntity.playSound(BeaconBlockEntity.this.level, BeaconBlockEntity.this.worldPosition, SoundEvents.BEACON_POWER_SELECT); - } - -@@ -254,7 +254,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - boolean flag = i1 > 0; - - blockEntity.beamSections = blockEntity.checkingBeamSections; -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag1 = blockEntity.levels > 0; - - if (!flag && flag1) { -@@ -269,7 +269,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - } else if (flag && !flag1) { - BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_DEACTIVATE); - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - } -@@ -405,7 +405,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - } - private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable Holder primaryEffect, @Nullable Holder secondaryEffect, @Nullable BeaconBlockEntity blockEntity) { - // Paper end - Custom beacon ranges -- if (!world.isClientSide && primaryEffect != null) { -+ if (/*!world.isClientSide &&*/ primaryEffect != null) { // Plazma - Remove persist 'isClientSide' flag - double d0 = (double) (beaconLevel * 10 + 10); - 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..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 -@@ -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); - } - -- if (!this.level.isClientSide) { -+ //if (!this.level.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - Iterator iterator = this.nearbyEntities.iterator(); - - while (iterator.hasNext()) { -@@ -129,7 +131,7 @@ public class BellBlockEntity extends BlockEntity { - entityliving.getBrain().setMemory(MemoryModuleType.HEARD_BELL_TIME, this.level.getGameTime()); // CraftBukkit - decompile error - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 -@@ -212,7 +212,7 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable - } - - public void wobble(DecoratedPotBlockEntity.WobbleStyle wobbleType) { -- if (this.level != null && !this.level.isClientSide()) { -+ if (this.level != null /*&& !this.level.isClientSide()*/) { // Plazma - Remove persist 'isClientSide' flag - this.level.blockEvent(this.getBlockPos(), this.getBlockState().getBlock(), 1, wobbleType.ordinal()); - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index aeeb8af68ea43ae6c93952610918d77b1593ed54..82606b6a0aac46588322f036e824da621aa2e6c4 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -@@ -194,9 +194,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen - // Paper end - Perf: Optimize Hoppers - - private static boolean tryMoveItems(Level world, BlockPos pos, BlockState state, HopperBlockEntity blockEntity, BooleanSupplier booleansupplier) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide) { - return false; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - if (!blockEntity.isOnCooldown() && (Boolean) state.getValue(HopperBlock.ENABLED)) { - boolean flag = false; - -@@ -217,7 +219,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen - } - - return false; -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } - - 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 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 - } - - public void popOutTheItem() { -- if (this.level != null && !this.level.isClientSide) { -+ if (this.level != null /*&& !this.level.isClientSide*/) { // Plazma - Remove persist 'isClientSide' flag - 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 -+++ b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java -@@ -151,9 +151,11 @@ public class StructureBlockEntity extends BlockEntity { - if (!player.canUseGameMasterBlocks()) { - return false; - } else { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (player.getCommandSenderWorld().isClientSide) { - player.openStructureBlock(this); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - return true; - } -@@ -416,7 +418,7 @@ public class StructureBlockEntity extends BlockEntity { - } - - public boolean isStructureLoadable() { -- if (this.mode == StructureMode.LOAD && !this.level.isClientSide && this.structureName != null) { -+ if (this.mode == StructureMode.LOAD && /*!this.level.isClientSide &&*/ this.structureName != null) { // Plazma - Remove persist 'isClientSide' flag - ServerLevel serverLevel = (ServerLevel)this.level; - StructureTemplateManager structureTemplateManager = serverLevel.getStructureManager(); - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 68fd5d3f6553af8af867e34946cb8b3f852da985..2f9597e6601d6e21187fdab5536a7c48617c4865 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -122,11 +122,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { - } - - public static void triggerCooldown(Level world, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - blockEntity.teleportCooldown = 40; - world.blockEvent(pos, state.getBlock(), 1, 0); - setChanged(world, pos, state); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java -index 4045ae665450f6e3f5630cb25cc53be850afd1a8..ddc6b6b26dec60cc6a4111cf00fa0284ee582ad5 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java -@@ -134,7 +134,7 @@ public class VaultBlockEntity extends BlockEntity { - - @Nullable - public VaultServerData getServerData() { -- return this.level != null && !this.level.isClientSide ? this.serverData : null; -+ return this.level != null /*&& !this.level.isClientSide*/ ? this.serverData : null; // Plazma - Remove persist 'isClientSide' flag - } - - 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 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 -@@ -86,7 +86,7 @@ public class MovingPistonBlock extends BaseEntityBlock { - - @Override - protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { -- if (!world.isClientSide && world.getBlockEntity(pos) == null) { -+ if (/*!world.isClientSide &&*/ world.getBlockEntity(pos) == null) { // Plazma - Remove persist 'isClientSide' flag - world.removeBlock(pos, false); - return InteractionResult.CONSUME; - } else { -diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index 4b51472502d08ea357da437afeb4b581979e9cff..fb5e18b7be62ff07af65229b1a38b6d6e0c1d8c9 100644 ---- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -@@ -108,24 +108,24 @@ public class PistonBaseBlock extends DirectionalBlock { - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.checkIfExtend(world, pos, state); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - - @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - this.checkIfExtend(world, pos, state); -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - } - - @Override - protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - if (!oldState.is(state.getBlock())) { -- if (!world.isClientSide && world.getBlockEntity(pos) == null) { -+ if (/*!world.isClientSide &&*/ world.getBlockEntity(pos) == null) { // Plazma - Remove persist 'isClientSide' flag - this.checkIfExtend(world, pos, state); - } - -@@ -224,7 +224,7 @@ public class PistonBaseBlock extends DirectionalBlock { - // Paper end - Protect Bedrock and End Portal/Frames from being destroyed - BlockState iblockdata1 = (BlockState) state.setValue(PistonBaseBlock.EXTENDED, true); - -- if (!world.isClientSide) { -+ //if (!world.isClientSide) { // Plazma - Remove persist 'isClientSide' flag - boolean flag = this.getNeighborSignal(world, pos, enumdirection); - - if (flag && (type == 1 || type == 2)) { -@@ -235,7 +235,7 @@ public class PistonBaseBlock extends DirectionalBlock { - if (!flag && type == 0) { - return false; - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - - 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 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 { - - @Override - public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { -- if (!world.isClientSide && player.getAbilities().instabuild) { -+ if (/*!world.isClientSide &&*/ player.getAbilities().instabuild) { // Plazma - Remove persist 'isClientSide' flag - BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite()); - if (this.isFittingBase(state, world.getBlockState(blockPos))) { - world.destroyBlock(blockPos, false); -diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -index e1c9a961064887070b29207efd7af47884f8dc29..6feb7f915dac585916ac02a7f4a83b4783543cc9 100644 ---- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -@@ -272,7 +272,7 @@ public class PistonMovingBlockEntity extends BlockEntity { - } - - public void finalTick() { -- if (this.level != null && (this.progressO < 1.0F || this.level.isClientSide)) { -+ if (this.level != null && (this.progressO < 1.0F /*|| this.level.isClientSide*/)) { // Plazma - Remove persist 'isClientSide' flag - this.progress = 1.0F; - this.progressO = this.progress; - this.level.removeBlockEntity(this.worldPosition); -@@ -302,9 +302,11 @@ public class PistonMovingBlockEntity extends BlockEntity { - blockEntity.lastTicked = world.getGameTime(); - blockEntity.progressO = blockEntity.progress; - if (blockEntity.progressO >= 1.0F) { -+ /* // Plazma - Remove persist 'isClientSide' flag - if (world.isClientSide && blockEntity.deathTicks < 5) { - blockEntity.deathTicks++; - } else { -+ */ // Plazma - Remove persist 'isClientSide' flag - world.removeBlockEntity(pos); - blockEntity.setRemoved(); - if (world.getBlockState(pos).is(Blocks.MOVING_PISTON)) { -@@ -323,7 +325,7 @@ public class PistonMovingBlockEntity extends BlockEntity { - ); - } - } -- } -+ //} // Plazma - Remove persist 'isClientSide' flag - } else { - 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 00ea1c2037c7c7780764bfcc3e07b6554e910db2..2144652adb3259a4d5113fe3337e13280cda3f12 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -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' flags - iblockdata1.onRemove(this.level, blockposition, iblockdata, flag); - } else if (!iblockdata1.is(block) && flag3) { - this.removeBlockEntity(blockposition); -@@ -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' flags - iblockdata.onPlace(this.level, blockposition, iblockdata1, flag); - } - -@@ -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' 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 d9f9d4abaec00335abe80de26419aef676b0b076..030cb1f4e07b12b30cbcca5e808728adffe08a21 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java -@@ -128,10 +128,12 @@ public class CraftMerchantCustom implements CraftMerchant { - public void overrideOffers(MerchantOffers offers) { - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isClientSide() { - 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 -+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java -@@ -322,10 +322,12 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel { - return this.handle.getUncachedNoiseBiome(biomeX, biomeY, biomeZ); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isClientSide() { - return this.handle.isClientSide(); - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public int getSeaLevel() { -diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -index e8a73d34dbb372581b03018aade170a31c266099..6f540ae099e51e91e5cb86d7b938369f8292a47b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -@@ -163,10 +163,12 @@ public class DummyGeneratorAccess implements WorldGenLevel { - throw new UnsupportedOperationException("Not supported yet."); - } - -+ /* // Plazma - Remove persist 'isClientSide' flag - @Override - public boolean isClientSide() { - return false; - } -+ */ // Plazma - Remove persist 'isClientSide' flag - - @Override - public int getSeaLevel() { diff --git a/patches/server/0025-Add-entity-spawn-deadlock-timer.patch b/patches/server/features/0025-Add-entity-spawn-deadlock-timer.patch similarity index 100% rename from patches/server/0025-Add-entity-spawn-deadlock-timer.patch rename to patches/server/features/0025-Add-entity-spawn-deadlock-timer.patch diff --git a/patches/server/0026-Lithium-HashedList.patch b/patches/server/features/0026-Lithium-HashedList.patch similarity index 100% rename from patches/server/0026-Lithium-HashedList.patch rename to patches/server/features/0026-Lithium-HashedList.patch diff --git a/patches/server/0031-Implement-FreedomChat.patch b/patches/server/features/0031-Implement-FreedomChat.patch similarity index 100% rename from patches/server/0031-Implement-FreedomChat.patch rename to patches/server/features/0031-Implement-FreedomChat.patch diff --git a/patches/server/0035-Implement-Rail-Optimazition.patch b/patches/server/features/0035-Implement-Rail-Optimazition.patch similarity index 100% rename from patches/server/0035-Implement-Rail-Optimazition.patch rename to patches/server/features/0035-Implement-Rail-Optimazition.patch diff --git a/patches/server/0037-Configurable-RandomSource-factory-provider.patch b/patches/server/features/0037-Configurable-RandomSource-factory-provider.patch similarity index 100% rename from patches/server/0037-Configurable-RandomSource-factory-provider.patch rename to patches/server/features/0037-Configurable-RandomSource-factory-provider.patch diff --git a/patches/server/0043-Process-pathfinding-asynchronously.patch b/patches/server/features/0043-Process-pathfinding-asynchronously.patch similarity index 100% rename from patches/server/0043-Process-pathfinding-asynchronously.patch rename to patches/server/features/0043-Process-pathfinding-asynchronously.patch diff --git a/patches/server/0044-Implement-alternative-noise-chunk-generator.patch b/patches/server/features/0044-Implement-alternative-noise-chunk-generator.patch similarity index 100% rename from patches/server/0044-Implement-alternative-noise-chunk-generator.patch rename to patches/server/features/0044-Implement-alternative-noise-chunk-generator.patch diff --git a/patches/server/0045-Reduce-allocations.patch b/patches/server/features/0045-Reduce-allocations.patch similarity index 100% rename from patches/server/0045-Reduce-allocations.patch rename to patches/server/features/0045-Reduce-allocations.patch diff --git a/patches/server/0046-Hashed-rcon-password.patch b/patches/server/features/0046-Hashed-rcon-password.patch similarity index 100% rename from patches/server/0046-Hashed-rcon-password.patch rename to patches/server/features/0046-Hashed-rcon-password.patch diff --git a/patches/server/0057-Ticking-Controller.patch b/patches/server/features/0057-Ticking-Controller.patch similarity index 100% rename from patches/server/0057-Ticking-Controller.patch rename to patches/server/features/0057-Ticking-Controller.patch diff --git a/patches/server/0064-Bundle-as-quivers.patch b/patches/server/features/0064-Bundle-as-quivers.patch similarity index 100% rename from patches/server/0064-Bundle-as-quivers.patch rename to patches/server/features/0064-Bundle-as-quivers.patch diff --git a/patches/unapplied/server/0057-Implement-CarpetFixes.patch b/patches/server/features/outdated/0057-Implement-CarpetFixes.patch similarity index 100% rename from patches/unapplied/server/0057-Implement-CarpetFixes.patch rename to patches/server/features/outdated/0057-Implement-CarpetFixes.patch diff --git a/patches/server/0032-Reset-dirty-flag-when-loading-maps-from-the-disk.patch b/patches/server/features/sparklypaper/0032-Reset-dirty-flag-when-loading-maps-from-the-disk.patch similarity index 100% rename from patches/server/0032-Reset-dirty-flag-when-loading-maps-from-the-disk.patch rename to patches/server/features/sparklypaper/0032-Reset-dirty-flag-when-loading-maps-from-the-disk.patch diff --git a/patches/server/0033-Allow-throttling-hopper-checks-if-the-target-contain.patch b/patches/server/features/sparklypaper/0033-Allow-throttling-hopper-checks-if-the-target-contain.patch similarity index 100% rename from patches/server/0033-Allow-throttling-hopper-checks-if-the-target-contain.patch rename to patches/server/features/sparklypaper/0033-Allow-throttling-hopper-checks-if-the-target-contain.patch diff --git a/patches/server/0050-Port-minor-SparklyPaper-patches.patch b/patches/server/features/sparklypaper/0050-Port-minor-SparklyPaper-patches.patch similarity index 100% rename from patches/server/0050-Port-minor-SparklyPaper-patches.patch rename to patches/server/features/sparklypaper/0050-Port-minor-SparklyPaper-patches.patch diff --git a/patches/server/0051-SparklyPaper-Optimize-framed-map-tracker-ticking.patch b/patches/server/features/sparklypaper/0051-SparklyPaper-Optimize-framed-map-tracker-ticking.patch similarity index 100% rename from patches/server/0051-SparklyPaper-Optimize-framed-map-tracker-ticking.patch rename to patches/server/features/sparklypaper/0051-SparklyPaper-Optimize-framed-map-tracker-ticking.patch diff --git a/patches/server/0052-SparklyPaper-Skip-executeTick-check-if-there-s-no-ta.patch b/patches/server/features/sparklypaper/0052-SparklyPaper-Skip-executeTick-check-if-there-s-no-ta.patch similarity index 100% rename from patches/server/0052-SparklyPaper-Skip-executeTick-check-if-there-s-no-ta.patch rename to patches/server/features/sparklypaper/0052-SparklyPaper-Skip-executeTick-check-if-there-s-no-ta.patch diff --git a/patches/server/0053-SparklyPaper-MSPT-by-World.patch b/patches/server/features/sparklypaper/0053-SparklyPaper-MSPT-by-World.patch similarity index 100% rename from patches/server/0053-SparklyPaper-MSPT-by-World.patch rename to patches/server/features/sparklypaper/0053-SparklyPaper-MSPT-by-World.patch diff --git a/patches/server/0054-SparklyPaper-Optimize-farm-check.patch b/patches/server/features/sparklypaper/0054-SparklyPaper-Optimize-farm-check.patch similarity index 100% rename from patches/server/0054-SparklyPaper-Optimize-farm-check.patch rename to patches/server/features/sparklypaper/0054-SparklyPaper-Optimize-farm-check.patch diff --git a/patches/server/0055-SparklyPaper-Optimize-season-check.patch b/patches/server/features/sparklypaper/0055-SparklyPaper-Optimize-season-check.patch similarity index 100% rename from patches/server/0055-SparklyPaper-Optimize-season-check.patch rename to patches/server/features/sparklypaper/0055-SparklyPaper-Optimize-season-check.patch diff --git a/patches/server/0056-SparklyPaper-Optimize-tickingBlockEntity.patch b/patches/server/features/sparklypaper/0056-SparklyPaper-Optimize-tickingBlockEntity.patch similarity index 100% rename from patches/server/0056-SparklyPaper-Optimize-tickingBlockEntity.patch rename to patches/server/features/sparklypaper/0056-SparklyPaper-Optimize-tickingBlockEntity.patch diff --git a/patches/unapplied/sparklypaper/server/0012-Revert-Fix-MC-117075-Block-entity-unload-lag-spike.patch b/patches/server/features/sparklypaper/unapplied/0012-Revert-Fix-MC-117075-Block-entity-unload-lag-spike.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0012-Revert-Fix-MC-117075-Block-entity-unload-lag-spike.patch rename to patches/server/features/sparklypaper/unapplied/0012-Revert-Fix-MC-117075-Block-entity-unload-lag-spike.patch diff --git a/patches/unapplied/sparklypaper/server/0014-Optimize-tickBlockEntities.patch b/patches/server/features/sparklypaper/unapplied/0014-Optimize-tickBlockEntities.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0014-Optimize-tickBlockEntities.patch rename to patches/server/features/sparklypaper/unapplied/0014-Optimize-tickBlockEntities.patch diff --git a/patches/unapplied/sparklypaper/server/0018-Helpful-NMS-packet-changes.patch b/patches/server/features/sparklypaper/unapplied/0018-Helpful-NMS-packet-changes.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0018-Helpful-NMS-packet-changes.patch rename to patches/server/features/sparklypaper/unapplied/0018-Helpful-NMS-packet-changes.patch diff --git a/patches/unapplied/sparklypaper/server/0023-Parallel-world-ticking.patch b/patches/server/features/sparklypaper/unapplied/0023-Parallel-world-ticking.patch similarity index 100% rename from patches/unapplied/sparklypaper/server/0023-Parallel-world-ticking.patch rename to patches/server/features/sparklypaper/unapplied/0023-Parallel-world-ticking.patch diff --git a/patches/unapplied/sparklypaper/removed/server/0003-Optimize-entity-coordinate-key.patch b/patches/server/features/sparklypaper/unapplied/removed/0003-Optimize-entity-coordinate-key.patch similarity index 100% rename from patches/unapplied/sparklypaper/removed/server/0003-Optimize-entity-coordinate-key.patch rename to patches/server/features/sparklypaper/unapplied/removed/0003-Optimize-entity-coordinate-key.patch diff --git a/patches/unapplied/sparklypaper/removed/server/0009-Avoid-unnecessary-ItemFrame-getItem-calls.patch b/patches/server/features/sparklypaper/unapplied/removed/0009-Avoid-unnecessary-ItemFrame-getItem-calls.patch similarity index 100% rename from patches/unapplied/sparklypaper/removed/server/0009-Avoid-unnecessary-ItemFrame-getItem-calls.patch rename to patches/server/features/sparklypaper/unapplied/removed/0009-Avoid-unnecessary-ItemFrame-getItem-calls.patch diff --git a/patches/unapplied/sparklypaper/removed/server/0016-Only-check-thundering-once-per-world-instead-for-eve.patch b/patches/server/features/sparklypaper/unapplied/removed/0016-Only-check-thundering-once-per-world-instead-for-eve.patch similarity index 100% rename from patches/unapplied/sparklypaper/removed/server/0016-Only-check-thundering-once-per-world-instead-for-eve.patch rename to patches/server/features/sparklypaper/unapplied/removed/0016-Only-check-thundering-once-per-world-instead-for-eve.patch diff --git a/patches/unapplied/sparklypaper/removed/server/0017-Optimize-heavy-EntityLookup.ArrayIterable.-init-call.patch b/patches/server/features/sparklypaper/unapplied/removed/0017-Optimize-heavy-EntityLookup.ArrayIterable.-init-call.patch similarity index 100% rename from patches/unapplied/sparklypaper/removed/server/0017-Optimize-heavy-EntityLookup.ArrayIterable.-init-call.patch rename to patches/server/features/sparklypaper/unapplied/removed/0017-Optimize-heavy-EntityLookup.ArrayIterable.-init-call.patch diff --git a/patches/unapplied/sparklypaper/removed/server/0019-BlockEntityTickersList-optimization-tests.patch b/patches/server/features/sparklypaper/unapplied/removed/0019-BlockEntityTickersList-optimization-tests.patch similarity index 100% rename from patches/unapplied/sparklypaper/removed/server/0019-BlockEntityTickersList-optimization-tests.patch rename to patches/server/features/sparklypaper/unapplied/removed/0019-BlockEntityTickersList-optimization-tests.patch diff --git a/patches/unapplied/server/0022-Ignore-useless-entity-packets.patch b/patches/server/outdated/0022-Ignore-useless-entity-packets.patch similarity index 100% rename from patches/unapplied/server/0022-Ignore-useless-entity-packets.patch rename to patches/server/outdated/0022-Ignore-useless-entity-packets.patch diff --git a/patches/unapplied/server/dropped/0032-Optimize-spigot-event-bus.patch b/patches/server/outdated/0032-Optimize-spigot-event-bus.patch similarity index 100% rename from patches/unapplied/server/dropped/0032-Optimize-spigot-event-bus.patch rename to patches/server/outdated/0032-Optimize-spigot-event-bus.patch diff --git a/patches/unapplied/server/dropped/0037-Implement-FerriteCore.patch b/patches/server/outdated/0037-Implement-FerriteCore.patch similarity index 100% rename from patches/unapplied/server/dropped/0037-Implement-FerriteCore.patch rename to patches/server/outdated/0037-Implement-FerriteCore.patch diff --git a/patches/unapplied/server/purpur/0013-LivingEntity-safeFallDistance.patch b/patches/server/outdated/purpur/0013-LivingEntity-safeFallDistance.patch similarity index 100% rename from patches/unapplied/server/purpur/0013-LivingEntity-safeFallDistance.patch rename to patches/server/outdated/purpur/0013-LivingEntity-safeFallDistance.patch diff --git a/patches/unapplied/server/purpur/0040-End-gateway-should-check-if-entity-can-use-portal.patch b/patches/server/outdated/purpur/0040-End-gateway-should-check-if-entity-can-use-portal.patch similarity index 100% rename from patches/unapplied/server/purpur/0040-End-gateway-should-check-if-entity-can-use-portal.patch rename to patches/server/outdated/purpur/0040-End-gateway-should-check-if-entity-can-use-portal.patch diff --git a/patches/unapplied/server/purpur/0082-LivingEntity-broadcastItemBreak.patch b/patches/server/outdated/purpur/0082-LivingEntity-broadcastItemBreak.patch similarity index 100% rename from patches/unapplied/server/purpur/0082-LivingEntity-broadcastItemBreak.patch rename to patches/server/outdated/purpur/0082-LivingEntity-broadcastItemBreak.patch diff --git a/patches/unapplied/server/purpur/0094-Allow-infinite-and-mending-enchantments-together.patch b/patches/server/outdated/purpur/0094-Allow-infinite-and-mending-enchantments-together.patch similarity index 100% rename from patches/unapplied/server/purpur/0094-Allow-infinite-and-mending-enchantments-together.patch rename to patches/server/outdated/purpur/0094-Allow-infinite-and-mending-enchantments-together.patch diff --git a/patches/unapplied/server/purpur/0142-Allow-infinity-on-crossbows.patch b/patches/server/outdated/purpur/0142-Allow-infinity-on-crossbows.patch similarity index 100% rename from patches/unapplied/server/purpur/0142-Allow-infinity-on-crossbows.patch rename to patches/server/outdated/purpur/0142-Allow-infinity-on-crossbows.patch diff --git a/patches/unapplied/server/purpur/0220-Potion-NamespacedKey.patch b/patches/server/outdated/purpur/0220-Potion-NamespacedKey.patch similarity index 100% rename from patches/unapplied/server/purpur/0220-Potion-NamespacedKey.patch rename to patches/server/outdated/purpur/0220-Potion-NamespacedKey.patch diff --git a/patches/unapplied/server/purpur/0236-Configurable-food-attributes.patch b/patches/server/outdated/purpur/0236-Configurable-food-attributes.patch similarity index 100% rename from patches/unapplied/server/purpur/0236-Configurable-food-attributes.patch rename to patches/server/outdated/purpur/0236-Configurable-food-attributes.patch diff --git a/patches/unapplied/server/purpur/0255-Send-client-custom-name-of-BE.patch b/patches/server/outdated/purpur/0255-Send-client-custom-name-of-BE.patch similarity index 100% rename from patches/unapplied/server/purpur/0255-Send-client-custom-name-of-BE.patch rename to patches/server/outdated/purpur/0255-Send-client-custom-name-of-BE.patch diff --git a/patches/unapplied/server/purpur/0263-Allay-respect-item-NBT.patch b/patches/server/outdated/purpur/0263-Allay-respect-item-NBT.patch similarity index 100% rename from patches/unapplied/server/purpur/0263-Allay-respect-item-NBT.patch rename to patches/server/outdated/purpur/0263-Allay-respect-item-NBT.patch diff --git a/patches/unapplied/server/purpur/0271-Add-item-packet-serialize-event.patch b/patches/server/outdated/purpur/0271-Add-item-packet-serialize-event.patch similarity index 100% rename from patches/unapplied/server/purpur/0271-Add-item-packet-serialize-event.patch rename to patches/server/outdated/purpur/0271-Add-item-packet-serialize-event.patch diff --git a/patches/unapplied/server/purpur/0282-Add-mending-multiplier.patch b/patches/server/outdated/purpur/0282-Add-mending-multiplier.patch similarity index 100% rename from patches/unapplied/server/purpur/0282-Add-mending-multiplier.patch rename to patches/server/outdated/purpur/0282-Add-mending-multiplier.patch diff --git a/patches/unapplied/server/purpur/0292-Add-hover-lines-API.patch b/patches/server/outdated/purpur/0292-Add-hover-lines-API.patch similarity index 100% rename from patches/unapplied/server/purpur/0292-Add-hover-lines-API.patch rename to patches/server/outdated/purpur/0292-Add-hover-lines-API.patch diff --git a/patches/server/0015-Add-missing-Pufferfish-configurations.patch b/patches/server/pufferfish/0015-Add-missing-Pufferfish-configurations.patch similarity index 100% rename from patches/server/0015-Add-missing-Pufferfish-configurations.patch rename to patches/server/pufferfish/0015-Add-missing-Pufferfish-configurations.patch diff --git a/patches/unapplied/server/0004-Build-System-Changes.patch b/patches/unapplied/server/0004-Build-System-Changes.patch deleted file mode 100644 index f63d90b..0000000 --- a/patches/unapplied/server/0004-Build-System-Changes.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Sun, 14 Jan 2024 19:51:19 +0900 -Subject: [PATCH] Build System Changes - - -diff --git a/build.gradle.kts b/build.gradle.kts -index 624588207afdc52adae14e5de3d18fe1c330d832..a40dc8b2560b8cd124d961f3dfd5865efd2a3b9e 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -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 - Rebrand -- 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 -- implementation("net.minecrell:terminalconsoleappender:1.3.0") -- implementation("net.kyori:adventure-text-serializer-ansi:4.17.0") // Keep in sync with adventureVersion from Paper-API build file -- /* -- Required to add the missing Log4j2Plugins.dat file from log4j-core -- which has been removed by Mojang. Without it, log4j has to classload -- all its classes to check if they are plugins. -- Scanning takes about 1-2 seconds so adding this speeds up the server start. -- */ -- implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation -- log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins -- runtimeOnly(log4jPlugins.output) -- alsoShade(log4jPlugins.output) -- implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol -- // Paper end -- implementation("org.apache.logging.log4j:log4j-iostreams:2.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.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 -- implementation("com.velocitypowered:velocity-native:3.3.0-SNAPSHOT") { -- isTransitive = false -- } -- // Paper end - Use Velocity cipher -+ 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) -+ implementation(common.log4j.stream) - -- runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6") -- runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") -- runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") -+ implementation(common.log4j) -+ log4jPlugins.annotationProcessorConfigurationName(common.log4j) -+ runtimeOnly(log4jPlugins.output) // diff on change -+ alsoShade(log4jPlugins.output) // diff on change - -- // Pufferfish start -- implementation("org.yaml:snakeyaml:1.32") -- implementation ("com.github.carleslc.Simple-YAML:Simple-Yaml:1.8.4") { // Purpur - Fix pufferfish issues -- exclude(group="org.yaml", module="snakeyaml") -- } -- // Pufferfish end -+ runtimeOnly(server.bundles.runtime) -+ -+ implementation(common.bundles.asm) -+ implementation(common.commons.lang2) -+ implementation(server.velocity.native) { isTransitive = false } -+ -+ runtimeOnly(common.mvn) -+ runtimeOnly(common.bundles.mvn) - -- implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur - Rebrand -- implementation("org.mozilla:rhino-engine:1.7.14") // Purpur - Rebrand -- implementation("dev.omega24:upnp4j:1.0") // Purpur - Rebrand -+ implementation(common.snakeyaml) -+ implementation(server.simpleyaml) { exclude(group="org.yaml", module="snakeyaml") } - -- testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test -- testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") -- testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0") -- testImplementation("org.hamcrest:hamcrest:2.2") -- testImplementation("org.mockito:mockito-core:5.14.1") -- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions -- testImplementation("org.ow2.asm:asm-tree:9.7.1") -- testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest -- implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling -- implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins -- // Paper start - Remap reflection -- val reflectionRewriterVersion = "0.0.3" -- implementation("io.papermc:reflection-rewriter:$reflectionRewriterVersion") -- implementation("io.papermc:reflection-rewriter-runtime:$reflectionRewriterVersion") -- implementation("io.papermc:reflection-rewriter-proxy-generator:$reflectionRewriterVersion") -- // Paper end - Remap reflection -- // Paper start - spark -- implementation("me.lucko:spark-api:0.1-20240720.200737-2") -- implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT") -- // Paper end - spark -+ testImplementation(server.classgraph) -+ testImplementation(common.bundles.test) -+ testImplementation(common.junit) -+ mockitoAgent(common.mockito) { isTransitive = false } -+ testImplementation(common.junit.pioneer) -+ // Plazma end - Use Gradle Version Catalogs - } - - paperweight { -@@ -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", -- "Implementation-Title" to "Purpur", // Pufferfish // Purpur - Rebrand -+ "Implementation-Title" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur - Rebrand // Plazma - Fork-friendly Rebranding - "Implementation-Version" to implementationVersion, - "Implementation-Vendor" to date, // Paper -- "Specification-Title" to "Purpur", // Pufferfish // Purpur - Rebrand -+ "Specification-Title" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur - Rebrand // Plazma - Fork-friendly Rebranding - "Specification-Version" to project.version, -- "Specification-Vendor" to "Purpur Team", // Pufferfish // Purpur - Rebrand -- "Brand-Id" to "purpurmc:purpur", // Pufferfish // Purpur - Rebrand -- "Brand-Name" to "Purpur", // Pufferfish // Purpur - Rebrand -+ "Specification-Vendor" to rootProject.providers.gradleProperty("providerName").get(), // Purpur - Rebrand // Plazma - Fork-friendly Rebranding -+ "Brand-Id" to rootProject.providers.gradleProperty("brandKey").get(), // Purpur - Rebrand // Plazma - Fork-friendly Rebranding -+ "Brand-Name" to rootProject.providers.gradleProperty("brandName").get(), // Pufferfish // Purpur - Rebrand // Plazma - Fork-friendly Rebranding - "Build-Number" to (build ?: ""), - "Build-Time" to Instant.now().toString(), - "Git-Branch" to gitBranch, // Paper diff --git a/patches/unapplied/server/0011-Optimize-default-configurations.patch b/patches/unapplied/server/0011-Optimize-default-configurations.patch deleted file mode 100644 index 7874aa8..0000000 --- a/patches/unapplied/server/0011-Optimize-default-configurations.patch +++ /dev/null @@ -1,14 +0,0 @@ - -diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -index c867796f6..ecced2072 100644 ---- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart { - @MergeMap - public Reference2IntMap spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); - @MergeMap -- public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance()))); -+ public Map despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8 : category.getDespawnDistance()))); // Plazma - Optimize default configurations - @MergeMap - public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); - diff --git a/patches/unapplied/server/placeholder/.gitkeep b/patches/unapplied/server/placeholder/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/patches/unapplied/sparklypaper/api/0004-SPARKLYPOWER-Add-custom-blocks.patch b/patches/unapplied/sparklypaper/api/0004-SPARKLYPOWER-Add-custom-blocks.patch deleted file mode 100644 index a086f72..0000000 --- a/patches/unapplied/sparklypaper/api/0004-SPARKLYPOWER-Add-custom-blocks.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrPowerGamerBR -Date: Wed, 12 Jun 2024 11:53:27 -0300 -Subject: [PATCH] SPARKLYPOWER Add custom blocks - - -diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java -index 41eaa8159f8c028faa118300e95f6a0fb9cfe989..5b5ddb19b39d5201da422f9b10e2491ab9334925 100644 ---- a/src/main/java/com/destroystokyo/paper/MaterialTags.java -+++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java -@@ -83,6 +83,7 @@ public class MaterialTags { - */ - public static final MaterialSetTag CONCRETES = new MaterialSetTag(keyFor("concretes")) - .endsWith("_CONCRETE") -+ .notStartsWith("SPARKLYPOWER_") // SparklyPaper - custom blocks - .ensureSize("CONCRETES", 16).lock(); - - /** -@@ -161,6 +162,7 @@ public class MaterialTags { - .endsWith("TERRACOTTA") - .not(Material.TERRACOTTA) - .notEndsWith("GLAZED_TERRACOTTA") -+ .notStartsWith("SPARKLYPOWER_") // SparklyPaper - custom blocks - .ensureSize("STAINED_TERRACOTTA", 16).lock(); - - /** -@@ -168,6 +170,7 @@ public class MaterialTags { - */ - public static final MaterialSetTag TERRACOTTA = new MaterialSetTag(keyFor("terracotta")) - .endsWith("TERRACOTTA") -+ .notStartsWith("SPARKLYPOWER_") // SparklyPaper - custom blocks - .ensureSize("TERRACOTTA", 33).lock(); - - /** -diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 028ac35df6c4d044d07b3869751736d418c1eb0e..dd9795e0725275b0fe5a3f4ecfd4d587a23f963f 100644 ---- a/src/main/java/org/bukkit/Material.java -+++ b/src/main/java/org/bukkit/Material.java -@@ -3843,6 +3843,22 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - BIG_DRIPLEAF_STEM(13167, Dripleaf.class), - POTTED_AZALEA_BUSH(20430), - POTTED_FLOWERING_AZALEA_BUSH(10609), -+ // SparklyPaper start - SparklyPower Survival custom blocks -+ // The IDs themselves doesn't have any correlation with anything, Spigot invented that for backwards compatibility -+ SPARKLYPOWER_RAINBOW_WOOL(13003), -+ SPARKLYPOWER_RAINBOW_CONCRETE(13004), -+ SPARKLYPOWER_RAINBOW_TERRACOTTA(13005), -+ SPARKLYPOWER_ASPHALT_SERVER(13006), -+ /** -+ * BlockData: {@link Slab} -+ */ -+ SPARKLYPOWER_ASPHALT_SERVER_SLAB(13007, Slab.class), -+ SPARKLYPOWER_ASPHALT_PLAYER(13008), -+ /** -+ * BlockData: {@link Slab} -+ */ -+ SPARKLYPOWER_ASPHALT_PLAYER_SLAB(13009, Slab.class), -+ // SparklyPaper end - // ----- Legacy Separator ----- - @Deprecated(since = "1.13") - LEGACY_AIR(0, 0), diff --git a/plazma-server/build.gradle.kts.patch b/plazma-server/build.gradle.kts.patch index 10accff..c16d277 100644 --- a/plazma-server/build.gradle.kts.patch +++ b/plazma-server/build.gradle.kts.patch @@ -49,3 +49,12 @@ implementation("ca.spottedleaf:concurrentutil:0.0.3") 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 +@@ -290,7 +_,7 @@ + languageVersion.set(JavaLanguageVersion.of(21)) + vendor.set(JvmVendorSpec.JETBRAINS) + }) +- jvmArgs("-XX:+AllowEnhancedClassRedefinition") ++ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "--add-modules=jdk.incubator.vector", "-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled", "-XX:MaxGCPauseMillis=200", "-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4", "-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90", "-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem", "-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs", "-Daikars.new.flags=true", "-XX:G1NewSizePercent=40", "-XX:G1MaxNewSizePercent=50", "-XX:G1HeapRegionSize=16M", "-XX:G1ReservePercent=15") // Plazma + + if (rootProject.childProjects["test-plugin"] != null) { + val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }