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
This commit is contained in:
OpenCode
2026-08-05 18:33:39 +02:00
parent fa70ea36c6
commit eb83786f9a
14 changed files with 2138 additions and 101 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
// Code generated by strom. DO NOT EDIT.
// source: minecraft-data/pc/26.1/protocol.json (sha256:dfb6318886cd3ceab617f75ac05e24f9836a64501d60551071289b904ebfc389)
// version: (devel) (go1.26.2)
// version: v0.6.6-0.20260805154326-fa70ea36c6f5+dirty (go1.26.2)
package v26_1
import (
@@ -22183,7 +22183,7 @@ func (ret *PlayToClientPacketTrackedWaypoint) Decode(r io.ReadSeeker) (err error
if err != nil {
return
}
switch ret.Waypoint.Type {
switch ret.Waypoint.Anon {
case "azimuth":
var PlayToClientPacketTrackedWaypointWaypointDataAzimuthTmp float32
err = binary.Read(r, binary.BigEndian, &PlayToClientPacketTrackedWaypointWaypointDataAzimuthTmp)
@@ -22290,7 +22290,7 @@ func (ret *PlayToClientPacketTrackedWaypoint) Encode(w io.Writer) (err error) {
if err != nil {
return
}
switch ret.Waypoint.Type {
switch ret.Waypoint.Anon {
case "azimuth":
PlayToClientPacketTrackedWaypointWaypointData, ok := ret.Waypoint.Data.(float32)
if !ok {