Compare commits

17 Commits
Author SHA1 Message Date
adman 69e9857bad Merge remote-tracking branch 'gitlab/master'
Go / build (push) Successful in 1m9s
2026-08-17 18:12:52 +02:00
adman d0aec490cc remove binary test files 2026-08-17 18:08:49 +02:00
adman a01cb08672 Merge remote-tracking branch 'origin/master' 2026-08-17 18:08:08 +02:00
adman 326affe364 add version flag to packet inspector 2026-08-17 18:07:51 +02:00
OpenCode 1b2552492b remove binary testdata and fuzz corpus; restore regression tests
Go / build (push) Successful in 39s
2026-08-06 15:54:37 +02:00
OpenCode 44ec148be4 remove .gitattributes and LFS, drop large replay testdata
Go / build (push) Successful in 1m1s
2026-08-06 15:52:07 +02:00
OpenCode 78442c5c68 migrate: move module path to git.anygate.cloud/anygatecloud/strom
Go / build (push) Failing after 9s
2026-08-06 15:43:20 +02:00
OpenCode ac12f5c93b chore: sync all proto_generated versions
Go / build (push) Failing after 50s
2026-08-06 15:20:42 +02:00
OpenCode e58499ed09 fix: correct bitfield decoder using mask extraction, fix command_node
- Switch bitfield decoder from shift-based to mask-based extraction (var>>pos & mask)
  fixes non-power-of-2 bitfields like 6-bit command_node flags
- Fix MultiTypeFix to handle CaseExprTypeOnlyNumber/OnlyBool variants
- Update minecraft-data command_node bitfield order for all 1.21.8+ versions
  to LSB-first convention (matches reverse encoder/decoder)
- Implement SwitchDecoder for extraNodeData via compareTo visitor
- DeclareCommands now decodes successfully (was EOF)
- Add 6 regression tests (entity_equipment, metadata, recipes, commands)
2026-08-05 22:29:08 +02:00
OpenCode f4c2762881 fix: update 26.2 SlotDisplay mapper with 3 new types from decompiled source
- Add with_any_potion (id 2), only_with_component (id 3), dyed (id 7)
- Shift existing IDs: item 2→4, item_stack 3→5, tag 4→6,
  smithing_trim 5→8, with_remainder 6→9, composite 7→10
- RecipeBookAdd now decodes successfully (was index not found)
- Verified against decompiled client jar via SlotDisplays.bootstrap()
2026-08-05 21:19:07 +02:00
OpenCode 53d366ae53 fix: implement IDSet (registryEntryHolderSet) decoder/encoder
- Replace old broken RegistryEntryHolderSetDecoder with correct varint
  discriminator: id != 0 returns raw ID, id == 0 decodes string base
- Add RegistryEntryHolderSetEncoder using type switch (string/int32)
- Add NonErroringIndex to proto_base (zero-fallback index lookup)
- DeclareRecipes now fails with index not found (mapper) instead of to do
2026-08-05 19:53:46 +02:00
OpenCode 56ac8e154e test: add 4 decode regression tests for recently fixed packets
- entity_equipment 1.8 (nbt TAG_End fix)
- entity_equipment 26.2 (topBitSetTerminatedArray fix)
- entity_metadata 1.8 (entityMetadataLoop mergeCompareTo)
- spawn_entity_living 1.8 (entityMetadata mergeCompareTo)

These ensure packets that were previously broken stay working.
2026-08-05 19:36:38 +02:00
OpenCode ac1b298989 fix: implement topBitSetTerminatedArray, fix nbt TAG_End, fix entity_equipment
- Implement topBitSetTerminatedArray decoder/encoder with MSB continuation
- Fix nbt.Tag.Decode to handle TAG_End at root level (fixes 1.8 slot NBT)
- Remove 228 now-passing decode failure tests, keep 10 still failing
- EntityEquipment now works correctly across all versions
2026-08-05 19:30:18 +02:00
OpenCode 1d8f70c7fd test: fix decode failure tests - remove 200 now-passing, fix format strings
Generator fixes resolved most decode failures. 200 tests removed
(packets now decode correctly), 38 still test known failures.
Also fixed bytes.NewBuffer->bytes.NewReader and malformed format
strings in remaining old tests.
2026-08-05 19:05:03 +02:00
OpenCode 40b584dec4 test: add 26.2 replay decode failure tests from live capture
29 tests generated from live 26.2 clientbound capture via tcpflow.
6076 packets captured, 35 decode failures (0.58%), 0 serverbound failures.
2026-08-05 19:01:37 +02:00
OpenCode eb83786f9a fix: resolve parameterized $compareTo types and fix array count type
- VisitNameAndData: return any instead of named struct when mergeCompareTo
  resolves $compareTo, fixing field type mismatches for switch/container types
