title: Send packet to minecraft server Forge 1.16.5
body: <p>I want to send a minecraft vanilla packet to a server. I have searched for an eternity now and didn't find anything. This script works if I remove <code>INSTANCE.sendToServer(new CPlayerPacket.RotationPacket(1f, 1f, MC.player.isOnGround()));</code> otherwise my game crashes as soon as I interact with a block. How would I fix that?</p>
  <p>The only thing I understand from the crash report is: Invalid message net.minecraft.network.play.client.CPlayerPacket$RotationPacket
  but how do I make my packet valid?</p>
  <pre><code>    private static final String PROTOCOL_VERSION = &quot;1&quot;;
      public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(
              new ResourceLocation(&quot;mymodid&quot;, &quot;main&quot;),
              () -&gt; PROTOCOL_VERSION,
              PROTOCOL_VERSION::equals,
              PROTOCOL_VERSION::equals
      );
      
      private static final Minecraft MC = Minecraft.getInstance();
      @SubscribeEvent
      public void thing(PlayerInteractEvent event) {
          if (MC.player == null) {
              return;
          }
          BlockPos pos = event.getPos().add(0, 1,0);
  
          // BlockRayTraceResult result = new BlockRayTraceResult(Vector3d.ZERO ,event.getFace(), pos, true);
          INSTANCE.sendToServer(new CPlayerPacket.RotationPacket(1f, 1f, MC.player.isOnGround()));
          // MC.playerController.processRightClick(MC.player, MC.player.world, Hand.MAIN_HAND);
          MC.player.world.setBlockState(pos, Blocks.WATER.getDefaultState());
          if (MC.player.isSneaking()) {
              MC.player.swing(Hand.MAIN_HAND, true);
          }
      }
  }
  </code></pre>