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/26.2/protocol.json (sha256:7ba66411adcc68a668f38211e1b00eeb386a345d5eb16fadd6dc1c7f94bb175f)
|
||||
// version: (devel) (go1.26.2)
|
||||
// version: v0.6.6-0.20260805154326-fa70ea36c6f5+dirty (go1.26.2)
|
||||
package v26_2
|
||||
|
||||
import (
|
||||
@@ -22192,7 +22192,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)
|
||||
@@ -22299,7 +22299,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