diff --git a/patches/server/0010-Warn-on-startup.patch b/patches/server/0010-Warn-on-startup.patch deleted file mode 100644 index 557e8bc..0000000 --- a/patches/server/0010-Warn-on-startup.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Fri, 3 May 2024 19:50:32 +0900 -Subject: [PATCH] Warn on startup - - -diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index c3bce9206aee05b18ddd8b2788f892a972146737..fc378b08c10c7f670be93d52937c7642b986ed0d 100644 ---- a/src/main/java/net/minecraft/server/Main.java -+++ b/src/main/java/net/minecraft/server/Main.java -@@ -115,6 +115,18 @@ public class Main { - if (io.papermc.paper.ServerBrandConstants.ASCII_LOGO != null) - System.out.println(io.papermc.paper.ServerBrandConstants.ASCII_LOGO); - // Plazma end - Fork-friendly Rebranding -+ // Plazma start - Warn on startup -+ if (!org.plazmamc.plazma.Options.NO_WARN) { -+ LOGGER.warn("Warning! " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " may cause unexpected problems, so be sure to test it thoroughly before using it on a public server."); -+ if (io.papermc.paper.ServerBuildInfo.buildInfo().asString(io.papermc.paper.ServerBuildInfo.StringRepresentation.VERSION_FULL).contains("DEV")) { -+ LOGGER.error("*********************** CAUTION ***********************"); -+ LOGGER.error("This version is a development version of {}.", io.papermc.paper.ServerBrandConstants.BRAND_NAME); -+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems."); -+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!"); -+ LOGGER.error("*******************************************************"); -+ } -+ } -+ // Plazma end - - Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit - -diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java -index ca11bd22a65c8b9f4fffb1832ada8c519ab75b98..5d41bd4d4b86ca0c7c03d3ac6e75b3f1f1abe73b 100644 ---- a/src/main/java/org/plazmamc/plazma/Options.java -+++ b/src/main/java/org/plazmamc/plazma/Options.java -@@ -6,5 +6,6 @@ import static java.lang.System.getProperty; - public interface Options { - - boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization"); -+ boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing"); - - } diff --git a/plazma-server/minecraft-patches/features/0001-Remove-demo-feature.patch b/plazma-server/minecraft-patches/features/0001-Remove-demo-feature.patch new file mode 100644 index 0000000..57d04f1 --- /dev/null +++ b/plazma-server/minecraft-patches/features/0001-Remove-demo-feature.patch @@ -0,0 +1,127 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: AlphaKR93 +Date: Wed, 19 Feb 2025 22:54:37 +0900 +Subject: [PATCH] Remove demo feature + + +diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java +index 57a3bc6c47468b40bb448a41cb6bb3d5eaecb5af..abfcde5bd61bd031ab555e70ce10f8d0df6e9bcd 100644 +--- a/net/minecraft/server/Main.java ++++ b/net/minecraft/server/Main.java +@@ -271,25 +271,25 @@ public class Main { + LevelSettings levelSettings; + WorldOptions worldOptions; + WorldDimensions worldDimensions; ++ // Plazma start - Remove demo feature + if (optionSet.has("demo")) { // CraftBukkit +- levelSettings = MinecraftServer.DEMO_SETTINGS; +- worldOptions = WorldOptions.DEMO_OPTIONS; +- worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen()); +- } else { +- DedicatedServerProperties properties = dedicatedServerSettings.getProperties(); +- levelSettings = new LevelSettings( +- properties.levelName, +- properties.gamemode, +- properties.hardcore, +- properties.difficulty, +- false, +- new GameRules(context.dataConfiguration().enabledFeatures()), +- context.dataConfiguration() +- ); +- worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit +- worldDimensions = properties.createDimensions(context.datapackWorldgen()); ++ LOGGER.warn("Demo feature is removed since Plazma 1.21.4, defaulting to normal generation..."); + } + ++ DedicatedServerProperties properties = dedicatedServerSettings.getProperties(); ++ levelSettings = new LevelSettings( ++ properties.levelName, ++ properties.gamemode, ++ properties.hardcore, ++ properties.difficulty, ++ false, ++ new GameRules(context.dataConfiguration().enabledFeatures()), ++ context.dataConfiguration() ++ ); ++ worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit ++ worldDimensions = properties.createDimensions(context.datapackWorldgen()); ++ // Plazma end - Remove demo feature ++ + WorldDimensions.Complete complete = worldDimensions.bake(registry); + Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle()); + return new WorldLoader.DataLoadOutput<>( +@@ -322,7 +322,6 @@ public class Main { + if (optionSet.has("serverId")) { + dedicatedServer1.setId((String) optionSet.valueOf("serverId")); + } +- dedicatedServer1.setDemo(optionSet.has("demo")); + // Paper end + boolean flag = !optionSet.has("nogui") && !optionSet.nonOptionArguments().contains("nogui"); + if (flag && !GraphicsEnvironment.isHeadless()) { +diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java +index 74203ebce0f370a05014a7cf19e23be3a878b44d..4c3d5fab206a923dab0d8956bf74eae1f7e60625 100644 +--- a/net/minecraft/server/MinecraftServer.java ++++ b/net/minecraft/server/MinecraftServer.java +@@ -603,24 +603,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop getServerResourcePack() { + return Optional.empty(); + } +@@ -2674,7 +2662,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Sun, 23 Feb 2025 15:30:22 +0900 +Subject: [PATCH] Remove unused client-side features + + +diff --git a/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java b/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java +index fa7b784a89626e8528c249d7889a598bd7ee3d49..4a14e9f297915f4e73c75358a69cc736ff7c80c3 100644 +--- a/ca/spottedleaf/moonrise/patches/starlight/light/BlockStarLightEngine.java ++++ b/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 = false ||*/ chunk.isLightCorrect()); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java b/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java +index f9aef289e9a2d6f63c98c72c56ef32b8793f57f4..d3b2f74348b3b8327d8d4adf37930faad7dbb981 100644 +--- a/ca/spottedleaf/moonrise/patches/starlight/light/SkyStarLightEngine.java ++++ b/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 = false ||*/ chunk.isLightCorrect()); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java b/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java +index 035cffcc9026bc0a531e70429d79ca6be72d3442..12850506777f009f2528d74ee04905a10f2809e2 100644 +--- a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java ++++ b/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; // == false // Plazma - Remove isClientSide on DedicatedServer + + 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; // == false // Plazma - Remove isClientSide on DedicatedServer + this.world = world; + this.minLightSection = WorldUtil.getMinLightSection(world); + this.maxLightSection = WorldUtil.getMaxLightSection(world); +@@ -275,9 +275,10 @@ public abstract class StarLightEngine { + Arrays.fill(this.nibbleCache, null); + Arrays.fill(this.chunkCache, null); + Arrays.fill(this.emptinessMapCache, null); +- if (this.isClientSide) { ++ /* if (this.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + Arrays.fill(this.notifyUpdateCache, false); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + protected final BlockState getBlockState(final int worldX, final int worldY, final int worldZ) { +@@ -318,7 +319,7 @@ public abstract class StarLightEngine { + + if (nibble != null) { + nibble.set((worldX & 15) | ((worldZ & 15) << 4) | ((worldY & 15) << 8), level); +- if (this.isClientSide) { ++ /* if (this.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + int cx1 = (worldX - 1) >> 4; + int cx2 = (worldX + 1) >> 4; + int cy1 = (worldY - 1) >> 4; +@@ -333,11 +334,13 @@ public abstract class StarLightEngine { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer; Unused codes + protected final void postLightUpdate(final int worldX, final int worldY, final int worldZ) { +- if (this.isClientSide) { ++ if (this.isClientSide) { // == false // Plazma - marking + int cx1 = (worldX - 1) >> 4; + int cx2 = (worldX + 1) >> 4; + int cy1 = (worldY - 1) >> 4; +@@ -359,7 +362,7 @@ public abstract class StarLightEngine { + + if (nibble != null) { + nibble.set(localIndex, level); +- if (this.isClientSide) { ++ if (this.isClientSide) { // == false // Plazma - marking + int cx1 = (worldX - 1) >> 4; + int cx2 = (worldX + 1) >> 4; + int cy1 = (worldY - 1) >> 4; +@@ -376,6 +379,7 @@ public abstract class StarLightEngine { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer; Unused functions + + protected final boolean[] getEmptinessMap(final int chunkX, final int chunkZ) { + return this.emptinessMapCache[chunkX + 5*chunkZ + this.chunkIndexOffset]; +@@ -1166,7 +1170,7 @@ public abstract class StarLightEngine { + } + + currentNibble.set(localIndex, targetLevel); +- this.postLightUpdate(offX, offY, offZ); ++ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove isClientSide on DedicatedServer + + if (targetLevel > 1) { + if (queueLength >= queue.length) { +@@ -1225,7 +1229,7 @@ public abstract class StarLightEngine { + } + + currentNibble.set(localIndex, targetLevel); +- this.postLightUpdate(offX, offY, offZ); ++ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove isClientSide on DedicatedServer + + if (targetLevel > 1) { + if (queueLength >= queue.length) { +@@ -1331,7 +1335,7 @@ public abstract class StarLightEngine { + } + + currentNibble.set(localIndex, 0); +- this.postLightUpdate(offX, offY, offZ); ++ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove isClientSide on DedicatedServer + + if (targetLevel > 0) { + if (queueLength >= queue.length) { +@@ -1414,7 +1418,7 @@ public abstract class StarLightEngine { + } + + currentNibble.set(localIndex, 0); +- this.postLightUpdate(offX, offY, offZ); ++ //this.postLightUpdate(offX, offY, offZ); // Plazma - Remove isClientSide on DedicatedServer + + if (targetLevel > 0) { // we actually need to propagate 0 just in case we find a neighbour... + if (queueLength >= queue.length) { +diff --git a/net/minecraft/core/cauldron/CauldronInteraction.java b/net/minecraft/core/cauldron/CauldronInteraction.java +index 7dd21a31c4ba37cb804684bd73bea7fcfb7f3cf3..2ac4354917b373e3639a323820b8f0b6edabd715 100644 +--- a/net/minecraft/core/cauldron/CauldronInteraction.java ++++ b/net/minecraft/core/cauldron/CauldronInteraction.java +@@ -56,7 +56,7 @@ public interface CauldronInteraction { + map.put(Items.POTION, (state, level, pos, player, hand, stack, hitDirection) -> { // Paper - add hitDirection + PotionContents potionContents = stack.get(DataComponents.POTION_CONTENTS); + if (potionContents != null && potionContents.is(Potions.WATER)) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.changeLevel(level, pos, Blocks.WATER_CAULDRON.defaultBlockState(), player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent + return InteractionResult.SUCCESS; +@@ -69,7 +69,7 @@ public interface CauldronInteraction { + // level.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit + level.playSound(null, pos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PLACE, pos); +- } ++ // // Plazma - Remove isClientSide on DedicatedServer} + + return InteractionResult.SUCCESS; + } else { +@@ -93,7 +93,7 @@ public interface CauldronInteraction { + ) + ); + map1.put(Items.GLASS_BOTTLE, (state, level, pos, player, hand, stack, hitDirection) -> { // Paper - add hitDirection +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.lowerFillLevel(state, level, pos, player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) { + return InteractionResult.SUCCESS; +@@ -106,7 +106,7 @@ public interface CauldronInteraction { + // LayeredCauldronBlock.lowerFillLevel(state, level, pos); // CraftBukkit + level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PICKUP, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + }); +@@ -116,7 +116,7 @@ public interface CauldronInteraction { + } else { + PotionContents potionContents = stack.get(DataComponents.POTION_CONTENTS); + if (potionContents != null && potionContents.is(Potions.WATER)) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.changeLevel(level, pos, state.cycle(LayeredCauldronBlock.LEVEL), player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent + return InteractionResult.SUCCESS; +@@ -128,7 +128,7 @@ public interface CauldronInteraction { + // level.setBlockAndUpdate(pos, state.cycle(LayeredCauldronBlock.LEVEL)); // CraftBukkit + level.playSound(null, pos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PLACE, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +@@ -225,7 +225,7 @@ public interface CauldronInteraction { + if (!statePredicate.test(state)) { + return InteractionResult.TRY_WITH_EMPTY_HAND; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - fire PlayerBucketFillEvent + if (hitDirection != null) { + org.bukkit.event.player.PlayerBucketEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerBucketFillEvent((net.minecraft.server.level.ServerLevel) level, player, pos, pos, hitDirection, emptyStack, filledStack.getItem(), hand); +@@ -247,7 +247,7 @@ public interface CauldronInteraction { + // level.setBlockAndUpdate(pos, Blocks.CAULDRON.defaultBlockState()); // CraftBukkit + level.playSound(null, pos, fillSound, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PICKUP, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -261,7 +261,7 @@ public interface CauldronInteraction { + } + static InteractionResult emptyBucket(Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack filledStackl, BlockState state, SoundEvent emptySound, @javax.annotation.Nullable net.minecraft.core.Direction hitDirection) { + // Paper end - add hitDirection +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - fire PlayerBucketEmptyEvent + ItemStack output = new ItemStack(Items.BUCKET); + if (hitDirection != null) { +@@ -284,7 +284,7 @@ public interface CauldronInteraction { + // level.setBlockAndUpdate(pos, state); // CraftBukkit + level.playSound(null, pos, emptySound, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PLACE, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -332,7 +332,7 @@ public interface CauldronInteraction { + if (!(block instanceof ShulkerBoxBlock)) { + return InteractionResult.TRY_WITH_EMPTY_HAND; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.lowerFillLevel(state, level, pos, player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.SHULKER_WASH)) { + return InteractionResult.SUCCESS; +@@ -342,7 +342,7 @@ public interface CauldronInteraction { + player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemStack, false)); + player.awardStat(Stats.CLEAN_SHULKER_BOX); + // LayeredCauldronBlock.lowerFillLevel(state, level, pos); // CraftBukkit +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -353,7 +353,7 @@ public interface CauldronInteraction { + if (bannerPatternLayers.layers().isEmpty()) { + return InteractionResult.TRY_WITH_EMPTY_HAND; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.lowerFillLevel(state, level, pos, player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) { + return InteractionResult.SUCCESS; +@@ -364,7 +364,7 @@ public interface CauldronInteraction { + player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemStack, false)); + player.awardStat(Stats.CLEAN_BANNER); + // LayeredCauldronBlock.lowerFillLevel(state, level, pos); // CraftBukkit +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -376,7 +376,7 @@ public interface CauldronInteraction { + } else if (!stack.has(DataComponents.DYED_COLOR)) { + return InteractionResult.TRY_WITH_EMPTY_HAND; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (!LayeredCauldronBlock.lowerFillLevel(state, level, pos, player, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) { + return InteractionResult.SUCCESS; +@@ -385,7 +385,7 @@ public interface CauldronInteraction { + stack.remove(DataComponents.DYED_COLOR); + player.awardStat(Stats.CLEAN_ARMOR); + // LayeredCauldronBlock.lowerFillLevel(state, level, pos); // CraftBukkit +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/core/dispenser/DispenseItemBehavior.java b/net/minecraft/core/dispenser/DispenseItemBehavior.java +index 5fe6e2fbab0feb90c7a3965add8e8b9c1e3f83a1..f5d079d854cad7a9d5f53475f6df1c7ded0391ba 100644 +--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java ++++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java +@@ -504,7 +504,7 @@ public interface DispenseItemBehavior { + // CraftBukkit end + if (!BoneMealItem.growCrop(item, level, blockPos) && !BoneMealItem.growWaterPlant(item, level, blockPos, null)) { + this.setSuccess(false); +- } else if (!level.isClientSide) { ++ } else /*if (!level.isClientSide)*/ { // == true // Plazma - Remove isClientSide on DedicatedServer + level.levelEvent(1505, blockPos, 15); + } + // CraftBukkit start +@@ -663,10 +663,10 @@ public interface DispenseItemBehavior { + } + // CraftBukkit end + if (level.isEmptyBlock(blockPos) && carvedPumpkinBlock.canSpawnGolem(level, blockPos)) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.setBlock(blockPos, carvedPumpkinBlock.defaultBlockState(), 3); + level.gameEvent(null, GameEvent.BLOCK_PLACE, blockPos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + item.shrink(1); + this.setSuccess(true); +@@ -861,7 +861,7 @@ public interface DispenseItemBehavior { + return result; + } + // Paper end - Call missing BlockDispenseEvent +- if (!serverLevel.isClientSide) { ++ //if (!serverLevel.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + for (int i = 0; i < 5; i++) { + serverLevel.sendParticles( + ParticleTypes.SPLASH, +@@ -875,7 +875,7 @@ public interface DispenseItemBehavior { + 1.0 + ); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + serverLevel.playSound(null, blockPos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); + serverLevel.gameEvent(null, GameEvent.FLUID_PLACE, blockPos); +diff --git a/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +index 626e9feb6a6e7a2cbc7c63e30ba4fb6b923e85c7..22050e61506e1f3c2f4998ac1e3de4a3117bd63b 100644 +--- a/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java ++++ b/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +@@ -43,13 +43,13 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { + } + } + // CraftBukkit end +- if (!serverLevel.isClientSide()) { ++ //if (!serverLevel.isClientSide()) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = blockSource.pos().relative(blockSource.state().getValue(DispenserBlock.FACING)); + this.setSuccess(tryShearBeehive(serverLevel, blockPos) || tryShearLivingEntity(serverLevel, blockPos, item, bukkitBlock, craftItem)); // CraftBukkit + if (this.isSuccess()) { + item.hurtAndBreak(1, serverLevel, null, item1 -> {}); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return item; + } +diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java +index bfc88babf6f3c1884713723d6094303550097363..7c2ce601dc60b100b47d050f5e3b525263ccd91e 100644 +--- a/net/minecraft/server/level/ServerLevel.java ++++ b/net/minecraft/server/level/ServerLevel.java +@@ -597,7 +597,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + dimension, + server.registryAccess(), + levelStem.type(), +- false, ++ //false, // Plazma - Remove isClientSide on DedicatedServer + isDebug, + biomeZoomSeed, + server.getMaxChainedNeighborUpdates(), +diff --git a/net/minecraft/server/level/WorldGenRegion.java b/net/minecraft/server/level/WorldGenRegion.java +index 3ba4b970c3781ab89a60687ec41ffb1e6297c9f9..c3f9c65052713c177169a6367d2b5e306af2209c 100644 +--- a/net/minecraft/server/level/WorldGenRegion.java ++++ b/net/minecraft/server/level/WorldGenRegion.java +@@ -414,10 +414,12 @@ public class WorldGenRegion implements WorldGenLevel { + return this.level.getWorldBorder(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Deprecated + @Override +diff --git a/net/minecraft/world/entity/AgeableMob.java b/net/minecraft/world/entity/AgeableMob.java +index 179f4e4b9b1eb57f78bbb2f9fa34b11ea79b7a88..1c8c2e246b48c2e76e5805eb7ba4132e8699191c 100644 +--- a/net/minecraft/world/entity/AgeableMob.java ++++ b/net/minecraft/world/entity/AgeableMob.java +@@ -59,11 +59,7 @@ public abstract class AgeableMob extends PathfinderMob { + } + + public int getAge() { +- if (this.level().isClientSide) { +- return this.entityData.get(DATA_BABY_ID) ? -1 : 1; +- } else { +- return this.age; +- } ++ return this.age; // Plazma - Remove isClientSide on DedicatedServer + } + + public void ageUp(int amount, boolean forced) { +@@ -130,7 +126,7 @@ public abstract class AgeableMob extends PathfinderMob { + @Override + public void inactiveTick() { + super.inactiveTick(); +- if (this.level().isClientSide || this.ageLocked) { // CraftBukkit ++ if (/*this.level().isClientSide == false ||*/ this.ageLocked) { // CraftBukkit // Plazma - Remove isClientSide on DedicatedServer + this.refreshDimensions(); + } else { + int age = this.getAge(); +@@ -146,7 +142,7 @@ public abstract class AgeableMob extends PathfinderMob { + @Override + public void aiStep() { + super.aiStep(); +- if (this.level().isClientSide || this.ageLocked) { // CraftBukkit ++ if (/*this.level().isClientSide == false ||*/ this.ageLocked) { // CraftBukkit // Plazma - Remove isClientSide on DedicatedServer + if (this.forcedAgeTimer > 0) { + if (this.forcedAgeTimer % 4 == 0) { + this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 0.0, 0.0, 0.0); +diff --git a/net/minecraft/world/entity/AreaEffectCloud.java b/net/minecraft/world/entity/AreaEffectCloud.java +index 23b342cc31c7e72ade0e1ccad86a9ccf34380f13..d42967b93a0c9a76db4a585348e481d23859e3e2 100644 +--- a/net/minecraft/world/entity/AreaEffectCloud.java ++++ b/net/minecraft/world/entity/AreaEffectCloud.java +@@ -69,9 +69,9 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { + } + + public void setRadius(float radius) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.getEntityData().set(DATA_RADIUS, Mth.clamp(radius, 0.0F, 32.0F)); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/Display.java b/net/minecraft/world/entity/Display.java +index ff49fdcddb43ee479a377aa219eb18fcaefeffca..b62f4bd8d2cd61a3bad7169cc7ed476de581b962 100644 +--- a/net/minecraft/world/entity/Display.java ++++ b/net/minecraft/world/entity/Display.java +@@ -147,6 +147,7 @@ public abstract class Display extends Entity { + this.stopRiding(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (this.level().isClientSide) { + if (this.updateStartTick) { + this.updateStartTick = false; +@@ -185,9 +186,10 @@ public abstract class Display extends Entity { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + +- protected abstract void updateRenderSubState(boolean interpolate, float partialTick); ++ //protected abstract void updateRenderSubState(boolean interpolate, float partialTick); // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void defineSynchedData(SynchedEntityData.Builder builder) { +@@ -550,8 +552,8 @@ public abstract class Display extends Entity { + private static final EntityDataAccessor DATA_BLOCK_STATE_ID = SynchedEntityData.defineId( + Display.BlockDisplay.class, EntityDataSerializers.BLOCK_STATE + ); +- @Nullable +- private Display.BlockDisplay.BlockRenderState blockRenderState; ++ //@Nullable // Plazma - Remove isClientSide on DedicatedServer ++ //private Display.BlockDisplay.BlockRenderState blockRenderState; // Plazma - Remove isClientSide on DedicatedServer + + public BlockDisplay(EntityType entityType, Level level) { + super(entityType, level); +@@ -591,6 +593,7 @@ public abstract class Display extends Entity { + tag.put("block_state", NbtUtils.writeBlockState(this.getBlockState())); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + public Display.BlockDisplay.BlockRenderState blockRenderState() { + return this.blockRenderState; +@@ -603,6 +606,7 @@ public abstract class Display extends Entity { + + public record BlockRenderState(BlockState blockState) { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + record ColorInterpolator(int previous, int current) implements Display.IntInterpolator { +@@ -647,8 +651,8 @@ public abstract class Display extends Entity { + ); + private static final EntityDataAccessor DATA_ITEM_DISPLAY_ID = SynchedEntityData.defineId(Display.ItemDisplay.class, EntityDataSerializers.BYTE); + private final SlotAccess slot = SlotAccess.of(this::getItemStack, this::setItemStack); +- @Nullable +- private Display.ItemDisplay.ItemRenderState itemRenderState; ++ //@Nullable // Plazma - Remove isClientSide on DedicatedServer ++ //private Display.ItemDisplay.ItemRenderState itemRenderState; // Plazma - Remove isClientSide on DedicatedServer + + public ItemDisplay(EntityType entityType, Level level) { + super(entityType, level); +@@ -717,6 +721,7 @@ public abstract class Display extends Entity { + return slot == 0 ? this.slot : SlotAccess.NULL; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + public Display.ItemDisplay.ItemRenderState itemRenderState() { + return this.itemRenderState; +@@ -731,6 +736,7 @@ public abstract class Display extends Entity { + + public record ItemRenderState(ItemStack itemStack, ItemDisplayContext itemTransform) { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + record LinearFloatInterpolator(float previous, float current) implements Display.FloatInterpolator { +@@ -810,10 +816,10 @@ public abstract class Display extends Entity { + private static final IntSet TEXT_RENDER_STATE_IDS = IntSet.of( + DATA_TEXT_ID.id(), DATA_LINE_WIDTH_ID.id(), DATA_BACKGROUND_COLOR_ID.id(), DATA_TEXT_OPACITY_ID.id(), DATA_STYLE_FLAGS_ID.id() + ); +- @Nullable +- private Display.TextDisplay.CachedInfo clientDisplayCache; +- @Nullable +- private Display.TextDisplay.TextRenderState textRenderState; ++ //@Nullable // Plazma - Remove isClientSide on DedicatedServer ++ //private Display.TextDisplay.CachedInfo clientDisplayCache; // Plazma - Remove isClientSide on DedicatedServer ++ //@Nullable // Plazma - Remove isClientSide on DedicatedServer ++ //private Display.TextDisplay.TextRenderState textRenderState; // Plazma - Remove isClientSide on DedicatedServer + + public TextDisplay(EntityType entityType, Level level) { + super(entityType, level); +@@ -948,6 +954,7 @@ public abstract class Display extends Entity { + Display.TextDisplay.Align.CODEC.encodeStart(NbtOps.INSTANCE, getAlign(flags)).ifSuccess(tag1 -> tag.put("alignment", tag1)); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + protected void updateRenderSubState(boolean interpolate, float partialTick) { + if (interpolate && this.textRenderState != null) { +@@ -997,6 +1004,7 @@ public abstract class Display extends Entity { + + return this.clientDisplayCache; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static Display.TextDisplay.Align getAlign(byte flags) { + if ((flags & 8) != 0) { +@@ -1024,6 +1032,7 @@ public abstract class Display extends Entity { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public record CachedInfo(List lines, int width) { + } + +@@ -1037,6 +1046,7 @@ public abstract class Display extends Entity { + + public record TextRenderState(Component text, int lineWidth, Display.IntInterpolator textOpacity, Display.IntInterpolator backgroundColor, byte flags) { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + record TransformationInterpolator(Transformation previous, Transformation current) implements Display.GenericInterpolator { +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index ef32cca12f11c4a25bdf852f756e2e5a92e532a1..bd24ef83f9366806961b185ceb15703734a8b2ff 100644 +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -533,7 +533,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*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue(); + BlockPos blockPos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ()); + boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow; +@@ -913,9 +913,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + this.checkBelowWorld(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setSharedFlagOnFire(this.remainingFireTicks > 0); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.firstTick = false; + if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) { +@@ -1192,7 +1192,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + + BlockPos onPosLegacy = this.getOnPosLegacy(); + BlockState blockState = this.level().getBlockState(onPosLegacy); +- if ((!this.level().isClientSide() || this.isControlledByLocalInstance()) && !this.isControlledByClient()) { ++ if (/*(!this.level().isClientSide() || this.isControlledByLocalInstance()) &&*/ !this.isControlledByClient()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.checkFallDamage(vec3.y, this.onGround(), blockState, onPosLegacy); + } + +@@ -1233,12 +1233,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + // CraftBukkit end + +- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { ++ //if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { // == true // Plazma - Remove isClientSide on DedicatedServer + Entity.MovementEmission movementEmission = this.getMovementEmission(); + if (movementEmission.emitsAnything() && !this.isPassenger()) { + this.applyMovementEmissionAndPlaySound(movementEmission, vec3, onPosLegacy, blockState); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + float blockSpeedFactor = this.getBlockSpeedFactor(); + this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor)); +@@ -1359,7 +1359,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public void extinguishFire() { +- if (!this.level().isClientSide && this.wasOnFire) { ++ if (/*!this.level().isClientSide &&*/ this.wasOnFire) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.playEntityOnFireExtinguishedSound(); + } + +@@ -2962,7 +2962,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur - Allow leashing villagers + // CraftBukkit start - fire PlayerUnleashEntityEvent + // Paper start - Expand EntityUnleashEvent +@@ -2980,14 +2980,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + this.gameEvent(GameEvent.ENTITY_INTERACT, player); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS.withoutItem(); + } + + ItemStack itemInHand = player.getItemInHand(hand); + if (itemInHand.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) { +- if (!this.level().isClientSide()) { ++ //if (!this.level().isClientSide()) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start - fire PlayerLeashEntityEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) { + ((ServerPlayer) player).connection.send(new net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket(this, leashable.getLeashHolder())); +@@ -2996,7 +2996,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + // CraftBukkit end + leashable.setLeashedTo(player, true); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + itemInHand.shrink(1); + return InteractionResult.SUCCESS; +@@ -3072,7 +3072,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + return false; + } else if (!vehicle.couldAcceptPassenger()) { + return false; +- } else if (!force && !this.level().isClientSide() && !vehicle.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities ++ } else if (!force /*&& !this.level().isClientSide()*/ && !vehicle.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities // == true // Plazma - Remove isClientSide on DedicatedServer + return false; + } else { + for (Entity entity = vehicle; entity.vehicle != null; entity = entity.vehicle) { +@@ -3161,7 +3161,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + this.passengers = ImmutableList.of(passenger); + } 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)) { // == true // Plazma - Remove isClientSide on DedicatedServer + list.add(0, passenger); + } else { + list.add(passenger); +@@ -3358,18 +3358,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public void handleEntityEvent(byte id) { ++ /* // Plazma - Remove isClientSide on DedicatedServer + switch (id) { + case 53: + HoneyBlock.showSlideParticles(this); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + public void animateHurt(float yaw) { + } + + public boolean isOnFire() { +- boolean flag = this.level() != null && this.level().isClientSide; +- return !this.fireImmune() && (this.remainingFireTicks > 0 || flag && this.getSharedFlag(0)); ++ return !this.fireImmune() && (this.remainingFireTicks > 0 || this.level() != null && this.getSharedFlag(0)); // Plazma - Remove isClientSide on DedicatedServer + } + + public boolean isPassenger() { +@@ -3457,7 +3458,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public boolean isCurrentlyGlowing() { +- return this.level().isClientSide() ? this.getSharedFlag(6) : this.hasGlowingTag; ++ return this.hasGlowingTag; // Plazma - Remove isClientSide on DedicatedServer + } + + public boolean isInvisible() { +@@ -4192,8 +4193,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + this.eyeHeight = dimensions.eyeHeight(); + this.reapplyPosition(); + boolean flag = dimensions.width() <= 4.0F && dimensions.height() <= 4.0F; +- if (!this.level.isClientSide +- && !this.firstTick ++ if (!this.firstTick // Plazma - Remove isClientSide on DedicatedServer + && !this.noPhysics + && flag + && (dimensions.width() > entityDimensions.width() || dimensions.height() > entityDimensions.height()) +@@ -4458,7 +4458,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public boolean isEffectiveAi() { +- return !this.level().isClientSide; ++ return true; //!this.level().isClientSide; // Plazma - Remove isClientSide on DedicatedServer + } + + protected static Vec3 getCollisionHorizontalEscapeVector(double vehicleWidth, double passengerWidth, float yRot) { +diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java +index d23aad063990fff5e7b1442ac38f4355b541a13e..410311e4e8b21cd9a6646718e674f35690963029 100644 +--- a/net/minecraft/world/entity/EntitySelector.java ++++ b/net/minecraft/world/entity/EntitySelector.java +@@ -56,7 +56,7 @@ public final class EntitySelector { + return collisionRule == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : NO_SPECTATORS.and(pushedEntity -> { + if (!pushedEntity.isCollidable(ignoreClimbing) || !pushedEntity.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(pushedEntity)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule + return false; +- } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) { ++ } else /*if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer())*/ { // == true // Plazma - Remove isClientSide on DedicatedServer + Team team1 = pushedEntity.getTeam(); + Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule(); + if (collisionRule1 == Team.CollisionRule.NEVER || (pushedEntity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions)) { // Paper - Configurable player collision +@@ -66,10 +66,10 @@ public final class EntitySelector { + return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag) + && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag); + } +- } else { ++ } /*else { // Plazma - Remove isClientSide on DedicatedServer + return false; + } +- ++ */ // Plazma - Remove isClientSide on DedicatedServer + }); + // Plazma end + } +diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java +index 4186db5cb8d2cd29ebc230d704dd125ae0dfa358..333ab1cf3f32386a8912463d8dffd14ecbeae536 100644 +--- a/net/minecraft/world/entity/EntityType.java ++++ b/net/minecraft/world/entity/EntityType.java +@@ -1286,7 +1286,7 @@ public class EntityType implements FeatureElement, EntityTypeT + if (server != null && entity != null) { + EntityType entityType = customData.parseEntityType(server.registryAccess(), Registries.ENTITY_TYPE); + if (entity.getType() == entityType) { +- if (level.isClientSide || !entity.getType().onlyOpCanSetNbt() || player != null && server.getPlayerList().isOp(player.getGameProfile())) { ++ if (/*level.isClientSide ||*/ !entity.getType().onlyOpCanSetNbt() || player != null && server.getPlayerList().isOp(player.getGameProfile())) { // == false // Plazma - Remove isClientSide on DedicatedServer + // Paper start - filter out protected tags + if (player == null || !player.getBukkitEntity().hasPermission("minecraft.nbt.place")) { + customData = customData.update((compound) -> { +diff --git a/net/minecraft/world/entity/Interaction.java b/net/minecraft/world/entity/Interaction.java +index 17949459c71aa5409570a62f290dcf8ae6ee3f94..1fcc2dcb6140bafd0a6ab5b876cd029301bd99bf 100644 +--- a/net/minecraft/world/entity/Interaction.java ++++ b/net/minecraft/world/entity/Interaction.java +@@ -155,12 +155,10 @@ public class Interaction extends Entity implements Attackable, Targeting { + + @Override + public InteractionResult interact(Player player, InteractionHand hand) { +- if (this.level().isClientSide) { +- return this.getResponse() ? InteractionResult.SUCCESS : InteractionResult.CONSUME; +- } else { +- this.interaction = new Interaction.PlayerAction(player.getUUID(), this.level().getGameTime()); +- return InteractionResult.CONSUME; +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ this.interaction = new Interaction.PlayerAction(player.getUUID(), this.level().getGameTime()); ++ return InteractionResult.CONSUME; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/Leashable.java b/net/minecraft/world/entity/Leashable.java +index 8e115fa3039be5ce6917728cda2a7e756af88a13..a3c98d9acdab97754b11c4e636f97e64dbe1021f 100644 +--- a/net/minecraft/world/entity/Leashable.java ++++ b/net/minecraft/world/entity/Leashable.java +@@ -266,12 +266,13 @@ public interface Leashable { + if (leashData == null) { + return null; + } else { +- if (leashData.delayedLeashHolderId != 0 && entity.level().isClientSide) { ++ /*if (leashData.delayedLeashHolderId != 0 && entity.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + Entity var3 = entity.level().getEntity(leashData.delayedLeashHolderId); + if (var3 instanceof Entity) { + leashData.setLeashHolder(var3); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + return leashData.leashHolder; + } +diff --git a/net/minecraft/world/entity/LightningBolt.java b/net/minecraft/world/entity/LightningBolt.java +index f003a65b34027dff14455860815c7d719c5289fa..89a360c1121418d650b2749621f945958f9df152 100644 +--- a/net/minecraft/world/entity/LightningBolt.java ++++ b/net/minecraft/world/entity/LightningBolt.java +@@ -78,39 +78,16 @@ public class LightningBolt extends Entity { + public void tick() { + super.tick(); + if (!this.isEffect && this.life == 2) { // Paper - Properly handle lightning effects api +- 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 { +- Difficulty difficulty = this.level().getDifficulty(); +- if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) { +- this.spawnFire(4); +- } +- +- this.powerLightningRod(); +- clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - Call EntityChangeBlockEvent +- this.gameEvent(GameEvent.LIGHTNING_STRIKE); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ Difficulty difficulty = this.level().getDifficulty(); ++ if (difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD) { ++ this.spawnFire(4); + } ++ ++ this.powerLightningRod(); ++ clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - Call EntityChangeBlockEvent ++ this.gameEvent(GameEvent.LIGHTNING_STRIKE); ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + this.life--; +diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java +index f37d77c98f6bc0a6113ff5896c7ee6e401df6e30..70f848346a13b3aedb4c0787b7bdc62b8733f885 100644 +--- a/net/minecraft/world/entity/LivingEntity.java ++++ b/net/minecraft/world/entity/LivingEntity.java +@@ -450,7 +450,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + super.baseTick(); + ProfilerFiller profilerFiller = Profiler.get(); + profilerFiller.push("livingEntityBaseTick"); +- if (this.fireImmune() || this.level().isClientSide) { ++ if (this.fireImmune() /*|| this.level().isClientSide*/) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.clearFire(); + } + +@@ -509,7 +509,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.setAirSupply(this.increaseAirSupply(this.getAirSupply())); + } + +- if (!this.level().isClientSide && this.isPassenger() && this.getVehicle() != null && this.getVehicle().dismountsUnderwater()) { ++ if (/*!this.level().isClientSide &&*/ this.isPassenger() && this.getVehicle() != null && this.getVehicle().dismountsUnderwater()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.stopRiding(); + } + } else if (this.getAirSupply() < this.getMaxAirSupply()) { +@@ -624,7 +624,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.level().broadcastEntityEvent(this, (byte)60); + this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause + } +@@ -735,7 +735,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + public void onEquipItem(EquipmentSlot slot, ItemStack oldItem, ItemStack newItem, boolean silent) { + // CraftBukkit end +- if (!this.level().isClientSide() && !this.isSpectator()) { ++ if (/*!this.level().isClientSide() &&*/ !this.isSpectator()) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean flag = newItem.isEmpty() && oldItem.isEmpty(); + if (!flag && !ItemStack.isSameItemSameComponents(oldItem, newItem) && !this.firstTick) { + Equippable equippable = newItem.get(DataComponents.EQUIPPABLE); +@@ -832,7 +832,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + } + // Paper end - Friction API +- if (compound.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { ++ if (compound.contains("attributes", 9) && this.level() != null /*&& !this.level().isClientSide*/) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.getAttributes().load(compound.getList("attributes", 10)); + } + +@@ -933,7 +933,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + Holder holder = iterator.next(); + MobEffectInstance mobEffectInstance = this.activeEffects.get(holder); + if (!mobEffectInstance.tick(this, () -> this.onEffectUpdated(mobEffectInstance, true, null))) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobEffectInstance, null, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.EXPIRATION); + if (event.isCancelled()) { +@@ -942,7 +942,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + // CraftBukkit end + iterator.remove(); + this.onEffectsRemoved(List.of(mobEffectInstance)); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } else if (mobEffectInstance.getDuration() % 600 == 0) { + this.onEffectUpdated(mobEffectInstance, false, null); + } +@@ -962,10 +962,10 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.effectsToProcess.clear(); + // CraftBukkit end + if (this.effectsDirty) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.updateInvisibilityStatus(); + this.updateGlowingStatus(); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.effectsDirty = false; + } +@@ -1089,9 +1089,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) { // == false // Plazma - Remove isClientSide on DedicatedServer + return false; +- } else if (this.activeEffects.isEmpty()) { ++ } else*/ if (this.activeEffects.isEmpty()) { // Plazma - Remove isClientSide on DedicatedServer + return false; + } else { + // CraftBukkit start +@@ -1263,10 +1263,10 @@ public abstract class LivingEntity extends Entity implements Attackable { + + protected void onEffectAdded(MobEffectInstance effectInstance, @Nullable Entity entity) { + this.effectsDirty = true; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + effectInstance.getEffect().value().addAttributeModifiers(this.getAttributes(), effectInstance.getAmplifier()); + this.sendEffectToPassengers(effectInstance); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public void sendEffectToPassengers(MobEffectInstance effectInstance) { +@@ -1279,21 +1279,21 @@ public abstract class LivingEntity extends Entity implements Attackable { + + protected void onEffectUpdated(MobEffectInstance effectInstance, boolean forced, @Nullable Entity entity) { + this.effectsDirty = true; +- if (forced && !this.level().isClientSide) { ++ if (forced /*&& !this.level().isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + MobEffect mobEffect = effectInstance.getEffect().value(); + mobEffect.removeAttributeModifiers(this.getAttributes()); + mobEffect.addAttributeModifiers(this.getAttributes(), effectInstance.getAmplifier()); + this.refreshDirtyAttributes(); + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.sendEffectToPassengers(effectInstance); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + protected void onEffectsRemoved(Collection effects) { + this.effectsDirty = true; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + for (MobEffectInstance mobEffectInstance : effects) { + mobEffectInstance.getEffect().value().removeAttributeModifiers(this.getAttributes()); + +@@ -1305,7 +1305,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + this.refreshDirtyAttributes(); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + private void refreshDirtyAttributes() { +@@ -1736,6 +1736,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + + private void breakItem(ItemStack stack) { + if (!stack.isEmpty()) { ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (!this.isSilent()) { + this.level() + .playLocalSound( +@@ -1749,6 +1750,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + false + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + this.spawnItemParticles(stack, 5); + } +@@ -1795,7 +1797,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.stopSleeping(); + } + +- if (!this.level().isClientSide && this.hasCustomName()) { ++ if (/*!this.level().isClientSide &&*/ this.hasCustomName()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot + } + +@@ -2626,9 +2628,11 @@ public abstract class LivingEntity extends Entity implements Attackable { + case 52: + this.breakItem(this.getItemBySlot(EquipmentSlot.FEET)); + break; ++ /* // Plazma - Remove isClientSide on DedicatedServer + case 54: + HoneyBlock.showJumpParticles(this); + break; ++ */ // Plazma - Remove isClientSide on DedicatedServer + case 55: + this.swapHandItems(); + break; +@@ -2945,13 +2949,15 @@ public abstract class LivingEntity extends Entity implements Attackable { + MobEffectInstance effect = this.getEffect(MobEffects.LEVITATION); + if (effect != null) { + d += (0.05 * (effect.getAmplifier() + 1) - vec3.y) * 0.2; +- } else if (!this.level().isClientSide || this.level().hasChunkAt(blockPosBelowThatAffectsMyMovement)) { ++ } else //if (!this.level().isClientSide || this.level().hasChunkAt(blockPosBelowThatAffectsMyMovement)) { // == true // Plazma - Remove isClientSide on DedicatedServer + d -= this.getEffectiveGravity(); ++ /* // Plazma - Remove isClientSide on DedicatedServer + } else if (this.getY() > this.level().getMinY()) { + d = -0.1; + } else { + d = 0.0; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.shouldDiscardFriction()) { + this.setDeltaMovement(vec3.x, d, vec3.z); +@@ -3019,10 +3025,10 @@ public abstract class LivingEntity extends Entity implements Attackable { + double d = deltaMovement.horizontalDistance(); + this.setDeltaMovement(this.updateFallFlyingMovement(deltaMovement)); + this.move(MoverType.SELF, this.getDeltaMovement()); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + double d1 = this.getDeltaMovement().horizontalDistance(); + this.handleFallFlyingCollisions(d, d1); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + private Vec3 updateFallFlyingMovement(Vec3 deltaMovement) { +@@ -3179,41 +3185,41 @@ public abstract class LivingEntity extends Entity implements Attackable { + super.tick(); + this.updatingUsingItem(); + this.updateSwimAmount(); +- if (!this.level().isClientSide) { +- int arrowCount = this.getArrowCount(); +- if (arrowCount > 0) { +- if (this.removeArrowTime <= 0) { +- this.removeArrowTime = 20 * (30 - arrowCount); +- } +- +- this.removeArrowTime--; +- if (this.removeArrowTime <= 0) { +- this.setArrowCount(arrowCount - 1); +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ int arrowCount = this.getArrowCount(); ++ if (arrowCount > 0) { ++ if (this.removeArrowTime <= 0) { ++ this.removeArrowTime = 20 * (30 - arrowCount); + } + +- int stingerCount = this.getStingerCount(); +- if (stingerCount > 0) { +- if (this.removeStingerTime <= 0) { +- this.removeStingerTime = 20 * (30 - stingerCount); +- } +- +- this.removeStingerTime--; +- if (this.removeStingerTime <= 0) { +- this.setStingerCount(stingerCount - 1); +- } ++ this.removeArrowTime--; ++ if (this.removeArrowTime <= 0) { ++ this.setArrowCount(arrowCount - 1); + } ++ } + +- this.detectEquipmentUpdatesPublic(); // CraftBukkit +- if (this.tickCount % 20 == 0) { +- this.getCombatTracker().recheckStatus(); ++ int stingerCount = this.getStingerCount(); ++ if (stingerCount > 0) { ++ if (this.removeStingerTime <= 0) { ++ this.removeStingerTime = 20 * (30 - stingerCount); + } + +- if (this.isSleeping() && !this.checkBedExists()) { +- this.stopSleeping(); ++ this.removeStingerTime--; ++ if (this.removeStingerTime <= 0) { ++ this.setStingerCount(stingerCount - 1); + } + } + ++ this.detectEquipmentUpdatesPublic(); // CraftBukkit ++ if (this.tickCount % 20 == 0) { ++ this.getCombatTracker().recheckStatus(); ++ } ++ ++ if (this.isSleeping() && !this.checkBedExists()) { ++ this.stopSleeping(); ++ } ++ // Plazma end - Remove isClientSide on DedicatedServer ++ + if (!this.isRemoved()) { + this.aiStep(); + } +@@ -3535,14 +3541,12 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.travel(vec3); + } + +- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) { +- this.applyEffectsFromBlocks(); +- } ++ this.applyEffectsFromBlocks(); // Plazma - Remove isClientSide on DedicatedServer + + this.calculateEntityAnimation(this instanceof FlyingAnimal); + profilerFiller.pop(); + profilerFiller.push("freezing"); +- if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API ++ if (/*!this.level().isClientSide &&*/ !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API // == true // Plazma - Remove isClientSide on DedicatedServer + int ticksFrozen = this.getTicksFrozen(); + if (this.isInPowderSnow && this.canFreeze()) { + this.setTicksFrozen(Math.min(this.getTicksRequiredToFreeze(), ticksFrozen + 1)); +@@ -3634,36 +3638,40 @@ public abstract class LivingEntity extends Entity implements Attackable { + + protected void updateFallFlying() { + this.checkSlowFallDistance(); +- if (!this.level().isClientSide) { +- if (!this.canGlide()) { +- if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (!this.canGlide()) { ++ if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit + this.setSharedFlag(7, false); +- return; +- } + +- int i = this.fallFlyTicks + 1; +- if (i % 10 == 0) { +- int i1 = i / 10; +- if (i1 % 2 == 0) { +- List list = EquipmentSlot.VALUES.stream().filter(slot -> canGlideUsing(this.getItemBySlot(slot), slot)).toList(); +- EquipmentSlot equipmentSlot = Util.getRandom(list, this.random); ++ return; ++ } + +- // Purpur start - Implement elytra settings +- int damage = level().purpurConfig.elytraDamagePerSecond; +- if (level().purpurConfig.elytraDamageMultiplyBySpeed > 0) { +- double speed = getDeltaMovement().lengthSqr(); +- if (speed > level().purpurConfig.elytraDamageMultiplyBySpeed) { +- damage *= (int) speed; +- } +- } ++ int i = this.fallFlyTicks + 1; ++ if (i % 10 != 0) return; + +- this.getItemBySlot(equipmentSlot).hurtAndBreak(damage, this, equipmentSlot); +- // Purpur end - Implement elytra settings +- } ++ int j = i / 10; ++ if (j % 2 != 0) { ++ this.gameEvent(GameEvent.ELYTRA_GLIDE); ++ return; ++ } ++ ++ List list = EquipmentSlot.VALUES.stream().filter(slot -> canGlideUsing(this.getItemBySlot(slot), slot)).toList(); ++ EquipmentSlot equipmentSlot = Util.getRandom(list, this.random); + +- this.gameEvent(GameEvent.ELYTRA_GLIDE); ++ // Purpur start - Implement elytra settings ++ int damage = level().purpurConfig.elytraDamagePerSecond; ++ if (level().purpurConfig.elytraDamageMultiplyBySpeed > 0) { ++ double speed = getDeltaMovement().lengthSqr(); ++ if (speed > level().purpurConfig.elytraDamageMultiplyBySpeed) { ++ damage *= (int) speed; + } + } ++ ++ this.getItemBySlot(equipmentSlot).hurtAndBreak(damage, this, equipmentSlot); ++ // Purpur end - Implement elytra settings ++ ++ this.gameEvent(GameEvent.ELYTRA_GLIDE); ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + public boolean canGlide() { +@@ -3751,7 +3759,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setLivingEntityFlag(4, false); + this.autoSpinAttackDmg = 0.0F; + this.autoSpinAttackItemStack = null; +@@ -3780,7 +3788,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + // Paper end - Force entity dismount during teleportation + Entity vehicle = this.getVehicle(); + super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation +- if (vehicle != null && vehicle != this.getVehicle() && !this.level().isClientSide && vehicle.valid) { // Paper - don't process on world gen ++ if (vehicle != null && vehicle != this.getVehicle() /*&& !this.level().isClientSide*/ && vehicle.valid) { // Paper - don't process on world gen // == true // Plazma - Remove isClientSide on DedicatedServer + this.dismountVehicle(vehicle); + } + } +@@ -3852,7 +3860,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + + public void take(Entity entity, int amount) { + if (!entity.isRemoved() +- && !this.level().isClientSide ++ //&& !this.level().isClientSide // == true // Plazma - Remove isClientSide on DedicatedServer + && (entity instanceof ItemEntity || entity instanceof AbstractArrow || entity instanceof ExperienceOrb)) { + ((ServerLevel)this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(entity.getId(), this.getId(), amount)); // Paper - broadcast with collector as source + } +@@ -3992,7 +4000,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 && !usingItem.useOnRelease()) { ++ if ((--this.useItemRemaining == 0 || shouldLagCompensate) /*&& !this.level().isClientSide*/ && !usingItem.useOnRelease()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.useItemRemaining = 0; + // Paper end - lag compensate eating + this.completeUsingItem(); +@@ -4032,22 +4040,23 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.useItemRemaining = this.totalEatTimeTicks = itemInHand.getUseDuration(this); + this.eatStartTime = System.nanoTime(); + // Paper end - lag compensate eating +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setLivingEntityFlag(1, true); + this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); + this.gameEvent(GameEvent.ITEM_INTERACT_START); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { + super.onSyncedDataUpdated(key); ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (SLEEPING_POS_ID.equals(key)) { +- if (this.level().isClientSide) { ++ if (this.level().isClientSide) { // == false // Plazma - marking + this.getSleepingPos().ifPresent(this::setPosToBed); + } +- } else if (DATA_LIVING_ENTITY_FLAGS.equals(key) && this.level().isClientSide) { ++ } else if (DATA_LIVING_ENTITY_FLAGS.equals(key) && this.level().isClientSide) { // == false // Plazma - marking + if (this.isUsingItem() && this.useItem.isEmpty()) { + this.useItem = this.getItemInHand(this.getUsedItemHand()); + if (!this.useItem.isEmpty()) { +@@ -4061,6 +4070,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + // Paper end - lag compensate eating + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -4091,58 +4101,66 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + public void completeUsingItem() { +- if (!this.level().isClientSide || this.isUsingItem()) { +- InteractionHand usedItemHand = this.getUsedItemHand(); +- if (!this.useItem.equals(this.getItemInHand(usedItemHand))) { +- this.releaseUsingItem(); +- } else { +- if (!this.useItem.isEmpty() && this.isUsingItem()) { +- this.startUsingItem(this.getUsedItemHand(), true); // Paper - Prevent consuming the wrong itemstack +- // CraftBukkit start - fire PlayerItemConsumeEvent +- ItemStack itemStack; +- PlayerItemConsumeEvent event = null; // Paper +- if (this instanceof ServerPlayer serverPlayer) { +- org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem); +- org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(usedItemHand); +- event = new PlayerItemConsumeEvent((org.bukkit.entity.Player) this.getBukkitEntity(), craftItem, hand); // Paper +- this.level().getCraftServer().getPluginManager().callEvent(event); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ final InteractionHand usedItemHand = this.getUsedItemHand(); ++ if (!this.useItem.equals(this.getItemInHand(usedItemHand))) { ++ this.releaseUsingItem(); ++ return; ++ } + +- if (event.isCancelled()) { +- // Update client +- Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE); +- if (consumable != null) { +- consumable.cancelUsingItem(serverPlayer, this.useItem); +- } +- serverPlayer.getBukkitEntity().updateInventory(); +- serverPlayer.getBukkitEntity().updateScaledHealth(); +- this.stopUsingItem(); // Paper - event is using an item, clear active item to reset its use +- return; +- } ++ if (this.useItem.isEmpty() || !this.isUsingItem()) { ++ return; ++ } + +- itemStack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this); +- } else { +- itemStack = this.useItem.finishUsingItem(this.level(), this); +- } +- // Paper start - save the default replacement item and change it if necessary +- final ItemStack defaultReplacement = itemStack; +- if (event != null && event.getReplacement() != null) { +- itemStack = CraftItemStack.asNMSCopy(event.getReplacement()); +- } +- // Paper end +- // CraftBukkit end +- if (itemStack != this.useItem) { +- this.setItemInHand(usedItemHand, itemStack); +- } ++ this.startUsingItem(this.getUsedItemHand(), true); // Paper - Prevent consuming the wrong itemstack + +- this.stopUsingItem(); +- // Paper start +- if (this instanceof ServerPlayer) { +- ((ServerPlayer) this).getBukkitEntity().updateInventory(); +- } +- // Paper end ++ // CraftBukkit start - fire PlayerItemConsumeEvent ++ ItemStack itemStack; ++ PlayerItemConsumeEvent event = null; // Paper ++ if (this instanceof ServerPlayer serverPlayer) { ++ org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem); ++ org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(usedItemHand); ++ event = new PlayerItemConsumeEvent((org.bukkit.entity.Player) this.getBukkitEntity(), craftItem, hand); // Paper ++ this.level().getCraftServer().getPluginManager().callEvent(event); ++ ++ if (event.isCancelled()) { ++ // Update client ++ Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE); ++ if (consumable != null) { ++ consumable.cancelUsingItem(serverPlayer, this.useItem); + } ++ serverPlayer.getBukkitEntity().updateInventory(); ++ serverPlayer.getBukkitEntity().updateScaledHealth(); ++ this.stopUsingItem(); // Paper - event is using an item, clear active item to reset its use ++ return; + } ++ ++ itemStack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this); ++ } else { ++ itemStack = this.useItem.finishUsingItem(this.level(), this); ++ } ++ ++ // Paper start - save the default replacement item and change it if necessary ++ final ItemStack defaultReplacement = itemStack; ++ if (event != null && event.getReplacement() != null) { ++ itemStack = CraftItemStack.asNMSCopy(event.getReplacement()); ++ } ++ // Paper end ++ ++ // CraftBukkit end ++ if (itemStack != this.useItem) { ++ this.setItemInHand(usedItemHand, itemStack); + } ++ ++ this.stopUsingItem(); ++ ++ // Paper start ++ if (this instanceof ServerPlayer) { ++ ((ServerPlayer) this).getBukkitEntity().updateInventory(); ++ } ++ // Paper end ++ ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + public void handleExtraItemsCreatedOnUse(ItemStack stack) { +@@ -4173,13 +4191,13 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + public void stopUsingItem() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean isUsingItem = this.isUsingItem(); + this.setLivingEntityFlag(1, false); + if (isUsingItem) { + this.gameEvent(GameEvent.ITEM_INTERACT_FINISH); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.useItem = ItemStack.EMPTY; + // Paper start - lag compensate eating +@@ -4594,7 +4612,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 isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java +index 70ee86993d381445855ac7e7290da384d6675987..b786fef4c0e8c1c4ec043904a574b445deae695a 100644 +--- a/net/minecraft/world/entity/Mob.java ++++ b/net/minecraft/world/entity/Mob.java +@@ -399,11 +399,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + } + + public void spawnAnim() { +- if (this.level().isClientSide) { +- this.makePoofParticles(); +- } else { +- this.level().broadcastEntityEvent(this, (byte)20); +- } ++ this.level().broadcastEntityEvent(this, (byte)20); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -418,7 +414,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.updateControlFlags(); + } + } +diff --git a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java +index 95fa516910a3834bbd4db6d11279e13a1f0dac41..916a41add6ef45e8a80336c3a1f93b264aa87cb5 100644 +--- a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java ++++ b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java +@@ -78,21 +78,19 @@ public class RemoveBlockGoal extends MoveToBlockGoal { + if (this.ticksSinceReachedGoal > 0) { + Vec3 deltaMovement = this.removerMob.getDeltaMovement(); + this.removerMob.setDeltaMovement(deltaMovement.x, 0.3, deltaMovement.z); +- if (!level.isClientSide) { +- double d = 0.08; +- ((ServerLevel)level) +- .sendParticles( +- new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.EGG)), +- posWithBlock.getX() + 0.5, +- posWithBlock.getY() + 0.7, +- posWithBlock.getZ() + 0.5, +- 3, +- (random.nextFloat() - 0.5) * 0.08, +- (random.nextFloat() - 0.5) * 0.08, +- (random.nextFloat() - 0.5) * 0.08, +- 0.15F +- ); +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ ((ServerLevel) level).sendParticles( ++ new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.EGG)), ++ posWithBlock.getX() + 0.5, ++ posWithBlock.getY() + 0.7, ++ posWithBlock.getZ() + 0.5, ++ 3, ++ (random.nextFloat() - 0.5) * 0.08, ++ (random.nextFloat() - 0.5) * 0.08, ++ (random.nextFloat() - 0.5) * 0.08, ++ 0.15F ++ ); ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + if (this.ticksSinceReachedGoal % 2 == 0) { +@@ -110,7 +108,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal { + } + // CraftBukkit end + level.removeBlock(posWithBlock, false); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + for (int i = 0; i < 20; i++) { + double d = random.nextGaussian() * 0.02; + double d1 = random.nextGaussian() * 0.02; +@@ -120,7 +118,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal { + } + + this.playBreakSound(level, posWithBlock); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + this.ticksSinceReachedGoal++; +diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java +index 4ac052a78841939a53dac2afb575cb115581e249..0d818552610575494d5592f7813855e8330634f5 100644 +--- a/net/minecraft/world/entity/ambient/Bat.java ++++ b/net/minecraft/world/entity/ambient/Bat.java +@@ -43,9 +43,7 @@ public class Bat extends AmbientCreature { + public Bat(EntityType entityType, Level level) { + super(entityType, level); + this.moveControl = new org.purpurmc.purpur.controller.FlyingWithSpacebarMoveControllerWASD(this, 0.075F); // Purpur - Ridables +- if (!level.isClientSide) { +- this.setResting(true); +- } ++ this.setResting(true); // Plazma - Remove isClientSide on DedicatedServer + } + + // Purpur start - Ridables +diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java +index 452270f7f1c54ca98c34dcf9a9d29acae77737c8..3d37195aaa8aba08b19d91edc99cfd5f1580b4c5 100644 +--- a/net/minecraft/world/entity/animal/Animal.java ++++ b/net/minecraft/world/entity/animal/Animal.java +@@ -143,7 +143,7 @@ public abstract class Animal extends AgeableMob { + ItemStack itemInHand = player.getItemInHand(hand); + if (this.isFood(itemInHand)) { + int age = this.getAge(); +- if (!this.level().isClientSide && age == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur - Add adjustable breeding cooldown to config ++ if (/*!this.level().isClientSide &&*/ age == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur - Add adjustable breeding cooldown to config // == true // Plazma - Remove isClientSide on DedicatedServer + final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying + this.usePlayerItem(player, hand, itemInHand); + this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying +@@ -158,9 +158,10 @@ public abstract class Animal extends AgeableMob { + return InteractionResult.SUCCESS; + } + +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + return InteractionResult.CONSUME; + } ++ */ + } + + return super.mobInteract(player, hand); +diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java +index 497e8bd6e1e547daf7c09f2f1bc6ae69e559ebc2..5f8273621be03ed1d955683d38d3231ac09bf8cc 100644 +--- a/net/minecraft/world/entity/animal/Bee.java ++++ b/net/minecraft/world/entity/animal/Bee.java +@@ -569,7 +569,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + @Override + public void aiStep() { + super.aiStep(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.stayOutOfHiveCountdown > 0) { + this.stayOutOfHiveCountdown--; + } +@@ -587,7 +587,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + if (this.tickCount % 20 == 0 && !this.isHiveValid()) { + this.hivePos = null; + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Nullable +@@ -688,9 +688,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { + MobEffectInstance beeInteractionEffect = flowerBlock.getBeeInteractionEffect(); + if (beeInteractionEffect != null) { + this.usePlayerItem(player, hand, itemInHand); +- if (!this.level().isClientSide) { +- this.addEffect(beeInteractionEffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause +- } ++ this.addEffect(beeInteractionEffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/entity/animal/Bucketable.java b/net/minecraft/world/entity/animal/Bucketable.java +index 23db9b64f1a791fdcfe46a4027dde2e0170acaf8..5cbba5577483ab68a24720528f2f3ef43818003d 100644 +--- a/net/minecraft/world/entity/animal/Bucketable.java ++++ b/net/minecraft/world/entity/animal/Bucketable.java +@@ -104,9 +104,7 @@ public interface Bucketable { + ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, bucketItemStack, false); + player.setItemInHand(hand, itemStack); + Level level = entity.level(); +- if (!level.isClientSide) { +- CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer)player, bucketItemStack); +- } ++ CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer)player, bucketItemStack); // Plazma - Remove isClientSide on DedicatedServer + + entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause + return Optional.of(InteractionResult.SUCCESS); +diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java +index edd796fd34e43d66a48104201d885756fdd968c3..bd579657e333f79d0c05d0ede4e93d12178b621b 100644 +--- a/net/minecraft/world/entity/animal/Cat.java ++++ b/net/minecraft/world/entity/animal/Cat.java +@@ -429,21 +429,21 @@ public class Cat extends TamableAnimal implements VariantHolder 0.03) { ++ /*if (this.level().isClientSide && this.isInWater() && this.getDeltaMovement().lengthSqr() > 0.03) { // == false // Plazma - Remove isClientSide on DedicatedServer + Vec3 viewVector = this.getViewVector(0.0F); + float f = Mth.cos(this.getYRot() * (float) (Math.PI / 180.0)) * 0.3F; + float f1 = Mth.sin(this.getYRot() * (float) (Math.PI / 180.0)) * 0.3F; +@@ -403,6 +403,7 @@ public class Dolphin extends AgeableWaterCreature { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -428,9 +429,7 @@ public class Dolphin extends AgeableWaterCreature { + protected InteractionResult mobInteract(Player player, InteractionHand hand) { + ItemStack itemInHand = player.getItemInHand(hand); + if (!itemInHand.isEmpty() && itemInHand.is(ItemTags.FISHES)) { +- if (!this.level().isClientSide) { +- this.playSound(SoundEvents.DOLPHIN_EAT, 1.0F, 1.0F); +- } ++ this.playSound(SoundEvents.DOLPHIN_EAT, 1.0F, 1.0F); // Plazma - Remove isClientSide on DedicatedServer + + if (this.isBaby()) { + itemInHand.consume(1, player); +diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java +index f5f5eea330f36fd036d1c2750c424b02161579a9..b9d8f3b3d419a13bd1b888a2bce4dd33fe0c24b4 100644 +--- a/net/minecraft/world/entity/animal/Fox.java ++++ b/net/minecraft/world/entity/animal/Fox.java +@@ -255,7 +255,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.ticksSinceEaten++; + ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.MAINHAND); + if (this.canEat(itemBySlot)) { +@@ -558,7 +558,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*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemEntity itemEntity = new ItemEntity( + this.level(), this.getX() + this.getLookAngle().x, this.getY() + 1.0, this.getZ() + this.getLookAngle().z, stack + ); +diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java +index ccadc9a151e258ff2c74c65c374b1f09d56d10ec..1e816a4842eec321968e662412f8cd3bae1ca259 100644 +--- a/net/minecraft/world/entity/animal/IronGolem.java ++++ b/net/minecraft/world/entity/animal/IronGolem.java +@@ -176,9 +176,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { + this.offerFlowerTick--; + } + +- if (!this.level().isClientSide) { +- this.updatePersistentAnger((ServerLevel)this.level(), true); +- } ++ this.updatePersistentAnger((ServerLevel) this.level(), true); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java +index 681f1256d8bbedc7731fd2906a7f439da4333552..a99f78da91690971b64c3f4fac08b1103579113c 100644 +--- a/net/minecraft/world/entity/animal/Ocelot.java ++++ b/net/minecraft/world/entity/animal/Ocelot.java +@@ -206,7 +206,7 @@ public class Ocelot extends Animal { + ItemStack itemInHand = player.getItemInHand(hand); + if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemInHand) && player.distanceToSqr(this) < 9.0) { + this.usePlayerItem(player, hand, itemInHand); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + 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 isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/entity/animal/Panda.java b/net/minecraft/world/entity/animal/Panda.java +index 0a6a3060f3690ab2d8439d66e6fd6f0c5dc20688..532dec52c5f1d6a7f9d05c7e61ef071e150ee193 100644 +--- a/net/minecraft/world/entity/animal/Panda.java ++++ b/net/minecraft/world/entity/animal/Panda.java +@@ -455,12 +455,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.getEatCounter() > 100 && this.getItemBySlot(EquipmentSlot.MAINHAND).is(ItemTags.PANDA_EATS_FROM_GROUND)) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); + this.gameEvent(GameEvent.EAT); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.sit(false); + } +@@ -543,7 +543,7 @@ public class Panda extends Animal { + if (this.rollCounter > 32) { + this.roll(false); + } else { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.rollCounter == 1) { + float f = this.getYRot() * (float) (Math.PI / 180.0); +@@ -555,7 +555,7 @@ public class Panda extends Animal { + } else { + this.setDeltaMovement(0.0, this.onGround() ? 0.27 : deltaMovement.y, 0.0); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -690,7 +690,7 @@ public class Panda extends Animal { + if (this.isBaby()) { + this.usePlayerItem(player, hand, itemInHand); + this.ageUp((int)(-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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying + this.usePlayerItem(player, hand, itemInHand); + this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying +diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java +index d2c3bfcdafe7ae1937f8bd8f12f9ac4170445e9a..c1c2854cf7657c5c4eb96aaba35960de5ee5e734 100644 +--- a/net/minecraft/world/entity/animal/Parrot.java ++++ b/net/minecraft/world/entity/animal/Parrot.java +@@ -344,22 +344,20 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder key) { +- if (DATA_BOOST_TIME.equals(key) && this.level().isClientSide) { ++ /*if (DATA_BOOST_TIME.equals(key) && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.steering.onSynced(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.onSyncedDataUpdated(key); + } +@@ -193,9 +194,7 @@ public class Pig extends Animal implements ItemSteerable, Saddleable { + // Purpur end - Pigs give saddle back + + if (!isFood && this.isSaddled() && !this.isVehicle() && !player.isSecondaryUseActive()) { +- if (!this.level().isClientSide) { +- player.startRiding(this); +- } ++ player.startRiding(this); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java +index 026e64bf743aa79ba6409fa5cd4374b368f98caa..30792fb779104c87d2affbc8f24e3190ea25b070 100644 +--- a/net/minecraft/world/entity/animal/PolarBear.java ++++ b/net/minecraft/world/entity/animal/PolarBear.java +@@ -272,7 +272,7 @@ public class PolarBear extends Animal implements NeutralMob { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.clientSideStandAnimation != this.clientSideStandAnimationO) { + this.refreshDimensions(); + } +@@ -284,14 +284,13 @@ public class PolarBear extends Animal implements NeutralMob { + this.clientSideStandAnimation = Mth.clamp(this.clientSideStandAnimation - 1.0F, 0.0F, 6.0F); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.warningSoundTicks > 0) { + this.warningSoundTicks--; + } + +- if (!this.level().isClientSide) { +- this.updatePersistentAnger((ServerLevel)this.level(), true); +- } ++ this.updatePersistentAnger((ServerLevel) this.level(), true); // Plazma - Remove isClientSide on DedicatedServer + + // Purpur start - Ridables + if (isStanding() && --standTimer <= 0) { +diff --git a/net/minecraft/world/entity/animal/Pufferfish.java b/net/minecraft/world/entity/animal/Pufferfish.java +index 5889a9ceb54a354a79f33c9e4fc338cbf912ddda..83e176156124472b0dd571fd7624326d68b309f3 100644 +--- a/net/minecraft/world/entity/animal/Pufferfish.java ++++ b/net/minecraft/world/entity/animal/Pufferfish.java +@@ -126,7 +126,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.inflateCounter > 0) { + boolean increase = true; // Paper - Add PufferFishStateChangeEvent + if (this.getPuffState() == 0) { +diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java +index 02958fe7f39009a58b93e78f18c10308b8c2f815..41449917bc35fda39467405b751e802c86bc42b7 100644 +--- a/net/minecraft/world/entity/animal/Rabbit.java ++++ b/net/minecraft/world/entity/animal/Rabbit.java +@@ -223,9 +223,7 @@ public class Rabbit extends Animal implements VariantHolder { + } + } + +- if (!this.level().isClientSide) { +- this.level().broadcastEntityEvent(this, (byte)1); +- } ++ this.level().broadcastEntityEvent(this, (byte) 1); // Plazma - Remove isClientSide on DedicatedServer + } + + public float getJumpCompletion(float partialTick) { +diff --git a/net/minecraft/world/entity/animal/Sheep.java b/net/minecraft/world/entity/animal/Sheep.java +index c1760dda7b42471982e4ad78b6150b54a654ebf7..bf21e860c230f8f333ea978efb073dc019c43ad5 100644 +--- a/net/minecraft/world/entity/animal/Sheep.java ++++ b/net/minecraft/world/entity/animal/Sheep.java +@@ -155,9 +155,10 @@ public class Sheep extends Animal implements Shearable { + + @Override + public void aiStep() { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.eatAnimationTick = Math.max(0, this.eatAnimationTick - 1); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.aiStep(); + } +diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java +index 0a103e6f3f6b0ec05c5d22b1258eb6e2f776e7dd..3bb01bdb8dc8fe28954669c6ebe31f447c7ca9d4 100644 +--- a/net/minecraft/world/entity/animal/Squid.java ++++ b/net/minecraft/world/entity/animal/Squid.java +@@ -178,16 +178,17 @@ public class Squid extends AgeableWaterCreature { + this.oldTentacleAngle = this.tentacleAngle; + this.tentacleMovement = this.tentacleMovement + this.tentacleSpeed; + if (this.tentacleMovement > Math.PI * 2) { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.tentacleMovement = (float) (Math.PI * 2); + } else { ++ */ // Plazma - Remove isClientSide on DedicatedServer + 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 isClientSide on DedicatedServer + } + + if (this.isInWaterOrBubble()) { +@@ -221,7 +222,7 @@ public class Squid extends AgeableWaterCreature { + this.xBodyRot = this.xBodyRot + (-((float)Mth.atan2(d, deltaMovement.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) { // == true // Plazma - Remove isClientSide on DedicatedServer + double d1 = this.getDeltaMovement().y; + if (this.hasEffect(MobEffects.LEVITATION)) { + d1 = 0.05 * (this.getEffect(MobEffects.LEVITATION).getAmplifier() + 1); +@@ -230,7 +231,7 @@ public class Squid extends AgeableWaterCreature { + } + + this.setDeltaMovement(0.0, d1 * 0.98F, 0.0); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.xBodyRot = this.xBodyRot + (-90.0F - this.xBodyRot) * 0.02F; + } +diff --git a/net/minecraft/world/entity/animal/Wolf.java b/net/minecraft/world/entity/animal/Wolf.java +index ef6c0bf20ad18c050cdeb02ddd6c007dfcf1d6b3..1d92e421daefa6f8ea9f4768c96d303b5c9ed39f 100644 +--- a/net/minecraft/world/entity/animal/Wolf.java ++++ b/net/minecraft/world/entity/animal/Wolf.java +@@ -375,16 +375,14 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder getLikedPlayer(LivingEntity entity) { + Level level = entity.level(); +- if (!level.isClientSide() && level instanceof ServerLevel serverLevel) { ++ if (/*!level.isClientSide() &&*/ level instanceof ServerLevel serverLevel) { // == true // Plazma - Remove isClientSide on DedicatedServer + Optional memory = entity.getBrain().getMemory(MemoryModuleType.LIKED_PLAYER); + if (memory.isPresent()) { + if (serverLevel.getEntity(memory.get()) instanceof ServerPlayer serverPlayer +diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java +index 90bcd8c79cccbcbe7ff3fd2534e0c3450b970bd4..760f69b13e3f0fc4ea892c3310d5bb50cf0d99b4 100644 +--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java ++++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java +@@ -62,7 +62,7 @@ public class Armadillo extends Animal { + public final AnimationState rollUpAnimationState = new AnimationState(); + public final AnimationState peekAnimationState = new AnimationState(); + private int scuteTime; +- private boolean peekReceivedClient = false; ++ //private boolean peekReceivedClient = false; // Plazma - Remove isClientSide on DedicatedServer + + public Armadillo(EntityType entityType, Level level) { + super(entityType, level); +@@ -193,9 +193,10 @@ public class Armadillo extends Animal { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide()) { ++ /*if (this.level().isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.setupAnimationStates(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.isScared()) { + this.clampHeadRotationToBody(); +@@ -209,6 +210,7 @@ public class Armadillo extends Animal { + return this.isBaby() ? 0.6F : 1.0F; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void setupAnimationStates() { + switch (this.getState()) { + case IDLE: +@@ -242,7 +244,9 @@ public class Armadillo extends Animal { + this.peekAnimationState.stop(); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + ++ /* // Plazma - Remove isClientSide on DedicatedServer; Same w/ parent + @Override + public void handleEntityEvent(byte id) { + if (id == 64 && this.level().isClientSide) { +@@ -252,6 +256,7 @@ public class Armadillo extends Animal { + super.handleEntityEvent(id); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer; Same w/ parent + + @Override + public boolean isFood(ItemStack stack) { +diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java +index eb74d8313fd3cc15a33330fe7bafaca4f0a5a368..da98d3483ea3d81d84ff12e7726058fb6da437d0 100644 +--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java ++++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java +@@ -229,11 +229,13 @@ public class Axolotl extends Animal implements VariantHolder, B + this.handleAirSupply(airSupply); + } + +- if (this.level().isClientSide()) { ++ /*if (this.level().isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.tickAnimations(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void tickAnimations() { + Axolotl.AnimationState animationState; + if (this.isPlayingDead()) { +@@ -252,6 +254,7 @@ public class Axolotl extends Animal implements VariantHolder, B + boolean flag = this.walkAnimation.isMoving() || this.getXRot() != this.xRotO || this.getYRot() != this.yRotO; + this.movingAnimator.tick(flag); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + protected void handleAirSupply(int airSupply) { + if (this.isAlive() && !this.isInWaterRainOrBubble()) { +diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java +index 1d7ae2a08968860636918e7c66b60139a9d761b4..e2f0b2e4a87072d4f938933cd10f20b65a51c27c 100644 +--- a/net/minecraft/world/entity/animal/camel/Camel.java ++++ b/net/minecraft/world/entity/animal/camel/Camel.java +@@ -184,9 +184,10 @@ public class Camel extends AbstractHorse { + } + } + +- if (this.level().isClientSide()) { ++ /*if (this.level().isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.setupAnimationStates(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.refuseToMove()) { + this.clampHeadRotationToBody(); +@@ -197,6 +198,7 @@ public class Camel extends AbstractHorse { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void setupAnimationStates() { + if (this.idleAnimationTimeout <= 0) { + this.idleAnimationTimeout = this.random.nextInt(40) + 80; +@@ -222,6 +224,7 @@ public class Camel extends AbstractHorse { + this.sitUpAnimationState.animateWhen(this.isInPoseTransition() && this.getPoseTime() >= 0L, this.tickCount); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void updateWalkAnimation(float partialTick) { +@@ -428,9 +431,7 @@ public class Camel extends AbstractHorse { + boolean isBaby = this.isBaby(); + if (isBaby) { + this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 0.0, 0.0, 0.0); +- if (!this.level().isClientSide) { +- this.ageUp(10); +- } ++ this.ageUp(10); // Plazma - Remove isClientSide on DedicatedServer + } + + if (!flag && !flag1 && !isBaby) { +@@ -647,9 +648,7 @@ public class Camel extends AbstractHorse { + + @Override + public void openCustomInventoryScreen(Player player) { +- if (!this.level().isClientSide) { +- player.openHorseInventory(this, this.inventory); +- } ++ player.openHorseInventory(this, this.inventory); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java +index 143a740ce2e7f9d384b71b4d64e8b8218f60cba7..6ed4abd646f86961cbbb126d6637b4f333a8c8e0 100644 +--- a/net/minecraft/world/entity/animal/frog/Frog.java ++++ b/net/minecraft/world/entity/animal/frog/Frog.java +@@ -105,7 +105,7 @@ public class Frog extends Animal implements VariantHolder> { + public final AnimationState jumpAnimationState = new AnimationState(); + public final AnimationState croakAnimationState = new AnimationState(); + public final AnimationState tongueAnimationState = new AnimationState(); +- public final AnimationState swimIdleAnimationState = new AnimationState(); ++ //public final AnimationState swimIdleAnimationState = new AnimationState(); // Plazma - Remove isClientSide on DedicatedServer + private org.purpurmc.purpur.controller.MoveControllerWASD purpurLandController; // Purpur - Ridables + private org.purpurmc.purpur.controller.WaterMoveControllerWASD purpurWaterController; // Purpur - Ridables + +@@ -256,9 +256,10 @@ public class Frog extends Animal implements VariantHolder> { + + @Override + public void tick() { +- if (this.level().isClientSide()) { ++ /*if (this.level().isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.swimIdleAnimationState.animateWhen(this.isInWaterOrBubble() && !this.walkAnimation.isMoving(), this.tickCount); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.tick(); + } +diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java +index e888e606b4b14fa6485de7426bc146b6005962af..4dca4348a91e0c78ffab1b0ce540ebf4ecfe7d34 100644 +--- a/net/minecraft/world/entity/animal/frog/Tadpole.java ++++ b/net/minecraft/world/entity/animal/frog/Tadpole.java +@@ -152,7 +152,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 // == true // Plazma - Remove isClientSide on DedicatedServer + this.setAge(this.age + 1); + } + } +diff --git a/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/net/minecraft/world/entity/animal/horse/AbstractHorse.java +index 56dc7011ed07f0bd5870fbadde2b5c0c630c5edd..59fda709f797021e6fdd1dbd4368333aabf03f50 100644 +--- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java ++++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java +@@ -466,9 +466,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } + + protected void syncSaddleToClients() { +- if (!this.level().isClientSide) { +- this.setFlag(4, !this.inventory.getItem(0).isEmpty()); +- } ++ this.setFlag(4, !this.inventory.getItem(0).isEmpty()); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -571,7 +569,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + + @Override + public void openCustomInventoryScreen(Player player) { +- if (!this.level().isClientSide && (!this.isVehicle() || this.hasPassenger(player)) && this.isTamed()) { ++ if (/*!this.level().isClientSide &&*/ (!this.isVehicle() || this.hasPassenger(player)) && this.isTamed()) { // Plazma - Remove isClientSide on DedicatedServer + player.openHorseInventory(this, this.inventory); + } + } +@@ -582,7 +580,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + stack.consume(1, player); + } + +- return (InteractionResult)(!flag && !this.level().isClientSide ? InteractionResult.PASS : InteractionResult.SUCCESS_SERVER); ++ return !flag ? InteractionResult.PASS : InteractionResult.SUCCESS_SERVER; // Plazma - Remove isClientSide on DedicatedServer + } + + protected boolean handleEating(Player player, ItemStack stack) { +@@ -609,7 +607,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + f = 4.0F; + i = 60; + i1 = 5; +- if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) { ++ if (/*!this.level().isClientSide &&*/ this.isTamed() && this.getAge() == 0 && !this.isInLove()) { // == true // Plazma - Remove isClientSide on DedicatedServer + flag = true; + this.setInLove(player, stack.copy()); // Paper - Fix EntityBreedEvent copying + } +@@ -617,7 +615,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + f = 10.0F; + i = 240; + i1 = 10; +- if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) { ++ if (/*!this.level().isClientSide &&*/ this.isTamed() && this.getAge() == 0 && !this.isInLove()) { // == true // Plazma - Remove isClientSide on DedicatedServer + flag = true; + this.setInLove(player, stack.copy()); // Paper - Fix EntityBreedEvent copying + } +@@ -630,13 +628,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + + if (this.isBaby() && i > 0) { + this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 0.0, 0.0, 0.0); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.ageUp(i); + flag = true; +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + +- if (i1 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper() && !this.level().isClientSide) { ++ if (i1 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper() /*&& !this.level().isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.modifyTemper(i1); + flag = true; + } +@@ -652,11 +650,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + player.setYRot(this.getYRot()); + player.setXRot(this.getXRot()); + player.startRiding(this); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -835,10 +833,10 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } + + private void openMouth() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.mouthCounter = 1; + this.setFlag(64, true); +- } ++ //} + } + + public void setEating(boolean eating) { +diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java +index c21d558a6a3a61d6c54b8163f8cb4963846b2c26..78309b1d7c0df01899e5aff1289671be5c727a91 100644 +--- a/net/minecraft/world/entity/animal/horse/Llama.java ++++ b/net/minecraft/world/entity/animal/horse/Llama.java +@@ -272,18 +272,14 @@ public class Llama extends AbstractChestedHorse implements VariantHolder 0) { + this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 0.0, 0.0, 0.0); +- if (!this.level().isClientSide) { +- this.ageUp(i); +- } ++ this.ageUp(i); // Plazma - Remove isClientSide on DedicatedServer + + flag = true; + } + + if (i1 > 0 && (flag || !this.isTamed()) && this.getTemper() < this.getMaxTemper()) { + flag = true; +- if (!this.level().isClientSide) { +- this.modifyTemper(i1); +- } ++ this.modifyTemper(i1); // Plazma - Remove isClientSide on DedicatedServer + } + + if (flag && !this.isSilent()) { +diff --git a/net/minecraft/world/entity/animal/horse/TraderLlama.java b/net/minecraft/world/entity/animal/horse/TraderLlama.java +index 8faeb84f1c48b6a713867a1b95fed6402654fabb..10817a127199635d9d7d342588b5e3d9ece83d63 100644 +--- a/net/minecraft/world/entity/animal/horse/TraderLlama.java ++++ b/net/minecraft/world/entity/animal/horse/TraderLlama.java +@@ -139,9 +139,7 @@ public class TraderLlama extends Llama { + @Override + public void aiStep() { + super.aiStep(); +- if (!this.level().isClientSide) { +- this.maybeDespawn(); +- } ++ this.maybeDespawn(); // Plazma - Remove isClientSide on DedicatedServer + } + + private void maybeDespawn() { +diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java +index 11a5da22149a61ca48bbb0a8ed10b71e91a5cc98..58ab17819e54c5ac209882f49e22a6af7494fc66 100644 +--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java ++++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java +@@ -323,12 +323,14 @@ public class Sniffer extends Animal { + this.level().addParticle(new BlockParticleOption(ParticleTypes.BLOCK, blockState), vec3.x, vec3.y, vec3.z, 0.0, 0.0, 0.0); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (this.tickCount % 10 == 0) { + this.level() + .playLocalSound( + this.getX(), this.getY(), this.getZ(), blockState.getSoundType().getHitSound(), this.getSoundSource(), 0.5F, 0.5F, false + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -387,7 +389,7 @@ public class Sniffer extends Animal { + public void tick() { + switch (this.getState()) { + case SEARCHING: +- this.playSearchingSound(); ++ //this.playSearchingSound(); // Plazma - Remove isClientSide on DedicatedServer + break; + case DIGGING: + this.emitDiggingParticles(this.diggingAnimationState).dropSeed(); +@@ -413,11 +415,13 @@ public class Sniffer extends Animal { + this.level().playSound(null, this, SoundEvents.SNIFFER_EAT, SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F)); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void playSearchingSound() { + if (this.level().isClientSide() && this.tickCount % 20 == 0) { + this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.SNIFFER_SEARCHING, this.getSoundSource(), 1.0F, 1.0F, false); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void playStepSound(BlockPos pos, BlockState state) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +index b2a0ba6faa117ad781aaa3e6932482d4d9c8a789..2ba023bd7fede301fbe96e235fac73aecb46209f 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java ++++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +@@ -203,7 +203,7 @@ public class EnderDragon extends Mob implements Enemy { + + @Override + public void onFlap() { +- if (this.level().isClientSide && !this.isSilent()) { ++ /*if (this.level().isClientSide && !this.isSilent()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.level() + .playLocalSound( + this.getX(), +@@ -216,6 +216,7 @@ public class EnderDragon extends Mob implements Enemy { + false + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -258,7 +259,7 @@ public class EnderDragon extends Mob implements Enemy { + // Purpur end - Ridables + + this.processFlappingMovement(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { == false // Plazma - Remove isClientSide on DedicatedServer + this.setHealth(this.getHealth()); + if (!this.isSilent() && !this.phaseManager.getCurrentPhase().isSitting() && --this.growlTime < 0) { + this.level() +@@ -275,6 +276,7 @@ public class EnderDragon extends Mob implements Enemy { + this.growlTime = 200 + this.random.nextInt(200); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.dragonFight == null && this.level() instanceof ServerLevel serverLevel) { + EndDragonFight dragonFight = serverLevel.getDragonFight(); +@@ -365,12 +367,10 @@ public class EnderDragon extends Mob implements Enemy { + this.lerpSteps--; + } + +- this.phaseManager.getCurrentPhase().doClientTick(); ++ //this.phaseManager.getCurrentPhase().doClientTick(); // Plazma - Remove isClientSide on DedicatedServer + } + +- if (!this.level().isClientSide()) { +- this.applyEffectsFromBlocks(); +- } ++ this.applyEffectsFromBlocks(); // Plazma - Remove isClientSide on DedicatedServer + + this.yBodyRot = this.getYRot(); + Vec3[] vec3s = new Vec3[this.subEntities.length]; +@@ -1041,9 +1041,10 @@ public class EnderDragon extends Mob implements Enemy { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { +- if (DATA_PHASE.equals(key) && this.level().isClientSide) { ++ /*if (DATA_PHASE.equals(key) && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.phaseManager.setPhase(EnderDragonPhase.getById(this.getEntityData().get(DATA_PHASE))); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.onSyncedDataUpdated(key); + } +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java b/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java +index 7071554e60d290c6b96f473891e48768fcfa8391..22cc7950b86db13254d2afe6875195ca1ad49828 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java +@@ -21,9 +21,11 @@ public abstract class AbstractDragonPhaseInstance implements DragonPhaseInstance + return false; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void doClientTick() { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void doServerTick(ServerLevel level) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java +index 85e20366beb7c44c938aa1e9bc2a806ddfa173a0..a60fac78ea44e7f3d6dec1966c21c329dd4e2670 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java +@@ -18,6 +18,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance { + super(dragon); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void doClientTick() { + if (this.time++ % 10 == 0) { +@@ -29,6 +30,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance { + .addParticle(ParticleTypes.EXPLOSION_EMITTER, this.dragon.getX() + f, this.dragon.getY() + 2.0 + f1, this.dragon.getZ() + f2, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void doServerTick(ServerLevel level) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java +index 1ab3491a0be33ba9a0c2b4a09b766d94b106fbd5..00f2b117fb95899b287b45d5ad4beec8277cb79c 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java +@@ -17,6 +17,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance { + super(dragon); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void doClientTick() { + Vec3 vec3 = this.dragon.getHeadLookVector(1.0F).normalize(); +@@ -45,6 +46,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance { + vec3.yRot((float) (Math.PI / 16)); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void doServerTick(ServerLevel level) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java +index 93d2ca41c0bba01837436fd988ef3044dca4e80f..331e10a69bc39ad3217b146be7a5cd8b279b3708 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java +@@ -11,7 +11,7 @@ import net.minecraft.world.phys.Vec3; + public interface DragonPhaseInstance { + boolean isSitting(); + +- void doClientTick(); ++ //void doClientTick(); // Plazma - Remove isClientSide on DedicatedServer + + void doServerTick(ServerLevel level); + +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java +index 041428060b6ba1ff54a7cefc50199b9c427d6b5d..2e4d3cf71735bc02ae92d3ffe1d9fb060e4586d8 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java +@@ -12,6 +12,7 @@ public class DragonSittingAttackingPhase extends AbstractDragonSittingPhase { + super(dragon); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void doClientTick() { + this.dragon +@@ -27,6 +28,7 @@ public class DragonSittingAttackingPhase extends AbstractDragonSittingPhase { + false + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void doServerTick(ServerLevel level) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java +index c55fcb4a2e641cfd11b9751861a646142da417a2..8c89e88e1df9b4c5b48e4356133307f5f5007f28 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java +@@ -24,6 +24,7 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { + super(dragon); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void doClientTick() { + this.flameTicks++; +@@ -47,6 +48,7 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void doServerTick(ServerLevel level) { +diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java b/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java +index 720dbc5883cc7aaa336e5610209b8d693edb0ea6..effc1f28d872bab559b67d67d1ae0c47f264f309 100644 +--- a/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java ++++ b/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java +@@ -36,11 +36,9 @@ public class EnderDragonPhaseManager { + // CraftBukkit end + + this.currentPhase = this.getPhase((EnderDragonPhase)phase); +- if (!this.dragon.level().isClientSide) { +- this.dragon.getEntityData().set(EnderDragon.DATA_PHASE, phase.getId()); +- } ++ this.dragon.getEntityData().set(EnderDragon.DATA_PHASE, phase.getId()); // Plazma - Remove isClientSide on DedicatedServer + +- LOGGER.debug("Dragon is now in phase {} on the {}", phase, this.dragon.level().isClientSide ? "client" : "server"); ++ LOGGER.debug("Dragon is now in phase {} on the server", phase); // Plazma - Remove isClientSide on DedicatedServer + this.currentPhase.begin(); + } + } +diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java +index 2d9f64cddbec782de1775ec6da67b16203e3fd90..97b3114ae9273c622f610d2fdb79a5808a17ee89 100644 +--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java ++++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java +@@ -304,7 +304,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { + @Override + public void aiStep() { + Vec3 vec3 = this.getDeltaMovement().multiply(1.0, 0.6, 1.0); +- if (!this.level().isClientSide && this.getAlternativeTarget(0) > 0) { ++ if (/*!this.level().isClientSide &&*/ this.getAlternativeTarget(0) > 0) { // == true // Plazma - Remove isClientSide on DedicatedServer + Entity entity = this.level().getEntity(this.getAlternativeTarget(0)); + if (entity != null) { + double d = vec3.y; +diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java +index 8c0ab32487c56e2caf42404184f86c9bcf5f8b41..dc573f61abb52d02526a477add5399ac11667965 100644 +--- a/net/minecraft/world/entity/decoration/ArmorStand.java ++++ b/net/minecraft/world/entity/decoration/ArmorStand.java +@@ -333,8 +333,8 @@ public class ArmorStand extends LivingEntity { + return InteractionResult.PASS; + } else if (player.isSpectator()) { + return InteractionResult.SUCCESS; +- } else if (player.level().isClientSide) { +- return InteractionResult.SUCCESS_SERVER; ++ //} else if (player.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer ++ // return InteractionResult.SUCCESS_SERVER; // Plazma - Remove isClientSide on DedicatedServer + } else { + EquipmentSlot equipmentSlotForItem = this.getEquipmentSlotForItem(itemInHand); + if (itemInHand.isEmpty()) { +@@ -507,6 +507,7 @@ public class ArmorStand extends LivingEntity { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer; Same as parent + @Override + public void handleEntityEvent(byte id) { + if (id == 32) { +@@ -518,6 +519,7 @@ public class ArmorStand extends LivingEntity { + super.handleEntityEvent(id); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer; Same as parent + + @Override + public boolean shouldRenderAtSqrDistance(double distance) { +diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java +index 3ee1d8798db666ee8d83556047e40ff217cda732..2d4c749aa4b00c915ad61851f86a6251caacf2b5 100644 +--- a/net/minecraft/world/entity/decoration/ItemFrame.java ++++ b/net/minecraft/world/entity/decoration/ItemFrame.java +@@ -385,48 +385,46 @@ public class ItemFrame extends HangingEntity { + + @Override + public InteractionResult interact(Player player, InteractionHand hand) { +- ItemStack itemInHand = player.getItemInHand(hand); +- boolean flag = !this.getItem().isEmpty(); +- boolean flag1 = !itemInHand.isEmpty(); ++ // Plazma start - Remove isClientSide on DedicatedServer + if (this.fixed) { + return InteractionResult.PASS; +- } else if (!player.level().isClientSide) { +- if (!flag) { +- if (flag1 && !this.isRemoved()) { +- MapItemSavedData savedData = MapItem.getSavedData(itemInHand, this.level()); +- if (savedData != null && savedData.isTrackedCountOverLimit(256)) { +- return InteractionResult.FAIL; +- } else { +- // Paper start - Add PlayerItemFrameChangeEvent +- io.papermc.paper.event.player.PlayerItemFrameChangeEvent event = new io.papermc.paper.event.player.PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), itemInHand.asBukkitCopy(), io.papermc.paper.event.player.PlayerItemFrameChangeEvent.ItemFrameChangeAction.PLACE); +- if (!event.callEvent()) { +- return InteractionResult.FAIL; +- } +- this.setItem(ItemStack.fromBukkitCopy(event.getItemStack())); +- // Paper end - Add PlayerItemFrameChangeEvent +- this.gameEvent(GameEvent.BLOCK_CHANGE, player); +- itemInHand.consume(1, player); +- return InteractionResult.SUCCESS; +- } +- } else { +- return InteractionResult.PASS; +- } +- } else { +- // Paper start - Add PlayerItemFrameChangeEvent +- io.papermc.paper.event.player.PlayerItemFrameChangeEvent event = new io.papermc.paper.event.player.PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), this.getItem().asBukkitCopy(), io.papermc.paper.event.player.PlayerItemFrameChangeEvent.ItemFrameChangeAction.ROTATE); +- if (!event.callEvent()) { +- return InteractionResult.FAIL; +- } +- setItem(ItemStack.fromBukkitCopy(event.getItemStack()), false, false); +- // Paper end - Add PlayerItemFrameChangeEvent +- this.playSound(this.getRotateItemSound(), 1.0F, 1.0F); +- this.setRotation(this.getRotation() + 1); +- this.gameEvent(GameEvent.BLOCK_CHANGE, player); +- return InteractionResult.SUCCESS; ++ } ++ ++ if (!this.getItem().isEmpty()) { ++ // Paper start - Add PlayerItemFrameChangeEvent ++ io.papermc.paper.event.player.PlayerItemFrameChangeEvent event = new io.papermc.paper.event.player.PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), this.getItem().asBukkitCopy(), io.papermc.paper.event.player.PlayerItemFrameChangeEvent.ItemFrameChangeAction.ROTATE); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; + } +- } else { +- return (InteractionResult)(!flag && !flag1 ? InteractionResult.PASS : InteractionResult.SUCCESS); ++ setItem(ItemStack.fromBukkitCopy(event.getItemStack()), false, false); ++ // Paper end - Add PlayerItemFrameChangeEvent ++ this.playSound(this.getRotateItemSound(), 1.0F, 1.0F); ++ this.setRotation(this.getRotation() + 1); ++ this.gameEvent(GameEvent.BLOCK_CHANGE, player); ++ return InteractionResult.SUCCESS; ++ } ++ ++ final ItemStack itemInHand = player.getItemInHand(hand); ++ if (!itemInHand.isEmpty() && !this.isRemoved()) { ++ MapItemSavedData savedData = MapItem.getSavedData(itemInHand, this.level()); ++ if (savedData != null && savedData.isTrackedCountOverLimit(256)) { ++ return InteractionResult.FAIL; ++ } ++ ++ // Paper start - Add PlayerItemFrameChangeEvent ++ io.papermc.paper.event.player.PlayerItemFrameChangeEvent event = new io.papermc.paper.event.player.PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), itemInHand.asBukkitCopy(), io.papermc.paper.event.player.PlayerItemFrameChangeEvent.ItemFrameChangeAction.PLACE); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; ++ } ++ this.setItem(ItemStack.fromBukkitCopy(event.getItemStack())); ++ // Paper end - Add PlayerItemFrameChangeEvent ++ this.gameEvent(GameEvent.BLOCK_CHANGE, player); ++ itemInHand.consume(1, player); ++ return InteractionResult.SUCCESS; + } ++ ++ return InteractionResult.PASS; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + public SoundEvent getRotateItemSound() { +diff --git a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +index 258696853e9f3539cb44c86343fbec81f6a3e770..e254b8a7bdfcecf026cf5e63d49912677afcfdd7 100644 +--- a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java ++++ b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +@@ -70,75 +70,73 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity { + + @Override + public InteractionResult interact(Player player, InteractionHand hand) { +- if (this.level().isClientSide) { +- return InteractionResult.SUCCESS; +- } else { +- boolean flag = false; +- List list = LeadItem.leashableInArea(this.level(), this.getPos(), leashable2 -> { +- Entity leashHolder = leashable2.getLeashHolder(); +- return leashHolder == player || leashHolder == this; +- }); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ boolean flag = false; ++ List list = LeadItem.leashableInArea(this.level(), this.getPos(), leashable -> { ++ Entity leashHolder = leashable.getLeashHolder(); ++ return leashHolder == player || leashHolder == this; ++ }); ++ ++ for (Leashable leashable : list) { ++ if (leashable.getLeashHolder() != player) { ++ continue; ++ } + +- for (Leashable leashable : list) { +- if (leashable.getLeashHolder() == player) { +- // CraftBukkit start +- if (leashable instanceof Entity leashed) { +- if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerLeashEntityEvent(leashed, this, player, hand).isCancelled()) { +- ((net.minecraft.server.level.ServerPlayer) player).connection.send(new net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder())); +- flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities +- continue; +- } +- } +- // CraftBukkit end +- leashable.setLeashedTo(this, true); +- flag = true; ++ // CraftBukkit start ++ if (leashable instanceof Entity leashed) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerLeashEntityEvent(leashed, this, player, hand).isCancelled()) { ++ ((net.minecraft.server.level.ServerPlayer) player).connection.send(new net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder())); ++ flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities ++ continue; + } + } ++ // CraftBukkit end ++ leashable.setLeashedTo(this, true); ++ flag = true; ++ } + +- boolean flag1 = false; +- if (!flag) { +- // CraftBukkit start - Move below +- // this.discard(); +- boolean die = true; +- // CraftBukkit end +- if (true || player.getAbilities().instabuild) { // CraftBukkit - Process for non-creative as well +- for (Leashable leashable1 : list) { +- if (leashable1.isLeashed() && leashable1.getLeashHolder() == this) { +- // CraftBukkit start +- boolean dropLeash = !player.hasInfiniteMaterials(); +- if (leashable1 instanceof Entity leashed) { +- // Paper start - Expand EntityUnleashEvent +- org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(leashed, player, hand, dropLeash); +- dropLeash = event.isDropLeash(); +- if (event.isCancelled()) { +- // Paper end - Expand EntityUnleashEvent +- die = false; +- continue; +- } +- } +- if (!dropLeash) { // Paper - Expand EntityUnleashEvent +- leashable1.removeLeash(); +- } else { +- leashable1.dropLeash(); +- } +- // CraftBukkit end +- flag1 = true; +- } +- } +- // CraftBukkit start +- if (die) { +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause ++ boolean flag1 = false; ++ if (!flag) { ++ boolean die = true; // CraftBukkit - Move below ++ for (Leashable leashable : list) { ++ if (!leashable.isLeashed() || leashable.getLeashHolder() != this) { ++ continue; ++ } ++ ++ // CraftBukkit start ++ boolean dropLeash = !player.hasInfiniteMaterials(); ++ if (leashable instanceof Entity leashed) { ++ // Paper start - Expand EntityUnleashEvent ++ org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(leashed, player, hand, dropLeash); ++ dropLeash = event.isDropLeash(); ++ if (event.isCancelled()) { ++ // Paper end - Expand EntityUnleashEvent ++ die = false; ++ continue; + } +- // CraftBukkit end + } ++ if (!dropLeash) { // Paper - Expand EntityUnleashEvent ++ leashable.removeLeash(); ++ } else { ++ leashable.dropLeash(); ++ } ++ // CraftBukkit end ++ flag1 = true; + } + +- if (flag || flag1) { +- this.gameEvent(GameEvent.BLOCK_ATTACH, player); ++ // CraftBukkit start ++ if (die) { ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DROP); + } ++ // CraftBukkit end ++ } + +- return InteractionResult.SUCCESS; ++ if (flag || flag1) { ++ this.gameEvent(GameEvent.BLOCK_ATTACH, player); + } ++ ++ return InteractionResult.SUCCESS; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java +index 771b169fa360411bb313ae04c7dd55836875c611..ac4002f4771d2172fc3bbdc89b2c22e7cd23d28f 100644 +--- a/net/minecraft/world/entity/item/ItemEntity.java ++++ b/net/minecraft/world/entity/item/ItemEntity.java +@@ -141,7 +141,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + this.age++; + } + +- if (!this.level().isClientSide && this.age >= this.despawnRate) {// Paper - Alternative item-despawn-rate ++ if (/*!this.level().isClientSide &&*/ this.age >= this.despawnRate) { // Paper - Alternative item-despawn-rate // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start - fire ItemDespawnEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { + this.age = 0; +@@ -175,14 +175,15 @@ public class ItemEntity extends Entity implements TraceableEntity { + this.applyGravity(); + } + +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.noPhysics = false; + } else { ++ */ + this.noPhysics = !this.level().noCollision(this, this.getBoundingBox().deflate(1.0E-7)); + if (this.noPhysics) { + this.moveTowardsClosestSpace(this.getX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0, this.getZ()); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 1.0E-5F || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change; ActivationRange immunity + this.move(MoverType.SELF, this.getDeltaMovement()); +@@ -209,7 +210,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + || 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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.mergeWithNeighbours(); + } + +@@ -218,14 +219,15 @@ public class ItemEntity extends Entity implements TraceableEntity { + } + + this.hasImpulse = this.hasImpulse | this.updateInWaterStateAndDoFluidPushing(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + double d = this.getDeltaMovement().subtract(deltaMovement).lengthSqr(); + if (d > 0.01) { + this.hasImpulse = true; + } +- } ++ //} ++ ++ if (/*!this.level().isClientSide &&*/ this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate // == true // Plazma - Remove isClientSide on DedicatedServer + +- if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper - Alternative item-despawn-rate + // CraftBukkit start - fire ItemDespawnEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { + this.age = 0; +@@ -445,84 +447,85 @@ public class ItemEntity extends Entity implements TraceableEntity { + + @Override + public void playerTouch(Player entity) { +- if (!this.level().isClientSide) { +- ItemStack item = this.getItem(); +- Item item1 = item.getItem(); +- int count = item.getCount(); +- // CraftBukkit start - fire PlayerPickupItemEvent +- int canHold = entity.getInventory().canHold(item); +- int remaining = count - canHold; +- boolean flyAtPlayer = false; // Paper +- +- // Paper start - PlayerAttemptPickupItemEvent +- if (this.pickupDelay <= 0) { +- org.bukkit.event.player.PlayerAttemptPickupItemEvent attemptEvent = new org.bukkit.event.player.PlayerAttemptPickupItemEvent((org.bukkit.entity.Player) entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); +- this.level().getCraftServer().getPluginManager().callEvent(attemptEvent); +- +- flyAtPlayer = attemptEvent.getFlyAtPlayer(); +- if (attemptEvent.isCancelled()) { +- if (flyAtPlayer) { +- entity.take(this, count); +- } +- +- return; ++ // Plazma start - Remove isClientSide on DedicatedServer ++ ItemStack itemStack = this.getItem(); ++ Item itemEntity = itemStack.getItem(); ++ int count = itemStack.getCount(); ++ // CraftBukkit start - fire PlayerPickupItemEvent ++ int canHold = entity.getInventory().canHold(itemStack); ++ int remains = count - canHold; ++ boolean flyAtPlayer = false; // Paper ++ ++ // Paper start - PlayerAttemptPickupItemEvent ++ if (this.pickupDelay <= 0) { ++ org.bukkit.event.player.PlayerAttemptPickupItemEvent attemptEvent = new org.bukkit.event.player.PlayerAttemptPickupItemEvent((org.bukkit.entity.Player) entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remains); ++ this.level().getCraftServer().getPluginManager().callEvent(attemptEvent); ++ ++ flyAtPlayer = attemptEvent.getFlyAtPlayer(); ++ if (attemptEvent.isCancelled()) { ++ if (flyAtPlayer) { ++ entity.take(this, count); + } +- } + +- if (this.pickupDelay <= 0 && canHold > 0) { +- item.setCount(canHold); +- // Call legacy event +- org.bukkit.event.player.PlayerPickupItemEvent playerEvent = new org.bukkit.event.player.PlayerPickupItemEvent((org.bukkit.entity.Player) entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); +- playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); +- this.level().getCraftServer().getPluginManager().callEvent(playerEvent); +- flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper +- if (playerEvent.isCancelled()) { +- item.setCount(count); // SPIGOT-5294 - restore count +- // Paper start +- if (flyAtPlayer) { +- entity.take(this, count); +- } +- // Paper end +- return; +- } ++ return; ++ } ++ } + +- // Call newer event afterwards +- org.bukkit.event.entity.EntityPickupItemEvent entityEvent = new org.bukkit.event.entity.EntityPickupItemEvent(entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); +- entityEvent.setCancelled(!entityEvent.getEntity().getCanPickupItems()); +- this.level().getCraftServer().getPluginManager().callEvent(entityEvent); +- if (entityEvent.isCancelled()) { +- item.setCount(count); // SPIGOT-5294 - restore count +- return; ++ if (this.pickupDelay <= 0 && canHold > 0) { ++ itemStack.setCount(canHold); ++ // Call legacy event ++ org.bukkit.event.player.PlayerPickupItemEvent playerEvent = new org.bukkit.event.player.PlayerPickupItemEvent((org.bukkit.entity.Player) entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remains); ++ playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); ++ this.level().getCraftServer().getPluginManager().callEvent(playerEvent); ++ flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper ++ if (playerEvent.isCancelled()) { ++ itemStack.setCount(count); // SPIGOT-5294 - restore count ++ // Paper start ++ if (flyAtPlayer) { ++ entity.take(this, count); + } ++ // Paper end ++ return; ++ } + +- // Update the ItemStack if it was changed in the event +- ItemStack current = this.getItem(); +- if (!item.equals(current)) { +- item = current; +- } else { +- item.setCount(canHold + remaining); // = i +- } ++ // Call newer event afterwards ++ org.bukkit.event.entity.EntityPickupItemEvent entityEvent = new org.bukkit.event.entity.EntityPickupItemEvent(entity.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remains); ++ entityEvent.setCancelled(!entityEvent.getEntity().getCanPickupItems()); ++ this.level().getCraftServer().getPluginManager().callEvent(entityEvent); ++ if (entityEvent.isCancelled()) { ++ itemStack.setCount(count); // SPIGOT-5294 - restore count ++ return; ++ } + +- // Possibly < 0; fix here so we do not have to modify code below +- this.pickupDelay = 0; +- } else if (this.pickupDelay == 0) { +- // ensure that the code below isn't triggered if canHold says we can't pick the items up +- this.pickupDelay = -1; ++ // Update the ItemStack if it was changed in the event ++ ItemStack current = this.getItem(); ++ if (!itemStack.equals(current)) { ++ itemStack = current; ++ } else { ++ itemStack.setCount(canHold + remains); // = i + } +- // CraftBukkit end +- // Paper end - PlayerAttemptPickupItemEvent +- if (this.pickupDelay == 0 && (this.target == null || this.target.equals(entity.getUUID())) && entity.getInventory().add(item)) { +- if (flyAtPlayer) // Paper - PlayerPickupItemEvent +- entity.take(this, count); +- if (item.isEmpty()) { +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause +- item.setCount(count); +- } + +- entity.awardStat(Stats.ITEM_PICKED_UP.get(item1), count); +- entity.onItemPickup(this); ++ // Possibly < 0; fix here so we do not have to modify code below ++ this.pickupDelay = 0; ++ } else if (this.pickupDelay == 0) { ++ // ensure that the code below isn't triggered if canHold says we can't pick the items up ++ this.pickupDelay = -1; ++ } ++ // CraftBukkit end ++ ++ // Paper end - PlayerAttemptPickupItemEvent ++ if (this.pickupDelay == 0 && (this.target == null || this.target.equals(entity.getUUID())) && entity.getInventory().add(itemStack)) { ++ if (flyAtPlayer) // Paper - PlayerPickupItemEvent ++ entity.take(this, count); ++ if (itemStack.isEmpty()) { ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause ++ itemStack.setCount(count); + } ++ ++ entity.awardStat(Stats.ITEM_PICKED_UP.get(itemEntity), count); ++ entity.onItemPickup(this); + } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +@@ -540,7 +543,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + @Override + public Entity teleport(TeleportTransition teleportTransition) { + Entity entity = super.teleport(teleportTransition); +- if (!this.level().isClientSide && entity instanceof ItemEntity itemEntity) { ++ if (/*!this.level().isClientSide &&*/ entity instanceof ItemEntity itemEntity) { // == true // Plazma - Remove isClientSide on DedicatedServer + itemEntity.mergeWithNeighbours(); + } + +diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java +index 40f5534b425ef57c435b365f156d3b988b74f911..8b0325ea3ada24706b91ea9da80be72cb285348f 100644 +--- a/net/minecraft/world/entity/item/PrimedTnt.java ++++ b/net/minecraft/world/entity/item/PrimedTnt.java +@@ -118,17 +118,15 @@ public class PrimedTnt extends Entity implements TraceableEntity { + this.setFuse(i); + 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) { +- this.explode(); +- } ++ this.explode(); // Plazma - Remove isClientSide on DedicatedServer + this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause + // CraftBukkit end + } else { + this.updateInWaterStateAndDoFluidPushing(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5, this.getZ(), 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + // Paper start - Option to prevent TNT from moving in water + if (!this.isRemoved() && this.wasTouchingWater && this.level().paperConfig().fixes.preventTntFromMovingInWater) { +diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java +index 223739818e9ac6c9fe396b82bce53a3ab029610a..161df7620ae19144e35c33d2561472ccf469292c 100644 +--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java ++++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java +@@ -151,22 +151,26 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + } + + public void reassessWeaponGoal() { +- if (this.level() != null && !this.level().isClientSide) { +- this.goalSelector.removeGoal(this.meleeGoal); +- this.goalSelector.removeGoal(this.bowGoal); +- ItemStack itemInHand = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)); +- if (itemInHand.is(Items.BOW)) { +- int hardAttackInterval = this.getHardAttackInterval(); +- if (this.level().getDifficulty() != Difficulty.HARD) { +- hardAttackInterval = this.getAttackInterval(); +- } +- +- this.bowGoal.setMinAttackInterval(hardAttackInterval); +- this.goalSelector.addGoal(4, this.bowGoal); +- } else { +- this.goalSelector.addGoal(4, this.meleeGoal); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (this.level() == null) { ++ return; ++ } ++ ++ this.goalSelector.removeGoal(this.meleeGoal); ++ this.goalSelector.removeGoal(this.bowGoal); ++ ItemStack itemInHand = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)); ++ if (itemInHand.is(Items.BOW)) { ++ int hardAttackInterval = this.getHardAttackInterval(); ++ if (this.level().getDifficulty() != Difficulty.HARD) { ++ hardAttackInterval = this.getAttackInterval(); + } ++ ++ this.bowGoal.setMinAttackInterval(hardAttackInterval); ++ this.goalSelector.addGoal(4, this.bowGoal); ++ } else { ++ this.goalSelector.addGoal(4, this.meleeGoal); + } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + protected int getHardAttackInterval() { +@@ -240,9 +244,7 @@ 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) { +- this.reassessWeaponGoal(); +- } ++ this.reassessWeaponGoal(); // Plazma - Remove isClientSide on DedicatedServer + } + + public boolean isShaking() { +diff --git a/net/minecraft/world/entity/monster/Blaze.java b/net/minecraft/world/entity/monster/Blaze.java +index 79f5f0dbf95ed72dd031495c75675d7b6c7dfc34..b6833e0f3334c2c17679f88862e2f8ea039570c6 100644 +--- a/net/minecraft/world/entity/monster/Blaze.java ++++ b/net/minecraft/world/entity/monster/Blaze.java +@@ -139,7 +139,7 @@ public class Blaze extends Monster { + this.setDeltaMovement(this.getDeltaMovement().multiply(1.0, 0.6, 1.0)); + } + +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.random.nextInt(24) == 0 && !this.isSilent()) { + this.level() + .playLocalSound( +@@ -158,6 +158,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 isClientSide on DedicatedServer + + super.aiStep(); + } +diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java +index a85b64799faa860367cded67a264b436cd46f049..ec71ceb0be8eaa98070298537581b9dbb68e5ef1 100644 +--- a/net/minecraft/world/entity/monster/Creeper.java ++++ b/net/minecraft/world/entity/monster/Creeper.java +@@ -346,7 +346,7 @@ public class Creeper extends Monster { + SoundEvent soundEvent = itemInHand.is(Items.FIRE_CHARGE) ? SoundEvents.FIRECHARGE_USE : SoundEvents.FLINTANDSTEEL_USE; + this.level() + .playSound(player, this.getX(), this.getY(), this.getZ(), soundEvent, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.entityIgniter = player; // CraftBukkit + this.ignite(); + if (itemInHand.getMaxDamage() == 0) { // CraftBukkit - fix MC-264285: unbreakable flint and steels are completely consumed when igniting a creeper +@@ -354,7 +354,7 @@ public class Creeper extends Monster { + } else { + itemInHand.hurtAndBreak(1, player, getSlotForHand(hand)); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java +index 6c73245b8d04f194e72165aa0000ca79a95db59d..dd94aad3d7f6489c9bdf25106904f9f64490279f 100644 +--- a/net/minecraft/world/entity/monster/Drowned.java ++++ b/net/minecraft/world/entity/monster/Drowned.java +@@ -295,7 +295,7 @@ public class Drowned extends Zombie implements RangedAttackMob { + + @Override + public void updateSwimming() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.isEffectiveAi() && this.isUnderWater() && this.wantsToSwim()) { + this.navigation = this.waterNavigation; + this.setSwimming(true); +@@ -303,7 +303,7 @@ public class Drowned extends Zombie implements RangedAttackMob { + this.navigation = this.groundNavigation; + this.setSwimming(false); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java +index 78b1619afa2062638fbfe21b9978f634be1aaf62..e0fafc539905ae57771aad5e4716f9ea349a7fcc 100644 +--- a/net/minecraft/world/entity/monster/EnderMan.java ++++ b/net/minecraft/world/entity/monster/EnderMan.java +@@ -78,7 +78,7 @@ public class EnderMan extends Monster implements NeutralMob { + ); + private static final EntityDataAccessor DATA_CREEPY = SynchedEntityData.defineId(EnderMan.class, EntityDataSerializers.BOOLEAN); + private static final EntityDataAccessor DATA_STARED_AT = SynchedEntityData.defineId(EnderMan.class, EntityDataSerializers.BOOLEAN); +- private int lastStareSound = Integer.MIN_VALUE; ++ //private int lastStareSound = Integer.MIN_VALUE; // Plazma - Remove isClientSide on DedicatedServer + private int targetChangeTime; + private static final UniformInt PERSISTENT_ANGER_TIME = TimeUtil.rangeOfSeconds(20, 39); + private int remainingPersistentAngerTime; +@@ -218,6 +218,7 @@ public class EnderMan extends Monster implements NeutralMob { + return this.persistentAngerTarget; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void playStareSound() { + if (this.tickCount >= this.lastStareSound + 400) { + this.lastStareSound = this.tickCount; +@@ -226,12 +227,14 @@ public class EnderMan extends Monster implements NeutralMob { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { +- if (DATA_CREEPY.equals(key) && this.hasBeenStaredAt() && this.level().isClientSide) { ++ /*if (DATA_CREEPY.equals(key) && this.hasBeenStaredAt() && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.playStareSound(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.onSyncedDataUpdated(key); + } +@@ -276,7 +279,7 @@ public class EnderMan extends Monster implements NeutralMob { + + @Override + public void aiStep() { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + for (int i = 0; i < 2; i++) { + this.level() + .addParticle( +@@ -290,11 +293,10 @@ public class EnderMan extends Monster implements NeutralMob { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + this.jumping = false; +- if (!this.level().isClientSide) { +- this.updatePersistentAnger((ServerLevel)this.level(), true); +- } ++ this.updatePersistentAnger((ServerLevel) this.level(), true); // Plazma - Remove isClientSide on DedicatedServer + + super.aiStep(); + } +@@ -320,7 +322,7 @@ public class EnderMan extends Monster implements NeutralMob { + } + + public boolean teleport() { +- if (!this.level().isClientSide() && this.isAlive()) { ++ if (/*!this.level().isClientSide() &&*/ this.isAlive()) { // == true // Plazma - Remove isClientSide on DedicatedServer + double d = this.getX() + (this.random.nextDouble() - 0.5) * 64.0; + double d1 = this.getY() + (this.random.nextInt(64) - 32); + double d2 = this.getZ() + (this.random.nextDouble() - 0.5) * 64.0; +diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java +index 441f7d3cfa1e9896a065dae51d871901ac4330e3..fa393790f0bde1e262ddaacb8189a76cc82961eb 100644 +--- a/net/minecraft/world/entity/monster/Endermite.java ++++ b/net/minecraft/world/entity/monster/Endermite.java +@@ -156,7 +156,7 @@ public class Endermite extends Monster { + @Override + public void aiStep() { + super.aiStep(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + for (int i = 0; i < 2; i++) { + this.level() + .addParticle( +@@ -170,6 +170,7 @@ public class Endermite extends Monster { + ); + } + } else { ++ */ // Plazma - Remove isClientSide on DedicatedServer + if (!this.isPersistenceRequired()) { + this.life++; + } +@@ -177,7 +178,7 @@ public class Endermite extends Monster { + if (this.life >= 2400) { + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public static boolean checkEndermiteSpawnRules( +diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java +index 60278b2491f644b70ef96b2e14e1f07bb341a0f1..19711de5930f89a382d0cb255321b4b65a7a6a00 100644 +--- a/net/minecraft/world/entity/monster/Guardian.java ++++ b/net/minecraft/world/entity/monster/Guardian.java +@@ -169,7 +169,7 @@ public class Guardian extends Monster { + public LivingEntity getActiveAttackTarget() { + if (!this.hasActiveAttackTarget()) { + return null; +- } else if (this.level().isClientSide) { ++ /*} else if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.clientSideCachedAttackTarget != null) { + return this.clientSideCachedAttackTarget; + } else { +@@ -181,6 +181,7 @@ public class Guardian extends Monster { + return null; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } else { + return this.getTarget(); + } +@@ -228,7 +229,7 @@ public class Guardian extends Monster { + @Override + public void aiStep() { + if (this.isAlive()) { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.clientSideTailAnimationO = this.clientSideTailAnimation; + if (!this.isInWater()) { + this.clientSideTailAnimationSpeed = 2.0F; +@@ -310,6 +311,7 @@ public class Guardian extends Monster { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.isInWaterOrBubble()) { + this.setAirSupply(300); +diff --git a/net/minecraft/world/entity/monster/Illusioner.java b/net/minecraft/world/entity/monster/Illusioner.java +index 9686658b90e886d6236f553d7406771814d18672..4d152a658685c5932d8a71a9bc7ea5ff5bb9911e 100644 +--- a/net/minecraft/world/entity/monster/Illusioner.java ++++ b/net/minecraft/world/entity/monster/Illusioner.java +@@ -133,7 +133,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { + @Override + public void aiStep() { + super.aiStep(); +- if (this.level().isClientSide && this.isInvisible()) { ++ /*if (this.level().isClientSide && this.isInvisible()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.clientSideIllusionTicks--; + if (this.clientSideIllusionTicks < 0) { + this.clientSideIllusionTicks = 0; +@@ -166,6 +166,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java +index 3c105d164acd9e45de2335ef28ddecf3fa48d267..4d9df6b535a4d8e18c39a5cee89edbabbc31787e 100644 +--- a/net/minecraft/world/entity/monster/Phantom.java ++++ b/net/minecraft/world/entity/monster/Phantom.java +@@ -251,7 +251,7 @@ public class Phantom extends FlyingMob implements Enemy { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + float cos = Mth.cos((this.getUniqueFlapTickOffset() + this.tickCount) * 7.448451F * (float) (Math.PI / 180.0) + (float) Math.PI); + float cos1 = Mth.cos((this.getUniqueFlapTickOffset() + this.tickCount + 1) * 7.448451F * (float) (Math.PI / 180.0) + (float) Math.PI); + if (cos > 0.0F && cos1 <= 0.0F) { +@@ -275,6 +275,7 @@ public class Phantom extends FlyingMob implements Enemy { + this.level().addParticle(ParticleTypes.MYCELIUM, this.getX() + f1, this.getY() + f3, this.getZ() + f2, 0.0, 0.0, 0.0); + this.level().addParticle(ParticleTypes.MYCELIUM, this.getX() - f1, this.getY() + f3, this.getZ() - f2, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java +index a006300aea2cbb05400550f1c79e872d095384f8..96dab8d04133355b0ead526aa99a73c5783eedb7 100644 +--- a/net/minecraft/world/entity/monster/Shulker.java ++++ b/net/minecraft/world/entity/monster/Shulker.java +@@ -78,9 +78,9 @@ public class Shulker extends AbstractGolem implements VariantHolder entityType, Level level) { +@@ -226,7 +226,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 0) { + this.clientSideTeleportInterpolation--; + } else { + this.clientOldAttachPosition = null; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + private void findNewAttachment() { +@@ -320,10 +321,11 @@ public class Shulker extends AbstractGolem implements VariantHolder 0) { +@@ -627,6 +634,7 @@ public class Shulker extends AbstractGolem implements VariantHolder 1 && this.isDeadOrDying()) { ++ if (/*!this.level().isClientSide &&*/ size > 1 && this.isDeadOrDying()) { // == true // Plazma - Remove isClientSide on DedicatedServer + float width = this.getDimensions(this.getPose()).width(); + float f = width / 2.0F; + int i = size / 2; +diff --git a/net/minecraft/world/entity/monster/SpellcasterIllager.java b/net/minecraft/world/entity/monster/SpellcasterIllager.java +index 44fdd3fc23ca820e45329ade655756bce0296cce..eab773f8934cdf1a3f16bae27fc0f35b17f8c78a 100644 +--- a/net/minecraft/world/entity/monster/SpellcasterIllager.java ++++ b/net/minecraft/world/entity/monster/SpellcasterIllager.java +@@ -55,7 +55,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + } + + public boolean isCastingSpell() { +- return this.level().isClientSide ? this.entityData.get(DATA_SPELL_CASTING_ID) > 0 : this.spellCastingTickCount > 0; ++ return this.spellCastingTickCount > 0; // Plazma - Remove isClientSide on DedicatedServer + } + + public void setIsCastingSpell(SpellcasterIllager.IllagerSpell currentSpell) { +@@ -64,7 +64,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + } + + public SpellcasterIllager.IllagerSpell getCurrentSpell() { +- return !this.level().isClientSide ? this.currentSpell : SpellcasterIllager.IllagerSpell.byId(this.entityData.get(DATA_SPELL_CASTING_ID)); ++ return this.currentSpell; // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -78,7 +78,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide && this.isCastingSpell()) { ++ /*if (this.level().isClientSide && this.isCastingSpell()) { // == false // Plazma - Remove isClientSide on DedicatedServer + SpellcasterIllager.IllagerSpell currentSpell = this.getCurrentSpell(); + float f = (float)currentSpell.spellColor[0]; + float f1 = (float)currentSpell.spellColor[1]; +@@ -109,6 +109,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { + 0.0 + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + protected int getSpellCastingTime() { +diff --git a/net/minecraft/world/entity/monster/Spider.java b/net/minecraft/world/entity/monster/Spider.java +index ece8d81e29709a1c0cb5c7b55b1193b630ecb113..9a0704c0cbb65d74bbbf0945e0391fdf90a749ea 100644 +--- a/net/minecraft/world/entity/monster/Spider.java ++++ b/net/minecraft/world/entity/monster/Spider.java +@@ -119,9 +119,9 @@ public class Spider extends Monster { + @Override + public void tick() { + super.tick(); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setClimbing(this.horizontalCollision && (this.level().paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !(io.papermc.paper.FeatureHooks.isSpiderCollidingWithWorldBorder(this) && 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 isClientSide on DedicatedServer + } + + public static AttributeSupplier.Builder createAttributes() { +diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java +index 241526239bdbd5d9276f85e7fca46a7051f46a25..c21d482887976700471a4d303cc0efdcba2df2b5 100644 +--- a/net/minecraft/world/entity/monster/Strider.java ++++ b/net/minecraft/world/entity/monster/Strider.java +@@ -147,9 +147,10 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { +- if (DATA_BOOST_TIME.equals(key) && this.level().isClientSide) { ++ /*if (DATA_BOOST_TIME.equals(key) && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.steering.onSynced(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.onSyncedDataUpdated(key); + } +@@ -468,9 +469,7 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { + // Purpur end + + if (!isFood && this.isSaddled() && !this.isVehicle() && !player.isSecondaryUseActive()) { +- if (!this.level().isClientSide) { +- player.startRiding(this); +- } ++ player.startRiding(this); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/entity/monster/Witch.java b/net/minecraft/world/entity/monster/Witch.java +index e4353c64732067198f082cdd266c1f1ee1fe4f4e..b3fdce396c07f0fb97bb13317255808938e1706e 100644 +--- a/net/minecraft/world/entity/monster/Witch.java ++++ b/net/minecraft/world/entity/monster/Witch.java +@@ -149,7 +149,7 @@ public class Witch extends Raider implements RangedAttackMob { + + @Override + public void aiStep() { +- if (!this.level().isClientSide && this.isAlive()) { ++ if (/*!this.level().isClientSide &&*/ this.isAlive()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.healRaidersGoal.decrementCooldown(); + if (this.healRaidersGoal.getCooldown() <= 0) { + this.attackPlayersGoal.setCanAttack(true); +diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java +index d2a67f3e1c971f737e58567dae23fa70e9d942ea..67a6b23ee305cec3e373f543daa72d67508b21e4 100644 +--- a/net/minecraft/world/entity/monster/Zoglin.java ++++ b/net/minecraft/world/entity/monster/Zoglin.java +@@ -298,7 +298,7 @@ public class Zoglin extends Monster implements HoglinBase { + @Override + public void setBaby(boolean childZombie) { + this.getEntityData().set(DATA_BABY_ID, childZombie); +- if (!this.level().isClientSide && childZombie) { ++ if (/*!this.level().isClientSide &&*/ childZombie) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(0.5); + } + } +@@ -334,11 +334,7 @@ public class Zoglin extends Monster implements HoglinBase { + + @Override + protected SoundEvent getAmbientSound() { +- if (this.level().isClientSide) { +- return null; +- } else { +- return this.brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET) ? SoundEvents.ZOGLIN_ANGRY : SoundEvents.ZOGLIN_AMBIENT; +- } ++ return this.brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET) ? SoundEvents.ZOGLIN_ANGRY : SoundEvents.ZOGLIN_AMBIENT; // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java +index 7af71c777dca26cd94b1807a2a77ea0d30e92976..3b63e76b1b459e9f237b0a19d013ac6061b3ca0b 100644 +--- a/net/minecraft/world/entity/monster/Zombie.java ++++ b/net/minecraft/world/entity/monster/Zombie.java +@@ -251,7 +251,7 @@ public class Zombie extends Monster { + @Override + public void setBaby(boolean childZombie) { + this.getEntityData().set(DATA_BABY_ID, childZombie); +- if (this.level() != null && !this.level().isClientSide) { ++ if (this.level() != null /*&& !this.level().isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED); + attribute.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable + if (childZombie) { +@@ -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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.isUnderWaterConverting()) { + this.conversionTime--; + if (this.conversionTime < 0) { +diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java +index 1ca0514732916d325c4a76d73120aaf613c3f780..9e63fce67882419cd5587cedd44c2c6596c5f1f8 100644 +--- a/net/minecraft/world/entity/monster/ZombieVillager.java ++++ b/net/minecraft/world/entity/monster/ZombieVillager.java +@@ -200,7 +200,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + int conversionProgress = this.getConversionProgress(); + this.villagerConversionTime -= conversionProgress; + if (this.villagerConversionTime <= 0) { +@@ -218,9 +218,9 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + if (itemInHand.is(Items.GOLDEN_APPLE)) { + if (this.hasEffect(MobEffects.WEAKNESS) && level().purpurConfig.zombieVillagerCureEnabled) { // Purpur - Add option to disable zombie villagers cure + itemInHand.consume(1, player); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur - Customizable Zombie Villager curing times +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS_SERVER; + } else { +@@ -262,6 +262,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + if (broadcastEntityEvent) this.level().broadcastEntityEvent(this, (byte)16); // Paper - missing entity behaviour api - converting without entity event + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void handleEntityEvent(byte id) { + if (id == 16) { +@@ -282,6 +283,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + super.handleEntityEvent(id); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + private void finishConversion(ServerLevel serverLevel) { + Villager converted = this.convertTo( // CraftBukkit +diff --git a/net/minecraft/world/entity/monster/breeze/Breeze.java b/net/minecraft/world/entity/monster/breeze/Breeze.java +index 23dff1d01387ce89b020aa93de99e6ef557c04e3..ec93f1f402aa66134f658fc542fd0d309f70739b 100644 +--- a/net/minecraft/world/entity/monster/breeze/Breeze.java ++++ b/net/minecraft/world/entity/monster/breeze/Breeze.java +@@ -89,6 +89,7 @@ public class Breeze extends Monster { + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (this.level().isClientSide() && DATA_POSE.equals(key)) { + this.resetAnimations(); + Pose pose = this.getPose(); +@@ -103,16 +104,19 @@ public class Breeze extends Monster { + this.slide.startIfStopped(this.tickCount); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.onSyncedDataUpdated(key); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void resetAnimations() { + this.shoot.stop(); + this.idle.stop(); + this.inhale.stop(); + this.longJump.stop(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void tick() { +@@ -138,9 +142,11 @@ public class Breeze extends Monster { + } + + this.soundTick = this.soundTick == 0 ? this.random.nextIntBetweenInclusive(1, 80) : this.soundTick - 1; ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (this.soundTick == 0) { + this.playWhirlSound(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.tick(); + } +@@ -175,6 +181,7 @@ public class Breeze extends Monster { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void playAmbientSound() { + if (this.getTarget() == null || !this.onGround()) { +@@ -187,6 +194,7 @@ public class Breeze extends Monster { + float f1 = 0.8F + 0.2F * this.random.nextFloat(); + this.level().playLocalSound(this, SoundEvents.BREEZE_WHIRL, this.getSoundSource(), f1, f); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public ProjectileDeflection deflection(Projectile projectile) { +diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java +index d39d95cc8ba82cf5d7bebcda6497aa42018cb19d..9975699ea5f79200b324b04d500551fcebd07a8d 100644 +--- a/net/minecraft/world/entity/monster/creaking/Creaking.java ++++ b/net/minecraft/world/entity/monster/creaking/Creaking.java +@@ -71,12 +71,12 @@ public class Creaking extends Monster { + public static final int TWITCH_DEATH_DURATION = 45; + private static final int MAX_PLAYER_STUCK_COUNTER = 4; + private int attackAnimationRemainingTicks; +- public final AnimationState attackAnimationState = new AnimationState(); +- public final AnimationState invulnerabilityAnimationState = new AnimationState(); +- public final AnimationState deathAnimationState = new AnimationState(); ++ //public final AnimationState attackAnimationState = new AnimationState(); // Plazma - Remove isClientSide on DedicatedServer ++ //public final AnimationState invulnerabilityAnimationState = new AnimationState(); // Plazma - Remove isClientSide on DedicatedServer ++ //public final AnimationState deathAnimationState = new AnimationState(); // Plazma - Remove isClientSide on DedicatedServer + private int invulnerabilityAnimationRemainingTicks; +- private boolean eyesGlowing; +- private int nextFlickerTime; ++ //private boolean eyesGlowing; // Plazma - Remove isClientSide on DedicatedServer ++ //private int nextFlickerTime; // Plazma - Remove isClientSide on DedicatedServer + private int playerStuckCounter; + + public Creaking(EntityType entityType, Level level) { +@@ -251,7 +251,7 @@ public class Creaking extends Monster { + this.attackAnimationRemainingTicks--; + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean flag = this.entityData.get(CAN_MOVE); + boolean flag1 = this.checkCanMove(); + if (flag1 != flag) { +@@ -265,14 +265,14 @@ public class Creaking extends Monster { + } + + this.entityData.set(CAN_MOVE, flag1); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + super.aiStep(); + } + + @Override + public void tick() { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos homePos = this.getHomePos(); + if (homePos != null) { + boolean flag = this.level().getBlockEntity(homePos) instanceof CreakingHeartBlockEntity creakingHeartBlockEntity +@@ -281,20 +281,21 @@ public class Creaking extends Monster { + this.setHealth(0.0F); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + super.tick(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.setupAnimationStates(); + this.checkEyeBlink(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override + protected void tickDeath() { + if (this.isHeartBound() && this.isTearingDown()) { + this.deathTime++; +- if (!this.level().isClientSide() && this.deathTime > 45 && !this.isRemoved()) { ++ if (/*!this.level().isClientSide() &&*/ this.deathTime > 45 && !this.isRemoved()) { // Plazma - Remove isClientSide on DedicatedServer + this.tearDown(); + } + } else { +@@ -308,11 +309,13 @@ public class Creaking extends Monster { + this.walkAnimation.update(min, 0.4F, 1.0F); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void setupAnimationStates() { + this.attackAnimationState.animateWhen(this.attackAnimationRemainingTicks > 0, this.tickCount); + this.invulnerabilityAnimationState.animateWhen(this.invulnerabilityAnimationRemainingTicks > 0, this.tickCount); + this.deathAnimationState.animateWhen(this.isTearingDown(), this.tickCount); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void tearDown() { + if (this.level() instanceof ServerLevel serverLevel) { +@@ -461,6 +464,7 @@ public class Creaking extends Monster { + return this.entityData.get(IS_TEARING_DOWN); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public boolean hasGlowingEyes() { + return this.eyesGlowing; + } +@@ -472,6 +476,7 @@ public class Creaking extends Monster { + this.eyesGlowing = !this.eyesGlowing; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void playAttackSound() { +diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java +index 28f3bc31b4c093e426ae141edeee61a12a444ba1..f80fd583531a7ee2147503fd04fef48802c2a3e5 100644 +--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java ++++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java +@@ -396,7 +396,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { + + @Override + protected SoundEvent getAmbientSound() { +- return this.level().isClientSide ? null : HoglinAi.getSoundForCurrentActivity(this).orElse(null); ++ return HoglinAi.getSoundForCurrentActivity(this).orElse(null); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java +index f0d78cf5fe2c39add9a673471103c352cce72a45..83e07ccc72788271c9a6f06ad40a55b4dea727d7 100644 +--- a/net/minecraft/world/entity/monster/piglin/Piglin.java ++++ b/net/minecraft/world/entity/monster/piglin/Piglin.java +@@ -358,13 +358,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + @Override + public void setBaby(boolean childZombie) { + this.getEntityData().set(DATA_BABY_ID, childZombie); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED); + attribute.removeModifier(SPEED_MODIFIER_BABY.id()); + if (childZombie) { + attribute.addTransientModifier(SPEED_MODIFIER_BABY); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -530,7 +530,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + + @Override + protected SoundEvent getAmbientSound() { +- return this.level().isClientSide ? null : PiglinAi.getSoundForCurrentActivity(this).orElse(null); ++ return PiglinAi.getSoundForCurrentActivity(this).orElse(null); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java +index f968e5c99bdb23b268bc34ea1ba5d54ae9ad0ff9..a4311f887b3df9065070a2d6f3da532ec36dcd8d 100644 +--- a/net/minecraft/world/entity/monster/warden/Warden.java ++++ b/net/minecraft/world/entity/monster/warden/Warden.java +@@ -101,10 +101,10 @@ public class Warden extends Monster implements VibrationSystem { + private static final float DIGGING_PARTICLES_DURATION = 4.5F; + private static final float DIGGING_PARTICLES_OFFSET = 0.7F; + private static final int PROJECTILE_ANGER_DISTANCE = 30; +- private int tendrilAnimation; +- private int tendrilAnimationO; +- private int heartAnimation; +- private int heartAnimationO; ++ //private int tendrilAnimation; // Plazma - Remove isClientSide on DedicatedServer ++ //private int tendrilAnimationO; // Plazma - Remove isClientSide on DedicatedServer ++ //private int heartAnimation; // Plazma - Remove isClientSide on DedicatedServer ++ //private int heartAnimationO; // Plazma - Remove isClientSide on DedicatedServer + public AnimationState roarAnimationState = new AnimationState(); + public AnimationState sniffAnimationState = new AnimationState(); + public AnimationState emergeAnimationState = new AnimationState(); +@@ -257,9 +257,11 @@ public class Warden extends Monster implements VibrationSystem { + builder.define(CLIENT_ANGER_LEVEL, 0); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public int getClientAngerLevel() { + return this.entityData.get(CLIENT_ANGER_LEVEL); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + private void syncClientAngerLevel() { + this.entityData.set(CLIENT_ANGER_LEVEL, this.getActiveAnger()); +@@ -275,7 +277,7 @@ public class Warden extends Monster implements VibrationSystem { + } + + super.tick(); +- if (this.level().isClientSide()) { ++ /*if (this.level().isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.tickCount % this.getHeartBeatDelay() == 0) { + this.heartAnimation = 10; + if (!this.isSilent()) { +@@ -304,6 +306,7 @@ public class Warden extends Monster implements VibrationSystem { + this.clientDiggingParticles(this.diggingAnimationState); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -331,7 +334,7 @@ public class Warden extends Monster implements VibrationSystem { + this.roarAnimationState.stop(); + this.attackAnimationState.start(this.tickCount); + } else if (id == 61) { +- this.tendrilAnimation = 10; ++ //this.tendrilAnimation = 10; // Plazma - Remove isClientSide on DedicatedServer + } else if (id == 62) { + this.sonicBoomAnimationState.start(this.tickCount); + } else { +@@ -339,6 +342,7 @@ public class Warden extends Monster implements VibrationSystem { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private int getHeartBeatDelay() { + float f = (float)this.getClientAngerLevel() / AngerLevel.ANGRY.getMinimumAnger(); + return 40 - Mth.floor(Mth.clamp(f, 0.0F, 1.0F) * 30.0F); +@@ -366,6 +370,7 @@ public class Warden extends Monster implements VibrationSystem { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void onSyncedDataUpdated(EntityDataAccessor key) { +diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java +index b4e79cac5611942240ce85120f7bbee329ae2fb8..48da80cdb4a4063a24e69703d3f439f2bbeb2e17 100644 +--- a/net/minecraft/world/entity/npc/AbstractVillager.java ++++ b/net/minecraft/world/entity/npc/AbstractVillager.java +@@ -123,16 +123,17 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa + + @Override + public MerchantOffers getOffers() { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + throw new IllegalStateException("Cannot load Villager offers on the client"); + } else { ++ */ // Plazma - Remove isClientSide on DedicatedServer + if (this.offers == null) { + this.offers = new MerchantOffers(); + this.updateTrades(); + } + + return this.offers; +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -175,7 +176,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.ambientSoundTime = -this.getAmbientSoundInterval(); + this.makeSound(this.getTradeUpdatedSound(!stack.isEmpty())); + } +@@ -197,12 +198,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa + @Override + public void addAdditionalSaveData(CompoundTag compound) { + super.addAdditionalSaveData(compound); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + MerchantOffers offers = this.getOffers(); + if (!offers.isEmpty()) { + compound.put("Offers", MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), offers).getOrThrow()); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.writeInventoryToTag(compound, this.registryAccess()); + } +@@ -297,10 +298,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa + return this.getPosition(partialTicks).add(vec3.yRot(-f)); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return this.level().isClientSide; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public boolean stillValid(Player player) { +diff --git a/net/minecraft/world/entity/npc/ClientSideMerchant.java b/net/minecraft/world/entity/npc/ClientSideMerchant.java +index 70048626e9b911568ad0eb6294482cac3ded474f..e0d841db9b4d22b4e078336bd88e186fd88e0b11 100644 +--- a/net/minecraft/world/entity/npc/ClientSideMerchant.java ++++ b/net/minecraft/world/entity/npc/ClientSideMerchant.java +@@ -46,10 +46,12 @@ public class ClientSideMerchant implements Merchant { + public void notifyTradeUpdated(ItemStack stack) { + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return this.source.level().isClientSide; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public boolean stillValid(Player player) { +diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java +index 16fbe4e6521cd4f6baa8f5dd590da0fc749f6585..a488abb5035cda96605945c96bc53a4718263326 100644 +--- a/net/minecraft/world/entity/npc/Villager.java ++++ b/net/minecraft/world/entity/npc/Villager.java +@@ -463,7 +463,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + this.setUnhappy(); + return tryRide(player, hand, InteractionResult.SUCCESS); // Purpur - Ridables + } else { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean isEmpty = this.getOffers().isEmpty(); + if (hand == InteractionHand.MAIN_HAND) { + if (isEmpty) { +@@ -481,7 +481,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + + if (this.level().purpurConfig.villagerAllowTrading) // Purpur - Add config for villager trading + this.startTrading(player); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -489,9 +489,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + + public void setUnhappy() { + this.setUnhappyCounter(40); +- if (!this.level().isClientSide()) { +- this.makeSound(SoundEvents.VILLAGER_NO); +- } ++ this.makeSound(SoundEvents.VILLAGER_NO); // Plazma - Remove isClientSide on DedicatedServer + } + + private void startTrading(Player player) { +@@ -516,11 +514,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + } + + private void resetSpecialPrices() { +- if (!this.level().isClientSide()) { +- for (MerchantOffer merchantOffer : this.getOffers()) { +- merchantOffer.resetSpecialPriceDiff(); +- } +- } ++ for (MerchantOffer merchantOffer : this.getOffers()) merchantOffer.resetSpecialPriceDiff(); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java +index c3fbcc7956a64d49466874776f257ba27f55f2a4..6171c150179672bda59d5db5cdca111bff9cc1d7 100644 +--- a/net/minecraft/world/entity/npc/WanderingTrader.java ++++ b/net/minecraft/world/entity/npc/WanderingTrader.java +@@ -181,7 +181,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.getOffers().isEmpty()) { + return tryRide(player, hand, InteractionResult.CONSUME); // Purpur - Ridables + } +@@ -191,7 +191,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill + this.setTradingPlayer(player); + this.openTradingScreen(player, this.getDisplayName(), 1); + } // Purpur - Add config for villager trading +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +@@ -311,9 +311,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill + @Override + public void aiStep() { + super.aiStep(); +- if (!this.level().isClientSide) { +- this.maybeDespawn(); +- } ++ this.maybeDespawn(); // Plazma - Remove isClientSide on DedicatedServer + } + + private void maybeDespawn() { +diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java +index 3aab8856b07389a8d7a06a9f66f21771a3f2d122..65d32d3392ac30800c1963b682f220917a8e490b 100644 +--- a/net/minecraft/world/entity/player/Player.java ++++ b/net/minecraft/world/entity/player/Player.java +@@ -238,7 +238,7 @@ public abstract class Player extends LivingEntity { + super(EntityType.PLAYER, level); + this.setUUID(gameProfile.getId()); + this.gameProfile = gameProfile; +- this.inventoryMenu = new InventoryMenu(this.inventory, !level.isClientSide, this); ++ this.inventoryMenu = new InventoryMenu(this.inventory, this); // Plazma - Remove isClientSide on DedicatedServer + this.containerMenu = this.inventoryMenu; + this.moveTo(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, yRot, 0.0F); + this.rotOffs = 180.0F; +@@ -313,7 +313,7 @@ public abstract class Player extends LivingEntity { + this.sleepCounter = 100; + } + +- if (!this.level().isClientSide && this.level().isDay()) { ++ if (/*!this.level().isClientSide &&*/ this.level().isDay()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.stopSleepInBed(false, true); + } + } else if (this.sleepCounter > 0) { +@@ -325,7 +325,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)) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason + this.containerMenu = this.inventoryMenu; + } +@@ -592,7 +592,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.stopRiding(); + // CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return + if (!this.isPassenger()) { +@@ -664,7 +664,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Add option to make parrots stay + this.removeEntitiesOnShoulder(); + } +@@ -719,10 +719,10 @@ public abstract class Player extends LivingEntity { + this.autoSpinAttackTicks = ticks; + this.autoSpinAttackDmg = damage; + this.autoSpinAttackItemStack = itemStack; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.removeEntitiesOnShoulder(); + this.setLivingEntityFlag(4, true); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Nonnull +@@ -807,9 +807,10 @@ public abstract class Player extends LivingEntity { + @Nullable + public ItemEntity drop(ItemStack droppedItem, boolean dropAround, boolean includeThrowerName, boolean callEvent, @Nullable java.util.function.Consumer entityOperation) { + // CraftBukkit end +- if (!droppedItem.isEmpty() && this.level().isClientSide) { ++ /*if (!droppedItem.isEmpty() && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.swing(InteractionHand.MAIN_HAND); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + return null; + } +@@ -1037,9 +1038,7 @@ public abstract class Player extends LivingEntity { + @Override + protected void hurtCurrentlyUsedShield(float damage) { + if (this.useItem.is(Items.SHIELD)) { +- if (!this.level().isClientSide) { +- this.awardStat(Stats.ITEM_USED.get(this.useItem.getItem())); +- } ++ this.awardStat(Stats.ITEM_USED.get(this.useItem.getItem())); // Plazma - Remove isClientSide on DedicatedServer + + if (damage >= 3.0F) { + int i = 1 + Mth.floor(damage); +@@ -1446,7 +1445,7 @@ public abstract class Player extends LivingEntity { + EnchantmentHelper.doPostAttackEffects(serverLevel1, target, damageSource); + } + +- if (!this.level().isClientSide && !weaponItem.isEmpty() && entity instanceof LivingEntity) { ++ if (/*!this.level().isClientSide &&*/ !weaponItem.isEmpty() && entity instanceof LivingEntity) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (flag5) { + weaponItem.postHurtEnemy((LivingEntity)entity, this); + } +@@ -1881,14 +1880,14 @@ public abstract class Player extends LivingEntity { + public void causeFoodExhaustion(float exhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason reason) { + // CraftBukkit end + if (!this.abilities.invulnerable) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + org.bukkit.event.entity.EntityExhaustionEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerExhaustionEvent(this, reason, exhaustion); + if (!event.isCancelled()) { + this.foodData.addExhaustion(event.getExhaustion()); + } + // CraftBukkit end +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -2085,7 +2084,7 @@ public abstract class Player extends LivingEntity { + @Nullable + private Entity respawnEntityOnShoulder0(CompoundTag entityCompound) { // CraftBukkit void->boolean + // Paper end - release entity api - return entity - overload +- if (!this.level().isClientSide && !entityCompound.isEmpty()) { ++ if (/*!this.level().isClientSide &&*/ !entityCompound.isEmpty()) { // == true // Plazma - Remove isClientSide on DedicatedServer + return EntityType.create(entityCompound, this.level(), EntitySpawnReason.LOAD).map((entity) -> { // CraftBukkit + if (entity instanceof TamableAnimal) { + ((TamableAnimal)entity).setOwnerUUID(this.uuid); +diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java +index 7bca1cd398f6406f2b9d284dd4fbc9ef14136e77..29bb4ac1562b9c67bc08f10cb83299ec450a594e 100644 +--- a/net/minecraft/world/entity/projectile/AbstractArrow.java ++++ b/net/minecraft/world/entity/projectile/AbstractArrow.java +@@ -204,13 +204,13 @@ public abstract class AbstractArrow extends Projectile { + } + + if (this.isInGround() && flag) { +- if (!this.level().isClientSide()) { ++ //if (!this.level().isClientSide()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.lastState != blockState && this.shouldFall()) { + this.startFalling(); + } else { + this.tickDespawn(); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.inGroundTime++; + if (this.isAlive()) { +@@ -461,7 +461,7 @@ public abstract class AbstractArrow extends Projectile { + } + + if (entity instanceof LivingEntity livingEntity1) { +- if (!this.level().isClientSide && this.getPierceLevel() <= 0) { ++ if (/*!this.level().isClientSide &&*/ this.getPierceLevel() <= 0) { // == true // Plazma - Remove isClientSide on DedicatedServer + livingEntity1.setArrowCount(livingEntity1.getArrowCount() + 1); + } + +@@ -479,7 +479,7 @@ public abstract class AbstractArrow extends Projectile { + this.piercedAndKilledEntities.add(livingEntity1); + } + +- if (!this.level().isClientSide && owner instanceof ServerPlayer serverPlayer) { ++ if (/*!this.level().isClientSide &&*/ owner instanceof ServerPlayer serverPlayer) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.piercedAndKilledEntities != null) { + CriteriaTriggers.KILLED_BY_ARROW.trigger(serverPlayer, this.piercedAndKilledEntities, this.firedFromWeapon); + } else if (!entity.isAlive()) { +@@ -669,7 +669,7 @@ public abstract class AbstractArrow extends Projectile { + + @Override + public void playerTouch(Player entity) { +- if (!this.level().isClientSide && (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) { ++ if (/*!this.level().isClientSide &&*/ (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + ItemStack itemstack = this.getPickupItem(); + if (this.pickup == Pickup.ALLOWED && !itemstack.isEmpty() && entity.getInventory().canHold(itemstack) > 0) { +@@ -782,7 +782,7 @@ public abstract class AbstractArrow extends Projectile { + } + + public boolean isNoPhysics() { +- return !this.level().isClientSide ? this.noPhysics : (this.entityData.get(ID_FLAGS) & 2) != 0; ++ return this.noPhysics; // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +index 9a99b813de8b606fab26c87086a21372e5172ba3..906897e68537c712af21ecac871208adc566fc6e 100644 +--- a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java ++++ b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +@@ -67,7 +67,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { + public void tick() { + Entity owner = this.getOwner(); + this.applyInertia(); +- if (this.level().isClientSide || (owner == null || !owner.isRemoved()) && this.level().hasChunkAt(this.blockPosition())) { ++ if (/*this.level().isClientSide ||*/ (owner == null || !owner.isRemoved()) && this.level().hasChunkAt(this.blockPosition())) { // == false // Plazma - Remove isClientSide on DedicatedServer + HitResult hitResultOnMoveVector = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType()); + Vec3 location; + if (hitResultOnMoveVector.getType() != HitResult.Type.MISS) { +diff --git a/net/minecraft/world/entity/projectile/Arrow.java b/net/minecraft/world/entity/projectile/Arrow.java +index 56574f8ef879159edc0114da09300143a2c79a35..c4b0935f38166894a90df20385103e4fc802c34a 100644 +--- a/net/minecraft/world/entity/projectile/Arrow.java ++++ b/net/minecraft/world/entity/projectile/Arrow.java +@@ -79,7 +79,7 @@ public class Arrow extends AbstractArrow { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.isInGround()) { + if (this.inGroundTime % 5 == 0) { + this.makeParticle(1); +@@ -87,7 +87,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 isClientSide on DedicatedServer + this.level().broadcastEntityEvent(this, (byte)0); + this.setPickupItemStack(new ItemStack(Items.ARROW)); + } +diff --git a/net/minecraft/world/entity/projectile/DragonFireball.java b/net/minecraft/world/entity/projectile/DragonFireball.java +index 963cdb34214cf4bfcbdb8fbdc9b98221c884f581..b15bcd1417677c6e8d2780a913bae7e3aa10deef 100644 +--- a/net/minecraft/world/entity/projectile/DragonFireball.java ++++ b/net/minecraft/world/entity/projectile/DragonFireball.java +@@ -28,37 +28,43 @@ public class DragonFireball extends AbstractHurtingProjectile { + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (result.getType() != HitResult.Type.ENTITY || !this.ownedBy(((EntityHitResult)result).getEntity())) { +- if (!this.level().isClientSide) { +- List entitiesOfClass = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(4.0, 2.0, 4.0)); +- AreaEffectCloud areaEffectCloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ()); +- Entity owner = this.getOwner(); +- if (owner instanceof LivingEntity) { +- areaEffectCloud.setOwner((LivingEntity)owner); +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (result.getType() == HitResult.Type.ENTITY && this.ownedBy(((EntityHitResult) result).getEntity())) { ++ return; ++ } ++ ++ final List entitiesOfClass = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(4.0, 2.0, 4.0)); ++ final AreaEffectCloud areaEffectCloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ()); ++ ++ if (this.getOwner() instanceof LivingEntity owner) { ++ areaEffectCloud.setOwner(owner); ++ } + +- areaEffectCloud.setParticle(ParticleTypes.DRAGON_BREATH); +- areaEffectCloud.setRadius(3.0F); +- areaEffectCloud.setDuration(600); +- areaEffectCloud.setRadiusPerTick((7.0F - areaEffectCloud.getRadius()) / areaEffectCloud.getDuration()); +- areaEffectCloud.addEffect(new MobEffectInstance(MobEffects.HARM, 1, 1)); +- if (!entitiesOfClass.isEmpty()) { +- for (LivingEntity livingEntity : entitiesOfClass) { +- double d = this.distanceToSqr(livingEntity); +- if (d < 16.0) { +- areaEffectCloud.setPos(livingEntity.getX(), livingEntity.getY(), livingEntity.getZ()); +- break; +- } +- } ++ areaEffectCloud.setParticle(ParticleTypes.DRAGON_BREATH); ++ areaEffectCloud.setRadius(3.0F); ++ areaEffectCloud.setDuration(600); ++ areaEffectCloud.setRadiusPerTick((7.0F - areaEffectCloud.getRadius()) / areaEffectCloud.getDuration()); ++ areaEffectCloud.addEffect(new MobEffectInstance(MobEffects.HARM, 1, 1)); ++ if (!entitiesOfClass.isEmpty()) { ++ for (LivingEntity livingEntity : entitiesOfClass) { ++ if (this.distanceToSqr(livingEntity) >= 16.0) { ++ continue; + } + +- if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), entitiesOfClass.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events +- this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); +- this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper - use correct spawn reason +- } else areaEffectCloud.discard(null); // Paper - EnderDragon Events +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause ++ areaEffectCloud.setPos(livingEntity.getX(), livingEntity.getY(), livingEntity.getZ()); ++ break; + } + } ++ ++ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), entitiesOfClass.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events ++ this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); ++ this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper - use correct spawn reason ++ } else { ++ areaEffectCloud.discard(null); // Paper - EnderDragon Events ++ } ++ ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/EvokerFangs.java b/net/minecraft/world/entity/projectile/EvokerFangs.java +index f9c10584808183677fccebe7e1244b98d7236df4..d22c19d8b0c38ac3c27dd336dc48021ef21b5586 100644 +--- a/net/minecraft/world/entity/projectile/EvokerFangs.java ++++ b/net/minecraft/world/entity/projectile/EvokerFangs.java +@@ -22,7 +22,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { + public int warmupDelayTicks; + private boolean sentSpikeEvent; + private int lifeTicks = 22; +- private boolean clientSideAttackStarted; ++ //private boolean clientSideAttackStarted; // Plazma - Remove isClientSide on DedicatedServer + @Nullable + private LivingEntity owner; + @Nullable +@@ -81,7 +81,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.clientSideAttackStarted) { + this.lifeTicks--; + if (this.lifeTicks == 14) { +@@ -96,7 +96,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { + } + } + } +- } else if (--this.warmupDelayTicks < 0) { ++ } else*/ if (--this.warmupDelayTicks < 0) { // Plazma - Remove isClientSide on DedicatedServer + if (this.warmupDelayTicks == -8) { + for (LivingEntity livingEntity : this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox().inflate(0.2, 0.0, 0.2))) { + this.dealDamageTo(livingEntity); +@@ -135,6 +135,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { + @Override + public void handleEntityEvent(byte id) { + super.handleEntityEvent(id); ++ /* // Plazma - Remove isClientSide on DedicatedServer + if (id == 4) { + this.clientSideAttackStarted = true; + if (!this.isSilent()) { +@@ -151,8 +152,10 @@ public class EvokerFangs extends Entity implements TraceableEntity { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public float getAnimationProgress(float partialTicks) { + if (!this.clientSideAttackStarted) { + return 0.0F; +@@ -161,6 +164,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { + return i <= 0 ? 1.0F : 1.0F - (i - partialTicks) / 20.0F; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { +diff --git a/net/minecraft/world/entity/projectile/EyeOfEnder.java b/net/minecraft/world/entity/projectile/EyeOfEnder.java +index 01a9bad80a30a7879a69b800258b616b4d986108..68017b41d92900344c296ab980abaa369908cdee 100644 +--- a/net/minecraft/world/entity/projectile/EyeOfEnder.java ++++ b/net/minecraft/world/entity/projectile/EyeOfEnder.java +@@ -119,7 +119,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + double d3 = deltaMovement.horizontalDistance(); + this.setXRot(Projectile.lerpRotation(this.xRotO, (float)(Mth.atan2(deltaMovement.y, d3) * 180.0F / (float)Math.PI))); + this.setYRot(Projectile.lerpRotation(this.yRotO, (float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * 180.0F / (float)Math.PI))); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // Plazma - Remove isClientSide on DedicatedServer + double d4 = this.tx - d; + double d5 = this.tz - d2; + float f = (float)Math.sqrt(d4 * d4 + d5 * d5); +@@ -134,7 +134,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + int i = this.getY() < this.ty ? 1 : -1; + deltaMovement = new Vec3(Math.cos(f1) * d6, d7 + (i - d7) * 0.015F, Math.sin(f1) * d6); + this.setDeltaMovement(deltaMovement); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + float f2 = 0.25F; + if (this.isInWater()) { +@@ -163,10 +163,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + ); + } + +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.setPos(d, d1, d2); + this.life++; +- if (this.life > 80 && !this.level().isClientSide) { ++ if (this.life > 80 /*&& !this.level().isClientSide*/) { // Plazma - Why checking twice :sob: + this.playSound(SoundEvents.ENDER_EYE_DEATH, 1.0F, 1.0F); + this.discard(this.surviveAfterDeath ? org.bukkit.event.entity.EntityRemoveEvent.Cause.DROP : org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause + if (this.surviveAfterDeath) { +@@ -175,9 +175,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + this.level().levelEvent(2003, this.blockPosition(), 0); + } + } ++ /* // Plazma - Remove isClientSide on DedicatedServer + } else { + this.setPosRaw(d, d1, d2); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +index 774ca9e0b56fd175ae246051de762d0c4256ca58..aa661609d0633947c07ad65186c2eb546c3ffea1 100644 +--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java ++++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +@@ -184,7 +184,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { + } + + this.life++; +- if (this.level().isClientSide && this.life % 2 < 2) { ++ /*if (this.level().isClientSide && this.life % 2 < 2) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.level() + .addParticle( + ParticleTypes.FIREWORK, +@@ -196,6 +196,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { + this.random.nextGaussian() * 0.05 + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + if (this.life > this.lifetime && this.level() instanceof ServerLevel serverLevel) { + // CraftBukkit start +@@ -291,10 +292,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { + + @Override + public void handleEntityEvent(byte id) { +- if (id == 17 && this.level().isClientSide) { ++ /*if (id == 17 && this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + Vec3 deltaMovement = this.getDeltaMovement(); + this.level().createFireworks(this.getX(), this.getY(), this.getZ(), deltaMovement.x, deltaMovement.y, deltaMovement.z, this.getExplosions()); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.handleEntityEvent(id); + } +diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java +index 1e012c7ef699a64ff3f1b00f897bb893ab25ecbd..8612a08d9c522496910a5514c5818b0f1b6ba725 100644 +--- a/net/minecraft/world/entity/projectile/FishingHook.java ++++ b/net/minecraft/world/entity/projectile/FishingHook.java +@@ -164,7 +164,7 @@ public class FishingHook extends Projectile { + Player playerOwner = this.getPlayerOwner(); + if (playerOwner == null) { + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause +- } else if (this.level().isClientSide || !this.shouldStopFishing(playerOwner)) { ++ } else if (/*this.level().isClientSide ||*/ !this.shouldStopFishing(playerOwner)) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (this.onGround()) { + this.life++; + if (this.life >= 1200) { +@@ -233,9 +233,7 @@ public class FishingHook extends Projectile { + ); + } + +- if (!this.level().isClientSide) { +- this.catchingFish(blockPos); +- } ++ this.catchingFish(blockPos); // Plazma - Remove isClientSide on DedicatedServer + } else { + this.outOfWaterTime = Math.min(10, this.outOfWaterTime + 1); + } +@@ -285,9 +283,7 @@ public class FishingHook extends Projectile { + @Override + protected void onHitEntity(EntityHitResult result) { + super.onHitEntity(result); +- if (!this.level().isClientSide) { +- this.setHookedEntity(result.getEntity()); +- } ++ this.setHookedEntity(result.getEntity()); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -500,7 +496,7 @@ public class FishingHook extends Projectile { + public int retrieve(net.minecraft.world.InteractionHand hand, ItemStack stack) { + // Paper end - Add hand parameter to PlayerFishEvent + Player playerOwner = this.getPlayerOwner(); +- if (!this.level().isClientSide && playerOwner != null && !this.shouldStopFishing(playerOwner)) { ++ if (/*!this.level().isClientSide &&*/ playerOwner != null && !this.shouldStopFishing(playerOwner)) { // == true // Plazma - Remove isClientSide on DedicatedServer + int i = 0; + if (this.hookedIn != null) { + // CraftBukkit start +@@ -594,9 +590,10 @@ public class FishingHook extends Projectile { + + @Override + public void handleEntityEvent(byte id) { +- if (id == 31 && this.level().isClientSide && this.hookedIn instanceof Player && ((Player)this.hookedIn).isLocalPlayer()) { ++ /*if (id == 31 && this.level().isClientSide && this.hookedIn instanceof Player && ((Player)this.hookedIn).isLocalPlayer()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.pullEntity(this.hookedIn); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + super.handleEntityEvent(id); + } +diff --git a/net/minecraft/world/entity/projectile/LlamaSpit.java b/net/minecraft/world/entity/projectile/LlamaSpit.java +index bc102b049047d6e2a1d29e10f92cdf5ae2c140bd..24f8f3ac556042f96f62ccc3806854972e62ea79 100644 +--- a/net/minecraft/world/entity/projectile/LlamaSpit.java ++++ b/net/minecraft/world/entity/projectile/LlamaSpit.java +@@ -81,9 +81,7 @@ public class LlamaSpit extends Projectile { + @Override + protected void onHitBlock(BlockHitResult result) { + super.onHitBlock(result); +- if (!this.level().isClientSide) { +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java +index 843f1396a6567672e5e8002d7e48fb18cf39d5de..ff3f6a1b26a0c4192f93f77a34f5d234b4165155 100644 +--- a/net/minecraft/world/entity/projectile/Projectile.java ++++ b/net/minecraft/world/entity/projectile/Projectile.java +@@ -345,7 +345,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { + + public boolean deflect(ProjectileDeflection deflection, @Nullable Entity entity, @Nullable Entity owner, boolean deflectedByPlayer) { + deflection.deflect(this, entity, this.random); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - Fix PickupStatus getting reset + if (this instanceof AbstractArrow arrow) { + arrow.setOwner(owner, false); +@@ -354,7 +354,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { + } + // Paper end - Fix PickupStatus getting reset + this.onDeflection(entity, deflectedByPlayer); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return true; + } +diff --git a/net/minecraft/world/entity/projectile/ShulkerBullet.java b/net/minecraft/world/entity/projectile/ShulkerBullet.java +index 45ccfa92fe06a3f5041dac1ddd5550e5a89d8d80..34e788a02e77cacaeae6d54e43eadd6aa1a539f0 100644 +--- a/net/minecraft/world/entity/projectile/ShulkerBullet.java ++++ b/net/minecraft/world/entity/projectile/ShulkerBullet.java +@@ -214,7 +214,7 @@ public class ShulkerBullet extends Projectile { + public void tick() { + super.tick(); + HitResult hitResult = null; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.finalTarget == null && this.targetId != null) { + this.finalTarget = ((ServerLevel)this.level()).getEntity(this.targetId); + if (this.finalTarget == null) { +@@ -237,7 +237,7 @@ public class ShulkerBullet extends Projectile { + } + + hitResult = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + Vec3 deltaMovement = this.getDeltaMovement(); + this.setPos(this.position().add(deltaMovement)); +@@ -251,12 +251,12 @@ public class ShulkerBullet extends Projectile { + } + + ProjectileUtil.rotateTowardsMovement(this, 0.5F); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.level() + .addParticle( + ParticleTypes.END_ROD, this.getX() - deltaMovement.x, this.getY() - deltaMovement.y + 0.15, this.getZ() - deltaMovement.z, 0.0, 0.0, 0.0 + ); +- } else if (this.finalTarget != null && !this.finalTarget.isRemoved()) { ++ } else*/ if (this.finalTarget != null && !this.finalTarget.isRemoved()) { // Plazma - Remove isClientSide on DedicatedServer + if (this.flightSteps > 0) { + this.flightSteps--; + if (this.flightSteps == 0) { +diff --git a/net/minecraft/world/entity/projectile/SmallFireball.java b/net/minecraft/world/entity/projectile/SmallFireball.java +index 808aa5dcb27c87b6ba5c1eee639486067447e370..503858fd3acc567b6cc67dc0fa677ebe319afa73 100644 +--- a/net/minecraft/world/entity/projectile/SmallFireball.java ++++ b/net/minecraft/world/entity/projectile/SmallFireball.java +@@ -75,8 +75,6 @@ public class SmallFireball extends Fireball { + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (!this.level().isClientSide) { +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java +index 1d399532c67c213c95c06837b0c7855384f1a25c..39abd487819ffe14c487004affd3a82ab8d85377 100644 +--- a/net/minecraft/world/entity/projectile/Snowball.java ++++ b/net/minecraft/world/entity/projectile/Snowball.java +@@ -61,7 +61,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + net.minecraft.core.BlockPos pos = blockHitResult.getBlockPos(); + net.minecraft.core.BlockPos relativePos = pos.relative(blockHitResult.getDirection()); + +@@ -82,16 +82,16 @@ public class Snowball extends ThrowableItemProjectile { + this.level().setBlockAndUpdate(pos, blockState.setValue(net.minecraft.world.level.block.CampfireBlock.LIT, false)); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + // Purpur end - options to extinguish fire blocks with snowballs + + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.level().broadcastEntityEvent(this, (byte)3); + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/entity/projectile/SpectralArrow.java b/net/minecraft/world/entity/projectile/SpectralArrow.java +index eec6760dc1ffd3bca3cb3ad31fc1b1ff3b9875bb..e71582c25a156e63fbf61cbf1c2f406d043e51f2 100644 +--- a/net/minecraft/world/entity/projectile/SpectralArrow.java ++++ b/net/minecraft/world/entity/projectile/SpectralArrow.java +@@ -29,9 +29,10 @@ public class SpectralArrow extends AbstractArrow { + @Override + public void tick() { + super.tick(); +- if (this.level().isClientSide && !this.isInGround()) { ++ /*if (this.level().isClientSide && !this.isInGround()) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.level().addParticle(ParticleTypes.INSTANT_EFFECT, this.getX(), this.getY(), this.getZ(), 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/ThrownEgg.java b/net/minecraft/world/entity/projectile/ThrownEgg.java +index 76481c0e77fc3a2e4be8eeb9de8d1e6de5507c64..ba472247f793b1bdd987fd0003c2bf33f308dc6a 100644 +--- a/net/minecraft/world/entity/projectile/ThrownEgg.java ++++ b/net/minecraft/world/entity/projectile/ThrownEgg.java +@@ -58,64 +58,65 @@ public class ThrownEgg extends ThrowableItemProjectile { + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (!this.level().isClientSide) { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ boolean hatching = this.random.nextInt(8) == 0; // CraftBukkit ++ int toSpawn = 1; ++ ++ if (this.random.nextInt(32) == 0) { ++ toSpawn = 4; ++ } ++ // CraftBukkit start ++ org.bukkit.entity.EntityType hatchingType = org.bukkit.entity.EntityType.CHICKEN; ++ ++ net.minecraft.world.entity.Entity shooter = this.getOwner(); ++ if (!hatching) { ++ toSpawn = 0; ++ } ++ ++ if (shooter instanceof net.minecraft.server.level.ServerPlayer) { ++ org.bukkit.event.player.PlayerEggThrowEvent event = new org.bukkit.event.player.PlayerEggThrowEvent((org.bukkit.entity.Player) shooter.getBukkitEntity(), (org.bukkit.entity.Egg) this.getBukkitEntity(), hatching, (byte) toSpawn, hatchingType); ++ this.level().getCraftServer().getPluginManager().callEvent(event); ++ ++ toSpawn = event.getNumHatches(); ++ hatching = event.isHatching(); ++ hatchingType = event.getHatchingType(); ++ // If hatching is set to false, ensure child count is 0 ++ if (!hatching) { ++ toSpawn = 0; ++ } ++ } ++ // CraftBukkit end ++ ++ // Paper start - Add ThrownEggHatchEvent ++ com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, (byte) toSpawn, hatchingType); ++ event.callEvent(); ++ hatching = event.isHatching(); ++ toSpawn = hatching ? event.getNumHatches() : 0; // If hatching is set to false, ensure child count is 0 ++ hatchingType = event.getHatchingType(); ++ // Paper end - Add ThrownEggHatchEvent ++ ++ for (int i = 0; i < toSpawn; i++) { ++ net.minecraft.world.entity.Entity chicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit ++ if (chicken == null) { ++ continue; ++ } ++ + // CraftBukkit start +- boolean hatching = this.random.nextInt(8) == 0; +- if (true) { ++ if (chicken.getBukkitEntity() instanceof org.bukkit.entity.Ageable ageable) { ++ ageable.setBaby(); ++ } + // CraftBukkit end +- int i = 1; +- if (this.random.nextInt(32) == 0) { +- i = 4; +- } +- // CraftBukkit start +- org.bukkit.entity.EntityType hatchingType = org.bukkit.entity.EntityType.CHICKEN; +- +- net.minecraft.world.entity.Entity shooter = this.getOwner(); +- if (!hatching) { +- i = 0; +- } +- if (shooter instanceof net.minecraft.server.level.ServerPlayer) { +- org.bukkit.event.player.PlayerEggThrowEvent event = new org.bukkit.event.player.PlayerEggThrowEvent((org.bukkit.entity.Player) shooter.getBukkitEntity(), (org.bukkit.entity.Egg) this.getBukkitEntity(), hatching, (byte) i, hatchingType); +- this.level().getCraftServer().getPluginManager().callEvent(event); +- +- i = event.getNumHatches(); +- hatching = event.isHatching(); +- hatchingType = event.getHatchingType(); +- // If hatching is set to false, ensure child count is 0 +- if (!hatching) { +- i = 0; +- } +- } +- // CraftBukkit end +- // Paper start - Add ThrownEggHatchEvent +- com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, (byte) i, hatchingType); +- event.callEvent(); +- hatching = event.isHatching(); +- i = hatching ? event.getNumHatches() : 0; // If hatching is set to false, ensure child count is 0 +- hatchingType = event.getHatchingType(); +- // Paper end - Add ThrownEggHatchEvent +- +- for (int i1 = 0; i1 < i; i1++) { +- net.minecraft.world.entity.Entity chicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit +- if (chicken != null) { +- // CraftBukkit start +- if (chicken.getBukkitEntity() instanceof org.bukkit.entity.Ageable ageable) { +- ageable.setBaby(); +- } +- // CraftBukkit end +- chicken.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); +- if (!chicken.fudgePositionAfterSizeChange(ZERO_SIZED_DIMENSIONS)) { +- break; +- } +- +- this.level().addFreshEntity(chicken, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit +- } +- } ++ chicken.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); ++ if (!chicken.fudgePositionAfterSizeChange(ZERO_SIZED_DIMENSIONS)) { ++ break; + } + +- this.level().broadcastEntityEvent(this, (byte)3); +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause ++ this.level().addFreshEntity(chicken, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit + } ++ ++ this.level().broadcastEntityEvent(this, (byte) 3); ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/ThrownPotion.java b/net/minecraft/world/entity/projectile/ThrownPotion.java +index 5cff36e392a1a6150a5187e913fbfc9c176ccc88..0d7a845bbea1af0648f6d8cd79f8c0c56fefeb84 100644 +--- a/net/minecraft/world/entity/projectile/ThrownPotion.java ++++ b/net/minecraft/world/entity/projectile/ThrownPotion.java +@@ -63,7 +63,7 @@ public class ThrownPotion extends ThrowableItemProjectile { + @Override + protected void onHitBlock(BlockHitResult result) { + super.onHitBlock(result); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemStack item = this.getItem(); + Direction direction = result.getDirection(); + BlockPos blockPos = result.getBlockPos(); +@@ -77,7 +77,7 @@ public class ThrownPotion extends ThrowableItemProjectile { + this.dowseFire(blockPos1.relative(direction1)); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java +index a0b909c745ea60cae73def06f9d947345911c5e4..c36a4d51a69ba1735608589b4368fd321d54c6e9 100644 +--- a/net/minecraft/world/entity/projectile/WitherSkull.java ++++ b/net/minecraft/world/entity/projectile/WitherSkull.java +@@ -90,7 +90,7 @@ public class WitherSkull extends AbstractHurtingProjectile { + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + org.bukkit.event.entity.ExplosionPrimeEvent event = new org.bukkit.event.entity.ExplosionPrimeEvent(this.getBukkitEntity(), this.level().purpurConfig.witherExplosionRadius, false); // Purpur - Config for wither explosion radius + this.level().getCraftServer().getPluginManager().callEvent(event); +@@ -100,7 +100,7 @@ public class WitherSkull extends AbstractHurtingProjectile { + } + // CraftBukkit end + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + // Purpur start - Add canSaveToDisk to Entity +diff --git a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java +index 2bb750bdb9b1ea2152cc10cf014364a1e1d55a2a..61b32ce05f50ad60332d53713f74872b2507d755 100644 +--- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java ++++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java +@@ -93,21 +93,19 @@ public abstract class AbstractWindCharge extends AbstractHurtingProjectile imple + @Override + protected void onHitBlock(BlockHitResult result) { + super.onHitBlock(result); +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + Vec3i unitVec3i = result.getDirection().getUnitVec3i(); + Vec3 vec3 = Vec3.atLowerCornerOf(unitVec3i).multiply(0.25, 0.25, 0.25); + Vec3 vec31 = result.getLocation().add(vec3); + this.explode(vec31); + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override + protected void onHit(HitResult result) { + super.onHit(result); +- if (!this.level().isClientSide) { +- this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause +- } ++ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -138,7 +136,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.explode(this.position()); + this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause + } else { +diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java +index b1b312e45ed4514eaa6fb3941af64b641220c5bd..0baba6fe28cb27534d70316155ee3bcc0bcde308 100644 +--- a/net/minecraft/world/entity/vehicle/AbstractBoat.java ++++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java +@@ -76,9 +76,9 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + private double lastYd; + private boolean isAboveBubbleColumn; + private boolean bubbleColumnDirectionIsDown; +- private float bubbleMultiplier; +- private float bubbleAngle; +- private float bubbleAngleO; ++ //private float bubbleMultiplier; // Plazma - Remove isClientSide on DedicatedServer ++ //private float bubbleAngle; // Plazma - Remove isClientSide on DedicatedServer ++ //private float bubbleAngleO; // Plazma - Remove isClientSide on DedicatedServer + @Nullable + private Leashable.LeashData leashData; + private final Supplier dropItem; +@@ -165,21 +165,23 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + + @Override + public void onAboveBubbleCol(boolean downwards) { +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.isAboveBubbleColumn = true; + this.bubbleColumnDirectionIsDown = downwards; + if (this.getBubbleTime() == 0) { + this.setBubbleTime(60); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.level() + .addParticle(ParticleTypes.SPLASH, this.getX() + this.random.nextFloat(), this.getY() + 0.7, this.getZ() + this.random.nextFloat(), 0.0, 0.0, 0.0); + if (this.random.nextInt(20) == 0) { ++ /* // Plazma - Remove isClientSide on DedicatedServer + this.level() + .playLocalSound( + this.getX(), this.getY(), this.getZ(), this.getSwimSplashSound(), this.getSoundSource(), 1.0F, 0.8F + 0.4F * this.random.nextFloat(), false + ); ++ */ // Plazma - Remove isClientSide on DedicatedServer + this.gameEvent(GameEvent.SPLASH, this.getControllingPassenger()); + } + } +@@ -281,7 +283,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.ejectPassengers(); + } + +@@ -301,10 +303,11 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + } + + this.floatBoat(); +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.controlBoat(); + this.level().sendPacketToServer(new ServerboundPaddleBoatPacket(this.getPaddleState(0), this.getPaddleState(1))); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + this.move(MoverType.SELF, this.getDeltaMovement()); + } else { +@@ -359,7 +362,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + + List entities = this.level().getEntities(this, this.getBoundingBox().inflate(0.2F, -0.01F, 0.2F), EntitySelector.pushableBy(this)); + if (!entities.isEmpty()) { +- boolean flag = !this.level().isClientSide && !(this.getControllingPassenger() instanceof Player); ++ boolean flag = /*!this.level().isClientSide &&*/ !(this.getControllingPassenger() instanceof Player); // == true // Plazma - Remove isClientSide on DedicatedServer + + for (Entity entity : entities) { + if (!entity.hasPassenger(this)) { +@@ -381,7 +384,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + } + + private void tickBubbleColumn() { +- if (this.level().isClientSide) { ++ /*if (this.level().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + int bubbleTime = this.getBubbleTime(); + if (bubbleTime > 0) { + this.bubbleMultiplier += 0.05F; +@@ -393,6 +396,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + this.bubbleAngleO = this.bubbleAngle; + this.bubbleAngle = 10.0F * (float)Math.sin(0.5F * (float)this.level().getGameTime()) * this.bubbleMultiplier; + } else { ++ */ + if (!this.isAboveBubbleColumn) { + this.setBubbleTime(0); + } +@@ -414,7 +418,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + + this.isAboveBubbleColumn = false; + } +- } ++ //} + } + + @Nullable +@@ -793,11 +797,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + if (interactionResult != InteractionResult.PASS) { + return interactionResult; + } else { +- return (InteractionResult)(player.isSecondaryUseActive() +- || !(this.outOfControlTicks < 60.0F) +- || !this.level().isClientSide && !player.startRiding(this) +- ? InteractionResult.PASS +- : InteractionResult.SUCCESS); ++ return (player.isSecondaryUseActive() || !(this.outOfControlTicks < 60.0F) || /*!this.level().isClientSide &&*/ !player.startRiding(this)) ? InteractionResult.PASS : InteractionResult.SUCCESS; // == true // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -810,7 +810,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + @Override + public void remove(Entity.RemovalReason reason, org.bukkit.event.entity.EntityRemoveEvent.Cause eventCause) { + // CraftBukkit end +- if (!this.level().isClientSide && reason.shouldDestroy() && this.isLeashed()) { ++ if (/*!this.level().isClientSide &&*/ reason.shouldDestroy() && this.isLeashed()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.dropLeash(); + } + +@@ -841,9 +841,11 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { + return this.entityData.get(DATA_ID_BUBBLE_TIME); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public float getBubbleAngle(float partialTick) { + return Mth.lerp(partialTick, this.bubbleAngleO, this.bubbleAngle); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected boolean canAddPassenger(Entity passenger) { +diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java +index b230955ae880d84fde40b4feffa5caf3c4449eb7..5a40612318db2452f8ce7902be06a70c8865bf2b 100644 +--- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java ++++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java +@@ -73,7 +73,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto + @Override + public void remove(Entity.RemovalReason reason, org.bukkit.event.entity.EntityRemoveEvent.Cause cause) { + // CraftBukkit end +- if (!this.level().isClientSide && reason.shouldDestroy()) { ++ if (/*!this.level().isClientSide &&*/ reason.shouldDestroy()) { // == true // Plazma - Remove isClientSide on DedicatedServer + Containers.dropContents(this.level(), this, this); + } + +diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java +index 6df4d736d94b9e49a3eb3d59a329e37127aa64cd..ba8179f9ab777e51c1cf758c5e3f4e4bbe8ead23 100644 +--- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java ++++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java +@@ -607,45 +607,54 @@ public abstract class AbstractMinecart extends VehicleEntity { + + @Override + public void push(Entity entity) { +- if (!this.level().isClientSide) { +- if (!entity.noPhysics && !this.noPhysics) { +- if (!this.level().paperConfig().collisions.allowVehicleCollisions && this.level().paperConfig().collisions.onlyPlayersCollide && !(entity instanceof Player)) return; // Paper - Collision option for requiring a player participant +- if (!this.hasPassenger(entity)) { +- // CraftBukkit start +- org.bukkit.event.vehicle.VehicleEntityCollisionEvent collisionEvent = new org.bukkit.event.vehicle.VehicleEntityCollisionEvent( +- (org.bukkit.entity.Vehicle) this.getBukkitEntity(), +- entity.getBukkitEntity() +- ); +- if (!collisionEvent.callEvent()) return; +- // CraftBukkit end +- double d = entity.getX() - this.getX(); +- double d1 = entity.getZ() - this.getZ(); +- double d2 = d * d + d1 * d1; +- if (d2 >= 1.0E-4F) { +- d2 = Math.sqrt(d2); +- d /= d2; +- d1 /= d2; +- double d3 = 1.0 / d2; +- if (d3 > 1.0) { +- d3 = 1.0; +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (entity.noPhysics || this.noPhysics) { ++ return; ++ } + +- d *= d3; +- d1 *= d3; +- d *= 0.1F; +- d1 *= 0.1F; +- d *= 0.5; +- d1 *= 0.5; +- if (entity instanceof AbstractMinecart abstractMinecart) { +- this.pushOtherMinecart(abstractMinecart, d, d1); +- } else { +- this.push(-d, 0.0, -d1); +- entity.push(d / 4.0, 0.0, d1 / 4.0); +- } +- } +- } +- } ++ if (!this.level().paperConfig().collisions.allowVehicleCollisions && this.level().paperConfig().collisions.onlyPlayersCollide && !(entity instanceof Player)) {// Paper - Collision option for requiring a player participant ++ return; ++ } ++ ++ if (this.hasPassenger(entity)) { ++ return; ++ } ++ ++ // CraftBukkit start ++ org.bukkit.event.vehicle.VehicleEntityCollisionEvent collisionEvent = new org.bukkit.event.vehicle.VehicleEntityCollisionEvent((org.bukkit.entity.Vehicle) this.getBukkitEntity(), entity.getBukkitEntity()); ++ if (!collisionEvent.callEvent()) { ++ return; ++ } ++ // CraftBukkit end ++ ++ double dX = entity.getX() - this.getX(); ++ double dZ = entity.getZ() - this.getZ(); ++ double dL = dX * dX + dZ * dZ; ++ if (dL < 1.0E-4F) { ++ return; ++ } ++ ++ dL = Math.sqrt(dL); ++ dX /= dL; ++ dZ /= dL; ++ double d3 = 1.0 / dL; ++ if (d3 > 1.0) { ++ d3 = 1.0; ++ } ++ ++ dX *= d3; ++ dZ *= d3; ++ dX *= 0.1F; ++ dZ *= 0.1F; ++ dX *= 0.5; ++ dZ *= 0.5; ++ if (entity instanceof AbstractMinecart abstractMinecart) { ++ this.pushOtherMinecart(abstractMinecart, dX, dZ); ++ } else { ++ this.push(-dX, 0.0, -dZ); ++ entity.push(dX / 4.0, 0.0, dZ / 4.0); + } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + private void pushOtherMinecart(AbstractMinecart otherMinecart, double deltaX, double deltaZ) { +diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +index 516b230769fb9ddaa49adca9b6aa64d4510810da..6fcff0d4acbc0fe7471cf0a1dcec47e254c3d187 100644 +--- a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java ++++ b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +@@ -80,7 +80,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme + @Override + public void remove(Entity.RemovalReason reason, org.bukkit.event.entity.EntityRemoveEvent.Cause cause) { + // CraftBukkit end - add Bukkit remove cause +- if (!this.level().isClientSide && reason.shouldDestroy()) { ++ if (/*!this.level().isClientSide &&*/ reason.shouldDestroy()) { // == true // Plazma - Remove isClientSide on DedicatedServer + Containers.dropContents(this.level(), this, this); + } + +diff --git a/net/minecraft/world/entity/vehicle/Minecart.java b/net/minecraft/world/entity/vehicle/Minecart.java +index b683bb83211ef26964fd740fcf0b96c00a7b2ca5..fb785f505b3cfba5fe557c26d660003e6270feb5 100644 +--- a/net/minecraft/world/entity/vehicle/Minecart.java ++++ b/net/minecraft/world/entity/vehicle/Minecart.java +@@ -22,13 +22,9 @@ 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))) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.playerRotationOffset = this.rotationOffset; +- if (!this.level().isClientSide) { +- return (InteractionResult)(player.startRiding(this) ? InteractionResult.CONSUME : InteractionResult.PASS); +- } else { +- return InteractionResult.SUCCESS; +- } ++ return player.startRiding(this) ? InteractionResult.CONSUME : InteractionResult.PASS; // Plazma - Remove isClientSide on DedicatedServer + } else { + return InteractionResult.PASS; + } +@@ -65,6 +61,7 @@ public class Minecart extends AbstractMinecart { + return true; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void tick() { + double d = this.getYRot(); +@@ -86,4 +83,5 @@ public class Minecart extends AbstractMinecart { + this.playerRotationOffset = f; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/entity/vehicle/MinecartFurnace.java b/net/minecraft/world/entity/vehicle/MinecartFurnace.java +index 77528bf65ee211340fcbf6833cadbc9b882cdbbc..d2ce4677a8f37ce341d4b909dd2e2a4489bc2c4d 100644 +--- a/net/minecraft/world/entity/vehicle/MinecartFurnace.java ++++ b/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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (this.fuel > 0) { + this.fuel--; + } +@@ -56,7 +56,7 @@ public class MinecartFurnace extends AbstractMinecart { + } + + this.setHasFuel(this.fuel > 0); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + 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/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java +index 8341e7f01606fca90e69384c16fc19bb9e20d1b7..f4b6223a2f2ef676a4a12e6e56898d08ee596f32 100644 +--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java ++++ b/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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.consumedItemThisFrame = true; + this.setChanged(); + } +diff --git a/net/minecraft/world/entity/vehicle/MinecartSpawner.java b/net/minecraft/world/entity/vehicle/MinecartSpawner.java +index 4a5fa99ac574970a308eaf66493ff8e19abfc3c7..17bceec465c5a9f565908f63ed92b9f7feedd21d 100644 +--- a/net/minecraft/world/entity/vehicle/MinecartSpawner.java ++++ b/net/minecraft/world/entity/vehicle/MinecartSpawner.java +@@ -37,9 +37,7 @@ public class MinecartSpawner extends AbstractMinecart { + } + + private Runnable createTicker(Level level) { +- return level instanceof ServerLevel +- ? () -> this.spawner.serverTick((ServerLevel)level, this.blockPosition()) +- : () -> this.spawner.clientTick(level, this.blockPosition()); ++ return () -> this.spawner.serverTick((ServerLevel)level, this.blockPosition()); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/entity/vehicle/MinecartTNT.java b/net/minecraft/world/entity/vehicle/MinecartTNT.java +index da2ff774cd711e3db96376580772ee4eb3293944..64cd67045886da3d27a324713d15899981389ee3 100644 +--- a/net/minecraft/world/entity/vehicle/MinecartTNT.java ++++ b/net/minecraft/world/entity/vehicle/MinecartTNT.java +@@ -162,12 +162,12 @@ public class MinecartTNT extends AbstractMinecart { + + public void primeFuse() { + this.fuse = 80; +- if (!this.level().isClientSide) { ++ //if (!this.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.level().broadcastEntityEvent(this, (byte)10); + if (!this.isSilent()) { + this.level().playSound(null, this.getX(), this.getY(), this.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public int getFuse() { +diff --git a/net/minecraft/world/inventory/BeaconMenu.java b/net/minecraft/world/inventory/BeaconMenu.java +index c2304250757b9b82d918c208a44be2e23a5ecd82..274e6c06dd35755cfff2411abf69b64e319c7a19 100644 +--- a/net/minecraft/world/inventory/BeaconMenu.java ++++ b/net/minecraft/world/inventory/BeaconMenu.java +@@ -70,12 +70,12 @@ public class BeaconMenu extends AbstractContainerMenu { + @Override + public void removed(Player player) { + super.removed(player); +- if (!player.level().isClientSide) { ++ //if (!player.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemStack itemStack = this.paymentSlot.remove(this.paymentSlot.getMaxStackSize()); + if (!itemStack.isEmpty()) { + player.drop(itemStack, false); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/inventory/InventoryMenu.java b/net/minecraft/world/inventory/InventoryMenu.java +index 4d9a80ec027a98ed376a55f492d2a639e9db4bd2..eecb7c296559de15a7fa5266f5bd146a6787b3c5 100644 +--- a/net/minecraft/world/inventory/InventoryMenu.java ++++ b/net/minecraft/world/inventory/InventoryMenu.java +@@ -43,18 +43,18 @@ public class InventoryMenu extends AbstractCraftingMenu { + EMPTY_ARMOR_SLOT_HELMET + ); + private static final EquipmentSlot[] SLOT_IDS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET}; +- public final boolean active; ++ //public final boolean active; // Plazma - Remove isClientSide on DedicatedServer + private final Player owner; + // CraftBukkit start + private org.bukkit.craftbukkit.inventory.CraftInventoryView bukkitEntity = null; + // CraftBukkit end + +- public InventoryMenu(Inventory playerInventory, boolean active, final Player owner) { ++ public InventoryMenu(Inventory playerInventory, /*boolean active,*/ final Player owner) { // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + super((MenuType) null, 0, 2, 2, playerInventory); // CraftBukkit - save player + this.setTitle(Component.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory + // CraftBukkit end +- this.active = active; ++ //this.active = active; // Plazma - Remove isClientSide on DedicatedServer + this.owner = owner; + this.addResultSlot(owner, 154, 28); + this.addCraftingGridSlots(98, 18); +@@ -95,9 +95,7 @@ public class InventoryMenu extends AbstractCraftingMenu { + public void removed(Player player) { + super.removed(player); + this.resultSlots.clearContent(); +- if (!player.level().isClientSide) { +- this.clearContainer(player, this.craftSlots); +- } ++ this.clearContainer(player, this.craftSlots); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/inventory/MerchantMenu.java b/net/minecraft/world/inventory/MerchantMenu.java +index 3019790d5eccef23c710e77615243551fcc676b0..b0234cead15e6db63e07205d1755d5cb46d8c454 100644 +--- a/net/minecraft/world/inventory/MerchantMenu.java ++++ b/net/minecraft/world/inventory/MerchantMenu.java +@@ -58,9 +58,11 @@ public class MerchantMenu extends AbstractContainerMenu { + this.addStandardInventorySlots(playerInventory, 108, 84); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void setShowProgressBar(boolean showProgressBar) { + this.showProgressBar = showProgressBar; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void slotsChanged(Container inventory) { +@@ -160,7 +162,7 @@ public class MerchantMenu extends AbstractContainerMenu { + this.moveItemStackTo(item, 3, 39, true, false); // This should always succeed because it's checked above + + slot.onQuickCraft(item, itemStack); +- this.playTradeSound(); ++ //this.playTradeSound(); // Plazma - Remove isClientSide on DedicatedServer + slot.set(ItemStack.EMPTY); // item should ALWAYS be empty + } + // Paper end - Add PlayerTradeEvent and PlayerPurchaseEvent +@@ -169,6 +171,7 @@ public class MerchantMenu extends AbstractContainerMenu { + return itemStack; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private void playTradeSound() { + if (!this.trader.isClientSide() && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035 + Entity entity = (Entity)this.trader; +@@ -176,12 +179,13 @@ public class MerchantMenu extends AbstractContainerMenu { + .playLocalSound(entity.getX(), entity.getY(), entity.getZ(), this.trader.getNotifyTradeSound(), SoundSource.NEUTRAL, 1.0F, 1.0F, false); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void removed(Player player) { + super.removed(player); + this.trader.setTradingPlayer(null); +- if (!this.trader.isClientSide()) { ++ //if (!this.trader.isClientSide()) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (!player.isAlive() || player instanceof ServerPlayer && ((ServerPlayer)player).hasDisconnected()) { + ItemStack itemStack = this.tradeContainer.removeItemNoUpdate(0); + if (!itemStack.isEmpty()) { +@@ -196,7 +200,7 @@ public class MerchantMenu extends AbstractContainerMenu { + player.getInventory().placeItemBackInInventory(this.tradeContainer.removeItemNoUpdate(0)); + player.getInventory().placeItemBackInInventory(this.tradeContainer.removeItemNoUpdate(1)); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public void tryMoveItems(int selectedMerchantRecipe) { +@@ -254,7 +258,9 @@ public class MerchantMenu extends AbstractContainerMenu { + return this.trader.getOffers(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public boolean showProgressBar() { + return this.showProgressBar; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java +index 1df587402862d67a76ed090df60bfa20c3a9209d..b2dafed969c0523cf4ec05ac98bdf9ca8f8b9979 100644 +--- a/net/minecraft/world/item/BlockItem.java ++++ b/net/minecraft/world/item/BlockItem.java +@@ -208,34 +208,35 @@ public class BlockItem extends Item { + } + + public static boolean updateCustomBlockEntityTag(Level level, @Nullable Player player, BlockPos pos, ItemStack stack) { +- if (level.isClientSide) { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ final CustomData customData = stack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY); ++ if (customData.isEmpty()) { + return false; +- } else { +- CustomData customData = stack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY); +- if (!customData.isEmpty()) { +- BlockEntityType blockEntityType = customData.parseEntityType(level.registryAccess(), Registries.BLOCK_ENTITY_TYPE); +- if (blockEntityType == null) { +- return false; +- } +- +- BlockEntity blockEntity = level.getBlockEntity(pos); +- if (blockEntity != null) { +- BlockEntityType type = blockEntity.getType(); +- if (type != blockEntityType) { +- return false; +- } ++ } + +- if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission +- if (!(level.purpurConfig.silkTouchEnabled && blockEntity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners"))) // Purpur - Silk touch spawners +- return customData.loadInto(blockEntity, level.registryAccess()); +- } ++ final BlockEntityType blockEntityType = customData.parseEntityType(level.registryAccess(), Registries.BLOCK_ENTITY_TYPE); ++ if (blockEntityType == null) { ++ return false; ++ } + +- return false; +- } +- } ++ final BlockEntity blockEntity = level.getBlockEntity(pos); ++ if (blockEntity == null) { ++ return false; ++ } + ++ final BlockEntityType type = blockEntity.getType(); ++ if (type != blockEntityType) { + return false; + } ++ ++ if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission ++ if (!(level.purpurConfig.silkTouchEnabled && blockEntity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity && player.getBukkitEntity().hasPermission("purpur.drop.spawners"))) { // Purpur - Silk touch spawners ++ return customData.loadInto(blockEntity, level.registryAccess()); ++ } ++ } ++ ++ return false; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/item/BoatItem.java b/net/minecraft/world/item/BoatItem.java +index ca86122e38688b29340cd8413ccf1746315e292a..488b51826b451cfc8c98a379e92a1cedf520457a 100644 +--- a/net/minecraft/world/item/BoatItem.java ++++ b/net/minecraft/world/item/BoatItem.java +@@ -67,7 +67,7 @@ public class BoatItem extends Item { + if (!level.noCollision(boat, boat.getBoundingBox())) { + return InteractionResult.FAIL; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(level, playerPovHitResult.getBlockPos(), player.getDirection(), player, boat, hand).isCancelled()) { + return InteractionResult.FAIL; +@@ -79,7 +79,7 @@ public class BoatItem extends Item { + // CraftBukkit end + level.gameEvent(player, GameEvent.ENTITY_PLACE, playerPovHitResult.getLocation()); + itemInHand.consume(1, player); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + player.awardStat(Stats.ITEM_USED.get(this)); + return InteractionResult.SUCCESS; +diff --git a/net/minecraft/world/item/BoneMealItem.java b/net/minecraft/world/item/BoneMealItem.java +index b76760c2d3f06a7058418b6276f3362171d45645..3bb2f0e3cd154d1bb3d761504e1f0691cab51979 100644 +--- a/net/minecraft/world/item/BoneMealItem.java ++++ b/net/minecraft/world/item/BoneMealItem.java +@@ -42,20 +42,20 @@ public class BoneMealItem extends Item { + BlockPos clickedPos = context.getClickedPos(); + BlockPos blockPos = clickedPos.relative(context.getClickedFace()); + if (growCrop(context.getItemInHand(), level, clickedPos)) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (context.getPlayer() != null) context.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 + level.levelEvent(1505, clickedPos, 15); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { + BlockState blockState = level.getBlockState(clickedPos); + boolean isFaceSturdy = blockState.isFaceSturdy(level, clickedPos, context.getClickedFace()); + if (isFaceSturdy && growWaterPlant(context.getItemInHand(), level, blockPos, context.getClickedFace())) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (context.getPlayer() != null) context.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518 + level.levelEvent(1505, blockPos, 15); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/BucketItem.java b/net/minecraft/world/item/BucketItem.java +index b820ecfbe71dd57a0f04b1c3381ffb76b0c16f16..45df21f63425236257a7dc24edb793815763a06a 100644 +--- a/net/minecraft/world/item/BucketItem.java ++++ b/net/minecraft/world/item/BucketItem.java +@@ -73,9 +73,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { + bucketPickup.getPickupSound().ifPresent(soundEvent -> player.playSound(soundEvent, 1.0F, 1.0F)); + level.gameEvent(player, GameEvent.FLUID_PICKUP, blockPos); + ItemStack itemStack1 = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit +- if (!level.isClientSide) { +- CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer)player, itemStack); +- } ++ CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer)player, itemStack); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS.heldItemTransformedTo(itemStack1); + } +@@ -165,7 +163,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { + this.playEmptySound(player, level, pos); + return true; + } else { +- if (!level.isClientSide && canBeReplaced && !blockState.liquid()) { ++ if (/*!level.isClientSide &&*/ canBeReplaced && !blockState.liquid()) { // Plazma - Remove isClientSide on DedicatedServer + level.destroyBlock(pos, true); + } + +diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java +index 1131e984fd30e40c1b99054b5db9462ffe55b5f1..e10099ae73fa495dc907990beeed58bee7a0af16 100644 +--- a/net/minecraft/world/item/CrossbowItem.java ++++ b/net/minecraft/world/item/CrossbowItem.java +@@ -223,34 +223,25 @@ public class CrossbowItem extends ProjectileWeaponItem { + + @Override + public void onUseTick(Level level, LivingEntity livingEntity, ItemStack stack, int count) { +- if (!level.isClientSide) { +- CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack); +- float f = (float)(stack.getUseDuration(livingEntity) - count) / getChargeDuration(stack, livingEntity); +- if (f < 0.2F) { +- this.startSoundPlayed = false; +- this.midLoadSoundPlayed = false; +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ final CrossbowItem.ChargingSounds sounds = this.getChargingSounds(stack); ++ float f = ((float) (stack.getUseDuration(livingEntity) - count)) / getChargeDuration(stack, livingEntity); + +- if (f >= 0.2F && !this.startSoundPlayed) { +- this.startSoundPlayed = true; +- chargingSounds.start() +- .ifPresent( +- sound -> level.playSound( +- null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F +- ) +- ); +- } ++ if (f < 0.2F) { ++ this.startSoundPlayed = false; ++ this.midLoadSoundPlayed = false; ++ } + +- if (f >= 0.5F && !this.midLoadSoundPlayed) { +- this.midLoadSoundPlayed = true; +- chargingSounds.mid() +- .ifPresent( +- sound -> level.playSound( +- null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F +- ) +- ); +- } ++ if (f >= 0.2F && !this.startSoundPlayed) { ++ this.startSoundPlayed = true; ++ sounds.start().ifPresent(sound -> level.playSound(null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F)); ++ } ++ ++ if (f >= 0.5F && !this.midLoadSoundPlayed) { ++ this.midLoadSoundPlayed = true; ++ sounds.mid().ifPresent(sound -> level.playSound(null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), sound.value(), SoundSource.PLAYERS, 0.5F, 1.0F)); + } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/item/DebugStickItem.java b/net/minecraft/world/item/DebugStickItem.java +index 51ff487fc5a00d284de88965ef5fd4fbd4b9f803..854afa85c7b6c03ceb5a1d036be1b17e0818e5e4 100644 +--- a/net/minecraft/world/item/DebugStickItem.java ++++ b/net/minecraft/world/item/DebugStickItem.java +@@ -27,9 +27,7 @@ public class DebugStickItem extends Item { + + @Override + public boolean canAttackBlock(BlockState state, Level level, BlockPos pos, Player player) { +- if (!level.isClientSide) { +- this.handleInteraction(player, state, level, pos, false, player.getItemInHand(InteractionHand.MAIN_HAND)); +- } ++ this.handleInteraction(player, state, level, pos, false, player.getItemInHand(InteractionHand.MAIN_HAND)); // Plazma - Remove isClientSide on DedicatedServer + + return false; + } +@@ -38,7 +36,7 @@ public class DebugStickItem extends Item { + public InteractionResult useOn(UseOnContext context) { + Player player = context.getPlayer(); + Level level = context.getLevel(); +- if (!level.isClientSide && player != null) { ++ if (/*!level.isClientSide &&*/ player != null) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos clickedPos = context.getClickedPos(); + if (!this.handleInteraction(player, level.getBlockState(clickedPos), level, clickedPos, true, context.getItemInHand())) { + return InteractionResult.FAIL; +diff --git a/net/minecraft/world/item/DyeItem.java b/net/minecraft/world/item/DyeItem.java +index 427c252159cf0945835651205f0aee27e0c44f3a..16d84647650fd90c5296efad0dbdae90653b4b67 100644 +--- a/net/minecraft/world/item/DyeItem.java ++++ b/net/minecraft/world/item/DyeItem.java +@@ -26,7 +26,7 @@ public class DyeItem extends Item implements SignApplicator { + public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity target, InteractionHand hand) { + if (target instanceof Sheep sheep && sheep.isAlive() && !sheep.isSheared() && sheep.getColor() != this.dyeColor) { + sheep.level().playSound(player, sheep, SoundEvents.DYE_USE, SoundSource.PLAYERS, 1.0F, 1.0F); +- if (!player.level().isClientSide) { ++ //if (!player.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + sheep.setColor(this.dyeColor); + // CraftBukkit start + byte bColor = (byte) this.dyeColor.getId(); +@@ -40,7 +40,7 @@ public class DyeItem extends Item implements SignApplicator { + sheep.setColor(DyeColor.byId((byte) event.getColor().getWoolData())); + // CraftBukkit end + stack.shrink(1); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/EmptyMapItem.java b/net/minecraft/world/item/EmptyMapItem.java +index a65534461261f90b462b57f922c6e179e419d3eb..2b72ecc3e8d35db920deda0d09b83d004c2ea262 100644 +--- a/net/minecraft/world/item/EmptyMapItem.java ++++ b/net/minecraft/world/item/EmptyMapItem.java +@@ -15,9 +15,10 @@ public class EmptyMapItem extends Item { + @Override + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemInHand = player.getItemInHand(hand); +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + return InteractionResult.SUCCESS; + } else { ++ */ // Plazma - Remove isClientSide on DedicatedServer + itemInHand.consume(1, player); + player.awardStat(Stats.ITEM_USED.get(this)); + player.level().playSound(null, player, SoundEvents.UI_CARTOGRAPHY_TABLE_TAKE_RESULT, player.getSoundSource(), 1.0F, 1.0F); +@@ -31,6 +32,6 @@ public class EmptyMapItem extends Item { + + return InteractionResult.SUCCESS; + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/item/EnderEyeItem.java b/net/minecraft/world/item/EnderEyeItem.java +index 1bf4ec4ef42b80d14916f1f54242e136b866360a..2003db2a3bf5905b681e42d82b404a55c522c2c2 100644 +--- a/net/minecraft/world/item/EnderEyeItem.java ++++ b/net/minecraft/world/item/EnderEyeItem.java +@@ -38,8 +38,10 @@ public class EnderEyeItem extends Item { + BlockState blockState = level.getBlockState(clickedPos); + if (!blockState.is(Blocks.END_PORTAL_FRAME) || blockState.getValue(EndPortalFrameBlock.HAS_EYE)) { + return InteractionResult.PASS; ++ /* // Plazma - Remove isClientSide on DedicatedServer + } else if (level.isClientSide) { + return InteractionResult.SUCCESS; ++ */ // Plazma - Remove isClientSide on DedicatedServer + } else { + BlockState blockState1 = blockState.setValue(EndPortalFrameBlock.HAS_EYE, true); + // Paper start +diff --git a/net/minecraft/world/item/FishingRodItem.java b/net/minecraft/world/item/FishingRodItem.java +index f700e588e89705dbb00c64b83df3793baf5d90cd..3f64812326ef1c478f9e2fb7df28f0ec75eb6135 100644 +--- a/net/minecraft/world/item/FishingRodItem.java ++++ b/net/minecraft/world/item/FishingRodItem.java +@@ -23,10 +23,10 @@ public class FishingRodItem extends Item { + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemInHand = player.getItemInHand(hand); + if (player.fishing != null) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + int i = player.fishing.retrieve(hand, itemInHand); // Paper - Add hand parameter to PlayerFishEvent + itemInHand.hurtAndBreak(i, player, LivingEntity.getSlotForHand(hand)); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + level.playSound( + null, +diff --git a/net/minecraft/world/item/FoodOnAStickItem.java b/net/minecraft/world/item/FoodOnAStickItem.java +index 40efa042f537939c68dcde547ee89e895331f7dd..f7b715e83f55312abc00c3e35fd7141875739ddc 100644 +--- a/net/minecraft/world/item/FoodOnAStickItem.java ++++ b/net/minecraft/world/item/FoodOnAStickItem.java +@@ -24,9 +24,10 @@ public class FoodOnAStickItem extends Item { + @Override + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemInHand = player.getItemInHand(hand); +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + return InteractionResult.PASS; + } else { ++ */ // Plazma - Remove isClientSide on DedicatedServer + Entity controlledVehicle = player.getControlledVehicle(); + if (player.isPassenger() + && controlledVehicle instanceof ItemSteerable itemSteerable +@@ -39,6 +40,6 @@ public class FoodOnAStickItem extends Item { + player.awardStat(Stats.ITEM_USED.get(this)); + return InteractionResult.PASS; + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/item/HangingEntityItem.java b/net/minecraft/world/item/HangingEntityItem.java +index cd9e0398876567afc337db8f6ff0ebb0ee162383..f092533f4155d884752005216f812af7856abae8 100644 +--- a/net/minecraft/world/item/HangingEntityItem.java ++++ b/net/minecraft/world/item/HangingEntityItem.java +@@ -66,7 +66,7 @@ public class HangingEntityItem extends Item { + } + + if (hangingEntity.survives()) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start - fire HangingPlaceEvent + org.bukkit.entity.Player who = player == null ? null : (org.bukkit.entity.Player) player.getBukkitEntity(); + org.bukkit.block.Block blockClicked = org.bukkit.craftbukkit.block.CraftBlock.at(level, blockPos); +@@ -83,7 +83,7 @@ public class HangingEntityItem extends Item { + hangingEntity.playPlacementSound(); + level.gameEvent(player, GameEvent.ENTITY_PLACE, hangingEntity.position()); + level.addFreshEntity(hangingEntity); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + itemInHand.shrink(1); + return InteractionResult.SUCCESS; +diff --git a/net/minecraft/world/item/HoeItem.java b/net/minecraft/world/item/HoeItem.java +index acef797b884f6072ada4b9d5af53daf13273edca..8ce5c526c7035d46bdf1b82d96cd36700aa6d0f6 100644 +--- a/net/minecraft/world/item/HoeItem.java ++++ b/net/minecraft/world/item/HoeItem.java +@@ -65,7 +65,7 @@ public class HoeItem extends DiggerItem { + if (predicate.test(context)) { + Player player = context.getPlayer(); + if (!TILLABLES.containsKey(clickedBlock)) level.playSound(null, clickedPos, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - Tool actionable options - force sound +- if (!level.isClientSide) { ++ /*if (!level.isClientSide)*/ { // == true // Plazma - Remove isClientSide on DedicatedServer + consumer.accept(context); + if (player != null) { + context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); +diff --git a/net/minecraft/world/item/Item.java b/net/minecraft/world/item/Item.java +index 6821d39a24ef610ea8b04f6dbeca2cdc0b8e7787..d2c9c5f621e57ea4ac41ebbbd4695f13e57db875 100644 +--- a/net/minecraft/world/item/Item.java ++++ b/net/minecraft/world/item/Item.java +@@ -217,7 +217,7 @@ public class Item implements FeatureElement, ItemLike { + if (tool == null) { + return false; + } else { +- if (!level.isClientSide && state.getDestroySpeed(level, pos) != 0.0F && tool.damagePerBlock() > 0) { ++ if (/*!level.isClientSide &&*/ state.getDestroySpeed(level, pos) != 0.0F && tool.damagePerBlock() > 0) { // == true // Plazma - Remove isClientSide on DedicatedServer + stack.hurtAndBreak(tool.damagePerBlock(), miningEntity, EquipmentSlot.MAINHAND); + } + +diff --git a/net/minecraft/world/item/ItemUtils.java b/net/minecraft/world/item/ItemUtils.java +index 9fae6d24d67337bd7f2adc1cc244b75b42ae78ce..e9bf008bf23b0e212680c325b5a23ee505a64cb1 100644 +--- a/net/minecraft/world/item/ItemUtils.java ++++ b/net/minecraft/world/item/ItemUtils.java +@@ -40,7 +40,7 @@ public class ItemUtils { + + public static void onContainerDestroyed(ItemEntity container, Iterable contents) { + Level level = container.level(); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - call EntityDropItemEvent + contents.forEach(itemStack -> { + ItemEntity droppedItem = new ItemEntity(level, container.getX(), container.getY(), container.getZ(), itemStack); +@@ -50,6 +50,6 @@ public class ItemUtils { + } + }); + // Paper end - call EntityDropItemEvent +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/item/JukeboxPlayable.java b/net/minecraft/world/item/JukeboxPlayable.java +index 3bbfb14d22139c079ecd766a36c9a395518e9cd7..0c4c15ab034a52b40446ad6eea46c6f961428991 100644 +--- a/net/minecraft/world/item/JukeboxPlayable.java ++++ b/net/minecraft/world/item/JukeboxPlayable.java +@@ -65,7 +65,7 @@ public record JukeboxPlayable(EitherHolder song, boolean showInTool + } else { + BlockState blockState = level.getBlockState(pos); + if (blockState.is(Blocks.JUKEBOX) && !blockState.getValue(JukeboxBlock.HAS_RECORD)) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemStack itemStack = stack.consumeAndReturn(1, player); + if (level.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 isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/KnowledgeBookItem.java b/net/minecraft/world/item/KnowledgeBookItem.java +index 958960047bba69a2cf00d7d80b53bb423fc5b294..1560c8eabe0570c0d5430a124992a77a8bc230e9 100644 +--- a/net/minecraft/world/item/KnowledgeBookItem.java ++++ b/net/minecraft/world/item/KnowledgeBookItem.java +@@ -28,28 +28,29 @@ public class KnowledgeBookItem extends Item { + ItemStack itemInHand = player.getItemInHand(hand); + List>> list = itemInHand.getOrDefault(DataComponents.RECIPES, List.of()); + itemInHand.consume(1, player); ++ ++ // Plazma start - Remove isClientSide on DedicatedServer + if (list.isEmpty()) { + return InteractionResult.FAIL; +- } else { +- if (!level.isClientSide) { +- RecipeManager recipeManager = level.getServer().getRecipeManager(); +- List> list1 = new ArrayList<>(list.size()); +- +- for (ResourceKey> resourceKey : list) { +- Optional> optional = recipeManager.byKey(resourceKey); +- if (!optional.isPresent()) { +- LOGGER.error("Invalid recipe: {}", resourceKey); +- return InteractionResult.FAIL; +- } +- +- list1.add(optional.get()); +- } +- +- player.awardRecipes(list1); +- player.awardStat(Stats.ITEM_USED.get(this)); ++ } ++ ++ RecipeManager recipeManager = level.getServer().getRecipeManager(); ++ List> list1 = new ArrayList<>(list.size()); ++ ++ for (ResourceKey> resourceKey : list) { ++ Optional> optional = recipeManager.byKey(resourceKey); ++ if (optional.isEmpty()) { ++ LOGGER.error("Invalid recipe: {}", resourceKey); ++ return InteractionResult.FAIL; + } + +- return InteractionResult.SUCCESS; ++ list1.add(optional.get()); + } ++ ++ player.awardRecipes(list1); ++ player.awardStat(Stats.ITEM_USED.get(this)); ++ ++ return InteractionResult.SUCCESS; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/item/LeadItem.java b/net/minecraft/world/item/LeadItem.java +index 8c13ae2da3cf2b0979b501be5e3829da44fea45e..b8981ee1072d49e857f0e9772fead0ed800777c2 100644 +--- a/net/minecraft/world/item/LeadItem.java ++++ b/net/minecraft/world/item/LeadItem.java +@@ -27,7 +27,7 @@ public class LeadItem extends Item { + BlockState blockState = level.getBlockState(clickedPos); + if (blockState.is(BlockTags.FENCES)) { + Player player = context.getPlayer(); +- if (!level.isClientSide && player != null) { ++ if (/*!level.isClientSide &&*/ player != null) { // == true // Plazma - Remove isClientSide on DedicatedServer + return bindPlayerMobs(player, level, clickedPos, context.getHand()); // CraftBukkit - Pass hand + } + } +diff --git a/net/minecraft/world/item/MapItem.java b/net/minecraft/world/item/MapItem.java +index 309392d414ecbe60474abd0af534184740951707..edf00ca8f78b1870b71fd460ebae7f4709866d1a 100644 +--- a/net/minecraft/world/item/MapItem.java ++++ b/net/minecraft/world/item/MapItem.java +@@ -271,18 +271,20 @@ public class MapItem extends Item { + + @Override + public void inventoryTick(ItemStack stack, Level level, Entity entity, int itemSlot, boolean isSelected) { +- if (!level.isClientSide) { +- MapItemSavedData savedData = getSavedData(stack, level); +- if (savedData != null) { +- if (entity instanceof Player player) { +- savedData.tickCarriedBy(player, stack); +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ final MapItemSavedData saved = getSavedData(stack, level); ++ if (saved == null) { ++ return; ++ } + +- if (!savedData.locked && (isSelected || entity instanceof Player && ((Player)entity).getOffhandItem() == stack)) { +- this.update(level, entity, savedData); +- } +- } ++ if (entity instanceof Player player) { ++ saved.tickCarriedBy(player, stack); + } ++ ++ if (!saved.locked && (isSelected || entity instanceof Player && ((Player)entity).getOffhandItem() == stack)) { ++ this.update(level, entity, saved); ++ } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +@@ -351,12 +353,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + MapItemSavedData savedData = getSavedData(context.getItemInHand(), context.getLevel()); + if (savedData != null && !savedData.toggleBanner(context.getLevel(), context.getClickedPos())) { + return InteractionResult.FAIL; + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/NameTagItem.java b/net/minecraft/world/item/NameTagItem.java +index 98fa29283994ec50c15591b13331bf9ae87683c6..5dcba028f300741ea4d867825d7731ec52dc4b6b 100644 +--- a/net/minecraft/world/item/NameTagItem.java ++++ b/net/minecraft/world/item/NameTagItem.java +@@ -17,7 +17,7 @@ public class NameTagItem extends Item { + public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity target, InteractionHand hand) { + Component component = stack.get(DataComponents.CUSTOM_NAME); + if (component != null && target.getType().canSerialize() && target.canBeNameTagged()) { +- if (!player.level().isClientSide && target.isAlive()) { ++ if (/*!player.level().isClientSide &&*/ target.isAlive()) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - Add PlayerNameEntityEvent + io.papermc.paper.event.player.PlayerNameEntityEvent event = new io.papermc.paper.event.player.PlayerNameEntityEvent(((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity(), target.getBukkitLivingEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(stack.getHoverName()), true); + if (!event.callEvent()) return InteractionResult.PASS; +diff --git a/net/minecraft/world/item/PotionItem.java b/net/minecraft/world/item/PotionItem.java +index 84b3a8d8f6aaba043d2e1560e55641ea5b89b112..bc699110863aca621f75a4b7be13352dfe0a6849 100644 +--- a/net/minecraft/world/item/PotionItem.java ++++ b/net/minecraft/world/item/PotionItem.java +@@ -51,7 +51,7 @@ public class PotionItem extends Item { + level.playSound(null, clickedPos, SoundEvents.GENERIC_SPLASH, SoundSource.BLOCKS, 1.0F, 1.0F); + player.setItemInHand(context.getHand(), ItemUtils.createFilledResult(itemInHand, player, new ItemStack(Items.GLASS_BOTTLE))); + player.awardStat(Stats.ITEM_USED.get(itemInHand.getItem())); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ServerLevel serverLevel = (ServerLevel)level; + + for (int i = 0; i < 5; i++) { +@@ -67,7 +67,7 @@ public class PotionItem extends Item { + 1.0 + ); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + level.playSound(null, clickedPos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PLACE, clickedPos); +diff --git a/net/minecraft/world/item/SaddleItem.java b/net/minecraft/world/item/SaddleItem.java +index 1586f0a53b1c71321105b3efd906bb7e388e2d18..2f1fc6b00d65a59d7c4da9bd618ed9490b278708 100644 +--- a/net/minecraft/world/item/SaddleItem.java ++++ b/net/minecraft/world/item/SaddleItem.java +@@ -16,10 +16,10 @@ public class SaddleItem extends Item { + @Override + public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity target, InteractionHand hand) { + if (target instanceof Saddleable saddleable && target.isAlive() && !saddleable.isSaddled() && saddleable.isSaddleable()) { +- if (!player.level().isClientSide) { ++ //if (!player.level().isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + saddleable.equipSaddle(stack.split(1), SoundSource.NEUTRAL); + target.level().gameEvent(target, GameEvent.EQUIP, target.position()); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/ScaffoldingBlockItem.java b/net/minecraft/world/item/ScaffoldingBlockItem.java +index f4973bbecb8067dc3cc6f0e1e3a170af8bb3a81a..69c9bd5e657053ea20d9cfbde63c2e06a55e607a 100644 +--- a/net/minecraft/world/item/ScaffoldingBlockItem.java ++++ b/net/minecraft/world/item/ScaffoldingBlockItem.java +@@ -39,7 +39,7 @@ public class ScaffoldingBlockItem extends BlockItem { + BlockPos.MutableBlockPos mutableBlockPos = clickedPos.mutable().move(direction); + + while (i < 7) { +- if (!level.isClientSide && !level.isInWorldBounds(mutableBlockPos)) { ++ if (/*!level.isClientSide &&*/ !level.isInWorldBounds(mutableBlockPos)) { // == true // Plazma - Remove isClientSide on DedicatedServer + Player player = context.getPlayer(); + int maxY = level.getMaxY(); + if (player instanceof ServerPlayer && mutableBlockPos.getY() > maxY) { +diff --git a/net/minecraft/world/item/ShearsItem.java b/net/minecraft/world/item/ShearsItem.java +index 9140b41f2ffef897b74792c916e8320a9a7afb7c..5662b9a60177f3a2e37632d44d3d5ea142af4edc 100644 +--- a/net/minecraft/world/item/ShearsItem.java ++++ b/net/minecraft/world/item/ShearsItem.java +@@ -44,7 +44,7 @@ public class ShearsItem extends Item { + + @Override + public boolean mineBlock(ItemStack stack, Level level, BlockState state, BlockPos pos, LivingEntity entityLiving) { +- if (!level.isClientSide && !state.is(BlockTags.FIRE)) { ++ if (/*!level.isClientSide &&*/ !state.is(BlockTags.FIRE)) { // == true // Plazma - Remove isClientSide on DedicatedServer + stack.hurtAndBreak(1, entityLiving, EquipmentSlot.MAINHAND); + } + +diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java +index 5ec778fcc33d93f6aba9f76c8736398791372a4a..a1846a96e5a5e8ea46a6d628e2aa11f0353d35d6 100644 +--- a/net/minecraft/world/item/ShovelItem.java ++++ b/net/minecraft/world/item/ShovelItem.java +@@ -55,9 +55,7 @@ public class ShovelItem extends DiggerItem { + // Purpur end - Tool actionable options + } else if (blockState.getBlock() instanceof CampfireBlock && blockState.getValue(CampfireBlock.LIT)) { + afterAction = () -> { // Paper +- if (!level.isClientSide()) { +- level.levelEvent(null, 1009, clickedPos, 0); +- } ++ level.levelEvent(null, 1009, clickedPos, 0); // Plazma - Remove isClientSide on DedicatedServer + + CampfireBlock.dowse(context.getPlayer(), level, clickedPos, blockState); + }; // Paper +@@ -65,7 +63,7 @@ public class ShovelItem extends DiggerItem { + } + + if (blockState2 != null) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), clickedPos, blockState2)) { + return InteractionResult.PASS; +@@ -77,7 +75,7 @@ public class ShovelItem extends DiggerItem { + if (player != null) { + context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/item/SignItem.java b/net/minecraft/world/item/SignItem.java +index fffac12db30d4321981959a9149cc56f8b4f6df6..24c45ef6d5e096efcdd734c38e8e5a739187d538 100644 +--- a/net/minecraft/world/item/SignItem.java ++++ b/net/minecraft/world/item/SignItem.java +@@ -23,8 +23,7 @@ public class SignItem extends StandingAndWallBlockItem { + @Override + protected boolean updateCustomBlockEntityTag(BlockPos pos, Level level, @Nullable Player player, ItemStack stack, BlockState state) { + boolean flag = super.updateCustomBlockEntityTag(pos, level, player, stack, state); +- if (!level.isClientSide +- && !flag ++ if (!flag // Plazma - Remove isClientSide on DedicatedServer + && player != null + && level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity + && level.getBlockState(pos).getBlock() instanceof SignBlock signBlock) { +diff --git a/net/minecraft/world/item/SolidBucketItem.java b/net/minecraft/world/item/SolidBucketItem.java +index a3fd0b49ff147ad623dddd8a4e8937d9cf19762b..24e15df31fd62d779522bbecac2eed60d67fbfb8 100644 +--- a/net/minecraft/world/item/SolidBucketItem.java ++++ b/net/minecraft/world/item/SolidBucketItem.java +@@ -40,9 +40,7 @@ public class SolidBucketItem extends BlockItem implements DispensibleContainerIt + @Override + public boolean emptyContents(@Nullable Player player, Level level, BlockPos pos, @Nullable BlockHitResult result) { + if (level.isInWorldBounds(pos) && level.isEmptyBlock(pos)) { +- if (!level.isClientSide) { +- level.setBlock(pos, this.getBlock().defaultBlockState(), 3); +- } ++ level.setBlock(pos, this.getBlock().defaultBlockState(), 3); // Plazma - Remove isClientSide on DedicatedServer + + level.gameEvent(player, GameEvent.FLUID_PLACE, pos); + level.playSound(player, pos, this.placeSound, SoundSource.BLOCKS, 1.0F, 1.0F); +diff --git a/net/minecraft/world/item/SpawnEggItem.java b/net/minecraft/world/item/SpawnEggItem.java +index f4728999e41ce01eefe6ce2f359a7c32a268105f..70d942693651b7eed1da47812ad023004df54553 100644 +--- a/net/minecraft/world/item/SpawnEggItem.java ++++ b/net/minecraft/world/item/SpawnEggItem.java +@@ -47,64 +47,59 @@ public class SpawnEggItem extends Item { + @Override + public InteractionResult useOn(UseOnContext context) { + Level level = context.getLevel(); +- if (level.isClientSide) { +- return InteractionResult.SUCCESS; +- } else { +- ItemStack itemInHand = context.getItemInHand(); +- BlockPos clickedPos = context.getClickedPos(); +- Direction clickedFace = context.getClickedFace(); +- BlockState blockState = level.getBlockState(clickedPos); +- if (level.getBlockEntity(clickedPos) instanceof Spawner spawner) { +- if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation +- EntityType type = this.getType(level.registryAccess(), itemInHand); +- // Purpur start - PlayerSetSpawnerTypeWithEggEvent +- if (spawner instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity) { +- org.bukkit.block.Block bukkitBlock = level.getWorld().getBlockAt(clickedPos.getX(), clickedPos.getY(), clickedPos.getZ()); +- org.purpurmc.purpur.event.PlayerSetSpawnerTypeWithEggEvent event = new org.purpurmc.purpur.event.PlayerSetSpawnerTypeWithEggEvent((org.bukkit.entity.Player) context.getPlayer().getBukkitEntity(), bukkitBlock, (org.bukkit.block.CreatureSpawner) bukkitBlock.getState(), org.bukkit.entity.EntityType.fromName(type.getName())); +- if (!event.callEvent()) { +- return InteractionResult.FAIL; +- } +- type = EntityType.getFromBukkitType(event.getEntityType()); +- } else if (spawner instanceof net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity) { +- org.bukkit.block.Block bukkitBlock = level.getWorld().getBlockAt(clickedPos.getX(), clickedPos.getY(), clickedPos.getZ()); +- org.purpurmc.purpur.event.PlayerSetTrialSpawnerTypeWithEggEvent event = new org.purpurmc.purpur.event.PlayerSetTrialSpawnerTypeWithEggEvent((org.bukkit.entity.Player) context.getPlayer().getBukkitEntity(), bukkitBlock, (org.bukkit.block.TrialSpawner) bukkitBlock.getState(), org.bukkit.entity.EntityType.fromName(type.getName())); +- if (!event.callEvent()) { +- return InteractionResult.FAIL; +- } +- type = EntityType.getFromBukkitType(event.getEntityType()); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ final ItemStack itemInHand = context.getItemInHand(); ++ final BlockPos clickedPos = context.getClickedPos(); ++ final Direction clickedFace = context.getClickedFace(); ++ final BlockState blockState = level.getBlockState(clickedPos); ++ ++ if (level.getBlockEntity(clickedPos) instanceof Spawner spawner) { ++ if (level.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) { // Paper - Allow disabling mob spawner spawn egg transformation ++ return InteractionResult.FAIL; ++ } ++ ++ EntityType type = this.getType(level.registryAccess(), itemInHand); ++ // Purpur start - PlayerSetSpawnerTypeWithEggEvent ++ if (spawner instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity) { ++ org.bukkit.block.Block bukkitBlock = level.getWorld().getBlockAt(clickedPos.getX(), clickedPos.getY(), clickedPos.getZ()); ++ org.purpurmc.purpur.event.PlayerSetSpawnerTypeWithEggEvent event = new org.purpurmc.purpur.event.PlayerSetSpawnerTypeWithEggEvent((org.bukkit.entity.Player) context.getPlayer().getBukkitEntity(), bukkitBlock, (org.bukkit.block.CreatureSpawner) bukkitBlock.getState(), org.bukkit.entity.EntityType.fromName(type.getName())); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; + } +- // Purpur end - PlayerSetSpawnerTypeWithEggEvent +- spawner.setEntityId(type, level.getRandom()); +- level.sendBlockUpdated(clickedPos, blockState, blockState, 3); +- level.gameEvent(context.getPlayer(), GameEvent.BLOCK_CHANGE, clickedPos); +- itemInHand.shrink(1); +- return InteractionResult.SUCCESS; +- } else { +- BlockPos blockPos; +- if (blockState.getCollisionShape(level, clickedPos).isEmpty()) { +- blockPos = clickedPos; +- } else { +- blockPos = clickedPos.relative(clickedFace); ++ type = EntityType.getFromBukkitType(event.getEntityType()); ++ } else if (spawner instanceof net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity) { ++ org.bukkit.block.Block bukkitBlock = level.getWorld().getBlockAt(clickedPos.getX(), clickedPos.getY(), clickedPos.getZ()); ++ org.purpurmc.purpur.event.PlayerSetTrialSpawnerTypeWithEggEvent event = new org.purpurmc.purpur.event.PlayerSetTrialSpawnerTypeWithEggEvent((org.bukkit.entity.Player) context.getPlayer().getBukkitEntity(), bukkitBlock, (org.bukkit.block.TrialSpawner) bukkitBlock.getState(), org.bukkit.entity.EntityType.fromName(type.getName())); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; + } ++ type = EntityType.getFromBukkitType(event.getEntityType()); ++ } ++ // Purpur end - PlayerSetSpawnerTypeWithEggEvent + +- EntityType type = this.getType(level.registryAccess(), itemInHand); +- if (type.spawn( +- (ServerLevel)level, +- itemInHand, +- context.getPlayer(), +- blockPos, +- EntitySpawnReason.SPAWN_ITEM_USE, +- true, +- !Objects.equals(clickedPos, blockPos) && clickedFace == Direction.UP +- ) +- != null) { +- itemInHand.shrink(1); +- level.gameEvent(context.getPlayer(), GameEvent.ENTITY_PLACE, clickedPos); +- } ++ spawner.setEntityId(type, level.getRandom()); ++ level.sendBlockUpdated(clickedPos, blockState, blockState, 3); ++ level.gameEvent(context.getPlayer(), GameEvent.BLOCK_CHANGE, clickedPos); ++ itemInHand.shrink(1); + +- return InteractionResult.SUCCESS; +- } ++ return InteractionResult.SUCCESS; ++ } ++ ++ final BlockPos blockPos; ++ if (blockState.getCollisionShape(level, clickedPos).isEmpty()) { ++ blockPos = clickedPos; ++ } else { ++ blockPos = clickedPos.relative(clickedFace); ++ } ++ ++ final EntityType type = this.getType(level.registryAccess(), itemInHand); ++ if (type.spawn((ServerLevel) level, itemInHand, context.getPlayer(), blockPos, EntitySpawnReason.SPAWN_ITEM_USE, true, !Objects.equals(clickedPos, blockPos) && clickedFace == Direction.UP) != null) { ++ itemInHand.shrink(1); ++ level.gameEvent(context.getPlayer(), GameEvent.ENTITY_PLACE, clickedPos); + } ++ ++ return InteractionResult.SUCCESS; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/item/component/Consumable.java b/net/minecraft/world/item/component/Consumable.java +index bab1b98f6d51d867fbe986e731d8a6b2ff00573b..cd1897dd9a7ea209e4368cc0d8063cdd322dd011 100644 +--- a/net/minecraft/world/item/component/Consumable.java ++++ b/net/minecraft/world/item/component/Consumable.java +@@ -83,7 +83,7 @@ public record Consumable( + } + + stack.getAllOfType(ConsumableListener.class).forEach(consumableListener -> consumableListener.onConsume(level, entity, stack, this)); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause; + if (stack.is(net.minecraft.world.item.Items.MILK_BUCKET)) { +@@ -96,7 +96,7 @@ public record Consumable( + + this.onConsumeEffects.forEach(consumeEffect -> consumeEffect.apply(level, stack, entity, cause)); + // CraftBukkit end +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + entity.gameEvent(this.animation == ItemUseAnimation.DRINK ? GameEvent.DRINK : GameEvent.EAT); + stack.consume(1, entity); +diff --git a/net/minecraft/world/item/equipment/Equippable.java b/net/minecraft/world/item/equipment/Equippable.java +index 8c4b15b072d299082c14fcbdc8f753f57fdaa6b2..13d670bfca586be36ff58fcba4d277c9503d8414 100644 +--- a/net/minecraft/world/item/equipment/Equippable.java ++++ b/net/minecraft/world/item/equipment/Equippable.java +@@ -86,9 +86,7 @@ public record Equippable( + ItemStack itemBySlot = player.getItemBySlot(this.slot); + if ((!EnchantmentHelper.has(itemBySlot, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE) || player.isCreative()) + && !ItemStack.isSameItemSameComponents(stack, itemBySlot)) { +- if (!player.level().isClientSide()) { +- player.awardStat(Stats.ITEM_USED.get(stack.getItem())); +- } ++ player.awardStat(Stats.ITEM_USED.get(stack.getItem())); // Plazma - Remove isClientSide on DedicatedServer + + if (stack.getCount() <= 1) { + ItemStack itemStack = itemBySlot.isEmpty() ? stack : itemBySlot.copyAndClear(); +diff --git a/net/minecraft/world/item/trading/Merchant.java b/net/minecraft/world/item/trading/Merchant.java +index 24e93da7b46ec01a88c468d25b2b6cccc0d50f0e..5be4c4b7abf3d2cfb16ac64be8ba7e7482c1a648 100644 +--- a/net/minecraft/world/item/trading/Merchant.java ++++ b/net/minecraft/world/item/trading/Merchant.java +@@ -48,7 +48,7 @@ public interface Merchant { + } + } + +- boolean isClientSide(); ++ //boolean isClientSide(); // Plazma - Remove isClientSide on DedicatedServer + + boolean stillValid(Player player); + +diff --git a/net/minecraft/world/level/BaseCommandBlock.java b/net/minecraft/world/level/BaseCommandBlock.java +index a67d40eb4bfa85888af8bf027a8859378d290cfa..b502b8615266f85f018b5ed83f39ed5fd4967813 100644 +--- a/net/minecraft/world/level/BaseCommandBlock.java ++++ b/net/minecraft/world/level/BaseCommandBlock.java +@@ -114,7 +114,7 @@ public abstract class BaseCommandBlock implements CommandSource { + } + + public boolean performCommand(Level level) { +- if (level.isClientSide || level.getGameTime() == this.lastExecution) { ++ if (/*level.isClientSide ||*/ level.getGameTime() == this.lastExecution) { // Plazma - Remove isClientSide on DedicatedServer + return false; + } else if ("Searge".equalsIgnoreCase(this.command)) { + this.lastOutput = Component.literal("#itzlipofutzli"); +@@ -193,9 +193,10 @@ public abstract class BaseCommandBlock implements CommandSource { + if (!player.canUseGameMasterBlocks() && (!player.isCreative() || !player.getBukkitEntity().hasPermission("minecraft.commandblock"))) { // Paper - command block permission + return InteractionResult.PASS; + } else { +- if (player.getCommandSenderWorld().isClientSide) { ++ /*if (player.getCommandSenderWorld().isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + player.openMinecartCommandBlock(this); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java +index 8de482367f3d9d91048b7c85cbaefcda9f9fbcdc..05f1d1590d87c3548c724970eb82afda56932bf8 100644 +--- a/net/minecraft/world/level/BaseSpawner.java ++++ b/net/minecraft/world/level/BaseSpawner.java +@@ -56,6 +56,7 @@ public abstract class BaseSpawner { + return level.hasNearbyAlivePlayerThatAffectsSpawning(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, this.requiredPlayerRange); // Paper - Affects Spawning API + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void clientTick(Level level, BlockPos pos) { + if (!this.isNearPlayer(level, pos)) { + this.oSpin = this.spin; +@@ -74,6 +75,7 @@ public abstract class BaseSpawner { + this.spin = (this.spin + 1000.0F / (this.spawnDelay + 200.0F)) % 360.0; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void serverTick(ServerLevel serverLevel, BlockPos pos) { + if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick +@@ -322,15 +324,7 @@ public abstract class BaseSpawner { + } + + public boolean onEventTriggered(Level level, int id) { +- if (id == 1) { +- if (level.isClientSide) { +- this.spawnDelay = this.minSpawnDelay; +- } +- +- return true; +- } else { +- return false; +- } ++ return id == 1; // Plazma - Remove isClientSide on DedicatedServer + } + + public void setNextSpawnData(@Nullable Level level, BlockPos pos, SpawnData nextSpawnData) { +diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java +index d350909d37966ecb9e55bf7706b675a18c76e49d..a8375d783280a1b6635ca2bd1768553cdc3d023d 100644 +--- a/net/minecraft/world/level/Level.java ++++ b/net/minecraft/world/level/Level.java +@@ -126,7 +126,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 isClientSide on DedicatedServer + private final WorldBorder worldBorder; + private final BiomeManager biomeManager; + private final ResourceKey dimension; +@@ -872,7 +872,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + ResourceKey dimension, + RegistryAccess registryAccess, + Holder dimensionTypeRegistration, +- boolean isClientSide, ++ //boolean isClientSide, // Plazma - Remove isClientSide on DedicatedServer + boolean isDebug, + long biomeZoomSeed, + int maxChainedNeighborUpdates, +@@ -912,7 +912,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + this.dimensionTypeRegistration = dimensionTypeRegistration; + final DimensionType dimensionType = dimensionTypeRegistration.value(); + this.dimension = dimension; +- this.isClientSide = isClientSide; ++ //this.isClientSide = isClientSide; // Plazma - Remove isClientSide on DedicatedServer + if (dimensionType.coordinateScale() != 1.0) { + this.worldBorder = new WorldBorder() { + @Override +@@ -1018,10 +1018,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + } + // Paper end - Cancel hit for vanished players + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return this.isClientSide; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Nullable + @Override +@@ -1164,7 +1166,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + return false; + } + +- if (!this.isClientSide && this.isDebug()) { ++ if (/*!this.isClientSide &&*/ this.isDebug()) { // == true // Plazma - Remove isClientSide on DedicatedServer + return false; + } + +@@ -1223,13 +1225,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + this.setBlocksDirty(blockPos, oldBlock, actualBlock); + } + +- 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 isClientSide on DedicatedServer + this.sendBlockUpdated(blockPos, oldBlock, newBlock, i); + } + + if ((i & 1) != 0) { + this.blockUpdated(blockPos, oldBlock.getBlock()); +- if (!this.isClientSide && newBlock.hasAnalogOutputSignal()) { ++ if (/*!this.isClientSide &&*/ newBlock.hasAnalogOutputSignal()) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.updateNeighbourForOutputSignal(blockPos, newBlock.getBlock()); + } + } +@@ -1445,15 +1447,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + this.playSeededSound(player, entity, BuiltInRegistries.SOUND_EVENT.wrapAsHolder(event), category, volume, pitch, this.threadSafeRandom.nextLong()); + } + +- public void playLocalSound(BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch, boolean distanceDelay) { ++ // /* // Plazma - Remove isClientSide on DedicatedServer ++ @Deprecated(forRemoval = true) ++ @org.jetbrains.annotations.ApiStatus.Experimental ++ @io.papermc.paper.annotation.DoNotUse ++ public void playLocalSound(BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch, boolean distanceDelay) throws IOException { + this.playLocalSound(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, sound, category, volume, pitch, distanceDelay); + } + +- public void playLocalSound(Entity entity, SoundEvent sound, SoundSource category, float volume, float pitch) { ++ @Deprecated(forRemoval = true) ++ @org.jetbrains.annotations.ApiStatus.Experimental ++ @io.papermc.paper.annotation.DoNotUse ++ public void playLocalSound(Entity entity, SoundEvent sound, SoundSource category, float volume, float pitch) throws IOException { + } + +- public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource category, float volume, float pitch, boolean distanceDelay) { ++ @Deprecated(forRemoval = true) ++ @org.jetbrains.annotations.ApiStatus.Experimental ++ @io.papermc.paper.annotation.DoNotUse ++ public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource category, float volume, float pitch, boolean distanceDelay) throws IOException { + } ++ // */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void addParticle(ParticleOptions particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { +@@ -1680,7 +1693,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + if (this.isOutsideBuildHeight(pos)) { + return null; + } else { +- return !this.isClientSide && !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() // Paper - rewrite chunk system ++ return /*!this.isClientSide &&*/ !ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() // Paper - rewrite chunk system // == true // Plazma - Remove isClientSide on DedicatedServer + ? null + : this.getChunkAt(pos).getBlockEntity(pos, LevelChunk.EntityCreationType.IMMEDIATE); + } +@@ -2037,9 +2050,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + return this.worldBorder; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void sendPacketToServer(Packet packet) { + throw new UnsupportedOperationException("Can't send packets to server unless you're on the client."); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public DimensionType dimensionType() { +diff --git a/net/minecraft/world/level/LevelReader.java b/net/minecraft/world/level/LevelReader.java +index 26c8c1e5598daf3550aef05b12218c47bda6618b..2239ff6fff38160fd7a0e11887d56859e89229e1 100644 +--- a/net/minecraft/world/level/LevelReader.java ++++ b/net/minecraft/world/level/LevelReader.java +@@ -76,7 +76,7 @@ public interface LevelReader extends ca.spottedleaf.moonrise.patches.chunk_syste + + Holder getUncachedNoiseBiome(int x, int y, int z); + +- boolean isClientSide(); ++ //boolean isClientSide(); // Plazma - Remove isClientSide on DedicatedServer + + int getSeaLevel(); + +diff --git a/net/minecraft/world/level/block/AbstractCandleBlock.java b/net/minecraft/world/level/block/AbstractCandleBlock.java +index 484519183837e2051e0728c52560b86ff7baafe3..c354612806933e0317e4aadbdb63b7d12d3ebf07 100644 +--- a/net/minecraft/world/level/block/AbstractCandleBlock.java ++++ b/net/minecraft/world/level/block/AbstractCandleBlock.java +@@ -43,7 +43,7 @@ public abstract class AbstractCandleBlock extends Block { + + @Override + protected void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) { +- if (!level.isClientSide && projectile.isOnFire() && this.canBeLit(state)) { ++ if (/*!level.isClientSide &&*/ projectile.isOnFire() && this.canBeLit(state)) { // == true // Plazma - Remove isClientSide on DedicatedServer + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(level, hit.getBlockPos(), projectile).isCancelled()) { + return; +@@ -57,6 +57,7 @@ public abstract class AbstractCandleBlock extends Block { + return !state.getValue(LIT); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -84,6 +85,7 @@ public abstract class AbstractCandleBlock extends Block { + + level.addParticle(ParticleTypes.SMALL_FLAME, offset.x, offset.y, offset.z, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void extinguish(@Nullable Player player, BlockState state, LevelAccessor level, BlockPos pos) { + setLit(level, state, pos, false); +diff --git a/net/minecraft/world/level/block/AbstractFurnaceBlock.java b/net/minecraft/world/level/block/AbstractFurnaceBlock.java +index 4d86ec41ee0cd32d7be90e32b1387473444c5159..376e7402cabe3045356a4cdbd859bd2cc37f4741 100644 +--- a/net/minecraft/world/level/block/AbstractFurnaceBlock.java ++++ b/net/minecraft/world/level/block/AbstractFurnaceBlock.java +@@ -38,9 +38,7 @@ public abstract class AbstractFurnaceBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- this.openContainer(level, pos, player); +- } ++ this.openContainer(level, pos, player); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/AbstractSkullBlock.java b/net/minecraft/world/level/block/AbstractSkullBlock.java +index ab8c39457a4b0167ee9f486a9c43591adf95f538..5d4d41ecdfa61011239c5c09edd0bb877bb801f4 100644 +--- a/net/minecraft/world/level/block/AbstractSkullBlock.java ++++ b/net/minecraft/world/level/block/AbstractSkullBlock.java +@@ -38,7 +38,7 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + boolean flag = state.is(Blocks.DRAGON_HEAD) + || state.is(Blocks.DRAGON_WALL_HEAD) + || state.is(Blocks.PIGLIN_HEAD) +@@ -47,6 +47,7 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { + return createTickerHelper(blockEntityType, BlockEntityType.SKULL, SkullBlockEntity::animation); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + return null; + } +@@ -72,11 +73,11 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean hasNeighborSignal = level.hasNeighborSignal(pos); + if (hasNeighborSignal != state.getValue(POWERED)) { + level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 2); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/level/block/AmethystBlock.java b/net/minecraft/world/level/block/AmethystBlock.java +index f9eb3bf4767d8acf5cd5166a30dee6fcd3ac782b..e692fb59f448c7bd71f934a5bfad92954ce026f5 100644 +--- a/net/minecraft/world/level/block/AmethystBlock.java ++++ b/net/minecraft/world/level/block/AmethystBlock.java +@@ -24,9 +24,9 @@ public class AmethystBlock extends Block { + + @Override + protected void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = hit.getBlockPos(); + level.playSound(null, blockPos, SoundEvents.AMETHYST_BLOCK_CHIME, SoundSource.BLOCKS, 1.0F, 0.5F + level.random.nextFloat() * 1.2F); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java +index c2eaacb4657d7329cc16e4f3d36fa545c7e4c2b7..659fbcdc48c9649bd0fc61addf6ea7bbfd0c4046 100644 +--- a/net/minecraft/world/level/block/AnvilBlock.java ++++ b/net/minecraft/world/level/block/AnvilBlock.java +@@ -108,11 +108,7 @@ public class AnvilBlock extends FallingBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- if (player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_ANVIL); +- } // Paper - Fix InventoryOpenEvent cancellation +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_ANVIL)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/BaseFireBlock.java b/net/minecraft/world/level/block/BaseFireBlock.java +index 45df9f008b74dd0d6d790c91102e9afe1da45633..0881304061231aa71a17cf939f5c8bcf8253f07b 100644 +--- a/net/minecraft/world/level/block/BaseFireBlock.java ++++ b/net/minecraft/world/level/block/BaseFireBlock.java +@@ -53,6 +53,7 @@ public abstract class BaseFireBlock extends Block { + return DOWN_AABB; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(24) == 0) { +@@ -124,6 +125,7 @@ public abstract class BaseFireBlock extends Block { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + protected abstract boolean canBurn(BlockState state); + +@@ -185,9 +187,7 @@ public abstract class BaseFireBlock extends Block { + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide()) { +- level.levelEvent(null, 1009, pos, 0); +- } ++ level.levelEvent(null, 1009, pos, 0); // Plazma - Remove isClientSide on DedicatedServer + + return super.playerWillDestroy(level, pos, state, player); + } +diff --git a/net/minecraft/world/level/block/BasePressurePlateBlock.java b/net/minecraft/world/level/block/BasePressurePlateBlock.java +index 108c1d23bf80777b943edfa0b5585ebb928540a7..af97e7611b9118e05d9a45ae3373cf765cb1cebe 100644 +--- a/net/minecraft/world/level/block/BasePressurePlateBlock.java ++++ b/net/minecraft/world/level/block/BasePressurePlateBlock.java +@@ -82,12 +82,12 @@ public abstract class BasePressurePlateBlock extends Block { + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + int signalForState = this.getSignalForState(state); + if (signalForState == 0) { + this.checkPressed(entity, level, pos, state, signalForState); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + private void checkPressed(@Nullable Entity entity, Level level, BlockPos pos, BlockState state, int currentSignal) { +diff --git a/net/minecraft/world/level/block/BaseRailBlock.java b/net/minecraft/world/level/block/BaseRailBlock.java +index 0bda61a031fff2a01fd03fd52129f4e3733b9d1f..4236d522c15cbc1b391665254597e4f84ed5054a 100644 +--- a/net/minecraft/world/level/block/BaseRailBlock.java ++++ b/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 level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide && level.getBlockState(pos).is(this)) { ++ if (/*!level.isClientSide &&*/ level.getBlockState(pos).is(this)) { // == true // Plazma - Remove isClientSide on DedicatedServer + RailShape railShape = state.getValue(this.getShapeProperty()); + if (shouldBeRemoved(pos, level, railShape)) { + dropResources(state, level, pos); +@@ -113,12 +113,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl + } + + protected BlockState updateDir(Level level, BlockPos pos, BlockState state, boolean alwaysPlace) { +- if (level.isClientSide) { +- return state; +- } else { +- RailShape railShape = state.getValue(this.getShapeProperty()); +- return new RailState(level, pos, state).place(level.hasNeighborSignal(pos), alwaysPlace, railShape).getState(); +- } ++ return new RailState(level, pos, state).place(level.hasNeighborSignal(pos), alwaysPlace, state.getValue(this.getShapeProperty())).getState(); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/BeaconBlock.java b/net/minecraft/world/level/block/BeaconBlock.java +index 66eee067b4ffdd72393ca813de995062be5b7a90..efe8d910403bd46db96f93ba230bd652720ae2f9 100644 +--- a/net/minecraft/world/level/block/BeaconBlock.java ++++ b/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 level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) instanceof BeaconBlockEntity beaconBlockEntity && player.openMenu(beaconBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) instanceof BeaconBlockEntity beaconBlockEntity && player.openMenu(beaconBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // == true // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(Stats.INTERACT_WITH_BEACON); + } + +diff --git a/net/minecraft/world/level/block/BedBlock.java b/net/minecraft/world/level/block/BedBlock.java +index e242c616ed481f8809d043d0b629f73a3037e19f..815bc4eb94c01f59ef979b496ef6b9f0479daae6 100644 +--- a/net/minecraft/world/level/block/BedBlock.java ++++ b/net/minecraft/world/level/block/BedBlock.java +@@ -81,61 +81,54 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (level.isClientSide) { +- return InteractionResult.SUCCESS_SERVER; +- } else { +- if (state.getValue(PART) != BedPart.HEAD) { +- pos = pos.relative(state.getValue(FACING)); +- state = level.getBlockState(pos); +- if (!state.is(this)) { +- return InteractionResult.CONSUME; +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (state.getValue(PART) != BedPart.HEAD) { ++ pos = pos.relative(state.getValue(FACING)); ++ state = level.getBlockState(pos); ++ if (!state.is(this)) { ++ return InteractionResult.CONSUME; + } ++ } + +- if (false && !canSetSpawn(level)) { // CraftBukkit - moved world and biome check into Player +- level.removeBlock(pos, false); +- BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite()); +- if (level.getBlockState(blockPos).is(this)) { +- level.removeBlock(blockPos, false); +- } +- +- Vec3 center = pos.getCenter(); +- if (level.purpurConfig.bedExplode) level.explode(null, level.damageSources().badRespawnPointExplosion(center), null, center, (float) level.purpurConfig.bedExplosionPower, level.purpurConfig.bedExplosionFire, level.purpurConfig.bedExplosionEffect); // Purpur - Implement bed explosion options +- return InteractionResult.SUCCESS_SERVER; +- } else if (state.getValue(OCCUPIED)) { +- if (!BedBlock.canSetSpawn(level)) return this.explodeBed(state, level, pos); // Paper - check explode first +- if (!this.kickVillagerOutOfBed(level, pos)) { +- player.displayClientMessage(Component.translatable("block.minecraft.bed.occupied"), true); +- } ++ if (state.getValue(OCCUPIED)) { ++ if (!BedBlock.canSetSpawn(level)) { // Paper - check explodes first ++ return this.explodeBed(state, level, pos); ++ } + +- return InteractionResult.SUCCESS_SERVER; +- } else { +- // CraftBukkit start +- final BlockState finalBlockState = state; +- final BlockPos finalBlockPos = pos; +- // CraftBukkit end +- player.startSleepInBed(pos).ifLeft(bedSleepingProblem -> { +- // Paper start - PlayerBedFailEnterEvent +- if (bedSleepingProblem != null) { +- io.papermc.paper.event.player.PlayerBedFailEnterEvent event = new io.papermc.paper.event.player.PlayerBedFailEnterEvent((org.bukkit.entity.Player) player.getBukkitEntity(), io.papermc.paper.event.player.PlayerBedFailEnterEvent.FailReason.values()[bedSleepingProblem.ordinal()], org.bukkit.craftbukkit.block.CraftBlock.at(level, finalBlockPos), !level.dimensionType().bedWorks(), io.papermc.paper.adventure.PaperAdventure.asAdventure(bedSleepingProblem.getMessage())); +- if (!event.callEvent()) { +- return; +- } +- // Paper end - PlayerBedFailEnterEvent +- // CraftBukkit start - handling bed explosion from below here +- if (event.getWillExplode()) { // Paper - PlayerBedFailEnterEvent +- this.explodeBed(finalBlockState, level, finalBlockPos); +- } else +- // CraftBukkit end +- if (bedSleepingProblem.getMessage() != null) { +- final net.kyori.adventure.text.Component message = event.getMessage(); // Paper - PlayerBedFailEnterEvent +- if (message != null) player.displayClientMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(message), true); // Paper - PlayerBedFailEnterEvent +- } +- } // Paper - PlayerBedFailEnterEvent +- }); +- return InteractionResult.SUCCESS_SERVER; ++ if (!this.kickVillagerOutOfBed(level, pos)) { ++ player.displayClientMessage(Component.translatable("block.minecraft.bed.occupied"), true); + } ++ ++ return InteractionResult.SUCCESS_SERVER; + } ++ ++ // CraftBukkit start ++ final BlockState finalBlockState = state; ++ final BlockPos finalBlockPos = pos; ++ // CraftBukkit end ++ ++ player.startSleepInBed(pos).ifLeft(bedSleepingProblem -> { ++ // Paper start - PlayerBedFailEnterEvent ++ if (bedSleepingProblem == null) { ++ return; ++ } ++ ++ io.papermc.paper.event.player.PlayerBedFailEnterEvent event = new io.papermc.paper.event.player.PlayerBedFailEnterEvent((org.bukkit.entity.Player) player.getBukkitEntity(), io.papermc.paper.event.player.PlayerBedFailEnterEvent.FailReason.values()[bedSleepingProblem.ordinal()], org.bukkit.craftbukkit.block.CraftBlock.at(level, finalBlockPos), !level.dimensionType().bedWorks(), io.papermc.paper.adventure.PaperAdventure.asAdventure(bedSleepingProblem.getMessage())); ++ if (!event.callEvent()) { ++ return; ++ } ++ // Paper end - PlayerBedFailEnterEvent ++ ++ // CraftBukkit start - handling bed explosion from below here ++ if (event.getWillExplode()) { // Paper - PlayerBedFailEnterEvent ++ this.explodeBed(finalBlockState, level, finalBlockPos); ++ } else /* CraftBukkit end */ if (bedSleepingProblem.getMessage() != null) { ++ final net.kyori.adventure.text.Component message = event.getMessage(); // Paper - PlayerBedFailEnterEvent ++ if (message != null) player.displayClientMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(message), true); // Paper - PlayerBedFailEnterEvent ++ } ++ }); ++ return InteractionResult.SUCCESS_SERVER; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + // CraftBukkit start - Copied from the above method +@@ -215,7 +208,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide && player.isCreative()) { ++ if (/*!level.isClientSide &&*/ player.isCreative()) { // == true // Plazma - Remove isClientSide on DedicatedServer + BedPart bedPart = state.getValue(PART); + if (bedPart == BedPart.FOOT) { + BlockPos blockPos = pos.relative(getNeighbourDirection(bedPart, state.getValue(FACING))); +@@ -342,7 +335,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { + super.setPlacedBy(level, pos, state, placer, stack); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = pos.relative(state.getValue(FACING)); + level.setBlock(blockPos, state.setValue(PART, BedPart.HEAD), 3); + // CraftBukkit start - SPIGOT-7315: Don't updated if we capture block states +@@ -352,7 +345,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock + // CraftBukkit end + level.blockUpdated(pos, Blocks.AIR); + state.updateNeighbourShapes(level, pos, 3); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public DyeColor getColor() { +diff --git a/net/minecraft/world/level/block/BeehiveBlock.java b/net/minecraft/world/level/block/BeehiveBlock.java +index 8da3a058443a2b54f1d75344e086fbea54261855..8aa44d6fc377c413ed7849818f42352ef7f7ce7c 100644 +--- a/net/minecraft/world/level/block/BeehiveBlock.java ++++ b/net/minecraft/world/level/block/BeehiveBlock.java +@@ -93,7 +93,7 @@ public class BeehiveBlock extends BaseEntityBlock { + @Override + public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity te, ItemStack stack, boolean includeDrops, boolean dropExp) { // Paper - fix drops not preventing stats/food exhaustion + super.playerDestroy(level, player, pos, state, te, stack, includeDrops, dropExp); // Paper - fix drops not preventing stats/food exhaustion +- if (!level.isClientSide && te instanceof BeehiveBlockEntity beehiveBlockEntity) { ++ if (/*!level.isClientSide &&*/ te instanceof BeehiveBlockEntity beehiveBlockEntity) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (!EnchantmentHelper.hasTag(stack, EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MINING)) { + beehiveBlockEntity.emptyAllLivingFromHive(player, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); + level.updateNeighbourForOutputSignal(pos, this); +@@ -170,7 +170,7 @@ public class BeehiveBlock extends BaseEntityBlock { + level.gameEvent(player, GameEvent.FLUID_PICKUP, pos); + } + +- if (!level.isClientSide() && flag) { ++ if (/*!level.isClientSide() &&*/ flag) { // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(Stats.ITEM_USED.get(item)); + } + } +@@ -209,6 +209,7 @@ public class BeehiveBlock extends BaseEntityBlock { + level.setBlock(pos, state.setValue(HONEY_LEVEL, 0), 3); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(HONEY_LEVEL) >= 5) { +@@ -261,6 +262,7 @@ public class BeehiveBlock extends BaseEntityBlock { + 0.0 + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +@@ -281,7 +283,7 @@ public class BeehiveBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.BEEHIVE, BeehiveBlockEntity::serverTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.BEEHIVE, BeehiveBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/BellBlock.java b/net/minecraft/world/level/block/BellBlock.java +index df4ceccf2351ba4432ec19303512211105f3acd3..75bbd2d4033928503f408e6233320f02467b5222 100644 +--- a/net/minecraft/world/level/block/BellBlock.java ++++ b/net/minecraft/world/level/block/BellBlock.java +@@ -137,7 +137,7 @@ public class BellBlock extends BaseEntityBlock { + + public boolean attemptToRing(@Nullable Entity entity, Level level, BlockPos pos, @Nullable Direction direction) { + BlockEntity blockEntity = level.getBlockEntity(pos); +- if (!level.isClientSide && blockEntity instanceof BellBlockEntity) { ++ if (/*!level.isClientSide &&*/ blockEntity instanceof BellBlockEntity) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (direction == null) { + direction = level.getBlockState(pos).getValue(FACING); + } +@@ -296,7 +296,7 @@ public class BellBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return createTickerHelper(blockEntityType, BlockEntityType.BELL, level.isClientSide ? BellBlockEntity::clientTick : BellBlockEntity::serverTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.BELL, BellBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/BigDripleafBlock.java b/net/minecraft/world/level/block/BigDripleafBlock.java +index 0ac279c0eaf21fe6013b480422a05c7dad16bc4d..a27d846ed7f321a04c458d703a7a0adb8e6381f9 100644 +--- a/net/minecraft/world/level/block/BigDripleafBlock.java ++++ b/net/minecraft/world/level/block/BigDripleafBlock.java +@@ -200,24 +200,29 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide) { +- if (state.getValue(TILT) == Tilt.NONE && canEntityTilt(pos, entity) && !level.hasNeighborSignal(pos)) { +- // CraftBukkit start - tilt dripleaf +- org.bukkit.event.Cancellable cancellable; +- if (entity instanceof net.minecraft.world.entity.player.Player player) { +- cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(player, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null); +- } else { +- cancellable = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); +- level.getCraftServer().getPluginManager().callEvent((org.bukkit.event.entity.EntityInteractEvent) cancellable); +- } +- +- if (cancellable.isCancelled()) { +- return; +- } +- this.setTiltAndScheduleTick(state, level, pos, Tilt.UNSTABLE, null, entity); +- // CraftBukkit end +- } ++ ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (state.getValue(TILT) != Tilt.NONE || !canEntityTilt(pos, entity) || level.hasNeighborSignal(pos)) { ++ return; ++ } ++ ++ // CraftBukkit start - tilt dripleaf ++ final org.bukkit.event.Cancellable cancellable; ++ if (entity instanceof net.minecraft.world.entity.player.Player player) { ++ cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(player, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null); ++ } else { ++ cancellable = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); ++ level.getCraftServer().getPluginManager().callEvent((org.bukkit.event.entity.EntityInteractEvent) cancellable); + } ++ ++ if (cancellable.isCancelled()) { ++ return; ++ } ++ ++ this.setTiltAndScheduleTick(state, level, pos, Tilt.UNSTABLE, null, entity); ++ // CraftBukkit end ++ ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/BlastFurnaceBlock.java b/net/minecraft/world/level/block/BlastFurnaceBlock.java +index 7e2ba95d5f2a33e9f6e4b333d6321098de15e449..fc7a4b4a80c60d13eadbbfa830d7ff0c7a805033 100644 +--- a/net/minecraft/world/level/block/BlastFurnaceBlock.java ++++ b/net/minecraft/world/level/block/BlastFurnaceBlock.java +@@ -50,6 +50,7 @@ public class BlastFurnaceBlock extends AbstractFurnaceBlock { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -70,4 +71,5 @@ public class BlastFurnaceBlock extends AbstractFurnaceBlock { + level.addParticle(ParticleTypes.SMOKE, d + d5, d1 + d6, d2 + d7, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java +index d9d3566971d5de25dfd926fac4dd90dd0c48680f..086d8a0ca1a0ff0155eb56e3d50a87f83fbe2324 100644 +--- a/net/minecraft/world/level/block/Block.java ++++ b/net/minecraft/world/level/block/Block.java +@@ -183,9 +183,7 @@ public class Block extends BlockBehaviour implements ItemLike { + public static void updateOrDestroy(BlockState oldState, BlockState newState, LevelAccessor level, BlockPos pos, int flags, int recursionLeft) { + if (newState != oldState) { + if (newState.isAir()) { +- if (!level.isClientSide()) { +- level.destroyBlock(pos, (flags & 32) == 0, null, recursionLeft); +- } ++ level.destroyBlock(pos, (flags & 32) == 0, null, recursionLeft); // Plazma - Remove isClientSide on DedicatedServer + } else { + level.setBlock(pos, newState, flags & -33, recursionLeft); + } +@@ -266,8 +264,10 @@ public class Block extends BlockBehaviour implements ItemLike { + return ((ca.spottedleaf.moonrise.patches.collisions.shape.CollisionVoxelShape)shape).moonrise$isFullBlock(); // Paper - optimise collisions + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + } +diff --git a/net/minecraft/world/level/block/BrewingStandBlock.java b/net/minecraft/world/level/block/BrewingStandBlock.java +index 1bcdebba2b2b4c7a893d10653db6ea8ffa8fd1db..5ed44d6bf2dfe93137da996cfcc226bb5c96483f 100644 +--- a/net/minecraft/world/level/block/BrewingStandBlock.java ++++ b/net/minecraft/world/level/block/BrewingStandBlock.java +@@ -58,7 +58,7 @@ public class BrewingStandBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.BREWING_STAND, BrewingStandBlockEntity::serverTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.BREWING_STAND, BrewingStandBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -68,13 +68,14 @@ public class BrewingStandBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) instanceof BrewingStandBlockEntity brewingStandBlockEntity && player.openMenu(brewingStandBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) instanceof BrewingStandBlockEntity brewingStandBlockEntity && player.openMenu(brewingStandBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // == true // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(Stats.INTERACT_WITH_BREWINGSTAND); + } + + return InteractionResult.SUCCESS; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + double d = pos.getX() + 0.4 + random.nextFloat() * 0.2; +@@ -82,6 +83,7 @@ public class BrewingStandBlock extends BaseEntityBlock { + double d2 = pos.getZ() + 0.4 + random.nextFloat() * 0.2; + level.addParticle(ParticleTypes.SMOKE, d, d1, d2, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { +diff --git a/net/minecraft/world/level/block/BrushableBlock.java b/net/minecraft/world/level/block/BrushableBlock.java +index 3055312b2ac12ebce290f680d7a87d6bca7431b9..dad56d839c632578b6b503addace8744e74a6f4b 100644 +--- a/net/minecraft/world/level/block/BrushableBlock.java ++++ b/net/minecraft/world/level/block/BrushableBlock.java +@@ -98,6 +98,7 @@ public class BrushableBlock extends BaseEntityBlock implements Fallable { + level.gameEvent(fallingBlock, GameEvent.BLOCK_DESTROY, center); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(16) == 0) { +@@ -110,6 +111,7 @@ public class BrushableBlock extends BaseEntityBlock implements Fallable { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Nullable + @Override +diff --git a/net/minecraft/world/level/block/BubbleColumnBlock.java b/net/minecraft/world/level/block/BubbleColumnBlock.java +index be01261dbaebc8727926e641cdd431ecb3a2bd02..54c40397b7f4f344648da08127f9e1319e20702f 100644 +--- a/net/minecraft/world/level/block/BubbleColumnBlock.java ++++ b/net/minecraft/world/level/block/BubbleColumnBlock.java +@@ -52,7 +52,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { + BlockState blockState = level.getBlockState(pos.above()); + if (blockState.isAir()) { + entity.onAboveBubbleCol(state.getValue(DRAG_DOWN)); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ServerLevel serverLevel = (ServerLevel)level; + + for (int i = 0; i < 2; i++) { +@@ -79,7 +79,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { + 0.2 + ); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } else { + entity.onInsideBubbleColumn(state.getValue(DRAG_DOWN)); + } +@@ -132,6 +132,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + double d = pos.getX(); +@@ -170,6 +171,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { + } + } + } ++ */ + + @Override + protected BlockState updateShape( +diff --git a/net/minecraft/world/level/block/ButtonBlock.java b/net/minecraft/world/level/block/ButtonBlock.java +index 7ed884d8d2081ad2e93e68f71cfb0e1a449aed8f..08ac56037f6e7a3b04e58a0a924c102e316f7c64 100644 +--- a/net/minecraft/world/level/block/ButtonBlock.java ++++ b/net/minecraft/world/level/block/ButtonBlock.java +@@ -193,7 +193,7 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide && this.type.canButtonBeActivatedByArrows() && !state.getValue(POWERED)) { ++ if (/*!level.isClientSide &&*/ this.type.canButtonBeActivatedByArrows() && !state.getValue(POWERED)) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.checkPressed(state, level, pos); + } + } +diff --git a/net/minecraft/world/level/block/CakeBlock.java b/net/minecraft/world/level/block/CakeBlock.java +index f29f9f3679665464d2d4681806873db061b641c3..f1adfe540c7e329fb0f5c90a3e3ecd1851b2073d 100644 +--- a/net/minecraft/world/level/block/CakeBlock.java ++++ b/net/minecraft/world/level/block/CakeBlock.java +@@ -86,7 +86,7 @@ public class CakeBlock extends Block { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + if (eat(level, pos, state, player).consumesAction()) { + return InteractionResult.SUCCESS; + } +@@ -95,6 +95,7 @@ public class CakeBlock extends Block { + return InteractionResult.CONSUME; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + return eat(level, pos, state, player); + } +diff --git a/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java b/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java +index 4a8a0a3ebe4c4b5092054ccd4ed9186e53023d58..7772f834eae8599723bbaf219f57d7868d9f1511 100644 +--- a/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java ++++ b/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java +@@ -41,13 +41,7 @@ public class CalibratedSculkSensorBlock extends SculkSensorBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return !level.isClientSide +- ? createTickerHelper( +- blockEntityType, +- BlockEntityType.CALIBRATED_SCULK_SENSOR, +- (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser()) +- ) +- : null; ++ return createTickerHelper(blockEntityType, BlockEntityType.CALIBRATED_SCULK_SENSOR, (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser())); // Plazma - Remove isClientSide on DedicatedServer + } + + @Nullable +diff --git a/net/minecraft/world/level/block/CampfireBlock.java b/net/minecraft/world/level/block/CampfireBlock.java +index 6dc5d41a8f40e6b9179e802d7c309d72d48391fa..b54ec3bd2a0b7dbe02f1187c0ae80d1dc0a5aacb 100644 +--- a/net/minecraft/world/level/block/CampfireBlock.java ++++ b/net/minecraft/world/level/block/CampfireBlock.java +@@ -174,6 +174,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB + return SHAPE; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -199,13 +200,15 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void dowse(@Nullable Entity entity, LevelAccessor level, BlockPos pos, BlockState state) { +- if (level.isClientSide()) { ++ /*if (level.isClientSide()) { // == false // Plazma - Remove isClientSide on DedicatedServer + for (int i = 0; i < 20; i++) { + makeParticles((Level)level, pos, state.getValue(SIGNAL_FIRE), true); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity instanceof CampfireBlockEntity) { +@@ -220,9 +223,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB + if (!state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) { + boolean litValue = state.getValue(LIT); + if (litValue) { +- if (!level.isClientSide()) { +- level.playSound(null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F); +- } ++ level.playSound(null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F); // Plazma - Remove isClientSide on DedicatedServer + + dowse(null, level, pos, state); + } +diff --git a/net/minecraft/world/level/block/CartographyTableBlock.java b/net/minecraft/world/level/block/CartographyTableBlock.java +index 7f206c9e2e9c25c07bde7a5946f90cb66ea26afe..db62c0e4bd040c267f5cd0accf38d876a72faef6 100644 +--- a/net/minecraft/world/level/block/CartographyTableBlock.java ++++ b/net/minecraft/world/level/block/CartographyTableBlock.java +@@ -31,11 +31,7 @@ public class CartographyTableBlock extends Block { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- if (player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_CARTOGRAPHY_TABLE); +- } // Paper - Fix InventoryOpenEvent cancellation +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_CARTOGRAPHY_TABLE)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/ChestBlock.java b/net/minecraft/world/level/block/ChestBlock.java +index 7675aa6e058bdafe9debf2561cad9cf6ae05f5b0..746385bceba7aab02801335d1ce730fd59331d66 100644 +--- a/net/minecraft/world/level/block/ChestBlock.java ++++ b/net/minecraft/world/level/block/ChestBlock.java +@@ -346,11 +346,13 @@ public class ChestBlock extends AbstractChestBlock implements + return new ChestBlockEntity(pos, state); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return level.isClientSide ? createTickerHelper(blockEntityType, this.blockEntityType(), ChestBlockEntity::lidAnimateTick) : null; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static boolean isChestBlockedAt(LevelAccessor level, BlockPos pos) { + return isBlockedChestByBlock(level, pos) || isCatSittingOnChest(level, pos); +diff --git a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +index 7f7e4f8cb3601c43cf5e87a6e2ea94642396fa28..070ed2a3eca88fcfcff483557d3ba8c4ffeee885 100644 +--- a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java ++++ b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +@@ -142,18 +142,18 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { + } + + private static void addBook(Level level, BlockPos pos, Player player, ChiseledBookShelfBlockEntity blockEntity, ItemStack bookStack, int slot) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(Stats.ITEM_USED.get(bookStack.getItem())); + SoundEvent soundEvent = bookStack.is(Items.ENCHANTED_BOOK) + ? SoundEvents.CHISELED_BOOKSHELF_INSERT_ENCHANTED + : SoundEvents.CHISELED_BOOKSHELF_INSERT; + blockEntity.setItem(slot, bookStack.consumeAndReturn(1, player)); + level.playSound(null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); +- } ++ //} + } + + private static void removeBook(Level level, BlockPos pos, Player player, ChiseledBookShelfBlockEntity blockEntity, int slot) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemStack itemStack = blockEntity.removeItem(slot, 1); + SoundEvent soundEvent = itemStack.is(Items.ENCHANTED_BOOK) + ? SoundEvents.CHISELED_BOOKSHELF_PICKUP_ENCHANTED +@@ -164,7 +164,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { + } + + level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); +- } ++ //} + } + + @Nullable +@@ -226,12 +226,6 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { + + @Override + protected int getAnalogOutputSignal(BlockState state, Level level, BlockPos pos) { +- if (level.isClientSide()) { +- return 0; +- } else { +- return level.getBlockEntity(pos) instanceof ChiseledBookShelfBlockEntity chiseledBookShelfBlockEntity +- ? chiseledBookShelfBlockEntity.getLastInteractedSlot() + 1 +- : 0; +- } ++ return (level.getBlockEntity(pos) instanceof ChiseledBookShelfBlockEntity entity) ? entity.getLastInteractedSlot() + 1 : 0; // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/level/block/CommandBlock.java b/net/minecraft/world/level/block/CommandBlock.java +index 318ecbf276c7b37b399bd4d43baabed7311d0844..ff8f19efaab5c17d66a4ad44dd732f6963c1899e 100644 +--- a/net/minecraft/world/level/block/CommandBlock.java ++++ b/net/minecraft/world/level/block/CommandBlock.java +@@ -61,11 +61,11 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (level.getBlockEntity(pos) instanceof CommandBlockEntity commandBlockEntity) { + this.setPoweredAndUpdate(level, pos, commandBlockEntity, level.hasNeighborSignal(pos)); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + private void setPoweredAndUpdate(Level level, BlockPos pos, CommandBlockEntity blockEntity, boolean powered) { +diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java +index eeca7debca49b8a1f602399cb9bb237e471b7df0..de5656210a490ebf813732912c420eec439d5c54 100644 +--- a/net/minecraft/world/level/block/ComposterBlock.java ++++ b/net/minecraft/world/level/block/ComposterBlock.java +@@ -189,6 +189,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, 0)); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void handleFill(Level level, BlockPos pos, boolean success) { + BlockState blockState = level.getBlockState(pos); + level.playLocalSound(pos, success ? SoundEvents.COMPOSTER_FILL_SUCCESS : SoundEvents.COMPOSTER_FILL, SoundSource.BLOCKS, 1.0F, 1.0F, false); +@@ -212,6 +213,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +@@ -271,7 +273,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + + // Purpur start - sneak to bulk process composter + private static @Nullable BlockState process(int levelValue, Player player, BlockState state, Level level, BlockPos pos, ItemStack stack) { +- if (levelValue < 7 && !level.isClientSide) { ++ if (levelValue < 7 /*&& !level.isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockState iblockdata1 = ComposterBlock.addItem(player, state, level, pos, stack); + // Paper start - handle cancelled events + if (iblockdata1 == null) { +@@ -331,12 +333,12 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + } + } + // CraftBukkit end +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + Vec3 vec3 = Vec3.atLowerCornerWithOffset(pos, 0.5, 1.01, 0.5).offsetRandom(level.random, 0.7F); + ItemEntity itemEntity = new ItemEntity(level, vec3.x(), vec3.y(), vec3.z(), new ItemStack(Items.BONE_MEAL)); + itemEntity.setDefaultPickUpDelay(); + level.addFreshEntity(itemEntity); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + BlockState blockState = empty(entity, state, level, pos); + level.playSound(null, pos, SoundEvents.COMPOSTER_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); +diff --git a/net/minecraft/world/level/block/ConduitBlock.java b/net/minecraft/world/level/block/ConduitBlock.java +index 5fb139633fa05d733f4ea4f3f203ca51d8de6e72..9968b7964810cfcbe4f8b4c45332fe2af01c2e7e 100644 +--- a/net/minecraft/world/level/block/ConduitBlock.java ++++ b/net/minecraft/world/level/block/ConduitBlock.java +@@ -55,9 +55,7 @@ public class ConduitBlock extends BaseEntityBlock implements SimpleWaterloggedBl + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return createTickerHelper( +- blockEntityType, BlockEntityType.CONDUIT, level.isClientSide ? ConduitBlockEntity::clientTick : ConduitBlockEntity::serverTick +- ); ++ return createTickerHelper(blockEntityType, BlockEntityType.CONDUIT, ConduitBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java +index 13c8d883bda63b0981bbde8ac123ec5dd138eb8c..e1918337690a48b9b1ff2b46e929e2aa3b4137f9 100644 +--- a/net/minecraft/world/level/block/CrafterBlock.java ++++ b/net/minecraft/world/level/block/CrafterBlock.java +@@ -99,7 +99,7 @@ public class CrafterBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.CRAFTER, CrafterBlockEntity::serverTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.CRAFTER, CrafterBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + private void setBlockEntityTriggered(@Nullable BlockEntity blockEntity, boolean triggered) { +@@ -144,7 +144,7 @@ public class CrafterBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) instanceof CrafterBlockEntity crafterBlockEntity) { ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) instanceof CrafterBlockEntity crafterBlockEntity) { // == true // Plazma - Remove isClientSide on DedicatedServer + player.openMenu(crafterBlockEntity); + } + +diff --git a/net/minecraft/world/level/block/CraftingTableBlock.java b/net/minecraft/world/level/block/CraftingTableBlock.java +index c4331bf37e134396020606177a584c908e78088c..fc7782f1f5f4a15dfeb56ea24a3b4414400b5093 100644 +--- a/net/minecraft/world/level/block/CraftingTableBlock.java ++++ b/net/minecraft/world/level/block/CraftingTableBlock.java +@@ -30,11 +30,7 @@ public class CraftingTableBlock extends Block { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- if (player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_CRAFTING_TABLE); +- } // Paper - Fix InventoryOpenEvent cancellation +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_CRAFTING_TABLE)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/CreakingHeartBlock.java b/net/minecraft/world/level/block/CreakingHeartBlock.java +index fa83f4a23be30244c9cde0e2995a9baab60db427..4a8e45f4089bc19d3265a66ad22294c0ee5beff7 100644 +--- a/net/minecraft/world/level/block/CreakingHeartBlock.java ++++ b/net/minecraft/world/level/block/CreakingHeartBlock.java +@@ -56,17 +56,14 @@ public class CreakingHeartBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- if (level.isClientSide) { +- return null; +- } else { +- return state.getValue(ACTIVE) ? createTickerHelper(blockEntityType, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick) : null; +- } ++ return state.getValue(ACTIVE) ? createTickerHelper(blockEntityType, BlockEntityType.CREAKING_HEART, CreakingHeartBlockEntity::serverTick) : null; // Plazma - Remove isClientSide on DedicatedServer + } + + public static boolean isNaturalNight(Level level) { + return level.dimensionType().natural() && level.isNight(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (isNaturalNight(level)) { +@@ -77,6 +74,7 @@ public class CreakingHeartBlock extends BaseEntityBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected BlockState updateShape( +@@ -112,6 +110,7 @@ public class CreakingHeartBlock extends BaseEntityBlock { + return true; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private static boolean isSurroundedByLogs(LevelAccessor level, BlockPos pos) { + for (Direction direction : Direction.values()) { + BlockPos blockPos = pos.relative(direction); +@@ -123,6 +122,7 @@ public class CreakingHeartBlock extends BaseEntityBlock { + + return true; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Nullable + @Override +diff --git a/net/minecraft/world/level/block/CryingObsidianBlock.java b/net/minecraft/world/level/block/CryingObsidianBlock.java +index 668daf9850b972a1b4681bc87d296ff184153f24..6cb7037d0a6ebe96892e13f781c42aa728974a27 100644 +--- a/net/minecraft/world/level/block/CryingObsidianBlock.java ++++ b/net/minecraft/world/level/block/CryingObsidianBlock.java +@@ -21,6 +21,7 @@ public class CryingObsidianBlock extends Block { + super(properties); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(5) == 0) { +@@ -37,4 +38,5 @@ public class CryingObsidianBlock extends Block { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/DaylightDetectorBlock.java b/net/minecraft/world/level/block/DaylightDetectorBlock.java +index 7d78ac98e9b0b60607877de967b9d21827731054..478019c91bfb5e01e1003adbfb1824bce3ca3dca 100644 +--- a/net/minecraft/world/level/block/DaylightDetectorBlock.java ++++ b/net/minecraft/world/level/block/DaylightDetectorBlock.java +@@ -80,12 +80,12 @@ public class DaylightDetectorBlock extends BaseEntityBlock { + if (!player.mayBuild()) { + return super.useWithoutItem(state, level, pos, player, hitResult); + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // Plazma - Remove isClientSide on DedicatedServer + BlockState blockState = state.cycle(INVERTED); + level.setBlock(pos, blockState, 2); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(player, blockState)); + updateSignalStrength(blockState, level, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -104,7 +104,7 @@ public class DaylightDetectorBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return !level.isClientSide && level.dimensionType().hasSkyLight() ++ return /*!level.isClientSide &&*/ level.dimensionType().hasSkyLight() // == true // Plazma - Remove isClientSide on DedicatedServer + ? createTickerHelper(blockEntityType, BlockEntityType.DAYLIGHT_DETECTOR, DaylightDetectorBlock::tickEntity) + : null; + } +diff --git a/net/minecraft/world/level/block/DecoratedPotBlock.java b/net/minecraft/world/level/block/DecoratedPotBlock.java +index 2eac8a64b16be732f60bc34d43982b3f37058257..4abbc8b7025d2a30aaefe218b9a4c27cd59efaab 100644 +--- a/net/minecraft/world/level/block/DecoratedPotBlock.java ++++ b/net/minecraft/world/level/block/DecoratedPotBlock.java +@@ -109,40 +109,39 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog + protected InteractionResult useItemOn( + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult + ) { +- if (level.getBlockEntity(pos) instanceof DecoratedPotBlockEntity decoratedPotBlockEntity) { +- if (level.isClientSide) { +- return InteractionResult.SUCCESS; +- } else { +- ItemStack theItem = decoratedPotBlockEntity.getTheItem(); +- if (!stack.isEmpty() +- && (theItem.isEmpty() || ItemStack.isSameItemSameComponents(theItem, stack) && theItem.getCount() < theItem.getMaxStackSize())) { +- decoratedPotBlockEntity.wobble(DecoratedPotBlockEntity.WobbleStyle.POSITIVE); +- player.awardStat(Stats.ITEM_USED.get(stack.getItem())); +- ItemStack itemStack = stack.consumeAndReturn(1, player); +- float f; +- if (decoratedPotBlockEntity.isEmpty()) { +- decoratedPotBlockEntity.setTheItem(itemStack); +- f = (float)itemStack.getCount() / itemStack.getMaxStackSize(); +- } else { +- theItem.grow(1); +- f = (float)theItem.getCount() / theItem.getMaxStackSize(); +- } +- +- level.playSound(null, pos, SoundEvents.DECORATED_POT_INSERT, SoundSource.BLOCKS, 1.0F, 0.7F + 0.5F * f); +- if (level instanceof ServerLevel serverLevel) { +- serverLevel.sendParticles(ParticleTypes.DUST_PLUME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 7, 0.0, 0.0, 0.0, 0.0); +- } +- +- decoratedPotBlockEntity.setChanged(); +- level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); +- return InteractionResult.SUCCESS; +- } else { +- return InteractionResult.TRY_WITH_EMPTY_HAND; +- } +- } +- } else { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (!(level.getBlockEntity(pos) instanceof DecoratedPotBlockEntity blockEntity)) { + return InteractionResult.PASS; + } ++ ++ ItemStack storedItem = blockEntity.getTheItem(); ++ if (stack.isEmpty() || (!storedItem.isEmpty() && (!ItemStack.isSameItemSameComponents(storedItem, stack) || storedItem.getCount() >= storedItem.getMaxStackSize()))) { ++ return InteractionResult.TRY_WITH_EMPTY_HAND; ++ } ++ ++ blockEntity.wobble(DecoratedPotBlockEntity.WobbleStyle.POSITIVE); ++ player.awardStat(Stats.ITEM_USED.get(stack.getItem())); ++ ItemStack itemStack = stack.consumeAndReturn(1, player); ++ ++ final float pitch; ++ if (blockEntity.isEmpty()) { ++ blockEntity.setTheItem(itemStack); ++ pitch = (float) itemStack.getCount() / itemStack.getMaxStackSize(); ++ } else { ++ storedItem.grow(1); ++ pitch = (float) storedItem.getCount() / storedItem.getMaxStackSize(); ++ } ++ ++ level.playSound(null, pos, SoundEvents.DECORATED_POT_INSERT, SoundSource.BLOCKS, 1.0F, 0.7F + 0.5F * pitch); ++ if (level instanceof ServerLevel serverLevel) { ++ serverLevel.sendParticles(ParticleTypes.DUST_PLUME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 7, 0.0, 0.0, 0.0, 0.0); ++ } ++ ++ blockEntity.setChanged(); ++ level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); ++ ++ return InteractionResult.SUCCESS; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/DetectorRailBlock.java b/net/minecraft/world/level/block/DetectorRailBlock.java +index 0c8b2c6b6bddd82bb2da866b58691e46c9b5788e..307928a7fbaff2314f3f4e8195cd101691462107 100644 +--- a/net/minecraft/world/level/block/DetectorRailBlock.java ++++ b/net/minecraft/world/level/block/DetectorRailBlock.java +@@ -55,11 +55,7 @@ public class DetectorRailBlock extends BaseRailBlock { + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide) { +- if (!state.getValue(POWERED)) { +- this.checkPressed(level, pos, state); +- } +- } ++ if (!state.getValue(POWERED)) this.checkPressed(level, pos, state); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/DispenserBlock.java b/net/minecraft/world/level/block/DispenserBlock.java +index f0afe65913f9c65ac2b8866a9b9100837b9d1f31..3f60359b173332235317404996a13b2fc5637793 100644 +--- a/net/minecraft/world/level/block/DispenserBlock.java ++++ b/net/minecraft/world/level/block/DispenserBlock.java +@@ -72,7 +72,7 @@ public class DispenserBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) instanceof DispenserBlockEntity dispenserBlockEntity && player.openMenu(dispenserBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) instanceof DispenserBlockEntity dispenserBlockEntity && player.openMenu(dispenserBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // == true // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(dispenserBlockEntity instanceof DropperBlockEntity ? Stats.INSPECT_DROPPER : Stats.INSPECT_DISPENSER); + } + +diff --git a/net/minecraft/world/level/block/DoorBlock.java b/net/minecraft/world/level/block/DoorBlock.java +index 70f4877e232329226a0160f3bc774b2dddd81819..3dd42c67e357282fa2f1a334b09591ef2298c555 100644 +--- a/net/minecraft/world/level/block/DoorBlock.java ++++ b/net/minecraft/world/level/block/DoorBlock.java +@@ -125,7 +125,7 @@ public class DoorBlock extends Block { + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide && (player.isCreative() || !player.hasCorrectToolForDrops(state))) { ++ if (/*!level.isClientSide &&*/ (player.isCreative() || !player.hasCorrectToolForDrops(state))) { // == true // Plazma - Remove isClientSide on DedicatedServer + DoublePlantBlock.preventDropFromBottomPart(level, pos, state, player); + } + +diff --git a/net/minecraft/world/level/block/DoublePlantBlock.java b/net/minecraft/world/level/block/DoublePlantBlock.java +index 6b1e88d40a8494cec762ff2e3ecb94643bbd7721..00e3919b01fe41a5106f570fabcf5fc57a5acd1e 100644 +--- a/net/minecraft/world/level/block/DoublePlantBlock.java ++++ b/net/minecraft/world/level/block/DoublePlantBlock.java +@@ -100,13 +100,13 @@ public class DoublePlantBlock extends BushBlock { + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (player.isCreative()) { + preventDropFromBottomPart(level, pos, state, player); + } else { + dropResources(state, level, pos, null, player, player.getMainHandItem()); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return super.playerWillDestroy(level, pos, state, player); + } +diff --git a/net/minecraft/world/level/block/DragonEggBlock.java b/net/minecraft/world/level/block/DragonEggBlock.java +index e72c0f252138858f44e423b28d6e26fcab53a17e..befc32649d5b2e4809c3530e20925b8d9ea84aad 100644 +--- a/net/minecraft/world/level/block/DragonEggBlock.java ++++ b/net/minecraft/world/level/block/DragonEggBlock.java +@@ -66,21 +66,10 @@ public class DragonEggBlock extends FallingBlock { + + blockPos = new BlockPos(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ()); + // CraftBukkit end +- if (level.isClientSide) { +- for (int i1 = 0; i1 < 128; i1++) { +- double randomDouble = level.random.nextDouble(); +- float f = (level.random.nextFloat() - 0.5F) * 0.2F; +- float f1 = (level.random.nextFloat() - 0.5F) * 0.2F; +- float f2 = (level.random.nextFloat() - 0.5F) * 0.2F; +- double d = Mth.lerp(randomDouble, (double)blockPos.getX(), (double)pos.getX()) + (level.random.nextDouble() - 0.5) + 0.5; +- double d1 = Mth.lerp(randomDouble, (double)blockPos.getY(), (double)pos.getY()) + level.random.nextDouble() - 0.5; +- double d2 = Mth.lerp(randomDouble, (double)blockPos.getZ(), (double)pos.getZ()) + (level.random.nextDouble() - 0.5) + 0.5; +- level.addParticle(ParticleTypes.PORTAL, d, d1, d2, f, f1, f2); +- } +- } else { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.setBlock(blockPos, state, 2); + level.removeBlock(pos, false); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return; + } +diff --git a/net/minecraft/world/level/block/EnchantingTableBlock.java b/net/minecraft/world/level/block/EnchantingTableBlock.java +index 92c75217860f1fca706f4e7105589f0f67ba81f4..23aa4a9f5bb33f29527f7bfdd2432f21b2a32b3d 100644 +--- a/net/minecraft/world/level/block/EnchantingTableBlock.java ++++ b/net/minecraft/world/level/block/EnchantingTableBlock.java +@@ -61,6 +61,7 @@ public class EnchantingTableBlock extends BaseEntityBlock { + return SHAPE; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + super.animateTick(state, level, pos, random); +@@ -79,23 +80,24 @@ public class EnchantingTableBlock extends BaseEntityBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new EnchantingTableBlockEntity(pos, state); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + return level.isClientSide ? createTickerHelper(blockEntityType, BlockEntityType.ENCHANTING_TABLE, EnchantingTableBlockEntity::bookAnimationTick) : null; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- player.openMenu(state.getMenuProvider(level, pos)); +- } ++ player.openMenu(state.getMenuProvider(level, pos)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java +index 54abeb142e119edd1c1d1c263821b95b1f05c388..70f72efdd00c39b69285f4337d4eb58a4459ddce 100644 +--- a/net/minecraft/world/level/block/EndGatewayBlock.java ++++ b/net/minecraft/world/level/block/EndGatewayBlock.java +@@ -43,13 +43,10 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return createTickerHelper( +- blockEntityType, +- BlockEntityType.END_GATEWAY, +- level.isClientSide ? TheEndGatewayBlockEntity::beamAnimationTick : TheEndGatewayBlockEntity::portalTick +- ); ++ return createTickerHelper(blockEntityType, BlockEntityType.END_GATEWAY, TheEndGatewayBlockEntity::portalTick); // Plazma - Remove isClientSide on DedicatedServer + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + BlockEntity blockEntity = level.getBlockEntity(pos); +@@ -76,6 +73,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected ItemStack getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData) { +@@ -91,7 +89,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent + if (entity.canUsePortal(false) +- && !level.isClientSide ++ //&& !level.isClientSide // == true // Plazma - Remove isClientSide on DedicatedServer + && level.getBlockEntity(pos) instanceof TheEndGatewayBlockEntity theEndGatewayBlockEntity + && !theEndGatewayBlockEntity.isCoolingDown()) { + // Paper start - call EntityPortalEnterEvent +diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java +index 7e60bcadd2d343e00fc554dba0b85c9191f7efb6..c367739eff86ec5573ef6e3ab1375e1f60c88233 100644 +--- a/net/minecraft/world/level/block/EndPortalBlock.java ++++ b/net/minecraft/world/level/block/EndPortalBlock.java +@@ -70,7 +70,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + level.getCraftServer().getPluginManager().callEvent(event); + if (event.isCancelled()) return; // Paper - make cancellable + // CraftBukkit end +- if (!level.isClientSide && level.dimension() == Level.END && entity instanceof ServerPlayer serverPlayer && !serverPlayer.seenCredits) { ++ if (/*!level.isClientSide &&*/ level.dimension() == Level.END && entity instanceof ServerPlayer serverPlayer && !serverPlayer.seenCredits) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (level.paperConfig().misc.disableEndCredits) {serverPlayer.seenCredits = true; return;} // Paper - Option to disable end credits + serverPlayer.showEndCredits(); + } else { +@@ -120,6 +120,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + double d = pos.getX() + random.nextDouble(); +@@ -127,6 +128,7 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + double d2 = pos.getZ() + random.nextDouble(); + level.addParticle(ParticleTypes.SMOKE, d, d1, d2, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected ItemStack getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData) { +diff --git a/net/minecraft/world/level/block/EndRodBlock.java b/net/minecraft/world/level/block/EndRodBlock.java +index 590a4068e9a7cd26e0a763e9476c87a4bd0ec6a0..0ac4f641b38f18201b981b8d688563326c7de8d2 100644 +--- a/net/minecraft/world/level/block/EndRodBlock.java ++++ b/net/minecraft/world/level/block/EndRodBlock.java +@@ -33,6 +33,7 @@ public class EndRodBlock extends RodBlock { + : this.defaultBlockState().setValue(FACING, clickedFace); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + Direction direction = state.getValue(FACING); +@@ -52,6 +53,7 @@ public class EndRodBlock extends RodBlock { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/EnderChestBlock.java b/net/minecraft/world/level/block/EnderChestBlock.java +index 730dc33afd8ac3efadefd410265bd23121abc27b..b80d4eac296f97fbce84b76949beb2dd0ad5a7f3 100644 +--- a/net/minecraft/world/level/block/EnderChestBlock.java ++++ b/net/minecraft/world/level/block/EnderChestBlock.java +@@ -134,6 +134,7 @@ public class EnderChestBlock extends AbstractChestBlock i + return new EnderChestBlockEntity(pos, state); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +@@ -154,6 +155,7 @@ public class EnderChestBlock extends AbstractChestBlock i + level.addParticle(ParticleTypes.PORTAL, d, d1, d2, d3, d4, d5); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected BlockState rotate(BlockState state, Rotation rot) { +diff --git a/net/minecraft/world/level/block/EyeblossomBlock.java b/net/minecraft/world/level/block/EyeblossomBlock.java +index 349ab10db5a2c3253ce2f8ec0f5f39e1dcc2f0a9..037bbe902de8f785c691b89ef0d4fc6fdb7e8289 100644 +--- a/net/minecraft/world/level/block/EyeblossomBlock.java ++++ b/net/minecraft/world/level/block/EyeblossomBlock.java +@@ -47,6 +47,7 @@ public class EyeblossomBlock extends FlowerBlock { + this.type = EyeblossomBlock.Type.fromBoolean(_open); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (this.type.emitSounds() && random.nextInt(700) == 0) { +@@ -56,6 +57,7 @@ public class EyeblossomBlock extends FlowerBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { +@@ -100,8 +102,7 @@ public class EyeblossomBlock extends FlowerBlock { + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide() +- && level.getDifficulty() != Difficulty.PEACEFUL ++ if (level.getDifficulty() != Difficulty.PEACEFUL // Plazma - Remove isClientSide on DedicatedServer + && entity instanceof Bee bee + && Bee.attractsBees(state) + && !bee.hasEffect(MobEffects.POISON)) { +diff --git a/net/minecraft/world/level/block/FallingBlock.java b/net/minecraft/world/level/block/FallingBlock.java +index 1a787426acb68cf8f9491bdd8f903c7e0c00e29f..ccfa08121b70852e1ac36374576b0dd50a9bcf4f 100644 +--- a/net/minecraft/world/level/block/FallingBlock.java ++++ b/net/minecraft/world/level/block/FallingBlock.java +@@ -64,6 +64,7 @@ public abstract class FallingBlock extends Block implements Fallable { + return state.isAir() || state.is(BlockTags.FIRE) || state.liquid() || state.canBeReplaced(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(16) == 0) { +@@ -73,6 +74,7 @@ public abstract class FallingBlock extends Block implements Fallable { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public int getDustColor(BlockState state, BlockGetter level, BlockPos pos) { + return -16777216; +diff --git a/net/minecraft/world/level/block/FenceBlock.java b/net/minecraft/world/level/block/FenceBlock.java +index f115a3d0237e32f3257ee4937cda6dd09495b71f..86f2b18991e316ff46124b15e7ea15c7141c6fe8 100644 +--- a/net/minecraft/world/level/block/FenceBlock.java ++++ b/net/minecraft/world/level/block/FenceBlock.java +@@ -74,7 +74,7 @@ public class FenceBlock extends CrossCollisionBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- return (InteractionResult)(!level.isClientSide() ? LeadItem.bindPlayerMobs(player, level, pos) : InteractionResult.PASS); ++ return LeadItem.bindPlayerMobs(player, level, pos); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/FenceGateBlock.java b/net/minecraft/world/level/block/FenceGateBlock.java +index 54ed473bfc72775e713311c1b73732756b2b811b..038c795e1a783e755e4875ce02c4c2edf1c39931 100644 +--- a/net/minecraft/world/level/block/FenceGateBlock.java ++++ b/net/minecraft/world/level/block/FenceGateBlock.java +@@ -211,7 +211,7 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean hasNeighborSignal = level.hasNeighborSignal(pos); + // CraftBukkit start + boolean oldPowered = state.getValue(FenceGateBlock.POWERED); +@@ -238,7 +238,7 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { + level.gameEvent(null, hasNeighborSignal ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/FurnaceBlock.java b/net/minecraft/world/level/block/FurnaceBlock.java +index 47dd6fa308464d5af7450d157caf58aaf8e1291e..d087809aca9dd730125cfdec6181c109da32704b 100644 +--- a/net/minecraft/world/level/block/FurnaceBlock.java ++++ b/net/minecraft/world/level/block/FurnaceBlock.java +@@ -50,6 +50,7 @@ public class FurnaceBlock extends AbstractFurnaceBlock { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -71,4 +72,5 @@ public class FurnaceBlock extends AbstractFurnaceBlock { + level.addParticle(ParticleTypes.FLAME, d + d5, d1 + d6, d2 + d7, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/GrindstoneBlock.java b/net/minecraft/world/level/block/GrindstoneBlock.java +index f34d9baf1e0483240435571518282295c369ffd2..d05075340eae9ee397cacc5ccfce3e139a52897e 100644 +--- a/net/minecraft/world/level/block/GrindstoneBlock.java ++++ b/net/minecraft/world/level/block/GrindstoneBlock.java +@@ -151,9 +151,7 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_GRINDSTONE); +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_GRINDSTONE)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/HangingMossBlock.java b/net/minecraft/world/level/block/HangingMossBlock.java +index b152e69bc0c814ea9dc1078547b428987bc06d11..443604682fd1176a513b010e0592694e97e0dca8 100644 +--- a/net/minecraft/world/level/block/HangingMossBlock.java ++++ b/net/minecraft/world/level/block/HangingMossBlock.java +@@ -42,6 +42,7 @@ public class HangingMossBlock extends Block implements BonemealableBlock { + return state.getValue(TIP) ? TIP_SHAPE : BASE_SHAPE; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer) + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(500) == 0) { +@@ -51,6 +52,7 @@ public class HangingMossBlock extends Block implements BonemealableBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected boolean propagatesSkylightDown(BlockState state) { +diff --git a/net/minecraft/world/level/block/HoneyBlock.java b/net/minecraft/world/level/block/HoneyBlock.java +index bab3ac2c4be08ea7589752b8472c1e13bcaab76a..109e07db86dfdc21d8a718018a3ebba23b02d072 100644 +--- a/net/minecraft/world/level/block/HoneyBlock.java ++++ b/net/minecraft/world/level/block/HoneyBlock.java +@@ -49,9 +49,7 @@ public class HoneyBlock extends HalfTransparentBlock { + @Override + public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, float fallDistance) { + entity.playSound(SoundEvents.HONEY_BLOCK_SLIDE, 1.0F, 1.0F); +- if (!level.isClientSide) { +- level.broadcastEntityEvent(entity, (byte)54); +- } ++ level.broadcastEntityEvent(entity, (byte)54); // Plazma - Remove isClientSide on DedicatedServer + + if (entity.causeFallDamage(fallDistance, 0.2F, level.damageSources().fall())) { + entity.playSound(this.soundType.getFallSound(), this.soundType.getVolume() * 0.5F, this.soundType.getPitch() * 0.75F); +@@ -117,12 +115,13 @@ public class HoneyBlock extends HalfTransparentBlock { + entity.playSound(SoundEvents.HONEY_BLOCK_SLIDE, 1.0F, 1.0F); + } + +- if (!level.isClientSide && level.random.nextInt(5) == 0) { ++ if (/*!level.isClientSide &&*/ level.random.nextInt(5) == 0) { // Plazma - Remove isClientSide on DedicatedServer + level.broadcastEntityEvent(entity, (byte)53); + } + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void showSlideParticles(Entity entity) { + showParticles(entity, 5); + } +@@ -141,4 +140,5 @@ public class HoneyBlock extends HalfTransparentBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/HopperBlock.java b/net/minecraft/world/level/block/HopperBlock.java +index 910adca428765f5fc82c1346a4cee4b2038b0028..c8ae31b9a0f71e19cbe6750e2161e0964b478557 100644 +--- a/net/minecraft/world/level/block/HopperBlock.java ++++ b/net/minecraft/world/level/block/HopperBlock.java +@@ -113,7 +113,7 @@ public class HopperBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.HOPPER, HopperBlockEntity::pushItemsTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.HOPPER, HopperBlockEntity::pushItemsTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -125,7 +125,7 @@ public class HopperBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) instanceof HopperBlockEntity hopperBlockEntity && player.openMenu(hopperBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) instanceof HopperBlockEntity hopperBlockEntity && player.openMenu(hopperBlockEntity).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation // == true // Plazma - Remove isClientSide on DedicatedServer + player.awardStat(Stats.INSPECT_HOPPER); + } + +diff --git a/net/minecraft/world/level/block/LeavesBlock.java b/net/minecraft/world/level/block/LeavesBlock.java +index 06be7c717e4c7490069a7e3bf4852c7f71c2de18..6606e4a96127e0e4fe5e85c9d216fbcccecae77e 100644 +--- a/net/minecraft/world/level/block/LeavesBlock.java ++++ b/net/minecraft/world/level/block/LeavesBlock.java +@@ -145,6 +145,7 @@ public class LeavesBlock extends Block implements SimpleWaterloggedBlock { + return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (level.isRainingAt(pos.above())) { +@@ -157,6 +158,7 @@ public class LeavesBlock extends Block implements SimpleWaterloggedBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/LecternBlock.java b/net/minecraft/world/level/block/LecternBlock.java +index 8ebfa89d84d6dca8b71eb8a211438f28895e6ad5..0b1deeb0fee679cb4b2dbb99b5c9ecba2e85ec89 100644 +--- a/net/minecraft/world/level/block/LecternBlock.java ++++ b/net/minecraft/world/level/block/LecternBlock.java +@@ -100,11 +100,11 @@ public class LecternBlock extends BaseEntityBlock { + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- Level level = context.getLevel(); ++ //Level level = context.getLevel(); // Plazma - Remove isClientSide on DedicatedServer + ItemStack itemInHand = context.getItemInHand(); + Player player = context.getPlayer(); + boolean flag = false; +- if (!level.isClientSide && player != null && player.canUseGameMasterBlocks()) { ++ if (/*!level.isClientSide &&*/ player != null && player.canUseGameMasterBlocks()) { // == true // Plazma - Remove isClientSide on DedicatedServer + CustomData customData = itemInHand.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY); + if (customData.contains("Book")) { + flag = true; +@@ -157,9 +157,7 @@ public class LecternBlock extends BaseEntityBlock { + + public static boolean tryPlaceBook(@Nullable LivingEntity entity, Level level, BlockPos pos, BlockState state, ItemStack stack) { + if (!state.getValue(HAS_BOOK)) { +- if (!level.isClientSide) { +- placeBook(entity, level, pos, state, stack); +- } ++ placeBook(entity, level, pos, state, stack); // Plazma - Remove isClientSide on DedicatedServer + + return true; + } else { +@@ -306,9 +304,7 @@ public class LecternBlock extends BaseEntityBlock { + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (state.getValue(HAS_BOOK)) { +- if (!level.isClientSide) { +- this.openScreen(level, pos, player); +- } ++ this.openScreen(level, pos, player); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +diff --git a/net/minecraft/world/level/block/LeverBlock.java b/net/minecraft/world/level/block/LeverBlock.java +index aa97bd30f7a09b17b7d8ec075571f1279ec0a245..c6bdb7f388da2502f9d28b10c5664e6e0944f028 100644 +--- a/net/minecraft/world/level/block/LeverBlock.java ++++ b/net/minecraft/world/level/block/LeverBlock.java +@@ -94,27 +94,22 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (level.isClientSide) { +- BlockState blockState = state.cycle(POWERED); +- if (blockState.getValue(POWERED)) { +- makeParticle(blockState, level, pos, 1.0F); +- } +- } else { +- // CraftBukkit start - Interact Lever +- boolean powered = state.getValue(LeverBlock.POWERED); // Old powered state +- org.bukkit.block.Block block = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); +- int old = (powered) ? 15 : 0; +- int current = (!powered) ? 15 : 0; +- +- org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(block, old, current); +- level.getCraftServer().getPluginManager().callEvent(eventRedstone); +- +- if ((eventRedstone.getNewCurrent() > 0) != (!powered)) { +- return InteractionResult.SUCCESS; +- } +- // CraftBukkit end +- this.pull(state, level, pos, null); ++ // Plazma start - Remove isClientSide on DedicatedServer ++ ++ // CraftBukkit start - Interact Lever ++ final boolean powered = state.getValue(LeverBlock.POWERED); // Old powered state ++ final org.bukkit.block.Block block = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); ++ ++ final org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(block, powered ? 15 : 0, powered ? 0 : 15); ++ level.getCraftServer().getPluginManager().callEvent(eventRedstone); ++ ++ if ((eventRedstone.getNewCurrent() > 0) == powered) { ++ return InteractionResult.SUCCESS; + } ++ // CraftBukkit end ++ ++ this.pull(state, level, pos, null); ++ // Plazma end - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +@@ -150,12 +145,14 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { + level.addParticle(new DustParticleOptions(16711680, alpha), d, d1, d2, 0.0, 0.0, 0.0); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(POWERED) && random.nextFloat() < 0.25F) { + makeParticle(state, level, pos, 0.5F); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { +diff --git a/net/minecraft/world/level/block/LightBlock.java b/net/minecraft/world/level/block/LightBlock.java +index 4e2c0383eda3e81bbc40a724263b49151a342746..f4599b070094fefa045c147a9bd015d9df7c0679 100644 +--- a/net/minecraft/world/level/block/LightBlock.java ++++ b/net/minecraft/world/level/block/LightBlock.java +@@ -59,7 +59,7 @@ public class LightBlock extends Block implements SimpleWaterloggedBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && player.canUseGameMasterBlocks()) { ++ if (/*!level.isClientSide &&*/ player.canUseGameMasterBlocks()) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.setBlock(pos, state.cycle(LEVEL), 2); + return InteractionResult.SUCCESS_SERVER; + } else { +diff --git a/net/minecraft/world/level/block/LightningRodBlock.java b/net/minecraft/world/level/block/LightningRodBlock.java +index 50cb7aa3fd991e03e644323b12028f09401755c0..e616356f89644be76bd7e618bc794defda80c6f4 100644 +--- a/net/minecraft/world/level/block/LightningRodBlock.java ++++ b/net/minecraft/world/level/block/LightningRodBlock.java +@@ -113,6 +113,7 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc + this.updateNeighbours(state, level, pos); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (level.isThundering() +@@ -121,6 +122,7 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc + ParticleUtils.spawnParticlesAlongAxis(state.getValue(FACING).getAxis(), level, pos, 0.125, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(1, 2)); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { +diff --git a/net/minecraft/world/level/block/LoomBlock.java b/net/minecraft/world/level/block/LoomBlock.java +index c51ed1081ba34b6c4deb554c4165428b39beb575..4aa5148b13c7a49a0cb29e2a79e50d2faa9cfcd9 100644 +--- a/net/minecraft/world/level/block/LoomBlock.java ++++ b/net/minecraft/world/level/block/LoomBlock.java +@@ -32,9 +32,7 @@ public class LoomBlock extends HorizontalDirectionalBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_LOOM); +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_LOOM)); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/MossyCarpetBlock.java b/net/minecraft/world/level/block/MossyCarpetBlock.java +index 8e781fe7c33ce5d78320a01731f5f6ee85dc389b..82a073102f456762d739b7d1c202f9f84a23cf0e 100644 +--- a/net/minecraft/world/level/block/MossyCarpetBlock.java ++++ b/net/minecraft/world/level/block/MossyCarpetBlock.java +@@ -208,13 +208,8 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { +- if (!level.isClientSide) { +- RandomSource random = level.getRandom(); +- BlockState blockState = createTopperWithSideChance(level, pos, random::nextBoolean); +- if (!blockState.isAir()) { +- level.setBlock(pos.above(), blockState, 3); +- } +- } ++ final BlockState blockState = createTopperWithSideChance(level, pos, level.getRandom()::nextBoolean); // Plazma - Remove isClientSide on DedicatedServer ++ if (!blockState.isAir()) level.setBlock(pos.above(), blockState, 3); // Plazma - Remove isClientSide on DedicatedServer + } + + private static BlockState createTopperWithSideChance(BlockGetter level, BlockPos pos, BooleanSupplier placeSide) { +diff --git a/net/minecraft/world/level/block/MyceliumBlock.java b/net/minecraft/world/level/block/MyceliumBlock.java +index 20afd1bc11ea4bcbc76df49a1edd5392f3d95064..de8e5a3e993c22446e3f3e681746ddebeccda3f7 100644 +--- a/net/minecraft/world/level/block/MyceliumBlock.java ++++ b/net/minecraft/world/level/block/MyceliumBlock.java +@@ -20,6 +20,7 @@ public class MyceliumBlock extends SpreadingSnowyDirtBlock { + super(properties); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + super.animateTick(state, level, pos, random); +@@ -27,4 +28,5 @@ public class MyceliumBlock extends SpreadingSnowyDirtBlock { + level.addParticle(ParticleTypes.MYCELIUM, pos.getX() + random.nextDouble(), pos.getY() + 1.1, pos.getZ() + random.nextDouble(), 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java +index eb659209008209c0930770e5f9671a3d7a4abae6..63af19715ad885d866974b1989bb08f33d0eb176 100644 +--- a/net/minecraft/world/level/block/NetherPortalBlock.java ++++ b/net/minecraft/world/level/block/NetherPortalBlock.java +@@ -274,6 +274,7 @@ public class NetherPortalBlock extends Block implements Portal { + return Portal.Transition.CONFUSION; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(100) == 0) { +@@ -308,6 +309,7 @@ public class NetherPortalBlock extends Block implements Portal { + level.addParticle(ParticleTypes.PORTAL, d, d1, d2, d3, d4, d5); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected ItemStack getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData) { +diff --git a/net/minecraft/world/level/block/NoteBlock.java b/net/minecraft/world/level/block/NoteBlock.java +index 83cacb07f7d828bac45b57b7361bb31e6d716b03..9e6ec047e23c2994b8d345a2af50b48c7d4b56db 100644 +--- a/net/minecraft/world/level/block/NoteBlock.java ++++ b/net/minecraft/world/level/block/NoteBlock.java +@@ -124,22 +124,22 @@ public class NoteBlock extends Block { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableNoteblockUpdates) state = state.cycle(NoteBlock.NOTE); // Paper - prevent noteblock note from updating + level.setBlock(pos, state, 3); + this.playNote(player, state, level, pos); + player.awardStat(Stats.TUNE_NOTEBLOCK); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } + + @Override + protected void attack(BlockState state, Level level, BlockPos pos, Player player) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.playNote(player, state, level, pos); + player.awardStat(Stats.PLAY_NOTEBLOCK); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + public static float getPitchFromNote(int note) { +diff --git a/net/minecraft/world/level/block/ObserverBlock.java b/net/minecraft/world/level/block/ObserverBlock.java +index 69f4baf508b6e0015190fba5bdded2f45f3ebf6b..73b8aa16bb9eaaeabd99d8e12cb00e0d49666998 100644 +--- a/net/minecraft/world/level/block/ObserverBlock.java ++++ b/net/minecraft/world/level/block/ObserverBlock.java +@@ -89,7 +89,7 @@ public class ObserverBlock extends DirectionalBlock { + } + + private void startSignal(LevelReader level, ScheduledTickAccess scheduledTickAccess, BlockPos pos) { +- if (!level.isClientSide() && !scheduledTickAccess.getBlockTicks().hasScheduledTick(pos, this)) { ++ if (/*!level.isClientSide() &&*/ !scheduledTickAccess.getBlockTicks().hasScheduledTick(pos, this)) { // == true // Plazma - Remove isClientSide on DedicatedServer + scheduledTickAccess.scheduleTick(pos, this, 2); + } + } +@@ -120,7 +120,7 @@ public class ObserverBlock extends DirectionalBlock { + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { + if (!state.is(oldState.getBlock())) { +- if (!level.isClientSide() && state.getValue(POWERED) && !level.getBlockTicks().hasScheduledTick(pos, this)) { ++ if (/*!level.isClientSide() &&*/ state.getValue(POWERED) && !level.getBlockTicks().hasScheduledTick(pos, this)) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockState blockState = state.setValue(POWERED, false); + level.setBlock(pos, blockState, 18); + this.updateNeighborsInFront(level, pos, blockState); +@@ -131,7 +131,7 @@ public class ObserverBlock extends DirectionalBlock { + @Override + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + if (!state.is(newState.getBlock())) { +- if (!level.isClientSide && state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) { ++ if (/*!level.isClientSide &&*/ state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.updateNeighborsInFront(level, pos, state.setValue(POWERED, false)); + } + } +diff --git a/net/minecraft/world/level/block/ParticleLeavesBlock.java b/net/minecraft/world/level/block/ParticleLeavesBlock.java +index ba9e2da881898e1d1f9590ec00f6c58d60b38349..fccfdbd5e5fc0c56c01aa4edbe21cdff36750dc0 100644 +--- a/net/minecraft/world/level/block/ParticleLeavesBlock.java ++++ b/net/minecraft/world/level/block/ParticleLeavesBlock.java +@@ -36,6 +36,7 @@ public class ParticleLeavesBlock extends LeavesBlock { + this.particle = particle; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + super.animateTick(state, level, pos, random); +@@ -47,4 +48,5 @@ public class ParticleLeavesBlock extends LeavesBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/PointedDripstoneBlock.java b/net/minecraft/world/level/block/PointedDripstoneBlock.java +index a23d0b503e0a0139517ad0856d5c8d5f56ec8dbe..eb21ddc3f9714faea90ce676620806528da018fe 100644 +--- a/net/minecraft/world/level/block/PointedDripstoneBlock.java ++++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java +@@ -140,7 +140,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + + @Override + protected void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = hit.getBlockPos(); + if (level instanceof ServerLevel serverLevel + && projectile.mayInteract(serverLevel, blockPos) +@@ -154,7 +154,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + // CraftBukkit end + level.destroyBlock(blockPos, true); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -166,6 +166,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (canDrip(state)) { +@@ -177,6 +178,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { +@@ -414,6 +416,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + createDripstone(level, blockPos, Direction.UP, DripstoneThickness.TIP_MERGE, pos); // CraftBukkit + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void spawnDripParticle(Level level, BlockPos pos, BlockState state) { + getFluidAboveStalactite(level, pos, state).ifPresent(fluidInfo -> spawnDripParticle(level, pos, state, fluidInfo.fluid)); + } +@@ -428,6 +431,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + ParticleOptions particleOptions = dripFluid.is(FluidTags.LAVA) ? ParticleTypes.DRIPPING_DRIPSTONE_LAVA : ParticleTypes.DRIPPING_DRIPSTONE_WATER; + level.addParticle(particleOptions, d1, d2, d3, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Nullable + private static BlockPos findTip(BlockState state, LevelAccessor level, BlockPos pos, int maxIterations, boolean isTipMerge) { +@@ -580,6 +584,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + return dripstoneState.is(Blocks.DRIPSTONE_BLOCK) && state.is(Blocks.WATER) && state.getFluidState().isSource(); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private static Fluid getDripFluid(Level level, Fluid fluid) { + if (fluid.isSame(Fluids.EMPTY)) { + return level.dimensionType().ultraWarm() ? Fluids.LAVA : Fluids.WATER; +@@ -587,6 +592,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate + return fluid; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + private static Optional findBlockVertical( + LevelAccessor level, +diff --git a/net/minecraft/world/level/block/PowderSnowBlock.java b/net/minecraft/world/level/block/PowderSnowBlock.java +index 4f3646961beb877520e257e11224c3045467d351..adea7093677e5b04021c50b86b442dce3063070e 100644 +--- a/net/minecraft/world/level/block/PowderSnowBlock.java ++++ b/net/minecraft/world/level/block/PowderSnowBlock.java +@@ -61,7 +61,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent + if (!(entity instanceof LivingEntity) || entity.getInBlockState().is(this)) { + entity.makeStuckInBlock(state, new Vec3(0.9F, 1.5, 0.9F)); +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + RandomSource random = level.getRandom(); + boolean flag = entity.xOld != entity.getX() || entity.zOld != entity.getZ(); + if (flag && random.nextBoolean()) { +@@ -76,6 +76,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } + + entity.setIsInPowderSnow(true); +@@ -136,9 +137,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { + @Override + public ItemStack pickupBlock(@Nullable Player player, LevelAccessor level, BlockPos pos, BlockState state) { + level.setBlock(pos, Blocks.AIR.defaultBlockState(), 11); +- if (!level.isClientSide()) { +- level.levelEvent(2001, pos, Block.getId(state)); +- } ++ level.levelEvent(2001, pos, Block.getId(state)); // Plazma - Remove isClientSide on DedicatedServer + + return new ItemStack(Items.POWDER_SNOW_BUCKET); + } +diff --git a/net/minecraft/world/level/block/PumpkinBlock.java b/net/minecraft/world/level/block/PumpkinBlock.java +index 3dad6091e45ae28ae718790a6e411a05215df538..dfad0398792a720a44dc92f72545938c63d4810f 100644 +--- a/net/minecraft/world/level/block/PumpkinBlock.java ++++ b/net/minecraft/world/level/block/PumpkinBlock.java +@@ -37,8 +37,10 @@ public class PumpkinBlock extends Block { + ) { + if (!stack.is(Items.SHEARS)) { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); ++ /* // Plazma - Remove isClientSide on DedicatedServer + } else if (level.isClientSide) { + return InteractionResult.SUCCESS; ++ */ // Plazma - Remove isClientSide on DedicatedServer + } 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(level, pos), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(stack), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand), new java.util.ArrayList<>()); +diff --git a/net/minecraft/world/level/block/RedStoneOreBlock.java b/net/minecraft/world/level/block/RedStoneOreBlock.java +index dea17f0130cc37ce5b4330f47e05e138eb898b2f..2a1d5a5d8103ccef1bb5f8709ece6aee363768f4 100644 +--- a/net/minecraft/world/level/block/RedStoneOreBlock.java ++++ b/net/minecraft/world/level/block/RedStoneOreBlock.java +@@ -67,11 +67,7 @@ public class RedStoneOreBlock extends Block { + protected InteractionResult useItemOn( + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult + ) { +- if (level.isClientSide) { +- spawnParticles(level, pos); +- } else { +- interact(state, level, pos, player); // CraftBukkit - add entityhuman +- } ++ interact(state, level, pos, player); // CraftBukkit - add entityhuman // Plazma - Remove isClientSide on DedicatedServer + + return (InteractionResult)(stack.getItem() instanceof BlockItem && new BlockPlaceContext(player, hand, stack, hitResult).canPlace() + ? InteractionResult.PASS +@@ -123,12 +119,14 @@ public class RedStoneOreBlock extends Block { + // CraftBukkit end + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { + spawnParticles(level, pos); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + private static void spawnParticles(Level level, BlockPos pos) { + //double d = 0.5625; // Plazma - Remove unused variables +diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java +index ed07fb978743726d2ebb5f18b5359241a3d7c9d2..e87405287e52e805c734ccd8cd1c7e91a4b258da 100644 +--- a/net/minecraft/world/level/block/RedStoneWireBlock.java ++++ b/net/minecraft/world/level/block/RedStoneWireBlock.java +@@ -371,7 +371,7 @@ public class RedStoneWireBlock extends Block { + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { +- if (!oldState.is(state.getBlock()) && !level.isClientSide) { ++ if (!oldState.is(state.getBlock()) /*&& !level.isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - optimize redstone - replace call to updatePowerStrength + if (level.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) { + level.getWireHandler().onWireAdded(pos, state); // Alternate Current +@@ -392,7 +392,7 @@ public class RedStoneWireBlock extends Block { + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + if (!isMoving && !state.is(newState.getBlock())) { + super.onRemove(state, level, pos, newState, isMoving); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + for (Direction direction : Direction.values()) { + level.updateNeighborsAt(pos.relative(direction), this); + } +@@ -405,7 +405,7 @@ public class RedStoneWireBlock extends Block { + } + // Paper end - optimize redstone + this.updateNeighborsOfNeighboringWires(level, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -426,7 +426,7 @@ public class RedStoneWireBlock extends Block { + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + // Paper start - optimize redstone (Alternate Current) + // Alternate Current handles breaking of redstone wires in the WireHandler. + if (level.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) { +@@ -441,7 +441,7 @@ public class RedStoneWireBlock extends Block { + level.removeBlock(pos, false); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + private static boolean useExperimentalEvaluator(Level level) { +@@ -490,6 +490,7 @@ public class RedStoneWireBlock extends Block { + return this.shouldSignal; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static int getColorForPower(int power) { + return COLORS[power]; + } +@@ -527,6 +528,7 @@ public class RedStoneWireBlock extends Block { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected BlockState rotate(BlockState state, Rotation rotation) { +diff --git a/net/minecraft/world/level/block/RedstoneLampBlock.java b/net/minecraft/world/level/block/RedstoneLampBlock.java +index 83bca10b52c23ea935c5fa441b0a2213ad7f77ab..97f0208b7b110520d0a8007ae5f7264d7cc98d9f 100644 +--- a/net/minecraft/world/level/block/RedstoneLampBlock.java ++++ b/net/minecraft/world/level/block/RedstoneLampBlock.java +@@ -35,7 +35,7 @@ public class RedstoneLampBlock extends Block { + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean litValue = state.getValue(LIT); + if (litValue != level.hasNeighborSignal(pos)) { + if (litValue) { +@@ -49,7 +49,7 @@ public class RedstoneLampBlock extends Block { + level.setBlock(pos, state.cycle(LIT), 2); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/RedstoneTorchBlock.java b/net/minecraft/world/level/block/RedstoneTorchBlock.java +index 3489d0069ada5d0e0829ade0e6a209454c7ae7d7..4125396853304f394d40fc9dac468064fbf241ef 100644 +--- a/net/minecraft/world/level/block/RedstoneTorchBlock.java ++++ b/net/minecraft/world/level/block/RedstoneTorchBlock.java +@@ -137,6 +137,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock { + return true; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -146,6 +147,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock { + level.addParticle(DustParticleOptions.REDSTONE, d, d1, d2, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/RedstoneWallTorchBlock.java b/net/minecraft/world/level/block/RedstoneWallTorchBlock.java +index 0ebd9f3088e3a9294b5ce20f97aa1130cf35e879..250fcb6627bf2e8ae468df3b608be1cc5fe0d7b5 100644 +--- a/net/minecraft/world/level/block/RedstoneWallTorchBlock.java ++++ b/net/minecraft/world/level/block/RedstoneWallTorchBlock.java +@@ -67,6 +67,7 @@ public class RedstoneWallTorchBlock extends RedstoneTorchBlock { + return stateForPlacement == null ? null : this.defaultBlockState().setValue(FACING, stateForPlacement.getValue(FACING)); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -78,6 +79,7 @@ public class RedstoneWallTorchBlock extends RedstoneTorchBlock { + level.addParticle(DustParticleOptions.REDSTONE, d1, d2, d3, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected boolean hasNeighborSignal(Level level, BlockPos pos, BlockState state) { +diff --git a/net/minecraft/world/level/block/RepeaterBlock.java b/net/minecraft/world/level/block/RepeaterBlock.java +index ea4f738f949e46d3f0e581758b8e539ddf48327c..12a9d0fb8ea094692ceb8382983b9de2e7dd6905 100644 +--- a/net/minecraft/world/level/block/RepeaterBlock.java ++++ b/net/minecraft/world/level/block/RepeaterBlock.java +@@ -76,7 +76,7 @@ public class RepeaterBlock extends DiodeBlock { + if (direction == Direction.DOWN && !this.canSurviveOn(level, neighborPos, neighborState)) { + return Blocks.AIR.defaultBlockState(); + } else { +- return !level.isClientSide() && direction.getAxis() != state.getValue(FACING).getAxis() ++ return /*!level.isClientSide() &&*/ direction.getAxis() != state.getValue(FACING).getAxis() // == true // Plazma - Remove isClientSide on DedicatedServer + ? state.setValue(LOCKED, this.isLocked(level, pos, state)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } +@@ -92,6 +92,7 @@ public class RepeaterBlock extends DiodeBlock { + return true; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(POWERED)) { +@@ -110,6 +111,7 @@ public class RepeaterBlock extends DiodeBlock { + level.addParticle(DustParticleOptions.REDSTONE, d + d3, d1, d2 + d4, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/RespawnAnchorBlock.java b/net/minecraft/world/level/block/RespawnAnchorBlock.java +index 167bb36fa80030a0c0f9724f1ff7688322773fb2..deffccafa8034434b9301a15c1f240d28f0fab1e 100644 +--- a/net/minecraft/world/level/block/RespawnAnchorBlock.java ++++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java +@@ -93,13 +93,11 @@ public class RespawnAnchorBlock extends Block { + if (state.getValue(CHARGE) == 0) { + return InteractionResult.PASS; + } else if (!canSetSpawn(level)) { +- if (!level.isClientSide) { +- this.explode(state, level, pos); +- } ++ this.explode(state, level, pos); // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } else { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + ServerPlayer serverPlayer = (ServerPlayer)player; + if (serverPlayer.getRespawnDimension() != level.dimension() || !pos.equals(serverPlayer.getRespawnPosition())) { + if (serverPlayer.setRespawnPosition(level.dimension(), pos, 0.0F, false, true, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.RESPAWN_ANCHOR)) { // Paper - Add PlayerSetSpawnEvent +@@ -113,7 +111,7 @@ public class RespawnAnchorBlock extends Block { + } + // Paper end - Add PlayerSetSpawnEvent + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return InteractionResult.CONSUME; + } +@@ -174,6 +172,7 @@ public class RespawnAnchorBlock extends Block { + level.playSound(null, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.RESPAWN_ANCHOR_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(CHARGE) != 0) { +@@ -188,6 +187,7 @@ public class RespawnAnchorBlock extends Block { + level.addParticle(ParticleTypes.REVERSE_PORTAL, d, d1, d2, 0.0, d3, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/ScaffoldingBlock.java b/net/minecraft/world/level/block/ScaffoldingBlock.java +index b846efc0ec43cccd2b60c0ad0d2f9493ebedf5d8..ea87f4c11853417032d1c95f430a1f4f2dc84045 100644 +--- a/net/minecraft/world/level/block/ScaffoldingBlock.java ++++ b/net/minecraft/world/level/block/ScaffoldingBlock.java +@@ -88,9 +88,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { +- if (!level.isClientSide) { +- level.scheduleTick(pos, this, 1); +- } ++ level.scheduleTick(pos, this, 1); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -108,9 +106,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); + } + +- if (!level.isClientSide()) { +- scheduledTickAccess.scheduleTick(pos, this, 1); +- } ++ scheduledTickAccess.scheduleTick(pos, this, 1); // Plazma - Remove isClientSide on DedicatedServer + + return state; + } +diff --git a/net/minecraft/world/level/block/SculkCatalystBlock.java b/net/minecraft/world/level/block/SculkCatalystBlock.java +index 459d6ee0de5e1680d5505039a67216006af994fe..c8d32cd0738dc4d0507dd822a106a7f9637e865c 100644 +--- a/net/minecraft/world/level/block/SculkCatalystBlock.java ++++ b/net/minecraft/world/level/block/SculkCatalystBlock.java +@@ -55,7 +55,7 @@ public class SculkCatalystBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level.isClientSide ? null : createTickerHelper(blockEntityType, BlockEntityType.SCULK_CATALYST, SculkCatalystBlockEntity::serverTick); ++ return createTickerHelper(blockEntityType, BlockEntityType.SCULK_CATALYST, SculkCatalystBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/SculkSensorBlock.java b/net/minecraft/world/level/block/SculkSensorBlock.java +index 430cdf1442e6a2fe9cb91b7002881c013617622a..b3e696a83fa448a2f51e0c25c95de943bc096607 100644 +--- a/net/minecraft/world/level/block/SculkSensorBlock.java ++++ b/net/minecraft/world/level/block/SculkSensorBlock.java +@@ -102,8 +102,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + + @Override + public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { +- if (!level.isClientSide() +- && canActivate(state) ++ if (canActivate(state) // Plazma - Remove isClientSide on DedicatedServer + && entity.getType() != EntityType.WARDEN + && level.getBlockEntity(pos) instanceof SculkSensorBlockEntity sculkSensorBlockEntity + && level instanceof ServerLevel serverLevel +@@ -128,7 +127,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { +- if (!level.isClientSide() && !state.is(oldState.getBlock())) { ++ if (/*!level.isClientSide() &&*/ !state.is(oldState.getBlock())) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (state.getValue(POWER) > 0 && !level.getBlockTicks().hasScheduledTick(pos, this)) { + level.setBlock(pos, state.setValue(POWER, 0), 18); + } +@@ -178,13 +177,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return !level.isClientSide +- ? createTickerHelper( +- blockEntityType, +- BlockEntityType.SCULK_SENSOR, +- (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser()) +- ) +- : null; ++ return createTickerHelper(blockEntityType, BlockEntityType.SCULK_SENSOR, (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser())); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +@@ -276,6 +269,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (getPhase(state) == SculkSensorPhase.ACTIVE) { +@@ -289,6 +283,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { +diff --git a/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java +index 6fea9f31231ff5d1131786881880172ccd8f955d..b3ac5f15c426b62510858cbd89c93a6a09c500f8 100644 +--- a/net/minecraft/world/level/block/SculkShriekerBlock.java ++++ b/net/minecraft/world/level/block/SculkShriekerBlock.java +@@ -160,12 +160,6 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return !level.isClientSide +- ? BaseEntityBlock.createTickerHelper( +- blockEntityType, +- BlockEntityType.SCULK_SHRIEKER, +- (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser()) +- ) +- : null; ++ return BaseEntityBlock.createTickerHelper(blockEntityType, BlockEntityType.SCULK_SHRIEKER, (level1, pos, state1, blockEntity) -> VibrationSystem.Ticker.tick(level1, blockEntity.getVibrationData(), blockEntity.getVibrationUser())); // Plazma - Remove isClientSide on DedicatedServer + } + } +diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java +index cdf835ff107bc1eadde706d69384e687626fce70..7fedffe3fa69d900db22eaa046c31d2b5e22e604 100644 +--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java ++++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java +@@ -132,7 +132,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock { + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity instanceof ShulkerBoxBlockEntity shulkerBoxBlockEntity) { +- if (!level.isClientSide && player.isCreative() && !shulkerBoxBlockEntity.isEmpty()) { ++ if (/*!level.isClientSide &&*/ player.isCreative() && !shulkerBoxBlockEntity.isEmpty()) { // == true // Plazma - Remove isClientSide on DedicatedServer + ItemStack coloredItemStack = getColoredItemStack(this.getColor()); + coloredItemStack.applyComponents(blockEntity.collectComponents()); + ItemEntity itemEntity = new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, coloredItemStack); +diff --git a/net/minecraft/world/level/block/SignBlock.java b/net/minecraft/world/level/block/SignBlock.java +index f33a42b4888dbf46175e0be409aa6c8688d552b9..a62a25abf9401812e7f02e6bf87d92c6249fafe4 100644 +--- a/net/minecraft/world/level/block/SignBlock.java ++++ b/net/minecraft/world/level/block/SignBlock.java +@@ -90,39 +90,38 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo + protected InteractionResult useItemOn( + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult + ) { +- if (level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity) { +- SignApplicator signApplicator1 = stack.getItem() instanceof SignApplicator signApplicator ? signApplicator : null; +- boolean flag = signApplicator1 != null && player.mayBuild(); +- if (!level.isClientSide) { +- if (flag && !signBlockEntity.isWaxed() && !this.otherPlayerIsEditingSign(player, signBlockEntity)) { +- boolean isFacingFrontText = signBlockEntity.isFacingFrontText(player); +- if (signApplicator1.canApplyToSign(signBlockEntity.getText(isFacingFrontText), player) +- && signApplicator1.tryApplyToSign(level, signBlockEntity, isFacingFrontText, player)) { +- signBlockEntity.executeClickCommandsIfPresent(player, level, pos, isFacingFrontText); +- player.awardStat(Stats.ITEM_USED.get(stack.getItem())); +- level.gameEvent(GameEvent.BLOCK_CHANGE, signBlockEntity.getBlockPos(), GameEvent.Context.of(player, signBlockEntity.getBlockState())); +- stack.consume(1, player); +- return InteractionResult.SUCCESS; +- } else { +- return InteractionResult.TRY_WITH_EMPTY_HAND; +- } +- } else { +- return InteractionResult.TRY_WITH_EMPTY_HAND; +- } +- } else { +- return !flag && !signBlockEntity.isWaxed() ? InteractionResult.CONSUME : InteractionResult.SUCCESS; +- } +- } else { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (!(level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity)) { + return InteractionResult.PASS; + } ++ ++ final SignApplicator applicator = stack.getItem() instanceof SignApplicator i ? i : null; ++ final boolean canUse = applicator != null && player.mayBuild(); ++ ++ if (!canUse || signBlockEntity.isWaxed() || this.otherPlayerIsEditingSign(player, signBlockEntity)) { ++ return InteractionResult.TRY_WITH_EMPTY_HAND; ++ } ++ ++ final boolean facingFront = signBlockEntity.isFacingFrontText(player); ++ if (applicator.canApplyToSign(signBlockEntity.getText(facingFront), player) && applicator.tryApplyToSign(level, signBlockEntity, facingFront, player)) { ++ signBlockEntity.executeClickCommandsIfPresent(player, level, pos, facingFront); ++ player.awardStat(Stats.ITEM_USED.get(stack.getItem())); ++ level.gameEvent(GameEvent.BLOCK_CHANGE, signBlockEntity.getBlockPos(), GameEvent.Context.of(player, signBlockEntity.getBlockState())); ++ stack.consume(1, player); ++ return InteractionResult.SUCCESS; ++ } ++ ++ return InteractionResult.TRY_WITH_EMPTY_HAND; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity) { +- if (level.isClientSide) { ++ /*if (level.isClientSide) { // == false // Plazma - Remove isClientSide on DedicatedServer + Util.pauseInIde(new IllegalStateException("Expected to only call this on server")); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + boolean isFacingFrontText = signBlockEntity.isFacingFrontText(player); + boolean flag = signBlockEntity.executeClickCommandsIfPresent(player, level, pos, isFacingFrontText); +diff --git a/net/minecraft/world/level/block/SimpleWaterloggedBlock.java b/net/minecraft/world/level/block/SimpleWaterloggedBlock.java +index 24e4d918b0c3c4fabbd16d1e99612f7e67adfa70..45b358593a9a69aada1616525c9faaf259a3813f 100644 +--- a/net/minecraft/world/level/block/SimpleWaterloggedBlock.java ++++ b/net/minecraft/world/level/block/SimpleWaterloggedBlock.java +@@ -24,10 +24,10 @@ public interface SimpleWaterloggedBlock extends BucketPickup, LiquidBlockContain + @Override + default boolean placeLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) { + if (!state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) { +- if (!level.isClientSide()) { ++ //if (!level.isClientSide()) { // Plazma - Remove isClientSide on DedicatedServer + level.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, true), 3); + level.scheduleTick(pos, fluidState.getType(), fluidState.getType().getTickDelay(level)); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + return true; + } else { +diff --git a/net/minecraft/world/level/block/SmallDripleafBlock.java b/net/minecraft/world/level/block/SmallDripleafBlock.java +index 97b648c5b163ad623579e0899829231f7fdb7649..13b9b786062ce13567cf6140394ca2a641df2bb2 100644 +--- a/net/minecraft/world/level/block/SmallDripleafBlock.java ++++ b/net/minecraft/world/level/block/SmallDripleafBlock.java +@@ -67,13 +67,13 @@ public class SmallDripleafBlock extends DoublePlantBlock implements Bonemealable + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { +- if (!level.isClientSide()) { ++ //if (!level.isClientSide()) { // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = pos.above(); + BlockState blockState = DoublePlantBlock.copyWaterloggedFrom( + level, blockPos, this.defaultBlockState().setValue(HALF, DoubleBlockHalf.UPPER).setValue(FACING, state.getValue(FACING)) + ); + level.setBlock(blockPos, blockState, 3); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/SmithingTableBlock.java b/net/minecraft/world/level/block/SmithingTableBlock.java +index aa751d5d55524189ef1a9d09417b798b78de3c47..d43674bfc1234244f50f9776f9499d52db802d94 100644 +--- a/net/minecraft/world/level/block/SmithingTableBlock.java ++++ b/net/minecraft/world/level/block/SmithingTableBlock.java +@@ -37,11 +37,7 @@ public class SmithingTableBlock extends CraftingTableBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- if (player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_SMITHING_TABLE); +- } // Paper - Fix InventoryOpenEvent cancellation +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_SMITHING_TABLE)); // Paper - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/SmokerBlock.java b/net/minecraft/world/level/block/SmokerBlock.java +index be2310171d2e6168886795758f415a7af3a00808..90356c642cd5cf841517293a0f516bf128ac4efa 100644 +--- a/net/minecraft/world/level/block/SmokerBlock.java ++++ b/net/minecraft/world/level/block/SmokerBlock.java +@@ -49,6 +49,7 @@ public class SmokerBlock extends AbstractFurnaceBlock { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (state.getValue(LIT)) { +@@ -62,4 +63,5 @@ public class SmokerBlock extends AbstractFurnaceBlock { + level.addParticle(ParticleTypes.SMOKE, d, d1 + 1.1, d2, 0.0, 0.0, 0.0); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/SnifferEggBlock.java b/net/minecraft/world/level/block/SnifferEggBlock.java +index 60e0604b72347a3d2bf7624752372f1c16ab8b8f..05d7afd61780150f5212d630a9b802f972fb0d8a 100644 +--- a/net/minecraft/world/level/block/SnifferEggBlock.java ++++ b/net/minecraft/world/level/block/SnifferEggBlock.java +@@ -101,9 +101,7 @@ public class SnifferEggBlock extends Block { + @Override + public void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { + boolean flag = hatchBoost(level, pos); +- if (!level.isClientSide() && flag) { +- level.levelEvent(3009, pos, 0); +- } ++ level.levelEvent(3009, pos, 0); // Plazma - Remove isClientSide on DedicatedServer + + int i = flag ? level.paperConfig().entities.sniffer.boostedHatchTime.or(BOOSTED_HATCH_TIME_TICKS) : level.paperConfig().entities.sniffer.hatchTime.or(REGULAR_HATCH_TIME_TICKS); // Paper + int i1 = i / 3; +diff --git a/net/minecraft/world/level/block/SpawnerBlock.java b/net/minecraft/world/level/block/SpawnerBlock.java +index 1121843e9db120ef02818369a1fe5f487342a49b..9602083bf24bb58fcdada772ebddf4f947ad6b5e 100644 +--- a/net/minecraft/world/level/block/SpawnerBlock.java ++++ b/net/minecraft/world/level/block/SpawnerBlock.java +@@ -38,9 +38,7 @@ public class SpawnerBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return createTickerHelper( +- blockEntityType, BlockEntityType.MOB_SPAWNER, level.isClientSide ? SpawnerBlockEntity::clientTick : SpawnerBlockEntity::serverTick +- ); ++ return createTickerHelper(blockEntityType, BlockEntityType.MOB_SPAWNER, SpawnerBlockEntity::serverTick); // Plazma - Remove isClientSide on DedicatedServer + } + + // Purpur start - Silk touch spawners +diff --git a/net/minecraft/world/level/block/SporeBlossomBlock.java b/net/minecraft/world/level/block/SporeBlossomBlock.java +index 8347554ee5ab4c08d13a6e5513f965304f218f12..5d874276e576abbb4d3ac222d552c7e39ee65560 100644 +--- a/net/minecraft/world/level/block/SporeBlossomBlock.java ++++ b/net/minecraft/world/level/block/SporeBlossomBlock.java +@@ -52,6 +52,7 @@ public class SporeBlossomBlock extends Block { + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + int x = pos.getX(); +@@ -79,6 +80,7 @@ public class SporeBlossomBlock extends Block { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +diff --git a/net/minecraft/world/level/block/StonecutterBlock.java b/net/minecraft/world/level/block/StonecutterBlock.java +index 9dc7c3d0d6f8bcbc670fe10e594fa9c5495cffab..f2f98e4550cbc25d41cac5c561c9739dd0bd23a5 100644 +--- a/net/minecraft/world/level/block/StonecutterBlock.java ++++ b/net/minecraft/world/level/block/StonecutterBlock.java +@@ -47,11 +47,7 @@ public class StonecutterBlock extends Block { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide) { +- if (player.openMenu(state.getMenuProvider(level, pos)).isPresent()) { // Paper - Fix InventoryOpenEvent cancellation +- player.awardStat(Stats.INTERACT_WITH_STONECUTTER); +- } // Paper - Fix InventoryOpenEvent cancellation +- } ++ player.openMenu(state.getMenuProvider(level, pos)).ifPresent(ignore -> player.awardStat(Stats.INTERACT_WITH_STONECUTTER)); // Paper - Remove isClientSide on DedicatedServer + + return InteractionResult.SUCCESS; + } +diff --git a/net/minecraft/world/level/block/StructureBlock.java b/net/minecraft/world/level/block/StructureBlock.java +index 7bd305a0555d160595ecf8cb227445adcd59a334..9f4d44649270317acf730b9d2d41f1e70e8898dd 100644 +--- a/net/minecraft/world/level/block/StructureBlock.java ++++ b/net/minecraft/world/level/block/StructureBlock.java +@@ -51,14 +51,7 @@ public class StructureBlock extends BaseEntityBlock implements GameMasterBlock { + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { +- if (!level.isClientSide) { +- if (placer != null) { +- BlockEntity blockEntity = level.getBlockEntity(pos); +- if (blockEntity instanceof StructureBlockEntity) { +- ((StructureBlockEntity)blockEntity).createdBy(placer); +- } +- } +- } ++ if (placer != null && (level.getBlockEntity(pos) instanceof StructureBlockEntity structure)) structure.createdBy(placer); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/TargetBlock.java b/net/minecraft/world/level/block/TargetBlock.java +index e993d3c54ffea72a3f16ba652f2d41ec5d8547fa..6f5047052eab4f9a8b29082be99f327f6ac94061 100644 +--- a/net/minecraft/world/level/block/TargetBlock.java ++++ b/net/minecraft/world/level/block/TargetBlock.java +@@ -129,7 +129,7 @@ public class TargetBlock extends Block { + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { +- if (!level.isClientSide() && !state.is(oldState.getBlock())) { ++ if (/*!level.isClientSide() &&*/ !state.is(oldState.getBlock())) { // == true // Plazma - Remove isClientSide on DedicatedServer + if (state.getValue(OUTPUT_POWER) > 0 && !level.getBlockTicks().hasScheduledTick(pos, this)) { + level.setBlock(pos, state.setValue(OUTPUT_POWER, 0), 18); + } +diff --git a/net/minecraft/world/level/block/TntBlock.java b/net/minecraft/world/level/block/TntBlock.java +index 58a54803a9dd31157fb9b337cf0dc5ad4e52b2b7..9124ba1148f6bfee92a2d9c48f54afd1c6b7498f 100644 +--- a/net/minecraft/world/level/block/TntBlock.java ++++ b/net/minecraft/world/level/block/TntBlock.java +@@ -74,7 +74,7 @@ public class TntBlock extends Block { + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide() && !player.isCreative() && state.getValue(UNSTABLE) && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.BLOCK_BREAK, player, null)) { // CraftBukkit - TNTPrimeEvent ++ if (/*!level.isClientSide() &&*/ !player.isCreative() && state.getValue(UNSTABLE) && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.BLOCK_BREAK, player, null)) { // CraftBukkit - TNTPrimeEvent // == true // Plazma - Remove isClientSide on DedicatedServer + explode(level, pos); + } + +@@ -101,12 +101,12 @@ public class TntBlock extends Block { + } + + private static void explode(Level level, BlockPos pos, @Nullable LivingEntity entity) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + PrimedTnt primedTnt = new PrimedTnt(level, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, entity); + level.addFreshEntity(primedTnt); + level.playSound(null, primedTnt.getX(), primedTnt.getY(), primedTnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(entity, GameEvent.PRIME_FUSE, pos); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/TorchBlock.java b/net/minecraft/world/level/block/TorchBlock.java +index 3ebfb4da3d6f10719e73fe6824eb17f0b347acb9..c1be93c85ba2088ccbb8e2f5112df5ea99041131 100644 +--- a/net/minecraft/world/level/block/TorchBlock.java ++++ b/net/minecraft/world/level/block/TorchBlock.java +@@ -39,6 +39,7 @@ public class TorchBlock extends BaseTorchBlock { + this.flameParticle = flameParticle; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + double d = pos.getX() + 0.5; +@@ -47,4 +48,5 @@ public class TorchBlock extends BaseTorchBlock { + level.addParticle(ParticleTypes.SMOKE, d, d1, d2, 0.0, 0.0, 0.0); + level.addParticle(this.flameParticle, d, d1, d2, 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/TrapDoorBlock.java b/net/minecraft/world/level/block/TrapDoorBlock.java +index 879ec40ae17c6625911c20c92f44d0b95f072b88..00441fcaf09e22caf9367fe9bba3cef9f74ab7c7 100644 +--- a/net/minecraft/world/level/block/TrapDoorBlock.java ++++ b/net/minecraft/world/level/block/TrapDoorBlock.java +@@ -143,53 +143,56 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { +- boolean hasNeighborSignal = level.hasNeighborSignal(pos); +- if (hasNeighborSignal != state.getValue(POWERED)) { +- // if (state.getValue(OPEN) != hasNeighborSignal) { +- // CraftBukkit start +- org.bukkit.World bworld = level.getWorld(); +- org.bukkit.block.Block bblock = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()); +- +- int power = bblock.getBlockPower(); +- int oldPower = state.getValue(TrapDoorBlock.OPEN) ? 15 : 0; +- +- if (oldPower == 0 ^ power == 0 || neighborBlock.defaultBlockState().isSignalSource()) { +- org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(bblock, oldPower, power); +- level.getCraftServer().getPluginManager().callEvent(eventRedstone); +- hasNeighborSignal = eventRedstone.getNewCurrent() > 0; +- } +- // CraftBukkit end +- // Paper start - break redstone on trapdoors early +- boolean open = state.getValue(TrapDoorBlock.OPEN) != hasNeighborSignal; +- // note: this must run before any state for this block/its neighborus are written to the world +- // we allow the redstone event to fire so that plugins can block +- if (hasNeighborSignal && open) { // if we are now powered and it caused the trap door to open +- // in this case, first check for the redstone on top first +- BlockPos abovePos = pos.above(); +- BlockState above = level.getBlockState(abovePos); +- if (above.getBlock() instanceof RedStoneWireBlock) { +- level.setBlock(abovePos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_NEIGHBORS); +- Block.popResource(level, abovePos, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.REDSTONE)); +- // now check that this didn't change our state +- if (level.getBlockState(pos) != state) { +- // our state was changed, so we cannot propagate this update +- return; +- } +- } +- } +- if (open) { +- // Paper end - break redstone on trapdoors early +- state = state.setValue(OPEN, Boolean.valueOf(hasNeighborSignal)); +- this.playSound(null, level, pos, hasNeighborSignal); +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ boolean hasNeighborSignal = level.hasNeighborSignal(pos); ++ if (hasNeighborSignal == state.getValue(POWERED)) { ++ return; ++ } + +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 2); +- if (state.getValue(WATERLOGGED)) { +- level.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); ++ // CraftBukkit start ++ final org.bukkit.World world = level.getWorld(); ++ final org.bukkit.block.Block block = world.getBlockAt(pos.getX(), pos.getY(), pos.getZ()); ++ ++ final int power = block.getBlockPower(); ++ final int oldPower = state.getValue(TrapDoorBlock.OPEN) ? 15 : 0; ++ ++ if (oldPower == 0 ^ power == 0 || neighborBlock.defaultBlockState().isSignalSource()) { ++ org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(block, oldPower, power); ++ level.getCraftServer().getPluginManager().callEvent(eventRedstone); ++ hasNeighborSignal = eventRedstone.getNewCurrent() > 0; ++ } ++ // CraftBukkit end ++ ++ // Paper start - break redstone on trapdoors early ++ final boolean open = state.getValue(TrapDoorBlock.OPEN) != hasNeighborSignal; ++ // note: this must run before any state for this block/its neighborus are written to the world ++ // we allow the redstone event to fire so that plugins can block ++ if (hasNeighborSignal && open) { // if we are now powered and it caused the trap door to open ++ // in this case, first check for the redstone on top first ++ BlockPos abovePos = pos.above(); ++ BlockState above = level.getBlockState(abovePos); ++ if (above.getBlock() instanceof RedStoneWireBlock) { ++ level.setBlock(abovePos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_NEIGHBORS); ++ Block.popResource(level, abovePos, new ItemStack(net.minecraft.world.item.Items.REDSTONE)); ++ // now check that this didn't change our state ++ if (level.getBlockState(pos) != state) { ++ // our state was changed, so we cannot propagate this update ++ return; + } + } + } ++ ++ if (open) { ++ // Paper end - break redstone on trapdoors early ++ state = state.setValue(OPEN, hasNeighborSignal); ++ this.playSound(null, level, pos, hasNeighborSignal); ++ } ++ ++ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 2); ++ if (state.getValue(WATERLOGGED)) { ++ level.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); ++ } ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/TrialSpawnerBlock.java b/net/minecraft/world/level/block/TrialSpawnerBlock.java +index b4907fd7d2d3ad717665141232c9df9f7be5fb19..84df08f5d58c8ad13874c5b712311b8a0e5fc992 100644 +--- a/net/minecraft/world/level/block/TrialSpawnerBlock.java ++++ b/net/minecraft/world/level/block/TrialSpawnerBlock.java +@@ -52,18 +52,11 @@ public class TrialSpawnerBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level instanceof ServerLevel serverLevel +- ? createTickerHelper( ++ return createTickerHelper( // Plazma - Remove isClientSide on DedicatedServer + blockEntityType, + BlockEntityType.TRIAL_SPAWNER, + (level1, pos, state1, blockEntity) -> blockEntity.getTrialSpawner() +- .tickServer(serverLevel, pos, state1.getOptionalValue(BlockStateProperties.OMINOUS).orElse(false)) +- ) +- : createTickerHelper( +- blockEntityType, +- BlockEntityType.TRIAL_SPAWNER, +- (level1, pos, state1, blockEntity) -> blockEntity.getTrialSpawner() +- .tickClient(level1, pos, state1.getOptionalValue(BlockStateProperties.OMINOUS).orElse(false)) ++ .tickServer((ServerLevel) level, pos, state1.getOptionalValue(BlockStateProperties.OMINOUS).orElse(false)) // Plazma - Remove isClientSide on DedicatedServer + ); + } + +diff --git a/net/minecraft/world/level/block/TripWireBlock.java b/net/minecraft/world/level/block/TripWireBlock.java +index f80283f7453ddf5abd75e825dd546b00d10c230b..130fc38d39c7495bb8e27314375760d85782cb23 100644 +--- a/net/minecraft/world/level/block/TripWireBlock.java ++++ b/net/minecraft/world/level/block/TripWireBlock.java +@@ -118,7 +118,7 @@ public class TripWireBlock extends Block { + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent disarming tripwires +- if (!level.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { ++ if (/*!level.isClientSide &&*/ !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.setBlock(pos, state.setValue(DISARMED, true), 4); + level.gameEvent(player, GameEvent.SHEAR, pos); + } +@@ -155,11 +155,7 @@ public class TripWireBlock extends Block { + protected void entityInside(BlockState state, Level level, 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(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent +- if (!level.isClientSide) { +- if (!state.getValue(POWERED)) { +- this.checkPressed(level, pos, List.of(entity)); +- } +- } ++ if (!state.getValue(POWERED)) this.checkPressed(level, pos, java.util.Collections.singletonList(entity)); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/TurtleEggBlock.java b/net/minecraft/world/level/block/TurtleEggBlock.java +index ae2c1bb8b6321b686e201c89e3e6fb3d3db3cb1f..0e9cd6bae86919fbda42d3e8180479bd2e2fb2d1 100644 +--- a/net/minecraft/world/level/block/TurtleEggBlock.java ++++ b/net/minecraft/world/level/block/TurtleEggBlock.java +@@ -150,7 +150,7 @@ public class TurtleEggBlock extends Block { + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { +- if (onSand(level, pos) && !level.isClientSide) { ++ if (onSand(level, pos) /*&& !level.isClientSide*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.levelEvent(2012, pos, 15); + } + } +diff --git a/net/minecraft/world/level/block/VaultBlock.java b/net/minecraft/world/level/block/VaultBlock.java +index 89ce9eaa1db0f324168648774b18c00046623d85..ee0f217accedf98787a8bdb63276d94176bdc039 100644 +--- a/net/minecraft/world/level/block/VaultBlock.java ++++ b/net/minecraft/world/level/block/VaultBlock.java +@@ -78,21 +78,13 @@ public class VaultBlock extends BaseEntityBlock { + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { +- return level instanceof ServerLevel serverLevel +- ? createTickerHelper( ++ return createTickerHelper( + blockEntityType, + BlockEntityType.VAULT, + (level1, pos, state1, blockEntity) -> VaultBlockEntity.Server.tick( +- serverLevel, pos, state1, blockEntity.getConfig(), blockEntity.getServerData(), blockEntity.getSharedData() ++ (ServerLevel) level, pos, state1, blockEntity.getConfig(), blockEntity.getServerData(), blockEntity.getSharedData() + ) +- ) +- : createTickerHelper( +- blockEntityType, +- BlockEntityType.VAULT, +- (level1, pos, state1, blockEntity) -> VaultBlockEntity.Client.tick( +- level1, pos, state1, blockEntity.getClientData(), blockEntity.getSharedData() +- ) +- ); ++ ); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/WallTorchBlock.java b/net/minecraft/world/level/block/WallTorchBlock.java +index 58c6c7d740b353644e35055cc52cb874bd3fbfa8..1a3753f284854474451fcc87ba56ce5cf9f01a43 100644 +--- a/net/minecraft/world/level/block/WallTorchBlock.java ++++ b/net/minecraft/world/level/block/WallTorchBlock.java +@@ -108,6 +108,7 @@ public class WallTorchBlock extends TorchBlock { + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() : state; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + Direction direction = state.getValue(FACING); +@@ -120,6 +121,7 @@ public class WallTorchBlock extends TorchBlock { + level.addParticle(ParticleTypes.SMOKE, d + 0.27 * opposite.getStepX(), d1 + 0.22, d2 + 0.27 * opposite.getStepZ(), 0.0, 0.0, 0.0); + level.addParticle(this.flameParticle, d + 0.27 * opposite.getStepX(), d1 + 0.22, d2 + 0.27 * opposite.getStepZ(), 0.0, 0.0, 0.0); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected BlockState rotate(BlockState state, Rotation rotation) { +diff --git a/net/minecraft/world/level/block/WetSpongeBlock.java b/net/minecraft/world/level/block/WetSpongeBlock.java +index 3a24eed10a5da13628fe19c0b26399ee60ebd03d..019a007a7b9fa4d2c9ab3073057e2c22c8bf53cb 100644 +--- a/net/minecraft/world/level/block/WetSpongeBlock.java ++++ b/net/minecraft/world/level/block/WetSpongeBlock.java +@@ -32,6 +32,7 @@ public class WetSpongeBlock extends Block { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + Direction random1 = Direction.getRandom(random); +@@ -69,4 +70,5 @@ public class WetSpongeBlock extends Block { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/WitherRoseBlock.java b/net/minecraft/world/level/block/WitherRoseBlock.java +index 969519f357e5a4b88f2f695cf0b1b4903365fc3d..374092269a92ded692f63dd4c56c8bc985cd7732 100644 +--- a/net/minecraft/world/level/block/WitherRoseBlock.java ++++ b/net/minecraft/world/level/block/WitherRoseBlock.java +@@ -45,6 +45,7 @@ public class WitherRoseBlock extends FlowerBlock { + return super.mayPlaceOn(state, level, pos) || state.is(Blocks.NETHERRACK) || state.is(Blocks.SOUL_SAND) || state.is(Blocks.SOUL_SOIL); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + VoxelShape shape = this.getShape(state, level, pos, CollisionContext.empty()); +@@ -60,6 +61,7 @@ public class WitherRoseBlock extends FlowerBlock { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { +diff --git a/net/minecraft/world/level/block/WitherSkullBlock.java b/net/minecraft/world/level/block/WitherSkullBlock.java +index 31d776ce04a8035977ad82527e90ab3b215940c1..fb1cd664fd92765c3e273bd42eca9781f38059f2 100644 +--- a/net/minecraft/world/level/block/WitherSkullBlock.java ++++ b/net/minecraft/world/level/block/WitherSkullBlock.java +@@ -51,51 +51,54 @@ public class WitherSkullBlock extends SkullBlock { + } + + public static void checkSpawn(Level level, BlockPos pos, SkullBlockEntity blockEntity) { +- if (level.captureBlockStates) return; // CraftBukkit +- if (!level.isClientSide) { +- BlockState blockState = blockEntity.getBlockState(); +- boolean flag = blockState.is(Blocks.WITHER_SKELETON_SKULL) || blockState.is(Blocks.WITHER_SKELETON_WALL_SKULL); +- if (flag && pos.getY() >= level.getMinY() && level.getDifficulty() != Difficulty.PEACEFUL) { +- BlockPattern.BlockPatternMatch blockPatternMatch = getOrCreateWitherFull().find(level, pos); +- if (blockPatternMatch != null) { +- WitherBoss witherBoss = EntityType.WITHER.create(level, EntitySpawnReason.TRIGGERED); +- if (witherBoss != null) { +- // CarvedPumpkinBlock.clearPatternBlocks(level, blockPatternMatch); // CraftBukkit - move down +- BlockPos pos1 = blockPatternMatch.getBlock(1, 2, 0).getPos(); +- witherBoss.moveTo( +- pos1.getX() + 0.5, +- pos1.getY() + 0.55, +- pos1.getZ() + 0.5, +- blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F, +- 0.0F +- ); +- witherBoss.yBodyRot = blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F; +- witherBoss.makeInvulnerable(); +- witherBoss.setSummoner(blockState.getBlock().placer == null ? null : blockState.getBlock().placer.getUUID()); // Purpur - Summoner API +- // CraftBukkit start +- if (!level.addFreshEntity(witherBoss, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_WITHER)) { +- return; +- } +- CarvedPumpkinBlock.clearPatternBlocks(level, blockPatternMatch); // CraftBukkit - from above +- // CraftBukkit end +- +- for (ServerPlayer serverPlayer : level.getEntitiesOfClass(ServerPlayer.class, witherBoss.getBoundingBox().inflate(50.0))) { +- CriteriaTriggers.SUMMONED_ENTITY.trigger(serverPlayer, witherBoss); +- } +- +- // level.addFreshEntity(witherBoss); // CraftBukkit - moved up +- CarvedPumpkinBlock.updatePatternBlocks(level, blockPatternMatch); +- } +- } +- } ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (level.captureBlockStates) { // CraftBukkit ++ return; + } ++ ++ final BlockState blockState = blockEntity.getBlockState(); ++ final boolean isSkull = blockState.is(Blocks.WITHER_SKELETON_SKULL) || blockState.is(Blocks.WITHER_SKELETON_WALL_SKULL); ++ if (!isSkull || pos.getY() < level.getMinY() || level.getDifficulty() == Difficulty.PEACEFUL) { ++ return; ++ } ++ ++ final BlockPattern.BlockPatternMatch blockPatternMatch = getOrCreateWitherFull().find(level, pos); ++ if (blockPatternMatch == null) { ++ return; ++ } ++ ++ final WitherBoss witherBoss = EntityType.WITHER.create(level, EntitySpawnReason.TRIGGERED); ++ if (witherBoss == null) { ++ return; ++ } ++ ++ final BlockPos pos1 = blockPatternMatch.getBlock(1, 2, 0).getPos(); ++ witherBoss.moveTo(pos1.getX() + 0.5, pos1.getY() + 0.55, pos1.getZ() + 0.5, blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F, 0.0F); ++ witherBoss.yBodyRot = blockPatternMatch.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F; ++ witherBoss.makeInvulnerable(); ++ witherBoss.setSummoner(blockState.getBlock().placer == null ? null : blockState.getBlock().placer.getUUID()); // Purpur - Summoner API ++ ++ // CraftBukkit start ++ if (!level.addFreshEntity(witherBoss, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_WITHER)) { ++ return; ++ } ++ ++ CarvedPumpkinBlock.clearPatternBlocks(level, blockPatternMatch); // CraftBukkit - from above ++ // CraftBukkit end ++ ++ for (ServerPlayer serverPlayer : level.getEntitiesOfClass(ServerPlayer.class, witherBoss.getBoundingBox().inflate(50.0))) { ++ CriteriaTriggers.SUMMONED_ENTITY.trigger(serverPlayer, witherBoss); ++ } ++ ++ CarvedPumpkinBlock.updatePatternBlocks(level, blockPatternMatch); ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + public static boolean canSpawnMob(Level level, BlockPos pos, ItemStack stack) { + return stack.is(Items.WITHER_SKELETON_SKULL) + && pos.getY() >= level.getMinY() + 2 + && level.getDifficulty() != Difficulty.PEACEFUL +- && !level.isClientSide ++ //&& !level.isClientSide // == true // Plazma - Remove isClientSide on DedicatedServer + && getOrCreateWitherBase().find(level, pos) != null; + } + +diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +index cfcedf485ae2aeb8d767854fec74239aa8e2a1e2..7a3c73fafaea95499cc26a57d1155727c027212f 100644 +--- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +@@ -90,7 +90,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()) { // == true // Plazma - Remove isClientSide on DedicatedServer + BeaconBlockEntity.playSound(BeaconBlockEntity.this.level, BeaconBlockEntity.this.worldPosition, SoundEvents.BEACON_POWER_SELECT); + } + +@@ -247,7 +247,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + blockEntity.lastCheckY = level.getMinY() - 1; + boolean flag = i > 0; + blockEntity.beamSections = blockEntity.checkingBeamSections; +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean flag1 = blockEntity.levels > 0; + if (!flag && flag1) { + playSound(level, pos, SoundEvents.BEACON_ACTIVATE); +@@ -258,7 +258,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + } else if (flag && !flag1) { + playSound(level, pos, SoundEvents.BEACON_DEACTIVATE); + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + } + +@@ -315,7 +315,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + Level level, BlockPos pos, int beaconLevel, @Nullable Holder primaryEffect, @Nullable Holder secondaryEffect, @Nullable BeaconBlockEntity blockEntity + ) { + // Paper emd - pass beacon block entity +- if (!level.isClientSide && primaryEffect != null) { ++ if (/*!level.isClientSide &&*/ primaryEffect != null) { // == true // Plazma - Remove isClientSide on DedicatedServer + //double d = computeBeaconRange(beaconLevel); // Paper - diff out applyEffects logic components - see below // Plazma - Remove unused variables + int i = computeEffectAmplifier(beaconLevel, primaryEffect, secondaryEffect); // Paper - diff out applyEffects logic components - see below + +diff --git a/net/minecraft/world/level/block/entity/BellBlockEntity.java b/net/minecraft/world/level/block/entity/BellBlockEntity.java +index ff63952c10d4642d5c14f470a18bea3066aa7ab0..044cc629d34abe1ec96bbba7b10d66a57708f05c 100644 +--- a/net/minecraft/world/level/block/entity/BellBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BellBlockEntity.java +@@ -84,9 +84,11 @@ public class BellBlockEntity extends BlockEntity { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void clientTick(Level level, BlockPos pos, BlockState state, BellBlockEntity blockEntity) { + tick(level, pos, state, blockEntity, BellBlockEntity::showBellParticles); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void serverTick(Level level, BlockPos pos, BlockState state, BellBlockEntity blockEntity) { + tick(level, pos, state, blockEntity, BellBlockEntity::makeRaidersGlow); +@@ -112,13 +114,13 @@ public class BellBlockEntity extends BlockEntity { + this.nearbyEntities = this.level.getEntitiesOfClass(LivingEntity.class, aabb); + } + +- if (!this.level.isClientSide) { ++ //if (!this.level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + for (LivingEntity livingEntity : this.nearbyEntities) { + if (livingEntity.isAlive() && !livingEntity.isRemoved() && blockPos.closerToCenterThan(livingEntity.position(), 32.0)) { + livingEntity.getBrain().setMemory(MemoryModuleType.HEARD_BELL_TIME, this.level.getGameTime()); + } + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + this.nearbyEntities.removeIf(e -> !e.isAlive()); // Paper - Fix bell block entity memory leak + } +@@ -143,6 +145,7 @@ public class BellBlockEntity extends BlockEntity { + // Paper end - call bell resonate event and bell reveal raider event + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private static void showBellParticles(Level level, BlockPos pos, List raiders) { + MutableInt mutableInt = new MutableInt(16700985); + int i = (int)raiders.stream().filter(raider -> pos.closerToCenterThan(raider.position(), 48.0)).count(); +@@ -165,6 +168,7 @@ public class BellBlockEntity extends BlockEntity { + } + ); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + private static boolean isRaiderWithinRange(BlockPos pos, LivingEntity raider) { + return raider.isAlive() && !raider.isRemoved() && pos.closerToCenterThan(raider.position(), 48.0) && raider.getType().is(EntityTypeTags.RAIDERS); +diff --git a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +index 00b2d069c6eb26742f0fd74ac1103e428873248a..91ec4b229219d27afbdd6b5b66d19e58aa7853f5 100644 +--- a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +@@ -37,7 +37,7 @@ public class ConduitBlockEntity extends BlockEntity { + private static final int KILL_RANGE = 8; + private static final Block[] VALID_BLOCKS = new Block[]{Blocks.PRISMARINE, Blocks.PRISMARINE_BRICKS, Blocks.SEA_LANTERN, Blocks.DARK_PRISMARINE}; + public int tickCount; +- private float activeRotation; ++ //private float activeRotation; // Plazma - Remove isClientSide on DedicatedServer + private boolean isActive; + private boolean isHunting; + public final List effectBlocks = Lists.newArrayList(); +@@ -79,6 +79,7 @@ public class ConduitBlockEntity extends BlockEntity { + return this.saveCustomOnly(registries); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void clientTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) { + blockEntity.tickCount++; + long gameTime = level.getGameTime(); +@@ -94,6 +95,7 @@ public class ConduitBlockEntity extends BlockEntity { + blockEntity.activeRotation++; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void serverTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) { + blockEntity.tickCount++; +@@ -241,6 +243,7 @@ public class ConduitBlockEntity extends BlockEntity { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private static void updateClientTarget(Level level, BlockPos pos, ConduitBlockEntity blockEntity) { + if (blockEntity.destroyTargetUUID == null) { + blockEntity.destroyTarget = null; +@@ -251,6 +254,7 @@ public class ConduitBlockEntity extends BlockEntity { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static AABB getDestroyRangeAABB(BlockPos pos) { + // Purpur start - Conduit behavior configuration +@@ -273,6 +277,7 @@ public class ConduitBlockEntity extends BlockEntity { + return entitiesOfClass.size() == 1 ? entitiesOfClass.get(0) : null; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + private static void animationTick(Level level, BlockPos pos, List positions, @Nullable Entity entity, int tickCount) { + RandomSource randomSource = level.random; + double d = Mth.sin((tickCount + 35) * 0.1F) / 2.0F + 0.5F; +@@ -298,6 +303,7 @@ public class ConduitBlockEntity extends BlockEntity { + level.addParticle(ParticleTypes.NAUTILUS, vec31.x, vec31.y, vec31.z, vec32.x, vec32.y, vec32.z); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public boolean isActive() { + return this.isActive; +@@ -311,7 +317,9 @@ public class ConduitBlockEntity extends BlockEntity { + this.isHunting = isHunting; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public float getActiveRotation(float partialTick) { + return (this.activeRotation + partialTick) * -0.0375F; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + } +diff --git a/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java b/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java +index dc47bb2ec3a8a4d3fbd1f64abbad1f293c57ae52..8dd3549cedcd0270cee2f96ca9e37425ee9c70fa 100644 +--- a/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java +@@ -201,7 +201,7 @@ public class DecoratedPotBlockEntity extends BlockEntity implements Randomizable + } + + public void wobble(DecoratedPotBlockEntity.WobbleStyle style) { +- if (this.level != null && !this.level.isClientSide()) { ++ if (this.level != null /*&& !this.level.isClientSide()*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.level.blockEvent(this.getBlockPos(), this.getBlockState().getBlock(), 1, style.ordinal()); + } + } +diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java +index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..2d26de7888e86be189f77f3b67a52199179a1cb1 100644 +--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java +@@ -177,29 +177,29 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen + // Paper end - Perf: Optimize Hoppers + + private static boolean tryMoveItems(Level level, BlockPos pos, BlockState state, HopperBlockEntity blockEntity, BooleanSupplier validator) { +- if (level.isClientSide) { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (blockEntity.isOnCooldown() || !state.getValue(HopperBlock.ENABLED)) { + return false; +- } else { +- if (!blockEntity.isOnCooldown() && state.getValue(HopperBlock.ENABLED)) { +- boolean flag = false; +- final int fullState = getFullState(blockEntity); // Paper - Perf: Optimize Hoppers +- if (fullState != HOPPER_EMPTY) { // Paper - Perf: Optimize Hoppers +- flag = ejectItems(level, pos, blockEntity); +- } ++ } + +- if (fullState != HOPPER_IS_FULL || flag) { // Paper - Perf: Optimize Hoppers +- flag |= validator.getAsBoolean(); // Paper - note: this is not a validator, it's what adds/sucks in items +- } ++ boolean flag = false; ++ final int fullState = getFullState(blockEntity); // Paper - Perf: Optimize Hoppers ++ if (fullState != HOPPER_EMPTY) { // Paper - Perf: Optimize Hoppers ++ flag = ejectItems(level, pos, blockEntity); ++ } + +- if (flag) { +- blockEntity.setCooldown(level.spigotConfig.hopperTransfer); // Spigot +- setChanged(level, pos, state); +- return true; +- } +- } ++ if (fullState != HOPPER_IS_FULL || flag) { // Paper - Perf: Optimize Hoppers ++ flag |= validator.getAsBoolean(); // Paper - note: this is not a validator, it's what adds/sucks in items ++ } + +- return false; ++ if (flag) { ++ blockEntity.setCooldown(level.spigotConfig.hopperTransfer); // Spigot ++ setChanged(level, pos, state); ++ return true; + } ++ ++ return false; ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + private boolean inventoryFull() { +diff --git a/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java +index a58105f509a5128276d856e2123b7523f2dd7069..c553a608ba5c458cad41ce04cc115d9f5097458e 100644 +--- a/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java +@@ -84,7 +84,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*/) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = this.getBlockPos(); + ItemStack theItem = this.getTheItem(); + if (!theItem.isEmpty()) { +diff --git a/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java b/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java +index 30b490bb19d9c0194140f1ad1c843e324110b87b..f8164ed160d6c08bd8fcf94b6b8a3026341f1f19 100644 +--- a/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/SpawnerBlockEntity.java +@@ -48,9 +48,11 @@ public class SpawnerBlockEntity extends BlockEntity implements Spawner { + this.spawner.save(tag); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void clientTick(Level level, BlockPos pos, BlockState state, SpawnerBlockEntity blockEntity) { + blockEntity.spawner.clientTick(level, pos); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void serverTick(Level level, BlockPos pos, BlockState state, SpawnerBlockEntity blockEntity) { + blockEntity.spawner.serverTick((ServerLevel)level, pos); +diff --git a/net/minecraft/world/level/block/entity/StructureBlockEntity.java b/net/minecraft/world/level/block/entity/StructureBlockEntity.java +index ccbc38506cd11272fd01c5dbceee4d0e0fff1ed7..b5a53706e86275f8401f74ab042d88ccf5f055fd 100644 +--- a/net/minecraft/world/level/block/entity/StructureBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/StructureBlockEntity.java +@@ -148,15 +148,7 @@ public class StructureBlockEntity extends BlockEntity { + } + + public boolean usedBy(Player player) { +- if (!player.canUseGameMasterBlocks()) { +- return false; +- } else { +- if (player.getCommandSenderWorld().isClientSide) { +- player.openStructureBlock(this); +- } +- +- return true; +- } ++ return player.canUseGameMasterBlocks(); // Plazma - Remove isClientSide on DedicatedServer + } + + public String getStructureName() { +@@ -422,7 +414,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) { // == true // Plazma - Remove isClientSide on DedicatedServer + ServerLevel serverLevel = (ServerLevel)this.level; + StructureTemplateManager structureManager = serverLevel.getStructureManager(); + +diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +index 5bf39c542757bf97da8909b65c22786a8a30385a..2f0bc1829977ccb358512b257a7db53ed75bf406 100644 +--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +@@ -63,12 +63,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { + this.exactTeleport = tag.getBoolean("ExactTeleport"); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void beamAnimationTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) { + blockEntity.age++; + if (blockEntity.isCoolingDown()) { + blockEntity.teleportCooldown--; + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static void portalTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) { + boolean isSpawning = blockEntity.isSpawning(); +@@ -112,11 +114,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { + } + + public static void triggerCooldown(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) { +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + blockEntity.teleportCooldown = 40; + level.blockEvent(pos, state.getBlock(), 1, 0); + setChanged(level, pos, state); +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java +index 72657b958f9949911918a2a513b75ecd3e1eef4d..12eb374c732d65bc41e3004f0564c056c80daf8a 100644 +--- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java ++++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java +@@ -288,6 +288,7 @@ public final class TrialSpawner { + } + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void tickClient(Level level, BlockPos pos, boolean isOminous) { + TrialSpawnerState state = this.getState(); + state.emitParticles(level, pos, isOminous); +@@ -305,6 +306,7 @@ public final class TrialSpawner { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void tickServer(ServerLevel level, BlockPos pos, boolean isOminous) { + this.isOminous = isOminous; +@@ -334,6 +336,7 @@ public final class TrialSpawner { + return blockHitResult.getBlockPos().equals(BlockPos.containing(spawnerPos)) || blockHitResult.getType() == HitResult.Type.MISS; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static void addSpawnParticles(Level level, BlockPos pos, RandomSource random, SimpleParticleType particleType) { + for (int i = 0; i < 20; i++) { + double d = pos.getX() + 0.5 + (random.nextDouble() - 0.5) * 2.0; +@@ -380,6 +383,7 @@ public final class TrialSpawner { + level.addParticle(ParticleTypes.SMOKE, d, d1, d2, d3, d4, d5); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void overrideEntityToSpawn(EntityType entityType, Level level) { + this.data.reset(); +diff --git a/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java b/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java +index 517786b0a3002559beabf1673adc7a15f542405c..f1934382a98ede563a74c30774481225056833ff 100644 +--- a/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java +@@ -95,7 +95,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.serverData : null; // Plazma - Remove isClientSide on DedicatedServer + } + + public VaultSharedData getSharedData() { +@@ -115,6 +115,7 @@ public class VaultBlockEntity extends BlockEntity { + this.config = config; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public static final class Client { + private static final int PARTICLE_TICK_RATE = 20; + private static final float IDLE_PARTICLE_CHANCE = 0.5F; +@@ -220,6 +221,7 @@ public class VaultBlockEntity extends BlockEntity { + return Vec3.atBottomCenterOf(pos).add(facing.getStepX() * 0.5, 1.75, facing.getStepZ() * 0.5); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public static final class Server { + private static final int UNLOCKING_DELAY_TICKS = 14; +diff --git a/net/minecraft/world/level/block/piston/MovingPistonBlock.java b/net/minecraft/world/level/block/piston/MovingPistonBlock.java +index f14e84e67746208dd188525fb91ab30b190d332b..157eca546267ccff62a7ed7923938f69885914c5 100644 +--- a/net/minecraft/world/level/block/piston/MovingPistonBlock.java ++++ b/net/minecraft/world/level/block/piston/MovingPistonBlock.java +@@ -88,7 +88,7 @@ public class MovingPistonBlock extends BaseEntityBlock { + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { +- if (!level.isClientSide && level.getBlockEntity(pos) == null) { ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) == null) { // == true // Plazma - Remove isClientSide on DedicatedServer + level.removeBlock(pos, false); + return InteractionResult.CONSUME; + } else { +diff --git a/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/net/minecraft/world/level/block/piston/PistonBaseBlock.java +index 24e460cf00d6d83b57ac71bcb70dc117cf4ece3d..b791ade901e785264152f93875446c767d9bf075 100644 +--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java ++++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java +@@ -96,22 +96,18 @@ public class PistonBaseBlock extends DirectionalBlock { + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { +- if (!level.isClientSide) { +- this.checkIfExtend(level, pos, state); +- } ++ this.checkIfExtend(level, pos, state); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { +- if (!level.isClientSide) { +- this.checkIfExtend(level, pos, state); +- } ++ this.checkIfExtend(level, pos, state); // Plazma - Remove isClientSide on DedicatedServer + } + + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { + if (!oldState.is(state.getBlock())) { +- if (!level.isClientSide && level.getBlockEntity(pos) == null) { ++ if (/*!level.isClientSide &&*/ level.getBlockEntity(pos) == null) { // == true // Plazma - Remove isClientSide on DedicatedServer + this.checkIfExtend(level, pos, state); + } + } +@@ -181,7 +177,7 @@ public class PistonBaseBlock extends DirectionalBlock { + } + // Paper end - Protect Bedrock and End Portal/Frames from being destroyed + BlockState blockState = state.setValue(EXTENDED, true); +- if (!level.isClientSide) { ++ //if (!level.isClientSide) { // == true // Plazma - Remove isClientSide on DedicatedServer + boolean neighborSignal = this.getNeighborSignal(level, pos, direction); + if (neighborSignal && (id == 1 || id == 2)) { + level.setBlock(pos, blockState, 2); +@@ -191,7 +187,7 @@ public class PistonBaseBlock extends DirectionalBlock { + if (!neighborSignal && id == 0) { + return false; + } +- } ++ //} // Plazma - Remove isClientSide on DedicatedServer + + if (id == 0) { + if (!this.moveBlocks(level, pos, direction, true)) { +diff --git a/net/minecraft/world/level/block/piston/PistonHeadBlock.java b/net/minecraft/world/level/block/piston/PistonHeadBlock.java +index a0e8123a281632ee47b8a937d60e716375e04a8b..c8b544ecb147669d7a56e3ac93062d24e9011270 100644 +--- a/net/minecraft/world/level/block/piston/PistonHeadBlock.java ++++ b/net/minecraft/world/level/block/piston/PistonHeadBlock.java +@@ -111,7 +111,7 @@ public class PistonHeadBlock extends DirectionalBlock { + + @Override + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { +- if (!level.isClientSide && player.getAbilities().instabuild) { ++ if (/*!level.isClientSide &&*/ player.getAbilities().instabuild) { // == true // Plazma - Remove isClientSide on DedicatedServer + BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite()); + if (this.isFittingBase(state, level.getBlockState(blockPos))) { + level.destroyBlock(blockPos, false); +diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +index 8f38522bb89c56e9592b86e0bda448ee02cc3de0..449f017c900949ca5694eacfd6a18f4c6c1de880 100644 +--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java ++++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +@@ -265,7 +265,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*/)) { // == false // Plazma - Remove isClientSide on DedicatedServer + this.progress = 1.0F; + this.progressO = this.progress; + this.level.removeBlockEntity(this.worldPosition); +@@ -294,30 +294,8 @@ public class PistonMovingBlockEntity extends BlockEntity { + public static void tick(Level level, BlockPos pos, BlockState state, PistonMovingBlockEntity blockEntity) { + blockEntity.lastTicked = level.getGameTime(); + blockEntity.progressO = blockEntity.progress; +- if (blockEntity.progressO >= 1.0F) { +- if (level.isClientSide && blockEntity.deathTicks < 5) { +- blockEntity.deathTicks++; +- } else { +- level.removeBlockEntity(pos); +- blockEntity.setRemoved(); +- if (level.getBlockState(pos).is(Blocks.MOVING_PISTON)) { +- BlockState blockState = Block.updateFromNeighbourShapes(blockEntity.movedState, level, pos); +- if (blockState.isAir()) { +- level.setBlock(pos, blockEntity.movedState, io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPistonDuplication ? 84 : (84 | Block.UPDATE_CLIENTS)); // Paper - fix a variety of piston desync dupes; force notify (flag 2), it's possible the set type by the piston block (which doesn't notify) set this block to air +- Block.updateOrDestroy(blockEntity.movedState, blockState, level, pos, 3); +- } else { +- if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED)) { +- blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, false); +- } +- +- level.setBlock(pos, blockState, 67); +- level.neighborChanged( +- pos, blockState.getBlock(), ExperimentalRedstoneUtils.initialOrientation(level, blockEntity.getPushDirection(), null) +- ); +- } +- } +- } +- } else { ++ // Plazma start - Remove isClientSide on DedicatedServer ++ if (!(blockEntity.progressO >= 1.0F)) { + float f = blockEntity.progress + 0.5F; + moveCollidedEntities(level, pos, f, blockEntity); + moveStuckEntities(level, pos, f, blockEntity); +@@ -326,6 +304,27 @@ public class PistonMovingBlockEntity extends BlockEntity { + blockEntity.progress = 1.0F; + } + } ++ ++ level.removeBlockEntity(pos); ++ blockEntity.setRemoved(); ++ if (!level.getBlockState(pos).is(Blocks.MOVING_PISTON)) { ++ return; ++ } ++ ++ BlockState blockState = Block.updateFromNeighbourShapes(blockEntity.movedState, level, pos); ++ if (blockState.isAir()) { ++ level.setBlock(pos, blockEntity.movedState, io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPistonDuplication ? 84 : (84 | Block.UPDATE_CLIENTS)); // Paper - fix a variety of piston desync dupes; force notify (flag 2), it's possible the set type by the piston block (which doesn't notify) set this block to air ++ Block.updateOrDestroy(blockEntity.movedState, blockState, level, pos, 3); ++ return; ++ } ++ ++ if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED)) { ++ blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, false); ++ } ++ ++ level.setBlock(pos, blockState, 67); ++ level.neighborChanged(pos, blockState.getBlock(), ExperimentalRedstoneUtils.initialOrientation(level, blockEntity.getPushDirection(), null)); ++ // Plazma end - Remove isClientSide on DedicatedServer + } + + @Override +diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java +index 761fdcd4a4e18f45547afd8edff44f61c6eeacb4..9a064bae123b18c097af7f9fef470b5e799c7a56 100644 +--- a/net/minecraft/world/level/chunk/LevelChunk.java ++++ b/net/minecraft/world/level/chunk/LevelChunk.java +@@ -395,7 +395,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p + } + + boolean hasBlockEntity = blockState.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 // == true // Plazma - Remove isClientSide on DedicatedServer + blockState.onRemove(this.level, pos, state, isMoving); + } else if (!blockState.is(block) && hasBlockEntity) { + this.removeBlockEntity(pos); +@@ -404,7 +404,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p + if (!section.getBlockState(i, i1, i2).is(block)) { + return null; + } else { +- if (!this.level.isClientSide && doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // 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)) { // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled. // == true // Plazma - Remove isClientSide on DedicatedServer + state.onPlace(this.level, pos, blockState, isMoving); + } + +@@ -501,7 +501,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(); // == false // Plazma - Remove isClientSide on DedicatedServer + } + + boolean isTicking(BlockPos pos) { +diff --git a/net/minecraft/world/level/material/Fluid.java b/net/minecraft/world/level/material/Fluid.java +index b9abf2a8e23f7b0d10e53f684a80d6c6eff3f578..ee57b1bc55d6f1aaf21af6b9d966d95691961c5f 100644 +--- a/net/minecraft/world/level/material/Fluid.java ++++ b/net/minecraft/world/level/material/Fluid.java +@@ -51,8 +51,10 @@ public abstract class Fluid { + + public abstract Item getBucket(); + ++ /* // Plazma - Remove isClientSide on DedicatedServer + protected void animateTick(Level level, BlockPos pos, FluidState state, RandomSource random) { + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + protected void tick(ServerLevel level, BlockPos pos, BlockState blockState, FluidState fluidState) { + } +diff --git a/net/minecraft/world/level/material/FluidState.java b/net/minecraft/world/level/material/FluidState.java +index 481cb46973acb9785fdee5732e98aac560c6ec08..27ca4de54e03ca58a6aa675688113eefe29f5bd7 100644 +--- a/net/minecraft/world/level/material/FluidState.java ++++ b/net/minecraft/world/level/material/FluidState.java +@@ -79,6 +79,7 @@ public final class FluidState extends StateHolder implements + return this.amount; // Paper - fluid method optimisations + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public boolean shouldRenderBackwardUpFace(BlockGetter level, BlockPos pos) { + for (int i = -1; i <= 1; i++) { + for (int i1 = -1; i1 <= 1; i1++) { +@@ -92,14 +93,17 @@ public final class FluidState extends StateHolder implements + + return false; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public void tick(ServerLevel level, BlockPos pos, BlockState state) { + this.getType().tick(level, pos, state, this); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + public void animateTick(Level level, BlockPos pos, RandomSource random) { + this.getType().animateTick(level, pos, this, random); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public boolean isRandomlyTicking() { + return this.isRandomlyTicking; // Paper - fluid method optimisations +@@ -122,10 +126,12 @@ public final class FluidState extends StateHolder implements + // Paper end - fluid method optimisations + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Nullable + public ParticleOptions getDripParticle() { + return this.getType().getDripParticle(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + public boolean is(TagKey tag) { + return this.getType().builtInRegistryHolder().is(tag); +diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java +index f748c2af98a8dcd3d73023957c32957dfc70e426..4cc354be3e1cb7c8105fb3597f551f8209502231 100644 +--- a/net/minecraft/world/level/material/LavaFluid.java ++++ b/net/minecraft/world/level/material/LavaFluid.java +@@ -43,6 +43,7 @@ public abstract class LavaFluid extends FlowingFluid { + return Items.LAVA_BUCKET; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(Level level, BlockPos pos, FluidState state, RandomSource random) { + BlockPos blockPos = pos.above(); +@@ -71,6 +72,7 @@ public abstract class LavaFluid extends FlowingFluid { + } + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public void randomTick(ServerLevel level, BlockPos pos, FluidState state, RandomSource random) { +diff --git a/net/minecraft/world/level/material/WaterFluid.java b/net/minecraft/world/level/material/WaterFluid.java +index 9a59e23f8038e3ae539e35545a45eeb8ed710c8e..fe62c8f9905e256aaac0374f94926f306e4714a2 100644 +--- a/net/minecraft/world/level/material/WaterFluid.java ++++ b/net/minecraft/world/level/material/WaterFluid.java +@@ -42,6 +42,7 @@ public abstract class WaterFluid extends FlowingFluid { + return Items.WATER_BUCKET; + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public void animateTick(Level level, BlockPos pos, FluidState state, RandomSource random) { + if (!state.isSource() && !state.getValue(FALLING)) { +@@ -63,6 +64,7 @@ public abstract class WaterFluid extends FlowingFluid { + ); + } + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Nullable + @Override diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java.patch new file mode 100644 index 0000000..e1f2a92 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java.patch @@ -0,0 +1,11 @@ +--- a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java ++++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java +@@ -339,7 +_,7 @@ + + public static int getBlockId(final String block) { + final Integer ret = BLOCK_NAME_TO_ID.get(block); +- return ret == null ? 0 : ret.intValue(); ++ return ret == null ? 0 : ret; + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/ListType.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/ListType.java.patch new file mode 100644 index 0000000..134e3d5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/ListType.java.patch @@ -0,0 +1,84 @@ +--- a/ca/spottedleaf/dataconverter/types/ListType.java ++++ b/ca/spottedleaf/dataconverter/types/ListType.java +@@ -25,17 +_,17 @@ + case NONE: + throw new IllegalStateException("List is empty and has no type"); + case BYTE: +- return Byte.valueOf(this.getByte(index)); ++ return this.getByte(index); + case SHORT: +- return Short.valueOf(this.getShort(index)); ++ return this.getShort(index); + case INT: +- return Integer.valueOf(this.getInt(index)); ++ return this.getInt(index); + case LONG: +- return Long.valueOf(this.getLong(index)); ++ return this.getLong(index); + case FLOAT: +- return Float.valueOf(this.getFloat(index)); ++ return this.getFloat(index); + case DOUBLE: +- return Double.valueOf(this.getDouble(index)); ++ return this.getDouble(index); + case NUMBER: + return this.getNumber(index); + case BYTE_ARRAY: +@@ -60,22 +_,22 @@ + public default void setGeneric(final int index, final Object to) { + if (to instanceof Number) { + if (to instanceof Byte) { +- this.setByte(index, ((Byte)to).byteValue()); ++ this.setByte(index, (Byte) to); + return; + } else if (to instanceof Short) { +- this.setShort(index, ((Short)to).shortValue()); ++ this.setShort(index, (Short) to); + return; + } else if (to instanceof Integer) { +- this.setInt(index, ((Integer)to).intValue()); ++ this.setInt(index, (Integer) to); + return; + } else if (to instanceof Long) { +- this.setLong(index, ((Long)to).longValue()); ++ this.setLong(index, (Long) to); + return; + } else if (to instanceof Float) { +- this.setFloat(index, ((Float)to).floatValue()); ++ this.setFloat(index, (Float) to); + return; + } else if (to instanceof Double) { +- this.setDouble(index, ((Double)to).doubleValue()); ++ this.setDouble(index, (Double) to); + return; + } // else fall through to throw + } else if (to instanceof MapType) { +@@ -171,22 +_,22 @@ + public default void addGeneric(final Object to) { + if (to instanceof Number) { + if (to instanceof Byte) { +- this.addByte(((Byte)to).byteValue()); ++ this.addByte((Byte) to); + return; + } else if (to instanceof Short) { +- this.addShort(((Short)to).shortValue()); ++ this.addShort((Short) to); + return; + } else if (to instanceof Integer) { +- this.addInt(((Integer)to).intValue()); ++ this.addInt((Integer) to); + return; + } else if (to instanceof Long) { +- this.addLong(((Long)to).longValue()); ++ this.addLong((Long) to); + return; + } else if (to instanceof Float) { +- this.addFloat(((Float)to).floatValue()); ++ this.addFloat((Float) to); + return; + } else if (to instanceof Double) { +- this.addDouble(((Double)to).doubleValue()); ++ this.addDouble((Double) to); + return; + } // else fall through to throw + } else if (to instanceof MapType) { diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/MapType.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/MapType.java.patch new file mode 100644 index 0000000..3945880 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/MapType.java.patch @@ -0,0 +1,35 @@ +--- a/ca/spottedleaf/dataconverter/types/MapType.java ++++ b/ca/spottedleaf/dataconverter/types/MapType.java +@@ -172,25 +_,25 @@ + + public default void setGeneric(final K key, final Object value) { + if (value instanceof Boolean) { +- this.setBoolean(key, ((Boolean)value).booleanValue()); ++ this.setBoolean(key, (Boolean) value); + } else if (value instanceof Number) { + if (value instanceof Byte) { +- this.setByte(key, ((Byte)value).byteValue()); ++ this.setByte(key, (Byte) value); + return; + } else if (value instanceof Short) { +- this.setShort(key, ((Short)value).shortValue()); ++ this.setShort(key, (Short) value); + return; + } else if (value instanceof Integer) { +- this.setInt(key, ((Integer)value).intValue()); ++ this.setInt(key, (Integer) value); + return; + } else if (value instanceof Long) { +- this.setLong(key, ((Long)value).longValue()); ++ this.setLong(key, (Long) value); + return; + } else if (value instanceof Float) { +- this.setFloat(key, ((Float)value).floatValue()); ++ this.setFloat(key, (Float) value); + return; + } else if (value instanceof Double) { +- this.setDouble(key, ((Double)value).doubleValue()); ++ this.setDouble(key, (Double) value); + return; + } // else fall through to throw + } else if (value instanceof MapType) { diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonListType.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonListType.java.patch new file mode 100644 index 0000000..5a52991 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonListType.java.patch @@ -0,0 +1,119 @@ +--- a/ca/spottedleaf/dataconverter/types/json/JsonListType.java ++++ b/ca/spottedleaf/dataconverter/types/json/JsonListType.java +@@ -91,7 +_,7 @@ + return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0); + } else if (this.compressed && primitive.isString()) { + try { +- return Integer.valueOf(Integer.parseInt(primitive.getAsString())); ++ return Integer.parseInt(primitive.getAsString()); + } catch (final NumberFormatException ex) { + return null; + } +@@ -110,7 +_,7 @@ + + @Override + public void setByte(final int index, final byte to) { +- this.array.set(index, new JsonPrimitive(Byte.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -122,7 +_,7 @@ + + @Override + public void setShort(final int index, final short to) { +- this.array.set(index, new JsonPrimitive(Short.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -134,7 +_,7 @@ + + @Override + public void setInt(final int index, final int to) { +- this.array.set(index, new JsonPrimitive(Integer.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -146,7 +_,7 @@ + + @Override + public void setLong(final int index, final long to) { +- this.array.set(index, new JsonPrimitive(Long.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -158,7 +_,7 @@ + + @Override + public void setFloat(final int index, final float to) { +- this.array.set(index, new JsonPrimitive(Float.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -170,7 +_,7 @@ + + @Override + public void setDouble(final int index, final double to) { +- this.array.set(index, new JsonPrimitive(Double.valueOf(to))); ++ this.array.set(index, new JsonPrimitive(to)); + } + + @Override +@@ -268,7 +_,7 @@ + + @Override + public void addByte(final byte b) { +- this.array.add(Byte.valueOf(b)); ++ this.array.add(b); + } + + @Override +@@ -279,7 +_,7 @@ + + @Override + public void addShort(final short s) { +- this.array.add(Short.valueOf(s)); ++ this.array.add(s); + } + + @Override +@@ -290,7 +_,7 @@ + + @Override + public void addInt(final int i) { +- this.array.add(Integer.valueOf(i)); ++ this.array.add(i); + } + + @Override +@@ -301,7 +_,7 @@ + + @Override + public void addLong(final long l) { +- this.array.add(Long.valueOf(l)); ++ this.array.add(l); + } + + @Override +@@ -312,7 +_,7 @@ + + @Override + public void addFloat(final float f) { +- this.array.add(Float.valueOf(f)); ++ this.array.add(f); + } + + @Override +@@ -323,7 +_,7 @@ + + @Override + public void addDouble(final double d) { +- this.array.add(Double.valueOf(d)); ++ this.array.add(d); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonMapType.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonMapType.java.patch new file mode 100644 index 0000000..0f372fd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/dataconverter/types/json/JsonMapType.java.patch @@ -0,0 +1,129 @@ +--- a/ca/spottedleaf/dataconverter/types/json/JsonMapType.java ++++ b/ca/spottedleaf/dataconverter/types/json/JsonMapType.java +@@ -15,8 +_,8 @@ + + public final class JsonMapType implements MapType { + +- protected final JsonObject map; +- protected final boolean compressed; ++ final JsonObject map; // Plazma - AT (protected -> package-private) ++ final boolean compressed; // Plazma - AT (protected -> package-private) + + public JsonMapType(final boolean compressed) { + this.map = new JsonObject(); +@@ -124,23 +_,18 @@ + return type == ObjectType.STRING || (this.compressed && type == ObjectType.NUMBER); + } else if (primitive.isBoolean()) { + return type.isNumber(); +- } else { +- // is number +- final Number number = primitive.getAsNumber(); +- if (number instanceof Byte) { +- return type == ObjectType.BYTE || (this.compressed && type == ObjectType.STRING); +- } else if (number instanceof Short) { +- return type == ObjectType.SHORT || (this.compressed && type == ObjectType.STRING); +- } else if (number instanceof Integer) { +- return type == ObjectType.INT || (this.compressed && type == ObjectType.STRING); +- } else if (number instanceof Long) { +- return type == ObjectType.LONG || (this.compressed && type == ObjectType.STRING); +- } else if (number instanceof Float) { +- return type == ObjectType.FLOAT || (this.compressed && type == ObjectType.STRING); +- } else { +- return type == ObjectType.DOUBLE || (this.compressed && type == ObjectType.STRING); +- } + } ++ ++ // Plazma start - Remove unnecessary boxing ++ return switch (primitive.getAsNumber()) { ++ case Byte ignored -> type == ObjectType.BYTE || (this.compressed && type == ObjectType.STRING); ++ case Short ignored -> type == ObjectType.SHORT || (this.compressed && type == ObjectType.STRING); ++ case Integer ignored -> type == ObjectType.INT || (this.compressed && type == ObjectType.STRING); ++ case Long ignored -> type == ObjectType.LONG || (this.compressed && type == ObjectType.STRING); ++ case Float ignored -> type == ObjectType.FLOAT || (this.compressed && type == ObjectType.STRING); ++ case null, default -> type == ObjectType.DOUBLE || (this.compressed && type == ObjectType.STRING); ++ }; ++ // Plazma end - Remove unnecessary boxing + } + + @Override +@@ -165,7 +_,7 @@ + } else if (primitive.isString()) { + return primitive.getAsString(); + } else if (primitive.isBoolean()) { +- return Boolean.valueOf(primitive.getAsBoolean()); ++ return primitive.getAsBoolean(); + } else { + throw new IllegalStateException("Unknown json object " + element); + } +@@ -188,7 +_,7 @@ + return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0); + } else if (this.compressed && primitive.isString()) { + try { +- return Integer.valueOf(Integer.parseInt(primitive.getAsString())); ++ return Integer.parseInt(primitive.getAsString()); + } catch (final NumberFormatException ex) { + return null; + } +@@ -220,7 +_,7 @@ + + @Override + public void setBoolean(final String key, final boolean val) { +- this.map.addProperty(key, Boolean.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -236,7 +_,7 @@ + + @Override + public void setByte(final String key, final byte val) { +- this.map.addProperty(key, Byte.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -252,7 +_,7 @@ + + @Override + public void setShort(final String key, final short val) { +- this.map.addProperty(key, Short.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -268,7 +_,7 @@ + + @Override + public void setInt(final String key, final int val) { +- this.map.addProperty(key, Integer.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -284,7 +_,7 @@ + + @Override + public void setLong(final String key, final long val) { +- this.map.addProperty(key, Long.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -300,7 +_,7 @@ + + @Override + public void setFloat(final String key, final float val) { +- this.map.addProperty(key, Float.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override +@@ -316,7 +_,7 @@ + + @Override + public void setDouble(final String key, final double val) { +- this.map.addProperty(key, Double.valueOf(val)); ++ this.map.addProperty(key, val); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java.patch new file mode 100644 index 0000000..8a16070 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java.patch @@ -0,0 +1,20 @@ +--- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java ++++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +@@ -319,7 +_,7 @@ + + private static final AtomicLong ID_GENERATOR = new AtomicLong(); + private final long id = ID_GENERATOR.incrementAndGet(); +- private final Long idBoxed = Long.valueOf(this.id); ++ private final Long idBoxed = this.id; + + private static final long MAX_RATE = 10_000L; + +@@ -516,7 +_,7 @@ + + private static int getClientViewDistance(final ServerPlayer player) { + final Integer vd = player.requestedViewDistance(); +- return vd == null ? -1 : Math.max(0, vd.intValue()); ++ return vd == null ? -1 : Math.max(0, vd); + } + + private static int getTickDistance(final int playerTickViewDistance, final int worldTickViewDistance, diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java.patch new file mode 100644 index 0000000..c5b90c0 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java.patch @@ -0,0 +1,13 @@ +--- a/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java ++++ b/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java +@@ -123,8 +_,8 @@ + final JsonObject coordinateJson = new JsonObject(); + coordinates.add(coordinateJson); + +- coordinateJson.addProperty("chunkX", Integer.valueOf(CoordinateUtils.getChunkX(coordinate))); +- coordinateJson.addProperty("chunkZ", Integer.valueOf(CoordinateUtils.getChunkZ(coordinate))); ++ coordinateJson.addProperty("chunkX", CoordinateUtils.getChunkX(coordinate)); ++ coordinateJson.addProperty("chunkZ", CoordinateUtils.getChunkZ(coordinate)); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java.patch new file mode 100644 index 0000000..d5309e4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java.patch @@ -0,0 +1,67 @@ +--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java ++++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java +@@ -1059,7 +_,7 @@ + public void processUnloads() { + TickThread.ensureTickThread("Cannot unload chunks off-main"); + +- if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) { ++ if (BLOCK_TICKET_UPDATES.get() == true) { + throw new IllegalStateException("Cannot unload chunks recursively"); + } + final int sectionShift = this.unloadQueue.coordinateShift; // sectionShift <= lock shift +@@ -1306,12 +_,12 @@ + } + + private final ThreadLocal BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> { +- return Boolean.FALSE; ++ return false; + }); + + public Boolean blockTicketUpdates() { + final Boolean ret = BLOCK_TICKET_UPDATES.get(); +- BLOCK_TICKET_UPDATES.set(Boolean.TRUE); ++ BLOCK_TICKET_UPDATES.set(true); + return ret; + } + +@@ -1330,7 +_,7 @@ + } + + private boolean processTicketUpdates(final boolean processFullUpdates, List scheduledTasks) { +- if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) { ++ if (BLOCK_TICKET_UPDATES.get() == true) { + throw new IllegalStateException("Cannot update ticket level while unloading chunks or updating entity manager"); + } + if (!PlatformHooks.get().allowAsyncTicketUpdates() && !TickThread.isTickThread()) { +@@ -1358,7 +_,7 @@ + scheduledTasks, changedFullStatus + ); + } finally { +- this.unblockTicketUpdates(Boolean.FALSE); ++ this.unblockTicketUpdates(false); + } + } + +@@ -1426,8 +_,8 @@ + final JsonObject coordinateJson = new JsonObject(); + allTicketsJson.add(coordinateJson); + +- coordinateJson.addProperty("chunkX", Long.valueOf(CoordinateUtils.getChunkX(coordinate))); +- coordinateJson.addProperty("chunkZ", Long.valueOf(CoordinateUtils.getChunkZ(coordinate))); ++ coordinateJson.addProperty("chunkX", (long) CoordinateUtils.getChunkX(coordinate)); ++ coordinateJson.addProperty("chunkZ", (long) CoordinateUtils.getChunkZ(coordinate)); + + final JsonArray ticketsSerialized = new JsonArray(); + coordinateJson.add("tickets", ticketsSerialized); +@@ -1445,9 +_,9 @@ + ticketsSerialized.add(ticketSerialized); + + ticketSerialized.addProperty("type", ticket.getType().toString()); +- ticketSerialized.addProperty("level", Integer.valueOf(ticket.getTicketLevel())); ++ ticketSerialized.addProperty("level", ticket.getTicketLevel()); + ticketSerialized.addProperty("identifier", Objects.toString(ticket.key)); +- ticketSerialized.addProperty("remove_tick", Long.valueOf(((ChunkSystemTicket)(Object)ticket).moonrise$getRemoveDelay())); ++ ticketSerialized.addProperty("remove_tick", ((ChunkSystemTicket) (Object) ticket).moonrise$getRemoveDelay()); + } + } + diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java.patch new file mode 100644 index 0000000..d8f3459 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java.patch @@ -0,0 +1,67 @@ +--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java ++++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java +@@ -77,35 +_,35 @@ + private static final AtomicLong CHUNK_LOAD_IDS = new AtomicLong(); + + public static Long getNextChunkLoadId() { +- return Long.valueOf(CHUNK_LOAD_IDS.getAndIncrement()); ++ return CHUNK_LOAD_IDS.getAndIncrement(); + } + + public static final TicketType NON_FULL_CHUNK_LOAD = TicketType.create("chunk_system:non_full_load", Long::compareTo); + private static final AtomicLong NON_FULL_CHUNK_LOAD_IDS = new AtomicLong(); + + public static Long getNextNonFullLoadId() { +- return Long.valueOf(NON_FULL_CHUNK_LOAD_IDS.getAndIncrement()); ++ return NON_FULL_CHUNK_LOAD_IDS.getAndIncrement(); + } + + public static final TicketType ENTITY_LOAD = TicketType.create("chunk_system:entity_load", Long::compareTo); + private static final AtomicLong ENTITY_LOAD_IDS = new AtomicLong(); + + public static Long getNextEntityLoadId() { +- return Long.valueOf(ENTITY_LOAD_IDS.getAndIncrement()); ++ return ENTITY_LOAD_IDS.getAndIncrement(); + } + + public static final TicketType POI_LOAD = TicketType.create("chunk_system:poi_load", Long::compareTo); + private static final AtomicLong POI_LOAD_IDS = new AtomicLong(); + + public static Long getNextPoiLoadId() { +- return Long.valueOf(POI_LOAD_IDS.getAndIncrement()); ++ return POI_LOAD_IDS.getAndIncrement(); + } + + public static final TicketType CHUNK_RELIGHT = TicketType.create("starlight:chunk_relight", Long::compareTo); + private static final AtomicLong CHUNK_RELIGHT_IDS = new AtomicLong(); + + public static Long getNextChunkRelightId() { +- return Long.valueOf(CHUNK_RELIGHT_IDS.getAndIncrement()); ++ return CHUNK_RELIGHT_IDS.getAndIncrement(); + } + + +@@ -913,8 +_,8 @@ + public JsonObject toJson() { + final JsonObject ret = new JsonObject(); + +- ret.addProperty("chunk-x", Integer.valueOf(this.chunkX)); +- ret.addProperty("chunk-z", Integer.valueOf(this.chunkZ)); ++ ret.addProperty("chunk-x", this.chunkX); ++ ret.addProperty("chunk-z", this.chunkZ); + ret.addProperty("world-name", WorldUtil.getWorldName(this.world)); + + return ret; +@@ -973,9 +_,9 @@ + public JsonObject getDebugJson() { + final JsonObject ret = new JsonObject(); + +- ret.addProperty("lock_shift", Integer.valueOf(this.getChunkSystemLockShift())); +- ret.addProperty("ticket_shift", Integer.valueOf(ThreadedTicketLevelPropagator.SECTION_SHIFT)); +- ret.addProperty("region_shift", Integer.valueOf(((ChunkSystemServerLevel)this.world).moonrise$getRegionChunkShift())); ++ ret.addProperty("lock_shift", this.getChunkSystemLockShift()); ++ ret.addProperty("ticket_shift", ThreadedTicketLevelPropagator.SECTION_SHIFT); ++ ret.addProperty("region_shift", ((ChunkSystemServerLevel) this.world).moonrise$getRegionChunkShift()); + + ret.addProperty("name", WorldUtil.getWorldName(this.world)); + ret.addProperty("view-distance", ((ChunkSystemServerLevel)this.world).moonrise$getPlayerChunkLoader().getAPIViewDistance()); diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java.patch new file mode 100644 index 0000000..89a3c4c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java.patch @@ -0,0 +1,89 @@ +--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java ++++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java +@@ -1893,10 +_,10 @@ + return ret; + } + +- ret.addProperty("valid", Boolean.TRUE); ++ ret.addProperty("valid", true); + + final boolean isCompleted = completable.isCompleted(); +- ret.addProperty("completed", Boolean.valueOf(isCompleted)); ++ ret.addProperty("completed", isCompleted); + + if (isCompleted) { + final Throwable throwable = completable.getThrowable(); +@@ -1924,8 +_,8 @@ + final ChunkEntitySlices slices = this.entityChunk; + final PoiChunk poiChunk = this.poiChunk; + +- ret.addProperty("chunkX", Integer.valueOf(this.chunkX)); +- ret.addProperty("chunkZ", Integer.valueOf(this.chunkZ)); ++ ret.addProperty("chunkX", this.chunkX); ++ ret.addProperty("chunkZ", this.chunkZ); + ret.addProperty("entity_chunk", slices == null ? "null" : "transient=" + slices.isTransient()); + ret.addProperty("poi_chunk", "null=" + (poiChunk == null)); + ret.addProperty("completed_chunk_class", lastCompletion == null ? "null" : lastCompletion.chunk().getClass().getName()); +@@ -1934,9 +_,9 @@ + ret.addProperty("neighbour_requested_priority", Objects.toString(this.neighbourRequestedPriority)); + ret.addProperty("generation_task", Objects.toString(this.generationTask)); + ret.addProperty("is_safe_unload", Objects.toString(this.isSafeToUnload())); +- ret.addProperty("old_ticket_level", Integer.valueOf(this.oldTicketLevel)); +- ret.addProperty("current_ticket_level", Integer.valueOf(this.currentTicketLevel)); +- ret.addProperty("neighbours_using_chunk", Integer.valueOf(this.totalNeighboursUsingThisChunk)); ++ ret.addProperty("old_ticket_level", this.oldTicketLevel); ++ ret.addProperty("current_ticket_level", this.currentTicketLevel); ++ ret.addProperty("neighbours_using_chunk", this.totalNeighboursUsingThisChunk); + + final JsonObject neighbourWaitState = new JsonObject(); + ret.add("neighbour_state", neighbourWaitState); +@@ -1947,8 +_,8 @@ + final JsonObject neighbour = new JsonObject(); + blockingGenNeighbours.add(neighbour); + +- neighbour.addProperty("chunkX", Integer.valueOf(blockingGenNeighbour.chunkX)); +- neighbour.addProperty("chunkZ", Integer.valueOf(blockingGenNeighbour.chunkZ)); ++ neighbour.addProperty("chunkX", blockingGenNeighbour.chunkX); ++ neighbour.addProperty("chunkZ", blockingGenNeighbour.chunkZ); + } + + final JsonArray neighboursWaitingForUs = new JsonArray(); +@@ -1961,8 +_,8 @@ + neighboursWaitingForUs.add(neighbour); + + +- neighbour.addProperty("chunkX", Integer.valueOf(holder.chunkX)); +- neighbour.addProperty("chunkZ", Integer.valueOf(holder.chunkZ)); ++ neighbour.addProperty("chunkX", holder.chunkX); ++ neighbour.addProperty("chunkZ", holder.chunkZ); + neighbour.addProperty("waiting_for", Objects.toString(status)); + } + +@@ -1970,8 +_,8 @@ + ret.addProperty("current_chunk_full_status", Objects.toString(this.currentFullChunkStatus)); + ret.addProperty("generation_task", Objects.toString(this.generationTask)); + ret.addProperty("requested_generation", Objects.toString(this.requestedGenStatus)); +- ret.addProperty("has_entity_load_task", Boolean.valueOf(this.entityDataLoadTask != null)); +- ret.addProperty("has_poi_load_task", Boolean.valueOf(this.poiDataLoadTask != null)); ++ ret.addProperty("has_entity_load_task", this.entityDataLoadTask != null); ++ ret.addProperty("has_poi_load_task", this.poiDataLoadTask != null); + + final UnloadTask entityDataUnload = this.entityDataUnload; + final UnloadTask poiDataUnload = this.poiDataUnload; +@@ -1984,13 +_,13 @@ + final PrioritisedExecutor.PrioritisedTask unloadTask = chunkDataUnload == null ? null : chunkDataUnload.task(); + if (unloadTask == null) { + ret.addProperty("unload_task_priority", "null"); +- ret.addProperty("unload_task_suborder", Long.valueOf(0L)); ++ ret.addProperty("unload_task_suborder", 0L); + } else { + ret.addProperty("unload_task_priority", Objects.toString(unloadTask.getPriority())); +- ret.addProperty("unload_task_suborder", Long.valueOf(unloadTask.getSubOrder())); ++ ret.addProperty("unload_task_suborder", unloadTask.getSubOrder()); + } + +- ret.addProperty("killed", Boolean.valueOf(this.unloaded)); ++ ret.addProperty("killed", this.unloaded); + + return ret; + } diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java.patch new file mode 100644 index 0000000..911dbe0 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java.patch @@ -0,0 +1,35 @@ +--- a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java ++++ b/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java +@@ -676,9 +_,9 @@ + + for (int i = 0; i < sections.length; ++i) { + if (sections[i] == null || sections[i].hasOnlyAir()) { +- ret[i] = Boolean.TRUE; ++ ret[i] = true; + } else { +- ret[i] = Boolean.FALSE; ++ ret[i] = false; + } + } + +@@ -754,9 +_,9 @@ + continue; + } + final LevelChunkSection section = this.getChunkSection(chunkX, sectionIndex + this.minSection, chunkZ); +- emptinessChanges[sectionIndex] = valueBoxed = section == null || section.hasOnlyAir() ? Boolean.TRUE : Boolean.FALSE; ++ emptinessChanges[sectionIndex] = valueBoxed = section == null || section.hasOnlyAir() ? true : false; + } +- chunkEmptinessMap[sectionIndex] = valueBoxed.booleanValue(); ++ chunkEmptinessMap[sectionIndex] = valueBoxed; + } + + // now init neighbour nibbles +@@ -767,7 +_,7 @@ + continue; + } + +- final boolean empty = valueBoxed.booleanValue(); ++ final boolean empty = valueBoxed; + + if (empty) { + continue; diff --git a/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java.patch b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java.patch new file mode 100644 index 0000000..339c6ee --- /dev/null +++ b/plazma-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java.patch @@ -0,0 +1,20 @@ +--- a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java ++++ b/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java +@@ -688,7 +_,7 @@ + public synchronized ClientChunkTasks queueSectionChange(final SectionPos pos, final boolean newEmptyValue) { + final ClientChunkTasks tasks = this.getOrCreate(CoordinateUtils.getChunkKey(pos)); + +- tasks.setChangedSection(pos.getY(), Boolean.valueOf(newEmptyValue)); ++ tasks.setChangedSection(pos.getY(), newEmptyValue); + + return tasks; + } +@@ -807,7 +_,7 @@ + ); + } + +- valueInMap.setChangedSection(pos.getY(), Boolean.valueOf(newEmptyValue)); ++ valueInMap.setChangedSection(pos.getY(), newEmptyValue); + + return valueInMap; + }); diff --git a/plazma-server/minecraft-patches/sources/io/papermc/paper/redstone/RedstoneWireTurbo.java.patch b/plazma-server/minecraft-patches/sources/io/papermc/paper/redstone/RedstoneWireTurbo.java.patch new file mode 100644 index 0000000..c2ac31e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/io/papermc/paper/redstone/RedstoneWireTurbo.java.patch @@ -0,0 +1,11 @@ +--- a/io/papermc/paper/redstone/RedstoneWireTurbo.java ++++ b/io/papermc/paper/redstone/RedstoneWireTurbo.java +@@ -904,7 +_,7 @@ + // need to be known by some nearby non-redstone-wire block. + BlockPos pos = new BlockPos(upd.self.getX(), upd.self.getY(), upd.self.getZ()); + if (wire.canSurvive(null, worldIn, pos)) { +- state = state.setValue(RedStoneWireBlock.POWER, Integer.valueOf(j)); ++ state = state.setValue(RedStoneWireBlock.POWER, j); + // [Space Walker] suppress shape updates and emit those manually to + // bypass the new neighbor update stack. + if (worldIn.setBlock(upd.self, state, Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_CLIENTS)) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/advancements/Advancement.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/Advancement.java.patch new file mode 100644 index 0000000..1eccd5d --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/Advancement.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/advancements/Advancement.java ++++ b/net/minecraft/advancements/Advancement.java +@@ -42,7 +_,7 @@ + AdvancementRewards.CODEC.optionalFieldOf("rewards", AdvancementRewards.EMPTY).forGetter(Advancement::rewards), + CRITERIA_CODEC.fieldOf("criteria").forGetter(Advancement::criteria), + AdvancementRequirements.CODEC.optionalFieldOf("requirements").forGetter(advancement -> Optional.of(advancement.requirements())), +- Codec.BOOL.optionalFieldOf("sends_telemetry_event", Boolean.valueOf(false)).forGetter(Advancement::sendsTelemetryEvent) ++ Codec.BOOL.optionalFieldOf("sends_telemetry_event", false).forGetter(Advancement::sendsTelemetryEvent) + ) + .apply(instance, (parent, displayInfo, rewards, criteria, requirements, sendsTelemetryEvent) -> { + AdvancementRequirements advancementRequirements = requirements.orElseGet(() -> AdvancementRequirements.allOf(criteria.keySet())); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/advancements/AdvancementRewards.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/AdvancementRewards.java.patch new file mode 100644 index 0000000..9ab9fd3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/AdvancementRewards.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/advancements/AdvancementRewards.java ++++ b/net/minecraft/advancements/AdvancementRewards.java +@@ -26,7 +_,7 @@ + public record AdvancementRewards(int experience, List> loot, List>> recipes, Optional function) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( +- Codec.INT.optionalFieldOf("experience", Integer.valueOf(0)).forGetter(AdvancementRewards::experience), ++ Codec.INT.optionalFieldOf("experience", 0).forGetter(AdvancementRewards::experience), + ResourceKey.codec(Registries.LOOT_TABLE).listOf().optionalFieldOf("loot", List.of()).forGetter(AdvancementRewards::loot), + ResourceKey.codec(Registries.RECIPE).listOf().optionalFieldOf("recipes", List.of()).forGetter(AdvancementRewards::recipes), + CacheableFunction.CODEC.optionalFieldOf("function").forGetter(AdvancementRewards::function) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/advancements/DisplayInfo.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/DisplayInfo.java.patch new file mode 100644 index 0000000..94e2a0f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/DisplayInfo.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/advancements/DisplayInfo.java ++++ b/net/minecraft/advancements/DisplayInfo.java +@@ -18,9 +_,9 @@ + ComponentSerialization.CODEC.fieldOf("description").forGetter(DisplayInfo::getDescription), + ResourceLocation.CODEC.optionalFieldOf("background").forGetter(DisplayInfo::getBackground), + AdvancementType.CODEC.optionalFieldOf("frame", AdvancementType.TASK).forGetter(DisplayInfo::getType), +- Codec.BOOL.optionalFieldOf("show_toast", Boolean.valueOf(true)).forGetter(DisplayInfo::shouldShowToast), +- Codec.BOOL.optionalFieldOf("announce_to_chat", Boolean.valueOf(true)).forGetter(DisplayInfo::shouldAnnounceChat), +- Codec.BOOL.optionalFieldOf("hidden", Boolean.valueOf(false)).forGetter(DisplayInfo::isHidden) ++ Codec.BOOL.optionalFieldOf("show_toast", true).forGetter(DisplayInfo::shouldShowToast), ++ Codec.BOOL.optionalFieldOf("announce_to_chat", true).forGetter(DisplayInfo::shouldAnnounceChat), ++ Codec.BOOL.optionalFieldOf("hidden", false).forGetter(DisplayInfo::isHidden) + ) + .apply(instance, DisplayInfo::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/advancements/critereon/RaiderPredicate.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/critereon/RaiderPredicate.java.patch new file mode 100644 index 0000000..35538ef --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/advancements/critereon/RaiderPredicate.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/advancements/critereon/RaiderPredicate.java ++++ b/net/minecraft/advancements/critereon/RaiderPredicate.java +@@ -12,8 +_,8 @@ + public record RaiderPredicate(boolean hasRaid, boolean isCaptain) implements EntitySubPredicate { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( +- Codec.BOOL.optionalFieldOf("has_raid", Boolean.valueOf(false)).forGetter(RaiderPredicate::hasRaid), +- Codec.BOOL.optionalFieldOf("is_captain", Boolean.valueOf(false)).forGetter(RaiderPredicate::isCaptain) ++ Codec.BOOL.optionalFieldOf("has_raid", false).forGetter(RaiderPredicate::hasRaid), ++ Codec.BOOL.optionalFieldOf("is_captain", false).forGetter(RaiderPredicate::isCaptain) + ) + .apply(instance, RaiderPredicate::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch new file mode 100644 index 0000000..b71a489 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/core/cauldron/CauldronInteraction.java ++++ b/net/minecraft/core/cauldron/CauldronInteraction.java +@@ -298,7 +_,7 @@ + player, + hand, + filledStack, +- Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, Integer.valueOf(3)), ++ Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3), + SoundEvents.BUCKET_EMPTY, hitDirection // Paper - add hitDirection + ); + } +@@ -322,7 +_,7 @@ + player, + hand, + filledStack, +- Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, Integer.valueOf(3)), ++ Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3), + SoundEvents.BUCKET_EMPTY_POWDER_SNOW, hitDirection // Paper - add hitDirection + )); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch new file mode 100644 index 0000000..992f29c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java ++++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java +@@ -455,7 +_,7 @@ + } + // CraftBukkit end + } else if (CampfireBlock.canLight(blockState) || CandleBlock.canLight(blockState) || CandleCakeBlock.canLight(blockState)) { +- serverLevel.setBlockAndUpdate(blockPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true))); ++ serverLevel.setBlockAndUpdate(blockPos, blockState.setValue(BlockStateProperties.LIT, true)); + serverLevel.gameEvent(null, GameEvent.BLOCK_CHANGE, blockPos); + } else if (blockState.getBlock() instanceof TntBlock && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(serverLevel, blockPos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.DISPENSER, null, blockSource.pos())) { // CraftBukkit - TNTPrimeEvent + TntBlock.explode(serverLevel, blockPos); +@@ -614,7 +_,7 @@ + blockPos, + Blocks.WITHER_SKELETON_SKULL + .defaultBlockState() +- .setValue(SkullBlock.ROTATION, Integer.valueOf(RotationSegment.convertToSegment(direction))), ++ .setValue(SkullBlock.ROTATION, RotationSegment.convertToSegment(direction)), + 3 + ); + level.gameEvent(null, GameEvent.BLOCK_PLACE, blockPos); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/BlockLootSubProvider.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/BlockLootSubProvider.java.patch new file mode 100644 index 0000000..f661273 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/BlockLootSubProvider.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/data/loot/BlockLootSubProvider.java ++++ b/net/minecraft/data/loot/BlockLootSubProvider.java +@@ -423,7 +_,7 @@ + age -> SetItemCountFunction.setCount(BinomialDistributionGenerator.binomial(3, (age + 1) / 15.0F)) + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) +- .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(StemBlock.AGE, age.intValue())) ++ .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(StemBlock.AGE, age)) + ) + ) + ) +@@ -657,11 +_,11 @@ + LootItem.lootTableItem(candleBlock) + .apply( + List.of(2, 3, 4), +- candles -> SetItemCountFunction.setCount(ConstantValue.exactly(candles.intValue())) ++ candles -> SetItemCountFunction.setCount(ConstantValue.exactly(candles)) + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(candleBlock) + .setProperties( +- StatePropertiesPredicate.Builder.properties().hasProperty(CandleBlock.CANDLES, candles.intValue()) ++ StatePropertiesPredicate.Builder.properties().hasProperty(CandleBlock.CANDLES, candles) + ) + ) + ) +@@ -681,11 +_,11 @@ + LootItem.lootTableItem(petalBlock) + .apply( + IntStream.rangeClosed(1, 4).boxed().toList(), +- amount -> SetItemCountFunction.setCount(ConstantValue.exactly(amount.intValue())) ++ amount -> SetItemCountFunction.setCount(ConstantValue.exactly(amount)) + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(petalBlock) + .setProperties( +- StatePropertiesPredicate.Builder.properties().hasProperty(PinkPetalsBlock.AMOUNT, amount.intValue()) ++ StatePropertiesPredicate.Builder.properties().hasProperty(PinkPetalsBlock.AMOUNT, amount) + ) + ) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/packs/VanillaBlockLoot.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/packs/VanillaBlockLoot.java.patch new file mode 100644 index 0000000..2d4f07e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/loot/packs/VanillaBlockLoot.java.patch @@ -0,0 +1,52 @@ +--- a/net/minecraft/data/loot/packs/VanillaBlockLoot.java ++++ b/net/minecraft/data/loot/packs/VanillaBlockLoot.java +@@ -914,11 +_,11 @@ + LootItem.lootTableItem(block) + .apply( + List.of(2, 3, 4), +- integer -> SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue())) ++ integer -> SetItemCountFunction.setCount(ConstantValue.exactly(integer)) + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) + .setProperties( +- StatePropertiesPredicate.Builder.properties().hasProperty(SeaPickleBlock.PICKLES, integer.intValue()) ++ StatePropertiesPredicate.Builder.properties().hasProperty(SeaPickleBlock.PICKLES, integer) + ) + ) + ) +@@ -1324,10 +_,10 @@ + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) + .setProperties( +- StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer.intValue()) ++ StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer) + ) + ) +- .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue()))) ++ .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer))) + ) + .when(this.doesNotHaveSilkTouch()), + AlternativesEntry.alternatives( +@@ -1335,11 +_,11 @@ + integer -> integer == 8 + ? LootItem.lootTableItem(Blocks.SNOW_BLOCK) + : LootItem.lootTableItem(Blocks.SNOW) +- .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue()))) ++ .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer))) + .when( + LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) + .setProperties( +- StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer.intValue()) ++ StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer) + ) + ) + ) +@@ -1548,7 +_,7 @@ + LootItemBlockStatePropertyCondition.Builder builder1 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.PITCHER_CROP + ) +- .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(PitcherCropBlock.AGE, integer.intValue())); ++ .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(PitcherCropBlock.AGE, integer)); + return integer == 4 + ? LootItem.lootTableItem(Items.PITCHER_PLANT) + .when(builder1) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/ProcessorLists.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/ProcessorLists.java.patch new file mode 100644 index 0000000..f03ebd5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/ProcessorLists.java.patch @@ -0,0 +1,176 @@ +--- a/net/minecraft/data/worldgen/ProcessorLists.java ++++ b/net/minecraft/data/worldgen/ProcessorLists.java +@@ -115,27 +_,27 @@ + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + new ProcessorRule( + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.3F), AlwaysTrueTest.INSTANCE, Blocks.CARROTS.defaultBlockState()), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.2F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState()), +@@ -165,27 +_,27 @@ + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + new ProcessorRule( + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.1F), AlwaysTrueTest.INSTANCE, Blocks.MELON_STEM.defaultBlockState()) + ) +@@ -215,27 +_,27 @@ + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + new ProcessorRule( + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.1F), AlwaysTrueTest.INSTANCE, Blocks.CARROTS.defaultBlockState()), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.8F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState()) +@@ -258,7 +_,7 @@ + new ProcessorRule( + new BlockMatchTest(Blocks.CAMPFIRE), + AlwaysTrueTest.INSTANCE, +- Blocks.CAMPFIRE.defaultBlockState().setValue(CampfireBlock.LIT, Boolean.valueOf(false)) ++ Blocks.CAMPFIRE.defaultBlockState().setValue(CampfireBlock.LIT, false) + ), + new ProcessorRule(new RandomBlockMatchTest(Blocks.COBBLESTONE, 0.08F), AlwaysTrueTest.INSTANCE, Blocks.COBWEB.defaultBlockState()), + new ProcessorRule(new RandomBlockMatchTest(Blocks.SPRUCE_LOG, 0.08F), AlwaysTrueTest.INSTANCE, Blocks.COBWEB.defaultBlockState()), +@@ -267,27 +_,27 @@ + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) + ), + new ProcessorRule( + new BlockStateMatchTest( + Blocks.GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + AlwaysTrueTest.INSTANCE, + Blocks.BROWN_STAINED_GLASS_PANE + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true) + ), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.3F), AlwaysTrueTest.INSTANCE, Blocks.PUMPKIN_STEM.defaultBlockState()), + new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.2F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState()) +@@ -834,17 +_,17 @@ + new ProcessorRule( + new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.1F), + AlwaysTrueTest.INSTANCE, +- Blocks.WAXED_OXIDIZED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true)) ++ Blocks.WAXED_OXIDIZED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true) + ), + new ProcessorRule( + new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.33333334F), + AlwaysTrueTest.INSTANCE, +- Blocks.WAXED_WEATHERED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true)) ++ Blocks.WAXED_WEATHERED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true) + ), + new ProcessorRule( + new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.5F), + AlwaysTrueTest.INSTANCE, +- Blocks.WAXED_EXPOSED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true)) ++ Blocks.WAXED_EXPOSED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true) + ) + ) + ), diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/CaveFeatures.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/CaveFeatures.java.patch new file mode 100644 index 0000000..e075ef5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/CaveFeatures.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/data/worldgen/features/CaveFeatures.java ++++ b/net/minecraft/data/worldgen/features/CaveFeatures.java +@@ -264,13 +_,13 @@ + WeightedStateProvider weightedStateProvider = new WeightedStateProvider( + SimpleWeightedRandomList.builder() + .add(Blocks.CAVE_VINES_PLANT.defaultBlockState(), 4) +- .add(Blocks.CAVE_VINES_PLANT.defaultBlockState().setValue(CaveVines.BERRIES, Boolean.valueOf(true)), 1) ++ .add(Blocks.CAVE_VINES_PLANT.defaultBlockState().setValue(CaveVines.BERRIES, true), 1) + ); + RandomizedIntStateProvider randomizedIntStateProvider = new RandomizedIntStateProvider( + new WeightedStateProvider( + SimpleWeightedRandomList.builder() + .add(Blocks.CAVE_VINES.defaultBlockState(), 4) +- .add(Blocks.CAVE_VINES.defaultBlockState().setValue(CaveVines.BERRIES, Boolean.valueOf(true)), 1) ++ .add(Blocks.CAVE_VINES.defaultBlockState().setValue(CaveVines.BERRIES, true), 1) + ), + CaveVinesBlock.AGE, + UniformInt.of(23, 25) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/TreeFeatures.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/TreeFeatures.java.patch new file mode 100644 index 0000000..bc85b3a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/TreeFeatures.java.patch @@ -0,0 +1,55 @@ +--- a/net/minecraft/data/worldgen/features/TreeFeatures.java ++++ b/net/minecraft/data/worldgen/features/TreeFeatures.java +@@ -288,14 +_,14 @@ + BlockStateProvider.simple( + Blocks.BROWN_MUSHROOM_BLOCK + .defaultBlockState() +- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(true)) +- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false)) ++ .setValue(HugeMushroomBlock.UP, true) ++ .setValue(HugeMushroomBlock.DOWN, false) + ), + BlockStateProvider.simple( + Blocks.MUSHROOM_STEM + .defaultBlockState() +- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(false)) +- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false)) ++ .setValue(HugeMushroomBlock.UP, false) ++ .setValue(HugeMushroomBlock.DOWN, false) + ), + 3 + ) +@@ -305,12 +_,12 @@ + HUGE_RED_MUSHROOM, + Feature.HUGE_RED_MUSHROOM, + new HugeMushroomFeatureConfiguration( +- BlockStateProvider.simple(Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false))), ++ BlockStateProvider.simple(Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false)), + BlockStateProvider.simple( + Blocks.MUSHROOM_STEM + .defaultBlockState() +- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(false)) +- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false)) ++ .setValue(HugeMushroomBlock.UP, false) ++ .setValue(HugeMushroomBlock.DOWN, false) + ), + 2 + ) +@@ -554,7 +_,7 @@ + 0, + new RandomizedIntStateProvider( + BlockStateProvider.simple( +- Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, Boolean.valueOf(true)) ++ Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, true) + ), + MangrovePropaguleBlock.AGE, + UniformInt.of(0, 4) +@@ -605,7 +_,7 @@ + 0, + new RandomizedIntStateProvider( + BlockStateProvider.simple( +- Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, Boolean.valueOf(true)) ++ Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, true) + ), + MangrovePropaguleBlock.AGE, + UniformInt.of(0, 4) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/VegetationFeatures.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/VegetationFeatures.java.patch new file mode 100644 index 0000000..05ec165 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/data/worldgen/features/VegetationFeatures.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/data/worldgen/features/VegetationFeatures.java ++++ b/net/minecraft/data/worldgen/features/VegetationFeatures.java +@@ -173,7 +_,7 @@ + FeatureUtils.simplePatchConfiguration( + Feature.SIMPLE_BLOCK, + new SimpleBlockConfiguration( +- BlockStateProvider.simple(Blocks.SWEET_BERRY_BUSH.defaultBlockState().setValue(SweetBerryBushBlock.AGE, Integer.valueOf(3))) ++ BlockStateProvider.simple(Blocks.SWEET_BERRY_BUSH.defaultBlockState().setValue(SweetBerryBushBlock.AGE, 3)) + ), + List.of(Blocks.GRASS_BLOCK) + ) +@@ -425,7 +_,7 @@ + for (int i = 1; i <= 4; i++) { + for (Direction direction : Direction.Plane.HORIZONTAL) { + builder.add( +- Blocks.PINK_PETALS.defaultBlockState().setValue(PinkPetalsBlock.AMOUNT, Integer.valueOf(i)).setValue(PinkPetalsBlock.FACING, direction), 1 ++ Blocks.PINK_PETALS.defaultBlockState().setValue(PinkPetalsBlock.AMOUNT, i).setValue(PinkPetalsBlock.FACING, direction), 1 + ); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/Style.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/Style.java.patch new file mode 100644 index 0000000..e54e650 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/Style.java.patch @@ -0,0 +1,31 @@ +--- a/net/minecraft/network/chat/Style.java ++++ b/net/minecraft/network/chat/Style.java +@@ -105,23 +_,23 @@ + } + + public boolean isBold() { +- return this.bold == Boolean.TRUE; ++ return this.bold == true; + } + + public boolean isItalic() { +- return this.italic == Boolean.TRUE; ++ return this.italic == true; + } + + public boolean isStrikethrough() { +- return this.strikethrough == Boolean.TRUE; ++ return this.strikethrough == true; + } + + public boolean isUnderlined() { +- return this.underlined == Boolean.TRUE; ++ return this.underlined == true; + } + + public boolean isObfuscated() { +- return this.obfuscated == Boolean.TRUE; ++ return this.obfuscated == true; + } + + public boolean isEmpty() { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/contents/NbtContents.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/contents/NbtContents.java.patch new file mode 100644 index 0000000..c392bda --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/network/chat/contents/NbtContents.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/chat/contents/NbtContents.java ++++ b/net/minecraft/network/chat/contents/NbtContents.java +@@ -27,7 +_,7 @@ + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + Codec.STRING.fieldOf("nbt").forGetter(NbtContents::getNbtPath), +- Codec.BOOL.lenientOptionalFieldOf("interpret", Boolean.valueOf(false)).forGetter(NbtContents::isInterpreting), ++ Codec.BOOL.lenientOptionalFieldOf("interpret", false).forGetter(NbtContents::isInterpreting), + ComponentSerialization.CODEC.lenientOptionalFieldOf("separator").forGetter(NbtContents::getSeparator), + DataSource.CODEC.forGetter(NbtContents::getDataSource) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/network/protocol/status/ServerStatus.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/network/protocol/status/ServerStatus.java.patch new file mode 100644 index 0000000..c57cb4b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/network/protocol/status/ServerStatus.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/status/ServerStatus.java ++++ b/net/minecraft/network/protocol/status/ServerStatus.java +@@ -28,7 +_,7 @@ + ServerStatus.Players.CODEC.lenientOptionalFieldOf("players").forGetter(ServerStatus::players), + ServerStatus.Version.CODEC.lenientOptionalFieldOf("version").forGetter(ServerStatus::version), + ServerStatus.Favicon.CODEC.lenientOptionalFieldOf("favicon").forGetter(ServerStatus::favicon), +- Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", Boolean.valueOf(false)).forGetter(ServerStatus::enforcesSecureChat) ++ Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", false).forGetter(ServerStatus::enforcesSecureChat) + ) + .apply(instance, ServerStatus::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch index 91d0f5b..d3c0c25 100644 --- a/plazma-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/Main.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -63,40 +_,24 @@ +@@ -63,40 +_,37 @@ public class Main { private static final Logger LOGGER = LogUtils.getLogger(); @@ -37,19 +37,31 @@ - if (optionSet.has(optionSpec8)) { - optionParser.printHelpOn(System.err); - return; -- } -- */ // CraftBukkit end -- try { + // Plazma start - Branding + System.out.println(""" -+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m█\\033[38;2;205;27;135m█\\033[38;2;202;28;136m█\\033[38;2;199;30;136m█\\033[38;2;196;31;137m╗\\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m╗\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m \\033[38;2;161;46;144m█\\033[38;2;158;47;145m█\\033[38;2;155;49;146m█\\033[38;2;151;50;146m█\\033[38;2;148;52;147m█\\033[38;2;145;53;148m╗\\033[38;2;142;54;148m \\033[38;2;139;56;149m█\\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m█\\033[38;2;116;65;153m╗ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m█\\033[38;2;104;71;156m╗\\033[38;2;101;72;157m \\033[38;2;97;73;157m \\033[38;2;94;75;158m \\033[38;2;91;76;159m█\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m╗ \\033[38;2;78;81;161m \\033[38;2;75;83;162m█\\033[38;2;72;84;163m█\\033[38;2;69;86;163m█\\033[38;2;66;87;164m█\\033[38;2;62;88;165m█\\033[38;2;59;90;165m╗\\033[38;2;56;91;166m\\s -+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m╔\\033[38;2;205;27;135m═\\033[38;2;202;28;136m═\\033[38;2;199;30;136m█\\033[38;2;196;31;137m█\\033[38;2;193;33;138m╗ \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m╔\\033[38;2;155;49;146m═\\033[38;2;151;50;146m═\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m╗ \\033[38;2;139;56;149m╚\\033[38;2;135;57;149m═\\033[38;2;132;58;150m═\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m╔\\033[38;2;116;65;153m╝ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m█\\033[38;2;104;71;156m█\\033[38;2;101;72;157m╗\\033[38;2;97;73;157m \\033[38;2;94;75;158m█\\033[38;2;91;76;159m█\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m╔\\033[38;2;69;86;163m═\\033[38;2;66;87;164m═\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m╗ -+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m█\\033[38;2;205;27;135m█\\033[38;2;202;28;136m█\\033[38;2;199;30;136m█\\033[38;2;196;31;137m╔\\033[38;2;193;33;138m╝ \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m█\\033[38;2;155;49;146m█\\033[38;2;151;50;146m█\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m \\033[38;2;135;57;149m \\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m╔\\033[38;2;120;64;153m╝\\033[38;2;116;65;153m \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m╔\\033[38;2;104;71;156m█\\033[38;2;101;72;157m█\\033[38;2;97;73;157m█\\033[38;2;94;75;158m█\\033[38;2;91;76;159m╔\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m█\\033[38;2;69;86;163m█\\033[38;2;66;87;164m█\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║ -+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m╔\\033[38;2;205;27;135m═\\033[38;2;202;28;136m═\\033[38;2;199;30;136m═\\033[38;2;196;31;137m╝\\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m╔\\033[38;2;155;49;146m═\\033[38;2;151;50;146m═\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m \\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m╔\\033[38;2;123;62;152m╝\\033[38;2;120;64;153m \\033[38;2;116;65;153m \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m║\\033[38;2;104;71;156m╚\\033[38;2;101;72;157m█\\033[38;2;97;73;157m█\\033[38;2;94;75;158m╔\\033[38;2;91;76;159m╝\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m╔\\033[38;2;69;86;163m═\\033[38;2;66;87;164m═\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║ -+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m║\\033[38;2;205;27;135m \\033[38;2;202;28;136m \\033[38;2;199;30;136m \\033[38;2;196;31;137m \\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m█\\033[38;2;180;38;140m█\\033[38;2;177;39;141m█\\033[38;2;174;41;142m█\\033[38;2;170;42;142m█\\033[38;2;167;43;143m╗ \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m║\\033[38;2;155;49;146m \\033[38;2;151;50;146m \\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m█\\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m█\\033[38;2;116;65;153m╗ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m║\\033[38;2;104;71;156m \\033[38;2;101;72;157m╚\\033[38;2;97;73;157m═\\033[38;2;94;75;158m╝\\033[38;2;91;76;159m \\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m║\\033[38;2;69;86;163m \\033[38;2;66;87;164m \\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║ -+ \\033[38;2;215;23;133m╚\\033[38;2;212;24;134m═\\033[38;2;209;26;134m╝\\033[38;2;205;27;135m \\033[38;2;202;28;136m \\033[38;2;199;30;136m \\033[38;2;196;31;137m \\033[38;2;193;33;138m \\033[38;2;190;34;138m╚\\033[38;2;186;35;139m═\\033[38;2;183;37;140m═\\033[38;2;180;38;140m═\\033[38;2;177;39;141m═\\033[38;2;174;41;142m═\\033[38;2;170;42;142m═\\033[38;2;167;43;143m╝ \\033[38;2;164;45;144m╚\\033[38;2;161;46;144m═\\033[38;2;158;47;145m╝\\033[38;2;155;49;146m \\033[38;2;151;50;146m \\033[38;2;148;52;147m╚\\033[38;2;145;53;148m═\\033[38;2;142;54;148m╝ \\033[38;2;139;56;149m╚\\033[38;2;135;57;149m═\\033[38;2;132;58;150m═\\033[38;2;129;60;151m═\\033[38;2;126;61;151m═\\033[38;2;123;62;152m═\\033[38;2;120;64;153m═\\033[38;2;116;65;153m╝ \\033[38;2;113;67;154m╚\\033[38;2;110;68;155m═\\033[38;2;107;69;155m╝\\033[38;2;104;71;156m \\033[38;2;101;72;157m \\033[38;2;97;73;157m \\033[38;2;94;75;158m \\033[38;2;91;76;159m \\033[38;2;88;77;159m╚\\033[38;2;85;79;160m═\\033[38;2;81;80;161m╝ \\033[38;2;78;81;161m╚\\033[38;2;75;83;162m═\\033[38;2;72;84;163m╝\\033[38;2;69;86;163m \\033[38;2;66;87;164m \\033[38;2;62;88;165m╚\\033[38;2;59;90;165m═\\033[38;2;56;91;166m╝\\033[0m ++ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╗\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m╗\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m \033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m╗\033[38;2;142;54;148m \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m╗\033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m╗ \033[38;2;78;81;161m \033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m╗\033[38;2;56;91;166m\\s ++ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m█\033[38;2;196;31;137m█\033[38;2;193;33;138m╗ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m╗ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m╔\033[38;2;116;65;153m╝ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m█\033[38;2;101;72;157m╗\033[38;2;97;73;157m \033[38;2;94;75;158m█\033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m╗ ++ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╔\033[38;2;193;33;138m╝ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m \033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m╔\033[38;2;120;64;153m╝\033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m╔\033[38;2;104;71;156m█\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m█\033[38;2;91;76;159m╔\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║ ++ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m═\033[38;2;196;31;137m╝\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m╔\033[38;2;123;62;152m╝\033[38;2;120;64;153m \033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m╚\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m╔\033[38;2;91;76;159m╝\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║ ++ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m║\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m█\033[38;2;180;38;140m█\033[38;2;177;39;141m█\033[38;2;174;41;142m█\033[38;2;170;42;142m█\033[38;2;167;43;143m╗ \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m║\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m \033[38;2;101;72;157m╚\033[38;2;97;73;157m═\033[38;2;94;75;158m╝\033[38;2;91;76;159m \033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m║\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║ ++ \033[38;2;215;23;133m╚\033[38;2;212;24;134m═\033[38;2;209;26;134m╝\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m╚\033[38;2;186;35;139m═\033[38;2;183;37;140m═\033[38;2;180;38;140m═\033[38;2;177;39;141m═\033[38;2;174;41;142m═\033[38;2;170;42;142m═\033[38;2;167;43;143m╝ \033[38;2;164;45;144m╚\033[38;2;161;46;144m═\033[38;2;158;47;145m╝\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m╚\033[38;2;145;53;148m═\033[38;2;142;54;148m╝ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m═\033[38;2;126;61;151m═\033[38;2;123;62;152m═\033[38;2;120;64;153m═\033[38;2;116;65;153m╝ \033[38;2;113;67;154m╚\033[38;2;110;68;155m═\033[38;2;107;69;155m╝\033[38;2;104;71;156m \033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m \033[38;2;88;77;159m╚\033[38;2;85;79;160m═\033[38;2;81;80;161m╝ \033[38;2;78;81;161m╚\033[38;2;75;83;162m═\033[38;2;72;84;163m╝\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m╚\033[38;2;59;90;165m═\033[38;2;56;91;166m╝\033[0m + """); + // Plazma end - Branding ++ ++ // Plazma start - Warn on startup ++ if (!org.plazmamc.plazma.Options.NO_WARN) { ++ LOGGER.warn("WARNING! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server."); ++ if (!org.plazmamc.plazma.Options.NO_WARN_DEV) { ++ LOGGER.error("*********************** CAUTION ***********************"); ++ LOGGER.error("This version is a development version of Plazma."); ++ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems."); ++ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!"); ++ LOGGER.error("*******************************************************"); ++ } + } +- */ // CraftBukkit end +- try { ++ // Plazma end - Warn on startup Path path = (Path) optionSet.valueOf("pidFile"); // CraftBukkit if (path != null) { @@ -72,15 +84,108 @@ } catch (java.io.IOException ex) { throw new RuntimeException("Could not initialize Bukkit datapack", ex); } -@@ -309,24 +_,11 @@ - ) - ) - .get(); +@@ -258,75 +_,53 @@ + WorldStem worldStem; + try { + WorldLoader.InitConfig initConfig = loadOrCreateConfig(dedicatedServerSettings.getProperties(), dynamic, hasOptionSpec, packRepository); +- worldStem = Util.blockUntilDone( +- executor -> WorldLoader.load( +- initConfig, +- context -> { +- worldLoader.set(context); // CraftBukkit +- Registry registry = context.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM); +- if (dynamic != null) { +- LevelDataAndDimensions levelDataAndDimensions = LevelStorageSource.getLevelDataAndDimensions( +- dynamic, context.dataConfiguration(), registry, context.datapackWorldgen() +- ); +- return new WorldLoader.DataLoadOutput<>( +- levelDataAndDimensions.worldData(), levelDataAndDimensions.dimensions().dimensionsRegistryAccess() +- ); +- } else { +- LOGGER.info("No existing world data, creating new world"); +- LevelSettings levelSettings; +- WorldOptions worldOptions; +- WorldDimensions worldDimensions; +- if (optionSet.has("demo")) { // CraftBukkit +- levelSettings = MinecraftServer.DEMO_SETTINGS; +- worldOptions = WorldOptions.DEMO_OPTIONS; +- worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen()); +- } else { +- DedicatedServerProperties properties = dedicatedServerSettings.getProperties(); +- levelSettings = new LevelSettings( +- properties.levelName, +- properties.gamemode, +- properties.hardcore, +- properties.difficulty, +- false, +- new GameRules(context.dataConfiguration().enabledFeatures()), +- context.dataConfiguration() +- ); +- worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit +- worldDimensions = properties.createDimensions(context.datapackWorldgen()); +- } +- +- WorldDimensions.Complete complete = worldDimensions.bake(registry); +- Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle()); +- return new WorldLoader.DataLoadOutput<>( +- new PrimaryLevelData(levelSettings, worldOptions, complete.specialWorldProperty(), lifecycle), +- complete.dimensionsRegistryAccess() +- ); +- } +- }, +- WorldStem::new, +- Util.backgroundExecutor(), +- executor +- ) +- ) +- .get(); - } catch (Exception var39) { - LOGGER.warn( - "Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode", - (Throwable)var39 - ); ++ worldStem = Util.blockUntilDone((executor) -> WorldLoader.load(initConfig, (context) -> { ++ worldLoader.set(context); // CraftBukkit ++ Registry registry = context.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM); ++ if (dynamic != null) { ++ LevelDataAndDimensions levelDataAndDimensions = LevelStorageSource.getLevelDataAndDimensions( ++ dynamic, context.dataConfiguration(), registry, context.datapackWorldgen() ++ ); ++ return new WorldLoader.DataLoadOutput<>( ++ levelDataAndDimensions.worldData(), levelDataAndDimensions.dimensions().dimensionsRegistryAccess() ++ ); ++ } ++ ++ LOGGER.info("No existing world data, creating new world"); ++ LevelSettings levelSettings; ++ WorldOptions worldOptions; ++ WorldDimensions worldDimensions; ++ if (optionSet.has("demo")) { // CraftBukkit ++ levelSettings = MinecraftServer.DEMO_SETTINGS; ++ worldOptions = WorldOptions.DEMO_OPTIONS; ++ worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen()); ++ } else { ++ DedicatedServerProperties properties = dedicatedServerSettings.getProperties(); ++ levelSettings = new LevelSettings( ++ properties.levelName, ++ properties.gamemode, ++ properties.hardcore, ++ properties.difficulty, ++ false, ++ new GameRules(context.dataConfiguration().enabledFeatures()), ++ context.dataConfiguration() ++ ); ++ worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit ++ worldDimensions = properties.createDimensions(context.datapackWorldgen()); ++ } ++ ++ WorldDimensions.Complete complete = worldDimensions.bake(registry); ++ Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle()); ++ return new WorldLoader.DataLoadOutput<>( ++ new PrimaryLevelData(levelSettings, worldOptions, complete.specialWorldProperty(), lifecycle), ++ complete.dimensionsRegistryAccess() ++ ); ++ }, WorldStem::new, Util.backgroundExecutor(), executor)).get(); + } catch (final Exception e) { // Plazma + LOGGER.warn("Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode", e); // Plazma return; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch index ddba5fc..c130060 100644 --- a/plazma-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch @@ -676,6 +676,15 @@ } public CustomBossEvents getCustomBossEvents() { +@@ -2549,7 +_,7 @@ + this.dumpServerProperties(path.resolve("server.properties.txt")); + this.dumpNativeModules(path.resolve("modules.txt")); + } catch (IOException var7) { +- LOGGER.warn("Failed to save debug report", (Throwable)var7); ++ LOGGER.warn("Failed to save debug report", var7); // Plazma - Remove unnecessary type casting + } + } + @@ -2582,9 +_,8 @@ private void dumpClasspath(Path path) throws IOException { try (Writer bufferedWriter = Files.newBufferedWriter(path)) { @@ -687,12 +696,3 @@ bufferedWriter.write(string); bufferedWriter.write("\n"); } -@@ -2636,7 +_,7 @@ - } - - public static MinecraftServer getServer() { -- return SERVER; // Paper -+ return Objects.requireNonNull(SERVER); // Paper - } - - @Deprecated diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/dedicated/Settings.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/dedicated/Settings.java.patch new file mode 100644 index 0000000..82ba58c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/dedicated/Settings.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/dedicated/Settings.java ++++ b/net/minecraft/server/dedicated/Settings.java +@@ -216,7 +_,7 @@ + } + + protected int get(String key, int defaultValue) { +- return this.get(key, wrapNumberDeserializer(Integer::parseInt), Integer.valueOf(defaultValue)); ++ return this.get(key, wrapNumberDeserializer(Integer::parseInt), defaultValue); + } + + protected Settings.MutableValue getMutable(String key, int defaultValue) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch new file mode 100644 index 0000000..b804878 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/ServerPlayer.java ++++ b/net/minecraft/server/level/ServerPlayer.java +@@ -1361,7 +_,7 @@ + if (block instanceof RespawnAnchorBlock && (forced || blockState.getValue(RespawnAnchorBlock.CHARGE) > 0) && RespawnAnchorBlock.canSetSpawn(level)) { + Optional optional = RespawnAnchorBlock.findStandUpPosition(EntityType.PLAYER, level, pos); + if (!forced && useCharge && optional.isPresent()) { +- level.setBlock(pos, blockState.setValue(RespawnAnchorBlock.CHARGE, Integer.valueOf(blockState.getValue(RespawnAnchorBlock.CHARGE) - 1)), 3); ++ level.setBlock(pos, blockState.setValue(RespawnAnchorBlock.CHARGE, blockState.getValue(RespawnAnchorBlock.CHARGE) - 1), 3); + } + + return optional.map(vec3 -> ServerPlayer.RespawnPosAngle.of(vec3, pos, false, true)); // CraftBukkit diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ThreadedLevelLightEngine.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ThreadedLevelLightEngine.java.patch new file mode 100644 index 0000000..2a985e2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/level/ThreadedLevelLightEngine.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/ThreadedLevelLightEngine.java ++++ b/net/minecraft/server/level/ThreadedLevelLightEngine.java +@@ -55,7 +_,7 @@ + return; + } + +- final Long ticketId = Long.valueOf(this.chunkWorkCounter.getAndIncrement()); ++ final Long ticketId = this.chunkWorkCounter.getAndIncrement(); + final ChunkPos pos = new ChunkPos(chunkX, chunkZ); + world.getChunkSource().addRegionTicket(ca.spottedleaf.moonrise.patches.starlight.light.StarLightInterface.CHUNK_WORK_TICKET, pos, ca.spottedleaf.moonrise.patches.starlight.light.StarLightInterface.REGION_LIGHT_TICKET_LEVEL, ticketId); + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch new file mode 100644 index 0000000..036a88d --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -937,7 +_,7 @@ + default -> Blocks.COMMAND_BLOCK.defaultBlockState(); + }; + BlockState blockState2 = blockState1.setValue(CommandBlock.FACING, direction) +- .setValue(CommandBlock.CONDITIONAL, Boolean.valueOf(packet.isConditional())); ++ .setValue(CommandBlock.CONDITIONAL, packet.isConditional()); + if (blockState2 != blockState) { + this.player.level().setBlock(pos, blockState2, 2); + blockEntity.setBlockState(blockState2); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/util/FormattedCharSequence.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/util/FormattedCharSequence.java.patch new file mode 100644 index 0000000..bfb8c72 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/util/FormattedCharSequence.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/FormattedCharSequence.java ++++ b/net/minecraft/util/FormattedCharSequence.java +@@ -32,7 +_,7 @@ + } + + static FormattedCharSink decorateOutput(FormattedCharSink sink, Int2IntFunction codePointMapper) { +- return (index, style, codePoint) -> sink.accept(index, style, codePointMapper.apply(Integer.valueOf(codePoint))); ++ return (index, style, codePoint) -> sink.accept(index, style, codePointMapper.apply(codePoint)); + } + + static FormattedCharSequence composite() { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java.patch new file mode 100644 index 0000000..b3f83da --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java ++++ b/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java +@@ -20,7 +_,7 @@ + "Custom Model Data expansion", + type, + typed -> typed.update(DSL.remainderFinder(), dynamic -> dynamic.update("minecraft:custom_model_data", dynamic1 -> { +- float f = dynamic1.asNumber(Float.valueOf(0.0F)).floatValue(); ++ float f = dynamic1.asNumber(0.0F).floatValue(); + return dynamic1.createMap(Map.of(dynamic1.createString("floats"), dynamic1.createList(Stream.of(dynamic1.createFloat(f))))); + })) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/effect/MobEffectInstance.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/effect/MobEffectInstance.java.patch new file mode 100644 index 0000000..c57645c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/effect/MobEffectInstance.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/effect/MobEffectInstance.java ++++ b/net/minecraft/world/effect/MobEffectInstance.java +@@ -400,9 +_,9 @@ + codec -> RecordCodecBuilder.mapCodec( + instance -> instance.group( + ExtraCodecs.UNSIGNED_BYTE.optionalFieldOf("amplifier", 0).forGetter(MobEffectInstance.Details::amplifier), +- Codec.INT.optionalFieldOf("duration", Integer.valueOf(0)).forGetter(MobEffectInstance.Details::duration), +- Codec.BOOL.optionalFieldOf("ambient", Boolean.valueOf(false)).forGetter(MobEffectInstance.Details::ambient), +- Codec.BOOL.optionalFieldOf("show_particles", Boolean.valueOf(true)).forGetter(MobEffectInstance.Details::showParticles), ++ Codec.INT.optionalFieldOf("duration", 0).forGetter(MobEffectInstance.Details::duration), ++ Codec.BOOL.optionalFieldOf("ambient", false).forGetter(MobEffectInstance.Details::ambient), ++ Codec.BOOL.optionalFieldOf("show_particles", true).forGetter(MobEffectInstance.Details::showParticles), + Codec.BOOL.optionalFieldOf("show_icon").forGetter(details -> Optional.of(details.showIcon())), + codec.optionalFieldOf("hidden_effect").forGetter(MobEffectInstance.Details::hiddenEffect) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch new file mode 100644 index 0000000..3f17b32 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/EntitySelector.java.patch @@ -0,0 +1,46 @@ +--- a/net/minecraft/world/entity/EntitySelector.java ++++ b/net/minecraft/world/entity/EntitySelector.java +@@ -52,27 +_,26 @@ + // Paper end - Climbing should not bypass cramming gamerule + Team team = entity.getTeam(); + Team.CollisionRule collisionRule = team == null ? Team.CollisionRule.ALWAYS : team.getCollisionRule(); +- return (Predicate)(collisionRule == Team.CollisionRule.NEVER +- ? Predicates.alwaysFalse() +- : NO_SPECTATORS.and( +- pushedEntity -> { +- if (!pushedEntity.isCollidable(ignoreClimbing) || !pushedEntity.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(pushedEntity)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule ++ // Plazma start - Remove dangerous, unnecessary type casting ++ return collisionRule == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : NO_SPECTATORS.and(pushedEntity -> { ++ if (!pushedEntity.isCollidable(ignoreClimbing) || !pushedEntity.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(pushedEntity)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule ++ return false; ++ } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) { ++ Team team1 = pushedEntity.getTeam(); ++ Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule(); ++ if (collisionRule1 == Team.CollisionRule.NEVER || (pushedEntity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions)) { // Paper - Configurable player collision + return false; +- } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) { +- Team team1 = pushedEntity.getTeam(); +- Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule(); +- if (collisionRule1 == Team.CollisionRule.NEVER || (pushedEntity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions)) { // Paper - Configurable player collision +- return false; +- } else { +- boolean flag = team != null && team.isAlliedTo(team1); +- return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag) +- && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag); +- } + } else { +- return false; ++ boolean flag = team != null && team.isAlliedTo(team1); ++ return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag) ++ && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag); + } ++ } else { ++ return false; + } +- )); ++ ++ }); ++ // Plazma end + } + + public static Predicate notRiding(Entity entity) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch new file mode 100644 index 0000000..3cccb00 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/LivingEntity.java ++++ b/net/minecraft/world/entity/LivingEntity.java +@@ -4421,7 +_,7 @@ + + BlockState blockState = this.level().getBlockState(pos); + if (blockState.getBlock() instanceof BedBlock) { +- this.level().setBlock(pos, blockState.setValue(BedBlock.OCCUPIED, Boolean.valueOf(true)), 3); ++ this.level().setBlock(pos, blockState.setValue(BedBlock.OCCUPIED, true), 3); + } + + this.setPose(Pose.SLEEPING); +@@ -4444,7 +_,7 @@ + BlockState blockState = this.level().getBlockState(blockPos); + if (blockState.getBlock() instanceof BedBlock) { + Direction direction = blockState.getValue(BedBlock.FACING); +- this.level().setBlock(blockPos, blockState.setValue(BedBlock.OCCUPIED, Boolean.valueOf(false)), 3); ++ this.level().setBlock(blockPos, blockState.setValue(BedBlock.OCCUPIED, false), 3); + Vec3 vec31 = BedBlock.findStandUpPosition(this.getType(), this.level(), blockPos, direction, this.getYRot()).orElseGet(() -> { + BlockPos blockPos1 = blockPos.above(); + return new Vec3(blockPos1.getX() + 0.5, blockPos1.getY() + 0.1, blockPos1.getZ() + 0.5); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/ai/village/poi/PoiSection.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/ai/village/poi/PoiSection.java.patch new file mode 100644 index 0000000..df41b41 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/ai/village/poi/PoiSection.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/village/poi/PoiSection.java ++++ b/net/minecraft/world/entity/ai/village/poi/PoiSection.java +@@ -158,7 +_,7 @@ + public record Packed(boolean isValid, List records) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( +- Codec.BOOL.lenientOptionalFieldOf("Valid", Boolean.valueOf(false)).forGetter(PoiSection.Packed::isValid), ++ Codec.BOOL.lenientOptionalFieldOf("Valid", false).forGetter(PoiSection.Packed::isValid), + PoiRecord.Packed.CODEC.listOf().fieldOf("Records").forGetter(PoiSection.Packed::records) + ) + .apply(instance, PoiSection.Packed::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch new file mode 100644 index 0000000..6caf690 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Bee.java.patch @@ -0,0 +1,26 @@ +--- a/net/minecraft/world/entity/animal/Bee.java ++++ b/net/minecraft/world/entity/animal/Bee.java +@@ -784,7 +_,7 @@ + + public static boolean attractsBees(BlockState state) { + return state.is(BlockTags.BEE_ATTRACTIVE) +- && !state.getValueOrElse(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false)) ++ && !state.getValueOrElse(BlockStateProperties.WATERLOGGED, false) + && (!state.is(Blocks.SUNFLOWER) || state.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.UPPER); + } + +@@ -1080,12 +_,12 @@ + } else if (block instanceof StemBlock) { + int ageValue = blockState.getValue(StemBlock.AGE); + if (ageValue < 7) { +- blockState1 = blockState.setValue(StemBlock.AGE, Integer.valueOf(ageValue + 1)); ++ blockState1 = blockState.setValue(StemBlock.AGE, ageValue + 1); + } + } else if (blockState.is(Blocks.SWEET_BERRY_BUSH)) { + int ageValue = blockState.getValue(SweetBerryBushBlock.AGE); + if (ageValue < 3) { +- blockState1 = blockState.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(ageValue + 1)); ++ blockState1 = blockState.setValue(SweetBerryBushBlock.AGE, ageValue + 1); + } + } else if (blockState.is(Blocks.CAVE_VINES) || blockState.is(Blocks.CAVE_VINES_PLANT)) { + BonemealableBlock bonemealableBlock = (BonemealableBlock)blockState.getBlock(); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch new file mode 100644 index 0000000..465ad2b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Fox.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/animal/Fox.java ++++ b/net/minecraft/world/entity/animal/Fox.java +@@ -1068,7 +_,7 @@ + + private void pickSweetBerries(BlockState state) { + int ageValue = state.getValue(SweetBerryBushBlock.AGE); +- state.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(1)); ++ state.setValue(SweetBerryBushBlock.AGE, 1); + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(Fox.this, this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1))) return; // CraftBukkit - call EntityChangeBlockEvent + int i = 1 + Fox.this.level().random.nextInt(2) + (ageValue == 3 ? 1 : 0); + ItemStack itemBySlot = Fox.this.getItemBySlot(EquipmentSlot.MAINHAND); +@@ -1082,7 +_,7 @@ + } + + Fox.this.playSound(SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, 1.0F, 1.0F); +- Fox.this.level().setBlock(this.blockPos, state.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(1)), 2); ++ Fox.this.level().setBlock(this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1), 2); + Fox.this.level().gameEvent(GameEvent.BLOCK_CHANGE, this.blockPos, GameEvent.Context.of(Fox.this)); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch new file mode 100644 index 0000000..d4d4273 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/Rabbit.java ++++ b/net/minecraft/world/entity/animal/Rabbit.java +@@ -669,7 +_,7 @@ + level.destroyBlock(blockPos, true, this.rabbit); + } else { + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockPos, blockState.setValue(CarrotBlock.AGE, ageValue - 1))) return; // CraftBukkit // Paper - fix wrong block state +- level.setBlock(blockPos, blockState.setValue(CarrotBlock.AGE, Integer.valueOf(ageValue - 1)), 2); ++ level.setBlock(blockPos, blockState.setValue(CarrotBlock.AGE, ageValue - 1), 2); + level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(this.rabbit)); + level.levelEvent(2001, blockPos, Block.getId(blockState)); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch new file mode 100644 index 0000000..51c71db --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/item/FallingBlockEntity.java ++++ b/net/minecraft/world/entity/item/FallingBlockEntity.java +@@ -92,7 +_,7 @@ + pos.getY(), + pos.getZ() + 0.5, + blockState.hasProperty(BlockStateProperties.WATERLOGGED) +- ? blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false)) ++ ? blockState.setValue(BlockStateProperties.WATERLOGGED, false) + : blockState + ); + if (!CraftEventFactory.callEntityChangeBlockEvent(fallingBlockEntity, pos, blockState.getFluidState().createLegacyBlock())) return fallingBlockEntity; // CraftBukkit +@@ -202,7 +_,7 @@ + if (canBeReplaced && flag3) { + if (this.blockState.hasProperty(BlockStateProperties.WATERLOGGED) + && this.level().getFluidState(blockPos).getType() == Fluids.WATER) { +- this.blockState = this.blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)); ++ this.blockState = this.blockState.setValue(BlockStateProperties.WATERLOGGED, true); + } + + // CraftBukkit start diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch new file mode 100644 index 0000000..4d48fb4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/creaking/Creaking.java ++++ b/net/minecraft/world/entity/monster/creaking/Creaking.java +@@ -334,7 +_,7 @@ + ); + serverLevel.sendParticles( + new BlockParticleOption( +- ParticleTypes.BLOCK_CRUMBLE, Blocks.CREAKING_HEART.defaultBlockState().setValue(CreakingHeartBlock.ACTIVE, Boolean.valueOf(true)) ++ ParticleTypes.BLOCK_CRUMBLE, Blocks.CREAKING_HEART.defaultBlockState().setValue(CreakingHeartBlock.ACTIVE, true) + ), + center.x, + center.y, diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/MinecartFurnace.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/MinecartFurnace.java.patch new file mode 100644 index 0000000..0e7c290 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/entity/vehicle/MinecartFurnace.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/entity/vehicle/MinecartFurnace.java ++++ b/net/minecraft/world/entity/vehicle/MinecartFurnace.java +@@ -144,6 +_,6 @@ + + @Override + public BlockState getDefaultDisplayBlockState() { +- return Blocks.FURNACE.defaultBlockState().setValue(FurnaceBlock.FACING, Direction.NORTH).setValue(FurnaceBlock.LIT, Boolean.valueOf(this.hasFuel())); ++ return Blocks.FURNACE.defaultBlockState().setValue(FurnaceBlock.FACING, Direction.NORTH).setValue(FurnaceBlock.LIT, this.hasFuel()); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch new file mode 100644 index 0000000..1cafceb --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/food/FoodProperties.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/food/FoodProperties.java ++++ b/net/minecraft/world/food/FoodProperties.java +@@ -22,7 +_,7 @@ + instance -> instance.group( + ExtraCodecs.NON_NEGATIVE_INT.fieldOf("nutrition").forGetter(FoodProperties::nutrition), + Codec.FLOAT.fieldOf("saturation").forGetter(FoodProperties::saturation), +- Codec.BOOL.optionalFieldOf("can_always_eat", Boolean.valueOf(false)).forGetter(FoodProperties::canAlwaysEat) ++ Codec.BOOL.optionalFieldOf("can_always_eat", false).forGetter(FoodProperties::canAlwaysEat) + ) + .apply(instance, FoodProperties::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch new file mode 100644 index 0000000..c717fce --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/world/inventory/AnvilMenu.java ++++ b/net/minecraft/world/inventory/AnvilMenu.java +@@ -157,8 +_,7 @@ + ItemStack itemStack = item.copy(); + ItemStack item1 = this.inputSlots.getItem(1); + ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack)); +- l += (long)item.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)).intValue() +- + item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)).intValue(); ++ l += (long) item.getOrDefault(DataComponents.REPAIR_COST, 0) + item1.getOrDefault(DataComponents.REPAIR_COST, 0); + this.repairItemCountCost = 0; + if (!item1.isEmpty()) { + boolean hasStoredEnchantments = item1.has(DataComponents.STORED_ENCHANTMENTS); +@@ -351,9 +_,9 @@ + } + + if (!itemStack.isEmpty()) { +- int minxx = itemStack.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)); +- if (minxx < item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0))) { +- minxx = item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)); ++ int minxx = itemStack.getOrDefault(DataComponents.REPAIR_COST, 0); ++ if (minxx < item1.getOrDefault(DataComponents.REPAIR_COST, 0)) { ++ minxx = item1.getOrDefault(DataComponents.REPAIR_COST, 0); + } + + if (i1 != i || i1 == 0) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/AdventureModePredicate.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/AdventureModePredicate.java.patch new file mode 100644 index 0000000..db7f527 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/AdventureModePredicate.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/AdventureModePredicate.java ++++ b/net/minecraft/world/item/AdventureModePredicate.java +@@ -27,7 +_,7 @@ + ExtraCodecs.nonEmptyList(BlockPredicate.CODEC.listOf()) + .fieldOf("predicates") + .forGetter(adventureModePredicate -> adventureModePredicate.predicates), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(AdventureModePredicate::showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(AdventureModePredicate::showInTooltip) + ) + .apply(instance, AdventureModePredicate::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch new file mode 100644 index 0000000..1a0c6e5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/EnderEyeItem.java ++++ b/net/minecraft/world/item/EnderEyeItem.java +@@ -41,7 +_,7 @@ + } else if (level.isClientSide) { + return InteractionResult.SUCCESS; + } else { +- BlockState blockState1 = blockState.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(true)); ++ BlockState blockState1 = blockState.setValue(EndPortalFrameBlock.HAS_EYE, true); + // Paper start + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), clickedPos, blockState1)) { + return InteractionResult.PASS; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FireChargeItem.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FireChargeItem.java.patch new file mode 100644 index 0000000..7f2cffa --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FireChargeItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/FireChargeItem.java ++++ b/net/minecraft/world/item/FireChargeItem.java +@@ -58,7 +_,7 @@ + } + // CraftBukkit end + this.playSound(level, clickedPos); +- level.setBlockAndUpdate(clickedPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true))); ++ level.setBlockAndUpdate(clickedPos, blockState.setValue(BlockStateProperties.LIT, true)); + level.gameEvent(context.getPlayer(), GameEvent.BLOCK_CHANGE, clickedPos); + flag = true; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch new file mode 100644 index 0000000..52c7442 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/FlintAndSteelItem.java ++++ b/net/minecraft/world/item/FlintAndSteelItem.java +@@ -60,7 +_,7 @@ + } + // CraftBukkit end + level.playSound(player, clickedPos, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.4F + 0.8F); +- level.setBlock(clickedPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)), 11); ++ level.setBlock(clickedPos, blockState.setValue(BlockStateProperties.LIT, true), 11); + level.gameEvent(player, GameEvent.BLOCK_CHANGE, clickedPos); + if (player != null) { + context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand())); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch new file mode 100644 index 0000000..60d2cb0 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ItemStack.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/item/ItemStack.java ++++ b/net/minecraft/world/item/ItemStack.java +@@ -614,7 +_,7 @@ + } + + public int getMaxStackSize() { +- return this.getOrDefault(DataComponents.MAX_STACK_SIZE, Integer.valueOf(1)); ++ return this.getOrDefault(DataComponents.MAX_STACK_SIZE, 1); + } + + public boolean isStackable() { +@@ -650,7 +_,7 @@ + // Purpur end - Add option to mend the most damaged equipment first + + public int getDamageValue() { +- return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, Integer.valueOf(0)), 0, this.getMaxDamage()); ++ return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage()); + } + + public void setDamageValue(int damage) { +@@ -658,7 +_,7 @@ + } + + public int getMaxDamage() { +- return this.getOrDefault(DataComponents.MAX_DAMAGE, Integer.valueOf(0)); ++ return this.getOrDefault(DataComponents.MAX_DAMAGE, 0); + } + + public boolean isBroken() { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/JukeboxPlayable.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/JukeboxPlayable.java.patch new file mode 100644 index 0000000..60c013f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/JukeboxPlayable.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/JukeboxPlayable.java ++++ b/net/minecraft/world/item/JukeboxPlayable.java +@@ -30,7 +_,7 @@ + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + EitherHolder.codec(Registries.JUKEBOX_SONG, JukeboxSong.CODEC).fieldOf("song").forGetter(JukeboxPlayable::song), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(JukeboxPlayable::showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(JukeboxPlayable::showInTooltip) + ) + .apply(instance, JukeboxPlayable::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch new file mode 100644 index 0000000..d3745e6 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/ShovelItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/ShovelItem.java ++++ b/net/minecraft/world/item/ShovelItem.java +@@ -61,7 +_,7 @@ + + CampfireBlock.dowse(context.getPlayer(), level, clickedPos, blockState); + }; // Paper +- blockState2 = blockState.setValue(CampfireBlock.LIT, Boolean.valueOf(false)); ++ blockState2 = blockState.setValue(CampfireBlock.LIT, false); + } + + if (blockState2 != null) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Consumable.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Consumable.java.patch new file mode 100644 index 0000000..73b91bd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Consumable.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/Consumable.java ++++ b/net/minecraft/world/item/component/Consumable.java +@@ -40,7 +_,7 @@ + ExtraCodecs.NON_NEGATIVE_FLOAT.optionalFieldOf("consume_seconds", 1.6F).forGetter(Consumable::consumeSeconds), + ItemUseAnimation.CODEC.optionalFieldOf("animation", ItemUseAnimation.EAT).forGetter(Consumable::animation), + SoundEvent.CODEC.optionalFieldOf("sound", SoundEvents.GENERIC_EAT).forGetter(Consumable::sound), +- Codec.BOOL.optionalFieldOf("has_consume_particles", Boolean.valueOf(true)).forGetter(Consumable::hasConsumeParticles), ++ Codec.BOOL.optionalFieldOf("has_consume_particles", true).forGetter(Consumable::hasConsumeParticles), + ConsumeEffect.CODEC.listOf().optionalFieldOf("on_consume_effects", List.of()).forGetter(Consumable::onConsumeEffects) + ) + .apply(instance, Consumable::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/DyedItemColor.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/DyedItemColor.java.patch new file mode 100644 index 0000000..43d7eaa --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/DyedItemColor.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/DyedItemColor.java ++++ b/net/minecraft/world/item/component/DyedItemColor.java +@@ -22,7 +_,7 @@ + private static final Codec FULL_CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Codec.INT.fieldOf("rgb").forGetter(DyedItemColor::rgb), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(DyedItemColor::showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(DyedItemColor::showInTooltip) + ) + .apply(instance, DyedItemColor::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/FireworkExplosion.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/FireworkExplosion.java.patch new file mode 100644 index 0000000..50c9044 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/FireworkExplosion.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/item/component/FireworkExplosion.java ++++ b/net/minecraft/world/item/component/FireworkExplosion.java +@@ -29,8 +_,8 @@ + FireworkExplosion.Shape.CODEC.fieldOf("shape").forGetter(FireworkExplosion::shape), + COLOR_LIST_CODEC.optionalFieldOf("colors", IntList.of()).forGetter(FireworkExplosion::colors), + COLOR_LIST_CODEC.optionalFieldOf("fade_colors", IntList.of()).forGetter(FireworkExplosion::fadeColors), +- Codec.BOOL.optionalFieldOf("has_trail", Boolean.valueOf(false)).forGetter(FireworkExplosion::hasTrail), +- Codec.BOOL.optionalFieldOf("has_twinkle", Boolean.valueOf(false)).forGetter(FireworkExplosion::hasTwinkle) ++ Codec.BOOL.optionalFieldOf("has_trail", false).forGetter(FireworkExplosion::hasTrail), ++ Codec.BOOL.optionalFieldOf("has_twinkle", false).forGetter(FireworkExplosion::hasTwinkle) + ) + .apply(instance, FireworkExplosion::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/ItemAttributeModifiers.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/ItemAttributeModifiers.java.patch new file mode 100644 index 0000000..3b14659 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/ItemAttributeModifiers.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/ItemAttributeModifiers.java ++++ b/net/minecraft/world/item/component/ItemAttributeModifiers.java +@@ -24,7 +_,7 @@ + private static final Codec FULL_CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ItemAttributeModifiers.Entry.CODEC.listOf().fieldOf("modifiers").forGetter(ItemAttributeModifiers::modifiers), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(ItemAttributeModifiers::showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(ItemAttributeModifiers::showInTooltip) + ) + .apply(instance, ItemAttributeModifiers::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch new file mode 100644 index 0000000..257e90e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/LodestoneTracker.java ++++ b/net/minecraft/world/item/component/LodestoneTracker.java +@@ -15,7 +_,7 @@ + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + GlobalPos.CODEC.optionalFieldOf("target").forGetter(LodestoneTracker::target), +- Codec.BOOL.optionalFieldOf("tracked", Boolean.valueOf(true)).forGetter(LodestoneTracker::tracked) ++ Codec.BOOL.optionalFieldOf("tracked", true).forGetter(LodestoneTracker::tracked) + ) + .apply(instance, LodestoneTracker::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SeededContainerLoot.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SeededContainerLoot.java.patch new file mode 100644 index 0000000..3869f5c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SeededContainerLoot.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/SeededContainerLoot.java ++++ b/net/minecraft/world/item/component/SeededContainerLoot.java +@@ -10,7 +_,7 @@ + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ResourceKey.codec(Registries.LOOT_TABLE).fieldOf("loot_table").forGetter(SeededContainerLoot::lootTable), +- Codec.LONG.optionalFieldOf("seed", Long.valueOf(0L)).forGetter(SeededContainerLoot::seed) ++ Codec.LONG.optionalFieldOf("seed", 0L).forGetter(SeededContainerLoot::seed) + ) + .apply(instance, SeededContainerLoot::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch new file mode 100644 index 0000000..fa24128 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/SuspiciousStewEffects.java ++++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java +@@ -67,7 +_,7 @@ + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + MobEffect.CODEC.fieldOf("id").forGetter(SuspiciousStewEffects.Entry::effect), +- Codec.INT.lenientOptionalFieldOf("duration", Integer.valueOf(160)).forGetter(SuspiciousStewEffects.Entry::duration) ++ Codec.INT.lenientOptionalFieldOf("duration", 160).forGetter(SuspiciousStewEffects.Entry::duration) + ) + .apply(instance, SuspiciousStewEffects.Entry::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Tool.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Tool.java.patch new file mode 100644 index 0000000..b851f30 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Tool.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/Tool.java ++++ b/net/minecraft/world/item/component/Tool.java +@@ -18,7 +_,7 @@ + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Tool.Rule.CODEC.listOf().fieldOf("rules").forGetter(Tool::rules), +- Codec.FLOAT.optionalFieldOf("default_mining_speed", Float.valueOf(1.0F)).forGetter(Tool::defaultMiningSpeed), ++ Codec.FLOAT.optionalFieldOf("default_mining_speed", 1.0F).forGetter(Tool::defaultMiningSpeed), + ExtraCodecs.NON_NEGATIVE_INT.optionalFieldOf("damage_per_block", 1).forGetter(Tool::damagePerBlock) + ) + .apply(instance, Tool::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Unbreakable.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Unbreakable.java.patch new file mode 100644 index 0000000..7899c7a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/Unbreakable.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/Unbreakable.java ++++ b/net/minecraft/world/item/component/Unbreakable.java +@@ -13,7 +_,7 @@ + + public record Unbreakable(boolean showInTooltip) implements TooltipProvider { + public static final Codec CODEC = RecordCodecBuilder.create( +- instance -> instance.group(Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(Unbreakable::showInTooltip)) ++ instance -> instance.group(Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(Unbreakable::showInTooltip)) + .apply(instance, Unbreakable::new) + ); + public static final StreamCodec STREAM_CODEC = ByteBufCodecs.BOOL.map(Unbreakable::new, Unbreakable::showInTooltip); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/WrittenBookContent.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/WrittenBookContent.java.patch new file mode 100644 index 0000000..83514cb --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/component/WrittenBookContent.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/WrittenBookContent.java ++++ b/net/minecraft/world/item/component/WrittenBookContent.java +@@ -36,7 +_,7 @@ + Codec.STRING.fieldOf("author").forGetter(WrittenBookContent::author), + ExtraCodecs.intRange(0, 3).optionalFieldOf("generation", 0).forGetter(WrittenBookContent::generation), + PAGES_CODEC.optionalFieldOf("pages", List.of()).forGetter(WrittenBookContent::pages), +- Codec.BOOL.optionalFieldOf("resolved", Boolean.valueOf(false)).forGetter(WrittenBookContent::resolved) ++ Codec.BOOL.optionalFieldOf("resolved", false).forGetter(WrittenBookContent::resolved) + ) + .apply(instance, WrittenBookContent::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch new file mode 100644 index 0000000..c2b9eda --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/crafting/ShapedRecipe.java ++++ b/net/minecraft/world/item/crafting/ShapedRecipe.java +@@ -172,7 +_,7 @@ + CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(shapedRecipe -> shapedRecipe.category), + ShapedRecipePattern.MAP_CODEC.forGetter(shapedRecipe -> shapedRecipe.pattern), + ItemStack.STRICT_CODEC.fieldOf("result").forGetter(shapedRecipe -> shapedRecipe.result), +- Codec.BOOL.optionalFieldOf("show_notification", Boolean.valueOf(true)).forGetter(shapedRecipe -> shapedRecipe.showNotification) ++ Codec.BOOL.optionalFieldOf("show_notification", true).forGetter(shapedRecipe -> shapedRecipe.showNotification) + ) + .apply(instance, ShapedRecipe::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch new file mode 100644 index 0000000..5f99f1a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/ItemEnchantments.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/enchantment/ItemEnchantments.java ++++ b/net/minecraft/world/item/enchantment/ItemEnchantments.java +@@ -44,7 +_,7 @@ + private static final Codec FULL_CODEC = RecordCodecBuilder.create( + instance -> instance.group( + LEVELS_CODEC.fieldOf("levels").forGetter(itemEnchantments -> itemEnchantments.enchantments), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(itemEnchantments -> itemEnchantments.showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(itemEnchantments -> itemEnchantments.showInTooltip) + ) + .apply(instance, ItemEnchantments::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java.patch new file mode 100644 index 0000000..91d14f6 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java ++++ b/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java +@@ -38,13 +_,13 @@ + ) implements EnchantmentEntityEffect { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( +- Codec.BOOL.optionalFieldOf("attribute_to_user", Boolean.valueOf(false)).forGetter(ExplodeEffect::attributeToUser), ++ Codec.BOOL.optionalFieldOf("attribute_to_user", false).forGetter(ExplodeEffect::attributeToUser), + DamageType.CODEC.optionalFieldOf("damage_type").forGetter(ExplodeEffect::damageType), + LevelBasedValue.CODEC.optionalFieldOf("knockback_multiplier").forGetter(ExplodeEffect::knockbackMultiplier), + RegistryCodecs.homogeneousList(Registries.BLOCK).optionalFieldOf("immune_blocks").forGetter(ExplodeEffect::immuneBlocks), + Vec3.CODEC.optionalFieldOf("offset", Vec3.ZERO).forGetter(ExplodeEffect::offset), + LevelBasedValue.CODEC.fieldOf("radius").forGetter(ExplodeEffect::radius), +- Codec.BOOL.optionalFieldOf("create_fire", Boolean.valueOf(false)).forGetter(ExplodeEffect::createFire), ++ Codec.BOOL.optionalFieldOf("create_fire", false).forGetter(ExplodeEffect::createFire), + Level.ExplosionInteraction.CODEC.fieldOf("block_interaction").forGetter(ExplodeEffect::blockInteraction), + ParticleTypes.CODEC.fieldOf("small_particle").forGetter(ExplodeEffect::smallParticle), + ParticleTypes.CODEC.fieldOf("large_particle").forGetter(ExplodeEffect::largeParticle), diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java.patch new file mode 100644 index 0000000..0ef210c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java ++++ b/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java +@@ -80,7 +_,7 @@ + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + SpawnParticlesEffect.PositionSourceType.CODEC.fieldOf("type").forGetter(SpawnParticlesEffect.PositionSource::type), +- Codec.FLOAT.optionalFieldOf("offset", Float.valueOf(0.0F)).forGetter(SpawnParticlesEffect.PositionSource::offset), ++ Codec.FLOAT.optionalFieldOf("offset", 0.0F).forGetter(SpawnParticlesEffect.PositionSource::offset), + ExtraCodecs.POSITIVE_FLOAT.optionalFieldOf("scale", 1.0F).forGetter(SpawnParticlesEffect.PositionSource::scale) + ) + .apply(instance, SpawnParticlesEffect.PositionSource::new) +@@ -127,7 +_,7 @@ + public record VelocitySource(float movementScale, FloatProvider base) { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( +- Codec.FLOAT.optionalFieldOf("movement_scale", Float.valueOf(0.0F)).forGetter(SpawnParticlesEffect.VelocitySource::movementScale), ++ Codec.FLOAT.optionalFieldOf("movement_scale", 0.0F).forGetter(SpawnParticlesEffect.VelocitySource::movementScale), + FloatProvider.CODEC.optionalFieldOf("base", ConstantFloat.ZERO).forGetter(SpawnParticlesEffect.VelocitySource::base) + ) + .apply(instance, SpawnParticlesEffect.VelocitySource::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch new file mode 100644 index 0000000..2e560e9 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java ++++ b/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java +@@ -23,7 +_,7 @@ + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE).fieldOf("entity").forGetter(SummonEntityEffect::entityTypes), +- Codec.BOOL.optionalFieldOf("join_team", Boolean.valueOf(false)).forGetter(SummonEntityEffect::joinTeam) ++ Codec.BOOL.optionalFieldOf("join_team", false).forGetter(SummonEntityEffect::joinTeam) + ) + .apply(instance, SummonEntityEffect::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/Equippable.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/Equippable.java.patch new file mode 100644 index 0000000..a8cfbcd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/Equippable.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/item/equipment/Equippable.java ++++ b/net/minecraft/world/item/equipment/Equippable.java +@@ -41,9 +_,9 @@ + ResourceKey.codec(EquipmentAssets.ROOT_ID).optionalFieldOf("asset_id").forGetter(Equippable::assetId), + ResourceLocation.CODEC.optionalFieldOf("camera_overlay").forGetter(Equippable::cameraOverlay), + RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE).optionalFieldOf("allowed_entities").forGetter(Equippable::allowedEntities), +- Codec.BOOL.optionalFieldOf("dispensable", Boolean.valueOf(true)).forGetter(Equippable::dispensable), +- Codec.BOOL.optionalFieldOf("swappable", Boolean.valueOf(true)).forGetter(Equippable::swappable), +- Codec.BOOL.optionalFieldOf("damage_on_hurt", Boolean.valueOf(true)).forGetter(Equippable::damageOnHurt) ++ Codec.BOOL.optionalFieldOf("dispensable", true).forGetter(Equippable::dispensable), ++ Codec.BOOL.optionalFieldOf("swappable", true).forGetter(Equippable::swappable), ++ Codec.BOOL.optionalFieldOf("damage_on_hurt", true).forGetter(Equippable::damageOnHurt) + ) + .apply(instance, Equippable::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/trim/ArmorTrim.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/trim/ArmorTrim.java.patch new file mode 100644 index 0000000..3fab15a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/equipment/trim/ArmorTrim.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/equipment/trim/ArmorTrim.java ++++ b/net/minecraft/world/item/equipment/trim/ArmorTrim.java +@@ -21,7 +_,7 @@ + instance -> instance.group( + TrimMaterial.CODEC.fieldOf("material").forGetter(ArmorTrim::material), + TrimPattern.CODEC.fieldOf("pattern").forGetter(ArmorTrim::pattern), +- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(trim -> trim.showInTooltip) ++ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(trim -> trim.showInTooltip) + ) + .apply(instance, ArmorTrim::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch new file mode 100644 index 0000000..78d8195 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/item/trading/MerchantOffer.java ++++ b/net/minecraft/world/item/trading/MerchantOffer.java +@@ -14,13 +_,13 @@ + ItemCost.CODEC.fieldOf("buy").forGetter(merchantOffer -> merchantOffer.baseCostA), + ItemCost.CODEC.lenientOptionalFieldOf("buyB").forGetter(merchantOffer -> merchantOffer.costB), + ItemStack.CODEC.fieldOf("sell").forGetter(merchantOffer -> merchantOffer.result), +- Codec.INT.lenientOptionalFieldOf("uses", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.uses), +- Codec.INT.lenientOptionalFieldOf("maxUses", Integer.valueOf(4)).forGetter(merchantOffer -> merchantOffer.maxUses), +- Codec.BOOL.lenientOptionalFieldOf("rewardExp", Boolean.valueOf(true)).forGetter(merchantOffer -> merchantOffer.rewardExp), +- Codec.INT.lenientOptionalFieldOf("specialPrice", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.specialPriceDiff), +- Codec.INT.lenientOptionalFieldOf("demand", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.demand), +- Codec.FLOAT.lenientOptionalFieldOf("priceMultiplier", Float.valueOf(0.0F)).forGetter(merchantOffer -> merchantOffer.priceMultiplier), +- Codec.INT.lenientOptionalFieldOf("xp", Integer.valueOf(1)).forGetter(merchantOffer -> merchantOffer.xp) ++ Codec.INT.lenientOptionalFieldOf("uses", 0).forGetter(merchantOffer -> merchantOffer.uses), ++ Codec.INT.lenientOptionalFieldOf("maxUses", 4).forGetter(merchantOffer -> merchantOffer.maxUses), ++ Codec.BOOL.lenientOptionalFieldOf("rewardExp", true).forGetter(merchantOffer -> merchantOffer.rewardExp), ++ Codec.INT.lenientOptionalFieldOf("specialPrice", 0).forGetter(merchantOffer -> merchantOffer.specialPriceDiff), ++ Codec.INT.lenientOptionalFieldOf("demand", 0).forGetter(merchantOffer -> merchantOffer.demand), ++ Codec.FLOAT.lenientOptionalFieldOf("priceMultiplier", 0.0F).forGetter(merchantOffer -> merchantOffer.priceMultiplier), ++ Codec.INT.lenientOptionalFieldOf("xp", 1).forGetter(merchantOffer -> merchantOffer.xp) + , Codec.BOOL.lenientOptionalFieldOf("Paper.IgnoreDiscounts", false).forGetter(merchantOffer -> merchantOffer.ignoreDiscounts) // Paper + ) + .apply(instance, MerchantOffer::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch index 34b3524..bf57dab 100644 --- a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/ServerExplosion.java.patch @@ -1,5 +1,32 @@ --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java +@@ -101,7 +_,7 @@ + + // resistance = (res + 0.3F) * 0.3F; + // so for resistance = 0, we need res = -0.3F +- private static final Float ZERO_RESISTANCE = Float.valueOf(-0.3f); ++ private static final Float ZERO_RESISTANCE = -0.3f; + private it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap blockCache = null; + private long[] chunkPosCache = null; + private net.minecraft.world.level.chunk.LevelChunk[] chunkCache = null; +@@ -137,7 +_,7 @@ + + ret = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache( + key, pos, blockState, fluidState, +- (resistance.orElse(ZERO_RESISTANCE).floatValue() + 0.3f) * 0.3f, ++ (resistance.orElse(ZERO_RESISTANCE) + 0.3f) * 0.3f, + false + ); + } +@@ -446,7 +_,7 @@ + // note: we expect shouldBlockExplode to be pure with respect to power, as Vanilla currently is. + // basically, it is unused, which allows us to cache the result + final boolean shouldExplode = iblockdata.isDestroyable() && this.damageCalculator.shouldBlockExplode((Explosion)(Object)this, this.level, cachedBlock.immutablePos, cachedBlock.blockState, power); // Paper - Protect Bedrock and End Portal/Frames from being destroyed +- cachedBlock.shouldExplode = shouldExplode ? Boolean.TRUE : Boolean.FALSE; ++ cachedBlock.shouldExplode = shouldExplode ? true : false; + if (shouldExplode) { + if (this.fire || !cachedBlock.blockState.isAir()) { + ret.add(cachedBlock.immutablePos); @@ -791,10 +_,10 @@ return this.getSeenFraction(vec3d, entity, this.directMappedBlockCache, this.mutablePos); // Paper - collision optimisations } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch new file mode 100644 index 0000000..91f3697 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/AbstractCandleBlock.java ++++ b/net/minecraft/world/level/block/AbstractCandleBlock.java +@@ -100,7 +_,7 @@ + } + + private static void setLit(LevelAccessor level, BlockState state, BlockPos pos, boolean lit) { +- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(lit)), 11); ++ level.setBlock(pos, state.setValue(LIT, lit), 11); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractFurnaceBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractFurnaceBlock.java.patch new file mode 100644 index 0000000..e4256ca --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractFurnaceBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/AbstractFurnaceBlock.java ++++ b/net/minecraft/world/level/block/AbstractFurnaceBlock.java +@@ -30,7 +_,7 @@ + + protected AbstractFurnaceBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractSkullBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractSkullBlock.java.patch new file mode 100644 index 0000000..977a5af --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AbstractSkullBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/AbstractSkullBlock.java ++++ b/net/minecraft/world/level/block/AbstractSkullBlock.java +@@ -24,7 +_,7 @@ + public AbstractSkullBlock(SkullBlock.Type type, BlockBehaviour.Properties properties) { + super(properties); + this.type = type; +- this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, false)); + } + + @Override +@@ -67,7 +_,7 @@ + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return this.defaultBlockState().setValue(POWERED, Boolean.valueOf(context.getLevel().hasNeighborSignal(context.getClickedPos()))); ++ return this.defaultBlockState().setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos())); + } + + @Override +@@ -75,7 +_,7 @@ + if (!level.isClientSide) { + boolean hasNeighborSignal = level.hasNeighborSignal(pos); + if (hasNeighborSignal != state.getValue(POWERED)) { +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 2); ++ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 2); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AmethystClusterBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AmethystClusterBlock.java.patch new file mode 100644 index 0000000..ca20e76 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AmethystClusterBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/AmethystClusterBlock.java ++++ b/net/minecraft/world/level/block/AmethystClusterBlock.java +@@ -50,7 +_,7 @@ + + public AmethystClusterBlock(float height, float aabbOffset, BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.UP)); ++ this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, false).setValue(FACING, Direction.UP)); + this.upAabb = Block.box(aabbOffset, 0.0, aabbOffset, 16.0F - aabbOffset, height, 16.0F - aabbOffset); + this.downAabb = Block.box(aabbOffset, 16.0F - height, aabbOffset, 16.0F - aabbOffset, 16.0, 16.0F - aabbOffset); + this.northAabb = Block.box(aabbOffset, aabbOffset, 16.0F - height, 16.0F - aabbOffset, 16.0F - aabbOffset, 16.0); +@@ -114,7 +_,7 @@ + LevelAccessor level = context.getLevel(); + BlockPos clickedPos = context.getClickedPos(); + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(level.getFluidState(clickedPos).getType() == Fluids.WATER)) ++ .setValue(WATERLOGGED, level.getFluidState(clickedPos).getType() == Fluids.WATER) + .setValue(FACING, context.getClickedFace()); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AttachedStemBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AttachedStemBlock.java.patch new file mode 100644 index 0000000..1eab668 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/AttachedStemBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/AttachedStemBlock.java ++++ b/net/minecraft/world/level/block/AttachedStemBlock.java +@@ -84,7 +_,7 @@ + if (!neighborState.is(this.fruit) && direction == state.getValue(FACING)) { + Optional optional = level.registryAccess().lookupOrThrow(Registries.BLOCK).getOptional(this.stem); + if (optional.isPresent()) { +- return optional.get().defaultBlockState().trySetValue(StemBlock.AGE, Integer.valueOf(7)); ++ return optional.get().defaultBlockState().trySetValue(StemBlock.AGE, 7); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch new file mode 100644 index 0000000..af61ca8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch @@ -0,0 +1,24 @@ +--- a/net/minecraft/world/level/block/BambooStalkBlock.java ++++ b/net/minecraft/world/level/block/BambooStalkBlock.java +@@ -52,7 +_,7 @@ + public BambooStalkBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(AGE, Integer.valueOf(0)).setValue(LEAVES, BambooLeaves.NONE).setValue(STAGE, Integer.valueOf(0)) ++ this.stateDefinition.any().setValue(AGE, 0).setValue(LEAVES, BambooLeaves.NONE).setValue(STAGE, 0) + ); + } + +@@ -99,10 +_,10 @@ + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos().below()); + if (blockState.is(BlockTags.BAMBOO_PLANTABLE_ON)) { + if (blockState.is(Blocks.BAMBOO_SAPLING)) { +- return this.defaultBlockState().setValue(AGE, Integer.valueOf(0)); ++ return this.defaultBlockState().setValue(AGE, 0); + } else if (blockState.is(Blocks.BAMBOO)) { + int i = blockState.getValue(AGE) > 0 ? 1 : 0; +- return this.defaultBlockState().setValue(AGE, Integer.valueOf(i)); ++ return this.defaultBlockState().setValue(AGE, i); + } else { + BlockState blockState1 = context.getLevel().getBlockState(context.getClickedPos().above()); + return blockState1.is(Blocks.BAMBOO) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BannerBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BannerBlock.java.patch new file mode 100644 index 0000000..bf1e494 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BannerBlock.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/level/block/BannerBlock.java ++++ b/net/minecraft/world/level/block/BannerBlock.java +@@ -37,7 +_,7 @@ + + public BannerBlock(DyeColor color, BlockBehaviour.Properties properties) { + super(color, properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, 0)); + BY_COLOR.put(color, this); + } + +@@ -53,7 +_,7 @@ + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return this.defaultBlockState().setValue(ROTATION, Integer.valueOf(RotationSegment.convertToSegment(context.getRotation() + 180.0F))); ++ return this.defaultBlockState().setValue(ROTATION, RotationSegment.convertToSegment(context.getRotation() + 180.0F)); + } + + @Override +@@ -74,12 +_,12 @@ + + @Override + protected BlockState rotate(BlockState state, Rotation rotation) { +- return state.setValue(ROTATION, Integer.valueOf(rotation.rotate(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, rotation.rotate(state.getValue(ROTATION), 16)); + } + + @Override + protected BlockState mirror(BlockState state, Mirror mirror) { +- return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, mirror.mirror(state.getValue(ROTATION), 16)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrelBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrelBlock.java.patch new file mode 100644 index 0000000..ae8fd3a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrelBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BarrelBlock.java ++++ b/net/minecraft/world/level/block/BarrelBlock.java +@@ -36,7 +_,7 @@ + + public BarrelBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(OPEN, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(OPEN, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrierBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrierBlock.java.patch new file mode 100644 index 0000000..0f106b2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BarrierBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/BarrierBlock.java ++++ b/net/minecraft/world/level/block/BarrierBlock.java +@@ -32,7 +_,7 @@ + + protected BarrierBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, false)); + } + + @Override +@@ -77,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch new file mode 100644 index 0000000..88a18c1 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java ++++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java +@@ -26,7 +_,7 @@ + + protected BaseCoralPlantTypeBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, true)); + } + + @Override +@@ -57,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8)); ++ return this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralWallFanBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralWallFanBlock.java.patch new file mode 100644 index 0000000..ab0cd9a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseCoralWallFanBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BaseCoralWallFanBlock.java ++++ b/net/minecraft/world/level/block/BaseCoralWallFanBlock.java +@@ -43,7 +_,7 @@ + + protected BaseCoralWallFanBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, true)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseRailBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseRailBlock.java.patch new file mode 100644 index 0000000..06e498c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BaseRailBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BaseRailBlock.java ++++ b/net/minecraft/world/level/block/BaseRailBlock.java +@@ -143,7 +_,7 @@ + BlockState blockState = super.defaultBlockState(); + Direction horizontalDirection = context.getHorizontalDirection(); + boolean flag1 = horizontalDirection == Direction.EAST || horizontalDirection == Direction.WEST; +- return blockState.setValue(this.getShapeProperty(), flag1 ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return blockState.setValue(this.getShapeProperty(), flag1 ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH).setValue(WATERLOGGED, flag); + } + + public abstract Property getShapeProperty(); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch new file mode 100644 index 0000000..f5428a8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BedBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BedBlock.java ++++ b/net/minecraft/world/level/block/BedBlock.java +@@ -70,7 +_,7 @@ + public BedBlock(DyeColor color, BlockBehaviour.Properties properties) { + super(properties); + this.color = color; +- this.registerDefaultState(this.stateDefinition.any().setValue(PART, BedPart.FOOT).setValue(OCCUPIED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(PART, BedPart.FOOT).setValue(OCCUPIED, false)); + } + + @Nullable diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch new file mode 100644 index 0000000..333a0c2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/BeehiveBlock.java ++++ b/net/minecraft/world/level/block/BeehiveBlock.java +@@ -77,7 +_,7 @@ + + public BeehiveBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(HONEY_LEVEL, Integer.valueOf(0)).setValue(FACING, Direction.NORTH)); ++ this.registerDefaultState(this.stateDefinition.any().setValue(HONEY_LEVEL, 0).setValue(FACING, Direction.NORTH)); + } + + @Override +@@ -206,7 +_,7 @@ + } + + public void resetHoneyLevel(Level level, BlockState state, BlockPos pos) { +- level.setBlock(pos, state.setValue(HONEY_LEVEL, Integer.valueOf(0)), 3); ++ level.setBlock(pos, state.setValue(HONEY_LEVEL, 0), 3); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BellBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BellBlock.java.patch new file mode 100644 index 0000000..2879cc3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BellBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/BellBlock.java ++++ b/net/minecraft/world/level/block/BellBlock.java +@@ -67,7 +_,7 @@ + public BellBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(ATTACHMENT, BellAttachType.FLOOR).setValue(POWERED, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(ATTACHMENT, BellAttachType.FLOOR).setValue(POWERED, false) + ); + } + +@@ -79,7 +_,7 @@ + this.attemptToRing(level, pos, null); + } + +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 3); ++ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch new file mode 100644 index 0000000..1685316 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/BigDripleafBlock.java ++++ b/net/minecraft/world/level/block/BigDripleafBlock.java +@@ -88,7 +_,7 @@ + protected BigDripleafBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH).setValue(TILT, Tilt.NONE) ++ this.stateDefinition.any().setValue(WATERLOGGED, false).setValue(FACING, Direction.NORTH).setValue(TILT, Tilt.NONE) + ); + this.shapesCache = this.getShapeForEachState(BigDripleafBlock::calculateShape); + } +@@ -129,7 +_,7 @@ + protected static boolean place(LevelAccessor level, BlockPos pos, FluidState fluidState, Direction direction) { + BlockState blockState = Blocks.BIG_DRIPLEAF + .defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER))) ++ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER)) + .setValue(FACING, direction); + return level.setBlock(pos, blockState, 3); + } +@@ -306,7 +_,7 @@ + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = blockState.is(Blocks.BIG_DRIPLEAF) || blockState.is(Blocks.BIG_DRIPLEAF_STEM); + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER))) ++ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER)) + .setValue(FACING, flag ? blockState.getValue(FACING) : context.getHorizontalDirection().getOpposite()); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafStemBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafStemBlock.java.patch new file mode 100644 index 0000000..52779ca --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BigDripleafStemBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/BigDripleafStemBlock.java ++++ b/net/minecraft/world/level/block/BigDripleafStemBlock.java +@@ -40,7 +_,7 @@ + + protected BigDripleafStemBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH)); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false).setValue(FACING, Direction.NORTH)); + } + + @Override +@@ -79,7 +_,7 @@ + protected static boolean place(LevelAccessor level, BlockPos pos, FluidState fluidState, Direction direction) { + BlockState blockState = Blocks.BIG_DRIPLEAF_STEM + .defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER))) ++ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER)) + .setValue(FACING, direction); + return level.setBlock(pos, blockState, 3); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrewingStandBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrewingStandBlock.java.patch new file mode 100644 index 0000000..d18ce6a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrewingStandBlock.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/level/block/BrewingStandBlock.java ++++ b/net/minecraft/world/level/block/BrewingStandBlock.java +@@ -44,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(HAS_BOTTLE[0], Boolean.valueOf(false)) +- .setValue(HAS_BOTTLE[1], Boolean.valueOf(false)) +- .setValue(HAS_BOTTLE[2], Boolean.valueOf(false)) ++ .setValue(HAS_BOTTLE[0], false) ++ .setValue(HAS_BOTTLE[1], false) ++ .setValue(HAS_BOTTLE[2], false) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrushableBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrushableBlock.java.patch new file mode 100644 index 0000000..c5492d1 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BrushableBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BrushableBlock.java ++++ b/net/minecraft/world/level/block/BrushableBlock.java +@@ -51,7 +_,7 @@ + this.turnsInto = turnsInto; + this.brushSound = brushSound; + this.brushCompletedSound = brushCompletedSound; +- this.registerDefaultState(this.stateDefinition.any().setValue(DUSTED, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(DUSTED, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch new file mode 100644 index 0000000..93e75fd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BubbleColumnBlock.java.patch @@ -0,0 +1,24 @@ +--- a/net/minecraft/world/level/block/BubbleColumnBlock.java ++++ b/net/minecraft/world/level/block/BubbleColumnBlock.java +@@ -43,7 +_,7 @@ + + public BubbleColumnBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(DRAG_DOWN, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(DRAG_DOWN, true)); + } + + @Override +@@ -124,10 +_,10 @@ + if (blockState.is(Blocks.BUBBLE_COLUMN)) { + return blockState; + } else if (blockState.is(Blocks.SOUL_SAND)) { +- return Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, Boolean.valueOf(org.purpurmc.purpur.PurpurConfig.soulSandBlockReverseBubbleColumnFlow)); // Purpur - Config to reverse bubble column flow ++ return Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, org.purpurmc.purpur.PurpurConfig.soulSandBlockReverseBubbleColumnFlow); // Purpur - Config to reverse bubble column flow + } else { + return blockState.is(Blocks.MAGMA_BLOCK) +- ? Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, Boolean.valueOf(!org.purpurmc.purpur.PurpurConfig.magmaBlockReverseBubbleColumnFlow)) // Purpur - Config to reverse bubble column flow ++ ? Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, !org.purpurmc.purpur.PurpurConfig.magmaBlockReverseBubbleColumnFlow) // Purpur - Config to reverse bubble column flow + : Blocks.WATER.defaultBlockState(); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch new file mode 100644 index 0000000..d905f39 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/BuddingAmethystBlock.java ++++ b/net/minecraft/world/level/block/BuddingAmethystBlock.java +@@ -43,7 +_,7 @@ + if (block != null) { + BlockState blockState1 = block.defaultBlockState() + .setValue(AmethystClusterBlock.FACING, direction) +- .setValue(AmethystClusterBlock.WATERLOGGED, Boolean.valueOf(blockState.getFluidState().getType() == Fluids.WATER)); ++ .setValue(AmethystClusterBlock.WATERLOGGED, blockState.getFluidState().getType() == Fluids.WATER); + // Paper start - Have Amethyst throw both spread and grow events + if (block == Blocks.SMALL_AMETHYST_BUD) { + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos, blockPos, blockState1, 3); // CraftBukkit diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch new file mode 100644 index 0000000..29f1d80 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/ButtonBlock.java ++++ b/net/minecraft/world/level/block/ButtonBlock.java +@@ -76,7 +_,7 @@ + super(properties.sound(type.soundType())); + this.type = type; + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(FACE, AttachFace.WALL) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(FACE, AttachFace.WALL) + ); + this.ticksToStayPressed = ticksToStayPressed; + } +@@ -142,7 +_,7 @@ + } + + public void press(BlockState state, Level level, BlockPos pos, @Nullable Player player) { +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(POWERED, true), 3); + this.updateNeighbours(state, level, pos); + level.scheduleTick(pos, this, this.ticksToStayPressed); + this.playSound(player, level, pos, true); +@@ -229,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(flag)), 3); ++ level.setBlock(pos, state.setValue(POWERED, flag), 3); + this.updateNeighbours(state, level, pos); + this.playSound(null, level, pos, flag); + level.gameEvent(abstractArrow, flag ? GameEvent.BLOCK_ACTIVATE : GameEvent.BLOCK_DEACTIVATE, pos); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch new file mode 100644 index 0000000..7acbef8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/world/level/block/CactusBlock.java ++++ b/net/minecraft/world/level/block/CactusBlock.java +@@ -36,7 +_,7 @@ + + protected CactusBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -62,11 +_,11 @@ + int modifier = level.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution + if (ageValue >= 15 || (modifier != 100 && random.nextFloat() < (modifier / (100.0f * 16)))) { // Spigot - SPIGOT-7159: Better modifier + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, blockPos, this.defaultBlockState()); // CraftBukkit +- BlockState blockState = state.setValue(AGE, Integer.valueOf(0)); ++ BlockState blockState = state.setValue(AGE, 0); + level.setBlock(pos, blockState, 4); + level.neighborChanged(blockState, blockPos, this, null, false); + } else if (modifier == 100 || random.nextFloat() < (modifier / (100.0f * 16))) { // Spigot - SPIGOT-7159: Better modifier resolution +- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 4); ++ level.setBlock(pos, state.setValue(AGE, ageValue + 1), 4); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch new file mode 100644 index 0000000..3bbaf1b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/CakeBlock.java ++++ b/net/minecraft/world/level/block/CakeBlock.java +@@ -53,7 +_,7 @@ + + protected CakeBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(BITES, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(BITES, 0)); + } + + @Override +@@ -128,7 +_,7 @@ + // Paper - move up + level.gameEvent(player, GameEvent.EAT, pos); + if (bitesValue < 6) { +- level.setBlock(pos, state.setValue(BITES, Integer.valueOf(bitesValue + 1)), 3); ++ level.setBlock(pos, state.setValue(BITES, bitesValue + 1), 3); + } else { + level.removeBlock(pos, false); + level.gameEvent(player, GameEvent.BLOCK_DESTROY, pos); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch new file mode 100644 index 0000000..f4589d5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch @@ -0,0 +1,55 @@ +--- a/net/minecraft/world/level/block/CampfireBlock.java ++++ b/net/minecraft/world/level/block/CampfireBlock.java +@@ -84,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(LIT, Boolean.valueOf(true)) +- .setValue(SIGNAL_FIRE, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(LIT, true) ++ .setValue(SIGNAL_FIRE, false) ++ .setValue(WATERLOGGED, false) + .setValue(FACING, Direction.NORTH) + ); + } +@@ -139,9 +_,9 @@ + BlockPos clickedPos = context.getClickedPos(); + boolean flag = level.getFluidState(clickedPos).getType() == Fluids.WATER; + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(flag)) +- .setValue(SIGNAL_FIRE, Boolean.valueOf(this.isSmokeSource(level.getBlockState(clickedPos.below())))) +- .setValue(LIT, Boolean.valueOf(level.getMinecraftWorld().purpurConfig.campFireLitWhenPlaced && !flag)) // Purpur - Campfire option for lit when placed ++ .setValue(WATERLOGGED, flag) ++ .setValue(SIGNAL_FIRE, this.isSmokeSource(level.getBlockState(clickedPos.below()))) ++ .setValue(LIT, level.getMinecraftWorld().purpurConfig.campFireLitWhenPlaced && !flag) // Purpur - Campfire option for lit when placed + .setValue(FACING, context.getHorizontalDirection()); + } + +@@ -161,7 +_,7 @@ + } + + return direction == Direction.DOWN +- ? state.setValue(SIGNAL_FIRE, Boolean.valueOf(this.isSmokeSource(neighborState))) ++ ? state.setValue(SIGNAL_FIRE, this.isSmokeSource(neighborState)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + +@@ -227,7 +_,7 @@ + dowse(null, level, pos, state); + } + +- level.setBlock(pos, state.setValue(WATERLOGGED, Boolean.valueOf(true)).setValue(LIT, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(WATERLOGGED, true).setValue(LIT, false), 3); + level.scheduleTick(pos, fluidState.getType(), fluidState.getType().getTickDelay(level)); + return true; + } else { +@@ -248,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(blockPos, state.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)), 11); ++ level.setBlock(blockPos, state.setValue(BlockStateProperties.LIT, true), 11); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleBlock.java.patch new file mode 100644 index 0000000..e2dd6b0 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleBlock.java.patch @@ -0,0 +1,33 @@ +--- a/net/minecraft/world/level/block/CandleBlock.java ++++ b/net/minecraft/world/level/block/CandleBlock.java +@@ -67,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(CANDLES, Integer.valueOf(1)) +- .setValue(LIT, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(CANDLES, 1) ++ .setValue(LIT, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -99,7 +_,7 @@ + } else { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, flag); + } + } + +@@ -149,7 +_,7 @@ + @Override + public boolean placeLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) { + if (!state.getValue(WATERLOGGED) && fluidState.getType() == Fluids.WATER) { +- BlockState blockState = state.setValue(WATERLOGGED, Boolean.valueOf(true)); ++ BlockState blockState = state.setValue(WATERLOGGED, true); + if (state.getValue(LIT)) { + extinguish(null, blockState, level, pos); + } else { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleCakeBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleCakeBlock.java.patch new file mode 100644 index 0000000..11a66fb --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CandleCakeBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CandleCakeBlock.java ++++ b/net/minecraft/world/level/block/CandleCakeBlock.java +@@ -53,7 +_,7 @@ + + protected CandleCakeBlock(Block candleBlock, BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(LIT, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false)); + if (candleBlock instanceof CandleBlock candleBlock1) { + BY_CANDLE.put(candleBlock1, this); + this.candleBlock = candleBlock1; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVines.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVines.java.patch new file mode 100644 index 0000000..84bf902 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVines.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CaveVines.java ++++ b/net/minecraft/world/level/block/CaveVines.java +@@ -42,7 +_,7 @@ + // CraftBukkit end + float f = Mth.randomBetween(level.random, 0.8F, 1.2F); + level.playSound(null, pos, SoundEvents.CAVE_VINES_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, f); +- BlockState blockState = state.setValue(BERRIES, Boolean.valueOf(false)); ++ BlockState blockState = state.setValue(BERRIES, false); + level.setBlock(pos, blockState, 2); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(entity, blockState)); + return InteractionResult.SUCCESS; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch new file mode 100644 index 0000000..52974fa --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/CaveVinesBlock.java ++++ b/net/minecraft/world/level/block/CaveVinesBlock.java +@@ -27,7 +_,7 @@ + + public CaveVinesBlock(BlockBehaviour.Properties properties) { + super(properties, Direction.DOWN, SHAPE, false, 0.1); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0)).setValue(BERRIES, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0).setValue(BERRIES, false)); + } + + @Override +@@ -90,7 +_,7 @@ + + @Override + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { +- level.setBlock(pos, state.setValue(BERRIES, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(BERRIES, true), 2); + } + + // Purpur start - cave vines configurable max growth age diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesPlantBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesPlantBlock.java.patch new file mode 100644 index 0000000..fa0c8cf --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CaveVinesPlantBlock.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/block/CaveVinesPlantBlock.java ++++ b/net/minecraft/world/level/block/CaveVinesPlantBlock.java +@@ -26,7 +_,7 @@ + + public CaveVinesPlantBlock(BlockBehaviour.Properties properties) { + super(properties, Direction.DOWN, SHAPE, false); +- this.registerDefaultState(this.stateDefinition.any().setValue(BERRIES, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(BERRIES, false)); + } + + @Override +@@ -66,6 +_,6 @@ + + @Override + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { +- level.setBlock(pos, state.setValue(BERRIES, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(BERRIES, true), 2); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch new file mode 100644 index 0000000..70af517 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/world/level/block/CeilingHangingSignBlock.java ++++ b/net/minecraft/world/level/block/CeilingHangingSignBlock.java +@@ -72,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(ROTATION, Integer.valueOf(0)) +- .setValue(ATTACHED, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(ROTATION, 0) ++ .setValue(ATTACHED, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -124,9 +_,9 @@ + + int i = !flag ? RotationSegment.convertToSegment(direction.getOpposite()) : RotationSegment.convertToSegment(context.getRotation() + 180.0F); + return this.defaultBlockState() +- .setValue(ATTACHED, Boolean.valueOf(flag)) +- .setValue(ROTATION, Integer.valueOf(i)) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(ATTACHED, flag) ++ .setValue(ROTATION, i) ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override +@@ -163,12 +_,12 @@ + + @Override + protected BlockState rotate(BlockState state, Rotation rotation) { +- return state.setValue(ROTATION, Integer.valueOf(rotation.rotate(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, rotation.rotate(state.getValue(ROTATION), 16)); + } + + @Override + protected BlockState mirror(BlockState state, Mirror mirror) { +- return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, mirror.mirror(state.getValue(ROTATION), 16)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChainBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChainBlock.java.patch new file mode 100644 index 0000000..4ceb5c2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChainBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/ChainBlock.java ++++ b/net/minecraft/world/level/block/ChainBlock.java +@@ -36,7 +_,7 @@ + + public ChainBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(AXIS, Direction.Axis.Y)); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false).setValue(AXIS, Direction.Axis.Y)); + } + + @Override +@@ -57,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, flag); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch new file mode 100644 index 0000000..6738357 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/ChestBlock.java ++++ b/net/minecraft/world/level/block/ChestBlock.java +@@ -156,7 +_,7 @@ + protected ChestBlock(Supplier> blockEntityType, BlockBehaviour.Properties properties) { + super(properties, blockEntityType); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TYPE, ChestType.SINGLE).setValue(WATERLOGGED, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TYPE, ChestType.SINGLE).setValue(WATERLOGGED, false) + ); + } + +@@ -249,7 +_,7 @@ + return this.defaultBlockState() + .setValue(FACING, opposite) + .setValue(TYPE, chestType) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChiseledBookShelfBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChiseledBookShelfBlock.java.patch new file mode 100644 index 0000000..cbb97c4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChiseledBookShelfBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java ++++ b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +@@ -55,7 +_,7 @@ + BlockState blockState = this.stateDefinition.any().setValue(HorizontalDirectionalBlock.FACING, Direction.NORTH); + + for (BooleanProperty booleanProperty : SLOT_OCCUPIED_PROPERTIES) { +- blockState = blockState.setValue(booleanProperty, Boolean.valueOf(false)); ++ blockState = blockState.setValue(booleanProperty, false); + } + + this.registerDefaultState(blockState); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch new file mode 100644 index 0000000..b60f609 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch @@ -0,0 +1,52 @@ +--- a/net/minecraft/world/level/block/ChorusFlowerBlock.java ++++ b/net/minecraft/world/level/block/ChorusFlowerBlock.java +@@ -42,7 +_,7 @@ + protected ChorusFlowerBlock(Block plant, BlockBehaviour.Properties properties) { + super(properties); + this.plant = plant; +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -125,14 +_,14 @@ + level.setBlock(pos, ChorusPlantBlock.getStateWithConnections(level, pos, this.plant.defaultBlockState()), 2); + } else { + // CraftBukkit start - add event +- if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(5)), 2)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, 5), 2)) { + this.placeDeadFlower(level, pos); + } + // CraftBukkit end + } + } else { + // CraftBukkit start - add event +- if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(5)), 2)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, 5), 2)) { + this.placeDeadFlower(level, pos); + } + // CraftBukkit end +@@ -142,12 +_,12 @@ + } + + private void placeGrownFlower(Level level, BlockPos pos, int age) { +- level.setBlock(pos, this.defaultBlockState().setValue(AGE, Integer.valueOf(age)), 2); ++ level.setBlock(pos, this.defaultBlockState().setValue(AGE, age), 2); + level.levelEvent(1033, pos, 0); + } + + private void placeDeadFlower(Level level, BlockPos pos) { +- level.setBlock(pos, this.defaultBlockState().setValue(AGE, Integer.valueOf(5)), 2); ++ level.setBlock(pos, this.defaultBlockState().setValue(AGE, 5), 2); + level.levelEvent(1034, pos, 0); + } + +@@ -265,7 +_,7 @@ + } + + if (!flag) { +- level.setBlock(branchPos.above(i), Blocks.CHORUS_FLOWER.defaultBlockState().setValue(AGE, Integer.valueOf(5)), 2); ++ level.setBlock(branchPos.above(i), Blocks.CHORUS_FLOWER.defaultBlockState().setValue(AGE, 5), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusPlantBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusPlantBlock.java.patch new file mode 100644 index 0000000..edc11cd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ChorusPlantBlock.java.patch @@ -0,0 +1,49 @@ +--- a/net/minecraft/world/level/block/ChorusPlantBlock.java ++++ b/net/minecraft/world/level/block/ChorusPlantBlock.java +@@ -27,12 +_,12 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) +- .setValue(UP, Boolean.valueOf(false)) +- .setValue(DOWN, Boolean.valueOf(false)) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) ++ .setValue(UP, false) ++ .setValue(DOWN, false) + ); + } + +@@ -50,12 +_,12 @@ + BlockState blockState4 = level.getBlockState(pos.south()); + BlockState blockState5 = level.getBlockState(pos.west()); + Block block = state.getBlock(); +- return state.trySetValue(DOWN, Boolean.valueOf(blockState.is(block) || blockState.is(Blocks.CHORUS_FLOWER) || blockState.is(Blocks.END_STONE))) +- .trySetValue(UP, Boolean.valueOf(blockState1.is(block) || blockState1.is(Blocks.CHORUS_FLOWER))) +- .trySetValue(NORTH, Boolean.valueOf(blockState2.is(block) || blockState2.is(Blocks.CHORUS_FLOWER))) +- .trySetValue(EAST, Boolean.valueOf(blockState3.is(block) || blockState3.is(Blocks.CHORUS_FLOWER))) +- .trySetValue(SOUTH, Boolean.valueOf(blockState4.is(block) || blockState4.is(Blocks.CHORUS_FLOWER))) +- .trySetValue(WEST, Boolean.valueOf(blockState5.is(block) || blockState5.is(Blocks.CHORUS_FLOWER))); ++ return state.trySetValue(DOWN, blockState.is(block) || blockState.is(Blocks.CHORUS_FLOWER) || blockState.is(Blocks.END_STONE)) ++ .trySetValue(UP, blockState1.is(block) || blockState1.is(Blocks.CHORUS_FLOWER)) ++ .trySetValue(NORTH, blockState2.is(block) || blockState2.is(Blocks.CHORUS_FLOWER)) ++ .trySetValue(EAST, blockState3.is(block) || blockState3.is(Blocks.CHORUS_FLOWER)) ++ .trySetValue(SOUTH, blockState4.is(block) || blockState4.is(Blocks.CHORUS_FLOWER)) ++ .trySetValue(WEST, blockState5.is(block) || blockState5.is(Blocks.CHORUS_FLOWER)); + } + + @Override +@@ -77,7 +_,7 @@ + boolean flag = neighborState.is(this) + || neighborState.is(Blocks.CHORUS_FLOWER) + || direction == Direction.DOWN && neighborState.is(Blocks.END_STONE); +- return state.setValue(PROPERTY_BY_DIRECTION.get(direction), Boolean.valueOf(flag)); ++ return state.setValue(PROPERTY_BY_DIRECTION.get(direction), flag); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch new file mode 100644 index 0000000..b3bf83a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CocoaBlock.java ++++ b/net/minecraft/world/level/block/CocoaBlock.java +@@ -54,7 +_,7 @@ + + public CocoaBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(AGE, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch new file mode 100644 index 0000000..f4ca0a2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CommandBlock.java ++++ b/net/minecraft/world/level/block/CommandBlock.java +@@ -48,7 +_,7 @@ + + public CommandBlock(boolean automatic, BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(CONDITIONAL, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(CONDITIONAL, false)); + this.automatic = automatic; + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch new file mode 100644 index 0000000..6b4f5b8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/world/level/block/ComparatorBlock.java ++++ b/net/minecraft/world/level/block/ComparatorBlock.java +@@ -40,7 +_,7 @@ + public ComparatorBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(MODE, ComparatorMode.COMPARE) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(MODE, ComparatorMode.COMPARE) + ); + } + +@@ -175,14 +_,14 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, state.setValue(POWERED, false), 2); + } else if (!poweredValue && shouldTurnOn) { + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(level, pos, 0, 15).getNewCurrent() != 15) { + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(POWERED, true), 2); + } + + this.updateNeighborsInFront(level, pos, state); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch new file mode 100644 index 0000000..facfbed --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/ComposterBlock.java ++++ b/net/minecraft/world/level/block/ComposterBlock.java +@@ -186,7 +_,7 @@ + + public ComposterBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, 0)); + } + + public static void handleFill(Level level, BlockPos pos, boolean success) { +@@ -344,7 +_,7 @@ + } + + static BlockState empty(@Nullable Entity entity, BlockState state, LevelAccessor level, BlockPos pos) { +- BlockState blockState = state.setValue(LEVEL, Integer.valueOf(0)); ++ BlockState blockState = state.setValue(LEVEL, 0); + level.setBlock(pos, blockState, 3); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(entity, blockState)); + return blockState; +@@ -377,7 +_,7 @@ + return state; + } else { + int i = levelValue + 1; +- BlockState blockState = state.setValue(LEVEL, Integer.valueOf(i)); ++ BlockState blockState = state.setValue(LEVEL, i); + // Paper start - move the EntityChangeBlockEvent here to avoid conflict later for the compost events + if (entity != null && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, blockState)) { + return null; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ConduitBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ConduitBlock.java.patch new file mode 100644 index 0000000..86efa9a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ConduitBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/ConduitBlock.java ++++ b/net/minecraft/world/level/block/ConduitBlock.java +@@ -39,7 +_,7 @@ + + public ConduitBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, true)); + } + + @Override +@@ -92,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8)); ++ return this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CopperBulbBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CopperBulbBlock.java.patch new file mode 100644 index 0000000..7dcab21 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CopperBulbBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/CopperBulbBlock.java ++++ b/net/minecraft/world/level/block/CopperBulbBlock.java +@@ -26,7 +_,7 @@ + + public CopperBulbBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.valueOf(false)).setValue(POWERED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(LIT, false).setValue(POWERED, false)); + } + + @Override +@@ -52,7 +_,7 @@ + level.playSound(null, pos, blockState.getValue(LIT) ? SoundEvents.COPPER_BULB_TURN_ON : SoundEvents.COPPER_BULB_TURN_OFF, SoundSource.BLOCKS); + } + +- level.setBlock(pos, blockState.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 3); ++ level.setBlock(pos, blockState.setValue(POWERED, hasNeighborSignal), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch new file mode 100644 index 0000000..7315010 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CoralFanBlock.java ++++ b/net/minecraft/world/level/block/CoralFanBlock.java +@@ -43,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, false), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch new file mode 100644 index 0000000..59c086b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CoralPlantBlock.java ++++ b/net/minecraft/world/level/block/CoralPlantBlock.java +@@ -48,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, false), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch new file mode 100644 index 0000000..b28ca18 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/CoralWallFanBlock.java ++++ b/net/minecraft/world/level/block/CoralWallFanBlock.java +@@ -43,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, state.getValue(FACING)), 2); ++ level.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, false).setValue(FACING, state.getValue(FACING)), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch new file mode 100644 index 0000000..82f35d4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch @@ -0,0 +1,44 @@ +--- a/net/minecraft/world/level/block/CrafterBlock.java ++++ b/net/minecraft/world/level/block/CrafterBlock.java +@@ -56,8 +_,8 @@ + this.stateDefinition + .any() + .setValue(ORIENTATION, FrontAndTop.NORTH_UP) +- .setValue(TRIGGERED, Boolean.valueOf(false)) +- .setValue(CRAFTING, Boolean.valueOf(false)) ++ .setValue(TRIGGERED, false) ++ .setValue(CRAFTING, false) + ); + } + +@@ -83,10 +_,10 @@ + BlockEntity blockEntity = level.getBlockEntity(pos); + if (hasNeighborSignal && !triggeredValue) { + level.scheduleTick(pos, this, 4); +- level.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(TRIGGERED, true), 2); + this.setBlockEntityTriggered(blockEntity, true); + } else if (!hasNeighborSignal && triggeredValue) { +- level.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(false)).setValue(CRAFTING, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, state.setValue(TRIGGERED, false).setValue(CRAFTING, false), 2); + this.setBlockEntityTriggered(blockEntity, false); + } + } +@@ -126,7 +_,7 @@ + }; + return this.defaultBlockState() + .setValue(ORIENTATION, FrontAndTop.fromFrontAndTop(opposite, direction)) +- .setValue(TRIGGERED, Boolean.valueOf(context.getLevel().hasNeighborSignal(context.getClickedPos()))); ++ .setValue(TRIGGERED, context.getLevel().hasNeighborSignal(context.getClickedPos())); + } + + @Override +@@ -171,7 +_,7 @@ + level.levelEvent(1050, pos, 0); + } else { + crafterBlockEntity.setCraftingTicksRemaining(6); +- level.setBlock(pos, state.setValue(CRAFTING, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(CRAFTING, true), 2); + itemStack.onCraftedBySystem(level); + this.dispenseItem(level, pos, crafterBlockEntity, itemStack, state, recipeHolder); + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CreakingHeartBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CreakingHeartBlock.java.patch new file mode 100644 index 0000000..006d9cd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CreakingHeartBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/CreakingHeartBlock.java ++++ b/net/minecraft/world/level/block/CreakingHeartBlock.java +@@ -44,7 +_,7 @@ + protected CreakingHeartBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.defaultBlockState().setValue(AXIS, Direction.Axis.Y).setValue(ACTIVE, Boolean.valueOf(false)).setValue(NATURAL, Boolean.valueOf(false)) ++ this.defaultBlockState().setValue(AXIS, Direction.Axis.Y).setValue(ACTIVE, false).setValue(NATURAL, false) + ); + } + +@@ -96,7 +_,7 @@ + private static BlockState updateState(BlockState state, LevelReader level, BlockPos pos) { + boolean hasRequiredLogs = hasRequiredLogs(state, level, pos); + boolean flag = !state.getValue(ACTIVE); +- return hasRequiredLogs && flag ? state.setValue(ACTIVE, Boolean.valueOf(true)) : state; ++ return hasRequiredLogs && flag ? state.setValue(ACTIVE, true) : state; + } + + public static boolean hasRequiredLogs(BlockState state, LevelReader level, BlockPos pos) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch new file mode 100644 index 0000000..8a5cd02 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/CropBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/CropBlock.java ++++ b/net/minecraft/world/level/block/CropBlock.java +@@ -44,7 +_,7 @@ + + protected CropBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(this.getAgeProperty(), Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(this.getAgeProperty(), 0)); + } + + @Override +@@ -70,7 +_,7 @@ + } + + public BlockState getStateForAge(int age) { +- return this.defaultBlockState().setValue(this.getAgeProperty(), Integer.valueOf(age)); ++ return this.defaultBlockState().setValue(this.getAgeProperty(), age); + } + + public final boolean isMaxAge(BlockState state) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch new file mode 100644 index 0000000..459df15 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/DaylightDetectorBlock.java ++++ b/net/minecraft/world/level/block/DaylightDetectorBlock.java +@@ -38,7 +_,7 @@ + + public DaylightDetectorBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(POWER, Integer.valueOf(0)).setValue(INVERTED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(POWER, 0).setValue(INVERTED, false)); + } + + @Override +@@ -71,7 +_,7 @@ + i = Mth.clamp(i, 0, 15); + if (state.getValue(POWER) != i) { + i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(level, pos, state.getValue(DaylightDetectorBlock.POWER), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent +- level.setBlock(pos, state.setValue(POWER, Integer.valueOf(i)), 3); ++ level.setBlock(pos, state.setValue(POWER, i), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch new file mode 100644 index 0000000..26e7b58 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch @@ -0,0 +1,42 @@ +--- a/net/minecraft/world/level/block/DecoratedPotBlock.java ++++ b/net/minecraft/world/level/block/DecoratedPotBlock.java +@@ -73,8 +_,8 @@ + this.stateDefinition + .any() + .setValue(HORIZONTAL_FACING, Direction.NORTH) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) +- .setValue(CRACKED, Boolean.valueOf(false)) ++ .setValue(WATERLOGGED, false) ++ .setValue(CRACKED, false) + ); + } + +@@ -101,8 +_,8 @@ + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + return this.defaultBlockState() + .setValue(HORIZONTAL_FACING, context.getHorizontalDirection()) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)) +- .setValue(CRACKED, Boolean.valueOf(false)); ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER) ++ .setValue(CRACKED, false); + } + + @Override +@@ -203,7 +_,7 @@ + ItemStack mainHandItem = player.getMainHandItem(); + BlockState blockState = state; + if (mainHandItem.is(ItemTags.BREAKS_DECORATED_POTS) && !EnchantmentHelper.hasTag(mainHandItem, EnchantmentTags.PREVENTS_DECORATED_POT_SHATTERING)) { +- blockState = state.setValue(CRACKED, Boolean.valueOf(true)); ++ blockState = state.setValue(CRACKED, true); + level.setBlock(pos, blockState, 4); + } + +@@ -242,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(blockPos, state.setValue(CRACKED, Boolean.valueOf(true)), 4); ++ level.setBlock(blockPos, state.setValue(CRACKED, true), 4); + level.destroyBlock(blockPos, true, projectile); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch new file mode 100644 index 0000000..268acfa --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch @@ -0,0 +1,32 @@ +--- a/net/minecraft/world/level/block/DetectorRailBlock.java ++++ b/net/minecraft/world/level/block/DetectorRailBlock.java +@@ -41,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(POWERED, Boolean.valueOf(false)) ++ .setValue(POWERED, false) + .setValue(SHAPE, RailShape.NORTH_SOUTH) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -104,7 +_,7 @@ + } + // CraftBukkit end + if (flag && !poweredValue) { +- BlockState blockState = state.setValue(POWERED, Boolean.valueOf(true)); ++ BlockState blockState = state.setValue(POWERED, true); + level.setBlock(pos, blockState, 3); + this.updatePowerToConnected(level, pos, blockState, true); + level.updateNeighborsAt(pos, this); +@@ -113,7 +_,7 @@ + } + + if (!flag && poweredValue) { +- BlockState blockState = state.setValue(POWERED, Boolean.valueOf(false)); ++ BlockState blockState = state.setValue(POWERED, false); + level.setBlock(pos, blockState, 3); + this.updatePowerToConnected(level, pos, blockState, false); + level.updateNeighborsAt(pos, this); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch new file mode 100644 index 0000000..1957383 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/block/DiodeBlock.java ++++ b/net/minecraft/world/level/block/DiodeBlock.java +@@ -61,14 +_,14 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, state.setValue(POWERED, false), 2); + } else if (!poweredValue) { + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(level, pos, 0, 15).getNewCurrent() != 15) { + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(POWERED, true), 2); + if (!shouldTurnOn) { + level.scheduleTick(pos, this, this.getDelay(state), TickPriority.VERY_HIGH); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch new file mode 100644 index 0000000..69b28b1 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/level/block/DispenserBlock.java ++++ b/net/minecraft/world/level/block/DispenserBlock.java +@@ -67,7 +_,7 @@ + + protected DispenserBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TRIGGERED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TRIGGERED, false)); + } + + @Override +@@ -127,9 +_,9 @@ + boolean triggeredValue = state.getValue(TRIGGERED); + if (flag && !triggeredValue) { + level.scheduleTick(pos, this, 4); +- level.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(TRIGGERED, true), 2); + } else if (!flag && triggeredValue) { +- level.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, state.setValue(TRIGGERED, false), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch new file mode 100644 index 0000000..a21649a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/world/level/block/DoorBlock.java ++++ b/net/minecraft/world/level/block/DoorBlock.java +@@ -66,9 +_,9 @@ + this.stateDefinition + .any() + .setValue(FACING, Direction.NORTH) +- .setValue(OPEN, Boolean.valueOf(false)) ++ .setValue(OPEN, false) + .setValue(HINGE, DoorHingeSide.LEFT) +- .setValue(POWERED, Boolean.valueOf(false)) ++ .setValue(POWERED, false) + .setValue(HALF, DoubleBlockHalf.LOWER) + ); + } +@@ -150,8 +_,8 @@ + return this.defaultBlockState() + .setValue(FACING, context.getHorizontalDirection()) + .setValue(HINGE, this.getHinge(context)) +- .setValue(POWERED, Boolean.valueOf(flag)) +- .setValue(OPEN, Boolean.valueOf(flag)) ++ .setValue(POWERED, flag) ++ .setValue(OPEN, flag) + .setValue(HALF, DoubleBlockHalf.LOWER); + } else { + return null; +@@ -222,7 +_,7 @@ + + public void setOpen(@Nullable Entity entity, Level level, BlockState state, BlockPos pos, boolean _open) { + if (state.is(this) && state.getValue(OPEN) != _open) { +- level.setBlock(pos, state.setValue(OPEN, Boolean.valueOf(_open)), 10); ++ level.setBlock(pos, state.setValue(OPEN, _open), 10); + this.playSound(entity, level, pos, _open); + level.gameEvent(entity, _open ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); + } +@@ -251,7 +_,7 @@ + level.gameEvent(null, flag ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); + } + +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(flag)).setValue(OPEN, Boolean.valueOf(flag)), 2); ++ level.setBlock(pos, state.setValue(POWERED, flag).setValue(OPEN, flag), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch new file mode 100644 index 0000000..e5e1879 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/DoublePlantBlock.java ++++ b/net/minecraft/world/level/block/DoublePlantBlock.java +@@ -94,7 +_,7 @@ + + public static BlockState copyWaterloggedFrom(LevelReader level, BlockPos pos, BlockState state) { + return state.hasProperty(BlockStateProperties.WATERLOGGED) +- ? state.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(level.isWaterAt(pos))) ++ ? state.setValue(BlockStateProperties.WATERLOGGED, level.isWaterAt(pos)) + : state; + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EndPortalFrameBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EndPortalFrameBlock.java.patch new file mode 100644 index 0000000..b55c8bd --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EndPortalFrameBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/EndPortalFrameBlock.java ++++ b/net/minecraft/world/level/block/EndPortalFrameBlock.java +@@ -38,7 +_,7 @@ + + public EndPortalFrameBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(HAS_EYE, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(HAS_EYE, false)); + } + + @Override +@@ -53,7 +_,7 @@ + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()).setValue(HAS_EYE, Boolean.valueOf(false)); ++ return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()).setValue(HAS_EYE, false); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EnderChestBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EnderChestBlock.java.patch new file mode 100644 index 0000000..7b396e8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/EnderChestBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/EnderChestBlock.java ++++ b/net/minecraft/world/level/block/EnderChestBlock.java +@@ -52,7 +_,7 @@ + + protected EnderChestBlock(BlockBehaviour.Properties properties) { + super(properties, () -> BlockEntityType.ENDER_CHEST); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false)); + } + + @Override +@@ -70,7 +_,7 @@ + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + return this.defaultBlockState() + .setValue(FACING, context.getHorizontalDirection().getOpposite()) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch new file mode 100644 index 0000000..f9641ed --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/FarmBlock.java ++++ b/net/minecraft/world/level/block/FarmBlock.java +@@ -41,7 +_,7 @@ + + protected FarmBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(MOISTURE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(MOISTURE, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceBlock.java.patch new file mode 100644 index 0000000..801db0b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceBlock.java.patch @@ -0,0 +1,47 @@ +--- a/net/minecraft/world/level/block/FenceBlock.java ++++ b/net/minecraft/world/level/block/FenceBlock.java +@@ -37,11 +_,11 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) ++ .setValue(WATERLOGGED, false) + ); + this.occlusionByIndex = this.makeShapes(2.0F, 1.0F, 16.0F, 6.0F, 15.0F); + } +@@ -91,11 +_,11 @@ + BlockState blockState2 = level.getBlockState(blockPos2); + BlockState blockState3 = level.getBlockState(blockPos3); + return super.getStateForPlacement(context) +- .setValue(NORTH, Boolean.valueOf(this.connectsTo(blockState, blockState.isFaceSturdy(level, blockPos, Direction.SOUTH), Direction.SOUTH))) +- .setValue(EAST, Boolean.valueOf(this.connectsTo(blockState1, blockState1.isFaceSturdy(level, blockPos1, Direction.WEST), Direction.WEST))) +- .setValue(SOUTH, Boolean.valueOf(this.connectsTo(blockState2, blockState2.isFaceSturdy(level, blockPos2, Direction.NORTH), Direction.NORTH))) +- .setValue(WEST, Boolean.valueOf(this.connectsTo(blockState3, blockState3.isFaceSturdy(level, blockPos3, Direction.EAST), Direction.EAST))) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(NORTH, this.connectsTo(blockState, blockState.isFaceSturdy(level, blockPos, Direction.SOUTH), Direction.SOUTH)) ++ .setValue(EAST, this.connectsTo(blockState1, blockState1.isFaceSturdy(level, blockPos1, Direction.WEST), Direction.WEST)) ++ .setValue(SOUTH, this.connectsTo(blockState2, blockState2.isFaceSturdy(level, blockPos2, Direction.NORTH), Direction.NORTH)) ++ .setValue(WEST, this.connectsTo(blockState3, blockState3.isFaceSturdy(level, blockPos3, Direction.EAST), Direction.EAST)) ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override +@@ -116,9 +_,7 @@ + return direction.getAxis().isHorizontal() + ? state.setValue( + PROPERTY_BY_DIRECTION.get(direction), +- Boolean.valueOf( +- this.connectsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite()), direction.getOpposite()) +- ) ++ this.connectsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite()), direction.getOpposite()) + ) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch new file mode 100644 index 0000000..f56e92e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch @@ -0,0 +1,73 @@ +--- a/net/minecraft/world/level/block/FenceGateBlock.java ++++ b/net/minecraft/world/level/block/FenceGateBlock.java +@@ -66,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(OPEN, Boolean.valueOf(false)) +- .setValue(POWERED, Boolean.valueOf(false)) +- .setValue(IN_WALL, Boolean.valueOf(false)) ++ .setValue(OPEN, false) ++ .setValue(POWERED, false) ++ .setValue(IN_WALL, false) + ); + } + +@@ -97,7 +_,7 @@ + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } else { + boolean flag = this.isWall(neighborState) || this.isWall(level.getBlockState(pos.relative(direction.getOpposite()))); +- return state.setValue(IN_WALL, Boolean.valueOf(flag)); ++ return state.setValue(IN_WALL, flag); + } + } + +@@ -153,9 +_,9 @@ + || axis == Direction.Axis.X && (this.isWall(level.getBlockState(clickedPos.north())) || this.isWall(level.getBlockState(clickedPos.south()))); + return this.defaultBlockState() + .setValue(FACING, horizontalDirection) +- .setValue(OPEN, Boolean.valueOf(hasNeighborSignal)) +- .setValue(POWERED, Boolean.valueOf(hasNeighborSignal)) +- .setValue(IN_WALL, Boolean.valueOf(flag)); ++ .setValue(OPEN, hasNeighborSignal) ++ .setValue(POWERED, hasNeighborSignal) ++ .setValue(IN_WALL, flag); + } + + private boolean isWall(BlockState state) { +@@ -165,7 +_,7 @@ + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (state.getValue(OPEN)) { +- state = state.setValue(OPEN, Boolean.valueOf(false)); ++ state = state.setValue(OPEN, false); + level.setBlock(pos, state, 10); + } else { + Direction direction = player.getDirection(); +@@ -173,7 +_,7 @@ + state = state.setValue(FACING, direction); + } + +- state = state.setValue(OPEN, Boolean.valueOf(true)); ++ state = state.setValue(OPEN, true); + level.setBlock(pos, state, 10); + } + +@@ -194,7 +_,7 @@ + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && !state.getValue(POWERED)) { + boolean openValue = state.getValue(OPEN); +- level.setBlockAndUpdate(pos, state.setValue(OPEN, Boolean.valueOf(!openValue))); ++ level.setBlockAndUpdate(pos, state.setValue(OPEN, !openValue)); + level.playSound( + null, + pos, +@@ -225,7 +_,7 @@ + } + // CraftBukkit end + if (state.getValue(POWERED) != hasNeighborSignal) { +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)).setValue(OPEN, Boolean.valueOf(hasNeighborSignal)), 2); ++ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal).setValue(OPEN, hasNeighborSignal), 2); + if (state.getValue(OPEN) != hasNeighborSignal) { + level.playSound( + null, diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FireBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FireBlock.java.patch new file mode 100644 index 0000000..50cec29 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FireBlock.java.patch @@ -0,0 +1,57 @@ +--- a/net/minecraft/world/level/block/FireBlock.java ++++ b/net/minecraft/world/level/block/FireBlock.java +@@ -70,12 +_,12 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(AGE, Integer.valueOf(0)) +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) +- .setValue(UP, Boolean.valueOf(false)) ++ .setValue(AGE, 0) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) ++ .setValue(UP, false) + ); + this.shapesCache = ImmutableMap.copyOf( + this.stateDefinition +@@ -145,7 +_,7 @@ + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +- return this.shapesCache.get(state.setValue(AGE, Integer.valueOf(0))); ++ return this.shapesCache.get(state.setValue(AGE, 0)); + } + + @Override +@@ -162,7 +_,7 @@ + for (Direction direction : Direction.values()) { + BooleanProperty booleanProperty = PROPERTY_BY_DIRECTION.get(direction); + if (booleanProperty != null) { +- blockState1 = blockState1.setValue(booleanProperty, Boolean.valueOf(this.canBurn(level.getBlockState(pos.relative(direction))))); ++ blockState1 = blockState1.setValue(booleanProperty, this.canBurn(level.getBlockState(pos.relative(direction)))); + } + } + +@@ -194,7 +_,7 @@ + } else { + int min = Math.min(15, ageValue + random.nextInt(3) / 2); + if (ageValue != min) { +- state = state.setValue(AGE, Integer.valueOf(min)); ++ state = state.setValue(AGE, min); + level.setBlock(pos, state, 4); + } + +@@ -327,7 +_,7 @@ + + private BlockState getStateWithAge(LevelReader level, BlockPos pos, int age) { + BlockState state = getState(level, pos); +- return state.is(Blocks.FIRE) ? state.setValue(AGE, Integer.valueOf(age)) : state; ++ return state.is(Blocks.FIRE) ? state.setValue(AGE, age) : state; + } + + private boolean isValidFireLocation(BlockGetter level, BlockPos pos) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FrostedIceBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FrostedIceBlock.java.patch new file mode 100644 index 0000000..5c3b0f3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/FrostedIceBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/FrostedIceBlock.java ++++ b/net/minecraft/world/level/block/FrostedIceBlock.java +@@ -32,7 +_,7 @@ + + public FrostedIceBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -63,7 +_,7 @@ + private boolean slightlyMelt(BlockState state, Level level, BlockPos pos) { + int ageValue = state.getValue(AGE); + if (ageValue < 3) { +- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 2); ++ level.setBlock(pos, state.setValue(AGE, ageValue + 1), 2); + return false; + } else { + this.melt(state, level, pos); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch new file mode 100644 index 0000000..3b090b8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java ++++ b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +@@ -26,7 +_,7 @@ + ) { + super(properties, growthDirection, shape, scheduleFluidTicks); + this.growPerTickProbability = growPerTickProbability; +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -34,7 +_,7 @@ + + @Override + public BlockState getStateForPlacement(RandomSource random) { +- return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(getMaxGrowthAge()))); // Purpur - kelp, cave, weeping, and twisting configurable max growth age ++ return this.defaultBlockState().setValue(AGE, random.nextInt(getMaxGrowthAge())); // Purpur - kelp, cave, weeping, and twisting configurable max growth age + } + + @Override +@@ -75,7 +_,7 @@ + } + + public BlockState getMaxAgeState(BlockState state) { +- return state.setValue(AGE, Integer.valueOf(getMaxGrowthAge())); // Purpur - kelp, cave, weeping, and twisting configurable max growth age ++ return state.setValue(AGE, getMaxGrowthAge()); // Purpur - kelp, cave, weeping, and twisting configurable max growth age + } + + public boolean isMaxAge(BlockState state) { +@@ -134,7 +_,7 @@ + int blocksToGrowWhenBonemealed = this.getBlocksToGrowWhenBonemealed(random); + + for (int i = 0; i < blocksToGrowWhenBonemealed && this.canGrowInto(level.getBlockState(blockPos)); i++) { +- level.setBlockAndUpdate(blockPos, state.setValue(AGE, Integer.valueOf(min))); ++ level.setBlockAndUpdate(blockPos, state.setValue(AGE, min)); + blockPos = blockPos.relative(this.growthDirection); + min = Math.min(min + 1, getMaxGrowthAge()); // Purpur - kelp, cave, weeping, and twisting configurable max growth age + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingMossBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingMossBlock.java.patch new file mode 100644 index 0000000..0b45653 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingMossBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/HangingMossBlock.java ++++ b/net/minecraft/world/level/block/HangingMossBlock.java +@@ -34,7 +_,7 @@ + + public HangingMossBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(TIP, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(TIP, true)); + } + + @Override +@@ -83,7 +_,7 @@ + scheduledTickAccess.scheduleTick(pos, this, 1); + } + +- return state.setValue(TIP, Boolean.valueOf(!level.getBlockState(pos.below()).is(this))); ++ return state.setValue(TIP, !level.getBlockState(pos.below()).is(this)); + } + + @Override +@@ -128,7 +_,7 @@ + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { + BlockPos blockPos = this.getTip(level, pos).below(); + if (this.canGrowInto(level.getBlockState(blockPos))) { +- level.setBlockAndUpdate(blockPos, state.setValue(TIP, Boolean.valueOf(true))); ++ level.setBlockAndUpdate(blockPos, state.setValue(TIP, true)); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingRootsBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingRootsBlock.java.patch new file mode 100644 index 0000000..3499aed --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HangingRootsBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/HangingRootsBlock.java ++++ b/net/minecraft/world/level/block/HangingRootsBlock.java +@@ -31,7 +_,7 @@ + + protected HangingRootsBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false)); + } + + @Override +@@ -50,7 +_,7 @@ + BlockState blockState = super.getStateForPlacement(context); + if (blockState != null) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } else { + return null; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HeavyCoreBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HeavyCoreBlock.java.patch new file mode 100644 index 0000000..deba925 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HeavyCoreBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/HeavyCoreBlock.java ++++ b/net/minecraft/world/level/block/HeavyCoreBlock.java +@@ -26,7 +_,7 @@ + + public HeavyCoreBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false)); + } + + @Override +@@ -65,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.is(Fluids.WATER))); ++ return this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(Fluids.WATER)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HopperBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HopperBlock.java.patch new file mode 100644 index 0000000..5001a02 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HopperBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/HopperBlock.java ++++ b/net/minecraft/world/level/block/HopperBlock.java +@@ -58,7 +_,7 @@ + + public HopperBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.DOWN).setValue(ENABLED, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.DOWN).setValue(ENABLED, true)); + } + + @Override +@@ -102,7 +_,7 @@ + Direction opposite = context.getClickedFace().getOpposite(); + return this.defaultBlockState() + .setValue(FACING, opposite.getAxis() == Direction.Axis.Y ? Direction.DOWN : opposite) +- .setValue(ENABLED, Boolean.valueOf(true)); ++ .setValue(ENABLED, true); + } + + @Override +@@ -140,7 +_,7 @@ + private void checkPoweredState(Level level, BlockPos pos, BlockState state) { + boolean flag = !level.hasNeighborSignal(pos); + if (flag != state.getValue(ENABLED)) { +- level.setBlock(pos, state.setValue(ENABLED, Boolean.valueOf(flag)), 2); ++ level.setBlock(pos, state.setValue(ENABLED, flag), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HugeMushroomBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HugeMushroomBlock.java.patch new file mode 100644 index 0000000..01c21d5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/HugeMushroomBlock.java.patch @@ -0,0 +1,49 @@ +--- a/net/minecraft/world/level/block/HugeMushroomBlock.java ++++ b/net/minecraft/world/level/block/HugeMushroomBlock.java +@@ -34,12 +_,12 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(NORTH, Boolean.valueOf(true)) +- .setValue(EAST, Boolean.valueOf(true)) +- .setValue(SOUTH, Boolean.valueOf(true)) +- .setValue(WEST, Boolean.valueOf(true)) +- .setValue(UP, Boolean.valueOf(true)) +- .setValue(DOWN, Boolean.valueOf(true)) ++ .setValue(NORTH, true) ++ .setValue(EAST, true) ++ .setValue(SOUTH, true) ++ .setValue(WEST, true) ++ .setValue(UP, true) ++ .setValue(DOWN, true) + ); + } + +@@ -49,12 +_,12 @@ + BlockGetter level = context.getLevel(); + BlockPos clickedPos = context.getClickedPos(); + return this.defaultBlockState() +- .setValue(DOWN, Boolean.valueOf(!level.getBlockState(clickedPos.below()).is(this))) +- .setValue(UP, Boolean.valueOf(!level.getBlockState(clickedPos.above()).is(this))) +- .setValue(NORTH, Boolean.valueOf(!level.getBlockState(clickedPos.north()).is(this))) +- .setValue(EAST, Boolean.valueOf(!level.getBlockState(clickedPos.east()).is(this))) +- .setValue(SOUTH, Boolean.valueOf(!level.getBlockState(clickedPos.south()).is(this))) +- .setValue(WEST, Boolean.valueOf(!level.getBlockState(clickedPos.west()).is(this))); ++ .setValue(DOWN, !level.getBlockState(clickedPos.below()).is(this)) ++ .setValue(UP, !level.getBlockState(clickedPos.above()).is(this)) ++ .setValue(NORTH, !level.getBlockState(clickedPos.north()).is(this)) ++ .setValue(EAST, !level.getBlockState(clickedPos.east()).is(this)) ++ .setValue(SOUTH, !level.getBlockState(clickedPos.south()).is(this)) ++ .setValue(WEST, !level.getBlockState(clickedPos.west()).is(this)); + } + + @Override +@@ -70,7 +_,7 @@ + ) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableMushroomBlockUpdates) return state; // Paper - add option to disable block updates + return neighborState.is(this) +- ? state.setValue(PROPERTY_BY_DIRECTION.get(direction), Boolean.valueOf(false)) ++ ? state.setValue(PROPERTY_BY_DIRECTION.get(direction), false) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/IronBarsBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/IronBarsBlock.java.patch new file mode 100644 index 0000000..17addd4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/IronBarsBlock.java.patch @@ -0,0 +1,45 @@ +--- a/net/minecraft/world/level/block/IronBarsBlock.java ++++ b/net/minecraft/world/level/block/IronBarsBlock.java +@@ -31,11 +_,11 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -53,11 +_,11 @@ + BlockState blockState2 = level.getBlockState(blockPos2); + BlockState blockState3 = level.getBlockState(blockPos3); + return this.defaultBlockState() +- .setValue(NORTH, Boolean.valueOf(this.attachsTo(blockState, blockState.isFaceSturdy(level, blockPos, Direction.SOUTH)))) +- .setValue(SOUTH, Boolean.valueOf(this.attachsTo(blockState1, blockState1.isFaceSturdy(level, blockPos1, Direction.NORTH)))) +- .setValue(WEST, Boolean.valueOf(this.attachsTo(blockState2, blockState2.isFaceSturdy(level, blockPos2, Direction.EAST)))) +- .setValue(EAST, Boolean.valueOf(this.attachsTo(blockState3, blockState3.isFaceSturdy(level, blockPos3, Direction.WEST)))) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(NORTH, this.attachsTo(blockState, blockState.isFaceSturdy(level, blockPos, Direction.SOUTH))) ++ .setValue(SOUTH, this.attachsTo(blockState1, blockState1.isFaceSturdy(level, blockPos1, Direction.NORTH))) ++ .setValue(WEST, this.attachsTo(blockState2, blockState2.isFaceSturdy(level, blockPos2, Direction.EAST))) ++ .setValue(EAST, this.attachsTo(blockState3, blockState3.isFaceSturdy(level, blockPos3, Direction.WEST))) ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override +@@ -78,7 +_,7 @@ + return direction.getAxis().isHorizontal() + ? state.setValue( + PROPERTY_BY_DIRECTION.get(direction), +- Boolean.valueOf(this.attachsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite()))) ++ this.attachsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite())) + ) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/JukeboxBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/JukeboxBlock.java.patch new file mode 100644 index 0000000..a35a292 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/JukeboxBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/JukeboxBlock.java ++++ b/net/minecraft/world/level/block/JukeboxBlock.java +@@ -36,7 +_,7 @@ + + protected JukeboxBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(HAS_RECORD, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(HAS_RECORD, false)); + } + + @Override +@@ -44,7 +_,7 @@ + super.setPlacedBy(level, pos, state, placer, stack); + CustomData customData = stack.getOrDefault(DataComponents.BLOCK_ENTITY_DATA, CustomData.EMPTY); + if (customData.contains("RecordItem")) { +- level.setBlock(pos, state.setValue(HAS_RECORD, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(HAS_RECORD, true), 2); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LadderBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LadderBlock.java.patch new file mode 100644 index 0000000..525e3f3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LadderBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/LadderBlock.java ++++ b/net/minecraft/world/level/block/LadderBlock.java +@@ -37,7 +_,7 @@ + + protected LadderBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false)); + } + + @Override +@@ -107,7 +_,7 @@ + if (direction.getAxis().isHorizontal()) { + blockState = blockState.setValue(FACING, direction.getOpposite()); + if (blockState.canSurvive(level, clickedPos)) { +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LanternBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LanternBlock.java.patch new file mode 100644 index 0000000..fd41b9a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LanternBlock.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/level/block/LanternBlock.java ++++ b/net/minecraft/world/level/block/LanternBlock.java +@@ -35,7 +_,7 @@ + + public LanternBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(HANGING, Boolean.valueOf(false)).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(HANGING, false).setValue(WATERLOGGED, false)); + } + + @Nullable +@@ -45,9 +_,9 @@ + + for (Direction direction : context.getNearestLookingDirections()) { + if (direction.getAxis() == Direction.Axis.Y) { +- BlockState blockState = this.defaultBlockState().setValue(HANGING, Boolean.valueOf(direction == Direction.UP)); ++ BlockState blockState = this.defaultBlockState().setValue(HANGING, direction == Direction.UP); + if (blockState.canSurvive(context.getLevel(), context.getClickedPos())) { +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch new file mode 100644 index 0000000..9537cf3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/LayeredCauldronBlock.java ++++ b/net/minecraft/world/level/block/LayeredCauldronBlock.java +@@ -41,7 +_,7 @@ + public LayeredCauldronBlock(Biome.Precipitation precipitationType, CauldronInteraction.InteractionMap interactions, BlockBehaviour.Properties properties) { + super(properties, interactions); + this.precipitationType = precipitationType; +- this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(1))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, 1)); + } + + @Override +@@ -56,7 +_,7 @@ + + @Override + protected double getContentHeight(BlockState state) { +- return (6.0 + state.getValue(LEVEL).intValue() * 3.0) / 16.0; ++ return (6.0 + state.getValue(LEVEL) * 3.0) / 16.0; + } + + @Override +@@ -139,7 +_,7 @@ + @Override + protected void receiveStalactiteDrip(BlockState state, Level level, BlockPos pos, Fluid fluid) { + if (!this.isFull(state)) { +- BlockState blockState = state.setValue(LEVEL, Integer.valueOf(state.getValue(LEVEL) + 1)); ++ BlockState blockState = state.setValue(LEVEL, state.getValue(LEVEL) + 1); + // CraftBukkit start + if (!LayeredCauldronBlock.changeLevel(level, pos, blockState, null, org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) { + return; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch new file mode 100644 index 0000000..f5b3cf9 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/level/block/LeavesBlock.java ++++ b/net/minecraft/world/level/block/LeavesBlock.java +@@ -44,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(DISTANCE, Integer.valueOf(7)) +- .setValue(PERSISTENT, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(DISTANCE, 7) ++ .setValue(PERSISTENT, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -125,7 +_,7 @@ + } + } + +- return state.setValue(DISTANCE, Integer.valueOf(i)); ++ return state.setValue(DISTANCE, i); + } + + private static int getDistanceAt(BlockState neighbor) { +@@ -167,8 +_,8 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + BlockState blockState = this.defaultBlockState() +- .setValue(PERSISTENT, Boolean.valueOf(true)) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(PERSISTENT, true) ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + return updateDistance(blockState, context.getLevel(), context.getClickedPos()); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch new file mode 100644 index 0000000..e98e436 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/level/block/LecternBlock.java ++++ b/net/minecraft/world/level/block/LecternBlock.java +@@ -84,7 +_,7 @@ + protected LecternBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(HAS_BOOK, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(HAS_BOOK, false) + ); + } + +@@ -111,7 +_,7 @@ + } + } + +- return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()).setValue(HAS_BOOK, Boolean.valueOf(flag)); ++ return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()).setValue(HAS_BOOK, flag); // Plazma - Remove unnecessary type casting + } + + @Override +@@ -193,7 +_,7 @@ + } + + public static void resetBookState(@Nullable Entity entity, Level level, BlockPos pos, BlockState state, boolean hasBook) { +- BlockState blockState = state.setValue(POWERED, Boolean.valueOf(false)).setValue(HAS_BOOK, Boolean.valueOf(hasBook)); ++ BlockState blockState = state.setValue(POWERED, false).setValue(HAS_BOOK, hasBook); + level.setBlock(pos, blockState, 3); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(entity, blockState)); + updateBelow(level, pos, state); +@@ -216,7 +_,7 @@ + } + } + // Paper end - Call BlockRedstoneEvent properly +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(powered)), 3); ++ level.setBlock(pos, state.setValue(POWERED, powered), 3); + updateBelow(level, pos, state); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch new file mode 100644 index 0000000..8c2e4c0 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/LeverBlock.java ++++ b/net/minecraft/world/level/block/LeverBlock.java +@@ -53,7 +_,7 @@ + protected LeverBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(FACE, AttachFace.WALL) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(FACE, AttachFace.WALL) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightBlock.java.patch new file mode 100644 index 0000000..c551de5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/LightBlock.java ++++ b/net/minecraft/world/level/block/LightBlock.java +@@ -42,7 +_,7 @@ + + public LightBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(15)).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, 15).setValue(WATERLOGGED, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch new file mode 100644 index 0000000..9710fac --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch @@ -0,0 +1,47 @@ +--- a/net/minecraft/world/level/block/LightningRodBlock.java ++++ b/net/minecraft/world/level/block/LightningRodBlock.java +@@ -39,7 +_,7 @@ + public LightningRodBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.UP).setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(POWERED, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.UP).setValue(WATERLOGGED, false).setValue(POWERED, false) + ); + } + +@@ -47,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return this.defaultBlockState().setValue(FACING, context.getClickedFace()).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return this.defaultBlockState().setValue(FACING, context.getClickedFace()).setValue(WATERLOGGED, flag); + } + + @Override +@@ -96,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(POWERED, true), 3); + this.updateNeighbours(state, level, pos); + level.scheduleTick(pos, this, 8); + level.levelEvent(3002, pos, state.getValue(FACING).getAxis().ordinal()); +@@ -109,7 +_,7 @@ + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(POWERED, false), 3); + this.updateNeighbours(state, level, pos); + } + +@@ -137,7 +_,7 @@ + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { + if (!state.is(oldState.getBlock())) { + if (state.getValue(POWERED) && !level.getBlockTicks().hasScheduledTick(pos, this)) { +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 18); ++ level.setBlock(pos, state.setValue(POWERED, false), 18); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch new file mode 100644 index 0000000..e809e4f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/LiquidBlock.java ++++ b/net/minecraft/world/level/block/LiquidBlock.java +@@ -74,7 +_,7 @@ + } + + this.stateCache.add(fluid.getFlowing(8, true)); +- this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangrovePropaguleBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangrovePropaguleBlock.java.patch new file mode 100644 index 0000000..ebd89db --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangrovePropaguleBlock.java.patch @@ -0,0 +1,34 @@ +--- a/net/minecraft/world/level/block/MangrovePropaguleBlock.java ++++ b/net/minecraft/world/level/block/MangrovePropaguleBlock.java +@@ -52,10 +_,10 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(STAGE, Integer.valueOf(0)) +- .setValue(AGE, Integer.valueOf(0)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) +- .setValue(HANGING, Boolean.valueOf(false)) ++ .setValue(STAGE, 0) ++ .setValue(AGE, 0) ++ .setValue(WATERLOGGED, false) ++ .setValue(HANGING, false) + ); + } + +@@ -74,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(flag)).setValue(AGE, Integer.valueOf(4)); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, flag).setValue(AGE, 4); + } + + @Override +@@ -165,6 +_,6 @@ + } + + public static BlockState createNewHangingPropagule(int age) { +- return Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(HANGING, Boolean.valueOf(true)).setValue(AGE, Integer.valueOf(age)); ++ return Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(HANGING, true).setValue(AGE, age); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangroveRootsBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangroveRootsBlock.java.patch new file mode 100644 index 0000000..a4bd4d9 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MangroveRootsBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/MangroveRootsBlock.java ++++ b/net/minecraft/world/level/block/MangroveRootsBlock.java +@@ -27,7 +_,7 @@ + + protected MangroveRootsBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false)); + } + + @Override +@@ -40,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, flag); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MossyCarpetBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MossyCarpetBlock.java.patch new file mode 100644 index 0000000..6b72c65 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MossyCarpetBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/MossyCarpetBlock.java ++++ b/net/minecraft/world/level/block/MossyCarpetBlock.java +@@ -70,7 +_,7 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(BASE, Boolean.valueOf(true)) ++ .setValue(BASE, true) + .setValue(NORTH, WallSide.NONE) + .setValue(EAST, WallSide.NONE) + .setValue(SOUTH, WallSide.NONE) +@@ -222,7 +_,7 @@ + BlockState blockState = level.getBlockState(blockPos); + boolean isPaleMossCarpet = blockState.is(Blocks.PALE_MOSS_CARPET); + if ((!isPaleMossCarpet || !blockState.getValue(BASE)) && (isPaleMossCarpet || blockState.canBeReplaced())) { +- BlockState blockState1 = Blocks.PALE_MOSS_CARPET.defaultBlockState().setValue(BASE, Boolean.valueOf(false)); ++ BlockState blockState1 = Blocks.PALE_MOSS_CARPET.defaultBlockState().setValue(BASE, false); + BlockState updatedState = getUpdatedState(blockState1, level, pos.above(), true); + + for (Direction direction : Direction.Plane.HORIZONTAL) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MultifaceBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MultifaceBlock.java.patch new file mode 100644 index 0000000..8a608de --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/MultifaceBlock.java.patch @@ -0,0 +1,48 @@ +--- a/net/minecraft/world/level/block/MultifaceBlock.java ++++ b/net/minecraft/world/level/block/MultifaceBlock.java +@@ -210,12 +_,12 @@ + if (currentState.is(this)) { + blockState = currentState; + } else if (currentState.getFluidState().isSourceOfType(Fluids.WATER)) { +- blockState = this.defaultBlockState().setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)); ++ blockState = this.defaultBlockState().setValue(BlockStateProperties.WATERLOGGED, true); + } else { + blockState = this.defaultBlockState(); + } + +- return blockState.setValue(getFaceProperty(lookingDirection), Boolean.valueOf(true)); ++ return blockState.setValue(getFaceProperty(lookingDirection), true); + } + } + +@@ -247,7 +_,7 @@ + + public static boolean hasFace(BlockState state, Direction direction) { + BooleanProperty faceProperty = getFaceProperty(direction); +- return state.getValueOrElse(faceProperty, Boolean.valueOf(false)); ++ return state.getValueOrElse(faceProperty, false); + } + + public static boolean canAttachTo(BlockGetter level, BlockPos pos, Direction direction) { +@@ -262,7 +_,7 @@ + } + + private static BlockState removeFace(BlockState state, BooleanProperty faceProp) { +- BlockState blockState = state.setValue(faceProp, Boolean.valueOf(false)); ++ BlockState blockState = state.setValue(faceProp, false); + return hasAnyFace(blockState) ? blockState : Blocks.AIR.defaultBlockState(); + } + +@@ -271,10 +_,10 @@ + } + + private static BlockState getDefaultMultifaceState(StateDefinition stateDefinition) { +- BlockState blockState = stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)); ++ BlockState blockState = stateDefinition.any().setValue(WATERLOGGED, false); + + for (BooleanProperty booleanProperty : PROPERTY_BY_DIRECTION.values()) { +- blockState = blockState.trySetValue(booleanProperty, Boolean.valueOf(false)); ++ blockState = blockState.trySetValue(booleanProperty, false); + } + + return blockState; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch new file mode 100644 index 0000000..de9aa33 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/NetherWartBlock.java ++++ b/net/minecraft/world/level/block/NetherWartBlock.java +@@ -34,7 +_,7 @@ + + protected NetherWartBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -56,7 +_,7 @@ + protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + int ageValue = state.getValue(AGE); + if (ageValue < 3 && random.nextFloat() < (level.spigotConfig.wartModifier / (100.0f * 10))) { // Spigot - SPIGOT-7159: Better modifier resolution +- state = state.setValue(AGE, Integer.valueOf(ageValue + 1)); ++ state = state.setValue(AGE, ageValue + 1); + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state, 2); // CraftBukkit + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch new file mode 100644 index 0000000..cfb81e7 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/world/level/block/NoteBlock.java ++++ b/net/minecraft/world/level/block/NoteBlock.java +@@ -52,8 +_,8 @@ + this.stateDefinition + .any() + .setValue(INSTRUMENT, NoteBlockInstrument.HARP) +- .setValue(NOTE, Integer.valueOf(0)) +- .setValue(POWERED, Boolean.valueOf(false)) ++ .setValue(NOTE, 0) ++ .setValue(POWERED, false) + ); + } + +@@ -102,7 +_,7 @@ + state = level.getBlockState(pos); // CraftBukkit - SPIGOT-5617: update in case changed in event + } + +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 3); ++ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch new file mode 100644 index 0000000..76317a6 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch @@ -0,0 +1,46 @@ +--- a/net/minecraft/world/level/block/ObserverBlock.java ++++ b/net/minecraft/world/level/block/ObserverBlock.java +@@ -29,7 +_,7 @@ + + public ObserverBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.SOUTH).setValue(POWERED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.SOUTH).setValue(POWERED, false)); + } + + @Override +@@ -55,14 +_,14 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 2); ++ level.setBlock(pos, state.setValue(POWERED, false), 2); + } else { + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(level, pos, 0, 15).getNewCurrent() != 15) { + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, state.setValue(POWERED, true), 2); + level.scheduleTick(pos, this, 2); + } + +@@ -121,7 +_,7 @@ + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { + if (!state.is(oldState.getBlock())) { + if (!level.isClientSide() && state.getValue(POWERED) && !level.getBlockTicks().hasScheduledTick(pos, this)) { +- BlockState blockState = state.setValue(POWERED, Boolean.valueOf(false)); ++ BlockState blockState = state.setValue(POWERED, false); + level.setBlock(pos, blockState, 18); + this.updateNeighborsInFront(level, pos, blockState); + } +@@ -132,7 +_,7 @@ + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + if (!state.is(newState.getBlock())) { + if (!level.isClientSide && state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) { +- this.updateNeighborsInFront(level, pos, state.setValue(POWERED, Boolean.valueOf(false))); ++ this.updateNeighborsInFront(level, pos, state.setValue(POWERED, false)); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PinkPetalsBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PinkPetalsBlock.java.patch new file mode 100644 index 0000000..b6fae87 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PinkPetalsBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/PinkPetalsBlock.java ++++ b/net/minecraft/world/level/block/PinkPetalsBlock.java +@@ -54,7 +_,7 @@ + + protected PinkPetalsBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(AMOUNT, Integer.valueOf(1))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(AMOUNT, 1)); + } + + @Override +@@ -82,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); + return blockState.is(this) +- ? blockState.setValue(AMOUNT, Integer.valueOf(Math.min(4, blockState.getValue(AMOUNT) + 1))) ++ ? blockState.setValue(AMOUNT, Math.min(4, blockState.getValue(AMOUNT) + 1)) + : this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); + } + +@@ -105,7 +_,7 @@ + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { + int amountValue = state.getValue(AMOUNT); + if (amountValue < 4) { +- level.setBlock(pos, state.setValue(AMOUNT, Integer.valueOf(amountValue + 1)), 2); ++ level.setBlock(pos, state.setValue(AMOUNT, amountValue + 1), 2); + } else { + popResource(level, pos, new ItemStack(this)); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PitcherCropBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PitcherCropBlock.java.patch new file mode 100644 index 0000000..7d6f164 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PitcherCropBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/PitcherCropBlock.java ++++ b/net/minecraft/world/level/block/PitcherCropBlock.java +@@ -141,7 +_,7 @@ + private void grow(ServerLevel level, BlockState state, BlockPos pos, int ageIncrement) { + int min = Math.min(state.getValue(AGE) + ageIncrement, 4); + if (this.canGrow(level, pos, state, min)) { +- BlockState blockState = state.setValue(AGE, Integer.valueOf(min)); ++ BlockState blockState = state.setValue(AGE, min); + if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, blockState, 2)) return; // Paper + if (isDouble(min)) { + level.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch new file mode 100644 index 0000000..15ca48c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/PointedDripstoneBlock.java ++++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java +@@ -87,7 +_,7 @@ + .any() + .setValue(TIP_DIRECTION, Direction.UP) + .setValue(THICKNESS, DripstoneThickness.TIP) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -257,7 +_,7 @@ + : this.defaultBlockState() + .setValue(TIP_DIRECTION, direction) + .setValue(THICKNESS, dripstoneThickness) +- .setValue(WATERLOGGED, Boolean.valueOf(level.getFluidState(clickedPos).getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, level.getFluidState(clickedPos).getType() == Fluids.WATER); + } + } + +@@ -395,7 +_,7 @@ + .defaultBlockState() + .setValue(TIP_DIRECTION, direction) + .setValue(THICKNESS, thickness) +- .setValue(WATERLOGGED, Boolean.valueOf(level.getFluidState(pos).getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, level.getFluidState(pos).getType() == Fluids.WATER); + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, pos, blockState, 3); // CraftBukkit + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch new file mode 100644 index 0000000..a3dfdda --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/world/level/block/PoweredRailBlock.java ++++ b/net/minecraft/world/level/block/PoweredRailBlock.java +@@ -28,8 +_,8 @@ + this.stateDefinition + .any() + .setValue(SHAPE, RailShape.NORTH_SOUTH) +- .setValue(POWERED, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(POWERED, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -140,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(flag)), 3); ++ level.setBlock(pos, state.setValue(POWERED, flag), 3); + level.updateNeighborsAt(pos.below(), this); + if (state.getValue(SHAPE).isSlope()) { + level.updateNeighborsAt(pos.above(), this); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch new file mode 100644 index 0000000..f40dc1c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/PressurePlateBlock.java ++++ b/net/minecraft/world/level/block/PressurePlateBlock.java +@@ -28,7 +_,7 @@ + + protected PressurePlateBlock(BlockSetType type, BlockBehaviour.Properties properties) { + super(properties, type); +- this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, false)); + } + + @Override +@@ -38,7 +_,7 @@ + + @Override + protected BlockState setSignalForState(BlockState state, int strength) { +- return state.setValue(POWERED, Boolean.valueOf(strength > 0)); ++ return state.setValue(POWERED, strength > 0); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RailBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RailBlock.java.patch new file mode 100644 index 0000000..6dc1cf3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RailBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/RailBlock.java ++++ b/net/minecraft/world/level/block/RailBlock.java +@@ -22,7 +_,7 @@ + + protected RailBlock(BlockBehaviour.Properties properties) { + super(false, properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(SHAPE, RailShape.NORTH_SOUTH).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(SHAPE, RailShape.NORTH_SOUTH).setValue(WATERLOGGED, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch new file mode 100644 index 0000000..5056ede --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch @@ -0,0 +1,40 @@ +--- a/net/minecraft/world/level/block/RedStoneOreBlock.java ++++ b/net/minecraft/world/level/block/RedStoneOreBlock.java +@@ -32,7 +_,7 @@ + + public RedStoneOreBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(LIT, false)); + } + + @Override +@@ -86,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(LIT, true), 3); + } + } + +@@ -103,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(LIT, false), 3); + } + } + +@@ -131,8 +_,8 @@ + } + + private static void spawnParticles(Level level, BlockPos pos) { +- double d = 0.5625; +- RandomSource randomSource = level.random; ++ //double d = 0.5625; // Plazma - Remove unused variables ++ final RandomSource randomSource = level.random; // Plazma + + for (Direction direction : Direction.values()) { + BlockPos blockPos = pos.relative(direction); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneWireBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneWireBlock.java.patch new file mode 100644 index 0000000..b2e973e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedStoneWireBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/RedStoneWireBlock.java ++++ b/net/minecraft/world/level/block/RedStoneWireBlock.java +@@ -107,7 +_,7 @@ + .setValue(EAST, RedstoneSide.NONE) + .setValue(SOUTH, RedstoneSide.NONE) + .setValue(WEST, RedstoneSide.NONE) +- .setValue(POWER, Integer.valueOf(0)) ++ .setValue(POWER, 0) + ); + this.crossState = this.defaultBlockState() + .setValue(NORTH, RedstoneSide.SIDE) +@@ -139,7 +_,7 @@ + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { +- return SHAPES_CACHE.get(state.setValue(POWER, Integer.valueOf(0))); ++ return SHAPES_CACHE.get(state.setValue(POWER, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch new file mode 100644 index 0000000..8b48ee3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/level/block/RedstoneLampBlock.java ++++ b/net/minecraft/world/level/block/RedstoneLampBlock.java +@@ -24,13 +_,13 @@ + + public RedstoneLampBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(LIT, false)); // Plazma - Remove unnecessary type casting + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return this.defaultBlockState().setValue(LIT, Boolean.valueOf(context.getLevel().hasNeighborSignal(context.getClickedPos()))); ++ return this.defaultBlockState().setValue(LIT, context.getLevel().hasNeighborSignal(context.getClickedPos())); // Plazma - Remove unnecessary type casting + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch new file mode 100644 index 0000000..1f91833 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/level/block/RedstoneTorchBlock.java ++++ b/net/minecraft/world/level/block/RedstoneTorchBlock.java +@@ -37,7 +_,7 @@ + + protected RedstoneTorchBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(LIT, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LIT, true)); + } + + @Override +@@ -85,7 +_,7 @@ + // CraftBukkit start + org.bukkit.plugin.PluginManager manager = level.getCraftServer().getPluginManager(); + org.bukkit.block.Block block = level.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); +- int oldCurrent = ((Boolean) state.getValue(RedstoneTorchBlock.LIT)).booleanValue() ? 15 : 0; ++ int oldCurrent = (Boolean) state.getValue(RedstoneTorchBlock.LIT) ? 15 : 0; + + org.bukkit.event.block.BlockRedstoneEvent event = new org.bukkit.event.block.BlockRedstoneEvent(block, oldCurrent, oldCurrent); + // CraftBukkit end +@@ -100,7 +_,7 @@ + } + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(LIT, false), 3); + if (isToggledTooFrequently(level, pos, true)) { + level.levelEvent(1502, pos, 0); + level.scheduleTick(pos, level.getBlockState(pos).getBlock(), 160); +@@ -116,7 +_,7 @@ + } + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(LIT, true), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneWallTorchBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneWallTorchBlock.java.patch new file mode 100644 index 0000000..025c522 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RedstoneWallTorchBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/RedstoneWallTorchBlock.java ++++ b/net/minecraft/world/level/block/RedstoneWallTorchBlock.java +@@ -33,7 +_,7 @@ + + protected RedstoneWallTorchBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, true)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RepeaterBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RepeaterBlock.java.patch new file mode 100644 index 0000000..792a698 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RepeaterBlock.java.patch @@ -0,0 +1,33 @@ +--- a/net/minecraft/world/level/block/RepeaterBlock.java ++++ b/net/minecraft/world/level/block/RepeaterBlock.java +@@ -35,9 +_,9 @@ + this.stateDefinition + .any() + .setValue(FACING, Direction.NORTH) +- .setValue(DELAY, Integer.valueOf(1)) +- .setValue(LOCKED, Boolean.valueOf(false)) +- .setValue(POWERED, Boolean.valueOf(false)) ++ .setValue(DELAY, 1) ++ .setValue(LOCKED, false) ++ .setValue(POWERED, false) + ); + } + +@@ -59,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState blockState = super.getStateForPlacement(context); +- return blockState.setValue(LOCKED, Boolean.valueOf(this.isLocked(context.getLevel(), context.getClickedPos(), blockState))); ++ return blockState.setValue(LOCKED, this.isLocked(context.getLevel(), context.getClickedPos(), blockState)); + } + + @Override +@@ -77,7 +_,7 @@ + return Blocks.AIR.defaultBlockState(); + } else { + return !level.isClientSide() && direction.getAxis() != state.getValue(FACING).getAxis() +- ? state.setValue(LOCKED, Boolean.valueOf(this.isLocked(level, pos, state))) ++ ? state.setValue(LOCKED, this.isLocked(level, pos, state)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch new file mode 100644 index 0000000..c01d834 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/RespawnAnchorBlock.java ++++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java +@@ -68,7 +_,7 @@ + + public RespawnAnchorBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(CHARGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(CHARGE, 0)); + } + + @Override +@@ -168,7 +_,7 @@ + } + + public static void charge(@Nullable Entity entity, Level level, BlockPos pos, BlockState state) { +- BlockState blockState = state.setValue(CHARGE, Integer.valueOf(state.getValue(CHARGE) + 1)); ++ BlockState blockState = state.setValue(CHARGE, state.getValue(CHARGE) + 1); + level.setBlock(pos, blockState, 3); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(entity, blockState)); + level.playSound(null, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.RESPAWN_ANCHOR_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch new file mode 100644 index 0000000..ed9357b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/SaplingBlock.java ++++ b/net/minecraft/world/level/block/SaplingBlock.java +@@ -36,7 +_,7 @@ + protected SaplingBlock(TreeGrower treeGrower, BlockBehaviour.Properties properties) { + super(properties); + this.treeGrower = treeGrower; +- this.registerDefaultState(this.stateDefinition.any().setValue(STAGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(STAGE, 0)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch new file mode 100644 index 0000000..34383b6 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/level/block/ScaffoldingBlock.java ++++ b/net/minecraft/world/level/block/ScaffoldingBlock.java +@@ -45,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(DISTANCE, Integer.valueOf(7)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) +- .setValue(BOTTOM, Boolean.valueOf(false)) ++ .setValue(DISTANCE, 7) ++ .setValue(WATERLOGGED, false) ++ .setValue(BOTTOM, false) + ); + } + +@@ -81,9 +_,9 @@ + Level level = context.getLevel(); + int distance = getDistance(level, clickedPos); + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(level.getFluidState(clickedPos).getType() == Fluids.WATER)) +- .setValue(DISTANCE, Integer.valueOf(distance)) +- .setValue(BOTTOM, Boolean.valueOf(this.isBottom(level, clickedPos, distance))); ++ .setValue(WATERLOGGED, level.getFluidState(clickedPos).getType() == Fluids.WATER) ++ .setValue(DISTANCE, distance) ++ .setValue(BOTTOM, this.isBottom(level, clickedPos, distance)); + } + + @Override +@@ -118,7 +_,7 @@ + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + int distance = getDistance(level, pos); +- BlockState blockState = state.setValue(DISTANCE, Integer.valueOf(distance)).setValue(BOTTOM, Boolean.valueOf(this.isBottom(level, pos, distance))); ++ BlockState blockState = state.setValue(DISTANCE, distance).setValue(BOTTOM, this.isBottom(level, pos, distance)); + if (blockState.getValue(DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(level, pos, blockState.getFluidState().createLegacyBlock()).isCancelled()) { // CraftBukkit - BlockFadeEvent // Paper - fix wrong block state + if (state.getValue(DISTANCE) == 7) { + FallingBlockEntity.fall(level, pos, blockState); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch new file mode 100644 index 0000000..be8886f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/level/block/SculkBlock.java ++++ b/net/minecraft/world/level/block/SculkBlock.java +@@ -62,13 +_,13 @@ + private BlockState getRandomGrowthState(LevelAccessor level, BlockPos pos, RandomSource random, boolean isWorldGeneration) { + BlockState blockState; + if (random.nextInt(11) == 0) { +- blockState = Blocks.SCULK_SHRIEKER.defaultBlockState().setValue(SculkShriekerBlock.CAN_SUMMON, Boolean.valueOf(isWorldGeneration)); ++ blockState = Blocks.SCULK_SHRIEKER.defaultBlockState().setValue(SculkShriekerBlock.CAN_SUMMON, isWorldGeneration); + } else { + blockState = Blocks.SCULK_SENSOR.defaultBlockState(); + } + + return blockState.hasProperty(BlockStateProperties.WATERLOGGED) && !level.getFluidState(pos).isEmpty() +- ? blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)) ++ ? blockState.setValue(BlockStateProperties.WATERLOGGED, true) + : blockState; + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch new file mode 100644 index 0000000..e3316f5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/SculkCatalystBlock.java ++++ b/net/minecraft/world/level/block/SculkCatalystBlock.java +@@ -31,7 +_,7 @@ + + public SculkCatalystBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(PULSE, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(PULSE, false)); + } + + @Override +@@ -42,7 +_,7 @@ + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (state.getValue(PULSE)) { +- level.setBlock(pos, state.setValue(PULSE, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(PULSE, false), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch new file mode 100644 index 0000000..6c351f2 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch @@ -0,0 +1,49 @@ +--- a/net/minecraft/world/level/block/SculkSensorBlock.java ++++ b/net/minecraft/world/level/block/SculkSensorBlock.java +@@ -68,8 +_,8 @@ + this.stateDefinition + .any() + .setValue(PHASE, SculkSensorPhase.INACTIVE) +- .setValue(POWER, Integer.valueOf(0)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(POWER, 0) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -78,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockPos clickedPos = context.getClickedPos(); + FluidState fluidState = context.getLevel().getFluidState(clickedPos); +- return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return this.defaultBlockState().setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override +@@ -130,7 +_,7 @@ + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { + if (!level.isClientSide() && !state.is(oldState.getBlock())) { + if (state.getValue(POWER) > 0 && !level.getBlockTicks().hasScheduledTick(pos, this)) { +- level.setBlock(pos, state.setValue(POWER, Integer.valueOf(0)), 18); ++ level.setBlock(pos, state.setValue(POWER, 0), 18); + } + } + } +@@ -225,7 +_,7 @@ + return; + } + // CraftBukkit end +- level.setBlock(pos, state.setValue(PHASE, SculkSensorPhase.COOLDOWN).setValue(POWER, Integer.valueOf(0)), 3); ++ level.setBlock(pos, state.setValue(PHASE, SculkSensorPhase.COOLDOWN).setValue(POWER, 0), 3); + level.scheduleTick(pos, state.getBlock(), 10); + updateNeighbours(level, pos, state); + } +@@ -245,7 +_,7 @@ + } + power = eventRedstone.getNewCurrent(); + // CraftBukkit end +- level.setBlock(pos, state.setValue(PHASE, SculkSensorPhase.ACTIVE).setValue(POWER, Integer.valueOf(power)), 3); ++ level.setBlock(pos, state.setValue(PHASE, SculkSensorPhase.ACTIVE).setValue(POWER, power), 3); + level.scheduleTick(pos, state.getBlock(), this.getActiveTicks()); + updateNeighbours(level, pos, state); + tryResonateVibration(entity, level, pos, frequency); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch new file mode 100644 index 0000000..8edcf73 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch @@ -0,0 +1,33 @@ +--- a/net/minecraft/world/level/block/SculkShriekerBlock.java ++++ b/net/minecraft/world/level/block/SculkShriekerBlock.java +@@ -48,9 +_,9 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(SHRIEKING, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) +- .setValue(CAN_SUMMON, Boolean.valueOf(false)) ++ .setValue(SHRIEKING, false) ++ .setValue(WATERLOGGED, false) ++ .setValue(CAN_SUMMON, false) + ); + } + +@@ -86,7 +_,7 @@ + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (state.getValue(SHRIEKING)) { +- level.setBlock(pos, state.setValue(SHRIEKING, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(SHRIEKING, false), 3); + level.getBlockEntity(pos, BlockEntityType.SCULK_SHRIEKER).ifPresent(sculkShrieker -> sculkShrieker.tryRespond(level)); + } + } +@@ -134,7 +_,7 @@ + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState() +- .setValue(WATERLOGGED, Boolean.valueOf(context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER)).setValue(SculkShriekerBlock.CAN_SUMMON, context.getLevel().purpurConfig.sculkShriekerCanSummonDefault); // Purpur - Config for sculk shrieker can_summon state ++ .setValue(WATERLOGGED, context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER).setValue(SculkShriekerBlock.CAN_SUMMON, context.getLevel().purpurConfig.sculkShriekerCanSummonDefault); // Purpur - Config for sculk shrieker can_summon state + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch new file mode 100644 index 0000000..4764973 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/SculkVeinBlock.java ++++ b/net/minecraft/world/level/block/SculkVeinBlock.java +@@ -49,7 +_,7 @@ + + for (Direction direction : directions) { + if (canAttachTo(level, pos, direction)) { +- blockState = blockState.setValue(getFaceProperty(direction), Boolean.valueOf(true)); ++ blockState = blockState.setValue(getFaceProperty(direction), true); + flag = true; + } + } +@@ -58,7 +_,7 @@ + return false; + } else { + if (!state.getFluidState().isEmpty()) { +- blockState = blockState.setValue(MultifaceBlock.WATERLOGGED, Boolean.valueOf(true)); ++ blockState = blockState.setValue(MultifaceBlock.WATERLOGGED, true); + } + + level.setBlock(pos, blockState, 3); +@@ -72,7 +_,7 @@ + for (Direction direction : DIRECTIONS) { + BooleanProperty faceProperty = getFaceProperty(direction); + if (state.getValue(faceProperty) && level.getBlockState(pos.relative(direction)).is(Blocks.SCULK)) { +- state = state.setValue(faceProperty, Boolean.valueOf(false)); ++ state = state.setValue(faceProperty, false); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SeaPickleBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SeaPickleBlock.java.patch new file mode 100644 index 0000000..151a4ba --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SeaPickleBlock.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/world/level/block/SeaPickleBlock.java ++++ b/net/minecraft/world/level/block/SeaPickleBlock.java +@@ -41,7 +_,7 @@ + + protected SeaPickleBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(PICKLES, Integer.valueOf(1)).setValue(WATERLOGGED, Boolean.valueOf(true))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(PICKLES, 1).setValue(WATERLOGGED, true)); + } + + @Nullable +@@ -49,11 +_,11 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); + if (blockState.is(this)) { +- return blockState.setValue(PICKLES, Integer.valueOf(Math.min(4, blockState.getValue(PICKLES) + 1))); ++ return blockState.setValue(PICKLES, Math.min(4, blockState.getValue(PICKLES) + 1)); + } else { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + boolean flag = fluidState.getType() == Fluids.WATER; +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(flag)); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, flag); + } + } + +@@ -153,7 +_,7 @@ + if (blockPos != pos && random.nextInt(6) == 0 && level.getBlockState(blockPos).is(Blocks.WATER)) { + BlockState blockState = level.getBlockState(blockPos.below()); + if (blockState.is(BlockTags.CORAL_BLOCKS)) { +- level.setBlock(blockPos, Blocks.SEA_PICKLE.defaultBlockState().setValue(PICKLES, Integer.valueOf(random.nextInt(4) + 1)), 3); ++ level.setBlock(blockPos, Blocks.SEA_PICKLE.defaultBlockState().setValue(PICKLES, random.nextInt(4) + 1), 3); + } + } + } +@@ -170,7 +_,7 @@ + i3++; + } + +- level.setBlock(pos, state.setValue(PICKLES, Integer.valueOf(4)), 2); ++ level.setBlock(pos, state.setValue(PICKLES, 4), 2); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SimpleWaterloggedBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SimpleWaterloggedBlock.java.patch new file mode 100644 index 0000000..726f658 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SimpleWaterloggedBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/SimpleWaterloggedBlock.java ++++ b/net/minecraft/world/level/block/SimpleWaterloggedBlock.java +@@ -25,7 +_,7 @@ + default boolean placeLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) { + if (!state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) { + if (!level.isClientSide()) { +- level.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, true), 3); + level.scheduleTick(pos, fluidState.getType(), fluidState.getType().getTickDelay(level)); + } + +@@ -38,7 +_,7 @@ + @Override + default ItemStack pickupBlock(@Nullable Player player, LevelAccessor level, BlockPos pos, BlockState state) { + if (state.getValue(BlockStateProperties.WATERLOGGED)) { +- level.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(BlockStateProperties.WATERLOGGED, false), 3); + if (!state.canSurvive(level, pos)) { + level.destroyBlock(pos, true); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SkullBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SkullBlock.java.patch new file mode 100644 index 0000000..f63da40 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SkullBlock.java.patch @@ -0,0 +1,32 @@ +--- a/net/minecraft/world/level/block/SkullBlock.java ++++ b/net/minecraft/world/level/block/SkullBlock.java +@@ -37,7 +_,7 @@ + + protected SkullBlock(SkullBlock.Type type, BlockBehaviour.Properties properties) { + super(type, properties); +- this.registerDefaultState(this.defaultBlockState().setValue(ROTATION, Integer.valueOf(0))); ++ this.registerDefaultState(this.defaultBlockState().setValue(ROTATION, 0)); + } + + @Override +@@ -52,17 +_,17 @@ + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return super.getStateForPlacement(context).setValue(ROTATION, Integer.valueOf(RotationSegment.convertToSegment(context.getRotation()))); ++ return super.getStateForPlacement(context).setValue(ROTATION, RotationSegment.convertToSegment(context.getRotation())); + } + + @Override + protected BlockState rotate(BlockState state, Rotation rotation) { +- return state.setValue(ROTATION, Integer.valueOf(rotation.rotate(state.getValue(ROTATION), ROTATIONS))); ++ return state.setValue(ROTATION, rotation.rotate(state.getValue(ROTATION), ROTATIONS)); + } + + @Override + protected BlockState mirror(BlockState state, Mirror mirror) { +- return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), ROTATIONS))); ++ return state.setValue(ROTATION, mirror.mirror(state.getValue(ROTATION), ROTATIONS)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch new file mode 100644 index 0000000..ee12609 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SlabBlock.java.patch @@ -0,0 +1,26 @@ +--- a/net/minecraft/world/level/block/SlabBlock.java ++++ b/net/minecraft/world/level/block/SlabBlock.java +@@ -42,7 +_,7 @@ + + public SlabBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(TYPE, SlabType.BOTTOM).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(TYPE, SlabType.BOTTOM).setValue(WATERLOGGED, false)); + } + + @Override +@@ -74,12 +_,12 @@ + BlockPos clickedPos = context.getClickedPos(); + BlockState blockState = context.getLevel().getBlockState(clickedPos); + if (blockState.is(this)) { +- return blockState.setValue(TYPE, SlabType.DOUBLE).setValue(WATERLOGGED, Boolean.valueOf(false)); ++ return blockState.setValue(TYPE, SlabType.DOUBLE).setValue(WATERLOGGED, false); + } else { + FluidState fluidState = context.getLevel().getFluidState(clickedPos); + BlockState blockState1 = this.defaultBlockState() + .setValue(TYPE, SlabType.BOTTOM) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + Direction clickedFace = context.getClickedFace(); + return clickedFace != Direction.DOWN && (clickedFace == Direction.UP || !(context.getClickLocation().y - clickedPos.getY() > 0.5)) + ? blockState1 diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SmallDripleafBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SmallDripleafBlock.java.patch new file mode 100644 index 0000000..f4da9c6 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SmallDripleafBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/SmallDripleafBlock.java ++++ b/net/minecraft/world/level/block/SmallDripleafBlock.java +@@ -41,7 +_,7 @@ + public SmallDripleafBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(HALF, DoubleBlockHalf.LOWER).setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH) ++ this.stateDefinition.any().setValue(HALF, DoubleBlockHalf.LOWER).setValue(WATERLOGGED, false).setValue(FACING, Direction.NORTH) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnifferEggBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnifferEggBlock.java.patch new file mode 100644 index 0000000..a1ec915 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnifferEggBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/SnifferEggBlock.java ++++ b/net/minecraft/world/level/block/SnifferEggBlock.java +@@ -40,7 +_,7 @@ + + public SnifferEggBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(HATCH, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(HATCH, 0)); + } + + @Override +@@ -73,7 +_,7 @@ + public void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (!this.isReadyToHatch(state)) { + // Paper start +- if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(HATCH, Integer.valueOf(this.getHatchLevel(state) + 1)), 2)) { ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(HATCH, this.getHatchLevel(state) + 1), 2)) { + this.rescheduleTick(level, pos); + return; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch new file mode 100644 index 0000000..abe0619 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/SnowLayerBlock.java ++++ b/net/minecraft/world/level/block/SnowLayerBlock.java +@@ -46,7 +_,7 @@ + + protected SnowLayerBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(LAYERS, Integer.valueOf(1))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(LAYERS, 1)); + } + + @Override +@@ -148,7 +_,7 @@ + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); + if (blockState.is(this)) { + int layersValue = blockState.getValue(LAYERS); +- return blockState.setValue(LAYERS, Integer.valueOf(Math.min(8, layersValue + 1))); ++ return blockState.setValue(LAYERS, Math.min(8, layersValue + 1)); + } else { + return super.getStateForPlacement(context); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowyDirtBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowyDirtBlock.java.patch new file mode 100644 index 0000000..5033460 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SnowyDirtBlock.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/world/level/block/SnowyDirtBlock.java ++++ b/net/minecraft/world/level/block/SnowyDirtBlock.java +@@ -25,7 +_,7 @@ + + protected SnowyDirtBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(SNOWY, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(SNOWY, false)); + } + + @Override +@@ -40,14 +_,14 @@ + RandomSource random + ) { + return direction == Direction.UP +- ? state.setValue(SNOWY, Boolean.valueOf(isSnowySetting(neighborState))) ++ ? state.setValue(SNOWY, isSnowySetting(neighborState)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos().above()); +- return this.defaultBlockState().setValue(SNOWY, Boolean.valueOf(isSnowySetting(blockState))); ++ return this.defaultBlockState().setValue(SNOWY, isSnowySetting(blockState)); + } + + protected static boolean isSnowySetting(BlockState state) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StainedGlassPaneBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StainedGlassPaneBlock.java.patch new file mode 100644 index 0000000..2b7b60e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StainedGlassPaneBlock.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/block/StainedGlassPaneBlock.java ++++ b/net/minecraft/world/level/block/StainedGlassPaneBlock.java +@@ -23,11 +_,11 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) ++ .setValue(WATERLOGGED, false) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StairBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StairBlock.java.patch new file mode 100644 index 0000000..4e84d68 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StairBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/StairBlock.java ++++ b/net/minecraft/world/level/block/StairBlock.java +@@ -90,7 +_,7 @@ + .setValue(FACING, Direction.NORTH) + .setValue(HALF, Half.BOTTOM) + .setValue(SHAPE, StairsShape.STRAIGHT) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(WATERLOGGED, false) + ); + this.base = baseState.getBlock(); + this.baseState = baseState; +@@ -128,7 +_,7 @@ + ? Half.BOTTOM + : Half.TOP + ) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + return blockState.setValue(SHAPE, getStairsShape(blockState, context.getLevel(), clickedPos)); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StandingSignBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StandingSignBlock.java.patch new file mode 100644 index 0000000..ead106b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StandingSignBlock.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/level/block/StandingSignBlock.java ++++ b/net/minecraft/world/level/block/StandingSignBlock.java +@@ -31,7 +_,7 @@ + + public StandingSignBlock(WoodType type, BlockBehaviour.Properties properties) { + super(type, properties.sound(type.soundType())); +- this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, Integer.valueOf(0)).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, 0).setValue(WATERLOGGED, false)); + } + + @Override +@@ -43,8 +_,8 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + return this.defaultBlockState() +- .setValue(ROTATION, Integer.valueOf(RotationSegment.convertToSegment(context.getRotation() + 180.0F))) +- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ .setValue(ROTATION, RotationSegment.convertToSegment(context.getRotation() + 180.0F)) ++ .setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override +@@ -70,12 +_,12 @@ + + @Override + protected BlockState rotate(BlockState state, Rotation rot) { +- return state.setValue(ROTATION, Integer.valueOf(rot.rotate(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, rot.rotate(state.getValue(ROTATION), 16)); + } + + @Override + protected BlockState mirror(BlockState state, Mirror mirror) { +- return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), 16))); ++ return state.setValue(ROTATION, mirror.mirror(state.getValue(ROTATION), 16)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StemBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StemBlock.java.patch new file mode 100644 index 0000000..fc57d46 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/StemBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/StemBlock.java ++++ b/net/minecraft/world/level/block/StemBlock.java +@@ -63,7 +_,7 @@ + this.fruit = fruit; + this.attachedStem = attachedStem; + this.seed = seed; +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -83,7 +_,7 @@ + if (random.nextFloat() < ((this == Blocks.PUMPKIN_STEM ? level.spigotConfig.pumpkinModifier : level.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / growthSpeed) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution + int ageValue = state.getValue(AGE); + if (ageValue < 7) { +- state = state.setValue(AGE, Integer.valueOf(ageValue + 1)); ++ state = state.setValue(AGE, ageValue + 1); + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state, 2); // CraftBukkit + } else { + Direction randomDirection = Direction.Plane.HORIZONTAL.getRandomDirection(random); +@@ -125,7 +_,7 @@ + @Override + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { + int min = Math.min(7, state.getValue(AGE) + Mth.nextInt(level.random, 2, 5)); +- BlockState blockState = state.setValue(AGE, Integer.valueOf(min)); ++ BlockState blockState = state.setValue(AGE, min); + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, blockState, 2); // CraftBukkit + if (min == 7) { + blockState.randomTick(level, pos, level.random); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch new file mode 100644 index 0000000..1a29f17 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/world/level/block/SugarCaneBlock.java ++++ b/net/minecraft/world/level/block/SugarCaneBlock.java +@@ -32,7 +_,7 @@ + + protected SugarCaneBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -61,9 +_,9 @@ + int modifier = level.spigotConfig.caneModifier; // Spigot - SPIGOT-7159: Better modifier resolution + if (ageValue >= 15 || (modifier != 100 && random.nextFloat() < (modifier / (100.0f * 16)))) { // Spigot - SPIGOT-7159: Better modifier resolution + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos.above(), this.defaultBlockState()); // CraftBukkit +- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(0)), 4); ++ level.setBlock(pos, state.setValue(AGE, 0), 4); + } else if (modifier == 100 || random.nextFloat() < (modifier / (100.0f * 16))) { // Spigot - SPIGOT-7159: Better modifier resolution +- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 4); ++ level.setBlock(pos, state.setValue(AGE, ageValue + 1), 4); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch new file mode 100644 index 0000000..8241909 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/level/block/SweetBerryBushBlock.java ++++ b/net/minecraft/world/level/block/SweetBerryBushBlock.java +@@ -43,7 +_,7 @@ + + public SweetBerryBushBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + @Override +@@ -69,7 +_,7 @@ + protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + int ageValue = state.getValue(AGE); + if (ageValue < 3 && random.nextFloat() < (level.spigotConfig.sweetBerryModifier / (100.0f * 5)) && level.getRawBrightness(pos.above(), 0) >= 9) { // Spigot - SPIGOT-7159: Better modifier resolution +- BlockState blockState = state.setValue(AGE, Integer.valueOf(ageValue + 1)); ++ BlockState blockState = state.setValue(AGE, ageValue + 1); + if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, blockState, 2)) return; // CraftBukkit + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(blockState)); + } +@@ -120,7 +_,7 @@ + } + // CraftBukkit end + level.playSound(null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, 0.8F + level.random.nextFloat() * 0.4F); +- BlockState blockState = state.setValue(AGE, Integer.valueOf(1)); ++ BlockState blockState = state.setValue(AGE, 1); + level.setBlock(pos, blockState, 2); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(player, blockState)); + return InteractionResult.SUCCESS; +@@ -147,6 +_,6 @@ + @Override + public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) { + int min = Math.min(3, state.getValue(AGE) + 1); +- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(min)), 2); ++ level.setBlock(pos, state.setValue(AGE, min), 2); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TargetBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TargetBlock.java.patch new file mode 100644 index 0000000..708004e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TargetBlock.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/level/block/TargetBlock.java ++++ b/net/minecraft/world/level/block/TargetBlock.java +@@ -36,7 +_,7 @@ + + public TargetBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(OUTPUT_POWER, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(OUTPUT_POWER, 0)); + } + + @Override +@@ -101,14 +_,14 @@ + } + + private static void setOutputPower(LevelAccessor level, BlockState state, int power, BlockPos pos, int waitTime) { +- level.setBlock(pos, state.setValue(OUTPUT_POWER, Integer.valueOf(power)), 3); ++ level.setBlock(pos, state.setValue(OUTPUT_POWER, power), 3); + level.scheduleTick(pos, state.getBlock(), waitTime); + } + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (state.getValue(OUTPUT_POWER) != 0) { +- level.setBlock(pos, state.setValue(OUTPUT_POWER, Integer.valueOf(0)), 3); ++ level.setBlock(pos, state.setValue(OUTPUT_POWER, 0), 3); + } + } + +@@ -131,7 +_,7 @@ + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) { + if (!level.isClientSide() && !state.is(oldState.getBlock())) { + if (state.getValue(OUTPUT_POWER) > 0 && !level.getBlockTicks().hasScheduledTick(pos, this)) { +- level.setBlock(pos, state.setValue(OUTPUT_POWER, Integer.valueOf(0)), 18); ++ level.setBlock(pos, state.setValue(OUTPUT_POWER, 0), 18); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TntBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TntBlock.java.patch new file mode 100644 index 0000000..ccc3851 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TntBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/TntBlock.java ++++ b/net/minecraft/world/level/block/TntBlock.java +@@ -39,7 +_,7 @@ + + public TntBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(UNSTABLE, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(UNSTABLE, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch new file mode 100644 index 0000000..e89565b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/TrapDoorBlock.java ++++ b/net/minecraft/world/level/block/TrapDoorBlock.java +@@ -65,10 +_,10 @@ + this.stateDefinition + .any() + .setValue(FACING, Direction.NORTH) +- .setValue(OPEN, Boolean.valueOf(false)) ++ .setValue(OPEN, false) + .setValue(HALF, Half.BOTTOM) +- .setValue(POWERED, Boolean.valueOf(false)) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(POWERED, false) ++ .setValue(WATERLOGGED, false) + ); + } + +@@ -206,10 +_,10 @@ + } + + if (context.getLevel().hasNeighborSignal(context.getClickedPos())) { +- blockState = blockState.setValue(OPEN, Boolean.valueOf(true)).setValue(POWERED, Boolean.valueOf(true)); ++ blockState = blockState.setValue(OPEN, true).setValue(POWERED, true); + } + +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrialSpawnerBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrialSpawnerBlock.java.patch new file mode 100644 index 0000000..e0ce1f7 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TrialSpawnerBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/TrialSpawnerBlock.java ++++ b/net/minecraft/world/level/block/TrialSpawnerBlock.java +@@ -35,7 +_,7 @@ + + public TrialSpawnerBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(STATE, TrialSpawnerState.INACTIVE).setValue(OMINOUS, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(STATE, TrialSpawnerState.INACTIVE).setValue(OMINOUS, false)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch new file mode 100644 index 0000000..c425a28 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch @@ -0,0 +1,74 @@ +--- a/net/minecraft/world/level/block/TripWireBlock.java ++++ b/net/minecraft/world/level/block/TripWireBlock.java +@@ -54,13 +_,13 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(POWERED, Boolean.valueOf(false)) +- .setValue(ATTACHED, Boolean.valueOf(false)) +- .setValue(DISARMED, Boolean.valueOf(false)) +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) ++ .setValue(POWERED, false) ++ .setValue(ATTACHED, false) ++ .setValue(DISARMED, false) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) + ); + this.hook = hook; + } +@@ -76,10 +_,10 @@ + BlockGetter level = context.getLevel(); + BlockPos clickedPos = context.getClickedPos(); + return this.defaultBlockState() +- .setValue(NORTH, Boolean.valueOf(this.shouldConnectTo(level.getBlockState(clickedPos.north()), Direction.NORTH))) +- .setValue(EAST, Boolean.valueOf(this.shouldConnectTo(level.getBlockState(clickedPos.east()), Direction.EAST))) +- .setValue(SOUTH, Boolean.valueOf(this.shouldConnectTo(level.getBlockState(clickedPos.south()), Direction.SOUTH))) +- .setValue(WEST, Boolean.valueOf(this.shouldConnectTo(level.getBlockState(clickedPos.west()), Direction.WEST))); ++ .setValue(NORTH, this.shouldConnectTo(level.getBlockState(clickedPos.north()), Direction.NORTH)) ++ .setValue(EAST, this.shouldConnectTo(level.getBlockState(clickedPos.east()), Direction.EAST)) ++ .setValue(SOUTH, this.shouldConnectTo(level.getBlockState(clickedPos.south()), Direction.SOUTH)) ++ .setValue(WEST, this.shouldConnectTo(level.getBlockState(clickedPos.west()), Direction.WEST)); + } + + @Override +@@ -95,7 +_,7 @@ + ) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent tripwire from updating + return direction.getAxis().isHorizontal() +- ? state.setValue(PROPERTY_BY_DIRECTION.get(direction), Boolean.valueOf(this.shouldConnectTo(neighborState, direction))) ++ ? state.setValue(PROPERTY_BY_DIRECTION.get(direction), this.shouldConnectTo(neighborState, direction)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + } + +@@ -111,7 +_,7 @@ + protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating + if (!isMoving && !state.is(newState.getBlock())) { +- this.updateSource(level, pos, state.setValue(POWERED, Boolean.valueOf(true))); ++ this.updateSource(level, pos, state.setValue(POWERED, true)); + } + } + +@@ -119,7 +_,7 @@ + public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) { + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent disarming tripwires + if (!level.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { +- level.setBlock(pos, state.setValue(DISARMED, Boolean.valueOf(true)), 4); ++ level.setBlock(pos, state.setValue(DISARMED, true), 4); + level.gameEvent(player, GameEvent.SHEAR, pos); + } + +@@ -224,7 +_,7 @@ + // CraftBukkit end + + if (flag != poweredValue) { +- blockState = blockState.setValue(POWERED, Boolean.valueOf(flag)); ++ blockState = blockState.setValue(POWERED, flag); + level.setBlock(pos, blockState, 3); + this.updateSource(level, pos, blockState); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch new file mode 100644 index 0000000..ef79cdc --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/level/block/TripWireHookBlock.java ++++ b/net/minecraft/world/level/block/TripWireHookBlock.java +@@ -51,7 +_,7 @@ + public TripWireHookBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(ATTACHED, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(ATTACHED, false) + ); + } + +@@ -97,7 +_,7 @@ + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- BlockState blockState = this.defaultBlockState().setValue(POWERED, Boolean.valueOf(false)).setValue(ATTACHED, Boolean.valueOf(false)); ++ BlockState blockState = this.defaultBlockState().setValue(POWERED, false).setValue(ATTACHED, false); + LevelReader level = context.getLevel(); + BlockPos clickedPos = context.getClickedPos(); + Direction[] nearestLookingDirections = context.getNearestLookingDirections(); +@@ -165,7 +_,7 @@ + + flag2 &= i > 1; + flag3 &= flag2; +- BlockState blockState1 = block.defaultBlockState().trySetValue(ATTACHED, Boolean.valueOf(flag2)).trySetValue(POWERED, Boolean.valueOf(flag3)); ++ BlockState blockState1 = block.defaultBlockState().trySetValue(ATTACHED, flag2).trySetValue(POWERED, flag3); + boolean cancelledEmitterHook = false, cancelledReceiverHook = false; // Paper - Call BlockRedstoneEvent + boolean wasPowered = flag1, willBePowered = flag3; // Paper - OBFHELPER + if (i > 0) { +@@ -216,7 +_,7 @@ + if (blockState2 != null) { + BlockState blockState3 = level.getBlockState(blockPos1); + if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) { +- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating ++ if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3); // Paper - prevent tripwire from updating + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch new file mode 100644 index 0000000..cac2a5a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/TurtleEggBlock.java ++++ b/net/minecraft/world/level/block/TurtleEggBlock.java +@@ -48,7 +_,7 @@ + + public TurtleEggBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(HATCH, Integer.valueOf(0)).setValue(EGGS, Integer.valueOf(1))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(HATCH, 0).setValue(EGGS, 1)); + } + + @Override +@@ -97,7 +_,7 @@ + if (eggsValue <= 1) { + level.destroyBlock(pos, false); + } else { +- level.setBlock(pos, state.setValue(EGGS, Integer.valueOf(eggsValue - 1)), 2); ++ level.setBlock(pos, state.setValue(EGGS, eggsValue - 1), 2); + level.gameEvent(GameEvent.BLOCK_DESTROY, pos, GameEvent.Context.of(state)); + level.levelEvent(2001, pos, Block.getId(state)); + } +@@ -177,7 +_,7 @@ + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); + return blockState.is(this) +- ? blockState.setValue(EGGS, Integer.valueOf(Math.min(4, blockState.getValue(EGGS) + 1))) ++ ? blockState.setValue(EGGS, Math.min(4, blockState.getValue(EGGS) + 1)) + : super.getStateForPlacement(context); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VaultBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VaultBlock.java.patch new file mode 100644 index 0000000..1123a60 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VaultBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/VaultBlock.java ++++ b/net/minecraft/world/level/block/VaultBlock.java +@@ -39,7 +_,7 @@ + public VaultBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(STATE, VaultState.INACTIVE).setValue(OMINOUS, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(STATE, VaultState.INACTIVE).setValue(OMINOUS, false) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VineBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VineBlock.java.patch new file mode 100644 index 0000000..f7d3b98 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/VineBlock.java.patch @@ -0,0 +1,96 @@ +--- a/net/minecraft/world/level/block/VineBlock.java ++++ b/net/minecraft/world/level/block/VineBlock.java +@@ -54,11 +_,11 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(UP, Boolean.valueOf(false)) +- .setValue(NORTH, Boolean.valueOf(false)) +- .setValue(EAST, Boolean.valueOf(false)) +- .setValue(SOUTH, Boolean.valueOf(false)) +- .setValue(WEST, Boolean.valueOf(false)) ++ .setValue(UP, false) ++ .setValue(NORTH, false) ++ .setValue(EAST, false) ++ .setValue(SOUTH, false) ++ .setValue(WEST, false) + ); + this.shapesCache = ImmutableMap.copyOf( + this.stateDefinition.getPossibleStates().stream().collect(Collectors.toMap(Function.identity(), VineBlock::calculateShape)) +@@ -145,7 +_,7 @@ + private BlockState getUpdatedState(BlockState state, BlockGetter level, BlockPos pos) { + BlockPos blockPos = pos.above(); + if (state.getValue(UP)) { +- state = state.setValue(UP, Boolean.valueOf(isAcceptableNeighbour(level, blockPos, Direction.DOWN))); ++ state = state.setValue(UP, isAcceptableNeighbour(level, blockPos, Direction.DOWN)); + } + + BlockState blockState = null; +@@ -162,7 +_,7 @@ + canSupportAtFace = blockState.is(this) && blockState.getValue(propertyForFace); + } + +- state = state.setValue(propertyForFace, Boolean.valueOf(canSupportAtFace)); ++ state = state.setValue(propertyForFace, canSupportAtFace); + } + } + +@@ -208,17 +_,17 @@ + // CraftBukkit start - Call BlockSpreadEvent + BlockPos source = pos; + if (value && isAcceptableNeighbour(level, blockPos2, clockWise)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(getPropertyForFace(clockWise), Boolean.valueOf(true)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(getPropertyForFace(clockWise), true), 2); + } else if (value1 && isAcceptableNeighbour(level, blockPos3, counterClockWise)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(getPropertyForFace(counterClockWise), Boolean.valueOf(true)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(getPropertyForFace(counterClockWise), true), 2); + } else { + Direction opposite = random1.getOpposite(); + if (value && level.isEmptyBlock(blockPos2) && isAcceptableNeighbour(level, pos.relative(clockWise), opposite)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos2, this.defaultBlockState().setValue(getPropertyForFace(opposite), Boolean.valueOf(true)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos2, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), 2); + } else if (value1 && level.isEmptyBlock(blockPos3) && isAcceptableNeighbour(level, pos.relative(counterClockWise), opposite)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos3, this.defaultBlockState().setValue(getPropertyForFace(opposite), Boolean.valueOf(true)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos3, this.defaultBlockState().setValue(getPropertyForFace(opposite), true), 2); + } else if (random.nextFloat() < 0.05 && isAcceptableNeighbour(level, blockPos1.above(), Direction.UP)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(UP, Boolean.valueOf(true)), 2); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, source, blockPos1, this.defaultBlockState().setValue(UP, true), 2); + } + // CraftBukkit end + } +@@ -229,7 +_,7 @@ + } else { + if (random1 == Direction.UP && pos.getY() < level.getMaxY()) { + if (this.canSupportAtFace(level, pos, random1)) { +- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(UP, Boolean.valueOf(true)), 2); // CraftBukkit ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(UP, true), 2); // CraftBukkit + return; + } + +@@ -242,7 +_,7 @@ + + for (Direction clockWise : Direction.Plane.HORIZONTAL) { + if (random.nextBoolean() || !isAcceptableNeighbour(level, blockPos.relative(clockWise), clockWise)) { +- blockState1 = blockState1.setValue(getPropertyForFace(clockWise), Boolean.valueOf(false)); ++ blockState1 = blockState1.setValue(getPropertyForFace(clockWise), false); + } + } + +@@ -275,7 +_,7 @@ + if (random.nextBoolean()) { + BooleanProperty propertyForFace = getPropertyForFace(direction); + if (sourceState.getValue(propertyForFace)) { +- spreadState = spreadState.setValue(propertyForFace, Boolean.valueOf(true)); ++ spreadState = spreadState.setValue(propertyForFace, true); + } + } + } +@@ -321,7 +_,7 @@ + BooleanProperty propertyForFace = getPropertyForFace(direction); + boolean flag = isBlock && blockState.getValue(propertyForFace); + if (!flag && this.canSupportAtFace(context.getLevel(), context.getClickedPos(), direction)) { +- return blockState1.setValue(propertyForFace, Boolean.valueOf(true)); ++ return blockState1.setValue(propertyForFace, true); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallBlock.java.patch new file mode 100644 index 0000000..9ab7795 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallBlock.java.patch @@ -0,0 +1,46 @@ +--- a/net/minecraft/world/level/block/WallBlock.java ++++ b/net/minecraft/world/level/block/WallBlock.java +@@ -60,12 +_,12 @@ + this.registerDefaultState( + this.stateDefinition + .any() +- .setValue(UP, Boolean.valueOf(true)) ++ .setValue(UP, true) + .setValue(NORTH_WALL, WallSide.NONE) + .setValue(EAST_WALL, WallSide.NONE) + .setValue(SOUTH_WALL, WallSide.NONE) + .setValue(WEST_WALL, WallSide.NONE) +- .setValue(WATERLOGGED, Boolean.valueOf(false)) ++ .setValue(WATERLOGGED, false) + ); + this.shapeByIndex = this.makeShapes(4.0F, 3.0F, 16.0F, 0.0F, 14.0F, 16.0F); + this.collisionShapeByIndex = this.makeShapes(4.0F, 3.0F, 24.0F, 0.0F, 24.0F, 24.0F); +@@ -115,8 +_,8 @@ + .setValue(WEST_WALL, wallSide2) + .setValue(NORTH_WALL, wallSide1) + .setValue(SOUTH_WALL, wallSide3); +- builder.put(blockState.setValue(WATERLOGGED, Boolean.valueOf(false)), voxelShape9); +- builder.put(blockState.setValue(WATERLOGGED, Boolean.valueOf(true)), voxelShape9); ++ builder.put(blockState.setValue(WATERLOGGED, false), voxelShape9); ++ builder.put(blockState.setValue(WATERLOGGED, true), voxelShape9); + } + } + } +@@ -166,7 +_,7 @@ + boolean flag1 = this.connectsTo(blockState1, blockState1.isFaceSturdy(level, blockPos1, Direction.WEST), Direction.WEST); + boolean flag2 = this.connectsTo(blockState2, blockState2.isFaceSturdy(level, blockPos2, Direction.NORTH), Direction.NORTH); + boolean flag3 = this.connectsTo(blockState3, blockState3.isFaceSturdy(level, blockPos3, Direction.EAST), Direction.EAST); +- BlockState blockState5 = this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ BlockState blockState5 = this.defaultBlockState().setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + return this.updateShape(level, blockState5, blockPos4, blockState4, flag, flag1, flag2, flag3); + } + +@@ -241,7 +_,7 @@ + ) { + VoxelShape faceShape = neighbour.getCollisionShape(level, pos).getFaceShape(Direction.DOWN); + BlockState blockState = this.updateSides(state, northConnection, eastConnection, southConnection, westConnection, faceShape); +- return blockState.setValue(UP, Boolean.valueOf(this.shouldRaisePost(blockState, neighbour, faceShape))); ++ return blockState.setValue(UP, this.shouldRaisePost(blockState, neighbour, faceShape)); + } + + private boolean shouldRaisePost(BlockState state, BlockState neighbour, VoxelShape shape) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch new file mode 100644 index 0000000..2f4dba3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/WallHangingSignBlock.java ++++ b/net/minecraft/world/level/block/WallHangingSignBlock.java +@@ -59,7 +_,7 @@ + + public WallHangingSignBlock(WoodType type, BlockBehaviour.Properties properties) { + super(type, properties.sound(type.hangingSignSoundType())); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false)); + } + + @Override +@@ -130,7 +_,7 @@ + Direction opposite = direction.getOpposite(); + blockState = blockState.setValue(FACING, opposite); + if (blockState.canSurvive(level, clickedPos) && this.canPlace(blockState, level, clickedPos)) { +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallSignBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallSignBlock.java.patch new file mode 100644 index 0000000..a999103 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WallSignBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/WallSignBlock.java ++++ b/net/minecraft/world/level/block/WallSignBlock.java +@@ -52,7 +_,7 @@ + + public WallSignBlock(WoodType type, BlockBehaviour.Properties properties) { + super(type, properties.sound(type.soundType())); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false)); + } + + @Override +@@ -79,7 +_,7 @@ + Direction opposite = direction.getOpposite(); + blockState = blockState.setValue(FACING, opposite); + if (blockState.canSurvive(level, clickedPos)) { +- return blockState.setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER)); ++ return blockState.setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WaterloggedTransparentBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WaterloggedTransparentBlock.java.patch new file mode 100644 index 0000000..85236f3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WaterloggedTransparentBlock.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/block/WaterloggedTransparentBlock.java ++++ b/net/minecraft/world/level/block/WaterloggedTransparentBlock.java +@@ -27,14 +_,14 @@ + + protected WaterloggedTransparentBlock(BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, false)); + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); +- return super.getStateForPlacement(context).setValue(WATERLOGGED, Boolean.valueOf(fluidState.is(Fluids.WATER))); ++ return super.getStateForPlacement(context).setValue(WATERLOGGED, fluidState.is(Fluids.WATER)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch new file mode 100644 index 0000000..af254f1 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/WeightedPressurePlateBlock.java ++++ b/net/minecraft/world/level/block/WeightedPressurePlateBlock.java +@@ -34,7 +_,7 @@ + + protected WeightedPressurePlateBlock(int maxWeight, BlockSetType type, BlockBehaviour.Properties properties) { + super(properties, type); +- this.registerDefaultState(this.stateDefinition.any().setValue(POWER, Integer.valueOf(0))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(POWER, 0)); + this.maxWeight = maxWeight; + } + +@@ -76,7 +_,7 @@ + + @Override + protected BlockState setSignalForState(BlockState state, int strength) { +- return state.setValue(POWER, Integer.valueOf(strength)); ++ return state.setValue(POWER, strength); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch new file mode 100644 index 0000000..ad0f20f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +@@ -282,7 +_,7 @@ + + if (isLit != furnace.isLit()) { + flag = true; +- state = state.setValue(AbstractFurnaceBlock.LIT, Boolean.valueOf(furnace.isLit())); ++ state = state.setValue(AbstractFurnaceBlock.LIT, furnace.isLit()); + level.setBlock(pos, state, 3); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch new file mode 100644 index 0000000..4192b90 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/world/level/block/entity/BannerBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BannerBlockEntity.java +@@ -80,12 +_,12 @@ + } + + // Paper start - always send patterns to client +- ThreadLocal serialisingForNetwork = ThreadLocal.withInitial(() -> Boolean.FALSE); ++ ThreadLocal serialisingForNetwork = ThreadLocal.withInitial(() -> false); + @Override + public CompoundTag getUpdateTag(HolderLookup.Provider registries) { + final Boolean wasSerialisingForNetwork = serialisingForNetwork.get(); + try { +- serialisingForNetwork.set(Boolean.TRUE); ++ serialisingForNetwork.set(true); + return this.saveWithoutMetadata(registries); + } finally { + serialisingForNetwork.set(wasSerialisingForNetwork); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch new file mode 100644 index 0000000..ab97abb --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java +@@ -179,7 +_,7 @@ + } + + public void updateBlockState(BlockState state, boolean _open) { +- this.level.setBlock(this.getBlockPos(), state.setValue(BarrelBlock.OPEN, Boolean.valueOf(_open)), 3); ++ this.level.setBlock(this.getBlockPos(), state.setValue(BarrelBlock.OPEN, _open), 3); + } + + public void playSound(BlockState state, SoundEvent sound) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch new file mode 100644 index 0000000..2f58eec --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +@@ -316,7 +_,7 @@ + ) { + // Paper emd - pass beacon block entity + if (!level.isClientSide && primaryEffect != null) { +- double d = computeBeaconRange(beaconLevel); // Paper - diff out applyEffects logic components - see below ++ //double d = computeBeaconRange(beaconLevel); // Paper - diff out applyEffects logic components - see below // Plazma - Remove unused variables + int i = computeEffectAmplifier(beaconLevel, primaryEffect, secondaryEffect); // Paper - diff out applyEffects logic components - see below + + int i1 = computeEffectDuration(beaconLevel); // Paper - diff out applyEffects logic components - see below diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch new file mode 100644 index 0000000..39feb50 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +@@ -300,7 +_,7 @@ + } + + // Paper start - Fire EntityChangeBlockEvent in more places +- BlockState newBlockState = state.setValue(BeehiveBlock.HONEY_LEVEL, Integer.valueOf(honeyLevel + i)); ++ BlockState newBlockState = state.setValue(BeehiveBlock.HONEY_LEVEL, honeyLevel + i); + + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, newBlockState)) { + level.setBlockAndUpdate(pos, newBlockState); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch new file mode 100644 index 0000000..19ab85b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java +@@ -184,7 +_,7 @@ + } + + for (int i = 0; i < BrewingStandBlock.HAS_BOTTLE.length; i++) { +- blockState = blockState.setValue(BrewingStandBlock.HAS_BOTTLE[i], Boolean.valueOf(potionBits[i])); ++ blockState = blockState.setValue(BrewingStandBlock.HAS_BOTTLE[i], potionBits[i]); + } + + level.setBlock(pos, blockState, 2); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch new file mode 100644 index 0000000..b22fe5d --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/entity/BrushableBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/BrushableBlockEntity.java +@@ -74,7 +_,7 @@ + int completionState1 = this.getCompletionState(); + if (completionState != completionState1) { + BlockState blockState = this.getBlockState(); +- BlockState blockState1 = blockState.setValue(BlockStateProperties.DUSTED, Integer.valueOf(completionState1)); ++ BlockState blockState1 = blockState.setValue(BlockStateProperties.DUSTED, completionState1); + level.setBlock(this.getBlockPos(), blockState1, 3); + } + +@@ -152,7 +_,7 @@ + this.brushCount = Math.max(0, this.brushCount - 2); + int completionState1 = this.getCompletionState(); + if (completionState != completionState1) { +- level.setBlock(this.getBlockPos(), this.getBlockState().setValue(BlockStateProperties.DUSTED, Integer.valueOf(completionState1)), 3); ++ level.setBlock(this.getBlockPos(), this.getBlockState().setValue(BlockStateProperties.DUSTED, completionState1), 3); + } + + int i = 4; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch new file mode 100644 index 0000000..272aa10 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java +@@ -75,7 +_,7 @@ + for (int i = 0; i < ChiseledBookShelfBlock.SLOT_OCCUPIED_PROPERTIES.size(); i++) { + boolean flag = !this.getItem(i).isEmpty(); + BooleanProperty booleanProperty = ChiseledBookShelfBlock.SLOT_OCCUPIED_PROPERTIES.get(i); +- blockState = blockState.setValue(booleanProperty, Boolean.valueOf(flag)); ++ blockState = blockState.setValue(booleanProperty, flag); + } + + Objects.requireNonNull(this.level).setBlock(this.worldPosition, blockState, 3); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch new file mode 100644 index 0000000..fac6bd5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/CrafterBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/CrafterBlockEntity.java +@@ -274,7 +_,7 @@ + if (i >= 0) { + crafter.craftingTicksRemaining = i; + if (i == 0) { +- level.setBlock(pos, state.setValue(CrafterBlock.CRAFTING, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(CrafterBlock.CRAFTING, false), 3); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch new file mode 100644 index 0000000..9533a67 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch @@ -0,0 +1,34 @@ +--- a/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java +@@ -98,7 +_,7 @@ + creakingHeart.ticker = creakingHeart.level == null ? 20 : creakingHeart.level.random.nextInt(5) + 20; + if (creakingHeart.creakingInfo == null) { + if (!CreakingHeartBlock.hasRequiredLogs(state, level, pos)) { +- level.setBlock(pos, state.setValue(CreakingHeartBlock.ACTIVE, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(CreakingHeartBlock.ACTIVE, false), 3); + } else if (state.getValue(CreakingHeartBlock.ACTIVE)) { + if (CreakingHeartBlock.isNaturalNight(level)) { + if (level.getDifficulty() != Difficulty.PEACEFUL) { +@@ -126,7 +_,7 @@ + } + + if (!CreakingHeartBlock.hasRequiredLogs(state, level, pos) && creakingHeart.creakingInfo == null) { +- level.setBlock(pos, state.setValue(CreakingHeartBlock.ACTIVE, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, state.setValue(CreakingHeartBlock.ACTIVE, false), 3); + } + } + } +@@ -253,11 +_,11 @@ + if (blockState.isAir()) { + blockState = Blocks.RESIN_CLUMP.defaultBlockState(); + } else if (blockState.is(Blocks.WATER) && blockState.getFluidState().isSource()) { +- blockState = Blocks.RESIN_CLUMP.defaultBlockState().setValue(MultifaceBlock.WATERLOGGED, Boolean.valueOf(true)); ++ blockState = Blocks.RESIN_CLUMP.defaultBlockState().setValue(MultifaceBlock.WATERLOGGED, true); + } + + if (blockState.is(Blocks.RESIN_CLUMP) && !MultifaceBlock.hasFace(blockState, opposite)) { +- this.level.setBlock(blockPos, blockState.setValue(MultifaceBlock.getFaceProperty(opposite), Boolean.valueOf(true)), 3); ++ this.level.setBlock(blockPos, blockState.setValue(MultifaceBlock.getFaceProperty(opposite), true), 3); + mutable.setValue(blockPos); + return BlockPos.TraversalNodeStatus.STOP; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch new file mode 100644 index 0000000..144d086 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java +@@ -78,7 +_,7 @@ + + private void notifyItemChangedInJukebox(boolean hasRecord) { + if (this.level != null && this.level.getBlockState(this.getBlockPos()) == this.getBlockState()) { +- this.level.setBlock(this.getBlockPos(), this.getBlockState().setValue(JukeboxBlock.HAS_RECORD, Boolean.valueOf(hasRecord)), 2); ++ this.level.setBlock(this.getBlockPos(), this.getBlockState().setValue(JukeboxBlock.HAS_RECORD, hasRecord), 2); + this.level.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(this.getBlockState())); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch new file mode 100644 index 0000000..14af95e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java +@@ -121,7 +_,7 @@ + } + + public void bloom(ServerLevel level, BlockPos pos, BlockState state, RandomSource random) { +- level.setBlock(pos, state.setValue(SculkCatalystBlock.PULSE, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, state.setValue(SculkCatalystBlock.PULSE, true), 3); + level.scheduleTick(pos, state.getBlock(), 8); + level.sendParticles(ParticleTypes.SCULK_SOUL, pos.getX() + 0.5, pos.getY() + 1.15, pos.getZ() + 0.5, 2, 0.2, 0.0, 0.2, 0.0); + level.playSound(null, pos, SoundEvents.SCULK_CATALYST_BLOOM, SoundSource.BLOCKS, 2.0F, 0.6F + random.nextFloat() * 0.4F); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java.patch new file mode 100644 index 0000000..1ce3763 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java +@@ -161,7 +_,7 @@ + private void shriek(ServerLevel level, @Nullable Entity sourceEntity) { + BlockPos blockPos = this.getBlockPos(); + BlockState blockState = this.getBlockState(); +- level.setBlock(blockPos, blockState.setValue(SculkShriekerBlock.SHRIEKING, Boolean.valueOf(true)), 2); ++ level.setBlock(blockPos, blockState.setValue(SculkShriekerBlock.SHRIEKING, true), 2); + level.scheduleTick(blockPos, blockState.getBlock(), 90); + level.levelEvent(3007, blockPos, 0); + level.gameEvent(GameEvent.SHRIEK, blockPos, GameEvent.Context.of(sourceEntity)); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch new file mode 100644 index 0000000..4c970f8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java ++++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java +@@ -133,14 +_,14 @@ + } + + public void applyOminous(ServerLevel level, BlockPos pos) { +- level.setBlock(pos, level.getBlockState(pos).setValue(TrialSpawnerBlock.OMINOUS, Boolean.valueOf(true)), 3); ++ level.setBlock(pos, level.getBlockState(pos).setValue(TrialSpawnerBlock.OMINOUS, true), 3); + level.levelEvent(3020, pos, 1); + this.isOminous = true; + this.data.resetAfterBecomingOminous(this, level); + } + + public void removeOminous(ServerLevel level, BlockPos pos) { +- level.setBlock(pos, level.getBlockState(pos).setValue(TrialSpawnerBlock.OMINOUS, Boolean.valueOf(false)), 3); ++ level.setBlock(pos, level.getBlockState(pos).setValue(TrialSpawnerBlock.OMINOUS, false), 3); + this.isOminous = false; + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch new file mode 100644 index 0000000..ef8b82b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java ++++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java +@@ -53,8 +_,8 @@ + .lenientOptionalFieldOf("registered_players", Sets.newHashSet()) + .forGetter(trialSpawnerData -> trialSpawnerData.detectedPlayers), + UUIDUtil.CODEC_SET.lenientOptionalFieldOf("current_mobs", Sets.newHashSet()).forGetter(trialSpawnerData -> trialSpawnerData.currentMobs), +- Codec.LONG.lenientOptionalFieldOf("cooldown_ends_at", Long.valueOf(0L)).forGetter(trialSpawnerData -> trialSpawnerData.cooldownEndsAt), +- Codec.LONG.lenientOptionalFieldOf("next_mob_spawns_at", Long.valueOf(0L)).forGetter(trialSpawnerData -> trialSpawnerData.nextMobSpawnsAt), ++ Codec.LONG.lenientOptionalFieldOf("cooldown_ends_at", 0L).forGetter(trialSpawnerData -> trialSpawnerData.cooldownEndsAt), ++ Codec.LONG.lenientOptionalFieldOf("next_mob_spawns_at", 0L).forGetter(trialSpawnerData -> trialSpawnerData.nextMobSpawnsAt), + Codec.intRange(0, Integer.MAX_VALUE) + .lenientOptionalFieldOf("total_mobs_spawned", 0) + .forGetter(trialSpawnerData -> trialSpawnerData.totalMobsSpawned), diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultConfig.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultConfig.java.patch new file mode 100644 index 0000000..782685a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultConfig.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/level/block/entity/vault/VaultConfig.java ++++ b/net/minecraft/world/level/block/entity/vault/VaultConfig.java +@@ -26,9 +_,9 @@ + static Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ResourceKey.codec(Registries.LOOT_TABLE).lenientOptionalFieldOf("loot_table", DEFAULT.lootTable()).forGetter(VaultConfig::lootTable), +- Codec.DOUBLE.lenientOptionalFieldOf("activation_range", Double.valueOf(DEFAULT.activationRange())).forGetter(VaultConfig::activationRange), ++ Codec.DOUBLE.lenientOptionalFieldOf("activation_range", DEFAULT.activationRange()).forGetter(VaultConfig::activationRange), + Codec.DOUBLE +- .lenientOptionalFieldOf("deactivation_range", Double.valueOf(DEFAULT.deactivationRange())) ++ .lenientOptionalFieldOf("deactivation_range", DEFAULT.deactivationRange()) + .forGetter(VaultConfig::deactivationRange), + ItemStack.lenientOptionalFieldOf("key_item").forGetter(VaultConfig::keyItem), + ResourceKey.codec(Registries.LOOT_TABLE) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultServerData.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultServerData.java.patch new file mode 100644 index 0000000..eeb63f8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultServerData.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/level/block/entity/vault/VaultServerData.java ++++ b/net/minecraft/world/level/block/entity/vault/VaultServerData.java +@@ -21,11 +_,11 @@ + instance -> instance.group( + UUIDUtil.CODEC_LINKED_SET.lenientOptionalFieldOf("rewarded_players", Set.of()).forGetter(vaultServerData -> vaultServerData.rewardedPlayers), + Codec.LONG +- .lenientOptionalFieldOf("state_updating_resumes_at", Long.valueOf(0L)) ++ .lenientOptionalFieldOf("state_updating_resumes_at", 0L) + .forGetter(vaultServerData -> vaultServerData.stateUpdatingResumesAt), + ItemStack.CODEC.listOf().lenientOptionalFieldOf("items_to_eject", List.of()).forGetter(vaultServerData -> vaultServerData.itemsToEject), + Codec.INT +- .lenientOptionalFieldOf("total_ejections_needed", Integer.valueOf(0)) ++ .lenientOptionalFieldOf("total_ejections_needed", 0) + .forGetter(vaultServerData -> vaultServerData.totalEjectionsNeeded) + ) + .apply(instance, VaultServerData::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultSharedData.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultSharedData.java.patch new file mode 100644 index 0000000..497ca4e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/vault/VaultSharedData.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/entity/vault/VaultSharedData.java ++++ b/net/minecraft/world/level/block/entity/vault/VaultSharedData.java +@@ -18,7 +_,7 @@ + ItemStack.lenientOptionalFieldOf("display_item").forGetter(vaultSharedData -> vaultSharedData.displayItem), + UUIDUtil.CODEC_LINKED_SET.lenientOptionalFieldOf("connected_players", Set.of()).forGetter(vaultSharedData -> vaultSharedData.connectedPlayers), + Codec.DOUBLE +- .lenientOptionalFieldOf("connected_particles_range", Double.valueOf(VaultConfig.DEFAULT.deactivationRange())) ++ .lenientOptionalFieldOf("connected_particles_range", VaultConfig.DEFAULT.deactivationRange()) + .forGetter(vaultSharedData -> vaultSharedData.connectedParticlesRange) + ) + .apply(instance, VaultSharedData::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch new file mode 100644 index 0000000..845b8e3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java ++++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java +@@ -67,7 +_,7 @@ + + public PistonBaseBlock(boolean isSticky, BlockBehaviour.Properties properties) { + super(properties); +- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(EXTENDED, Boolean.valueOf(false))); ++ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(EXTENDED, false)); + this.isSticky = isSticky; + } + +@@ -119,7 +_,7 @@ + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { +- return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()).setValue(EXTENDED, Boolean.valueOf(false)); ++ return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()).setValue(EXTENDED, false); + } + + private void checkIfExtend(Level level, BlockPos pos, BlockState state) { +@@ -180,7 +_,7 @@ + return false; + } + // Paper end - Protect Bedrock and End Portal/Frames from being destroyed +- BlockState blockState = state.setValue(EXTENDED, Boolean.valueOf(true)); ++ BlockState blockState = state.setValue(EXTENDED, true); + if (!level.isClientSide) { + boolean neighborSignal = this.getNeighborSignal(level, pos, direction); + if (neighborSignal && (id == 1 || id == 2)) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonHeadBlock.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonHeadBlock.java.patch new file mode 100644 index 0000000..41fc2b5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonHeadBlock.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/block/piston/PistonHeadBlock.java ++++ b/net/minecraft/world/level/block/piston/PistonHeadBlock.java +@@ -90,7 +_,7 @@ + public PistonHeadBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( +- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TYPE, PistonType.DEFAULT).setValue(SHORT, Boolean.valueOf(false)) ++ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TYPE, PistonType.DEFAULT).setValue(SHORT, false) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java.patch new file mode 100644 index 0000000..9a22498 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java ++++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +@@ -101,7 +_,7 @@ + return !this.isExtending() && this.isSourcePiston() && this.movedState.getBlock() instanceof PistonBaseBlock + ? Blocks.PISTON_HEAD + .defaultBlockState() +- .setValue(PistonHeadBlock.SHORT, Boolean.valueOf(this.progress > 0.25F)) ++ .setValue(PistonHeadBlock.SHORT, this.progress > 0.25F) + .setValue(PistonHeadBlock.TYPE, this.movedState.is(Blocks.STICKY_PISTON) ? PistonType.STICKY : PistonType.DEFAULT) + .setValue(PistonHeadBlock.FACING, this.movedState.getValue(PistonBaseBlock.FACING)) + : this.movedState; +@@ -307,7 +_,7 @@ + Block.updateOrDestroy(blockEntity.movedState, blockState, level, pos, 3); + } else { + if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED)) { +- blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false)); ++ blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, false); + } + + level.setBlock(pos, blockState, 67); +@@ -353,7 +_,7 @@ + public VoxelShape getCollisionShape(BlockGetter level, BlockPos pos) { + VoxelShape collisionShape; + if (!this.extending && this.isSourcePiston && this.movedState.getBlock() instanceof PistonBaseBlock) { +- collisionShape = this.movedState.setValue(PistonBaseBlock.EXTENDED, Boolean.valueOf(true)).getCollisionShape(level, pos); ++ collisionShape = this.movedState.setValue(PistonBaseBlock.EXTENDED, true).getCollisionShape(level, pos); + } else { + collisionShape = Shapes.empty(); + } +@@ -367,7 +_,7 @@ + blockState = Blocks.PISTON_HEAD + .defaultBlockState() + .setValue(PistonHeadBlock.FACING, this.direction) +- .setValue(PistonHeadBlock.SHORT, Boolean.valueOf(this.extending != 1.0F - this.progress < 0.25F)); ++ .setValue(PistonHeadBlock.SHORT, this.extending != 1.0F - this.progress < 0.25F); + } else { + blockState = this.movedState; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/BooleanProperty.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/BooleanProperty.java.patch new file mode 100644 index 0000000..d14ec23 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/BooleanProperty.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/level/block/state/properties/BooleanProperty.java ++++ b/net/minecraft/world/level/block/state/properties/BooleanProperty.java +@@ -9,11 +_,11 @@ + private static final int FALSE_INDEX = 1; + + // Paper start - optimise blockstate property access +- private static final Boolean[] BY_ID = new Boolean[]{ Boolean.FALSE, Boolean.TRUE }; ++ private static final Boolean[] BY_ID = new Boolean[]{ false, true }; + + @Override + public final int moonrise$getIdFor(final Boolean value) { +- return value.booleanValue() ? 1 : 0; ++ return value ? 1 : 0; + } + // Paper end - optimise blockstate property access + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/IntegerProperty.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/IntegerProperty.java.patch new file mode 100644 index 0000000..815e4e3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/block/state/properties/IntegerProperty.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/block/state/properties/IntegerProperty.java ++++ b/net/minecraft/world/level/block/state/properties/IntegerProperty.java +@@ -13,7 +_,7 @@ + // Paper start - optimise blockstate property access + @Override + public final int moonrise$getIdFor(final Integer value) { +- final int val = value.intValue(); ++ final int val = value; + final int ret = val - this.min; + + return ret | ((this.max - ret) >> 31); +@@ -25,7 +_,7 @@ + + final Integer[] byId = new Integer[max - min + 1]; + for (int i = min; i <= max; ++i) { +- byId[i - min] = Integer.valueOf(i); ++ byId[i - min] = i; + } + + this.moonrise$setById(byId); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/chunk/UpgradeData.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/chunk/UpgradeData.java.patch new file mode 100644 index 0000000..2ce4d0a --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/chunk/UpgradeData.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/chunk/UpgradeData.java ++++ b/net/minecraft/world/level/chunk/UpgradeData.java +@@ -434,7 +_,7 @@ + for (BlockPos blockPos : set) { + BlockState blockState = level.getBlockState(blockPos); + if (blockState.getValue(BlockStateProperties.DISTANCE) >= i1) { +- level.setBlock(blockPos, blockState.setValue(BlockStateProperties.DISTANCE, Integer.valueOf(i1)), 18); ++ level.setBlock(blockPos, blockState.setValue(BlockStateProperties.DISTANCE, i1), 18); + if (i != 7) { + for (Direction direction : DIRECTIONS) { + mutableBlockPos.setWithOffset(blockPos, direction); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch new file mode 100644 index 0000000..b8da474 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java ++++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java +@@ -622,7 +_,7 @@ + Codec.BOOL.fieldOf("NeedsStateScanning").orElse(true).forGetter(EndDragonFight.Data::needsStateScanning), + Codec.BOOL.fieldOf("DragonKilled").orElse(false).forGetter(EndDragonFight.Data::dragonKilled), + Codec.BOOL.fieldOf("PreviouslyKilled").orElse(false).forGetter(EndDragonFight.Data::previouslyKilled), +- Codec.BOOL.lenientOptionalFieldOf("IsRespawning", Boolean.valueOf(false)).forGetter(EndDragonFight.Data::isRespawning), ++ Codec.BOOL.lenientOptionalFieldOf("IsRespawning", false).forGetter(EndDragonFight.Data::isRespawning), + UUIDUtil.CODEC.lenientOptionalFieldOf("Dragon").forGetter(EndDragonFight.Data::dragonUUID), + BlockPos.CODEC.lenientOptionalFieldOf("ExitPortalLocation").forGetter(EndDragonFight.Data::exitPortalLocation), + Codec.list(Codec.INT).lenientOptionalFieldOf("Gateways").forGetter(EndDragonFight.Data::gateways) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/CarverDebugSettings.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/CarverDebugSettings.java.patch new file mode 100644 index 0000000..04d7af3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/CarverDebugSettings.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/carver/CarverDebugSettings.java ++++ b/net/minecraft/world/level/levelgen/carver/CarverDebugSettings.java +@@ -15,7 +_,7 @@ + ); + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( +- Codec.BOOL.optionalFieldOf("debug_mode", Boolean.valueOf(false)).forGetter(CarverDebugSettings::isDebugMode), ++ Codec.BOOL.optionalFieldOf("debug_mode", false).forGetter(CarverDebugSettings::isDebugMode), + BlockState.CODEC.optionalFieldOf("air_state", DEFAULT.getAirState()).forGetter(CarverDebugSettings::getAirState), + BlockState.CODEC.optionalFieldOf("water_state", DEFAULT.getAirState()).forGetter(CarverDebugSettings::getWaterState), + BlockState.CODEC.optionalFieldOf("lava_state", DEFAULT.getAirState()).forGetter(CarverDebugSettings::getLavaState), diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/WorldCarver.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/WorldCarver.java.patch new file mode 100644 index 0000000..9a080b1 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/carver/WorldCarver.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/carver/WorldCarver.java ++++ b/net/minecraft/world/level/levelgen/carver/WorldCarver.java +@@ -185,7 +_,7 @@ + } else if (state.is(Blocks.WATER)) { + BlockState waterState = config.debugSettings.getWaterState(); + return waterState.hasProperty(BlockStateProperties.WATERLOGGED) +- ? waterState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)) ++ ? waterState.setValue(BlockStateProperties.WATERLOGGED, true) + : waterState; + } else { + return state.is(Blocks.LAVA) ? config.debugSettings.getLavaState() : state; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/BambooFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/BambooFeature.java.patch new file mode 100644 index 0000000..2783101 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/BambooFeature.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/world/level/levelgen/feature/BambooFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/BambooFeature.java +@@ -15,11 +_,11 @@ + public class BambooFeature extends Feature { + private static final BlockState BAMBOO_TRUNK = Blocks.BAMBOO + .defaultBlockState() +- .setValue(BambooStalkBlock.AGE, Integer.valueOf(1)) ++ .setValue(BambooStalkBlock.AGE, 1) + .setValue(BambooStalkBlock.LEAVES, BambooLeaves.NONE) +- .setValue(BambooStalkBlock.STAGE, Integer.valueOf(0)); ++ .setValue(BambooStalkBlock.STAGE, 0); + private static final BlockState BAMBOO_FINAL_LARGE = BAMBOO_TRUNK.setValue(BambooStalkBlock.LEAVES, BambooLeaves.LARGE) +- .setValue(BambooStalkBlock.STAGE, Integer.valueOf(1)); ++ .setValue(BambooStalkBlock.STAGE, 1); + private static final BlockState BAMBOO_TOP_LARGE = BAMBOO_TRUNK.setValue(BambooStalkBlock.LEAVES, BambooLeaves.LARGE); + private static final BlockState BAMBOO_TOP_SMALL = BAMBOO_TRUNK.setValue(BambooStalkBlock.LEAVES, BambooLeaves.SMALL); + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/CoralFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/CoralFeature.java.patch new file mode 100644 index 0000000..b4ec52f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/CoralFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/CoralFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/CoralFeature.java +@@ -44,7 +_,7 @@ + .map(Holder::value) + .ifPresent(block -> level.setBlock(blockPos, block.defaultBlockState(), 2)); + } else if (random.nextFloat() < 0.05F) { +- level.setBlock(blockPos, Blocks.SEA_PICKLE.defaultBlockState().setValue(SeaPickleBlock.PICKLES, Integer.valueOf(random.nextInt(4) + 1)), 2); ++ level.setBlock(blockPos, Blocks.SEA_PICKLE.defaultBlockState().setValue(SeaPickleBlock.PICKLES, random.nextInt(4) + 1), 2); + } + + for (Direction direction : Direction.Plane.HORIZONTAL) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/DripstoneUtils.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/DripstoneUtils.java.patch new file mode 100644 index 0000000..7648e82 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/DripstoneUtils.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/DripstoneUtils.java ++++ b/net/minecraft/world/level/levelgen/feature/DripstoneUtils.java +@@ -78,7 +_,7 @@ + BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); + buildBaseToTipColumn(direction, height, mergeTip, blockState -> { + if (blockState.is(Blocks.POINTED_DRIPSTONE)) { +- blockState = blockState.setValue(PointedDripstoneBlock.WATERLOGGED, Boolean.valueOf(level.isWaterAt(mutableBlockPos))); ++ blockState = blockState.setValue(PointedDripstoneBlock.WATERLOGGED, level.isWaterAt(mutableBlockPos)); + } + + level.setBlock(mutableBlockPos, blockState, 2); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/FeatureCountTracker.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/FeatureCountTracker.java.patch new file mode 100644 index 0000000..dcaa16e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/FeatureCountTracker.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/FeatureCountTracker.java ++++ b/net/minecraft/world/level/levelgen/feature/FeatureCountTracker.java +@@ -71,7 +_,7 @@ + string1 + + " " + + String.format(Locale.ROOT, "%10d ", integer) +- + String.format(Locale.ROOT, "%10f ", (double)integer.intValue() / value.intValue()) ++ + String.format(Locale.ROOT, "%10f ", (double) integer / value) + + featureData.topFeature().flatMap(registry::getResourceKey).map(ResourceKey::location) + + " " + + featureData.feature().feature() diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/GeodeFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/GeodeFeature.java.patch new file mode 100644 index 0000000..95b0593 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/GeodeFeature.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/levelgen/feature/GeodeFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/GeodeFeature.java +@@ -102,7 +_,7 @@ + double d8 = 0.0; + + for (Pair pair : list) { +- d7 += Mth.invSqrt(blockPos2.distSqr(pair.getFirst()) + pair.getSecond().intValue()) + d6; ++ d7 += Mth.invSqrt(blockPos2.distSqr(pair.getFirst()) + pair.getSecond()) + d6; + } + + for (BlockPos blockPos3 : list1) { +@@ -155,7 +_,7 @@ + BlockPos blockPos5 = blockPos1.relative(direction1); + BlockState blockState1 = worldGenLevel.getBlockState(blockPos5); + if (blockState.hasProperty(BlockStateProperties.WATERLOGGED)) { +- blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(blockState1.getFluidState().isSource())); ++ blockState = blockState.setValue(BlockStateProperties.WATERLOGGED, blockState1.getFluidState().isSource()); + } + + if (BuddingAmethystBlock.canClusterGrowAtState(blockState1)) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeBrownMushroomFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeBrownMushroomFeature.java.patch new file mode 100644 index 0000000..8ff889b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeBrownMushroomFeature.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/world/level/levelgen/feature/HugeBrownMushroomFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/HugeBrownMushroomFeature.java +@@ -39,10 +_,10 @@ + && state.hasProperty(HugeMushroomBlock.EAST) + && state.hasProperty(HugeMushroomBlock.NORTH) + && state.hasProperty(HugeMushroomBlock.SOUTH)) { +- state = state.setValue(HugeMushroomBlock.WEST, Boolean.valueOf(flag6)) +- .setValue(HugeMushroomBlock.EAST, Boolean.valueOf(flag7)) +- .setValue(HugeMushroomBlock.NORTH, Boolean.valueOf(flag8)) +- .setValue(HugeMushroomBlock.SOUTH, Boolean.valueOf(flag9)); ++ state = state.setValue(HugeMushroomBlock.WEST, flag6) ++ .setValue(HugeMushroomBlock.EAST, flag7) ++ .setValue(HugeMushroomBlock.NORTH, flag8) ++ .setValue(HugeMushroomBlock.SOUTH, flag9); + } + + this.setBlock(level, mutablePos, state); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeRedMushroomFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeRedMushroomFeature.java.patch new file mode 100644 index 0000000..62c0710 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/HugeRedMushroomFeature.java.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/world/level/levelgen/feature/HugeRedMushroomFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/HugeRedMushroomFeature.java +@@ -38,11 +_,11 @@ + && state.hasProperty(HugeMushroomBlock.NORTH) + && state.hasProperty(HugeMushroomBlock.SOUTH) + && state.hasProperty(HugeMushroomBlock.UP)) { +- state = state.setValue(HugeMushroomBlock.UP, Boolean.valueOf(i >= treeHeight - 1)) +- .setValue(HugeMushroomBlock.WEST, Boolean.valueOf(i3 < -i2)) +- .setValue(HugeMushroomBlock.EAST, Boolean.valueOf(i3 > i2)) +- .setValue(HugeMushroomBlock.NORTH, Boolean.valueOf(i4 < -i2)) +- .setValue(HugeMushroomBlock.SOUTH, Boolean.valueOf(i4 > i2)); ++ state = state.setValue(HugeMushroomBlock.UP, i >= treeHeight - 1) ++ .setValue(HugeMushroomBlock.WEST, i3 < -i2) ++ .setValue(HugeMushroomBlock.EAST, i3 > i2) ++ .setValue(HugeMushroomBlock.NORTH, i4 < -i2) ++ .setValue(HugeMushroomBlock.SOUTH, i4 > i2); + } + + this.setBlock(level, mutablePos, state); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/KelpFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/KelpFeature.java.patch new file mode 100644 index 0000000..7793c3d --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/KelpFeature.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/levelgen/feature/KelpFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/KelpFeature.java +@@ -33,7 +_,7 @@ + && worldGenLevel.getBlockState(blockPos1.above()).is(Blocks.WATER) + && blockState1.canSurvive(worldGenLevel, blockPos1)) { + if (i2 == i1) { +- worldGenLevel.setBlock(blockPos1, blockState.setValue(KelpBlock.AGE, Integer.valueOf(randomSource.nextInt(4) + 20)), 2); ++ worldGenLevel.setBlock(blockPos1, blockState.setValue(KelpBlock.AGE, randomSource.nextInt(4) + 20), 2); + i++; + } else { + worldGenLevel.setBlock(blockPos1, blockState1, 2); +@@ -41,7 +_,7 @@ + } else if (i2 > 0) { + BlockPos blockPos2 = blockPos1.below(); + if (blockState.canSurvive(worldGenLevel, blockPos2) && !worldGenLevel.getBlockState(blockPos2.below()).is(Blocks.KELP)) { +- worldGenLevel.setBlock(blockPos2, blockState.setValue(KelpBlock.AGE, Integer.valueOf(randomSource.nextInt(4) + 20)), 2); ++ worldGenLevel.setBlock(blockPos2, blockState.setValue(KelpBlock.AGE, randomSource.nextInt(4) + 20), 2); + i++; + } + break; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SculkPatchFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SculkPatchFeature.java.patch new file mode 100644 index 0000000..15adfd8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SculkPatchFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/SculkPatchFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/SculkPatchFeature.java +@@ -57,7 +_,7 @@ + if (worldGenLevel.getBlockState(blockPos2).isAir() + && worldGenLevel.getBlockState(blockPos2.below()).isFaceSturdy(worldGenLevel, blockPos2.below(), Direction.UP)) { + worldGenLevel.setBlock( +- blockPos2, Blocks.SCULK_SHRIEKER.defaultBlockState().setValue(SculkShriekerBlock.CAN_SUMMON, Boolean.valueOf(true)), 3 ++ blockPos2, Blocks.SCULK_SHRIEKER.defaultBlockState().setValue(SculkShriekerBlock.CAN_SUMMON, true), 3 + ); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SeaPickleFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SeaPickleFeature.java.patch new file mode 100644 index 0000000..5100502 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SeaPickleFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/SeaPickleFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/SeaPickleFeature.java +@@ -28,7 +_,7 @@ + int i4 = randomSource.nextInt(8) - randomSource.nextInt(8); + int height = worldGenLevel.getHeight(Heightmap.Types.OCEAN_FLOOR, blockPos.getX() + i3, blockPos.getZ() + i4); + BlockPos blockPos1 = new BlockPos(blockPos.getX() + i3, height, blockPos.getZ() + i4); +- BlockState blockState = Blocks.SEA_PICKLE.defaultBlockState().setValue(SeaPickleBlock.PICKLES, Integer.valueOf(randomSource.nextInt(4) + 1)); ++ BlockState blockState = Blocks.SEA_PICKLE.defaultBlockState().setValue(SeaPickleBlock.PICKLES, randomSource.nextInt(4) + 1); + if (worldGenLevel.getBlockState(blockPos1).is(Blocks.WATER) && blockState.canSurvive(worldGenLevel, blockPos1)) { + worldGenLevel.setBlock(blockPos1, blockState, 2); + i++; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SnowAndFreezeFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SnowAndFreezeFeature.java.patch new file mode 100644 index 0000000..cc1bd4e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SnowAndFreezeFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/SnowAndFreezeFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/SnowAndFreezeFeature.java +@@ -39,7 +_,7 @@ + worldGenLevel.setBlock(mutableBlockPos, Blocks.SNOW.defaultBlockState(), 2); + BlockState blockState = worldGenLevel.getBlockState(mutableBlockPos1); + if (blockState.hasProperty(SnowyDirtBlock.SNOWY)) { +- worldGenLevel.setBlock(mutableBlockPos1, blockState.setValue(SnowyDirtBlock.SNOWY, Boolean.valueOf(true)), 2); ++ worldGenLevel.setBlock(mutableBlockPos1, blockState.setValue(SnowyDirtBlock.SNOWY, true), 2); + } + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SpikeFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SpikeFeature.java.patch new file mode 100644 index 0000000..0ebfcf7 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/SpikeFeature.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/world/level/levelgen/feature/SpikeFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/SpikeFeature.java +@@ -97,10 +_,10 @@ + boolean flag4 = i4 == -2 || i4 == 2 || flag2; + BlockState blockState = Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(flag3 && i4 != -2)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(flag3 && i4 != 2)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(flag4 && i3 != -2)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(flag4 && i3 != 2)); ++ .setValue(IronBarsBlock.NORTH, flag3 && i4 != -2) ++ .setValue(IronBarsBlock.SOUTH, flag3 && i4 != 2) ++ .setValue(IronBarsBlock.WEST, flag4 && i3 != -2) ++ .setValue(IronBarsBlock.EAST, flag4 && i3 != 2); + this.setBlock(level, mutableBlockPos.set(spike.getCenterX() + i3, spike.getHeight() + i5, spike.getCenterZ() + i4), blockState); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TreeFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TreeFeature.java.patch new file mode 100644 index 0000000..28f2c23 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TreeFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/TreeFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/TreeFeature.java +@@ -198,7 +_,7 @@ + if (box.isInside(blockPos1)) { + if (i2 != 0) { + BlockState blockState = level.getBlockState(blockPos1); +- setBlockKnownShape(level, blockPos1, blockState.setValue(BlockStateProperties.DISTANCE, Integer.valueOf(i2))); ++ setBlockKnownShape(level, blockPos1, blockState.setValue(BlockStateProperties.DISTANCE, i2)); + } + + discreteVoxelShape.fill(blockPos1.getX() - box.minX(), blockPos1.getY() - box.minY(), blockPos1.getZ() - box.minZ()); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TwistingVinesFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TwistingVinesFeature.java.patch new file mode 100644 index 0000000..80a6704 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/TwistingVinesFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/TwistingVinesFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/TwistingVinesFeature.java +@@ -76,7 +_,7 @@ + if (i == length || !level.isEmptyBlock(pos.above())) { + level.setBlock( + pos, +- Blocks.TWISTING_VINES.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, Integer.valueOf(Mth.nextInt(random, minAge, maxAge))), ++ Blocks.TWISTING_VINES.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, Mth.nextInt(random, minAge, maxAge)), + 2 + ); + break; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/VinesFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/VinesFeature.java.patch new file mode 100644 index 0000000..1375efc --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/VinesFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/VinesFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/VinesFeature.java +@@ -24,7 +_,7 @@ + for (Direction direction : Direction.values()) { + if (direction != Direction.DOWN && VineBlock.isAcceptableNeighbour(worldGenLevel, blockPos.relative(direction), direction)) { + worldGenLevel.setBlock( +- blockPos, Blocks.VINE.defaultBlockState().setValue(VineBlock.getPropertyForFace(direction), Boolean.valueOf(true)), 2 ++ blockPos, Blocks.VINE.defaultBlockState().setValue(VineBlock.getPropertyForFace(direction), true), 2 + ); + return true; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WaterloggedVegetationPatchFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WaterloggedVegetationPatchFeature.java.patch new file mode 100644 index 0000000..e6d5f4c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WaterloggedVegetationPatchFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/WaterloggedVegetationPatchFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/WaterloggedVegetationPatchFeature.java +@@ -60,7 +_,7 @@ + if (super.placeVegetation(level, config, chunkGenerator, random, pos.below())) { + BlockState blockState = level.getBlockState(pos); + if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && !blockState.getValue(BlockStateProperties.WATERLOGGED)) { +- level.setBlock(pos, blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true)), 2); ++ level.setBlock(pos, blockState.setValue(BlockStateProperties.WATERLOGGED, true), 2); + } + + return true; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WeepingVinesFeature.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WeepingVinesFeature.java.patch new file mode 100644 index 0000000..254c206 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/WeepingVinesFeature.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/WeepingVinesFeature.java ++++ b/net/minecraft/world/level/levelgen/feature/WeepingVinesFeature.java +@@ -101,7 +_,7 @@ + if (i == height || !level.isEmptyBlock(pos.below())) { + level.setBlock( + pos, +- Blocks.WEEPING_VINES.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, Integer.valueOf(Mth.nextInt(random, minAge, maxAge))), ++ Blocks.WEEPING_VINES.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, Mth.nextInt(random, minAge, maxAge)), + 2 + ); + break; diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/configurations/SimpleBlockConfiguration.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/configurations/SimpleBlockConfiguration.java.patch new file mode 100644 index 0000000..eb71e85 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/configurations/SimpleBlockConfiguration.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/configurations/SimpleBlockConfiguration.java ++++ b/net/minecraft/world/level/levelgen/feature/configurations/SimpleBlockConfiguration.java +@@ -9,7 +_,7 @@ + instance -> instance.group( + BlockStateProvider.CODEC.fieldOf("to_place").forGetter(config -> config.toPlace), + Codec.BOOL +- .optionalFieldOf("schedule_tick", Boolean.valueOf(false)) ++ .optionalFieldOf("schedule_tick", false) + .forGetter(simpleBlockConfiguration -> simpleBlockConfiguration.scheduleTick) + ) + .apply(instance, SimpleBlockConfiguration::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java.patch new file mode 100644 index 0000000..12dfec7 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java ++++ b/net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java +@@ -165,13 +_,13 @@ + LevelSimulatedReader level, FoliagePlacer.FoliageSetter foliageSetter, RandomSource random, TreeConfiguration treeConfiguration, BlockPos pos + ) { + boolean isStateAtPosition = level.isStateAtPosition( +- pos, blockState -> blockState.getValueOrElse(BlockStateProperties.PERSISTENT, Boolean.valueOf(false)) ++ pos, blockState -> blockState.getValueOrElse(BlockStateProperties.PERSISTENT, false) + ); + if (!isStateAtPosition && TreeFeature.validTreePos(level, pos)) { + BlockState state = treeConfiguration.foliageProvider.getState(random, pos); + if (state.hasProperty(BlockStateProperties.WATERLOGGED)) { + state = state.setValue( +- BlockStateProperties.WATERLOGGED, Boolean.valueOf(level.isFluidAtPosition(pos, fluidState -> fluidState.isSourceOfType(Fluids.WATER))) ++ BlockStateProperties.WATERLOGGED, level.isFluidAtPosition(pos, fluidState -> fluidState.isSourceOfType(Fluids.WATER)) + ); + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/rootplacers/RootPlacer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/rootplacers/RootPlacer.java.patch new file mode 100644 index 0000000..c2df860 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/rootplacers/RootPlacer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/rootplacers/RootPlacer.java ++++ b/net/minecraft/world/level/levelgen/feature/rootplacers/RootPlacer.java +@@ -75,7 +_,7 @@ + protected BlockState getPotentiallyWaterloggedState(LevelSimulatedReader level, BlockPos pos, BlockState state) { + if (state.hasProperty(BlockStateProperties.WATERLOGGED)) { + boolean isFluidAtPosition = level.isFluidAtPosition(pos, fluidState -> fluidState.is(FluidTags.WATER)); +- return state.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(isFluidAtPosition)); ++ return state.setValue(BlockStateProperties.WATERLOGGED, isFluidAtPosition); + } else { + return state; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/DualNoiseProvider.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/DualNoiseProvider.java.patch new file mode 100644 index 0000000..8de802c --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/DualNoiseProvider.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/stateproviders/DualNoiseProvider.java ++++ b/net/minecraft/world/level/levelgen/feature/stateproviders/DualNoiseProvider.java +@@ -54,7 +_,7 @@ + @Override + public BlockState getState(RandomSource random, BlockPos pos) { + double slowNoiseValue = this.getSlowNoiseValue(pos); +- int i = (int)Mth.clampedMap(slowNoiseValue, -1.0, 1.0, (double)this.variety.minInclusive().intValue(), (double)(this.variety.maxInclusive() + 1)); ++ int i = (int)Mth.clampedMap(slowNoiseValue, -1.0, 1.0, (double) this.variety.minInclusive(), (double)(this.variety.maxInclusive() + 1)); + List list = Lists.newArrayListWithCapacity(i); + + for (int i1 = 0; i1 < i; i1++) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/RandomizedIntStateProvider.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/RandomizedIntStateProvider.java.patch new file mode 100644 index 0000000..76066f4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/stateproviders/RandomizedIntStateProvider.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/stateproviders/RandomizedIntStateProvider.java ++++ b/net/minecraft/world/level/levelgen/feature/stateproviders/RandomizedIntStateProvider.java +@@ -65,7 +_,7 @@ + this.property = integerProperty; + } + +- return state.setValue(this.property, Integer.valueOf(this.values.sample(random))); ++ return state.setValue(this.property, this.values.sample(random)); + } + + @Nullable diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java.patch new file mode 100644 index 0000000..2d745d3 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java ++++ b/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java +@@ -45,7 +_,7 @@ + blockPos1, + Blocks.COCOA + .defaultBlockState() +- .setValue(CocoaBlock.AGE, Integer.valueOf(randomSource.nextInt(3))) ++ .setValue(CocoaBlock.AGE, randomSource.nextInt(3)) + .setValue(CocoaBlock.FACING, direction) + ); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java.patch new file mode 100644 index 0000000..19cb0b9 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java ++++ b/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java +@@ -50,8 +_,8 @@ + optional.get(), + Blocks.CREAKING_HEART + .defaultBlockState() +- .setValue(CreakingHeartBlock.ACTIVE, Boolean.valueOf(true)) +- .setValue(CreakingHeartBlock.NATURAL, Boolean.valueOf(true)) ++ .setValue(CreakingHeartBlock.ACTIVE, true) ++ .setValue(CreakingHeartBlock.NATURAL, true) + ); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java.patch new file mode 100644 index 0000000..b0f58a5 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java ++++ b/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java +@@ -83,10 +_,10 @@ + + private static void addMossHanger(BlockPos pos, TreeDecorator.Context context) { + while (context.isAir(pos.below()) && !(context.random().nextFloat() < 0.5)) { +- context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, Boolean.valueOf(false))); ++ context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, false)); + pos = pos.below(); + } + +- context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, Boolean.valueOf(true))); ++ context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, true)); + } + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java.patch new file mode 100644 index 0000000..e3a7926 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java ++++ b/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java +@@ -53,7 +_,7 @@ + } + + public void placeVine(BlockPos pos, BooleanProperty sideProperty) { +- this.setBlock(pos, Blocks.VINE.defaultBlockState().setValue(sideProperty, Boolean.valueOf(true))); ++ this.setBlock(pos, Blocks.VINE.defaultBlockState().setValue(sideProperty, true)); + } + + public void setBlock(BlockPos pos, BlockState state) { diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/heightproviders/TrapezoidHeight.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/heightproviders/TrapezoidHeight.java.patch new file mode 100644 index 0000000..bce8bbf --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/heightproviders/TrapezoidHeight.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/heightproviders/TrapezoidHeight.java ++++ b/net/minecraft/world/level/levelgen/heightproviders/TrapezoidHeight.java +@@ -15,7 +_,7 @@ + instance -> instance.group( + VerticalAnchor.CODEC.fieldOf("min_inclusive").forGetter(provider -> provider.minInclusive), + VerticalAnchor.CODEC.fieldOf("max_inclusive").forGetter(provider -> provider.maxInclusive), +- Codec.INT.optionalFieldOf("plateau", Integer.valueOf(0)).forGetter(provider -> provider.plateau) ++ Codec.INT.optionalFieldOf("plateau", 0).forGetter(provider -> provider.plateau) + ) + .apply(instance, TrapezoidHeight::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java.patch new file mode 100644 index 0000000..a5730f9 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java ++++ b/net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java +@@ -11,8 +_,8 @@ + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + Heightmap.Types.CODEC.fieldOf("heightmap").forGetter(filter -> filter.heightmap), +- Codec.INT.optionalFieldOf("min_inclusive", Integer.valueOf(Integer.MIN_VALUE)).forGetter(filter -> filter.minInclusive), +- Codec.INT.optionalFieldOf("max_inclusive", Integer.valueOf(Integer.MAX_VALUE)).forGetter(filter -> filter.maxInclusive) ++ Codec.INT.optionalFieldOf("min_inclusive", Integer.MIN_VALUE).forGetter(filter -> filter.minInclusive), ++ Codec.INT.optionalFieldOf("max_inclusive", Integer.MAX_VALUE).forGetter(filter -> filter.maxInclusive) + ) + .apply(instance, SurfaceRelativeThresholdFilter::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/JungleTemplePiece.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/JungleTemplePiece.java.patch new file mode 100644 index 0000000..e23b0bc --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/JungleTemplePiece.java.patch @@ -0,0 +1,121 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/JungleTemplePiece.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/JungleTemplePiece.java +@@ -168,7 +_,7 @@ + Blocks.TRIPWIRE_HOOK + .defaultBlockState() + .setValue(TripWireHookBlock.FACING, Direction.EAST) +- .setValue(TripWireHookBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireHookBlock.ATTACHED, true), + 1, + -3, + 8, +@@ -179,7 +_,7 @@ + Blocks.TRIPWIRE_HOOK + .defaultBlockState() + .setValue(TripWireHookBlock.FACING, Direction.WEST) +- .setValue(TripWireHookBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireHookBlock.ATTACHED, true), + 4, + -3, + 8, +@@ -189,9 +_,9 @@ + level, + Blocks.TRIPWIRE + .defaultBlockState() +- .setValue(TripWireBlock.EAST, Boolean.valueOf(true)) +- .setValue(TripWireBlock.WEST, Boolean.valueOf(true)) +- .setValue(TripWireBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireBlock.EAST, true) ++ .setValue(TripWireBlock.WEST, true) ++ .setValue(TripWireBlock.ATTACHED, true), + 2, + -3, + 8, +@@ -201,9 +_,9 @@ + level, + Blocks.TRIPWIRE + .defaultBlockState() +- .setValue(TripWireBlock.EAST, Boolean.valueOf(true)) +- .setValue(TripWireBlock.WEST, Boolean.valueOf(true)) +- .setValue(TripWireBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireBlock.EAST, true) ++ .setValue(TripWireBlock.WEST, true) ++ .setValue(TripWireBlock.ATTACHED, true), + 3, + -3, + 8, +@@ -246,13 +_,13 @@ + this.placedTrap1 = this.createDispenser(level, box, random, 3, -2, 1, Direction.NORTH, BuiltInLootTables.JUNGLE_TEMPLE_DISPENSER); + } + +- this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.SOUTH, Boolean.valueOf(true)), 3, -2, 2, box); ++ this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.SOUTH, true), 3, -2, 2, box); + this.placeBlock( + level, + Blocks.TRIPWIRE_HOOK + .defaultBlockState() + .setValue(TripWireHookBlock.FACING, Direction.NORTH) +- .setValue(TripWireHookBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireHookBlock.ATTACHED, true), + 7, + -3, + 1, +@@ -263,7 +_,7 @@ + Blocks.TRIPWIRE_HOOK + .defaultBlockState() + .setValue(TripWireHookBlock.FACING, Direction.SOUTH) +- .setValue(TripWireHookBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireHookBlock.ATTACHED, true), + 7, + -3, + 5, +@@ -273,9 +_,9 @@ + level, + Blocks.TRIPWIRE + .defaultBlockState() +- .setValue(TripWireBlock.NORTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireBlock.NORTH, true) ++ .setValue(TripWireBlock.SOUTH, true) ++ .setValue(TripWireBlock.ATTACHED, true), + 7, + -3, + 2, +@@ -285,9 +_,9 @@ + level, + Blocks.TRIPWIRE + .defaultBlockState() +- .setValue(TripWireBlock.NORTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireBlock.NORTH, true) ++ .setValue(TripWireBlock.SOUTH, true) ++ .setValue(TripWireBlock.ATTACHED, true), + 7, + -3, + 3, +@@ -297,9 +_,9 @@ + level, + Blocks.TRIPWIRE + .defaultBlockState() +- .setValue(TripWireBlock.NORTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(TripWireBlock.ATTACHED, Boolean.valueOf(true)), ++ .setValue(TripWireBlock.NORTH, true) ++ .setValue(TripWireBlock.SOUTH, true) ++ .setValue(TripWireBlock.ATTACHED, true), + 7, + -3, + 4, +@@ -344,8 +_,8 @@ + this.placedTrap2 = this.createDispenser(level, box, random, 9, -2, 3, Direction.WEST, BuiltInLootTables.JUNGLE_TEMPLE_DISPENSER); + } + +- this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.EAST, Boolean.valueOf(true)), 8, -1, 3, box); +- this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.EAST, Boolean.valueOf(true)), 8, -2, 3, box); ++ this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.EAST, true), 8, -1, 3, box); ++ this.placeBlock(level, Blocks.VINE.defaultBlockState().setValue(VineBlock.EAST, true), 8, -2, 3, box); + if (!this.placedMainChest) { + this.placedMainChest = this.createChest(level, box, random, 8, -3, 3, BuiltInLootTables.JUNGLE_TEMPLE); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch new file mode 100644 index 0000000..0472028 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java +@@ -524,8 +_,8 @@ + if (this.isSupportingBox(level, box, minX, maxX, maxY, z)) { + BlockState planksState = this.type.getPlanksState(); + BlockState fenceState = this.type.getFenceState(); +- this.generateBox(level, box, minX, minY, z, minX, maxY - 1, z, fenceState.setValue(FenceBlock.WEST, Boolean.valueOf(true)), CAVE_AIR, false); +- this.generateBox(level, box, maxX, minY, z, maxX, maxY - 1, z, fenceState.setValue(FenceBlock.EAST, Boolean.valueOf(true)), CAVE_AIR, false); ++ this.generateBox(level, box, minX, minY, z, minX, maxY - 1, z, fenceState.setValue(FenceBlock.WEST, true), CAVE_AIR, false); ++ this.generateBox(level, box, maxX, minY, z, maxX, maxY - 1, z, fenceState.setValue(FenceBlock.EAST, true), CAVE_AIR, false); + if (random.nextInt(4) == 0) { + this.generateBox(level, box, minX, maxY, z, minX, maxY, z, planksState, CAVE_AIR, false); + this.generateBox(level, box, maxX, maxY, z, maxX, maxY, z, planksState, CAVE_AIR, false); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch new file mode 100644 index 0000000..0a52d69 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch @@ -0,0 +1,438 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java +@@ -298,10 +_,10 @@ + + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); +- BlockState blockState1 = blockState.setValue(FenceBlock.EAST, Boolean.valueOf(true)); +- BlockState blockState2 = blockState.setValue(FenceBlock.WEST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); ++ BlockState blockState1 = blockState.setValue(FenceBlock.EAST, true); ++ BlockState blockState2 = blockState.setValue(FenceBlock.WEST, true); + this.generateBox(level, box, 0, 1, 1, 0, 4, 1, blockState1, blockState1, false); + this.generateBox(level, box, 0, 3, 4, 0, 4, 4, blockState1, blockState1, false); + this.generateBox(level, box, 0, 3, 14, 0, 4, 14, blockState1, blockState1, false); +@@ -354,8 +_,8 @@ + BlockState blockState = Blocks.NETHER_BRICK_STAIRS.defaultBlockState().setValue(StairBlock.FACING, Direction.SOUTH); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + + for (int i = 0; i <= 9; i++) { + int max = Math.max(1, 7 - i); +@@ -435,12 +_,12 @@ + ) { + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + this.generateBox(level, box, 0, 0, 0, 8, 1, 8, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 0, 2, 0, 8, 5, 8, Blocks.AIR.defaultBlockState(), Blocks.AIR.defaultBlockState(), false); + this.generateBox(level, box, 0, 6, 0, 8, 6, 5, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); +@@ -456,8 +_,8 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.EAST, true) ++ .setValue(FenceBlock.SOUTH, true), + 0, + 3, + 8, +@@ -467,8 +_,8 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.SOUTH, true), + 8, + 3, + 8, +@@ -543,12 +_,12 @@ + this.generateBox(level, box, 5, 8, 0, 7, 8, 0, Blocks.NETHER_BRICK_FENCE.defaultBlockState(), Blocks.NETHER_BRICK_FENCE.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + + for (int i = 1; i <= 11; i += 2) { + this.generateBox(level, box, i, 10, 0, i, 11, 0, blockState, blockState, false); +@@ -571,41 +_,41 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)), +- 0, +- 13, +- 0, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)), +- 0, +- 13, +- 12, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)), +- 12, +- 13, +- 12, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)), ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.EAST, true), ++ 0, ++ 13, ++ 0, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.SOUTH, true) ++ .setValue(FenceBlock.EAST, true), ++ 0, ++ 13, ++ 12, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.SOUTH, true) ++ .setValue(FenceBlock.WEST, true), ++ 12, ++ 13, ++ 12, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.WEST, true), + 12, + 13, + 0, +@@ -622,8 +_,8 @@ + 1, + 8, + ix, +- blockState1.setValue(FenceBlock.WEST, Boolean.valueOf(true)), +- blockState1.setValue(FenceBlock.WEST, Boolean.valueOf(true)), ++ blockState1.setValue(FenceBlock.WEST, true), ++ blockState1.setValue(FenceBlock.WEST, true), + false + ); + this.generateBox( +@@ -635,8 +_,8 @@ + 11, + 8, + ix, +- blockState1.setValue(FenceBlock.EAST, Boolean.valueOf(true)), +- blockState1.setValue(FenceBlock.EAST, Boolean.valueOf(true)), ++ blockState1.setValue(FenceBlock.EAST, true), ++ blockState1.setValue(FenceBlock.EAST, true), + false + ); + } +@@ -780,12 +_,12 @@ + this.generateBox(level, box, 0, 2, 0, 4, 5, 4, Blocks.AIR.defaultBlockState(), Blocks.AIR.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 4, 2, 0, 4, 5, 4, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 4, 3, 1, 4, 4, 1, blockState1, blockState1, false); + this.generateBox(level, box, 4, 3, 3, 4, 4, 3, blockState1, blockState1, false); +@@ -850,8 +_,8 @@ + this.generateBox(level, box, 0, 2, 0, 4, 5, 4, Blocks.AIR.defaultBlockState(), Blocks.AIR.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 0, 2, 0, 0, 5, 4, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 4, 2, 0, 4, 5, 4, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 0, 3, 1, 0, 4, 1, blockState, blockState, false); +@@ -919,12 +_,12 @@ + this.generateBox(level, box, 0, 2, 0, 4, 5, 4, Blocks.AIR.defaultBlockState(), Blocks.AIR.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 0, 2, 0, 0, 5, 4, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 0, 3, 1, 0, 4, 1, blockState1, blockState1, false); + this.generateBox(level, box, 0, 3, 3, 0, 4, 3, blockState1, blockState1, false); +@@ -997,14 +_,14 @@ + this.generateBox(level, box, 2, 11, 2, 10, 12, 10, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); +- BlockState blockState2 = blockState1.setValue(FenceBlock.WEST, Boolean.valueOf(true)); +- BlockState blockState3 = blockState1.setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); ++ BlockState blockState2 = blockState1.setValue(FenceBlock.WEST, true); ++ BlockState blockState3 = blockState1.setValue(FenceBlock.EAST, true); + + for (int i = 1; i <= 11; i += 2) { + this.generateBox(level, box, i, 10, 0, i, 11, 0, blockState, blockState, false); +@@ -1027,41 +_,41 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)), +- 0, +- 13, +- 0, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)), +- 0, +- 13, +- 12, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)), +- 12, +- 13, +- 12, +- box +- ); +- this.placeBlock( +- level, +- Blocks.NETHER_BRICK_FENCE +- .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)), ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.EAST, true), ++ 0, ++ 13, ++ 0, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.SOUTH, true) ++ .setValue(FenceBlock.EAST, true), ++ 0, ++ 13, ++ 12, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.SOUTH, true) ++ .setValue(FenceBlock.WEST, true), ++ 12, ++ 13, ++ 12, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.NETHER_BRICK_FENCE ++ .defaultBlockState() ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.WEST, true), + 12, + 13, + 0, +@@ -1200,20 +_,20 @@ + this.generateBox(level, box, 1, 5, 8, 5, 5, 8, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, Boolean.valueOf(true)), 1, 6, 3, box); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, Boolean.valueOf(true)), 5, 6, 3, box); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, true), 1, 6, 3, box); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, true), 5, 6, 3, box); + this.placeBlock( + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)) +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.EAST, true) ++ .setValue(FenceBlock.NORTH, true), + 0, + 6, + 3, +@@ -1223,8 +_,8 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.NORTH, true), + 6, + 6, + 3, +@@ -1236,8 +_,8 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.EAST, true) ++ .setValue(FenceBlock.SOUTH, true), + 0, + 6, + 8, +@@ -1247,20 +_,20 @@ + level, + Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.SOUTH, true), + 6, + 6, + 8, + box + ); + this.generateBox(level, box, 1, 6, 8, 5, 6, 8, blockState, blockState, false); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, Boolean.valueOf(true)), 1, 7, 8, box); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, true), 1, 7, 8, box); + this.generateBox(level, box, 2, 7, 8, 4, 7, 8, blockState, blockState, false); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, Boolean.valueOf(true)), 5, 7, 8, box); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, Boolean.valueOf(true)), 2, 8, 8, box); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, true), 5, 7, 8, box); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, true), 2, 8, 8, box); + this.placeBlock(level, blockState, 3, 8, 8, box); +- this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, Boolean.valueOf(true)), 4, 8, 8, box); ++ this.placeBlock(level, Blocks.NETHER_BRICK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, true), 4, 8, 8, box); + if (!this.hasPlacedSpawner) { + BlockPos worldPos = this.getWorldPos(3, 5, 5); + if (box.isInside(worldPos)) { +@@ -1650,12 +_,12 @@ + this.generateBox(level, box, 6, 2, 5, 6, 6, 6, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 2, 6, 0, 4, 6, 0, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + this.generateBox(level, box, 2, 5, 0, 4, 5, 0, blockState, blockState, false); + this.generateBox(level, box, 2, 6, 6, 4, 6, 6, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); +@@ -1718,12 +_,12 @@ + this.generateBox(level, box, 1, 2, 6, 5, 8, 6, Blocks.NETHER_BRICKS.defaultBlockState(), Blocks.NETHER_BRICKS.defaultBlockState(), false); + BlockState blockState = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.NETHER_BRICK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 0, 3, 2, 0, 5, 4, blockState1, blockState1, false); + this.generateBox(level, box, 6, 3, 2, 6, 5, 2, blockState1, blockState1, false); + this.generateBox(level, box, 6, 3, 4, 6, 5, 4, blockState1, blockState1, false); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalPiece.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalPiece.java.patch new file mode 100644 index 0000000..29a364f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalPiece.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalPiece.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalPiece.java +@@ -184,7 +_,7 @@ + if (blockState1.isAir()) { + if (Block.isFaceFull(blockState.getCollisionShape(level, pos), randomHorizontalDirection)) { + BooleanProperty propertyForFace = VineBlock.getPropertyForFace(randomHorizontalDirection.getOpposite()); +- level.setBlock(blockPos, Blocks.VINE.defaultBlockState().setValue(propertyForFace, Boolean.valueOf(true)), 3); ++ level.setBlock(blockPos, Blocks.VINE.defaultBlockState().setValue(propertyForFace, true), 3); + } + } + } +@@ -192,7 +_,7 @@ + + private void maybeAddLeavesAbove(RandomSource random, LevelAccessor level, BlockPos pos) { + if (random.nextFloat() < 0.5F && level.getBlockState(pos).is(Blocks.NETHERRACK) && level.getBlockState(pos.above()).isAir()) { +- level.setBlock(pos.above(), Blocks.JUNGLE_LEAVES.defaultBlockState().setValue(LeavesBlock.PERSISTENT, Boolean.valueOf(true)), 3); ++ level.setBlock(pos.above(), Blocks.JUNGLE_LEAVES.defaultBlockState().setValue(LeavesBlock.PERSISTENT, true), 3); + } + } + diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch new file mode 100644 index 0000000..b5ee888 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch @@ -0,0 +1,333 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java +@@ -619,19 +_,19 @@ + this.placeBlock(level, Blocks.OAK_PLANKS.defaultBlockState(), 9, 5, 10, box); + BlockState blockState = Blocks.OAK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.WEST, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ .setValue(FenceBlock.WEST, true) ++ .setValue(FenceBlock.EAST, true); + BlockState blockState1 = Blocks.OAK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.SOUTH, true); + this.generateBox(level, box, 3, 6, 3, 3, 6, 11, blockState1, blockState1, false); + this.generateBox(level, box, 10, 6, 3, 10, 6, 9, blockState1, blockState1, false); + this.generateBox(level, box, 4, 6, 2, 9, 6, 2, blockState, blockState, false); + this.generateBox(level, box, 4, 6, 12, 7, 6, 12, blockState, blockState, false); + this.placeBlock( + level, +- Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.NORTH, Boolean.valueOf(true)).setValue(FenceBlock.EAST, Boolean.valueOf(true)), ++ Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.NORTH, true).setValue(FenceBlock.EAST, true), + 3, + 6, + 2, +@@ -639,7 +_,7 @@ + ); + this.placeBlock( + level, +- Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.SOUTH, Boolean.valueOf(true)).setValue(FenceBlock.EAST, Boolean.valueOf(true)), ++ Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.SOUTH, true).setValue(FenceBlock.EAST, true), + 3, + 6, + 12, +@@ -647,7 +_,7 @@ + ); + this.placeBlock( + level, +- Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.NORTH, Boolean.valueOf(true)).setValue(FenceBlock.WEST, Boolean.valueOf(true)), ++ Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.NORTH, true).setValue(FenceBlock.WEST, true), + 10, + 6, + 2, +@@ -657,7 +_,7 @@ + for (int i4 = 0; i4 <= 2; i4++) { + this.placeBlock( + level, +- Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.SOUTH, Boolean.valueOf(true)).setValue(FenceBlock.WEST, Boolean.valueOf(true)), ++ Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.SOUTH, true).setValue(FenceBlock.WEST, true), + 8 + i4, + 6, + 12 - i4, +@@ -668,8 +_,8 @@ + level, + Blocks.OAK_FENCE + .defaultBlockState() +- .setValue(FenceBlock.NORTH, Boolean.valueOf(true)) +- .setValue(FenceBlock.EAST, Boolean.valueOf(true)), ++ .setValue(FenceBlock.NORTH, true) ++ .setValue(FenceBlock.EAST, true), + 8 + i4, + 6, + 11 - i4, +@@ -688,21 +_,21 @@ + this.placeBlock(level, blockState2, 10, 7, 13, box); + int i5 = 7; + int i6 = 7; +- BlockState blockState3 = Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ BlockState blockState3 = Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.EAST, true); + this.placeBlock(level, blockState3, 6, 9, 7, box); +- BlockState blockState4 = Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, Boolean.valueOf(true)); ++ BlockState blockState4 = Blocks.OAK_FENCE.defaultBlockState().setValue(FenceBlock.WEST, true); + this.placeBlock(level, blockState4, 7, 9, 7, box); + this.placeBlock(level, blockState3, 6, 8, 7, box); + this.placeBlock(level, blockState4, 7, 8, 7, box); +- BlockState blockState5 = blockState1.setValue(FenceBlock.WEST, Boolean.valueOf(true)).setValue(FenceBlock.EAST, Boolean.valueOf(true)); ++ BlockState blockState5 = blockState1.setValue(FenceBlock.WEST, true).setValue(FenceBlock.EAST, true); + this.placeBlock(level, blockState5, 6, 7, 7, box); + this.placeBlock(level, blockState5, 7, 7, 7, box); + this.placeBlock(level, blockState3, 5, 7, 7, box); + this.placeBlock(level, blockState4, 8, 7, 7, box); +- this.placeBlock(level, blockState3.setValue(FenceBlock.NORTH, Boolean.valueOf(true)), 6, 7, 6, box); +- this.placeBlock(level, blockState3.setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), 6, 7, 8, box); +- this.placeBlock(level, blockState4.setValue(FenceBlock.NORTH, Boolean.valueOf(true)), 7, 7, 6, box); +- this.placeBlock(level, blockState4.setValue(FenceBlock.SOUTH, Boolean.valueOf(true)), 7, 7, 8, box); ++ this.placeBlock(level, blockState3.setValue(FenceBlock.NORTH, true), 6, 7, 6, box); ++ this.placeBlock(level, blockState3.setValue(FenceBlock.SOUTH, true), 6, 7, 8, box); ++ this.placeBlock(level, blockState4.setValue(FenceBlock.NORTH, true), 7, 7, 6, box); ++ this.placeBlock(level, blockState4.setValue(FenceBlock.SOUTH, true), 7, 7, 8, box); + BlockState blockState6 = Blocks.TORCH.defaultBlockState(); + this.placeBlock(level, blockState6, 5, 8, 7, box); + this.placeBlock(level, blockState6, 8, 8, 7, box); +@@ -802,12 +_,12 @@ + this.generateBox(level, box, 4, 1, 9, 6, 1, 11, Blocks.LAVA.defaultBlockState(), Blocks.LAVA.defaultBlockState(), false); + BlockState blockState = Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)); ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true); + BlockState blockState1 = Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)); ++ .setValue(IronBarsBlock.WEST, true) ++ .setValue(IronBarsBlock.EAST, true); + + for (int i1 = 3; i1 < 14; i1 += 2) { + this.generateBox(level, box, 0, 3, i1, 0, 4, i1, blockState, blockState, false); +@@ -841,18 +_,18 @@ + flag &= flags[i3]; + } + +- this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[0])), 4, 3, 8, box); +- this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[1])), 5, 3, 8, box); +- this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[2])), 6, 3, 8, box); +- this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[3])), 4, 3, 12, box); +- this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[4])), 5, 3, 12, box); +- this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[5])), 6, 3, 12, box); +- this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[6])), 3, 3, 9, box); +- this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[7])), 3, 3, 10, box); +- this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[8])), 3, 3, 11, box); +- this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[9])), 7, 3, 9, box); +- this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[10])), 7, 3, 10, box); +- this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(flags[11])), 7, 3, 11, box); ++ this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, flags[0]), 4, 3, 8, box); ++ this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, flags[1]), 5, 3, 8, box); ++ this.placeBlock(level, blockState3.setValue(EndPortalFrameBlock.HAS_EYE, flags[2]), 6, 3, 8, box); ++ this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, flags[3]), 4, 3, 12, box); ++ this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, flags[4]), 5, 3, 12, box); ++ this.placeBlock(level, blockState4.setValue(EndPortalFrameBlock.HAS_EYE, flags[5]), 6, 3, 12, box); ++ this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, flags[6]), 3, 3, 9, box); ++ this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, flags[7]), 3, 3, 10, box); ++ this.placeBlock(level, blockState5.setValue(EndPortalFrameBlock.HAS_EYE, flags[8]), 3, 3, 11, box); ++ this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, flags[9]), 7, 3, 9, box); ++ this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, flags[10]), 7, 3, 10, box); ++ this.placeBlock(level, blockState6.setValue(EndPortalFrameBlock.HAS_EYE, flags[11]), 7, 3, 11, box); + if (flag) { + BlockState blockState7 = Blocks.END_PORTAL.defaultBlockState(); + this.placeBlock(level, blockState7, 4, 3, 9, box); +@@ -934,64 +_,64 @@ + level, + Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)), +- 4, +- i, +- 4, +- box +- ); +- this.placeBlock( +- level, +- Blocks.IRON_BARS +- .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), +- 4, +- i, +- 5, +- box +- ); +- this.placeBlock( +- level, +- Blocks.IRON_BARS +- .defaultBlockState() +- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)), +- 4, +- i, +- 6, +- box +- ); +- this.placeBlock( +- level, +- Blocks.IRON_BARS +- .defaultBlockState() +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), +- 5, +- i, +- 5, +- box +- ); +- this.placeBlock( +- level, +- Blocks.IRON_BARS +- .defaultBlockState() +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), +- 6, +- i, +- 5, +- box +- ); +- this.placeBlock( +- level, +- Blocks.IRON_BARS +- .defaultBlockState() +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true), ++ 4, ++ i, ++ 4, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.IRON_BARS ++ .defaultBlockState() ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true) ++ .setValue(IronBarsBlock.EAST, true), ++ 4, ++ i, ++ 5, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.IRON_BARS ++ .defaultBlockState() ++ .setValue(IronBarsBlock.NORTH, true) ++ .setValue(IronBarsBlock.SOUTH, true), ++ 4, ++ i, ++ 6, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.IRON_BARS ++ .defaultBlockState() ++ .setValue(IronBarsBlock.WEST, true) ++ .setValue(IronBarsBlock.EAST, true), ++ 5, ++ i, ++ 5, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.IRON_BARS ++ .defaultBlockState() ++ .setValue(IronBarsBlock.WEST, true) ++ .setValue(IronBarsBlock.EAST, true), ++ 6, ++ i, ++ 5, ++ box ++ ); ++ this.placeBlock( ++ level, ++ Blocks.IRON_BARS ++ .defaultBlockState() ++ .setValue(IronBarsBlock.WEST, true) ++ .setValue(IronBarsBlock.EAST, true), + 7, + i, + 5, +@@ -1001,7 +_,7 @@ + + this.placeBlock( + level, +- Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)).setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)), ++ Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.NORTH, true).setValue(IronBarsBlock.SOUTH, true), + 4, + 3, + 2, +@@ -1009,7 +_,7 @@ + ); + this.placeBlock( + level, +- Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.NORTH, Boolean.valueOf(true)).setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true)), ++ Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.NORTH, true).setValue(IronBarsBlock.SOUTH, true), + 4, + 3, + 8, +@@ -1514,14 +_,14 @@ + case GRATES: + this.placeBlock(level, Blocks.CAVE_AIR.defaultBlockState(), x + 1, y, z, box); + this.placeBlock(level, Blocks.CAVE_AIR.defaultBlockState(), x + 1, y + 1, z, box); +- this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.WEST, Boolean.valueOf(true)), x, y, z, box); +- this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.WEST, Boolean.valueOf(true)), x, y + 1, z, box); ++ this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.WEST, true), x, y, z, box); ++ this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.WEST, true), x, y + 1, z, box); + this.placeBlock( + level, + Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)), ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true), + x, + y + 2, + z, +@@ -1531,8 +_,8 @@ + level, + Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)), ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true), + x + 1, + y + 2, + z, +@@ -1542,15 +_,15 @@ + level, + Blocks.IRON_BARS + .defaultBlockState() +- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true)) +- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true)), ++ .setValue(IronBarsBlock.EAST, true) ++ .setValue(IronBarsBlock.WEST, true), + x + 2, + y + 2, + z, + box + ); +- this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), x + 2, y + 1, z, box); +- this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.EAST, Boolean.valueOf(true)), x + 2, y, z, box); ++ this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.EAST, true), x + 2, y + 1, z, box); ++ this.placeBlock(level, Blocks.IRON_BARS.defaultBlockState().setValue(IronBarsBlock.EAST, true), x + 2, y, z, box); + break; + case IRON_DOOR: + this.placeBlock(level, Blocks.STONE_BRICKS.defaultBlockState(), x, y, z, box); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch new file mode 100644 index 0000000..89a6f1f --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/level/material/FlowingFluid.java ++++ b/net/minecraft/world/level/material/FlowingFluid.java +@@ -50,7 +_,7 @@ + private FluidState sourceNotFalling; + + private static final int TOTAL_FLOWING_STATES = FALLING.getPossibleValues().size() * LEVEL.getPossibleValues().size(); +- private static final int MIN_LEVEL = LEVEL.getPossibleValues().stream().sorted().findFirst().get().intValue(); ++ private static final int MIN_LEVEL = LEVEL.getPossibleValues().stream().sorted().findFirst().get(); + + // index = (falling ? 1 : 0) + level*2 + private FluidState[] flowingLookUp; +@@ -74,13 +_,13 @@ + final int falling = i & 1; + final int level = (i >>> 1) + MIN_LEVEL; + +- this.flowingLookUp[i] = defaultFlowState.setValue(FALLING, falling == 1 ? Boolean.TRUE : Boolean.FALSE) +- .setValue(LEVEL, Integer.valueOf(level)); ++ this.flowingLookUp[i] = defaultFlowState.setValue(FALLING, falling == 1 ? true : false) ++ .setValue(LEVEL, level); + } + + final FluidState defaultFallState = this.getSource().defaultFluidState(); +- this.sourceFalling = defaultFallState.setValue(FALLING, Boolean.TRUE); +- this.sourceNotFalling = defaultFallState.setValue(FALLING, Boolean.FALSE); ++ this.sourceFalling = defaultFallState.setValue(FALLING, true); ++ this.sourceNotFalling = defaultFallState.setValue(FALLING, false); + + this.init = true; + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch new file mode 100644 index 0000000..de3b128 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/material/LavaFluid.java ++++ b/net/minecraft/world/level/material/LavaFluid.java +@@ -157,7 +_,7 @@ + + @Override + public BlockState createLegacyBlock(FluidState state) { +- return Blocks.LAVA.defaultBlockState().setValue(LiquidBlock.LEVEL, Integer.valueOf(getLegacyLevel(state))); ++ return Blocks.LAVA.defaultBlockState().setValue(LiquidBlock.LEVEL, getLegacyLevel(state)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch new file mode 100644 index 0000000..fba2a14 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/material/WaterFluid.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/material/WaterFluid.java ++++ b/net/minecraft/world/level/material/WaterFluid.java +@@ -100,7 +_,7 @@ + + @Override + public BlockState createLegacyBlock(FluidState state) { +- return Blocks.WATER.defaultBlockState().setValue(LiquidBlock.LEVEL, Integer.valueOf(getLegacyLevel(state))); ++ return Blocks.WATER.defaultBlockState().setValue(LiquidBlock.LEVEL, getLegacyLevel(state)); + } + + @Override diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch new file mode 100644 index 0000000..0076342 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java ++++ b/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java +@@ -28,7 +_,7 @@ + if (oldPower != i) { + // CraftBukkit end + if (level.getBlockState(pos) == state) { +- level.setBlock(pos, state.setValue(RedStoneWireBlock.POWER, Integer.valueOf(i)), 2); ++ level.setBlock(pos, state.setValue(RedStoneWireBlock.POWER, i), 2); + } + + Set set = Sets.newHashSet(); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch new file mode 100644 index 0000000..eeefd9e --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java ++++ b/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java +@@ -51,7 +_,7 @@ + i1 |= 128; + } + +- level.setBlock(blockPos, blockState.setValue(RedStoneWireBlock.POWER, Integer.valueOf(i)), i1); ++ level.setBlock(blockPos, blockState.setValue(RedStoneWireBlock.POWER, i), i1); + } else { + objectIterator.remove(); + } diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch new file mode 100644 index 0000000..d991fe8 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java ++++ b/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java +@@ -49,8 +_,8 @@ + Instance instance + ) { + return instance.group( +- Codec.INT.optionalFieldOf("weight", Integer.valueOf(1)).forGetter(container -> container.weight), +- Codec.INT.optionalFieldOf("quality", Integer.valueOf(0)).forGetter(lootPoolSingletonContainer -> lootPoolSingletonContainer.quality) ++ Codec.INT.optionalFieldOf("weight", 1).forGetter(container -> container.weight), ++ Codec.INT.optionalFieldOf("quality", 0).forGetter(lootPoolSingletonContainer -> lootPoolSingletonContainer.quality) + ) + .and(commonFields(instance).t1()) + .and(LootItemFunctions.ROOT_CODEC.listOf().optionalFieldOf("functions", List.of()).forGetter(container -> container.functions)); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch new file mode 100644 index 0000000..c1ff172 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java ++++ b/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java +@@ -34,7 +_,7 @@ + .optionalFieldOf("options") + .forGetter(enchantRandomlyFunction -> enchantRandomlyFunction.options), + Codec.BOOL +- .optionalFieldOf("only_compatible", Boolean.valueOf(true)) ++ .optionalFieldOf("only_compatible", true) + .forGetter(enchantRandomlyFunction -> enchantRandomlyFunction.onlyCompatible) + ) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch new file mode 100644 index 0000000..afbb66b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java ++++ b/net/minecraft/world/level/storage/loot/functions/EnchantedCountIncreaseFunction.java +@@ -31,7 +_,7 @@ + instance.group( + Enchantment.CODEC.fieldOf("enchantment").forGetter(enchantedCountIncreaseFunction -> enchantedCountIncreaseFunction.enchantment), + NumberProviders.CODEC.fieldOf("count").forGetter(enchantedCountIncreaseFunction -> enchantedCountIncreaseFunction.value), +- Codec.INT.optionalFieldOf("limit", Integer.valueOf(0)).forGetter(enchantedCountIncreaseFunction -> enchantedCountIncreaseFunction.limit) ++ Codec.INT.optionalFieldOf("limit", 0).forGetter(enchantedCountIncreaseFunction -> enchantedCountIncreaseFunction.limit) + ) + ) + .apply(instance, EnchantedCountIncreaseFunction::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java.patch new file mode 100644 index 0000000..11bbd14 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java ++++ b/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java +@@ -40,10 +_,10 @@ + MapDecorationType.CODEC + .optionalFieldOf("decoration", DEFAULT_DECORATION) + .forGetter(explorationMapFunction -> explorationMapFunction.mapDecoration), +- Codec.BYTE.optionalFieldOf("zoom", Byte.valueOf((byte)2)).forGetter(explorationMapFunction -> explorationMapFunction.zoom), +- Codec.INT.optionalFieldOf("search_radius", Integer.valueOf(50)).forGetter(explorationMapFunction -> explorationMapFunction.searchRadius), ++ Codec.BYTE.optionalFieldOf("zoom", (byte) 2).forGetter(explorationMapFunction -> explorationMapFunction.zoom), ++ Codec.INT.optionalFieldOf("search_radius", 50).forGetter(explorationMapFunction -> explorationMapFunction.searchRadius), + Codec.BOOL +- .optionalFieldOf("skip_existing_chunks", Boolean.valueOf(true)) ++ .optionalFieldOf("skip_existing_chunks", true) + .forGetter(explorationMapFunction -> explorationMapFunction.skipKnownStructures) + ) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java.patch new file mode 100644 index 0000000..5376c0b --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java ++++ b/net/minecraft/world/level/storage/loot/functions/SetAttributesFunction.java +@@ -31,7 +_,7 @@ + .and( + instance.group( + SetAttributesFunction.Modifier.CODEC.listOf().fieldOf("modifiers").forGetter(function -> function.modifiers), +- Codec.BOOL.optionalFieldOf("replace", Boolean.valueOf(true)).forGetter(function -> function.replace) ++ Codec.BOOL.optionalFieldOf("replace", true).forGetter(function -> function.replace) + ) + ) + .apply(instance, SetAttributesFunction::new) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java.patch new file mode 100644 index 0000000..e8e2980 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java ++++ b/net/minecraft/world/level/storage/loot/functions/SetContainerLootTable.java +@@ -23,7 +_,7 @@ + .and( + instance.group( + ResourceKey.codec(Registries.LOOT_TABLE).fieldOf("name").forGetter(setContainerLootTable -> setContainerLootTable.name), +- Codec.LONG.optionalFieldOf("seed", Long.valueOf(0L)).forGetter(setContainerLootTable -> setContainerLootTable.seed), ++ Codec.LONG.optionalFieldOf("seed", 0L).forGetter(setContainerLootTable -> setContainerLootTable.seed), + BuiltInRegistries.BLOCK_ENTITY_TYPE.holderByNameCodec().fieldOf("type").forGetter(setContainerLootTable -> setContainerLootTable.type) + ) + ) diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/predicates/LocationCheck.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/predicates/LocationCheck.java.patch new file mode 100644 index 0000000..13ac7e4 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/level/storage/loot/predicates/LocationCheck.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/level/storage/loot/predicates/LocationCheck.java ++++ b/net/minecraft/world/level/storage/loot/predicates/LocationCheck.java +@@ -16,9 +_,9 @@ + public record LocationCheck(Optional predicate, BlockPos offset) implements LootItemCondition { + private static final MapCodec OFFSET_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( +- Codec.INT.optionalFieldOf("offsetX", Integer.valueOf(0)).forGetter(Vec3i::getX), +- Codec.INT.optionalFieldOf("offsetY", Integer.valueOf(0)).forGetter(Vec3i::getY), +- Codec.INT.optionalFieldOf("offsetZ", Integer.valueOf(0)).forGetter(Vec3i::getZ) ++ Codec.INT.optionalFieldOf("offsetX", 0).forGetter(Vec3i::getX), ++ Codec.INT.optionalFieldOf("offsetY", 0).forGetter(Vec3i::getY), ++ Codec.INT.optionalFieldOf("offsetZ", 0).forGetter(Vec3i::getZ) + ) + .apply(instance, BlockPos::new) + ); diff --git a/plazma-server/minecraft-patches/sources/net/minecraft/world/phys/shapes/VoxelShape.java.patch b/plazma-server/minecraft-patches/sources/net/minecraft/world/phys/shapes/VoxelShape.java.patch new file mode 100644 index 0000000..62f5755 --- /dev/null +++ b/plazma-server/minecraft-patches/sources/net/minecraft/world/phys/shapes/VoxelShape.java.patch @@ -0,0 +1,119 @@ +--- a/net/minecraft/world/phys/shapes/VoxelShape.java ++++ b/net/minecraft/world/phys/shapes/VoxelShape.java +@@ -181,12 +_,12 @@ + + private boolean computeOccludesFullBlock() { + if (this.isEmpty) { +- this.occludesFullBlock = Boolean.FALSE; ++ this.occludesFullBlock = false; + return false; + } + + if (this.moonrise$isFullBlock()) { +- this.occludesFullBlock = Boolean.TRUE; ++ this.occludesFullBlock = true; + return true; + } + +@@ -197,12 +_,12 @@ + (singleAABB.minY <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && singleAABB.maxY >= (1 - ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON)) && + (singleAABB.minX <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && singleAABB.maxX >= (1 - ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON)) && + (singleAABB.minZ <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && singleAABB.maxZ >= (1 - ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON)); +- this.occludesFullBlock = Boolean.valueOf(ret); ++ this.occludesFullBlock = ret; + return ret; + } + + final boolean ret = !Shapes.joinIsNotEmpty(Shapes.block(), ((VoxelShape)(Object)this), BooleanOp.ONLY_FIRST); +- this.occludesFullBlock = Boolean.valueOf(ret); ++ this.occludesFullBlock = ret; + return ret; + } + +@@ -210,7 +_,7 @@ + public final boolean moonrise$occludesFullBlock() { + final Boolean ret = this.occludesFullBlock; + if (ret != null) { +- return ret.booleanValue(); ++ return ret; + } + + return this.computeOccludesFullBlock(); +@@ -219,7 +_,7 @@ + @Override + public final boolean moonrise$occludesFullBlockIfCached() { + final Boolean ret = this.occludesFullBlock; +- return ret != null ? ret.booleanValue() : false; ++ return ret != null ? ret : false; + } + + private static int hash(final VoxelShape key) { +@@ -323,9 +_,9 @@ + private boolean computeFullBlock() { + Boolean ret; + if (this.isEmpty) { +- ret = Boolean.FALSE; ++ ret = false; + } else if ((VoxelShape)(Object)this == Shapes.block()) { +- ret = Boolean.TRUE; ++ ret = true; + } else { + final AABB singleAABB = this.singleAABBRepresentation; + if (singleAABB == null) { +@@ -353,37 +_,35 @@ + + final long[] bitset = shapeData.voxelSet(); + +- ret = Boolean.TRUE; ++ ret = true; + + check_full: + for (int x = sMinX; x < sMaxX; ++x) { + for (int y = sMinY; y < sMaxY; ++y) { + final int baseIndex = y*sizeZ + x*(sizeZ*sizeY); + if (!ca.spottedleaf.moonrise.common.util.FlatBitsetUtil.isRangeSet(bitset, baseIndex + sMinZ, baseIndex + sMaxZ)) { +- ret = Boolean.FALSE; ++ ret = false; + break check_full; + } + } + } + } else { +- ret = Boolean.FALSE; ++ ret = false; + } + } else { +- ret = Boolean.valueOf( +- Math.abs(singleAABB.minX) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && +- Math.abs(singleAABB.minY) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && +- Math.abs(singleAABB.minZ) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && ++ ret = Math.abs(singleAABB.minX) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && ++ Math.abs(singleAABB.minY) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && ++ Math.abs(singleAABB.minZ) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && + +- Math.abs(1.0 - singleAABB.maxX) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && +- Math.abs(1.0 - singleAABB.maxY) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && +- Math.abs(1.0 - singleAABB.maxZ) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON +- ); ++ Math.abs(1.0 - singleAABB.maxX) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && ++ Math.abs(1.0 - singleAABB.maxY) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON && ++ Math.abs(1.0 - singleAABB.maxZ) <= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON; + } + } + + this.isFullBlock = ret; + +- return ret.booleanValue(); ++ return ret; + } + + @Override +@@ -391,7 +_,7 @@ + final Boolean ret = this.isFullBlock; + + if (ret != null) { +- return ret.booleanValue(); ++ return ret; + } + + return this.computeFullBlock(); diff --git a/plazma-server/paper-patches/files/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java.patch b/plazma-server/paper-patches/files/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java.patch new file mode 100644 index 0000000..a37fbbe --- /dev/null +++ b/plazma-server/paper-patches/files/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java.patch @@ -0,0 +1,11 @@ +--- a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java ++++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java +@@ -51,7 +_,7 @@ + ++valueInMap.times; + + valueInMap.coordinateTimes.compute(ChunkPos.asLong(chunkX, chunkZ), (Long keyInMap1, Integer valueInMap1) -> { +- return valueInMap1 == null ? Integer.valueOf(1) : Integer.valueOf(valueInMap1.intValue() + 1); ++ return valueInMap1 == null ? Integer.valueOf(1) : Integer.valueOf(valueInMap1 + 1); + }); + + return valueInMap; diff --git a/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java.patch b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java.patch new file mode 100644 index 0000000..92823a4 --- /dev/null +++ b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java.patch @@ -0,0 +1,15 @@ +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +@@ -138,10 +_,12 @@ + public void overrideOffers(MerchantOffers offers) { + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public boolean stillValid(Player player) { diff --git a/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java.patch b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java.patch new file mode 100644 index 0000000..095ac14 --- /dev/null +++ b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java.patch @@ -0,0 +1,15 @@ +--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +@@ -322,10 +_,12 @@ + return this.handle.getUncachedNoiseBiome(biomeX, biomeY, biomeZ); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return this.handle.isClientSide(); + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public int getSeaLevel() { diff --git a/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java.patch b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java.patch new file mode 100644 index 0000000..d4f020c --- /dev/null +++ b/plazma-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java.patch @@ -0,0 +1,15 @@ +--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +@@ -163,10 +_,12 @@ + throw new UnsupportedOperationException("Not supported yet."); + } + ++ /* // Plazma - Remove isClientSide on DedicatedServer + @Override + public boolean isClientSide() { + return false; + } ++ */ // Plazma - Remove isClientSide on DedicatedServer + + @Override + public int getSeaLevel() { diff --git a/plazma-server/paper-patches/files/src/main/java/org/spigotmc/AsyncCatcher.java.patch b/plazma-server/paper-patches/files/src/main/java/org/spigotmc/AsyncCatcher.java.patch new file mode 100644 index 0000000..672ef91 --- /dev/null +++ b/plazma-server/paper-patches/files/src/main/java/org/spigotmc/AsyncCatcher.java.patch @@ -0,0 +1,11 @@ +--- a/src/main/java/org/spigotmc/AsyncCatcher.java ++++ b/src/main/java/org/spigotmc/AsyncCatcher.java +@@ -4,7 +_,7 @@ + + public class AsyncCatcher { + +- public static boolean enabled = true; ++ public static boolean enabled = !org.plazmamc.plazma.Options.ASYNC; // Plazma - Add option to allow async access + + public static void catchOp(String reason) { + if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system diff --git a/plazma-server/src/main/java/org/plazmamc/plazma/Options.java b/plazma-server/src/main/java/org/plazmamc/plazma/Options.java index 752c3a6..cc3b16b 100644 --- a/plazma-server/src/main/java/org/plazmamc/plazma/Options.java +++ b/plazma-server/src/main/java/org/plazmamc/plazma/Options.java @@ -4,6 +4,9 @@ import static java.lang.Boolean.getBoolean; public interface Options { + boolean ASYNC = getBoolean("Plazma.forciblyAllowAsyncAccess"); boolean OPTIMIZE = !getBoolean("Plazma.disableConfigOptimization"); + boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing"); + boolean NO_WARN_DEV = getBoolean("Plazma.iKnowWhatIAmDoingISwear"); }