Begin implementing login (play)
All checks were successful
Build & Test / nix-build (push) Successful in 1m13s
All checks were successful
Build & Test / nix-build (push) Successful in 1m13s
This commit is contained in:
parent
8572ac5443
commit
b10be14079
@ -255,6 +255,11 @@ defmodule Amethyst.Server.Configuration do
|
|||||||
end
|
end
|
||||||
# Acknowledge Finish Configuration https://wiki.vg/Protocol#Acknowledge_Finish_Configuration
|
# Acknowledge Finish Configuration https://wiki.vg/Protocol#Acknowledge_Finish_Configuration
|
||||||
def handle({:acknowledge_finish_configuration}, client, state) do
|
def handle({:acknowledge_finish_configuration}, client, state) do
|
||||||
|
# TODO: All of this stuff should obviously not be hardcoded here
|
||||||
|
Amethyst.Server.Play.transmit({:login,
|
||||||
|
0, false, ["minecraft:overworld"], 0, 16, 16, false, true, true, 0,
|
||||||
|
"minecraft:overworld", <<0::64>>, :spectator, nil, false, true, nil, 0, false
|
||||||
|
}, client)
|
||||||
Amethyst.Server.Play.serve(client, state)
|
Amethyst.Server.Play.serve(client, state)
|
||||||
end
|
end
|
||||||
# Serverbound Plugin Message https://wiki.vg/Protocol#Serverbound_Plugin_Message_(configuration)
|
# Serverbound Plugin Message https://wiki.vg/Protocol#Serverbound_Plugin_Message_(configuration)
|
||||||
|
@ -45,6 +45,7 @@ defmodule Amethyst.Server.Play do
|
|||||||
dim_type, dim_name, hashed_seed, gamemode, prev_gm,
|
dim_type, dim_name, hashed_seed, gamemode, prev_gm,
|
||||||
is_debug, is_flat, death_loc, portal_cooldown, enforce_chat}) do
|
is_debug, is_flat, death_loc, portal_cooldown, enforce_chat}) do
|
||||||
# TODO: this singlehandedly made me regret not making the write API better, please rework :(
|
# TODO: this singlehandedly made me regret not making the write API better, please rework :(
|
||||||
|
Write.varint(0x2B) <>
|
||||||
<<eid::big-signed-32>> <> if(hardcore, do: <<1::big-8>>, else: <<0::big-8>>) <>
|
<<eid::big-signed-32>> <> if(hardcore, do: <<1::big-8>>, else: <<0::big-8>>) <>
|
||||||
Write.varint(length(dimensions)) <> Enum.reduce(dimensions, "", fn dim, acc -> acc <> Write.string(dim) end) <>
|
Write.varint(length(dimensions)) <> Enum.reduce(dimensions, "", fn dim, acc -> acc <> Write.string(dim) end) <>
|
||||||
Write.varint(max_players) <> Write.varint(view_distance) <> Write.varint(simulation_distance) <> if(reduce_debug, do: <<1::big-8>>, else: <<0::big-8>>) <>
|
Write.varint(max_players) <> Write.varint(view_distance) <> Write.varint(simulation_distance) <> if(reduce_debug, do: <<1::big-8>>, else: <<0::big-8>>) <>
|
||||||
|
Loading…
Reference in New Issue
Block a user