From e7b9f268cb9b41eabb58874a8f7223be096cc307 Mon Sep 17 00:00:00 2001 From: raven Date: Sun, 22 Mar 2026 12:10:31 -0500 Subject: texture packs serve texture pack from integrated HTTP server --- server/server.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/server.go') diff --git a/server/server.go b/server/server.go index 407ae35..b1c64fb 100644 --- a/server/server.go +++ b/server/server.go @@ -21,11 +21,13 @@ var supportedExtensions = []string { } var requiredExtensions = []string { "ExtEntityPositions", + "EnvMapAspect.2", } type ServerInfo struct { Name string Motd string + TexturePack string } type Server struct { @@ -39,7 +41,6 @@ type Server struct { stopping bool stopped chan struct{} } - type worldState struct { LastId levelId SpawnLevel levelId @@ -185,6 +186,11 @@ func (s *Server) ExecuteCommand( }) } +func (s *Server) GetInfo(from phony.Actor, reply func(ServerInfo)) { + info := s.info + from.Act(nil, func() {reply(info)}) +} + func (s *Server) OnDisconnect(cl *client, username string, pl *player) { s.Act(cl, func() { delete(s.clients, cl) -- cgit v1.2.3