remove unused address parameter from LoginRaw and fix biome palette length calculation

This commit is contained in:
adman
2026-05-02 15:52:06 +02:00
parent d0844dd6b5
commit 1a5f4f4f8e
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -125,7 +125,7 @@ func (s *LoginClient) OnStart() (err error) {
return
}
func LoginRaw(c *proto.Conn, account *api.Account, addr string) (err error) {
func LoginRaw(c *proto.Conn, account *api.Account) (err error) {
lc := &LoginClient{
Conn: c,
Account: account,
@@ -161,7 +161,7 @@ func LoginNoSrv(connectTo string, account *api.Account) (c *proto.Conn, err erro
if err != nil {
return
}
err = LoginRaw(c, account, connectTo)
err = LoginRaw(c, account)
return
}
@@ -174,6 +174,6 @@ func Login(connectTo string, account *api.Account) (c *proto.Conn, err error) {
if err != nil {
return
}
err = LoginRaw(c, account, connectTo)
err = LoginRaw(c, account)
return
}
+1 -1
View File
@@ -39,7 +39,7 @@ func mainE() (err error) {
// Debug stuff
slog.SetLogLoggerLevel(slog.LevelDebug)
//args = []string{"TEST", "api", "-name", "Admin_Else"}
//args = []string{"TEST", "packet-spy"}
if len(args) < 2 {
err = ExpectedASubcommandErr
+1 -1
View File
@@ -116,7 +116,7 @@ func Run(args []string) (err error) {
return
}
c.DebugPrintPackets = []string{""}
err = client.LoginRaw(c, acc, *TargetAddr)
err = client.LoginRaw(c, acc)
if err != nil {
return
}
+1 -1
View File
@@ -56,7 +56,7 @@ func (c Chunk) ToStorage(version string) (toChunk *level.Chunk, err error) {
// this is probably fine
uintSlice := unsafe.Slice((*uint64)(unsafe.Pointer(unsafe.SliceData(s.Biomes.Data))), len(s.Biomes.Data))
toChunk.Sections[i].Biomes, err = f.Import(uintSlice, util.BpeByNum(float64(len(s.BlockStates.Palette))), pallete)
toChunk.Sections[i].Biomes, err = f.Import(uintSlice, util.BpeByNum(float64(len(pallete))), pallete)
if err != nil {
return
}