egg
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/admin-else/strom/nbt"
|
||||
)
|
||||
|
||||
// Component represents a Minecraft text component.
|
||||
@@ -538,3 +540,14 @@ func (c *Component) writePretty(sb *strings.Builder) {
|
||||
extra.writePretty(sb)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Component) AsNBT() nbt.Anon {
|
||||
return nbt.Anon{Value: c.ToNBT()}
|
||||
}
|
||||
|
||||
func (c *Component) AsOldNBT() nbt.Tag {
|
||||
return nbt.Tag{
|
||||
Name: "",
|
||||
Value: c.ToNBT(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user