add Int64Component

This commit is contained in:
2026-02-12 20:34:32 +00:00
parent 6099538fa8
commit 08682c35c1
7 changed files with 141 additions and 75 deletions

View File

@@ -2,7 +2,6 @@ package block
import (
"encoding/json"
"fmt"
)
type Block struct {
@@ -23,17 +22,18 @@ func (b *BlockInstance) FromJSON(block *Block, data []byte) error {
for _, c := range block.Components {
jsonValue, ok := raw[c.Identifier()]
// jsonValue, ok := raw[c.Identifier()]
if !ok {
continue
// continue
jsonValue = nil
}
instance := c.NewInstance()
if err := instance.FromJSON(c, jsonValue); err != nil {
return err
}
components = append(components, instance)
fmt.Println(c.Identifier(), instance)
components = append(components, instance)
}
b.Components = components