diff --git a/patches/server/0002-mc-dev-fixes.patch b/patches/server/0002-mc-dev-fixes.patch new file mode 100644 index 0000000..f00d0c7 --- /dev/null +++ b/patches/server/0002-mc-dev-fixes.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: AlphaKR93 +Date: Sat, 2 Nov 2024 15:26:27 +0900 +Subject: [PATCH] mc dev fixes + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java b/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java +index 3fc1ec01e1a77a169ec762a23f15b97f040ce5f8..b5464708c1fa949e7df8aed71126ccad72d66ee3 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java ++++ b/src/main/java/net/minecraft/world/entity/animal/allay/AllayAi.java +@@ -62,8 +62,8 @@ public class AllayAi { + Activity.CORE, + 0, + ImmutableList.of( +- new Swim<>(0.8F), +- new AnimalPanic(2.5F), ++ new Swim(0.8F), // Plazma - mc dev fixes ++ new AnimalPanic(2.5F), // Plazma - mc dev fixes + new LookAtTargetSink(45, 90), + new MoveToTargetSink(), + new CountDownCooldownTicks(MemoryModuleType.LIKED_NOTEBLOCK_COOLDOWN_TICKS), diff --git a/patches/server/0002-Build-System-Changes.patch b/patches/server/0003-Build-System-Changes.patch similarity index 100% rename from patches/server/0002-Build-System-Changes.patch rename to patches/server/0003-Build-System-Changes.patch diff --git a/patches/server/0003-Fork-friendly-Rebranding.patch b/patches/server/0004-Fork-friendly-Rebranding.patch similarity index 100% rename from patches/server/0003-Fork-friendly-Rebranding.patch rename to patches/server/0004-Fork-friendly-Rebranding.patch diff --git a/patches/server/0004-Rebrand-Logo.patch b/patches/server/0005-Rebrand-Logo.patch similarity index 100% rename from patches/server/0004-Rebrand-Logo.patch rename to patches/server/0005-Rebrand-Logo.patch diff --git a/patches/server/0005-Plazma-Configurations.patch b/patches/server/0006-Plazma-Configurations.patch similarity index 100% rename from patches/server/0005-Plazma-Configurations.patch rename to patches/server/0006-Plazma-Configurations.patch diff --git a/patches/server/0006-Setup-basic-configuration-sections.patch b/patches/server/0007-Setup-basic-configuration-sections.patch similarity index 100% rename from patches/server/0006-Setup-basic-configuration-sections.patch rename to patches/server/0007-Setup-basic-configuration-sections.patch diff --git a/patches/server/0007-Warn-on-startup.patch b/patches/server/0008-Warn-on-startup.patch similarity index 100% rename from patches/server/0007-Warn-on-startup.patch rename to patches/server/0008-Warn-on-startup.patch diff --git a/patches/server/0008-Always-agree-EULA-on-development-mode.patch b/patches/server/0009-Always-agree-EULA-on-development-mode.patch similarity index 100% rename from patches/server/0008-Always-agree-EULA-on-development-mode.patch rename to patches/server/0009-Always-agree-EULA-on-development-mode.patch diff --git a/patches/server/0009-Add-more-metrics.patch b/patches/server/0010-Add-more-metrics.patch similarity index 100% rename from patches/server/0009-Add-more-metrics.patch rename to patches/server/0010-Add-more-metrics.patch diff --git a/patches/server/0010-Optimize-default-configurations.patch b/patches/server/0011-Optimize-default-configurations.patch similarity index 100% rename from patches/server/0010-Optimize-default-configurations.patch rename to patches/server/0011-Optimize-default-configurations.patch diff --git a/patches/server/0011-Add-an-option-to-apply-the-configuration-to-the-vani.patch b/patches/server/0012-Add-an-option-to-apply-the-configuration-to-the-vani.patch similarity index 100% rename from patches/server/0011-Add-an-option-to-apply-the-configuration-to-the-vani.patch rename to patches/server/0012-Add-an-option-to-apply-the-configuration-to-the-vani.patch diff --git a/patches/server/0012-Tweak-console-logging.patch b/patches/server/0013-Tweak-console-logging.patch similarity index 100% rename from patches/server/0012-Tweak-console-logging.patch rename to patches/server/0013-Tweak-console-logging.patch diff --git a/patches/server/0013-Add-missing-purpur-configuration-options.patch b/patches/server/0014-Add-missing-purpur-configuration-options.patch similarity index 100% rename from patches/server/0013-Add-missing-purpur-configuration-options.patch rename to patches/server/0014-Add-missing-purpur-configuration-options.patch diff --git a/patches/server/0014-Add-option-to-change-nether-portal-size.patch b/patches/server/0015-Add-option-to-change-nether-portal-size.patch similarity index 100% rename from patches/server/0014-Add-option-to-change-nether-portal-size.patch rename to patches/server/0015-Add-option-to-change-nether-portal-size.patch diff --git a/patches/server/0015-Apply-various-optimizations.patch b/patches/server/0016-Apply-various-optimizations.patch similarity index 100% rename from patches/server/0015-Apply-various-optimizations.patch rename to patches/server/0016-Apply-various-optimizations.patch diff --git a/patches/server/0016-Do-not-load-chunks-to-spawn-phantom.patch b/patches/server/0017-Do-not-load-chunks-to-spawn-phantom.patch similarity index 95% rename from patches/server/0016-Do-not-load-chunks-to-spawn-phantom.patch rename to patches/server/0017-Do-not-load-chunks-to-spawn-phantom.patch index 8684e86..50b382a 100644 --- a/patches/server/0016-Do-not-load-chunks-to-spawn-phantom.patch +++ b/patches/server/0017-Do-not-load-chunks-to-spawn-phantom.patch @@ -17,7 +17,7 @@ index 27eb9a365006884c85603dc6d9dd8eee009c98b3..958a48d05aba8e500c7b19a466dcca6f FluidState fluid = world.getFluidState(blockposition1); diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java -index 7bd566d6e15385850930a6c0b44d1d495a671e81..d5e7d74b0e203c9f2c03c9b4f8d1b9c57168e61f 100644 +index e50118ec7a4c00bd367ca6c740214c53b0d60fc9..4d204a0dc976d96c98764092c8461b0e2b920fc1 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java +++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java @@ -31,6 +31,7 @@ public class WorldConfigurations extends ConfigurationPart { diff --git a/patches/server/0017-Add-option-to-disable-moved-to-quickly-check-for-spe.patch b/patches/server/0018-Add-option-to-disable-moved-to-quickly-check-for-spe.patch similarity index 95% rename from patches/server/0017-Add-option-to-disable-moved-to-quickly-check-for-spe.patch rename to patches/server/0018-Add-option-to-disable-moved-to-quickly-check-for-spe.patch index be32ed2..0ddf693 100644 --- a/patches/server/0017-Add-option-to-disable-moved-to-quickly-check-for-spe.patch +++ b/patches/server/0018-Add-option-to-disable-moved-to-quickly-check-for-spe.patch @@ -24,7 +24,7 @@ index 61b19f52aeb371abdd29f41291099f35a9b4c258..dcb0a4461a2fca964e4d8390401e4636 return false; } else if (this.player.isChangingDimension()) { diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index 3ec9c947ac19412ad81d0cc85e0eff289a285d1e..af89ad0fcaebb5776ae3c18d02441c48f4227251 100644 +index b3fccda131e51b03b1617b028f8d7488db342f24..6fd1f1c859a6e6cea780d9dfa9a2770d59ddfd04 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0018-Configurable-cave-lava-sea-level.patch b/patches/server/0019-Configurable-cave-lava-sea-level.patch similarity index 97% rename from patches/server/0018-Configurable-cave-lava-sea-level.patch rename to patches/server/0019-Configurable-cave-lava-sea-level.patch index 5c6209a..b31020d 100644 --- a/patches/server/0018-Configurable-cave-lava-sea-level.patch +++ b/patches/server/0019-Configurable-cave-lava-sea-level.patch @@ -33,7 +33,7 @@ index 3f39d6c786d9dfdd9ad591e08ff05fcbb41a1df6..0346fd4ab7095d66c0eef5a440afbc7a @Override diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index af89ad0fcaebb5776ae3c18d02441c48f4227251..aa8b0a9b3d98e2c2fb1bd3c374cd2e742e6e17cf 100644 +index 6fd1f1c859a6e6cea780d9dfa9a2770d59ddfd04..af0ca8b0470c0e66cbc4cc0331219b71d0fa429f 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -35,6 +35,24 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0019-Configurable-entity-sensor-tick.patch b/patches/server/0020-Configurable-entity-sensor-tick.patch similarity index 100% rename from patches/server/0019-Configurable-entity-sensor-tick.patch rename to patches/server/0020-Configurable-entity-sensor-tick.patch diff --git a/patches/server/0020-Variable-entity-wakeup-duration.patch b/patches/server/0021-Variable-entity-wakeup-duration.patch similarity index 100% rename from patches/server/0020-Variable-entity-wakeup-duration.patch rename to patches/server/0021-Variable-entity-wakeup-duration.patch diff --git a/patches/server/0021-Skip-event-if-no-listeners.patch b/patches/server/0022-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0021-Skip-event-if-no-listeners.patch rename to patches/server/0022-Skip-event-if-no-listeners.patch diff --git a/patches/server/0022-Add-entity-spawn-deadlock-timer.patch b/patches/server/0023-Add-entity-spawn-deadlock-timer.patch similarity index 100% rename from patches/server/0022-Add-entity-spawn-deadlock-timer.patch rename to patches/server/0023-Add-entity-spawn-deadlock-timer.patch diff --git a/patches/server/0023-Lithium-HashedList.patch b/patches/server/0024-Lithium-HashedList.patch similarity index 100% rename from patches/server/0023-Lithium-HashedList.patch rename to patches/server/0024-Lithium-HashedList.patch diff --git a/patches/server/0024-Improve-SwingTime-ticking.patch b/patches/server/0025-Improve-SwingTime-ticking.patch similarity index 100% rename from patches/server/0024-Improve-SwingTime-ticking.patch rename to patches/server/0025-Improve-SwingTime-ticking.patch diff --git a/patches/server/0025-Save-Json-list-asynchronously.patch b/patches/server/0026-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0025-Save-Json-list-asynchronously.patch rename to patches/server/0026-Save-Json-list-asynchronously.patch diff --git a/patches/server/0026-Use-Akair-s-flag-when-running-the-test-server-with-g.patch b/patches/server/0027-Use-Akair-s-flag-when-running-the-test-server-with-g.patch similarity index 100% rename from patches/server/0026-Use-Akair-s-flag-when-running-the-test-server-with-g.patch rename to patches/server/0027-Use-Akair-s-flag-when-running-the-test-server-with-g.patch diff --git a/patches/server/0027-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch b/patches/server/0028-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch similarity index 100% rename from patches/server/0027-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch rename to patches/server/0028-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch diff --git a/patches/server/0028-Implement-FreedomChat.patch b/patches/server/0029-Implement-FreedomChat.patch similarity index 100% rename from patches/server/0028-Implement-FreedomChat.patch rename to patches/server/0029-Implement-FreedomChat.patch diff --git a/patches/server/0029-Reset-dirty-flag-when-loading-maps-from-the-disk.patch b/patches/server/0030-Reset-dirty-flag-when-loading-maps-from-the-disk.patch similarity index 100% rename from patches/server/0029-Reset-dirty-flag-when-loading-maps-from-the-disk.patch rename to patches/server/0030-Reset-dirty-flag-when-loading-maps-from-the-disk.patch diff --git a/patches/server/0030-Allow-throttling-hopper-checks-if-the-target-contain.patch b/patches/server/0031-Allow-throttling-hopper-checks-if-the-target-contain.patch similarity index 100% rename from patches/server/0030-Allow-throttling-hopper-checks-if-the-target-contain.patch rename to patches/server/0031-Allow-throttling-hopper-checks-if-the-target-contain.patch diff --git a/patches/server/0031-Suppress-errors-from-dirty-attributes.patch b/patches/server/0032-Suppress-errors-from-dirty-attributes.patch similarity index 100% rename from patches/server/0031-Suppress-errors-from-dirty-attributes.patch rename to patches/server/0032-Suppress-errors-from-dirty-attributes.patch diff --git a/patches/server/0032-Implement-Rail-Optimazition.patch b/patches/server/0033-Implement-Rail-Optimazition.patch similarity index 100% rename from patches/server/0032-Implement-Rail-Optimazition.patch rename to patches/server/0033-Implement-Rail-Optimazition.patch diff --git a/patches/server/0033-Load-player-data-asynchronously.patch b/patches/server/0034-Load-player-data-asynchronously.patch similarity index 100% rename from patches/server/0033-Load-player-data-asynchronously.patch rename to patches/server/0034-Load-player-data-asynchronously.patch diff --git a/patches/server/0034-Configurable-RandomSource-factory-provider.patch b/patches/server/0035-Configurable-RandomSource-factory-provider.patch similarity index 100% rename from patches/server/0034-Configurable-RandomSource-factory-provider.patch rename to patches/server/0035-Configurable-RandomSource-factory-provider.patch diff --git a/patches/server/0035-Optimize-advancement-criteria-triggering.patch b/patches/server/0036-Optimize-advancement-criteria-triggering.patch similarity index 100% rename from patches/server/0035-Optimize-advancement-criteria-triggering.patch rename to patches/server/0036-Optimize-advancement-criteria-triggering.patch diff --git a/patches/server/0036-Configurable-water-flowing-speed.patch b/patches/server/0037-Configurable-water-flowing-speed.patch similarity index 100% rename from patches/server/0036-Configurable-water-flowing-speed.patch rename to patches/server/0037-Configurable-water-flowing-speed.patch diff --git a/patches/server/0037-cleanup-logs.patch b/patches/server/0038-cleanup-logs.patch similarity index 100% rename from patches/server/0037-cleanup-logs.patch rename to patches/server/0038-cleanup-logs.patch diff --git a/patches/server/0038-Completely-remove-timings-implementation.patch b/patches/server/0039-Completely-remove-timings-implementation.patch similarity index 100% rename from patches/server/0038-Completely-remove-timings-implementation.patch rename to patches/server/0039-Completely-remove-timings-implementation.patch diff --git a/patches/server/0039-Remove-Mojang-Profiler-codes.patch b/patches/server/0040-Remove-Mojang-Profiler-codes.patch similarity index 100% rename from patches/server/0039-Remove-Mojang-Profiler-codes.patch rename to patches/server/0040-Remove-Mojang-Profiler-codes.patch diff --git a/patches/server/0040-Completely-remove-Mojang-Profiler.patch b/patches/server/0041-Completely-remove-Mojang-Profiler.patch similarity index 100% rename from patches/server/0040-Completely-remove-Mojang-Profiler.patch rename to patches/server/0041-Completely-remove-Mojang-Profiler.patch diff --git a/patches/server/0042-Remove-persist-isClientSide-flag.patch b/patches/server/0042-Remove-persist-isClientSide-flag.patch new file mode 100644 index 0000000..40b95f6 --- /dev/null +++ b/patches/server/0042-Remove-persist-isClientSide-flag.patch @@ -0,0 +1,7004 @@ +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..f9eda740f1a3ffe1b0aaa52b79b7b890326691bf 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 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..7317853a208ff6ca8d686f8312629a053523770b 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 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..95218c6dc9ade3c0347f26564c9f319f0e88c102 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 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 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 flag + if (this.isClientSide) { + Arrays.fill(this.notifyUpdateCache, false); + } ++ */ // Plazma - Remove persist 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 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 flag + } + } + ++ /* // Plazma - Remove persist 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 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 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 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 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 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 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 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..6dae15cb4e3f935591750f3ebbc58c8bde05c7ea 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 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 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 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 flag + return 15; + } + +@@ -337,9 +337,11 @@ public final class StarLightInterface { + return this.blockReader; + } + ++ /* // Plazma - Remove persist flag + public boolean isClientSide() { + return this.isClientSide; + } ++ */ // Plazma - Remove persist 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..720007c38a0fbdf91aebe041b1a352bf1b9c3510 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 2f79c958eae8592ebf758016b36e5822d1020136..2c4fc8f5cad67380f037cbf499accf2a91dbda8a 100644 +--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java ++++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +@@ -535,7 +535,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 flag + worldserver.levelEvent(1505, blockposition, 15); + } + // CraftBukkit start +@@ -692,10 +692,10 @@ public interface DispenseItemBehavior { + // CraftBukkit end + + if (worldserver.isEmptyBlock(blockposition) && blockpumpkincarved.canSpawnGolem(worldserver, blockposition)) { +- if (!worldserver.isClientSide) { ++ //if (!worldserver.isClientSide) { // Plazma - Remove persist flag + worldserver.setBlock(blockposition, blockpumpkincarved.defaultBlockState(), 3); + worldserver.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_PLACE, blockposition); +- } ++ //} // Plazma - Remove persist flag + + stack.shrink(1); + this.setSuccess(true); +@@ -902,11 +902,11 @@ public interface DispenseItemBehavior { + return result; + } + // Paper end - Call missing BlockDispenseEvent +- if (!worldserver.isClientSide) { ++ //if (!worldserver.isClientSide) { // Plazma - Remove persist 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 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 afad4fa3ca1a3186c4569ea073f776dac16817e1..2565c8ff98cb40bab049e71400f8361647bd5293 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 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 flag + + return stack; + } +diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java +index 7238c7224f985279799e84eeaed6916e0c76964d..a355f0a2fc19c27b67841954198287464e9f5186 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -1013,7 +1013,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple + containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate; + } + // Paper end - Configurable container update tick rate +- if (!this.level().isClientSide && this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen ++ if (/*!this.level().isClientSide &&*/ this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen // Plazma - Remove persist flag + this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason + this.containerMenu = this.inventoryMenu; + } +diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +index a8484b9659f175cc20985bf66082616ceb31df4d..0490acfc93327a95999339ea6856bd748c13f1af 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 flag + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove persist flag + + /** @deprecated */ + @Deprecated +diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java +index 119856b22df5bbcd4e5bf5f95645156f774c6168..1d2b5bf25ffd995c2a5867df154cffb3019144f0 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 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 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 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 7eba7c0e7b8d2795abbe96b3d86a9c1a3b6b74a6..22733e48c88cd1ed9db1b6a885dfc59713575ef6 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 flag + this.getEntityData().set(AreaEffectCloud.DATA_RADIUS, Mth.clamp(radius, 0.0F, 32.0F)); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -170,12 +170,14 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { + + if (world instanceof ServerLevel worldserver) { + this.serverTick(worldserver); +- } else { ++ } /*else { // Plazma - Remove persist 'isClientSide' flag + 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 +217,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..a2dcbcc705d4219f9077e4011990e8a20bfc2b1c 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 flag + if (this.level().isClientSide) { + if (this.updateStartTick) { + this.updateStartTick = false; +@@ -185,6 +186,7 @@ public abstract class Display extends Entity { + } + } + } ++ */ // Plazma - Remove persist 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 d16c34c3bcebcd43e1fc35da4d089fac55d59102..6ddaf14dae633373f2a9b4321edfa09caf6b6f6a 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -620,7 +620,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 flag + float f = this.getLightLevelDependentMagicValue(); + BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ()); + boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow; +@@ -1006,9 +1006,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + this.checkBelowWorld(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.setSharedFlagOnFire(this.remainingFireTicks > 0); +- } ++ //} // Plazma - Remove persist flag + + this.firstTick = false; + world = this.level(); +@@ -1295,9 +1295,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + BlockPos blockposition = this.getOnPosLegacy(); + BlockState iblockdata = this.level().getBlockState(blockposition); + +- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { ++ //if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // Plazma - Remove persist flag + this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition); +- } ++ //} // Plazma - Remove persist flag + + if (this.isRemoved()) { + //gameprofilerfiller.pop(); // Purpur +@@ -1338,13 +1338,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 flag + Entity.MovementEmission entity_movementemission = this.getMovementEmission(); + + if (entity_movementemission.emitsAnything() && !this.isPassenger()) { + this.applyMovementEmissionAndPlaySound(entity_movementemission, vec3d1, blockposition, iblockdata); + } +- } ++ //} // Plazma - Remove persist flag + + float f = this.getBlockSpeedFactor(); + +@@ -1474,9 +1474,9 @@ 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 flag + this.playEntityOnFireExtinguishedSound(); +- } ++ //} // Plazma - Remove persist flag + + this.clearFire(); + } +@@ -3157,7 +3157,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 flag + if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur + // CraftBukkit start - fire PlayerUnleashEntityEvent + // Paper start - Expand EntityUnleashEvent +@@ -3170,7 +3170,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + // CraftBukkit end + leashable.dropLeash(true, event.isDropLeash()); // Paper - Expand EntityUnleashEvent + this.gameEvent(GameEvent.ENTITY_INTERACT, player); +- } ++ //} // Plazma - Remove persist flag + + return InteractionResult.SUCCESS; + } +@@ -3178,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 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 +@@ -3188,7 +3188,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + // CraftBukkit end + leashable.setLeashedTo(player, true); +- } ++ //} // Plazma - Remove persist flag + + itemstack.shrink(1); + return InteractionResult.SUCCESS; +@@ -3260,7 +3260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + return false; + } else if (!entity.couldAcceptPassenger()) { + return false; +- } else if (!this.level().isClientSide() && !entity.type.canSerialize()) { ++ } else if (/*!this.level().isClientSide() &&*/ !entity.type.canSerialize()) { // Plazma - Remove persist flag + return false; + } else { + for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { +@@ -3355,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 flag + list.add(0, passenger); + } else { + list.add(passenger); +@@ -3570,7 +3570,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + 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 flag + + return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0)); + } +@@ -3660,7 +3660,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 flag + } + + public boolean isInvisible() { +@@ -4425,7 +4425,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 flag + this.fudgePositionAfterSizeChange(entitysize); + } + +@@ -4720,7 +4720,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public boolean isEffectiveAi() { +- return !this.level().isClientSide; ++ return true; //!this.level().isClientSide; // Plazma - Remove persist flag + } + + protected static Vec3 getCollisionHorizontalEscapeVector(double vehicleWidth, double passengerWidth, float passengerYaw) { +diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java +index c1a870fd22b193388513aad0ac4f3ce0ad7c8195..3f077f614ddce6906a5469db94b2d8be65f85490 100644 +--- a/src/main/java/net/minecraft/world/entity/EntityType.java ++++ b/src/main/java/net/minecraft/world/entity/EntityType.java +@@ -579,7 +579,7 @@ public class EntityType implements FeatureElement, EntityTypeT + MinecraftServer minecraftserver = world.getServer(); + + if (minecraftserver != null && entity != null) { +- if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) { ++ if (/*world.isClientSide ||*/ !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) { // Plazma - Remove persist 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 221d73676fe2fd240a47cf312c1179e049298cac..a5a9acb5a1446dd9d56bb3a61d56651270b3706d 100644 +--- a/src/main/java/net/minecraft/world/entity/Interaction.java ++++ b/src/main/java/net/minecraft/world/entity/Interaction.java +@@ -175,12 +175,14 @@ public class Interaction extends Entity implements Attackable, Targeting { + + @Override + public InteractionResult interact(Player player, InteractionHand hand) { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + return this.getResponse() ? InteractionResult.SUCCESS : InteractionResult.CONSUME; + } else { ++ */ // Plazma - Remove persist flag + this.interaction = new Interaction.PlayerAction(player.getUUID(), this.level().getGameTime()); + return InteractionResult.CONSUME; +- } ++ //} // Plazma - Remove persist 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 5f880a8809f9c20bc8e8c0b2d48590bab02cf077..d6b892d9de2a0a2e98dbdd2720f037c2ef3f520c 100644 +--- a/src/main/java/net/minecraft/world/entity/Leashable.java ++++ b/src/main/java/net/minecraft/world/entity/Leashable.java +@@ -276,6 +276,7 @@ public interface Leashable { + if (leashable_a == null) { + return null; + } else { ++ /* // Plazma - Remove persist flag + if (leashable_a.delayedLeashHolderId != 0 && entity.level().isClientSide) { + Entity entity1 = entity.level().getEntity(leashable_a.delayedLeashHolderId); + +@@ -283,6 +284,7 @@ public interface Leashable { + leashable_a.setLeashHolder(entity1); + } + } ++ */ // Plazma - Remove persist 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..49f1d70616ab757580dd99b76a68c2d27722d4ac 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 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 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 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 119df9ab026de60bcb0c04058910aaeef66bc1c1..990c6ac3f847250ed66bbed2fff63b8064e29a02 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -460,7 +460,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + //ProfilerFiller gameprofilerfiller = Profiler.get(); // Purpur + + //gameprofilerfiller.push("livingEntityBaseTick"); // Purpur +- if (this.fireImmune() || this.level().isClientSide) { ++ if (this.fireImmune() /*|| this.level().isClientSide*/) { // Plazma - Remove persist flag + this.clearFire(); + } + +@@ -508,7 +508,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + } + +- 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 flag + this.stopRiding(); + } + } else if (this.getAirSupply() < this.getMaxAirSupply()) { +@@ -633,7 +633,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 flag + this.level().broadcastEntityEvent(this, (byte) 60); + this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause + } +@@ -747,7 +747,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 flag + boolean flag = itemstack1.isEmpty() && itemstack.isEmpty(); + + if (!flag && !ItemStack.isSameItemSameComponents(itemstack, itemstack1) && !this.firstTick) { +@@ -862,7 +862,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 flag + this.getAttributes().load(nbt.getList("attributes", 10)); + } + +@@ -970,7 +970,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 flag + // CraftBukkit start + EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect, null, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.EXPIRATION); + if (event.isCancelled()) { +@@ -979,7 +979,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + // CraftBukkit end + iterator.remove(); + this.onEffectsRemoved(List.of(mobeffect)); +- } ++ //} // Plazma - Remove persist flag + } else if (mobeffect.getDuration() % 600 == 0) { + this.onEffectUpdated(mobeffect, false, (Entity) null); + } +@@ -1000,10 +1000,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 flag + this.updateInvisibilityStatus(); + this.updateGlowingStatus(); +- } ++ //} // Plazma - Remove persist flag + + this.effectsDirty = false; + } +@@ -1138,9 +1138,9 @@ public abstract class LivingEntity extends Entity implements Attackable { + + public boolean removeAllEffects(EntityPotionEffectEvent.Cause cause) { + // CraftBukkit end +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // Plazma - Remove persist flag + return false; +- } else if (this.activeEffects.isEmpty()) { ++ } else*/ if (this.activeEffects.isEmpty()) { // Plazma - Remove persist flag + return false; + } else { + // CraftBukkit start +@@ -1313,10 +1313,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 flag + ((MobEffect) effect.getEffect().value()).addAttributeModifiers(this.getAttributes(), effect.getAmplifier()); + this.sendEffectToPassengers(effect); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -1335,7 +1335,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 flag + MobEffect mobeffectlist = (MobEffect) effect.getEffect().value(); + + mobeffectlist.removeAttributeModifiers(this.getAttributes()); +@@ -1343,15 +1343,15 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.refreshDirtyAttributes(); + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.sendEffectToPassengers(effect); +- } ++ //} // Plazma - Remove persist flag + + } + + protected void onEffectsRemoved(Collection effects) { + this.effectsDirty = true; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + Iterator iterator = effects.iterator(); + + while (iterator.hasNext()) { +@@ -1372,7 +1372,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + this.refreshDirtyAttributes(); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -1899,7 +1899,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 flag + if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot + } + +@@ -3066,12 +3066,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 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 flag + } else { + d0 -= this.getEffectiveGravity(); + } +@@ -3149,11 +3151,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 flag + double d1 = this.getDeltaMovement().horizontalDistance(); + + this.handleFallFlyingCollisions(d0, d1); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -3312,7 +3314,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 flag + int i = this.getArrowCount(); + + if (i > 0) { +@@ -3347,7 +3349,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + if (this.isSleeping() && !this.checkBedExists()) { + this.stopSleeping(); + } +- } ++ //} // Plazma - Remove persist flag + + if (!this.isRemoved()) { + this.aiStep(); +@@ -3702,14 +3704,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 flag + this.applyEffectsFromBlocks(); +- } ++ //} // Plazma - Remove persist flag + + this.calculateEntityAnimation(this instanceof FlyingAnimal); + //gameprofilerfiller.pop(); // Purpur + //gameprofilerfiller.push("freezing"); // Purpur +- 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 flag + int i = this.getTicksFrozen(); + + if (this.isInPowderSnow && this.canFreeze()) { +@@ -3812,7 +3814,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 flag + if (!this.canGlide()) { + if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit + this.setSharedFlag(7, false); +@@ -3845,7 +3847,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + + this.gameEvent(GameEvent.ELYTRA_GLIDE); + } +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -3948,7 +3950,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 flag + this.setLivingEntityFlag(4, false); + this.autoSpinAttackDmg = 0.0F; + this.autoSpinAttackItemStack = null; +@@ -3977,7 +3979,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 flag + this.dismountVehicle(entity); + } + +@@ -4051,7 +4053,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 flag + ((ServerLevel) this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); // Paper - broadcast with collector as source + } + +@@ -4196,7 +4198,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 flag + this.useItemRemaining = 0; + // Paper end - lag compensate eating + this.completeUsingItem(); +@@ -4240,11 +4242,11 @@ 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 flag + this.setLivingEntityFlag(1, true); + this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); + this.gameEvent(GameEvent.ITEM_INTERACT_START); +- } ++ //} // Plazma - Remove persist flag + + } + } +@@ -4252,6 +4254,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + @Override + public void onSyncedDataUpdated(EntityDataAccessor data) { + super.onSyncedDataUpdated(data); ++ /* // Plazma - Remove persist flag + if (LivingEntity.SLEEPING_POS_ID.equals(data)) { + if (this.level().isClientSide) { + this.getSleepingPos().ifPresent(this::setPosToBed); +@@ -4270,6 +4273,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + // Paper end - lag compensate eating + } + } ++ */ // Plazma - Remove persist flag + + } + +@@ -4304,7 +4308,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 flag + InteractionHand enumhand = this.getUsedItemHand(); + + if (!this.useItem.equals(this.getItemInHand(enumhand))) { +@@ -4358,7 +4362,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + } +- } ++ //} // Plazma - Remove persist flag + } + + public void handleExtraItemsCreatedOnUse(ItemStack stack) {} +@@ -4388,14 +4392,14 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + public void stopUsingItem() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + boolean flag = this.isUsingItem(); + + this.setLivingEntityFlag(1, false); + if (flag) { + this.gameEvent(GameEvent.ITEM_INTERACT_FINISH); + } +- } ++ //} // Plazma - Remove persist flag + + this.useItem = ItemStack.EMPTY; + // Paper start - lag compensate eating +@@ -4833,7 +4837,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 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 d242eeb3dde8f379a7baad430f2c22ab3ca8a3c9..bf614fd82ab7ce9d988eaf602ba0348822b60ade 100644 +--- a/src/main/java/net/minecraft/world/entity/Mob.java ++++ b/src/main/java/net/minecraft/world/entity/Mob.java +@@ -442,11 +442,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + } + + public void spawnAnim() { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.makePoofParticles(); + } else { ++ */ // Plazma - Remove persist flag + this.level().broadcastEntityEvent(this, (byte) 20); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -463,7 +465,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 flag + this.updateControlFlags(); + } + +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 d002acdac893e2744cde5f1145d29ac2c8ff6959..d2c577b4de7d1551aeb1c5905a094d812610a3f9 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 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 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 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 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 2d4fe19da8d53d47df36399531e78da2c961aecd..4b91ef804c731c09b31c08abc2e1e5aa9644af1d 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 +- if (!world.isClientSide) { ++ //if (!world.isClientSide) { // Plazma - Remove persist flag + this.setResting(true); +- } ++ //} // Plazma - Remove persist 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 9987d28ea145f6d0126cb4ea22001e0922fb51bd..168ca278d765e925103b92367010c76f2bd70d46 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 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 flag + if (this.level().isClientSide) { + return InteractionResult.CONSUME; + } ++ */ // Plazma - Remove persist 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 dc8df0912c1d18176e18a8f4dc43c4f60f81b659..6c4cab8cabdd27b6dbd97a408a588f4ef9684654 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +@@ -576,7 +576,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + @Override + public void aiStep() { + super.aiStep(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + if (this.stayOutOfHiveCountdown > 0) { + --this.stayOutOfHiveCountdown; + } +@@ -595,7 +595,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + if (this.tickCount % 20 == 0 && !this.isHiveValid()) { + this.hivePos = null; + } +- } ++ //} // Plazma - Remove persist flag + + } + +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..356cf16ad4188b7d195537cc75c63aa507699d25 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 flag + CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) player, itemstack1); +- } ++ //} // Plazma - Remove persist 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 4aad4fdc80070f4000e929fff126714fc67050b0..521e5ee46883cf4ff11c8a6fc4d84c4f84378704 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java +@@ -451,22 +451,22 @@ public class Cat extends TamableAnimal implements VariantHolder 0.03D) { + Vec3 vec3d = this.getViewVector(0.0F); + float f = Mth.cos(this.getYRot() * 0.017453292F) * 0.3F; +@@ -389,6 +390,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 flag + + } + } +@@ -419,9 +421,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 flag + this.playSound(SoundEvents.DOLPHIN_EAT, 1.0F, 1.0F); +- } ++ //} // Plazma - Remove persist 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 0e229955d9ea7036fab124fa7685df22280671f2..75baa4d94084576393bfedd5630bab2006c7ab9d 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +@@ -257,7 +257,7 @@ public class Fox extends Animal implements VariantHolder { + + @Override + public void aiStep() { +- if (!this.level().isClientSide && this.isAlive() && this.isEffectiveAi()) { ++ if (/*!this.level().isClientSide &&*/ this.isAlive() && this.isEffectiveAi()) { // Plazma - Remove persist flag + ++this.ticksSinceEaten; + ItemStack itemstack = this.getItemBySlot(EquipmentSlot.MAINHAND); + +@@ -559,7 +559,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 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); +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 9a6471d2f1eb1c8af006b70b6bba0b668220fb00..0c085bc33a8f1a4ab299d9b6a13ac0f54c76b101 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java ++++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +@@ -162,9 +162,9 @@ public class IronGolem extends AbstractGolem implements NeutralMob { + --this.offerFlowerTick; + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.updatePersistentAnger((ServerLevel) this.level(), true); +- } ++ //} // Plazma - Remove persist 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 dee59cb4b87845c940ee089aa932aa69dd2539d6..920f9494d970faedb570b76d445949938022d0a1 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java +@@ -206,7 +206,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 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); +@@ -215,7 +215,7 @@ public class Ocelot extends Animal { + this.spawnTrustingParticles(false); + this.level().broadcastEntityEvent(this, (byte) 40); + } +- } ++ //} // Plazma - Remove persist 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 83372c86bd54eedd9b136ddfcbfc67d303058c0a..5997c826baecbc291575662917dc2f86aae18343 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java +@@ -463,12 +463,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 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 flag + this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); + this.gameEvent(GameEvent.EAT); +- } ++ //} // Plazma - Remove persist flag + + this.sit(false); + } +@@ -549,7 +549,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 flag + Vec3 vec3d = this.getDeltaMovement(); + + if (this.rollCounter == 1) { +@@ -563,7 +563,7 @@ public class Panda extends Animal { + } else { + this.setDeltaMovement(0.0D, this.onGround() ? 0.27D : vec3d.y, 0.0D); + } +- } ++ //} // Plazma - Remove persist flag + + } + } +@@ -705,7 +705,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 flag + final ItemStack breedCopy = itemstack.copy(); // Paper - Fix EntityBreedEvent copying + this.usePlayerItem(player, hand, itemstack); + this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying +diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java +index 28a9d267099f6c24f71dc5a11179d59c27265a88..c8f167856eb7ae7b0c67c233cf3620d1c4e9693e 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java +@@ -329,22 +329,22 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder data) { ++ /* // Plazma - Remove persist flag + if (Pig.DATA_BOOST_TIME.equals(data) && this.level().isClientSide) { + this.steering.onSynced(); + } ++ */ // Plazma - Remove persist flag + + super.onSyncedDataUpdated(data); + } +@@ -207,9 +209,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 flag + player.startRiding(this); +- } ++ //} // Plazma - Remove persist 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 86c44912a363401bdd716c22d24dfd7e92cfd0be..901f72367d0a9908b685eab2dbd8d1d25e6e761b 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/PolarBear.java ++++ b/src/main/java/net/minecraft/world/entity/animal/PolarBear.java +@@ -263,6 +263,7 @@ public class PolarBear extends Animal implements NeutralMob { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + if (this.clientSideStandAnimation != this.clientSideStandAnimationO) { + this.refreshDimensions(); +@@ -275,14 +276,15 @@ public class PolarBear extends Animal implements NeutralMob { + this.clientSideStandAnimation = Mth.clamp(this.clientSideStandAnimation - 1.0F, 0.0F, 6.0F); + } + } ++ */ // Plazma - Remove persist flag + + if (this.warningSoundTicks > 0) { + this.warningSoundTicks--; + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.updatePersistentAnger((ServerLevel)this.level(), true); +- } ++ //} // Plazma - Remove persist flag + + // Purpur start + 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 c5a39ea2ad0e5e5ac434d79c1a57e0068b8bc809..1fc94919fc4b185d653dcbad26761e233789f72a 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Pufferfish.java +@@ -127,7 +127,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 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 d8fa11a297ea2a183cac67c76b378ca912dba1f9..082004a11174ecd492da4a59de226bdd94da914c 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Rabbit.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Rabbit.java +@@ -226,9 +226,9 @@ public class Rabbit extends Animal implements VariantHolder { + } + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.level().broadcastEntityEvent(this, (byte) 1); +- } ++ //} // Plazma - Remove persist 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 a13ce089bacfb6644eea81fbe7c6d640aedaea96..429ee7a2541441701797c42c21573010f2d58a88 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java +@@ -159,9 +159,11 @@ public class Sheep extends Animal implements Shearable { + + @Override + public void aiStep() { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.eatAnimationTick = Math.max(0, this.eatAnimationTick - 1); + } ++ */ // Plazma - Remove persist flag + + super.aiStep(); + } +diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java +index 36a56553702fa6e4a2ac92b3639c210c94faee73..3aac04f12d95120c054abbf51936ba6a69494f16 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java +@@ -168,16 +168,18 @@ public class Squid extends AgeableWaterCreature { + this.oldTentacleAngle = this.tentacleAngle; + this.tentacleMovement = this.tentacleMovement + this.tentacleSpeed; + if ((double)this.tentacleMovement > Math.PI * 2) { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.tentacleMovement = (float) (Math.PI * 2); + } else { ++ */ // Plazma - Remove persist 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 flag + } + + if (this.isInWaterOrBubble()) { +@@ -211,7 +213,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 flag + double e = this.getDeltaMovement().y; + if (this.hasEffect(MobEffects.LEVITATION)) { + e = 0.05 * (double)(this.getEffect(MobEffects.LEVITATION).getAmplifier() + 1); +@@ -220,7 +222,7 @@ public class Squid extends AgeableWaterCreature { + } + + this.setDeltaMovement(0.0, e * 0.98F, 0.0); +- } ++ //} // Plazma - Remove persist 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 499e3294f8dd19fb3802f521cb7d24d0998c8aeb..d6953cc2cd43e740106983730b1ef4f0f8d532a0 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java +@@ -370,16 +370,16 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder 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 b4ec352826aef4fa1e9d912eb26b3f2470d811e8..04c60c6a1886b3310293a4c855874dc9544109d7 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 +@@ -192,9 +192,11 @@ public class Armadillo extends Animal { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide()) { + this.setupAnimationStates(); + } ++ */ // Plazma - Remove persist flag + + if (this.isScared()) { + this.clampHeadRotationToBody(); +@@ -245,12 +247,14 @@ public class Armadillo extends Animal { + + @Override + public void handleEntityEvent(byte status) { ++ /* // Plazma - Remove persist 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 flag + super.handleEntityEvent(status); +- } ++ //} // Plazma - Remove persist flag + + } + +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 8a20f056bde735ac896282918c2bed036178fbc7..a8cfebdf58fbce7dacf450ac31c4640c638ee985 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 +@@ -207,9 +207,11 @@ public class Axolotl extends Animal implements VariantHolder, B + this.handleAirSupply(i); + } + ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide()) { + this.tickAnimations(); + } ++ */ // Plazma - Remove persist 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 a8c68b4e17456221d601696571135a281eb1555e..a40cf6f771187515fc9b408f910f36fe9148355a 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 +@@ -193,9 +193,11 @@ public class Camel extends AbstractHorse { + } + } + ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide()) { + this.setupAnimationStates(); + } ++ */ // Plazma - Remove persist flag + + if (this.refuseToMove()) { + this.clampHeadRotationToBody(); +@@ -442,9 +444,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 flag + this.ageUp(10); +- } ++ //} // Plazma - Remove persist flag + } + + if (!flag && !flag1 && !flag2) { +@@ -670,9 +672,9 @@ public class Camel extends AbstractHorse { + + @Override + public void openCustomInventoryScreen(Player player) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + player.openHorseInventory(this, this.inventory); +- } ++ //} // Plazma - Remove persist 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 542cd59bb0eecac3845c3eefdd20e9105b1448c0..62991c7d1c4d62669adeb30b56c94b0e7d998ab2 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 +@@ -270,9 +270,11 @@ public class Frog extends Animal implements VariantHolder> { + + @Override + public void tick() { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide()) { + this.swimIdleAnimationState.animateWhen(this.isInWaterOrBubble() && !this.walkAnimation.isMoving(), this.tickCount); + } ++ */ // Plazma - Remove persist flag + + super.tick(); + } +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 7b9e7d3595bd6add8f76c4d9bf9758c78ecce962..b935c8ce4c7f5711e36e05838e7f762558c4e4e7 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 +@@ -158,7 +158,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 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 b258be16f32ffd58ac8406deac9423cb01ca9a5c..bd01db6e0f3e70f52f0e5d0a0dd59ec0c7798f14 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 +@@ -491,9 +491,9 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } + + protected void syncSaddleToClients() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.setFlag(4, !this.inventory.getItem(0).isEmpty()); +- } ++ //} // Plazma - Remove persist flag + } + + @Override +@@ -591,7 +591,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 flag + player.openHorseInventory(this, this.inventory); + } + +@@ -604,7 +604,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 (InteractionResult) (!flag /*&& !this.level().isClientSide*/ ? InteractionResult.PASS : InteractionResult.SUCCESS_SERVER); // Plazma - Remove persist flag + } + + protected boolean handleEating(Player player, ItemStack item) { +@@ -632,7 +632,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 flag + flag = true; + this.setInLove(player, item.copy()); // Paper - Fix EntityBreedEvent copying + } +@@ -640,7 +640,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 flag + flag = true; + this.setInLove(player, item.copy()); // Paper - Fix EntityBreedEvent copying + } +@@ -653,13 +653,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 flag + this.ageUp(short0); + flag = true; +- } ++ //} // Plazma - Remove persist 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 flag + this.modifyTemper(b0); + flag = true; + } +@@ -675,11 +675,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 flag + player.setYRot(this.getYRot()); + player.setXRot(this.getXRot()); + player.startRiding(this); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -868,10 +868,10 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } + + private void openMouth() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.mouthCounter = 1; + this.setFlag(64, true); +- } ++ //} // Plazma - Remove persist 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 8401c7ae749f6300281cbd6b2bfc77f03d5eb9ea..8a543b36c1fae5accf5a2703063af67bfddf9854 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 +@@ -267,18 +267,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 flag + this.ageUp(b0); +- } ++ //} // Plazma - Remove persist 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 flag + this.modifyTemper(b1); +- } ++ //} // Plazma - Remove persist 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 1d765ad53a9d8dd388106bc0cb02f4919a1f8173..561b2c855a5c4f99447c85b040e0a43e4233b268 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java ++++ b/src/main/java/net/minecraft/world/entity/animal/horse/TraderLlama.java +@@ -138,9 +138,9 @@ public class TraderLlama extends Llama { + @Override + public void aiStep() { + super.aiStep(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.maybeDespawn(); +- } ++ //} // Plazma - Remove persist 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 cd1845f6d7552670ae29c7a5b087220f3b4fc0e9..5d6202615f33c78e6a7d96fb53a7fd29c08fc5ab 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 +@@ -433,9 +433,11 @@ public class Sniffer extends Animal { + } + + private void playSearchingSound() { ++ /* // Plazma - Remove persist flag + 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 flag + + } + +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 e0e76b5abdb9650c3c50a3c8b49336977982fe67..da0754457087a4a6b3c76db87d0aa818ca927fd4 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,9 +223,11 @@ public class EnderDragon extends Mob implements Enemy { + + @Override + public void onFlap() { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide && !this.isSilent()) { + this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENDER_DRAGON_FLAP, this.getSoundSource(), 5.0F, 0.8F + this.random.nextFloat() * 0.3F, false); + } ++ */ // Plazma - Remove persist flag + + } + +@@ -269,6 +271,7 @@ public class EnderDragon extends Mob implements Enemy { + // Purpur end + + this.processFlappingMovement(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.setHealth(this.getHealth()); + if (!this.isSilent() && !this.phaseManager.getCurrentPhase().isSitting() && --this.growlTime < 0) { +@@ -276,6 +279,7 @@ public class EnderDragon extends Mob implements Enemy { + this.growlTime = 200 + this.random.nextInt(200); + } + } ++ */ // Plazma - Remove persist flag + + if (this.dragonFight == null) { + Level world = this.level(); +@@ -386,9 +390,9 @@ public class EnderDragon extends Mob implements Enemy { + this.phaseManager.getCurrentPhase().doClientTick(); + } + +- if (!this.level().isClientSide()) { ++ //if (!this.level().isClientSide()) { // Plazma - Remove persist flag + this.applyEffectsFromBlocks(); +- } ++ //} // Plazma - Remove persist flag + + this.yBodyRot = this.getYRot(); + Vec3[] avec3d = new Vec3[this.subEntities.length]; +@@ -1132,9 +1136,11 @@ public class EnderDragon extends Mob implements Enemy { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor data) { ++ /* // Plazma - Remove persist flag + if (EnderDragon.DATA_PHASE.equals(data) && this.level().isClientSide) { + this.phaseManager.setPhase(EnderDragonPhase.getById((Integer) this.getEntityData().get(EnderDragon.DATA_PHASE))); + } ++ */ // Plazma - Remove persist flag + + super.onSyncedDataUpdated(data); + } +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..58462e24d8490b71d5be8b3f3b3fdffb47552952 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 flag + this.dragon.getEntityData().set(EnderDragon.DATA_PHASE, type.getId()); +- } ++ //} // Plazma - Remove persist 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 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 026e730f67c58caf385070d57a2e199fca966a46..7c862d730d8062303046519a9601c62fe284e1ba 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 +@@ -314,7 +314,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 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 037586c0fdb42a02660aba89dd741a647c67e52b..b6123d17e9fdd237e432cc90db57a8efe7d8bb12 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +@@ -387,8 +387,8 @@ public class ArmorStand extends LivingEntity { + if (!this.isMarker() && !itemstack.is(Items.NAME_TAG)) { + if (player.isSpectator()) { + return InteractionResult.SUCCESS; +- } else if (player.level().isClientSide) { +- return InteractionResult.SUCCESS_SERVER; ++ //} else if (player.level().isClientSide) { // Plazma - Remove persist flag ++ // return InteractionResult.SUCCESS_SERVER; // Plazma - Remove persist flag + } else { + net.minecraft.world.entity.EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(itemstack); + +@@ -572,10 +572,12 @@ public class ArmorStand extends LivingEntity { + @Override + public void handleEntityEvent(byte status) { + if (status == 32) { ++ /* // Plazma - Remove persist flag + 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(); + } ++ */ // Plazma - Remove persist flag + } else { + super.handleEntityEvent(status); + } +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 9992a4e791495baae07645444f6374f083c56552..dafa77a522a181b5a1c92b715fcdb225306c0a80 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 flag + if (!flag) { + if (flag1 && !this.isRemoved()) { + MapItemSavedData worldmap = MapItem.getSavedData(itemstack, this.level()); +@@ -454,9 +454,11 @@ public class ItemFrame extends HangingEntity { + this.gameEvent(GameEvent.BLOCK_CHANGE, player); + return InteractionResult.SUCCESS; + } ++ /* // Plazma - Remove persist flag + } else { + return (InteractionResult) (!flag && !flag1 ? InteractionResult.PASS : InteractionResult.SUCCESS); + } ++ */ // Plazma - Remove persist flag + } + + public SoundEvent getRotateItemSound() { +diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +index d3a7953a3f42a0020342845e9107c6991637b050..7f0d040d645a096891bc8d251b69522796404aec 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 flag + if (this.level().isClientSide) { + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove persist flag + boolean flag = false; + List list = LeadItem.leashableInArea(this.level(), this.getPos(), (leashable) -> { + Entity entity = leashable.getLeashHolder(); +@@ -148,7 +150,7 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity { + } + + return InteractionResult.SUCCESS; +- } ++ //} // Plazma - Remove persist 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 89d89a1b07231f3f009a8fa66374af3fcc3e2549..8328e6c6bfabf144b6be999132e90160a5759dc2 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 flag + if (this.level().isClientSide) { + this.noPhysics = false; + } else { ++ */ // Plazma - Remove persist 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 flag + + if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change + 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 flag + this.mergeWithNeighbours(); + } + +@@ -224,16 +226,16 @@ public class ItemEntity extends Entity implements TraceableEntity { + // CraftBukkit end */ + + this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + double d0 = this.getDeltaMovement().subtract(vec3d).lengthSqr(); + + if (d0 > 0.01D) { + this.hasImpulse = true; + } +- } ++ //} // Plazma - Remove persist flag + +- if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate +- // CraftBukkit start - fire ItemDespawnEvent ++ if (/*!this.level().isClientSide &&*/ this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate ++ // CraftBukkit start - fire ItemDespawnEvent // Plazma - Remove persist flag + if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { + this.age = 0; + return; +@@ -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 flag + // CraftBukkit start - fire ItemDespawnEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { + this.age = 0; +@@ -496,7 +498,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + + @Override + public void playerTouch(net.minecraft.world.entity.player.Player player) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + ItemStack itemstack = this.getItem(); + Item item = itemstack.getItem(); + int i = itemstack.getCount(); +@@ -576,7 +578,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + player.onItemPickup(this); + } + +- } ++ //} // Plazma - Remove persist flag + } + + @Override +@@ -596,7 +598,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 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 287ba483614e79e78022e703ef891f59f41ac455..d8d14da11254a67544ef4035ba29a455e70c9dac 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 flag + this.explode(); +- } ++ //} // Plazma - Remove persist flag + this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause + // CraftBukkit end + } else { + this.updateInWaterStateAndDoFluidPushing(); ++ /* // Plazma - Remove persist 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 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 39d02cf0e31832e30c4f034b0b5385e3e0057e60..4a389323d2ba15b282217ec54c52f5c278f79ff6 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java ++++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +@@ -148,7 +148,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + } + + public void reassessWeaponGoal() { +- if (this.level() != null && !this.level().isClientSide) { ++ if (this.level() != null /*&& !this.level().isClientSide*/) { // Plazma - Remove persist flag + this.goalSelector.removeGoal(this.meleeGoal); + this.goalSelector.removeGoal(this.bowGoal); + ItemStack itemstack = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)); +@@ -236,9 +236,9 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + @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 flag + this.reassessWeaponGoal(); +- } ++ //} // Plazma - Remove persist 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 07db4557ab0d7a4a0f5432257bd18195d2de7255..cac9e15f1a36fa187b09d908be19e72729cb8c40 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Blaze.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Blaze.java +@@ -135,6 +135,7 @@ public class Blaze extends Monster { + this.setDeltaMovement(this.getDeltaMovement().multiply(1.0, 0.6, 1.0)); + } + ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + if (this.random.nextInt(24) == 0 && !this.isSilent()) { + this.level() +@@ -154,6 +155,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 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 38cbe2fce9c36195aa9bea2af26d14364b216825..058ca0f7b85754950ddbb014958c1b90f15f8549 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java +@@ -356,7 +356,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 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 +@@ -364,7 +364,7 @@ public class Creeper extends Monster { + } else { + itemstack.hurtAndBreak(1, player, getSlotForHand(hand)); + } +- } ++ //} // Plazma - Remove persist 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 949207eda199c874f2f14074b5a4fff5462b86b9..de3d91891000c599950e31da595c254a3b421e7a 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java +@@ -290,7 +290,7 @@ public class Drowned extends Zombie implements RangedAttackMob { + + @Override + public void updateSwimming() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + if (this.isEffectiveAi() && this.isUnderWater() && this.wantsToSwim()) { + this.navigation = this.waterNavigation; + this.setSwimming(true); +@@ -298,7 +298,7 @@ public class Drowned extends Zombie implements RangedAttackMob { + this.navigation = this.groundNavigation; + this.setSwimming(false); + } +- } ++ //} // Plazma - Remove persist 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 39ec4b00c6254824632b37ea9824ae9ff84cdb20..fbf08c9041e07f49f1fc2f869ea2f5ba795bc7ff 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java ++++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +@@ -228,9 +228,11 @@ public class EnderMan extends Monster implements NeutralMob { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor data) { ++ /* // Plazma - Remove persist flag + if (EnderMan.DATA_CREEPY.equals(data) && this.hasBeenStaredAt() && this.level().isClientSide) { + this.playStareSound(); + } ++ */ // Plazma - Remove persist flag + + super.onSyncedDataUpdated(data); + } +@@ -277,16 +279,18 @@ public class EnderMan extends Monster implements NeutralMob { + + @Override + public void aiStep() { ++ /* // Plazma - Remove persist 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 flag + + this.jumping = false; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.updatePersistentAnger((ServerLevel) this.level(), true); +- } ++ //} // Plazma - Remove persist flag + + super.aiStep(); + } +@@ -311,7 +315,7 @@ public class EnderMan extends Monster implements NeutralMob { + } + + public boolean teleport() { +- if (!this.level().isClientSide() && this.isAlive()) { ++ if (/*!this.level().isClientSide() &&*/ this.isAlive()) { + 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 f8373fc9839fccb31e3dd090de70e2cd7c9e6cfc..57158457f7d0e6a785df9fe19204d73d6b918e79 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Endermite.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Endermite.java +@@ -152,11 +152,13 @@ public class Endermite extends Monster { + @Override + public void aiStep() { + super.aiStep(); ++ /* // Plazma - Remove persist 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 flag + if (!this.isPersistenceRequired()) { + ++this.life; + } +@@ -164,7 +166,7 @@ public class Endermite extends Monster { + if (this.life >= 2400) { + this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause + } +- } ++ //} // Plazma - Remove persist 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 da833bf35342f771ecccd5dcac4fe87f72d047b0..25a954f5a7286584d95d67994f328f22c25681f1 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Guardian.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Guardian.java +@@ -165,7 +165,8 @@ public class Guardian extends Monster { + public LivingEntity getActiveAttackTarget() { + if (!this.hasActiveAttackTarget()) { + return null; +- } else if (this.level().isClientSide) { ++ ++ } /*else if (this.level().isClientSide) { // Plazma - Remove persist flag + if (this.clientSideCachedAttackTarget != null) { + return this.clientSideCachedAttackTarget; + } else { +@@ -179,8 +180,9 @@ public class Guardian extends Monster { + } + } + } else { ++ */ // Plazma - Remove persist flag + return this.getTarget(); +- } ++ //} // Plazma - Remove persist flag + } + + @Override +@@ -226,6 +228,7 @@ public class Guardian extends Monster { + @Override + public void aiStep() { + if (this.isAlive()) { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.clientSideTailAnimationO = this.clientSideTailAnimation; + Vec3 vec3d; +@@ -294,6 +297,7 @@ public class Guardian extends Monster { + } + } + } ++ */ // Plazma - Remove persist 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 2ca241344efc6320d2018bdc772f74470080eeed..24b712b8f2671b8e3ba9ba1114798ad696d154e0 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 { + @Override + public void aiStep() { + super.aiStep(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide && this.isInvisible()) { + --this.clientSideIllusionTicks; + if (this.clientSideIllusionTicks < 0) { +@@ -161,6 +162,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { + this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ILLUSIONER_MIRROR_MOVE, this.getSoundSource(), 1.0F, 1.0F, false); + } + } ++ */ // Plazma - Remove persist flag + + } + +diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java +index cda6cb5b10b895bab48d2212f259ba4ca40e1ed6..e973d8de70ec1269e663a5b6713545235468f293 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java +@@ -232,6 +232,7 @@ public class Phantom extends FlyingMob implements Enemy { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist 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); +@@ -248,6 +249,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 flag + + if (level().purpurConfig.phantomFlamesOnSwoop && attackPhase == AttackPhase.SWOOP) shoot(); // Purpur + } +diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java +index e3fefd52c83079fe3eab1a96dd81a183f718192b..7a5279a21d05a4de232c67afb9891d90feabe232 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java +@@ -229,7 +229,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 0) { + --this.clientSideTeleportInterpolation; +@@ -244,6 +245,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 1 && this.isDeadOrDying()) { ++ if (/*!this.level().isClientSide &&*/ i > 1 && this.isDeadOrDying()) { // Plazma - Remove persist flag + float f = this.getDimensions(this.getPose()).width(); + float f1 = f / 2.0F; + int j = i / 2; +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..5ed02b7b8a5d6a13b94a808449117ebb0527a8ed 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 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 flag + } + + @Override +@@ -80,6 +80,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide && this.isCastingSpell()) { + SpellcasterIllager.IllagerSpell entityillagerwizard_spell = this.getCurrentSpell(); + float f = (float) entityillagerwizard_spell.spellColor[0]; +@@ -94,6 +95,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + this.level().addParticle(ColorParticleOption.create(ParticleTypes.ENTITY_EFFECT, f, f1, f2), this.getX() + (double) f4 * d0, this.getY() + d1, this.getZ() + (double) f5 * d0, 0.0D, 0.0D, 0.0D); + this.level().addParticle(ColorParticleOption.create(ParticleTypes.ENTITY_EFFECT, f, f1, f2), this.getX() - (double) f4 * d0, this.getY() + d1, this.getZ() - (double) f5 * d0, 0.0D, 0.0D, 0.0D); + } ++ */ // Plazma - Remove persist flag + + } + +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 1669acbcf97bee0fa6b0ee91cf53217c53cf55d8..651cc3297a86ff298f72b28a9fb623a0922adad8 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java +@@ -116,9 +116,9 @@ public class Spider extends Monster { + @Override + public void tick() { + super.tick(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist 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 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 c3b5b34a54de945071692293645b8a8865aed961..d414158e1222f9a4f73a33abcf96f994aee4efde 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Strider.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java +@@ -142,9 +142,11 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor data) { ++ /* // Plazma - Remove persist flag + if (Strider.DATA_BOOST_TIME.equals(data) && this.level().isClientSide) { + this.steering.onSynced(); + } ++ */ // Plazma - Remove persist flag + + super.onSyncedDataUpdated(data); + } +@@ -502,9 +504,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 flag + player.startRiding(this); +- } ++ //} // Plazma - Remove persist 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 313228811d1eff478887511f99b49706efc49774..db175aadc107bde53d211d969a0351cf3d19ce0a 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java +@@ -144,7 +144,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 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 0cff4d4ee945ab5b6362648bf932af796d16a601..dbbe0e965c3c072e3c19bb2d23295d7d0386eab5 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java +@@ -292,7 +292,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 flag + this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(0.5); + } + } +@@ -328,11 +328,13 @@ public class Zoglin extends Monster implements HoglinBase { + + @Override + protected SoundEvent getAmbientSound() { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + return null; + } else { ++ */ // Plazma - Remove persist flag + return this.brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET) ? SoundEvents.ZOGLIN_ANGRY : SoundEvents.ZOGLIN_AMBIENT; +- } ++ //} // Plazma - Remove persist 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 85b03e0bf7436cb846df13c575ad78ac6a17a151..94f2f27abdf5e48835bd134ac164a163fb78dc41 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +@@ -249,7 +249,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 flag + AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); + + attributemodifiable.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable +@@ -275,7 +275,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 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 6f6b32bf7f68d05e4173c31f2e631a409b858a05..36583ccfb6694b07e4c852d31d00f399f677a674 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java ++++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +@@ -207,7 +207,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + + @Override + public void tick() { +- if (!this.level().isClientSide && this.isAlive() && this.isConverting()) { ++ if (/*!this.level().isClientSide &&*/ this.isAlive() && this.isConverting()) { // Plazma - Remove persist flag + int i = this.getConversionProgress(); + // CraftBukkit start - Use wall time instead of ticks for villager conversion + int elapsedTicks = MinecraftServer.currentTick - this.lastTick; +@@ -231,9 +231,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 flag + this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur +- } ++ //} // Plazma - Remove persist 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 e60c2dbc2188ea32459b536b0e3f3fea36f70776..fe26b92a04e95feed129e66edcee9218a5a357e4 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 +@@ -89,6 +89,7 @@ public class Breeze extends Monster { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor data) { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide() && DATA_POSE.equals(data)) { + this.resetAnimations(); + Pose pose = this.getPose(); +@@ -103,6 +104,7 @@ public class Breeze extends Monster { + this.slide.startIfStopped(this.tickCount); + } + } ++ */ // Plazma - Remove persist flag + + super.onSyncedDataUpdated(data); + } +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 6a17c30afc7863dfa55f1e07ea29b1fb0166adc7..f6d8ac1f9d6c5a25b79ed8b679d1c541c8470788 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 +@@ -134,7 +134,7 @@ public class Creaking extends Monster { + this.attackAnimationRemainingTicks--; + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + boolean bl = this.entityData.get(CAN_MOVE); + boolean bl2 = this.checkCanMove(); + if (bl2 != bl) { +@@ -148,7 +148,7 @@ public class Creaking extends Monster { + } + + this.entityData.set(CAN_MOVE, bl2); +- } ++ //} // Plazma - Remove persist flag + + super.aiStep(); + } +@@ -156,9 +156,11 @@ public class Creaking extends Monster { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.setupAnimationStates(); + } ++ */ // Plazma - Remove persist flag + } + + private void setupAnimationStates() { +diff --git a/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java b/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java +index b57818cbe9ac6a2095da8a2ee6ccbd4c1804a502..ebc0e152a4b821b30fe1d371749a70a07928a728 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java ++++ b/src/main/java/net/minecraft/world/entity/monster/creaking/CreakingTransient.java +@@ -44,9 +44,10 @@ public class CreakingTransient extends Creaking { + + @Override + public boolean hurtServer(ServerLevel world, DamageSource source, float amount) { ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + return super.hurtServer(world, source, amount); +- } else if (source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { ++ } else*/ if (source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { // Plazma - Remove persist flag + return super.hurtServer(world, source, amount); + } else if (!this.isInvulnerableTo(world, source) && this.invulnerabilityAnimationRemainingTicks <= 0) { + this.invulnerabilityAnimationRemainingTicks = 8; +@@ -82,7 +83,7 @@ public class CreakingTransient extends Creaking { + + @Override + public void tick() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + label18: + { + if (this.homePos != null) { +@@ -100,12 +101,14 @@ public class CreakingTransient extends Creaking { + this.setRemoved(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause + return; + } +- } ++ //} // Plazma - Remove persist flag + + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.setupAnimationStates(); + } ++ */ // Plazma - Remove persist flag + + } + +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 8b91472441a17572d8bb47e42402c585b26aeeb6..290d7fc32c9ce9ed91f9c288dc0d0f294275b997 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 +@@ -389,7 +389,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { + + @Override + protected SoundEvent getAmbientSound() { +- return this.level().isClientSide ? null : HoglinAi.getSoundForCurrentActivity(this).orElse(null); ++ return /*this.level().isClientSide ? null :*/ HoglinAi.getSoundForCurrentActivity(this).orElse(null); // Plazma - Remove persist 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 8e7c737263f55fdd4a2adbab4a9d208674a55639..a25f50c93de3a5040f78ec358e9e5b50f264ce5d 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java ++++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +@@ -312,14 +312,14 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + @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 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 flag + + } + +@@ -484,7 +484,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 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 5350c7a6085edc4f8529f443091d52cb70c62efd..bcc1f2e8ad66eb826617f17d98fb43649fc8deb2 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 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 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 6c74cf1dea99b3b967b8c3d76f405f823c881fb9..693da8fd0425829e02da9e30edfc5ecc0ed6a65c 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 flag + if (this.level().isClientSide) { + throw new IllegalStateException("Cannot load Villager offers on the client"); + } else { ++ */ // Plazma - Remove persist flag + if (this.offers == null) { + this.offers = new MerchantOffers(); + this.updateTrades(); + } + + return this.offers; +- } ++ //} // Plazma - Remove persist 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 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 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 flag + + this.writeInventoryToTag(nbt, this.registryAccess()); + } +@@ -308,8 +310,10 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa + return this.getPosition(delta).add(vec3d.yRot(-f1)); + } + ++ /* // Plazma - Remove persist flag + @Override + public boolean isClientSide() { + return this.level().isClientSide; + } ++ */ // Plazma - Remove persist flag + } +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 50bed3677f7e38d19ceda0dff0c499957312b2ad..917a0c10de0a7fd4b0635bce24164e5b446e116e 100644 +--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java ++++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +@@ -410,7 +410,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + this.setUnhappy(); + return tryRide(player, hand, InteractionResult.SUCCESS); // Purpur + } else { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + boolean flag = this.getOffers().isEmpty(); + + if (hand == InteractionHand.MAIN_HAND) { +@@ -428,7 +428,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + if (level().purpurConfig.villagerRidable && itemstack.isEmpty()) return tryRide(player, hand); // Purpur + if (this.level().purpurConfig.villagerAllowTrading) // Purpur + this.startTrading(player); +- } ++ //} // Plazma - Remove persist flag + + return InteractionResult.SUCCESS; + } +@@ -439,9 +439,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 flag + this.makeSound(SoundEvents.VILLAGER_NO); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -469,7 +469,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + } + + private void resetSpecialPrices() { +- if (!this.level().isClientSide()) { ++ //if (!this.level().isClientSide()) { // Plazma - Remove persist flag + Iterator iterator = this.getOffers().iterator(); + + while (iterator.hasNext()) { +@@ -478,7 +478,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + merchantrecipe.resetSpecialPriceDiff(); + } + +- } ++ //} // Plazma - Remove persist 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 959e10586cddaae2590d2d84f5fd809dad80889b..8bb0b86aa95b252fafe5720037de06d4ba5476e9 100644 +--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java ++++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +@@ -156,7 +156,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 flag + if (this.getOffers().isEmpty()) { + return tryRide(player, hand, InteractionResult.CONSUME); // Purpur + } +@@ -165,7 +165,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill + this.setTradingPlayer(player); + this.openTradingScreen(player, this.getDisplayName(), 1); + } // Purpur +- } ++ //} // Plazma - Remove persist flag + + return InteractionResult.SUCCESS; + } else { +@@ -298,9 +298,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 flag + this.maybeDespawn(); +- } ++ //} // Plazma - Remove persist 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 c1d068fa99ec0fd5685bbb627a775e4d1587feab..47778aefdf05948845fa20514776e011b931d984 100644 +--- a/src/main/java/net/minecraft/world/entity/player/Player.java ++++ b/src/main/java/net/minecraft/world/entity/player/Player.java +@@ -238,7 +238,7 @@ public abstract class Player extends LivingEntity { + this.lastDeathLocation = Optional.empty(); + this.setUUID(gameProfile.getId()); + this.gameProfile = gameProfile; +- this.inventoryMenu = new InventoryMenu(this.inventory, !world.isClientSide, this); ++ this.inventoryMenu = new InventoryMenu(this.inventory, this); // Plazma - Remove persist flag + this.containerMenu = this.inventoryMenu; + this.moveTo((double) pos.getX() + 0.5D, (double) (pos.getY() + 1), (double) pos.getZ() + 0.5D, yaw, 0.0F); + this.rotOffs = 180.0F; +@@ -303,7 +303,7 @@ public abstract class Player extends LivingEntity { + this.sleepCounter = 100; + } + +- if (!this.level().isClientSide && this.level().isDay()) { ++ if (/*!this.level().isClientSide &&*/ this.level().isDay()) { // Plazma - Remove persist flag + this.stopSleepInBed(false, true); + } + } else if (this.sleepCounter > 0) { +@@ -315,7 +315,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 flag + this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason + this.containerMenu = this.inventoryMenu; + } +@@ -599,7 +599,7 @@ public abstract class Player extends LivingEntity { + + @Override + public void rideTick() { +- if (!this.level().isClientSide && this.wantsToStopRiding() && this.isPassenger()) { ++ if (/*!this.level().isClientSide &&*/ this.wantsToStopRiding() && this.isPassenger()) { // Plazma - Remove persist flag + this.stopRiding(); + // CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return + if (!this.isPassenger()) { +@@ -676,7 +676,7 @@ public abstract class Player extends LivingEntity { + + 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 flag + if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Add option to make parrots stay + this.removeEntitiesOnShoulder(); + } +@@ -723,10 +723,10 @@ public abstract class Player extends LivingEntity { + this.autoSpinAttackTicks = riptideTicks; + this.autoSpinAttackDmg = riptideAttackDamage; + this.autoSpinAttackItemStack = stack; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.removeEntitiesOnShoulder(); + this.setLivingEntityFlag(4, true); +- } ++ //} // Plazma - Remove persist flag + + } + +@@ -811,9 +811,11 @@ public abstract class Player extends LivingEntity { + @Nullable + public ItemEntity drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) { + // CraftBukkit end ++ /* // Plazma - Remove persist flag + if (!itemstack.isEmpty() && this.level().isClientSide) { + this.swing(InteractionHand.MAIN_HAND); + } ++ */ // Plazma - Remove persist flag + + return null; + } +@@ -1059,9 +1061,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 flag + this.awardStat(Stats.ITEM_USED.get(this.useItem.getItem())); +- } ++ //} // Plazma - Remove persist flag + + if (amount >= 3.0F) { + int i = 1 + Mth.floor(amount); +@@ -1454,7 +1456,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 flag + if (flag5) { + itemstack.postHurtEnemy((LivingEntity) object, this); + } +@@ -1895,14 +1897,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 flag + // CraftBukkit start + EntityExhaustionEvent event = CraftEventFactory.callPlayerExhaustionEvent(this, reason, f); + if (!event.isCancelled()) { + this.foodData.addExhaustion(event.getExhaustion()); + } + // CraftBukkit end +- } ++ //} // Plazma - Remove persist flag + + } + } +@@ -2098,7 +2100,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 flag + return EntityType.create(nbttagcompound, this.level(), EntitySpawnReason.LOAD).map((entity) -> { // CraftBukkit + if (entity instanceof TamableAnimal) { + ((TamableAnimal) entity).setOwnerUUID(this.uuid); +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 f91519f73e766cf891351a95d76abb416da2f957..fa4d7af5b1c7ace5f537fe9c95ecce456c1af5a8 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +@@ -229,13 +229,13 @@ public abstract class AbstractArrow extends Projectile { + } + + if (this.isInGround() && flag) { +- if (!this.level().isClientSide()) { ++ //if (!this.level().isClientSide()) { // Plazma - Remove persist flag + if (this.lastState != iblockdata && this.shouldFall()) { + this.startFalling(); + } else { + this.tickDespawn(); + } +- } ++ //} // Plazma - Remove persist flag + + ++this.inGroundTime; + if (this.isAlive()) { +@@ -486,7 +486,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 flag + entityliving1.setArrowCount(entityliving1.getArrowCount() + 1); + } + +@@ -508,7 +508,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 flag + ServerPlayer entityplayer = (ServerPlayer) entity1; + + if (this.piercedAndKilledEntities != null) { +@@ -764,7 +764,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 flag + // CraftBukkit start + ItemStack itemstack = this.getPickupItem(); + if (this.pickup == Pickup.ALLOWED && !itemstack.isEmpty() && player.getInventory().canHold(itemstack) > 0) { +@@ -888,7 +888,7 @@ public abstract class AbstractArrow extends Projectile { + } + + 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 flag + } + + @Override +diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +index a84dccc59f9dc5298b18f263dc779c30c9b7ddab..383f18b784a786c193549dc0dcc6527e4925e1a4 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +@@ -77,7 +77,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { + 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 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..65dfcbb06c8cb382b68e6ae25ed04de085c65bf6 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 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 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..a338c7be3a663cdf9411f8e2d35a4efcc1a780d8 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 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 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..60f53842285c567b50221a5b6717f6fe8f323010 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 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 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..c5808875ac064b408962ab3d706de8d47713ed48 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 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 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 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 flag + } else { + this.setPosRaw(d0, d1, d2); + } ++ */ // Plazma - Remove persist 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..26fd45a5f5170ab8e08bd8024e765990a235e2cb 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 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 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 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 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 4daa69c6be6d48563e30343a7e40e4da9ec7e5ad..b54ca13d4bb614629fe1407c410ef0af0ed79a3a 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 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 flag + this.catchingFish(blockposition); +- } ++ //} // Plazma - Remove persist 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 flag + this.setHookedEntity(entityHitResult.getEntity()); +- } ++ //} // Plazma - Remove persist 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 flag + int i = 0; + + if (this.hookedIn != null) { +@@ -605,9 +605,11 @@ public class FishingHook extends Projectile { + + @Override + public void handleEntityEvent(byte status) { ++ /* // Plazma - Remove persist flag + if (status == 31 && this.level().isClientSide && this.hookedIn instanceof net.minecraft.world.entity.player.Player && ((net.minecraft.world.entity.player.Player) this.hookedIn).isLocalPlayer()) { + this.pullEntity(this.hookedIn); + } ++ */ // Plazma - Remove persist flag + + super.handleEntityEvent(status); + } +diff --git a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java +index 0b7f27a6cc6be58fa5b60002059c9fbb3b1b7b67..a18c2b39c4fd730611f2d6ca752fcdd079686f2b 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 flag + this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove persist 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 b0e258d6025dd9536f1656e087bf85fee60e642d..2c6c968a38a00290ea347fd7ed5e55b6646cab1e 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +@@ -352,7 +352,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 flag + // Paper start - Fix PickupStatus getting reset + if (this instanceof AbstractArrow arrow) { + arrow.setOwner(owner, false); +@@ -361,7 +361,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { + } + // Paper end - Fix PickupStatus getting reset + this.onDeflection(deflector, fromAttack); +- } ++ //} // Plazma - Remove persist 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..7f615753401a3b500257678ea5c3f30163b4e560 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 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 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 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 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 69dd29ed5e3cb37180b65183b0a83c8619d8e9a0..5f58d4c560cad8e78c38a2d2205b398def556c50 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 flag + this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove persist 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 0db58e7d63a5c1b43a2224c247979f23a1d3f899..8220c0ff5d51d7e7604edb0e04b30735a08b3126 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 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 flag + } + // Purpur end + + @Override + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.level().broadcastEntityEvent(this, (byte) 3); + this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove persist 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..13aea64c6f73b44cfe9bf377e7c442d8e37238c7 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java +@@ -30,9 +30,11 @@ public class SpectralArrow extends AbstractArrow { + @Override + public void tick() { + super.tick(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide && !this.isInGround()) { + this.level().addParticle(ParticleTypes.INSTANT_EFFECT, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); + } ++ */ // Plazma - Remove persist flag + + } + +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..9a227935de879cf4babe3730c3bbd276a9fce7ec 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 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 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..2a44d5e5a5b56184234cc8a6c656211608aefca4 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 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 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 e63b408594b5d2673148e39c1deafc8510537bee..112140145a4a5a1c375f1036022c2414fef65e1f 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 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 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 a325a223d06e155c01f664562db0edd0b180e356..a2212c93feca40fb7a7643a88b5447c49c4e7c34 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 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 flag + + } + + @Override + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove persist 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 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 56c265940208bc94f531a5af94f564b59f35ebf3..137234a6c50d35d2e470bdd0020fec2364cb0ca6 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 flag + this.isAboveBubbleColumn = true; + this.bubbleColumnDirectionIsDown = drag; + if (this.getBubbleTime() == 0) { + this.setBubbleTime(60); + } +- } ++ //} // Plazma - Remove persist 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 flag + this.ejectPassengers(); + } + +@@ -315,10 +315,12 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + } + + this.floatBoat(); ++ /* // Plazma - Remove persist flag + if (this.level().isClientSide) { + this.controlBoat(); + this.level().sendPacketToServer(new ServerboundPaddleBoatPacket(this.getPaddleState(0), this.getPaddleState(1))); + } ++ */ // Plazma - Remove persist 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 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 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 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 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 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 flag + this.dropLeash(true, true); + } + +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..fa97779d631caaabd7ba7b74f9b620e72f3c7dc8 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 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 c328f4155c0c4cc4f590d9d7a992497d8d129421..f763b3cdf621b8ecdcd8bc7f1fa4ec2069c02a42 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +@@ -622,7 +622,7 @@ public abstract class AbstractMinecart extends VehicleEntity { + + @Override + public void push(Entity entity) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist flag + 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)) { +@@ -666,7 +666,7 @@ public abstract class AbstractMinecart extends VehicleEntity { + + } + } +- } ++ //} // Plazma - Remove persist 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..2c6bd8b3ff4ee8bf4fc868576ef0919e3d1eefa6 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 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..b938049afaf276bc6a7f77edf2eb5261cd3bb620 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 flag + this.consumedItemThisFrame = true; + this.setChanged(); + } +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java +index 0652494dc5f3d999116d4380032dea0e7402caec..2f30454e01ff4eb1f6bc19b5ba51741c45bc21f1 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java +@@ -169,12 +169,12 @@ public class MinecartTNT extends AbstractMinecart { + + public void primeFuse() { + this.fuse = 80; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove persist 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 flag + + } + +diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +index e0ee1c10960d24d2369d16f22431a8e02a5570aa..c7182d7786aca90aa5032a5eef3aac7ffb691510 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 flag + ItemStack itemstack = this.paymentSlot.remove(this.paymentSlot.getMaxStackSize()); + + if (!itemstack.isEmpty()) { + player.drop(itemstack, false); + } + +- } ++ //} // Plazma - Remove persist 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 5685a3aeef1f7c5a1edebce0eae5cfb0ed179df6..7009c3916c614bcf11263ec21f3de4159e052df0 100644 +--- a/src/main/java/net/minecraft/world/inventory/InventoryMenu.java ++++ b/src/main/java/net/minecraft/world/inventory/InventoryMenu.java +@@ -42,18 +42,16 @@ public class InventoryMenu extends AbstractCraftingMenu { + public static final ResourceLocation EMPTY_ARMOR_SLOT_SHIELD = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_shield"); + 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; + private final Player owner; + // CraftBukkit start + private CraftInventoryView bukkitEntity = null; + // CraftBukkit end + +- public InventoryMenu(Inventory inventory, boolean onServer, final Player owner) { ++ public InventoryMenu(Inventory inventory, final Player owner) { // Plazma - Remove persist 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.owner = owner; + this.addResultSlot(owner, 154, 28); + this.addCraftingGridSlots(98, 18); +@@ -98,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 flag + this.clearContainer(player, this.craftSlots); +- } ++ //} // Plazma - Remove persist 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 6a529b5e289c416c0ebdc0260086ec039777aa40..c5b20e917cac20922ab8320899e330340c8ca64d 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 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 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 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 d58619d1d63a03598b8740dd789d4b6f2c93f8d0..0c311c271c74df4424ccd8882749e83246a1f581 100644 +--- a/src/main/java/net/minecraft/world/item/BlockItem.java ++++ b/src/main/java/net/minecraft/world/item/BlockItem.java +@@ -221,8 +221,8 @@ public class BlockItem extends Item { + BlockEntity tileentity = world.getBlockEntity(pos); + + if (tileentity != null) { +- if (!world.isClientSide && tileentity.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission +- if (!(!world.isClientSide && world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners"))) ++ if (/*!world.isClientSide &&*/ tileentity.onlyOpCanSetNbt() && (player == null || !(player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place"))))) { // Spigot - add permission // Plazma - Remove persist flag ++ if (!(/*!world.isClientSide &&*/ world.purpurConfig.silkTouchEnabled && tileentity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners"))) // Plazma - Remove persist flag + return false; + } + +diff --git a/src/main/java/net/minecraft/world/item/BoatItem.java b/src/main/java/net/minecraft/world/item/BoatItem.java +index 78d41d57df9cb61b295f1f54db1e1d62c13db701..08e7f71bb8a92a4233e837946703a3c667e97a5a 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 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 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..dfc368f197e1c5349c0ae5ae5b51d399e413bd92 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 flag + if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 + world.levelEvent(1505, blockposition, 15); +- } ++ //} // Plazma - Remove persist 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 flag + if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 + world.levelEvent(1505, blockposition1, 15); +- } ++ //} // Plazma - Remove persist 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 6aa8ee091d3a7d2826d08ab9a03f970ef71a81ea..7c2fc04c8cd70dea0964dbee3f07e06b40b8bc5c 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 flag + CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) user, itemstack1); +- } ++ //} // Plazma - Remove persist 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 flag + world.destroyBlock(blockposition, true); + } + +diff --git a/src/main/java/net/minecraft/world/item/BundleItem.java b/src/main/java/net/minecraft/world/item/BundleItem.java +index f1999d904ac66f5349346ad8157f5401fb395e11..23f6fa49af0c124b75188d4a69af30fde888d87d 100644 +--- a/src/main/java/net/minecraft/world/item/BundleItem.java ++++ b/src/main/java/net/minecraft/world/item/BundleItem.java +@@ -141,12 +141,14 @@ public class BundleItem extends Item { + + @Override + public InteractionResult use(Level world, Player user, InteractionHand hand) { ++ /* // Plazma - Remove persist 'isClientSide' flag + if (world.isClientSide) { + return InteractionResult.CONSUME; + } else { ++ */ // Plazma - Remove persist 'isClientSide' flag + user.startUsingItem(hand); + return InteractionResult.SUCCESS_SERVER; +- } ++ //} // Plazma - Remove persist 'isClientSide' flag + } + + private void dropContent(Level world, Player player, ItemStack stack) { +@@ -232,7 +234,7 @@ public class BundleItem extends Item { + + @Override + public void onUseTick(Level world, LivingEntity user, ItemStack stack, int remainingUseTicks) { +- if (!world.isClientSide && user instanceof Player player) { ++ if (/*!world.isClientSide &&*/ user instanceof Player player) { // Plazma - Remove persist 'isClientSide' flag + int i = this.getUseDuration(stack, user); + boolean bl = remainingUseTicks == i; + if (bl || remainingUseTicks < i - 10 && remainingUseTicks % 2 == 0) { +diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java +index 86204c2ab5bbd5d45ddb1d626f844d91ccae6b4f..32979a0196f43fbcbe7306f8db2026d5a03ac185 100644 +--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java ++++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java +@@ -222,7 +222,7 @@ public class CrossbowItem extends ProjectileWeaponItem { + + @Override + public void onUseTick(Level world, LivingEntity user, ItemStack stack, int remainingUseTicks) { +- if (!world.isClientSide) { ++ //if (!world.isClientSide) { // Plazma - Remove persist flag + CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack); + float f = (float)(stack.getUseDuration(user) - remainingUseTicks) / (float)getChargeDuration(stack, user); + if (f < 0.2F) { +@@ -241,7 +241,7 @@ public class CrossbowItem extends ProjectileWeaponItem { + chargingSounds.mid() + .ifPresent(sound -> world.playSound(null, user.getX(), user.getY(), user.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F)); + } +- } ++ //} // Plazma - Remove persist 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..e481ba350ffa57fb30cc7ba2f0302e0553ae773d 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 flag + this.handleInteraction(miner, state, world, pos, false, miner.getItemInHand(InteractionHand.MAIN_HAND)); +- } ++ //} // Plazma - Remove persist 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 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..81bcbb55017a55da1cf422bc3ae7a71727738bcd 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 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 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..995f71c43794e53873e7afa2328d9112882d6a83 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 flag + if (world.isClientSide) { + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove persist 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 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 801a513d67637136a15307a98fc6bbec9d202b00..49d91eb7f4acf73a9b38140fc1267abb81cccf59 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 flag + int i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent + + itemstack.hurtAndBreak(i, user, LivingEntity.getSlotForHand(hand)); +- } ++ //} // Plazma - Remove persist 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..2a1f8362d77d4497435cf38f94cc39bca827220b 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 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 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..c8fc5d8662297926689cdd78786f5416b4960dfd 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 flag + consumer.accept(context); + if (player != null) { + context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); + } +- } ++ //} // Plazma - Remove persist 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 3d948c8d325bcef7f4cfc0045f9991acb3aa2f7c..7fc8fcab93be9076391a2981d028831cbd02a3d2 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..9c6fc26c597e1f3050601eed40f1f0c9823df9ac 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 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 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..9ed61a5aa79810ab6d3f65c446fb83f03292de20 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 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 c2f3c8b3d8eeb609b6d6067c4fb404aefbf94ec5..8114d61638c49ae91aacd3a3455a0b28cf311ac0 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 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 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 flag + MapItemSavedData mapItemSavedData = getSavedData(context.getItemInHand(), context.getLevel()); + if (mapItemSavedData != null && !mapItemSavedData.toggleBanner(context.getLevel(), context.getClickedPos())) { + return InteractionResult.FAIL; + } +- } ++ //} // Plazma - Remove persist 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 20fece9908382f40b4082f7b1fb7d41914ae31be..92d7515131713cf8dbcf1fc7c9a3c111b17a8e54 100644 +--- a/src/main/java/net/minecraft/world/item/NameTagItem.java ++++ b/src/main/java/net/minecraft/world/item/NameTagItem.java +@@ -17,7 +17,7 @@ public class NameTagItem extends Item { + public InteractionResult interactLivingEntity(ItemStack stack, Player user, LivingEntity entity, InteractionHand hand) { + Component component = stack.get(DataComponents.CUSTOM_NAME); + if (component != null && entity.getType().canSerialize()) { +- if (!user.level().isClientSide && entity.isAlive()) { ++ if (/*!user.level().isClientSide &&*/ entity.isAlive()) { // Plazma - Remove persist 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..cb48f2d81db156fcb3842788488120f999f058be 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 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 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..a8af31771082a3d06c8703c66c2af05c6be8be34 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 flag + level.levelEvent(null, 1009, blockPos, 0); +- } ++ //} // Plazma - Remove persist 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 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 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..d2cb2a6e61ca4aebc56e87e4916e2bf84b243219 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 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 e0e746d6c78421b40777125ba49f0a04809f5415..fd4ac008b5677cbe18995566e10678f35dc07e66 100644 +--- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java ++++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java +@@ -57,9 +57,11 @@ public class SpawnEggItem extends Item { + public InteractionResult useOn(UseOnContext context) { + Level world = context.getLevel(); + ++ /* // Plazma - Remove persist flag + if (world.isClientSide) { + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove persist flag + ItemStack itemstack = context.getItemInHand(); + BlockPos blockposition = context.getClickedPos(); + Direction enumdirection = context.getClickedFace(); +@@ -113,7 +115,7 @@ public class SpawnEggItem extends Item { + + return InteractionResult.SUCCESS; + } +- } ++ //} // Plazma - Remove persist flag + } + + @Override +@@ -123,9 +125,10 @@ public class SpawnEggItem extends Item { + + if (movingobjectpositionblock.getType() != HitResult.Type.BLOCK) { + return InteractionResult.PASS; +- } else if (world.isClientSide) { ++ } /*else if (world.isClientSide) { // Plazma - Remove persist flag + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove persist flag + BlockPos blockposition = movingobjectpositionblock.getBlockPos(); + + if (!(world.getBlockState(blockposition).getBlock() instanceof LiquidBlock)) { +@@ -145,7 +148,7 @@ public class SpawnEggItem extends Item { + } else { + return InteractionResult.FAIL; + } +- } ++ //} // Plazma - Remove persist flag + } + + public boolean spawnsEntity(ItemStack stack, EntityType type) { +diff --git a/src/main/java/net/minecraft/world/item/component/Consumable.java b/src/main/java/net/minecraft/world/item/component/Consumable.java +index fe8618451e3a3f5185704f791723f7897870b6f2..e0fcba7cc2ea6613080ec69c975d818c134368e8 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 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 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 1263f84cfe3b9f6ff7b33f04528a3f01ded8b670..9ff0b7fd831ae7a318f1106303e27d0f1de12feb 100644 +--- a/src/main/java/net/minecraft/world/item/equipment/Equippable.java ++++ b/src/main/java/net/minecraft/world/item/equipment/Equippable.java +@@ -85,9 +85,9 @@ public record Equippable( + 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 716b30dcd7e63c66736c448dd136c9f74dc7fe43..f1e8e2dd64ad999710bd4633d8ef42bea47122be 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 flag + + org.bukkit.craftbukkit.inventory.CraftMerchant getCraftMerchant(); // CraftBukkit + } +diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java +index 5cb39f95bd2d45b6c18554605f01d2ebf6473428..a8ff985d19e9356acc886e170b38174f761b8146 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 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 flag + if (player.getCommandSenderWorld().isClientSide) { + player.openMinecartCommandBlock(this); + } ++ */ // Plazma - Remove persist 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 357d484029fe338bea4f5770d13ccfc0dce4432e..2385c7273e89e45502086b1d5fbe1ac8070dbee0 100644 +--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java ++++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +@@ -364,9 +364,11 @@ public abstract class BaseSpawner { + + public boolean onEventTriggered(Level world, int status) { + if (status == 1) { ++ /* // Plazma - Remove persist flag + if (world.isClientSide) { + this.spawnDelay = this.minSpawnDelay; + } ++ */ // Plazma - Remove persist 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 d03a89d264cafb752e6a2f07558c119a0ee23253..e94ab488b4d7ef26021be3b97c71831eeef505f4 100644 +--- a/src/main/java/net/minecraft/world/level/Level.java ++++ b/src/main/java/net/minecraft/world/level/Level.java +@@ -137,7 +137,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + 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 flag + private final WorldBorder worldBorder; + private final BiomeManager biomeManager; + private final ResourceKey dimension; +@@ -927,7 +927,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + final DimensionType dimensionmanager = (DimensionType) holder.value(); + + this.dimension = resourcekey; +- this.isClientSide = flag; ++ //this.isClientSide = flag; // Plazma - Remove persist flag + if (dimensionmanager.coordinateScale() != 1.0D) { + this.worldBorder = new WorldBorder() { // CraftBukkit - decompile error + @Override +@@ -1031,10 +1031,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + return true; + } + // Paper end - Cancel hit for vanished players ++ /* // Plazma - Remove persist flag + @Override + public boolean isClientSide() { + return this.isClientSide; + } ++ */ // Plazma - Remove persist flag + + @Nullable + @Override +@@ -1173,7 +1175,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 flag + return false; + } else { + LevelChunk chunk = this.getChunkAt(pos); +@@ -1259,13 +1261,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 flag + this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i); + } + + if ((i & 1) != 0) { + this.blockUpdated(blockposition, iblockdata1.getBlock()); +- if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) { ++ if (/*!this.isClientSide &&*/ iblockdata.hasAnalogOutputSignal()) { // Plazma - Remove persist flag + this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock()); + } + } +@@ -1630,7 +1632,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 flag + } + + 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..4da719032b95d98840df81a52635e04ef334d33b 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 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..e10f3bacd330847622107454f9f1769a97d2a787 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 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 af71305c908ad4401bcddb120f50d76a34cd1131..ecdd56596d97a097db8511307122ae4274287456 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..3e37b1458cc050f7e6d91087790856a93d86bc71 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 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 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..29e98ac0cff092db07aa6838e59bb41885313ee5 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 flag + world.levelEvent((Player) null, 1009, pos, 0); +- } ++ //} // Plazma - Remove persist 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..16c5918a0df7b2de0282caaed16ef550d0868a56 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 flag + int i = this.getSignalForState(state); + + if (i == 0) { + this.checkPressed(entity, world, pos, state, i); + } + +- } ++ //} // Plazma - Remove persist 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..b67900e4ce4e973feb8789682cd0804da2af9cd2 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 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 flag + if (world.isClientSide) { + return state; + } else { ++ */ // Plazma - Remove persist flag + RailShape railShape = state.getValue(this.getShapeProperty()); + return new RailState(world, pos, state).place(world.hasNeighborSignal(pos), forceUpdate, railShape).getState(); +- } ++ //} // Plazma - Remove persist 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 debe8dbf1d5f3e58774903c5fcdcea672274ea61..60436689d577b5ae42bddfe198fdcdb960bd63d0 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 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 c130d316e87f1f896d33ab43831063a89e3bef2b..3c410e221e09e75e6d7a8bf9af12df4e7889f0c7 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 flag + if (world.isClientSide) { + return InteractionResult.SUCCESS_SERVER; + } else { ++ */ // Plazma - Remove persist 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 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 flag + BedPart blockpropertybedpart = (BedPart) state.getValue(BedBlock.PART); + + if (blockpropertybedpart == BedPart.FOOT) { +@@ -362,7 +364,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 flag + BlockPos blockposition1 = pos.relative((Direction) state.getValue(BedBlock.FACING)); + + world.setBlock(blockposition1, (BlockState) state.setValue(BedBlock.PART, BedPart.HEAD), 3); +@@ -373,7 +375,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + // CraftBukkit end + world.blockUpdated(pos, Blocks.AIR); + state.updateNeighbourShapes(world, pos, 3); +- } ++ //} // Plazma - Remove persist 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 6c0ea0bde1c36edda92807e317ed37f8b1bdac6a..04e4771ec6acc2451a66e9f00015181079c83166 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 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 flag + player.awardStat(Stats.ITEM_USED.get(item)); + } + } +@@ -295,7 +295,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 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 104d228633110746dde42b187ad23d1b2406b5ee..47a884dacb03b6d37d33092047f71042480a5d31 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 flag + if (direction == null) { + direction = (Direction) world.getBlockState(pos).getValue(BellBlock.FACING); + } +@@ -281,7 +281,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 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..4184a205174969e7a2756cdc463848ae8e8f6c68 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 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 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 1748aea6613e0c8081f70092c9431e7e04907383..7a36f6d7bb3c162d4a8ec57dcf69a2f53ccaf6d8 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 flag + world.destroyBlock(pos, (flags & 32) == 0, (Entity) null, maxUpdateDepth); +- } ++ //} // Plazma - Remove persist 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 cbaa6fc04eb8d765e0dd8238f2b82eed196d13c7..98ab989a4fbeaa20c79369f02ab1e0604bdbd817 100644 +--- a/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/BrewingStandBlock.java +@@ -63,7 +63,7 @@ public class BrewingStandBlock extends BaseEntityBlock { + @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 flag + } + + @Override +@@ -73,7 +73,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 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..fc3cedff3843b1d78bacd081df91fc1bbb64ee47 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 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 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..09ca0a1db57df5276e2d7cb673622a199cef1df7 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 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..6da5775490457745fecc6f24889c880ee20a8088 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 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 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 2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb..c910191864cb9c65ce827b8fe34f4b791193bf97 100644 +--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java +@@ -183,11 +183,13 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB + } + + public static void dowse(@Nullable Entity entity, LevelAccessor world, BlockPos pos, BlockState state) { ++ /* // Plazma - Remove persist 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 flag + + BlockEntity tileentity = world.getBlockEntity(pos); + +@@ -204,9 +206,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 flag + world.playSound((Player) null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F); +- } ++ //} // Plazma - Remove persist 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..cf930352658cd06916993e5e5c0add5c5e1a543e 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 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 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 663eb96b8227f000448957b5d8ea13ca78cee329..a9a22bbf234557d781e661aa99e37a2d3b44836c 100644 +--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java +@@ -333,7 +333,7 @@ public class ChestBlock extends AbstractChestBlock implements + @Nullable + @Override + public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { +- return world.isClientSide ? createTickerHelper(type, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) : null; ++ return /*world.isClientSide ? createTickerHelper(type, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) :*/ null; // Plazma - Remove persist flag + } + + public static boolean isChestBlockedAt(LevelAccessor world, BlockPos pos) { +diff --git a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..dd90935c1e6bc2904f84cfa0ef04829c417cb121 100644 +--- a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +@@ -145,16 +145,16 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { + } + + 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 +@@ -165,7 +165,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { + } + + world.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); +- } ++ //} // Plazma - Remove persist 'isClientSide' flag + } + + @Nullable +@@ -230,12 +230,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 fb5777b6a729a465c2482c5f89ced2bc79b425bc..a295d37c274cea79794bf529fac60421c333a49b 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 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 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 ed3a310d56a0cca8c4c11c3768ac2056cd11edea..cb19d28823a701720cd1998310dfc8cc8f50919f 100644 +--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +@@ -271,7 +271,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + + // 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 flag + BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack); + // Paper start - handle cancelled events + if (iblockdata1 == null) { +@@ -334,13 +334,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + } + } + // CraftBukkit end +- if (!world.isClientSide) { ++ //if (!world.isClientSide) { // Plazma - Remove persist 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 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 71798bea02c49a0dc0a0b330370b956e8d3f4608..98b00c05c340e76580c0d42ed4146f94d4fda2cf 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); // Plazma - Remove persist 'isClientSide' flag + } + + @Override +diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java +index 0e609b1e3abd50b415d8376dc550375a8a0251b6..958fc7b4d3683fc1d5b9ab25f3a11199b0024376 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 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 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 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..a30b764564ffe30cc465d579873505412409d33a 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 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 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 b0bf44dcb81e6c63b9eac45ced9906bb231ea07b..4d03e6a8b4582b1fecc81e88ee11829bb4d46541 100644 +--- a/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/CreakingHeartBlock.java +@@ -48,13 +48,15 @@ public class CreakingHeartBlock extends BaseEntityBlock { + @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(CREAKING) != CreakingHeartBlock.CreakingHeartState.DISABLED + ? createTickerHelper(type, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick) + : null; +- } ++ //} // Plazma - Remove persist 'isClientSide' flag + } + + public static boolean canSummonCreaking(Level world) { +diff --git a/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java b/src/main/java/net/minecraft/world/level/block/DaylightDetectorBlock.java +index 7fd7f20d524fa980ed8ff8e0ca8adb9af203ccda..c413e000c2285e8cb234ff349dd68162ced139db 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 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 flag + + return InteractionResult.SUCCESS; + } +@@ -115,7 +115,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 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 3ec6ed1e9ba25165a7deb2f767b8d064d1f89d5f..71f87a0605f4a389d0f23f08f21596e9939d2f4f 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 flag + if (world.isClientSide) { + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove persist 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 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..7d34a47ac2e01cfda109f726f7156ebbf40aa1a8 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 flag + if (!(Boolean) state.getValue(DetectorRailBlock.POWERED)) { + this.checkPressed(world, pos, state); + } +- } ++ //} // Plazma - Remove persist 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 5a6c153fa2873aecba0d0d02be2cc2a514f445e3..5c04f3500d31ac3851a25390ee32de5ab1abd359 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 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 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 daf865c20cc193a12db0d98e3c0472eefdf635c2..60751592b22daf9bf5939e02ae8b66b345c0156a 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 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..b81d1937489659bcc15e36554b04a55745b6ba23 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 flag + if (player.isCreative()) { + DoublePlantBlock.preventDropFromBottomPart(world, pos, state, player); + } else { + dropResources(state, world, pos, (BlockEntity) null, player, player.getMainHandItem()); + } +- } ++ //} // Plazma - Remove persist 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..1bf54b0c38bcebf98912c519bf976d6df1e62e30 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 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 flag + world.setBlock(blockposition1, state, 2); + world.removeBlock(pos, false); +- } ++ //} // Plazma - Remove persist 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 ce6a9e15ae0114623e79b5d8c244c2c490a3f74e..bae42ecac77e4c03d2b2116e5ea72a64b5666f7e 100644 +--- a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java +@@ -93,14 +93,14 @@ public class EnchantingTableBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { +- return world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null; ++ return /*world.isClientSide ? createTickerHelper(type, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) :*/ null; // Plazma - Remove persist flag + } + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { +- if (!world.isClientSide) { ++ //if (!world.isClientSide) { // Plazma - Remove persist flag + player.openMenu(state.getMenuProvider(world, pos)); +- } ++ //} // Plazma - Remove persist 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 abb75f9389167a1f51a2c50831664d50181749de..e5c5e20b0f2b2094faae2955a886f06ef6771eff 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 flag + } + + @Override +@@ -100,7 +100,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + // Paper end - call EntityPortalEnterEvent + BlockEntity tileentity = world.getBlockEntity(pos); + +- if (!world.isClientSide && tileentity instanceof TheEndGatewayBlockEntity) { ++ if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity) { // Plazma - Remove persist flag + TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity; + + if (!tileentityendgateway.isCoolingDown()) { +diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +index 2dffc3990d9ae3d595d923239885e3a7d8ec04f3..487197df3a9d24f03a21f5fddd5f87d393646596 100644 +--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +@@ -82,7 +82,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + world.getCraftServer().getPluginManager().callEvent(event); + if (event.isCancelled()) return; // Paper - make cancellable + // CraftBukkit end +- if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) { ++ if (/*!world.isClientSide &&*/ world.dimension() == Level.END && entity instanceof ServerPlayer) { // Plazma - Remove persist 'isClientSide' flag + ServerPlayer entityplayer = (ServerPlayer) entity; + + if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits +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 d9a1ec9c6ccab71618a42121f049005cf821eb42..35efb8d3fa528645a52f09e091c00d4a6434ab52 100644 +--- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java +@@ -141,7 +141,7 @@ public class EnderChestBlock extends AbstractChestBlock i + @Nullable + @Override + public BlockEntityTicker getTicker(Level world, BlockState state, BlockEntityType type) { +- return world.isClientSide ? createTickerHelper(type, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) : null; ++ return /*world.isClientSide ? createTickerHelper(type, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) :*/ null; // Plazma - Remove persist flag + } + + @Override +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 59c000612bbf7beb7208af48001d3b1e5111ebd4..4256ad5b20b63b1792cde46c20e63451ec41faad 100644 +--- a/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/GrindstoneBlock.java +@@ -156,11 +156,11 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock { + + @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..6849fbd73110bc9a36d7b40879da7589da677c5b 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,7 +117,7 @@ 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); + } + } +@@ -132,6 +132,7 @@ public class HoneyBlock extends HalfTransparentBlock { + } + + private static void showParticles(Entity entity, int count) { ++ /* // Plazma - Remove persist 'isClientSide' flag + if (entity.level().isClientSide) { + BlockState blockState = Blocks.HONEY_BLOCK.defaultBlockState(); + +@@ -140,5 +141,6 @@ public class HoneyBlock extends HalfTransparentBlock { + .addParticle(new BlockParticleOption(ParticleTypes.BLOCK, blockState), entity.getX(), entity.getY(), entity.getZ(), 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove persist 'isClientSide' flag + } + } +diff --git a/src/main/java/net/minecraft/world/level/block/HopperBlock.java b/src/main/java/net/minecraft/world/level/block/HopperBlock.java +index 005a2a66a6e8a492acfa7ba91117884cda08562d..39ac1d40b69ba3909cd9b26f62f3b4e872d3e612 100644 +--- 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 53f388dd0ba6b77fe49a584883e8c9d49d5a5fba..d793c8bcf6014c3d3b42fadea492a4a3b5844848 100644 +--- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java +@@ -90,7 +90,7 @@ public class LecternBlock extends BaseEntityBlock { + 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")) { +@@ -144,9 +144,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 { +@@ -296,9 +296,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 fec6bf38f080039436ba80d5528857ba4787bf4e..a943ee28712a65183e2c6e9cc3debaa169e8ffdc 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 4f432a153d2f3230970cc6df2bda7e633e81cd6d..30d4feda19ef301aebba25b860e338bcb219d6b9 100644 +--- a/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/MossyCarpetBlock.java +@@ -213,13 +213,13 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { + + @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 3e1dddab0500bb805e5accd0ece69c450bad478f..2e523b637d776b6d21a78ee5fca5b0c17be6a434 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 2a3be00d41eda68f7d5383b240759561c4663f8d..633a14d5ace9275a064914b4a7172632ef69f977 100644 +--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +@@ -317,7 +317,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 + this.updatePowerStrength(world, pos, state, null, true); + + for (Direction direction : Direction.Plane.VERTICAL) { +@@ -332,14 +332,14 @@ 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); + } + + this.updatePowerStrength(world, pos, state, null, false); + this.updateNeighborsOfNeighboringWires(world, pos); +- } ++ //} // Plazma - Remove persist 'isClientSide' flag + } + } + +@@ -360,7 +360,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 + if (sourceBlock != this || !useExperimentalEvaluator(world)) { + if (state.canSurvive(world, pos)) { + this.updatePowerStrength(world, pos, state, wireOrientation, false); +@@ -369,7 +369,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 e0667753ce67d2bafebf4dbcc35337d4287d92f4..c94271279ac4ae40d7900abb8cf3897e55e89e55 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 0ed449a188d98f87dbddd2d76009fed02a29ed25..b70fe3b96b0eac7733349f75c77b38438b7846a6 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())) { // Plazma - Remove persist 'isClientSide' flag + 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 e00fcea07e74de647c26ff9eb32bc682738c15b7..5b94f164b94c2434a946858c185f64ff9e26fa67 100644 +--- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java +@@ -162,8 +162,8 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo + @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 155c7240b1112729333e6968122568c707d8f66b..d2787c48f21442cf4d6937880157615ceda2d21e 100644 +--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java +@@ -136,7 +136,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock { + 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 80ee7a6f010cc838625674007a3ea908f2f9dadd..2526e919fc60048502f0f57674faf8a34a1ef722 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 0bf6503819b02e5ba2c346d9d563a93f2946d89b..c9ecd5b5cdfd294dbe4e7c5fe81a67a194569748 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 ec2ea748a164f47eb425efcd2ac0d43a23c2a9ca..ca4beb408306dc3bbc827361d024215830988d33 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/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 3829dbae8542396f8360eae54f0ed18fbde4cd8c..098dd670e0f6ff86ae0d72ccdc30127ab52d1d5e 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 3a7126883f11ac5a647947eaf060df15536a6cb2..b26ee54d48908199e5fcd4bda415f29f3f42026c 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 2d190b3a6378b8cbadfa65510df1ccfbd5882ef8..b6887d2660fed6bbfdc345114101c5f432e0ce69 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 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 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 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 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..d5465a018a2f19875e21e069da6523b6514b6a1e 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java +@@ -119,7 +119,7 @@ public class BellBlockEntity extends BlockEntity { + this.nearbyEntities = this.level.getEntitiesOfClass(LivingEntity.class, axisalignedbb); + } + +- if (!this.level.isClientSide) { ++ //if (!this.level.isClientSide) { // Plazma - Remove persist flag + Iterator iterator = this.nearbyEntities.iterator(); + + while (iterator.hasNext()) { +@@ -129,7 +129,7 @@ public class BellBlockEntity extends BlockEntity { + entityliving.getBrain().setMemory(MemoryModuleType.HEARD_BELL_TIME, this.level.getGameTime()); // CraftBukkit - decompile error + } + } +- } ++ //} // Plazma - Remove persist 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/DecoratedPotBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java +index 853263b4dd28a5b7620dde17c13412193036eda9..74b9678f09a8e5e2dad705a9f3d6bac265c3d6bb 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java +@@ -223,7 +223,7 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable + } + + public void wobble(DecoratedPotBlockEntity.WobbleStyle wobbleType) { +- if (this.level != null && !this.level.isClientSide()) { ++ if (this.level != null /*&& !this.level.isClientSide()*/) { // Plazma - Remove persist 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..80f072d830c0c4e90d957926ef0ad3ba89d2b55a 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 flag + if (world.isClientSide) { + return false; + } else { ++ */ // Plazma - Remove persist 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 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 c3bbe5e9e0cc37f3f22fc1d839fa2652966f1266..5054c8b0d2618d2f2bdb26d7338ecbe118733b0b 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 flag + BlockPos blockposition = this.getBlockPos(); + ItemStack itemstack = this.getTheItem(); + +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..734ad47b383463930ff7b577f0b7f79f69e2e721 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 flag + if (player.getCommandSenderWorld().isClientSide) { + player.openStructureBlock(this); + } ++ */ // Plazma - Remove persist 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 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..c7ee1db51a4a05627282b77697549e96e7d65ecd 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 flag + blockEntity.teleportCooldown = 40; + world.blockEvent(pos, state.getBlock(), 1, 0); + setChanged(world, pos, state); +- } ++ //} // Plazma - Remove persist 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..15c9e4c1ed7b62987b112c3a1d342d9227f05dc7 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 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 b696597540d998c52ec3207ffd8bf658fde59215..a030a22057d35ebb6d84cb43cff12a2f36487feb 100644 +--- a/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/piston/MovingPistonBlock.java +@@ -85,7 +85,7 @@ public class MovingPistonBlock extends BaseEntityBlock { + + @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..0a1c659c12a56331d88b951478ee98823feaad9c 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 flag + this.checkIfExtend(world, pos, state); +- } ++ //} // Plazma - Remove persist 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 flag + this.checkIfExtend(world, pos, state); +- } ++ //} // Plazma - Remove persist 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 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 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 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 c5c297b1081c9ddbb3bd0a0947401041aa8fec7d..ca409b4e49d9b7842a0d35fef10f8f53feffcf1e 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..ff65c8e73581e162729217d5f44aeaeaa7c5b8f3 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 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 flag + if (world.isClientSide && blockEntity.deathTicks < 5) { + blockEntity.deathTicks++; + } else { ++ */ // Plazma - Remove persist 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 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 6656cc0c9041d954d6d318cdefaef86ebee4c2bc..f8542422c40a4caba798ab53d0274c61e2a2f765 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java ++++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +@@ -416,7 +416,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 flag + iblockdata1.onRemove(this.level, blockposition, iblockdata, flag); + } else if (!iblockdata1.is(block) && flag3) { + this.removeBlockEntity(blockposition); +@@ -426,7 +426,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 flag + iblockdata.onPlace(this.level, blockposition, iblockdata1, flag); + } + +@@ -528,7 +528,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 flag + } + + boolean isTicking(BlockPos pos) { +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +index 54debe9da0a26aea02c964fdc7efb372e07974c0..b7b689373cef3d4b39ac5768a682fd8750192edd 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +@@ -128,9 +128,11 @@ public class CraftMerchantCustom implements CraftMerchant { + public void overrideOffers(MerchantOffers offers) { + } + ++ /* // Plazma - Remove persist flag + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove persist flag + } + } +diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +index 37458e8fd5d57acbf90a6bea4e66797cb07f69fa..f6681aeeaa70a62f50611cf320d6121b98e77003 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 flag + @Override + public boolean isClientSide() { + return this.handle.isClientSide(); + } ++ */ // Plazma - Remove persist 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..655506771a7fed9281054cce726dd4fc54041fcb 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 flag + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove persist flag + + @Override + public int getSeaLevel() { diff --git a/patches/server/0043-minor-code-improvements.patch b/patches/server/0043-minor-code-improvements.patch new file mode 100644 index 0000000..a59501b --- /dev/null +++ b/patches/server/0043-minor-code-improvements.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: AlphaKR93 +Date: Sat, 2 Nov 2024 15:10:12 +0900 +Subject: [PATCH] minor code improvements + + +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 e5c5e20b0f2b2094faae2955a886f06ef6771eff..f19ab0a7daa671727675c2d03b3c77b287062f75 100644 +--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java +@@ -100,8 +100,8 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + // Paper end - call EntityPortalEnterEvent + BlockEntity tileentity = world.getBlockEntity(pos); + +- if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity) { // Plazma - Remove persist flag +- TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity; ++ if (/*!world.isClientSide &&*/ tileentity instanceof TheEndGatewayBlockEntity tileentityendgateway) { // Plazma - Remove persist flag // Plazma - minor code improvements ++ //TheEndGatewayBlockEntity tileentityendgateway = (TheEndGatewayBlockEntity) tileentity; // Plazma - minor code improvements + + if (!tileentityendgateway.isCoolingDown()) { + // Purpur start diff --git a/patches/unapplied/server/0028-Process-pathfinding-asynchronously.patch b/patches/server/0044-Process-pathfinding-asynchronously.patch similarity index 90% rename from patches/unapplied/server/0028-Process-pathfinding-asynchronously.patch rename to patches/server/0044-Process-pathfinding-asynchronously.patch index 2ece2d8..109f427 100644 --- a/patches/unapplied/server/0028-Process-pathfinding-asynchronously.patch +++ b/patches/server/0044-Process-pathfinding-asynchronously.patch @@ -464,10 +464,10 @@ index 0000000000000000000000000000000000000000..3456f38d381643b0461669b0b5fec6bf + +} diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -index 3d7578605..280ada75d 100644 +index 3d7578605812021bc84b99d4db1672a682d897ad..58feaaed5e301eb402dab24e6f155beb865fa5ee 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -@@ -76,6 +77,35 @@ public class AcquirePoi { +@@ -76,6 +76,35 @@ public class AcquirePoi { io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, poiPredicate, predicate2, entity.blockPosition(), world.purpurConfig.villagerAcquirePoiSearchRadius, world.purpurConfig.villagerAcquirePoiSearchRadius*world.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes); Set, BlockPos>> set = new java.util.HashSet<>(poiposes); // Paper end - optimise POI access @@ -736,7 +736,7 @@ index a3e0c5af4cc9323c02e88e768cbda9e46854aea1..d68e97084ba6bc97312fc5b62ffcb6e6 if (this.canUpdatePath()) { this.followThePath(); diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java -index f73b559b8..d21860444 100644 +index f73b559b8e60859020f762dab88b67b8c912bf8f..d218604447afbde96dc4af33ba90a87617a13ed4 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java @@ -24,10 +24,23 @@ public class GroundPathNavigation extends PathNavigation { @@ -764,7 +764,7 @@ index f73b559b8..d21860444 100644 } diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index a5289b6c4..a093bd380 100644 +index c7c6385c71c5bfae5818976008feececf5890654..b54c7b274c5c4eefc8c0170b89a6c7d7d02f5f08 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -168,6 +168,7 @@ public abstract class PathNavigation { @@ -836,7 +836,7 @@ index a5289b6c4..a093bd380 100644 Vec3 vec3 = new Vec3(((double)node.x + this.mob.getX()) / 2.0, ((double)node.y + this.mob.getY()) / 2.0, ((double)node.z + this.mob.getZ()) / 2.0); return pos.closerToCenterThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex())); diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java -index 0446ac540..77c10a3e9 100644 +index 0446ac540d8509a653abe1a8bc10f52fb43d6ae1..77c10a3e9570f53ce73dacb39cb86a00202e6ce6 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java @@ -15,10 +15,23 @@ public class WaterBoundPathNavigation extends PathNavigation { @@ -894,7 +894,7 @@ index 9104d7010bda6f9f73b478c11490ef9c53f76da2..a53950a6e4cb2e672b6f130461fa6306 // Paper end - optimise POI access if (path != null && path.canReach()) { diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index dc8df0912..c4a59c134 100644 +index 6c4cab8cabdd27b6dbd97a408a588f4ef9684654..32a1bb3ea64099c4583607ee246b8cadb77c4d44 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -1206,7 +1206,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -916,10 +916,10 @@ index dc8df0912..c4a59c134 100644 } } 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 94ca73551..3ae1875be 100644 +index 62991c7d1c4d62669adeb30b56c94b0e7d998ab2..2077ccca3f6f942ec7daa06759ce0532b11a00a5 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 -@@ -503,10 +504,23 @@ public class Frog extends Animal implements VariantHolder> { +@@ -505,10 +505,23 @@ public class Frog extends Animal implements VariantHolder> { return nodeType != PathType.WATER_BORDER && super.canCutCorner(nodeType); } @@ -944,7 +944,7 @@ index 94ca73551..3ae1875be 100644 } } 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 949207eda..12b3c0454 100644 +index de3d91891000c599950e31da595c254a3b421e7a..a73d7a1ea1ef7a98a114b7d10de6b2946c092f76 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java @@ -308,7 +308,7 @@ public class Drowned extends Zombie implements RangedAttackMob { @@ -952,15 +952,15 @@ index 949207eda..12b3c0454 100644 protected boolean closeToNextPos() { Path path = this.getNavigation().getPath(); - if (path != null) { -+ if (path != null && path.isProcesssed()) { // Plazma - Process pathfinding asynchronously ++ if (path != null && path.isProcessed()) { // Plazma - Process pathfinding asynchronously BlockPos blockPos = path.getTarget(); if (blockPos != null) { double d = this.distanceToSqr((double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); diff --git a/src/main/java/net/minecraft/world/entity/monster/Strider.java b/src/main/java/net/minecraft/world/entity/monster/Strider.java -index c3b5b34a5..6bef9da97 100644 +index d414158e1222f9a4f73a33abcf96f994aee4efde..dec0fd7d0b704c20df03b3c17fae1af921217e11 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Strider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java -@@ -608,10 +608,23 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { +@@ -610,10 +610,23 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { super(entity, world); } @@ -985,10 +985,10 @@ index c3b5b34a5..6bef9da97 100644 } 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 9f542e4f0..d7fff7005 100644 +index bcc1f2e8ad66eb826617f17d98fb43649fc8deb2..421a255dcb9843b34e8b0e39b65ee9b1bbd3ed0d 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 -@@ -634,6 +634,15 @@ public class Warden extends Monster implements VibrationSystem { +@@ -636,6 +636,15 @@ public class Warden extends Monster implements VibrationSystem { protected PathFinder createPathFinder(int range) { this.nodeEvaluator = new WalkNodeEvaluator(); this.nodeEvaluator.setCanPassDoors(true); @@ -1026,60 +1026,47 @@ index d9d0fff9962131808d54cca20f209df50b8e4af1..420dd323790e72aa12c942d31a94bcb8 public void write(FriendlyByteBuf buf) { buf.writeCollection(this.targetNodes, (bufx, node) -> node.writeToStream(bufx)); diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -index 404080976208c30e9e95e5bee47c2a749e709a45..e31ee7508a1af51bec628141c3a153997dc75672 100644 +index f1aa182d7cc0ffac23ddb1f77335c61ca9f6f720..bc98944d37d5eb96a58092c31d7cb108249b7701 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -@@ -16,6 +16,7 @@ import net.minecraft.util.profiling.ProfilerFiller; - import net.minecraft.util.profiling.metrics.MetricCategory; +@@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; + //import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.entity.Mob; import net.minecraft.world.level.PathNavigationRegion; +import dev.kaiijumc.kaiiju.path.*; // Plazma - Process pathfinding asynchronously public class PathFinder { private static final float FUDGING = 1.5F; -@@ -24,91 +25,138 @@ public class PathFinder { +@@ -25,8 +26,20 @@ public class PathFinder { public final NodeEvaluator nodeEvaluator; private static final boolean DEBUG = false; private final BinaryHeap openSet = new BinaryHeap(); + // Plazma start - Process pathfinding asynchronously ++ public static boolean ASYNC = false; + private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); + private final @Nullable NodeEvaluatorGenerator evaluatorGenerator; ++ // Plazma end - Process pathfinding asynchronously public PathFinder(NodeEvaluator pathNodeMaker, int range) { ++ // Plazma start - Process pathfinding asynchronously + this(pathNodeMaker, range, null); + } + + public PathFinder(NodeEvaluator pathNodeMaker, int range, @Nullable NodeEvaluatorGenerator evaluatorGenerator) { ++ this.evaluatorGenerator = evaluatorGenerator; ++ // Plazma end - Process pathfinding asynchronously this.nodeEvaluator = pathNodeMaker; this.maxVisitedNodes = range; -+ this.evaluatorGenerator = evaluatorGenerator; } +@@ -37,100 +50,48 @@ public class PathFinder { -+ @SuppressWarnings("ConstantValue") @Nullable -- public Path findPath(PathNavigationRegion world, Mob mob, Set positions, float followRange, int distance, float rangeMultiplier) { + public Path findPath(PathNavigationRegion world, Mob mob, Set positions, float followRange, int distance, float rangeMultiplier) { - this.openSet.clear(); - this.nodeEvaluator.prepare(world, mob); - Node node = this.nodeEvaluator.getStart(); -+ public Path findPath( -+ PathNavigationRegion world, -+ Mob mob, -+ Set positions, -+ float followRange, -+ int distance, -+ float rangeMultiplier -+ ) { -+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().entity.asyncPathProcess.enabled) this.openSet.clear(); -+ NodeEvaluator evaluator = this.evaluatorGenerator == null -+ ? this.nodeEvaluator -+ : NodeEvaluatorCache.take(this.evaluatorGenerator, this.nodeEvaluator); -+ -+ evaluator.prepare(world, mob); -+ Node node = evaluator.getStart(); -+ - if (node == null) { -+ NodeEvaluatorCache.remove(evaluator); - return null; +- if (node == null) { +- return null; - } else { - // Paper start - Perf: remove streams and optimize collection - List> map = Lists.newArrayList(); @@ -1087,112 +1074,66 @@ index 404080976208c30e9e95e5bee47c2a749e709a45..e31ee7508a1af51bec628141c3a15399 - map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getTarget(pos.getX(), pos.getY(), pos.getZ()), pos)); - } - // Paper end - Perf: remove streams and optimize collection -- Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier); +- Path path = this.findPath(node, map, followRange, distance, rangeMultiplier); - this.nodeEvaluator.done(); - return path; - } -+ -+ List> map = Lists.newArrayList(); -+ for (final BlockPos pos : positions) -+ map.add(new java.util.AbstractMap.SimpleEntry<>(evaluator.getTarget(pos.getX(), pos.getY(), pos.getZ()), pos)); -+ -+ if (this.evaluatorGenerator == null) { -+ NodeEvaluatorCache.remove(evaluator); -+ return this.findPath(node, map, followRange, distance, rangeMultiplier); -+ } -+ -+ return new AsyncPath( -+ Lists.newArrayList(), -+ positions, -+ () -> this.processPath(evaluator, node, map, followRange, distance, rangeMultiplier), -+ () -> { -+ evaluator.done(); -+ NodeEvaluatorCache.returnEvaluator(evaluator); -+ } -+ ); - } - - @Nullable - // Paper start - Perf: remove streams and optimize collection -- private Path findPath(ProfilerFiller profiler, Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { -- //profiler.push("find_path"); // Purpur -- //profiler.markForCharting(MetricCategory.PATH_FINDING); // Purpur +- } +- } +- +- @Nullable +- // Paper start - Perf: remove streams and optimize collection +- private Path findPath(Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { +- //ProfilerFiller profilerFiller = Profiler.get(); // Purpur +- //profilerFiller.push("find_path"); // Purpur +- //profilerFiller.markForCharting(MetricCategory.PATH_FINDING); // Purpur - // Set set = positions.keySet(); -+ private Path findPath( -+ Node startNode, -+ List> positions, -+ float followRange, -+ int distance, -+ float rangeMultiplier -+ ) { -+ try { -+ return this.processPath(this.nodeEvaluator, startNode, positions, followRange, distance, rangeMultiplier); -+ } catch (Exception e) { -+ LOGGER.error("Failed to process path", e); -+ return null; -+ } finally { -+ this.nodeEvaluator.done(); -+ } -+ } -+ -+ @SuppressWarnings("DataFlowIssue") -+ @org.jetbrains.annotations.NotNull -+ private synchronized Path processPath( -+ NodeEvaluator nodeEvaluator, -+ Node startNode, -+ List> positions, -+ float followRange, -+ int distance, -+ float rangeMultiplier -+ ) { -+ org.apache.commons.lang3.Validate.isTrue(!positions.isEmpty()); - startNode.g = 0.0F; - startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection - startNode.f = startNode.h; - this.openSet.clear(); - this.openSet.insert(startNode); +- startNode.g = 0.0F; +- startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection +- startNode.f = startNode.h; +- this.openSet.clear(); +- this.openSet.insert(startNode); - // Set set2 = ImmutableSet.of(); // Paper - unused - diff on change -+ - int i = 0; - List> entryList = Lists.newArrayListWithExpectedSize(positions.size()); // Paper - optimize collection - int j = (int)((float)this.maxVisitedNodes * rangeMultiplier); +- int i = 0; +- List> entryList = Lists.newArrayListWithExpectedSize(positions.size()); // Paper - optimize collection +- int j = (int)((float)this.maxVisitedNodes * rangeMultiplier); ++ if (ASYNC) this.openSet.clear(); - while (!this.openSet.isEmpty()) { +- while (!this.openSet.isEmpty()) { - if (++i >= j) { - break; - } -+ if (++i >= j) break; ++ NodeEvaluator evaluator = this.evaluatorGenerator == null ? this.nodeEvaluator : NodeEvaluatorCache.take(this.evaluatorGenerator, this.nodeEvaluator); ++ evaluator.prepare(world, mob); - Node node = this.openSet.pop(); - node.closed = true; +- Node node = this.openSet.pop(); +- node.closed = true; ++ Node node = evaluator.getStart(); ++ if ( node == null ) { ++ NodeEvaluatorCache.remove(evaluator); ++ return null; // diff on change ++ } - // Paper start - optimize collection - for (int i1 = 0; i1 < positions.size(); i1++) { - final Map.Entry entry = positions.get(i1); -+ for (final Map.Entry entry : positions) { - Target target = entry.getKey(); +- Target target = entry.getKey(); - if (node.distanceManhattan(target) <= (float)distance) { -+ if (node.distanceManhattan(target) <= (float) distance) { - target.setReached(); - entryList.add(entry); +- target.setReached(); +- entryList.add(entry); - // Paper end - Perf: remove streams and optimize collection - } - } +- } +- } ++ List> map = Lists.newArrayList(); ++ for (final BlockPos pos : positions) ++ map.add(new java.util.AbstractMap.SimpleEntry<>(evaluator.getTarget(pos.getX(), pos.getY(), pos.getZ()), pos)); - if (!entryList.isEmpty()) { // Paper - Perf: remove streams and optimize collection; rename - break; - } -+ if (!entryList.isEmpty()) break; -+ if (node.distanceTo(startNode) >= followRange) continue; -+ -+ int k = nodeEvaluator.getNeighbors(this.neighbors, node); -+ -+ for (int l = 0; l < k; l++) { -+ Node node2 = this.neighbors[l]; -+ float f = this.distance(node, node2); -+ node2.walkedDistance = node.walkedDistance + f; -+ float g = node.g + f + node2.costMalus; -+ if (node2.walkedDistance >= followRange || (node2.inOpenSet() && g >= node2.g)) continue; ++ if (this.evaluatorGenerator == null) { ++ NodeEvaluatorCache.remove(evaluator); ++ return this.findPath(node, map, followRange, distance, rangeMultiplier); ++ } - if (!(node.distanceTo(startNode) >= followRange)) { - int k = this.nodeEvaluator.getNeighbors(this.neighbors, node); @@ -1213,26 +1154,124 @@ index 404080976208c30e9e95e5bee47c2a749e709a45..e31ee7508a1af51bec628141c3a15399 - this.openSet.insert(node2); - } - } +- } ++ return new AsyncPath( ++ Lists.newArrayList(), ++ positions, ++ () -> this.processPath(evaluator, node, map, followRange, distance, rangeMultiplier), ++ () -> { ++ evaluator.done(); ++ NodeEvaluatorCache.returnEvaluator(evaluator); + } +- } ++ ); ++ } + +- // Paper start - Perf: remove streams and optimize collection +- Path best = null; +- boolean entryListIsEmpty = entryList.isEmpty(); +- Comparator comparator = entryListIsEmpty ? Comparator.comparingInt(Path::getNodeCount) +- : Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount); +- for (Map.Entry entry : entryListIsEmpty ? positions : entryList) { +- Path path = this.reconstructPath(entry.getKey().getBestNode(), entry.getValue(), !entryListIsEmpty); +- if (best == null || comparator.compare(path, best) < 0) +- best = path; ++ @Nullable ++ // Paper start - Perf: remove streams and optimize collection ++ private Path findPath(Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { ++ try { ++ return this.processPath(this.nodeEvaluator, startNode, positions, followRange, distance, rangeMultiplier); ++ } catch (Exception e) { ++ LOGGER.error("Failed to process path", e); ++ return null; ++ } finally { ++ this.nodeEvaluator.done(); + } +- //profilerFiller.pop(); // Purpur +- return best; +- // Paper end - Perf: remove streams and optimize collection + } + + protected float distance(Node a, Node b) { +@@ -164,4 +125,78 @@ public class PathFinder { + + return new Path(list, target, reachesTarget); + } ++ ++ @Nullable ++ private Path processPath(NodeEvaluator evaluator, Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { ++ org.apache.commons.lang3.Validate.isTrue(!positions.isEmpty()); ++ ++ startNode.g = 0.0F; ++ startNode.h = this.getBestH(startNode, positions); ++ startNode.f = startNode.h; ++ ++ this.openSet.clear(); ++ this.openSet.insert(startNode); ++ ++ int i = 0; ++ int j = (int) (this.maxVisitedNodes * rangeMultiplier); ++ List> entryList = Lists.newArrayListWithExpectedSize(positions.size()); ++ ++ while (!this.openSet.isEmpty()) { ++ if (++i >= j) break; ++ ++ Node node = this.openSet.pop(); ++ node.closed = true; ++ ++ for (final Map.Entry entry : positions) { ++ Target target = entry.getKey(); ++ if (node.distanceManhattan(target) > distance) continue; ++ ++ target.setReached(); ++ entryList.add(entry); ++ } ++ ++ if (!entryList.isEmpty()) break; ++ if (node.distanceTo(startNode) >= followRange) continue; ++ ++ int k = evaluator.getNeighbors(this.neighbors, node); ++ for (int l = 0; l < k; l++) { ++ Node node2 = this.neighbors[l]; ++ ++ float f = this.distance(node, node2); ++ float g = node.g + f + node2.costMalus; ++ ++ node2.walkedDistance = node.walkedDistance + f; ++ if (node2.walkedDistance >= followRange && !(!node2.inOpenSet() || g < node2.g)) continue; ++ + node2.cameFrom = node; + node2.g = g; -+ node2.h = this.getBestH(node2, positions) * 1.5F; // Paper - Perf: remove streams and optimize collection ++ node2.h = this.getBestH(node2, positions) * 1.5F; ++ + if (node2.inOpenSet()) { + this.openSet.changeCost(node2, node2.g + node2.h); + continue; - } ++ } ++ + node2.f = node2.g + node2.h; + this.openSet.insert(node2); - } - } - -@@ -126,6 +174,7 @@ public class PathFinder { - return best; - // Paper end - Perf: remove streams and optimize collection - } -+ // Plazma end - Process pathfinding asynchronously - - protected float distance(Node a, Node b) { - return a.distanceTo(b); ++ } ++ } ++ ++ Path best = null; ++ boolean isEmpty = entryList.isEmpty(); ++ ++ Comparator comparator = isEmpty ++ ? Comparator.comparingInt(Path::getNodeCount) ++ : Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount); ++ ++ for (final Map.Entry entry : isEmpty ? positions : entryList) { ++ Path path = this.reconstructPath(entry.getKey().getBestNode(), entry.getValue(), !isEmpty); ++ if (best != null && comparator.compare(path, best) >= 0) continue; ++ ++ best = path; ++ } ++ ++ return best; ++ } ++ + } diff --git a/src/main/java/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java index 6308822f819d7cb84c8070c8a7eec1a3f822114b..370540e48a5fd5693bf956ffbddccca58a1482f8 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java @@ -1259,10 +1298,10 @@ index 1c83926923f50fb4da1a83dc91614c20a831555f..aec2d0f9a957be65d031957dbff874d8 Command.broadcastCommandMessage(sender, text("Successfully reloaded Plazma configuration files.", NamedTextColor.GREEN)); diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index aa8b0a9b3d98e2c2fb1bd3c374cd2e742e6e17cf..516a4545b67a4bf0d37cee3d1e26772831944fe6 100644 +index cac12ad98eb0fa4dcc1b0f7f21d1eadd14ef7456..ab4ff76efbe4077691a0fde4043160ecbc4bc7dc 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -@@ -60,6 +60,26 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -70,6 +70,26 @@ public class GlobalConfiguration extends ConfigurationPart { public class Entity extends ConfigurationPart { diff --git a/patches/unapplied/server/0022-Optimise-state-lookup-more.patch b/patches/work/0022-Optimise-state-lookup-more.patch similarity index 100% rename from patches/unapplied/server/0022-Optimise-state-lookup-more.patch rename to patches/work/0022-Optimise-state-lookup-more.patch diff --git a/patches/unapplied/server/0039-Implement-alternative-noise-chunk-generator.patch b/patches/work/0039-Implement-alternative-noise-chunk-generator.patch similarity index 100% rename from patches/unapplied/server/0039-Implement-alternative-noise-chunk-generator.patch rename to patches/work/0039-Implement-alternative-noise-chunk-generator.patch diff --git a/patches/unapplied/server/0041-Blazingly-simple-farm-checks.patch b/patches/work/0041-Blazingly-simple-farm-checks.patch similarity index 100% rename from patches/unapplied/server/0041-Blazingly-simple-farm-checks.patch rename to patches/work/0041-Blazingly-simple-farm-checks.patch diff --git a/patches/unapplied/server/0044-TickControl-System.patch b/patches/work/0044-TickControl-System.patch similarity index 100% rename from patches/unapplied/server/0044-TickControl-System.patch rename to patches/work/0044-TickControl-System.patch diff --git a/patches/unapplied/server/1069-improve-random-block-selection-RNG.patch b/patches/work/1069-improve-random-block-selection-RNG.patch similarity index 100% rename from patches/unapplied/server/1069-improve-random-block-selection-RNG.patch rename to patches/work/1069-improve-random-block-selection-RNG.patch