- ContainerCompareTo: traverse anon/bitfield fields for compareTo resolution,
  fixes entityMetadata 'field not found' errors
- Array.Count: change from string to any to handle numeric count values
- ArrayEncoder: fix nil check to correctly write length prefix for arrays
- ArrayDecoder: use fmt.Sprint for safe Count conversion
2026-08-05 18:33:39 +02:00
OpenCode fa70ea36c6 fix: print_replay test generation & raw_to_tmcpr config state
- Fix SaveUnCodeAbleAsTest using wrong package name (1.8.9 vs v1_8)
- Fix test template using bytes.Buffer instead of bytes.NewReader
- Tests now fail when decode SUCCEEDS (bug is fixed)
- Add config state support to raw_to_tmcpr with -config flag
- Fix mca_to_tmcpr -world flag being ignored
2026-08-05 17:43:26 +02:00
128 changed files with 12714 additions and 774 deletions
-6
View File
@@ -1,6 +0,0 @@
**/*_test.go export-ignore
**/testdata export-ignore
*.zip filter=lfs diff=lfs merge=lfs -text
*.tmcpr filter=lfs diff=lfs merge=lfs -text
*.mcpr filter=lfs diff=lfs merge=lfs -text
*.mca filter=lfs diff=lfs merge=lfs -text
+28
View File
@@ -0,0 +1,28 @@
name: Go
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 ./...
+2 -1
View File
@@ -1,4 +1,5 @@
.devres/
.idea/
.failed_packets/
.vscode/
.vscode/proto_generator
proto_generator
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"log/slog"
"os"
"github.com/admin-else/strom/mc/api"
"git.anygate.cloud/anygatecloud/strom/mc/api"
)
var cmd = flag.NewFlagSet("api", flag.ContinueOnError)
+1 -1
View File
@@ -1,6 +1,6 @@
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) {
if len(s) > 16 {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"os"
"slices"
mcdata "github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto_generated"
"github.com/admin-else/strom/mc/util"
mcdata "git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
// strom data 1.21.11 blocks id 0 name => air
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"log/slog"
"os"
"github.com/admin-else/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
)
var (
+15 -15
View File
@@ -9,21 +9,21 @@ import (
"runtime/debug"
"slices"
"github.com/admin-else/strom/cmd/strom/api"
"github.com/admin-else/strom/cmd/strom/data"
"github.com/admin-else/strom/cmd/strom/extract_mca"
"github.com/admin-else/strom/cmd/strom/mca_to_tmcpr"
"github.com/admin-else/strom/cmd/strom/messenger"
"github.com/admin-else/strom/cmd/strom/offline_uuid"
"github.com/admin-else/strom/cmd/strom/packet_info"
"github.com/admin-else/strom/cmd/strom/packet_inspector"
"github.com/admin-else/strom/cmd/strom/print_nbt"
"github.com/admin-else/strom/cmd/strom/print_replay"
// "github.com/admin-else/strom/cmd/strom/raw_capture" // removed: use tcpflow instead for raw TCP capture
"github.com/admin-else/strom/cmd/strom/raw_to_tmcpr"
"github.com/admin-else/strom/cmd/strom/serve_tmcpr"
"github.com/admin-else/strom/cmd/strom/serve_world"
"github.com/admin-else/strom/cmd/strom/status"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/api"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/data"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/extract_mca"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/mca_to_tmcpr"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/messenger"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/offline_uuid"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/packet_info"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/packet_inspector"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/print_nbt"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/print_replay"
// "git.anygate.cloud/anygatecloud/strom/cmd/strom/raw_capture" // removed: use tcpflow instead for raw TCP capture
"git.anygate.cloud/anygatecloud/strom/cmd/strom/raw_to_tmcpr"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/serve_tmcpr"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/serve_world"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/status"
)
var ExpectedASubcommandErr = errors.New("expected a subcommand")
+6 -6
View File
@@ -8,12 +8,12 @@ import (
"os"
"path/filepath"
"github.com/admin-else/strom/mc/level"
"github.com/admin-else/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/util"
"git.anygate.cloud/anygatecloud/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
var (
+10 -10
View File
@@ -7,16 +7,16 @@ import (
"strconv"
"strings"
"github.com/admin-else/strom/cmd/strom/cmd_util"
"github.com/admin-else/strom/mc/bot/chat"
"github.com/admin-else/strom/mc/bot/keepalive"
"github.com/admin-else/strom/mc/bot/world"
"github.com/admin-else/strom/mc/client"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_8"
"git.anygate.cloud/anygatecloud/strom/cmd/strom/cmd_util"
"git.anygate.cloud/anygatecloud/strom/mc/bot/chat"
"git.anygate.cloud/anygatecloud/strom/mc/bot/keepalive"
"git.anygate.cloud/anygatecloud/strom/mc/bot/world"
"git.anygate.cloud/anygatecloud/strom/mc/client"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
func stror(a, b string) string {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"flag"
"fmt"
"github.com/admin-else/strom/mc/crypto"
"git.anygate.cloud/anygatecloud/strom/mc/crypto"
)
var cmd = flag.NewFlagSet("offline-uuid", flag.ContinueOnError)
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"fmt"
"strconv"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
)
var cmd = flag.NewFlagSet("packet-info", flag.ContinueOnError)
+11 -10
View File
@@ -7,15 +7,15 @@ import (
"os"
"time"
"github.com/admin-else/strom/mc/api"
"github.com/admin-else/strom/mc/client"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/server"
"github.com/admin-else/strom/mc/text"
"git.anygate.cloud/anygatecloud/strom/mc/api"
"git.anygate.cloud/anygatecloud/strom/mc/client"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/server"
"git.anygate.cloud/anygatecloud/strom/mc/text"
)
var Cmd = flag.NewFlagSet("packet-inspector", flag.ContinueOnError)
@@ -26,6 +26,7 @@ var Token = Cmd.String("token", "", "token to use")
var TargetAddr = Cmd.String("addr", "127.0.0.1:25565", "address to connect to")
var ListenAddr = Cmd.String("listen", "127.0.0.1:25566", "address to listen on")
var TrueForward = Cmd.Bool("true-forward", false, "forward packets without modification -name and custom server status wont work")
var Version = Cmd.String("protocol-version", "", "protocol version to use; empty for auto")
type Proxy struct {
Client, Servee *proto.Conn
@@ -182,7 +183,7 @@ func Run(args []string) (err error) {
if err != nil {
return
}
c, err := client.Connect(nil, *TargetAddr, "")
c, err := client.Connect(nil, *TargetAddr, *Version)
if err != nil {
return
}
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt"
"os"
"github.com/admin-else/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
)
var (
+5 -5
View File
@@ -4,15 +4,15 @@ import (
"bytes"
"testing"
generated "github.com/admin-else/strom/mc/proto_generated/%v"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/%v"
)
// Error: %v
func TestFailedPacket%10X(t *testing.T) {
p := &generated.%v{}
b := bytes.NewBuffer(%#v)
p := &generated.%v{}
b := bytes.NewReader(%#v)
err := p.Decode(b)
if err != nil {
t.Fatal(err)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
+4 -10
View File
@@ -15,9 +15,8 @@ import (
"reflect"
"strings"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
)
var (
@@ -29,8 +28,6 @@ var (
DirectionFlag = cmd.String("direction", "clientbound", "Packet direction: clientbound (ToClient) or serverbound (ToServer)")
)
// TODO: maybe use the proto replay api
//go:embed failed_packet.go.tmpl
var TestSrcF string
@@ -46,11 +43,8 @@ func SaveUnCodeAbleAsTest(packet *proto.UnCodablePacket) (err error) {
return
}
ret, err := data.LookUpVersionByProtocolVersion(packet.Info.ProtocolVersion)
if err != nil {
return
}
goPackage := "v" + strings.ReplaceAll(ret.MinecraftVersion, ".", "_")
typeStr := reflect.TypeOf(packet.Info.Type).String()
goPackage := typeStr[1:strings.LastIndex(typeStr, ".")]
typeName := reflect.TypeOf(packet.Info.Type).Elem().Name()
src := fmt.Sprintf(TestSrcF, goPackage, packet.Err, h, typeName, packet.Data)
File diff suppressed because one or more lines are too long
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacket0F8B37C94207F7BF(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x42, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacket6C9AD835672C5C51(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0xde, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketA5D61E1C0F23E7FA(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x56, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketCAA58159889F7E8A(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x2e, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketD18FC4C0B2DF2972(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1b, 0xf2, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketE81E82016DB04F28(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x6, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Error: unexpected EOF
func TestFailedPacketFE935CF2E584C649(t *testing.T) {
p := &generated.PlayToClientPacketUpdateTime{}
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x1a, 0x0})
err := p.Decode(b)
if err == nil {
t.Fatalf("expected decode error but got nil")
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: recipe_book_add (26.2) - SlotDisplay type fix
func TestRegressionPacket25D845B5D0023D22(t *testing.T) {
p := &generated.PlayToClientPacketRecipeBookAdd{}
b := bytes.NewReader([]byte{0x1, 0xbe, 0x2, 0x1, 0x2, 0x2, 0x4, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x6, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x5, 0xe8, 0x2, 0x1, 0x0, 0x0, 0x4, 0xe8, 0x2, 0x0, 0x3, 0x1, 0x4, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x0, 0x10, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x70, 0x6c, 0x61, 0x6e, 0x6b, 0x73, 0x2, 0x1})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,17 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: declare_commands (26.2) - bitfield + extraNodeData fix
func TestRegressionPacket78C731784E6E834A(t *testing.T) {
p := &generated.PlayToClientPacketDeclareCommands{}
b := bytes.NewReader([]byte{0x1a, 0x0, 0xa, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x1, 0x1, 0xb, 0x2, 0x6d, 0x65, 0x5, 0x1, 0xc, 0x4, 0x68, 0x65, 0x6c, 0x70, 0x5, 0x1, 0xd, 0x4, 0x6c, 0x69, 0x73, 0x74, 0x1, 0x1, 0xe, 0x3, 0x6d, 0x73, 0x67, 0x9, 0x0, 0x4, 0x4, 0x74, 0x65, 0x6c, 0x6c, 0x9, 0x0, 0x4, 0x1, 0x77, 0x1, 0x2, 0xf, 0x10, 0x6, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1, 0x1, 0x11, 0x7, 0x74, 0x65, 0x61, 0x6d, 0x6d, 0x73, 0x67, 0x9, 0x0, 0x8, 0x2, 0x74, 0x6d, 0x1, 0x1, 0x12, 0x7, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x6, 0x0, 0x6, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x14, 0x6, 0x0, 0x7, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5, 0x2, 0x5, 0x0, 0x5, 0x75, 0x75, 0x69, 0x64, 0x73, 0x2, 0x1, 0x13, 0x7, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x6, 0x2, 0x1, 0x1, 0x14, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1, 0x1, 0x15, 0x4, 0x72, 0x6f, 0x6c, 0x6c, 0x6, 0x0, 0x7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x14, 0x16, 0x2, 0x16, 0x17, 0x9, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x14, 0x6d, 0x69, 0x6e, 0x65, 0x63, 0x72, 0x61, 0x66, 0x74, 0x3a, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x6, 0x0, 0x7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x14, 0x6, 0x0, 0x5, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x27, 0x6, 0x0, 0x5, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x27, 0x1, 0x1, 0x18, 0x3, 0x61, 0x64, 0x64, 0x1, 0x1, 0x19, 0x3, 0x73, 0x65, 0x74, 0x6, 0x0, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3, 0x0, 0x6, 0x0, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: spawn_entity_living (1.8) - entityMetadata mergeCompareTo
func TestRegressionPacket2B76AF8B937B1E8F(t *testing.T) {
p := &generated.PlayToClientPacketSpawnEntityLiving{}
b := bytes.NewReader([]byte{0x4c, 0x65, 0xff, 0xff, 0xed, 0x66, 0x0, 0x0, 0x7, 0xe0, 0x0, 0x0, 0x29, 0xe6, 0x91, 0x0, 0x91, 0x0, 0x0, 0xfd, 0x8d, 0x0, 0x0, 0x0, 0x0, 0x21, 0x1, 0x2c, 0x82, 0x0, 0x12, 0x4, 0x3, 0x0, 0x4, 0x0, 0x66, 0x41, 0x20, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x9, 0x0, 0xc, 0x0, 0xf, 0x0, 0x7f})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: entity_equipment (1.8) - nbt TAG_End fix
func TestRegressionPacket0C20C77EA68496BD(t *testing.T) {
p := &generated.PlayToClientPacketEntityEquipment{}
b := bytes.NewReader([]byte{0x89, 0x16, 0x0, 0x0, 0x1, 0x5, 0x1, 0x0, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
)
// Decode regression: entity_metadata (1.8) - entityMetadataLoop mergeCompareTo
func TestRegressionPacketDF2DF88561529208(t *testing.T) {
p := &generated.PlayToClientPacketEntityMetadata{}
b := bytes.NewReader([]byte{0x69, 0x0, 0x0, 0x21, 0x1, 0x2c, 0x82, 0x0, 0x3, 0x0, 0x4, 0x0, 0x66, 0x40, 0x80, 0x0, 0x0, 0x47, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x9, 0x0, 0xc, 0x0, 0xf, 0x0, 0x7f})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
@@ -0,0 +1,18 @@
package failed_packets_test
import (
"bytes"
"testing"
generated "git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
// Decode regression: entity_equipment (26.2) - topBitSetTerminatedArray
func TestRegressionPacket1D0089BBE86A1648(t *testing.T) {
p := &generated.PlayToClientPacketEntityEquipment{}
b := bytes.NewReader([]byte{0x81, 0x2, 0x0, 0x1, 0x9a, 0x7, 0x0, 0x0})
err := p.Decode(b)
if err != nil {
t.Fatalf("regression: decode failed: %v", err)
}
}
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"os"
"time"
"github.com/admin-else/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
)
var Cmd = flag.NewFlagSet("raw-to-tmcpr", flag.ContinueOnError)
+5 -5
View File
@@ -9,11 +9,11 @@ import (
"os"
"time"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto/replay"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/server"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto/replay"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/server"
)
type Server struct {
+8 -8
View File
@@ -8,14 +8,14 @@ import (
"os"
"time"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/level"
"github.com/admin-else/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/server"
"github.com/admin-else/strom/mc/util"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/server"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
type Server struct {
+5 -5
View File
@@ -6,11 +6,11 @@ import (
"log/slog"
"time"
"github.com/admin-else/strom/mc/client"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/client"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
)
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
+1 -1
View File
@@ -1,7 +1,7 @@
package api
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
+4 -4
View File
@@ -12,10 +12,10 @@ import (
"fmt"
"time"
"github.com/admin-else/strom/mc/api"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_8"
"git.anygate.cloud/anygatecloud/strom/mc/api"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"github.com/google/uuid"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package keepalive
import (
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
)
type mod struct {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"errors"
"sync"
"github.com/admin-else/strom/mc/level"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
)
var (
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"errors"
"net"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/server"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"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
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"errors"
"fmt"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
)
type ConfigIgnorer struct {
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"net"
"strconv"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"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.
+10 -10
View File
@@ -9,16 +9,16 @@ import (
"errors"
"net"
"github.com/admin-else/strom/mc/api"
"github.com/admin-else/strom/mc/crypto"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_16_5"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_8"
"github.com/admin-else/strom/mc/proto_generated/v26_2"
"github.com/admin-else/strom/mc/text"
"git.anygate.cloud/anygatecloud/strom/mc/api"
"git.anygate.cloud/anygatecloud/strom/mc/crypto"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_16_5"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
"git.anygate.cloud/anygatecloud/strom/mc/text"
"github.com/google/uuid"
)
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"reflect"
"testing"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"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) {
+6 -6
View File
@@ -5,12 +5,12 @@ import (
"encoding/json"
"time"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_8"
"github.com/admin-else/strom/mc/server"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_8"
"git.anygate.cloud/anygatecloud/strom/mc/server"
)
type StatusClient struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package data_test
import (
"testing"
"github.com/admin-else/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/data"
)
func TestLookupBiomeById(t *testing.T) {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"slices"
"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"
"testing"
"github.com/admin-else/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/data"
)
func TestLookupBlockByStateId(t *testing.T) {
@@ -4120,11 +4120,6 @@
"type": [
"bitfield",
[
{
"name": "unused",
"size": 2,
"signed": false
},
{
"name": "allows_restricted",
"size": 1,
@@ -11697,4 +11692,4 @@
}
}
}
}
}
@@ -2803,11 +2803,6 @@
"type": [
"bitfield",
[
{
"name": "unused",
"size": 2,
"signed": false
},
{
"name": "allows_restricted",
"size": 1,
@@ -10259,4 +10254,4 @@
}
}
}
}
}
@@ -3822,11 +3822,6 @@
"type": [
"bitfield",
[
{
"name": "unused",
"size": 2,
"signed": false
},
{
"name": "allows_restricted",
"size": 1,
@@ -11399,4 +11394,4 @@
}
}
}
}
}
@@ -4112,11 +4112,6 @@
"type": [
"bitfield",
[
{
"name": "unused",
"size": 2,
"signed": false
},
{
"name": "allows_restricted",
"size": 1,
+45 -12
View File
@@ -4112,11 +4112,6 @@
"type": [
"bitfield",
[
{
"name": "unused",
"size": 2,
"signed": false
},
{
"name": "allows_restricted",
"size": 1,
@@ -5726,12 +5721,15 @@
"mappings": {
"0": "empty",
"1": "any_fuel",
"2": "item",
"3": "item_stack",
"4": "tag",
"5": "smithing_trim",
"6": "with_remainder",
"7": "composite"
"2": "with_any_potion",
"3": "only_with_component",
"4": "item",
"5": "item_stack",
"6": "tag",
"7": "dyed",
"8": "smithing_trim",
"9": "with_remainder",
"10": "composite"
}
}
]
@@ -5745,9 +5743,44 @@
"fields": {
"empty": "void",
"any_fuel": "void",
"with_any_potion": [
"container",
[
{
"name": "display",
"type": "SlotDisplay"
}
]
],
"only_with_component": [
"container",
[
{
"name": "source",
"type": "SlotDisplay"
},
{
"name": "component",
"type": "IDSet"
}
]
],
"item": "varint",
"item_stack": "Slot",
"tag": "string",
"dyed": [
"container",
[
{
"name": "dye",
"type": "SlotDisplay"
},
{
"name": "target",
"type": "SlotDisplay"
}
]
],
"smithing_trim": [
"container",
[
@@ -11779,4 +11812,4 @@
}
}
}
}
}
+1 -1
View File
@@ -3,7 +3,7 @@ package data_test
import (
"testing"
"github.com/admin-else/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/data"
)
func TestLookUpProtocolVersion(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package data
import (
"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
+1 -1
View File
@@ -3,7 +3,7 @@ package gen
import (
"math"
"github.com/admin-else/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/data"
)
type NoiseParam int
+1 -1
View File
@@ -3,7 +3,7 @@ package gen
import (
"testing"
"github.com/admin-else/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/data"
)
func TestBiomeNoise_SampleBiome(t *testing.T) {
+2 -2
View File
@@ -1,8 +1,8 @@
package anvil_test
import (
"github.com/admin-else/strom/mc/nbt"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
)
// in seperate file not to lag my ide
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"strings"
"unsafe"
data2 "github.com/admin-else/strom/mc/data"
level2 "github.com/admin-else/strom/mc/level"
"github.com/admin-else/strom/mc/util"
data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
level2 "git.anygate.cloud/anygatecloud/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
type Chunk struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package anvil
import (
"io"
"github.com/admin-else/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
)
type Level struct {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"os"
"testing"
"github.com/admin-else/strom/mc/level"
anvil2 "github.com/admin-else/strom/mc/level/anvil"
"github.com/admin-else/strom/mc/util"
"git.anygate.cloud/anygatecloud/strom/mc/level"
anvil2 "git.anygate.cloud/anygatecloud/strom/mc/level/anvil"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
func TestLevel(t *testing.T) {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"io"
"os"
"github.com/admin-else/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
)
type CompressionStrategy uint8
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"strings"
"unsafe"
data2 "github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/level"
"github.com/admin-else/strom/mc/nbt"
"github.com/admin-else/strom/mc/util"
data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/util"
"github.com/go-viper/mapstructure/v2"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"embed"
"testing"
data2 "github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/level/litematic"
data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/level/litematic"
)
//go:embed testdata
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.com/admin-else/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/level"
)
func FuzzReadChunkFromChunkPacketData(f *testing.F) {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"log/slog"
"math"
data2 "github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/util"
data2 "git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
type BlockState struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"math"
"slices"
"github.com/admin-else/strom/mc/util"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
type StorageFormat struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package level_test
import (
"testing"
"github.com/admin-else/strom/mc/level"
"git.anygate.cloud/anygatecloud/strom/mc/level"
)
func heightmapFormat() level.StorageFormat {
+1 -1
View File
@@ -1,7 +1,7 @@
package structure
import (
"github.com/admin-else/strom/mc/nbt"
"git.anygate.cloud/anygatecloud/strom/mc/nbt"
"github.com/go-viper/mapstructure/v2"
)
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\x000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00A")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\b0000000000000000000000000000000000000000000000000000000012789ABC")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000\b000000000\x9d0000000000000000000000000000000000000000000000012789AB")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x00\x00\x000")
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x020000000000000000000\x0200000000000000000\x0200000000000000000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("000\xcf\xff\xff\xe88")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00A\x00")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00\x000")
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt"
"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 {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"io"
"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())
+3
View File
@@ -68,6 +68,9 @@ func (s *Tag) Decode(r io.Reader) (err error) {
if err != nil {
return
}
if id == End {
return
}
var name any
name, err = readPayload(String, r)
if err != nil {
+4 -4
View File
@@ -12,10 +12,10 @@ import (
"strings"
"sync"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
)
const (
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"math"
"testing"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
)
+4 -4
View File
@@ -6,10 +6,10 @@ import (
"strings"
"testing"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
)
func TestPacketRoundTripAllVersions(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package proto
import (
"reflect"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
)
type PidEtc struct {
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"net"
"sync"
"github.com/admin-else/strom/mc/crypto"
"github.com/admin-else/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/crypto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
)
type RawConn struct {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"io"
"reflect"
proto2 "github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
)
type Reader struct {
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"encoding/binary"
"io"
proto2 "github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_base"
proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
)
type Writer struct {
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"reflect"
"slices"
"github.com/admin-else/strom/mc/data"
"github.com/admin-else/strom/mc/event"
"github.com/admin-else/strom/mc/proto_base"
"github.com/admin-else/strom/mc/proto_generated"
"git.anygate.cloud/anygatecloud/strom/mc/data"
"git.anygate.cloud/anygatecloud/strom/mc/event"
"git.anygate.cloud/anygatecloud/strom/mc/proto_base"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated"
)
// 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"
"testing"
proto2 "github.com/admin-else/strom/mc/proto"
"github.com/admin-else/strom/mc/proto_generated/v1_21_11"
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
"github.com/admin-else/strom/mc/proto_generated/v1_21_9"
"github.com/admin-else/strom/mc/proto_generated/v26_2"
proto2 "git.anygate.cloud/anygatecloud/strom/mc/proto"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_11"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_8"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v1_21_9"
"git.anygate.cloud/anygatecloud/strom/mc/proto_generated/v26_2"
)
func TestCanSmartConvert(t *testing.T) {
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x05\x000000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("0")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x040000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x0400000")
-2
View File
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x86\x00000000")
@@ -1,2 +0,0 @@
go test fuzz v1
[]byte("")

Some files were not shown because too many files have changed in this diff Show More