Documentation
¶
Index ¶
- func ParseNBTBlock(blockName string, blockStates map[string]any, blockNBT map[string]any) (block nbt_parser_interface.Block, err error)
- func SetShulkerBoxFacing(container nbt_parser_interface.Block, facing uint8)
- type Banner
- type BannerNBT
- type BrewingStand
- type BrewingStandNBT
- type CommandBlock
- type CommandBlockNBT
- type Container
- func (c *Container) ConsiderOpenDirection() bool
- func (c *Container) FullStableBytes() []byte
- func (c Container) NBTStableBytes() []byte
- func (c Container) NeedCheckCompletely() bool
- func (c *Container) NeedSpecialHandle() bool
- func (c *Container) Parse(nbtMap map[string]any) error
- func (c *Container) SetBytes() []byte
- type ContainerNBT
- type DefaultBlock
- func (d *DefaultBlock) BlockName() string
- func (d DefaultBlock) BlockStates() map[string]any
- func (d DefaultBlock) BlockStatesString() string
- func (d DefaultBlock) FullStableBytes() []byte
- func (DefaultBlock) NBTStableBytes() []byte
- func (DefaultBlock) NeedCheckCompletely() bool
- func (DefaultBlock) NeedSpecialHandle() bool
- func (*DefaultBlock) Parse(nbtMap map[string]any) error
- type Frame
- type FrameNBT
- type ItemWithSlot
- type JukeBox
- type JukeBoxNBT
- type Lectern
- type LecternNBT
- type Sign
- type SignNBT
- type SignText
- type StructureBlock
- type StructureBlockNBT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseNBTBlock ¶
func ParseNBTBlock(blockName string, blockStates map[string]any, blockNBT map[string]any) (block nbt_parser_interface.Block, err error)
ParseNBTBlock 从方块实体数据 blockNBT 解析一个方块实体。 blockName 和 blockStates 分别指示这个方块实体的名称和方块状态
func SetShulkerBoxFacing ¶
func SetShulkerBoxFacing(container nbt_parser_interface.Block, facing uint8)
SetShulkerBoxFacing 将 container 的潜影盒朝向设置为 facing。 SetShulkerBoxFacing 假定 container 可以被断言为 Container。 如果不是 Container,则 SetShulkerBoxFacing 将不执行任何操作
Types ¶
type Banner ¶
type Banner struct {
DefaultBlock
NBT BannerNBT
}
旗帜
func (*Banner) FullStableBytes ¶
func (Banner) NBTStableBytes ¶
func (Banner) NeedCheckCompletely ¶
func (Banner) NeedSpecialHandle ¶
type BannerNBT ¶
type BannerNBT struct {
Base int32
Patterns []nbt_parser_general.BannerPattern
Type int32
}
BannerNBT ..
type BrewingStand ¶
type BrewingStand struct {
DefaultBlock
NBT BrewingStandNBT
}
酿造台
func (*BrewingStand) FullStableBytes ¶
func (b *BrewingStand) FullStableBytes() []byte
func (BrewingStand) NBTStableBytes ¶
func (b BrewingStand) NBTStableBytes() []byte
func (BrewingStand) NeedCheckCompletely ¶
func (BrewingStand) NeedCheckCompletely() bool
func (*BrewingStand) NeedSpecialHandle ¶
func (b *BrewingStand) NeedSpecialHandle() bool
type BrewingStandNBT ¶
type BrewingStandNBT struct {
Items []ItemWithSlot
CustomName string
}
BrewingStandNBT ..
type CommandBlock ¶
type CommandBlock struct {
DefaultBlock
NBT CommandBlockNBT
}
命令方块
func (*CommandBlock) FullStableBytes ¶
func (c *CommandBlock) FullStableBytes() []byte
func (CommandBlock) NBTStableBytes ¶
func (c CommandBlock) NBTStableBytes() []byte
func (CommandBlock) NeedCheckCompletely ¶
func (c CommandBlock) NeedCheckCompletely() bool
func (*CommandBlock) NeedSpecialHandle ¶
func (c *CommandBlock) NeedSpecialHandle() bool
type CommandBlockNBT ¶
type CommandBlockNBT struct {
Command string `mapstructure:"Command"`
CustomName string `mapstructure:"CustomName"`
TickDelay int32 `mapstructure:"TickDelay"`
ExecuteOnFirstTick byte `mapstructure:"ExecuteOnFirstTick"`
TrackOutput byte `mapstructure:"TrackOutput"`
ConditionalMode byte `mapstructure:"conditionalMode"`
Auto byte `mapstructure:"auto"`
Version int32 `mapstructure:"Version"`
}
CommandBlockNBT ..
type Container ¶
type Container struct {
DefaultBlock
CustomName string
NBT ContainerNBT
}
容器
func (*Container) ConsiderOpenDirection ¶
ConsiderOpenDirection 指示打开目标容器 是否需要考虑其打开方向上的障碍物方块, 这似乎只对箱子和潜影盒有效
func (*Container) FullStableBytes ¶
func (Container) NBTStableBytes ¶
func (Container) NeedCheckCompletely ¶
func (*Container) NeedSpecialHandle ¶
type ContainerNBT ¶
type ContainerNBT struct {
Items []ItemWithSlot
ShulkerFacing uint8
}
ContainerNBT ..
type DefaultBlock ¶
默认 NBT 实体
func (*DefaultBlock) BlockName ¶
func (d *DefaultBlock) BlockName() string
func (DefaultBlock) BlockStates ¶
func (d DefaultBlock) BlockStates() map[string]any
func (DefaultBlock) BlockStatesString ¶
func (d DefaultBlock) BlockStatesString() string
func (DefaultBlock) FullStableBytes ¶
func (d DefaultBlock) FullStableBytes() []byte
func (DefaultBlock) NBTStableBytes ¶
func (DefaultBlock) NBTStableBytes() []byte
func (DefaultBlock) NeedCheckCompletely ¶
func (DefaultBlock) NeedCheckCompletely() bool
func (DefaultBlock) NeedSpecialHandle ¶
func (DefaultBlock) NeedSpecialHandle() bool
type Frame ¶
type Frame struct {
DefaultBlock
NBT FrameNBT
}
物品展示框
func (*Frame) FullStableBytes ¶
func (Frame) NBTStableBytes ¶
func (Frame) NeedCheckCompletely ¶
func (Frame) NeedSpecialHandle ¶
type FrameNBT ¶
type FrameNBT struct {
ItemRotation float32
HaveItem bool
Item nbt_parser_interface.Item
}
FrameNBT ..
type ItemWithSlot ¶
type ItemWithSlot struct {
Item nbt_parser_interface.Item
Slot uint8
}
ItemWithSlot ..
type JukeBox ¶
type JukeBox struct {
DefaultBlock
NBT JukeBoxNBT
}
唱片机
func (*JukeBox) FullStableBytes ¶
func (JukeBox) NBTStableBytes ¶
func (JukeBox) NeedCheckCompletely ¶
func (JukeBox) NeedSpecialHandle ¶
type JukeBoxNBT ¶
type JukeBoxNBT struct {
CustomName string
HaveDisc bool
Disc nbt_parser_interface.Item
}
JukeBoxNBT ..
type Lectern ¶
type Lectern struct {
DefaultBlock
NBT LecternNBT
}
讲台
func (*Lectern) FullStableBytes ¶
func (Lectern) NBTStableBytes ¶
func (Lectern) NeedCheckCompletely ¶
func (Lectern) NeedSpecialHandle ¶
type LecternNBT ¶
type LecternNBT struct {
CustomName string
HaveBook bool
Book nbt_parser_interface.Item
}
LecternNBT ..
type Sign ¶
type Sign struct {
DefaultBlock
NBT SignNBT
}
告示牌
func (*Sign) FullStableBytes ¶
func (Sign) NBTStableBytes ¶
func (Sign) NeedCheckCompletely ¶
func (*Sign) NeedSpecialHandle ¶
type SignNBT ¶
type SignNBT struct {
IsWaxed byte `mapstructure:"IsWaxed"`
FrontText SignText `mapstructure:"FrontText"`
BackText SignText `mapstructure:"BackText"`
}
SignNBT ..
type SignText ¶
type SignText struct {
IgnoreLighting byte `mapstructure:"IgnoreLighting"`
SignTextColor int32 `mapstructure:"SignTextColor"`
Text string `mapstructure:"Text"`
}
SignText ..
type StructureBlock ¶
type StructureBlock struct {
DefaultBlock
NBT StructureBlockNBT
}
结构方块
func (*StructureBlock) FullStableBytes ¶
func (s *StructureBlock) FullStableBytes() []byte
func (StructureBlock) NBTStableBytes ¶
func (s StructureBlock) NBTStableBytes() []byte
func (StructureBlock) NeedCheckCompletely ¶
func (s StructureBlock) NeedCheckCompletely() bool
func (StructureBlock) NeedSpecialHandle ¶
func (s StructureBlock) NeedSpecialHandle() bool
type StructureBlockNBT ¶
type StructureBlockNBT struct {
AnimationMode byte `mapstructure:"animationMode"`
AnimationSeconds float32 `mapstructure:"animationSeconds"`
Data int32 `mapstructure:"data"`
DataField string `mapstructure:"dataField"`
IgnoreEntities byte `mapstructure:"ignoreEntities"`
IncludePlayers byte `mapstructure:"includePlayers"`
Integrity float32 `mapstructure:"integrity"`
Mirror byte `mapstructure:"mirror"`
RedstoneSaveMode int32 `mapstructure:"redstoneSaveMode"`
RemoveBlocks byte `mapstructure:"removeBlocks"`
Rotation byte `mapstructure:"rotation"`
Seed int64 `mapstructure:"seed"`
ShowBoundingBox byte `mapstructure:"showBoundingBox"`
StructureName string `mapstructure:"structureName"`
XStructureOffset int32 `mapstructure:"xStructureOffset"`
XStructureSize int32 `mapstructure:"xStructureSize"`
YStructureOffset int32 `mapstructure:"yStructureOffset"`
YStructureSize int32 `mapstructure:"xStructureSize"`
ZStructureOffset int32 `mapstructure:"zStructureOffset"`
ZStructureSize int32 `mapstructure:"xStructureSize"`
}
StructureBlockNBT ..
Click to show internal directories.
Click to hide internal directories.