migrate: move module path to git.anygate.cloud/anygatecloud/strom
Go / build (push) Failing after 9s

This commit is contained in:
OpenCode
2026-08-06 15:43:20 +02:00
parent ac12f5c93b
commit 78442c5c68
97 changed files with 294 additions and 264 deletions
+30
View File
@@ -0,0 +1,30 @@
name: Go
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout with LFS
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.26.2"
- name: Build
run: go build -v ./...
- name: Vet
run: go vet -v ./...
- name: Test
run: go test -v ./...
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"log/slog" "log/slog"
"os" "os"
"github.com/admin-else/strom/mc/api" "git.anygate.cloud/anygatecloud/strom/mc/api"
) )
var cmd = flag.NewFlagSet("api", flag.ContinueOnError) var cmd = flag.NewFlagSet("api", flag.ContinueOnError)
+1 -1
View File
@@ -1,6 +1,6 @@
package cmd_util package cmd_util
import "github.com/admin-else/strom/mc/api" import "git.anygate.cloud/anygatecloud/strom/mc/api"
func Account(s string) (a *api.Account, err error) { func Account(s string) (a *api.Account, err error) {
if len(s) > 16 { if len(s) > 16 {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"os" "os"
"slices" "slices"
mcdata "github.com/admin-else/strom/mc/data" mcdata "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
// strom data 1.21.11 blocks id 0 name => air // strom data 1.21.11 blocks id 0 name => air
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"log/slog" "log/slog"
"os" "os"
"github.com/admin-else/strom/mc/level/anvil" "git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
var ( var (
+15 -15
View File
@@ -9,21 +9,21 @@ import (
"runtime/debug" "runtime/debug"
"slices" "slices"
"github.com/admin-else/strom/cmd/strom/api" "git.anygate.cloud/anygatecloud/strom/cmd/strom/api"
"github.com/admin-else/strom/cmd/strom/data" "git.anygate.cloud/anygatecloud/strom/cmd/strom/data"
"github.com/admin-else/strom/cmd/strom/extract_mca" "git.anygate.cloud/anygatecloud/strom/cmd/strom/extract_mca"
"github.com/admin-else/strom/cmd/strom/mca_to_tmcpr" "git.anygate.cloud/anygatecloud/strom/cmd/strom/mca_to_tmcpr"
"github.com/admin-else/strom/cmd/strom/messenger" "git.anygate.cloud/anygatecloud/strom/cmd/strom/messenger"
"github.com/admin-else/strom/cmd/strom/offline_uuid" "git.anygate.cloud/anygatecloud/strom/cmd/strom/offline_uuid"
"github.com/admin-else/strom/cmd/strom/packet_info" "git.anygate.cloud/anygatecloud/strom/cmd/strom/packet_info"
"github.com/admin-else/strom/cmd/strom/packet_inspector" "git.anygate.cloud/anygatecloud/strom/cmd/strom/packet_inspector"
"github.com/admin-else/strom/cmd/strom/print_nbt" "git.anygate.cloud/anygatecloud/strom/cmd/strom/print_nbt"
"github.com/admin-else/strom/cmd/strom/print_replay" "git.anygate.cloud/anygatecloud/strom/cmd/strom/print_replay"
// "github.com/admin-else/strom/cmd/strom/raw_capture" // removed: use tcpflow instead for raw TCP capture // "git.anygate.cloud/anygatecloud/strom/cmd/strom/raw_capture" // removed: use tcpflow instead for raw TCP capture
"github.com/admin-else/strom/cmd/strom/raw_to_tmcpr" "git.anygate.cloud/anygatecloud/strom/cmd/strom/raw_to_tmcpr"
"github.com/admin-else/strom/cmd/strom/serve_tmcpr" "git.anygate.cloud/anygatecloud/strom/cmd/strom/serve_tmcpr"
"github.com/admin-else/strom/cmd/strom/serve_world" "git.anygate.cloud/anygatecloud/strom/cmd/strom/serve_world"
"github.com/admin-else/strom/cmd/strom/status" "git.anygate.cloud/anygatecloud/strom/cmd/strom/status"
) )
var ExpectedASubcommandErr = errors.New("expected a subcommand") var ExpectedASubcommandErr = errors.New("expected a subcommand")
+6 -6
View File
@@ -8,12 +8,12 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
"github.com/admin-else/strom/mc/level/anvil" "git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto/replay" "git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
var ( var (
+10 -10
View File
@@ -7,16 +7,16 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/admin-else/strom/cmd/strom/cmd_util" "git.anygate.cloud/anygatecloud/strom/cmd/strom/cmd_util"
"github.com/admin-else/strom/mc/bot/chat" "git.anygate.cloud/anygatecloud/strom/mc/bot/chat"
"github.com/admin-else/strom/mc/bot/keepalive" "git.anygate.cloud/anygatecloud/strom/mc/bot/keepalive"
"github.com/admin-else/strom/mc/bot/world" "git.anygate.cloud/anygatecloud/strom/mc/bot/world"
"github.com/admin-else/strom/mc/client" "git.anygate.cloud/anygatecloud/strom/mc/client"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
) )
func stror(a, b string) string { func stror(a, b string) string {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"flag" "flag"
"fmt" "fmt"
"github.com/admin-else/strom/mc/crypto" "git.anygate.cloud/anygatecloud/strom/mc/crypto"
) )
var cmd = flag.NewFlagSet("offline-uuid", flag.ContinueOnError) var cmd = flag.NewFlagSet("offline-uuid", flag.ContinueOnError)
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
) )
var cmd = flag.NewFlagSet("packet-info", flag.ContinueOnError) var cmd = flag.NewFlagSet("packet-info", flag.ContinueOnError)
+9 -9
View File
@@ -7,15 +7,15 @@ import (
"os" "os"
"time" "time"
"github.com/admin-else/strom/mc/api" "git.anygate.cloud/anygatecloud/strom/mc/api"
"github.com/admin-else/strom/mc/client" "git.anygate.cloud/anygatecloud/strom/mc/client"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/server" "git.anygate.cloud/anygatecloud/strom/mc/server"
"github.com/admin-else/strom/mc/text" "git.anygate.cloud/anygatecloud/strom/mc/text"
) )
var Cmd = flag.NewFlagSet("packet-inspector", flag.ContinueOnError) var Cmd = flag.NewFlagSet("packet-inspector", flag.ContinueOnError)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
var ( var (
+2 -2
View File
@@ -15,8 +15,8 @@ import (
"reflect" "reflect"
"strings" "strings"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
) )
var ( var (
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: index not found // Error: index not found
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Error: unexpected EOF // Error: unexpected EOF
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Decode regression: recipe_book_add (26.2) - SlotDisplay type fix // Decode regression: recipe_book_add (26.2) - SlotDisplay type fix
@@ -3,7 +3,7 @@ package failed_packets_test
import ( import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Decode regression: declare_commands (26.2) - bitfield + extraNodeData fix // Decode regression: declare_commands (26.2) - bitfield + extraNodeData fix
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v1_8" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
) )
// Decode regression: spawn_entity_living (1.8) - entityMetadata mergeCompareTo // Decode regression: spawn_entity_living (1.8) - entityMetadata mergeCompareTo
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v1_8" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
) )
// Decode regression: entity_equipment (1.8) - nbt TAG_End fix // Decode regression: entity_equipment (1.8) - nbt TAG_End fix
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v1_8" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
) )
// Decode regression: entity_metadata (1.8) - entityMetadataLoop mergeCompareTo // Decode regression: entity_metadata (1.8) - entityMetadataLoop mergeCompareTo
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
generated "github.com/admin-else/strom/mc/proto_generated/v26_2" generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
// Decode regression: entity_equipment (26.2) - topBitSetTerminatedArray // Decode regression: entity_equipment (26.2) - topBitSetTerminatedArray
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"os" "os"
"time" "time"
"github.com/admin-else/strom/mc/proto/replay" "git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
) )
var Cmd = flag.NewFlagSet("raw-to-tmcpr", flag.ContinueOnError) var Cmd = flag.NewFlagSet("raw-to-tmcpr", flag.ContinueOnError)
+5 -5
View File
@@ -9,11 +9,11 @@ import (
"os" "os"
"time" "time"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto/replay" "git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/server" "git.anygate.cloud/anygatecloud/strom/mc/server"
) )
type Server struct { type Server struct {
+8 -8
View File
@@ -8,14 +8,14 @@ import (
"os" "os"
"time" "time"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
"github.com/admin-else/strom/mc/level/anvil" "git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/server" "git.anygate.cloud/anygatecloud/strom/mc/server"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
type Server struct { type Server struct {
+5 -5
View File
@@ -6,11 +6,11 @@ import (
"log/slog" "log/slog"
"time" "time"
"github.com/admin-else/strom/mc/client" "git.anygate.cloud/anygatecloud/strom/mc/client"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
var cmd = flag.NewFlagSet("status", flag.ContinueOnError) var cmd = flag.NewFlagSet("status", flag.ContinueOnError)
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/admin-else/strom module git.anygate.cloud/anygatecloud/strom
go 1.26.2 go 1.26.2
+1 -1
View File
@@ -1,7 +1,7 @@
package api package api
import ( import (
"github.com/admin-else/strom/mc/crypto" "git.anygate.cloud/anygatecloud/strom/mc/crypto"
) )
// NewOfflineAccount creates an offline-mode Account with a UUID derived from the // NewOfflineAccount creates an offline-mode Account with a UUID derived from the
+4 -4
View File
@@ -12,10 +12,10 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/admin-else/strom/mc/api" "git.anygate.cloud/anygatecloud/strom/mc/api"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -1,8 +1,8 @@
package keepalive package keepalive
import ( import (
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
type mod struct { type mod struct {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"errors" "errors"
"sync" "sync"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
) )
var ( var (
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"errors" "errors"
"net" "net"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/server" "git.anygate.cloud/anygatecloud/strom/mc/server"
) )
// Connect connects to the given address note that it does not resolve the SRV records it's just a raw net.Dial // Connect connects to the given address note that it does not resolve the SRV records it's just a raw net.Dial
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
type ConfigIgnorer struct { type ConfigIgnorer struct {
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"net" "net"
"strconv" "strconv"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
// MakeHandshakePacket creates a handshake packet using the connection's remote address as the server host. // MakeHandshakePacket creates a handshake packet using the connection's remote address as the server host.
+10 -10
View File
@@ -9,16 +9,16 @@ import (
"errors" "errors"
"net" "net"
"github.com/admin-else/strom/mc/api" "git.anygate.cloud/anygatecloud/strom/mc/api"
"github.com/admin-else/strom/mc/crypto" "git.anygate.cloud/anygatecloud/strom/mc/crypto"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_16_5" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_16_5"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"github.com/admin-else/strom/mc/proto_generated/v26_2" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
"github.com/admin-else/strom/mc/text" "git.anygate.cloud/anygatecloud/strom/mc/text"
"github.com/google/uuid" "github.com/google/uuid"
) )
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
func assertClientSendConvertible(t *testing.T, srcType reflect.Type, name string, state proto_base.State, direction proto_base.Direction, targetVersion int32) { func assertClientSendConvertible(t *testing.T, srcType reflect.Type, name string, state proto_base.State, direction proto_base.Direction, targetVersion int32) {
+6 -6
View File
@@ -5,12 +5,12 @@ import (
"encoding/json" "encoding/json"
"time" "time"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"github.com/admin-else/strom/mc/server" "git.anygate.cloud/anygatecloud/strom/mc/server"
) )
type StatusClient struct { type StatusClient struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package data_test
import ( import (
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
) )
func TestLookupBiomeById(t *testing.T) { func TestLookupBiomeById(t *testing.T) {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"slices" "slices"
"strconv" "strconv"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
// { // {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
) )
func TestLookupBlockByStateId(t *testing.T) { func TestLookupBlockByStateId(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package data_test
import ( import (
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
) )
func TestLookUpProtocolVersion(t *testing.T) { func TestLookUpProtocolVersion(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package data
import ( import (
"embed" "embed"
nbt2 "github.com/admin-else/strom/mc/nbt" nbt2 "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
// TODO: this is stupid loginPacket.json exists next version migrate to that // TODO: this is stupid loginPacket.json exists next version migrate to that
+1 -1
View File
@@ -3,7 +3,7 @@ package gen
import ( import (
"math" "math"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
) )
type NoiseParam int type NoiseParam int
+1 -1
View File
@@ -3,7 +3,7 @@ package gen
import ( import (
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
) )
func TestBiomeNoise_SampleBiome(t *testing.T) { func TestBiomeNoise_SampleBiome(t *testing.T) {
+2 -2
View File
@@ -1,8 +1,8 @@
package anvil_test package anvil_test
import ( import (
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
) )
// in seperate file not to lag my ide // in seperate file not to lag my ide
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"strings" "strings"
"unsafe" "unsafe"
data2 "github.com/admin-else/strom/mc/data" data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
level2 "github.com/admin-else/strom/mc/level" level2 "git.anygate.cloud/anygatecloud/strom/mc/level"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
type Chunk struct { type Chunk struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package anvil
import ( import (
"io" "io"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
type Level struct { type Level struct {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
anvil2 "github.com/admin-else/strom/mc/level/anvil" anvil2 "git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
func TestLevel(t *testing.T) { func TestLevel(t *testing.T) {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"io" "io"
"os" "os"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
type CompressionStrategy uint8 type CompressionStrategy uint8
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"strings" "strings"
"unsafe" "unsafe"
data2 "github.com/admin-else/strom/mc/data" data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"embed" "embed"
"testing" "testing"
data2 "github.com/admin-else/strom/mc/data" data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/level/litematic" "git.anygate.cloud/anygatecloud/strom/mc/level/litematic"
) )
//go:embed testdata //go:embed testdata
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"testing" "testing"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
) )
func FuzzReadChunkFromChunkPacketData(f *testing.F) { func FuzzReadChunkFromChunkPacketData(f *testing.F) {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"log/slog" "log/slog"
"math" "math"
data2 "github.com/admin-else/strom/mc/data" data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
type BlockState struct { type BlockState struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"math" "math"
"slices" "slices"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
type StorageFormat struct { type StorageFormat struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package level_test
import ( import (
"testing" "testing"
"github.com/admin-else/strom/mc/level" "git.anygate.cloud/anygatecloud/strom/mc/level"
) )
func heightmapFormat() level.StorageFormat { func heightmapFormat() level.StorageFormat {
+1 -1
View File
@@ -1,7 +1,7 @@
package structure package structure
import ( import (
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"reflect" "reflect"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
func (f *Format) decode(m map[string]any, target reflect.Value) error { func (f *Format) decode(m map[string]any, target reflect.Value) error {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"io" "io"
"os" "os"
"github.com/admin-else/strom/mc/mapstructure" "git.anygate.cloud/anygatecloud/strom/mc/mapstructure"
) )
var Format = mapstructure.NewFormat("nbt", mapstructure.WithRequireAll(), mapstructure.WithTrySnakeCase(), mapstructure.WithTryLowCase()) var Format = mapstructure.NewFormat("nbt", mapstructure.WithRequireAll(), mapstructure.WithTrySnakeCase(), mapstructure.WithTryLowCase())
+4 -4
View File
@@ -12,10 +12,10 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
) )
const ( const (
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"math" "math"
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
) )
+4 -4
View File
@@ -6,10 +6,10 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
) )
func TestPacketRoundTripAllVersions(t *testing.T) { func TestPacketRoundTripAllVersions(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package proto
import ( import (
"reflect" "reflect"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
) )
type PidEtc struct { type PidEtc struct {
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"net" "net"
"sync" "sync"
"github.com/admin-else/strom/mc/crypto" "git.anygate.cloud/anygatecloud/strom/mc/crypto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
) )
type RawConn struct { type RawConn struct {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"io" "io"
"reflect" "reflect"
proto2 "github.com/admin-else/strom/mc/proto" proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
) )
type Reader struct { type Reader struct {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"encoding/binary" "encoding/binary"
"io" "io"
proto2 "github.com/admin-else/strom/mc/proto" proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
) )
type Writer struct { type Writer struct {
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"reflect" "reflect"
"slices" "slices"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
) )
// SmartConvertibleTo reports whether a value of type from can be recursively converted to type to. // SmartConvertibleTo reports whether a value of type from can be recursively converted to type to.
+5 -5
View File
@@ -4,11 +4,11 @@ import (
"reflect" "reflect"
"testing" "testing"
proto2 "github.com/admin-else/strom/mc/proto" proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_21_9" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_9"
"github.com/admin-else/strom/mc/proto_generated/v26_2" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
func TestCanSmartConvert(t *testing.T) { func TestCanSmartConvert(t *testing.T) {
+10 -10
View File
@@ -1,16 +1,16 @@
package proto_generated package proto_generated
import ( import (
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"github.com/admin-else/strom/mc/proto_generated/v1_12_2" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_12_2"
"github.com/admin-else/strom/mc/proto_generated/v1_14_4" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_14_4"
"github.com/admin-else/strom/mc/proto_generated/v1_16_5" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_16_5"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_21_9" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_9"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v26_1" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_1"
"github.com/admin-else/strom/mc/proto_generated/v26_2" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
) )
var SupportedVersions = []string{"1.8", "1.12.2", "1.14.4", "1.16.5", "1.21.8", "1.21.9", "1.21.11", "26.1", "26.2"} var SupportedVersions = []string{"1.8", "1.12.2", "1.14.4", "1.16.5", "1.21.8", "1.21.9", "1.21.11", "26.1", "26.2"}
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_12_2
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_14_4
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_16_5
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_21_11
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_21_8
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_21_9
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v1_8
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v26_1
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -6,8 +6,8 @@ package v26_2
import ( import (
"encoding/binary" "encoding/binary"
"io" "io"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/uuid" "github.com/google/uuid"
) )
+2 -2
View File
@@ -21,10 +21,10 @@ type PacketInfo struct {
func GeneratePacketInfoFile(versions []string, packetInfos []PacketInfo) (err error) { func GeneratePacketInfoFile(versions []string, packetInfos []PacketInfo) (err error) {
f := NewFile("proto_generated") f := NewFile("proto_generated")
imports := []string{"github.com/admin-else/strom/mc/proto_base"} imports := []string{"git.anygate.cloud/anygatecloud/strom/mc/proto_base"}
for _, v := range versions { for _, v := range versions {
vUnderscore := strings.ReplaceAll(v, ".", "_") vUnderscore := strings.ReplaceAll(v, ".", "_")
imports = append(imports, "github.com/admin-else/strom/mc/proto_generated/v"+vUnderscore) imports = append(imports, "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v"+vUnderscore)
} }
AppendDecl(f, Import(imports...)) AppendDecl(f, Import(imports...))
+3 -3
View File
@@ -14,8 +14,8 @@ import (
"strconv" "strconv"
"strings" "strings"
data2 "github.com/admin-else/strom/mc/data" data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
util2 "github.com/admin-else/strom/mc/util" util2 "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
var ToDoError = errors.New("to do") var ToDoError = errors.New("to do")
@@ -453,7 +453,7 @@ func Generate(version string, w io.Writer, sourceHash string) (packetInfos []Pac
sourcePath, sourceHash, toolVersion, goVersion) sourcePath, sourceHash, toolVersion, goVersion)
AddFileComment(g.File, comment) AddFileComment(g.File, comment)
AppendDecl(g.File, Import("encoding/binary", "io", "github.com/admin-else/strom/mc/proto_base", "github.com/admin-else/strom/mc/nbt", "github.com/google/uuid")) AppendDecl(g.File, Import("encoding/binary", "io", "git.anygate.cloud/anygatecloud/strom/mc/proto_base", "git.anygate.cloud/anygatecloud/strom/mc/nbt", "github.com/google/uuid"))
g.RegisterNatives() g.RegisterNatives()
g.RegisterDecoderNatives() g.RegisterDecoderNatives()
g.RegisterEncoderNatives() g.RegisterEncoderNatives()
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"go/ast" "go/ast"
"strings" "strings"
"github.com/admin-else/strom/mc/proto_generator/protodef" "git.anygate.cloud/anygatecloud/strom/mc/proto_generator/protodef"
util2 "github.com/admin-else/strom/mc/util" util2 "git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"slices" "slices"
"strconv" "strconv"
"github.com/admin-else/strom/mc/proto_generator/protodef" "git.anygate.cloud/anygatecloud/strom/mc/proto_generator/protodef"
util2 "github.com/admin-else/strom/mc/util" util2 "git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"go/token" "go/token"
"slices" "slices"
"github.com/admin-else/strom/mc/proto_generator/protodef" "git.anygate.cloud/anygatecloud/strom/mc/proto_generator/protodef"
util2 "github.com/admin-else/strom/mc/util" util2 "git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"go/ast" "go/ast"
"github.com/admin-else/strom/mc/proto_generator/protodef" "git.anygate.cloud/anygatecloud/strom/mc/proto_generator/protodef"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2" "github.com/go-viper/mapstructure/v2"
) )
+6 -6
View File
@@ -1,12 +1,12 @@
package server package server
import ( import (
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
type ConfigServer struct { type ConfigServer struct {
+5 -5
View File
@@ -5,11 +5,11 @@ import (
"fmt" "fmt"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/text" "git.anygate.cloud/anygatecloud/strom/mc/text"
) )
var ( var (
+8 -8
View File
@@ -10,14 +10,14 @@ import (
"log/slog" "log/slog"
"slices" "slices"
api2 "github.com/admin-else/strom/mc/api" api2 "git.anygate.cloud/anygatecloud/strom/mc/api"
"github.com/admin-else/strom/mc/crypto" "git.anygate.cloud/anygatecloud/strom/mc/crypto"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/event" "git.anygate.cloud/anygatecloud/strom/mc/event"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v26_2" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
"github.com/google/uuid" "github.com/google/uuid"
) )
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/admin-else/strom/mc/data" "git.anygate.cloud/anygatecloud/strom/mc/data"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
) )
func assertSendConvertible(t *testing.T, srcType reflect.Type, name string, state proto_base.State, direction proto_base.Direction, targetVersion int32) { func assertSendConvertible(t *testing.T, srcType reflect.Type, name string, state proto_base.State, direction proto_base.Direction, targetVersion int32) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"net" "net"
"sync/atomic" "sync/atomic"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base" "git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/admin-else/strom/mc/text" "git.anygate.cloud/anygatecloud/strom/mc/text"
) )
// Servee wraps a net.Conn in a new proto.Conn configured for the servee side. // Servee wraps a net.Conn in a new proto.Conn configured for the servee side.
+3 -3
View File
@@ -3,9 +3,9 @@ package server
import ( import (
"encoding/json" "encoding/json"
"github.com/admin-else/strom/mc/proto" "git.anygate.cloud/anygatecloud/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8" "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/text" "git.anygate.cloud/anygatecloud/strom/mc/text"
) )
// These are separate types so a status definition looks less ugly // These are separate types so a status definition looks less ugly
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
) )
// FIXME: this should use the mapstruct thing // FIXME: this should use the mapstruct thing
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/admin-else/strom/mc/nbt" "git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
) )
+1 -1
View File
@@ -3,7 +3,7 @@ package util_test
import ( import (
"testing" "testing"
"github.com/admin-else/strom/mc/util" "git.anygate.cloud/anygatecloud/strom/mc/util"
) )
func TestCamelCase(t *testing.T) { func TestCamelCase(t *testing.T) {