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:
@@ -1,6 +1,6 @@
|
||||
// Code generated by strom. DO NOT EDIT.
|
||||
// source: minecraft-data/pc/1.21.9/protocol.json (sha256:9861cee397931c678c3b1837dcdf82e3fc885442c6bd0e4a60522fbf26653e59)
|
||||
// version: (devel) (go1.26.2)
|
||||
// version: v0.6.6-0.20260805154326-fa70ea36c6f5+dirty (go1.26.2)
|
||||
package v1_21_9
|
||||
|
||||
import (
|
||||
@@ -21908,7 +21908,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)
|
||||
@@ -22015,7 +22015,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 {
|
||||
|
||||
Reference in New Issue
Block a user