Minecraft 1.21.5

Co-authored-by: Ven <[email protected]>
Co-authored-by: Jonathing <[email protected]>
This commit is contained in:
committed 2025-03-26 16:34:26 -07:00
1 parent 88904a1d09
commit d50a3b5ab7
548 files changed
+5432 -7867

No files matched your search

@@ -16,8 +16,6 @@ import net.minecraft.commands.synchronization.ArgumentTypeInfo;
import net.minecraft.commands.synchronization.ArgumentTypeInfos;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.data.registries.VanillaRegistries;
import net.minecraft.gametest.framework.TestClassNameArgument;
import net.minecraft.gametest.framework.TestFunctionArgument;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.Connection;
import net.minecraft.network.protocol.game.ClientboundCommandsPacket;
@@ -78,9 +76,6 @@ public class VanillaConnectionNetworkFilter extends VanillaPacketFilter {
CommandBuildContext commandBuildContext = Commands.createValidationContext(VanillaRegistries.createLookup());
RootCommandNode<SharedSuggestionProvider> root = packet.getRoot(commandBuildContext);
RootCommandNode<SharedSuggestionProvider> newRoot = CommandTreeCleaner.cleanArgumentTypes(root, argType -> {
if (argType instanceof TestFunctionArgument || argType instanceof TestClassNameArgument)
return false; // Vanilla connections should not have gametest on, so we should filter these out always
ArgumentTypeInfo<?, ?> info = ArgumentTypeInfos.byClass(argType);
ResourceLocation id = BuiltInRegistries.COMMAND_ARGUMENT_TYPE.getKey(info);
return id != null && (id.getNamespace().equals("minecraft") || id.getNamespace().equals("brigadier"));
@@ -139,7 +139,7 @@ public class SpawnEntity {
* Entity#recreateFromPacket and LivingEntity#recreateFromPacket does.
*/
e.syncPacketPositionCodec(msg.posX, msg.posY, msg.posZ);
e.absMoveTo(msg.posX, msg.posY, msg.posZ, (msg.yaw * 360) / 256.0F, (msg.pitch * 360) / 256.0F);
e.absSnapTo(msg.posX, msg.posY, msg.posZ, (msg.yaw * 360) / 256.0F, (msg.pitch * 360) / 256.0F);
e.setYHeadRot((msg.headYaw * 360) / 256.0F);
e.setYBodyRot((msg.headYaw * 360) / 256.0F);