Add a single debug log for troubleshooting
All checks were successful
Build & Test / nix-build (push) Successful in 1m9s

This commit is contained in:
Kodi Craft 2024-07-09 10:22:10 +02:00
parent 0f59aaef59
commit 6a2701aace
Signed by: kodi
GPG Key ID: 69D9EED60B242822

View File

@ -46,6 +46,7 @@ defmodule Amethyst.Server do
@moduledoc """
This module includes shared boilerplate code for all stages of the server.
"""
require Logger
defmacro __using__(_opts) do
quote do
@ -63,6 +64,7 @@ defmodule Amethyst.Server do
Logger.debug("Transmitting #{inspect(packet)}")
data = serialize(packet)
length = byte_size(data) |> Amethyst.Minecraft.Write.varint()
Logger.debug("Sending #{inspect(length <> data)}")
:gen_tcp.send(client, length <> data)
end
end