From a020337531d52a7b9743a60afa130f1dfd1951a6 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Mon, 24 Feb 2025 16:48:57 +0900 Subject: [PATCH] rebuild patches --- ...2-Remove-unused-client-side-features.patch | 19 ++++++++++--------- .../0003-Remove-Mojang-Profiler.patch | 10 +++++----- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/plazma-server/minecraft-patches/features/0002-Remove-unused-client-side-features.patch b/plazma-server/minecraft-patches/features/0002-Remove-unused-client-side-features.patch index 73a0191..3585d0f 100644 --- a/plazma-server/minecraft-patches/features/0002-Remove-unused-client-side-features.patch +++ b/plazma-server/minecraft-patches/features/0002-Remove-unused-client-side-features.patch @@ -474,12 +474,14 @@ index 96a85803ceae7054a60067de4ec2116a35720e66..7e2bca85bc6a0d20c1f7ba6605b56b29 if (i == 0) { diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index a1fdae645d1c7a8716690546c360b4dfa01c7c47..1621a15229cf6baff9c062600a7c83cc6c6eec60 100644 +index 3fa734b754f122cac42d636e60aec7ade3b3ff47..39e5f1a6fee90a819700acd0c8a459a984b283cf 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -136,13 +136,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -135,14 +135,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface + } LOGGER.info("Loading properties"); ++ // Plazma start - Remove isClientSide on DedicatedServer DedicatedServerProperties properties = this.settings.getProperties(); - if (this.isSingleplayer()) { - this.setLocalIp("127.0.0.1"); @@ -488,7 +490,6 @@ index a1fdae645d1c7a8716690546c360b4dfa01c7c47..1621a15229cf6baff9c062600a7c83cc - this.setPreventProxyConnections(properties.preventProxyConnections); - this.setLocalIp(properties.serverIp); - } -+ // Plazma start - Remove isClientSide on DedicatedServer + this.setUsesAuthentication(properties.onlineMode); + this.setPreventProxyConnections(properties.preventProxyConnections); + this.setLocalIp(properties.serverIp); @@ -610,7 +611,7 @@ index 398c1733824b689520170de0be94006731afa5cd..1e433543ad0e364ca4a18565aa22d48d protected abstract GameProfile playerProfile(); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 43b541df2ce2441dd6383e23768b98caeaacfb11..0c3bd5e5a0da6cb2b848659a9c6e835960f65e64 100644 +index b333653af0c001160a1dfc061b8c21d051cef594..471bcdc0abe8319901a42032f6d4a653afa17640 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -572,7 +572,7 @@ public class ServerGamePacketListenerImpl @@ -620,9 +621,9 @@ index 43b541df2ce2441dd6383e23768b98caeaacfb11..0c3bd5e5a0da6cb2b848659a9c6e8359 - if (d7 - d6 > Math.max(100.0, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { + if (d7 - d6 > Math.max(100.0, Math.pow(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * ((float) i) * speed, 2)) /*&& !this.isSingleplayerOwner()*/) { // Plazma - Remove isClientSide on DedicatedServer // CraftBukkit end - LOGGER.warn( - "{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5 -@@ -808,7 +808,7 @@ public class ServerGamePacketListenerImpl + // Plazma start - PlayerVehicleMovedIncorrectlyEvent + final org.plazmamc.plazma.event.player.PlayerVehicleMovedIncorrectlyEvent event = createIncorrectMoveEvent(true, rootVehicle, toX, toY, toZ, f, f1); +@@ -815,7 +815,7 @@ public class ServerGamePacketListenerImpl public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async // CraftBukkit start @@ -631,7 +632,7 @@ index 43b541df2ce2441dd6383e23768b98caeaacfb11..0c3bd5e5a0da6cb2b848659a9c6e8359 this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect return; } -@@ -2600,7 +2600,7 @@ public class ServerGamePacketListenerImpl +@@ -2607,7 +2607,7 @@ public class ServerGamePacketListenerImpl if (!this.chatSpamThrottler.isIncrementAndUnderThreshold() // CraftBukkit end && !this.server.getPlayerList().isOp(this.player.getGameProfile()) @@ -640,7 +641,7 @@ index 43b541df2ce2441dd6383e23768b98caeaacfb11..0c3bd5e5a0da6cb2b848659a9c6e8359 this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause & add proper async disconnect } } -@@ -3597,15 +3597,17 @@ public class ServerGamePacketListenerImpl +@@ -3604,15 +3604,17 @@ public class ServerGamePacketListenerImpl @Override public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/plazma-server/minecraft-patches/features/0003-Remove-Mojang-Profiler.patch b/plazma-server/minecraft-patches/features/0003-Remove-Mojang-Profiler.patch index b38dd17..8cdfec8 100644 --- a/plazma-server/minecraft-patches/features/0003-Remove-Mojang-Profiler.patch +++ b/plazma-server/minecraft-patches/features/0003-Remove-Mojang-Profiler.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove Mojang Profiler diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index ebd54d6d45fbabe76cad3747f52ca793b0a69c3e..473b24cfe9894c6e38060bdc5c22384284c025d4 100644 +index 5bc167003e46878cf2ace3cac7448145cc92548b..b8fbc33cc19f2ef6e2e7cc4b00ee1c1df015708d 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java @@ -48,7 +48,7 @@ import net.minecraft.server.commands.*; // Plazma - Register every commands @@ -17,7 +17,7 @@ index ebd54d6d45fbabe76cad3747f52ca793b0a69c3e..473b24cfe9894c6e38060bdc5c223842 import net.minecraft.util.profiling.jfr.JvmProfiler; import net.minecraft.world.flag.FeatureFlagSet; import net.minecraft.world.flag.FeatureFlags; -@@ -274,7 +274,7 @@ public class Commands { +@@ -276,7 +276,7 @@ public class Commands { public void performCommand(ParseResults parseResults, String command, String label, boolean throwCommandError) { // Paper end CommandSourceStack commandSourceStack = parseResults.getContext().getSource(); @@ -26,7 +26,7 @@ index ebd54d6d45fbabe76cad3747f52ca793b0a69c3e..473b24cfe9894c6e38060bdc5c223842 ContextChain contextChain = this.finishParsing(parseResults, command, commandSourceStack, label); // CraftBukkit // Paper - Add UnknownCommandEvent try { -@@ -311,9 +311,10 @@ public class Commands { +@@ -313,9 +313,10 @@ public class Commands { commandSourceStack.sendFailure(Component.literal(Util.describeError(var12))); LOGGER.error("'/{}' threw an exception", command, var12); } @@ -38,7 +38,7 @@ index ebd54d6d45fbabe76cad3747f52ca793b0a69c3e..473b24cfe9894c6e38060bdc5c223842 } @Nullable -@@ -369,7 +370,7 @@ public class Commands { +@@ -371,7 +372,7 @@ public class Commands { int max = Math.max(1, server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_CHAIN_LENGTH)); int _int = server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT); @@ -720,7 +720,7 @@ index a3192400b37274620977e5a40d4283bfec3ab9b3..a936031e38f8a1f40e484b55dcf0ac84 - } } diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 1621a15229cf6baff9c062600a7c83cc6c6eec60..fc3db195693e26519e42bf49e083c259a4610c19 100644 +index 3fa734b754f122cac42d636e60aec7ade3b3ff47..14c23d722f5d473c3f7043c9a337ab00fd490a0d 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -766,11 +766,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface