protocol

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDChiseledBookshelf = "ChiseledBookshelf"
	IDDayLightDetector  = "DaylightDetector"
	IDEndPortal         = "EndPortal"
	IDSculkCatalyst     = "SculkCatalyst"
	IDSporeBlossom      = "SporeBlossom"

	IDBrushableBlock = "BrushableBlock"
	IDDecoratedPot   = "DecoratedPot"

	IDBanner          = "Banner"
	IDBeacon          = "Beacon"
	IDBed             = "Bed"
	IDBeehive         = "Beehive"
	IDBell            = "Bell"
	IDBrewingStand    = "BrewingStand"
	IDCampfire        = "Campfire"
	IDCommandBlock    = "CommandBlock"
	IDComparator      = "Comparator"
	IDConduit         = "Conduit"
	IDCauldron        = "Cauldron"
	IDEnchantingTable = "EnchantTable"
	IDFlowerPot       = "FlowerPot"
	IDHopper          = "Hopper"
	IDJigsaw          = "JigsawBlock"
	IDJukebox         = "Jukebox"
	IDLectern         = "Lectern"
	IDLodestone       = "Lodestone"
	IDMobSpawner      = "MobSpawner"
	IDMovingBlock     = "MovingBlock"
	IDNetherReactor   = "NetherReactor"
	IDNoteBlock       = "Music"
	IDPiston          = "PistonArm"
	IDSkull           = "Skull"
	IDStructureBlock  = "StructureBlock"

	IDSign        = "Sign"
	IDHangingSign = "HangingSign"

	IDSculkSensor           = "SculkSensor"
	IDCalibratedSculkSensor = "CalibratedSculkSensor"
	IDSculkShrieker         = "SculkShrieker"

	IDFurnace      = "Furnace"
	IDBlastFurnace = "BlastFurnace"
	IDSmoker       = "Smoker"

	IDChest      = "Chest"
	IDBarrel     = "Barrel"
	IDEnderChest = "EnderChest"
	IDShulkerBox = "ShulkerBox"

	IDDispenser = "Dispenser"
	IDDropper   = "Dropper"

	IDFrame     = "ItemFrame"
	IDGlowFrame = "GlowItemFrame"

	IDChemistryTable = "ChemistryTable"
	IDModBlock       = "ModBlock"
)

以下列出了各个 方块实体 的 ID

Variables

This section is empty.

Functions

func NewPool

func NewPool() map[string]BlockNBT

返回一个方块实体池, 其中包含了 方块实体 的 ID 到其对应 方块实体 的映射

Types

type Banner struct {
	Base     uint32                   `nbt:"Base"`     // * TAG_Int(4) = 0
	Patterns []general.BannerPatterns `nbt:"Patterns"` // TAG_List[TAG_Compound] (9[10])
	Type     int32                    `nbt:"Type"`     // TAG_Int(4) = 0
	general.Global
}

旗帜

func (*Banner) FromNBT

func (b *Banner) FromNBT(x map[string]any)

func (*Banner) ID

func (*Banner) ID() string

ID ...

func (*Banner) Marshal

func (b *Banner) Marshal(io marshal.IO)

func (*Banner) ToNBT

func (b *Banner) ToNBT() map[string]any

type Barrel

type Barrel struct {
	Chest
}

木桶

func (*Barrel) ID

func (*Barrel) ID() string

ID ...

type Beacon

type Beacon struct {
	Primary   int32 `nbt:"primary"`   // TAG_Int(4) = 0
	Secondary int32 `nbt:"secondary"` // TAG_Int(4) = 0
	general.Global
}

信标

func (*Beacon) FromNBT

func (b *Beacon) FromNBT(x map[string]any)

func (*Beacon) ID

func (*Beacon) ID() string

ID ...

func (*Beacon) Marshal

func (b *Beacon) Marshal(io marshal.IO)

func (*Beacon) ToNBT

func (b *Beacon) ToNBT() map[string]any

type Bed

type Bed struct {
	Color uint32 `nbt:"color"` // * TAG_Byte(1) = 0
	general.Global
}

func (*Bed) FromNBT

func (b *Bed) FromNBT(x map[string]any)

func (*Bed) ID

func (*Bed) ID() string

ID ...

func (*Bed) Marshal

func (b *Bed) Marshal(io marshal.IO)

func (*Bed) ToNBT

func (b *Bed) ToNBT() map[string]any

type Beehive

type Beehive struct {
	Occupants       []general.BeehiveOccupants `nbt:"Occupants"`       // TAG_List[TAG_Compound] (9[10])
	ShouldSpawnBees byte                       `nbt:"ShouldSpawnBees"` // TAG_Byte(1) = 0
	general.Global
}

蜂箱

func (*Beehive) FromNBT

func (b *Beehive) FromNBT(x map[string]any)

func (*Beehive) ID

func (*Beehive) ID() string

ID ...

func (*Beehive) Marshal

func (b *Beehive) Marshal(io marshal.IO)

func (*Beehive) ToNBT

func (b *Beehive) ToNBT() map[string]any

type Bell

type Bell struct {
	Direction int32 `nbt:"Direction"` // TAG_Int(4) = 255
	Ringing   byte  `nbt:"Ringing"`   // TAG_Byte(1) = 0
	Ticks     int32 `nbt:"Ticks"`     // TAG_Int(4) = 18
	general.Global
}

func (*Bell) FromNBT

func (b *Bell) FromNBT(x map[string]any)

func (*Bell) ID

func (*Bell) ID() string

ID ...

func (*Bell) Marshal

func (b *Bell) Marshal(io marshal.IO)

func (*Bell) ToNBT

func (b *Bell) ToNBT() map[string]any

type BlastFurnace

type BlastFurnace struct {
	Furnace
}

高炉

func (*BlastFurnace) ID

func (*BlastFurnace) ID() string

ID ...

type BlockNBT

type BlockNBT interface {
	ID() string               // 返回该 方块实体 的 ID
	Marshal(io marshal.IO)    // 解码或编码为二进制的平铺型 __tag NBT
	ToNBT() map[string]any    // 将该 方块实体 所记的数据转换为 NBT
	FromNBT(x map[string]any) // 将 x 指代的 NBT 加载到该 方块实体
}

描述 方块实体 的通用接口

type BrewingStand

type BrewingStand struct {
	CookTime   int16                    `nbt:"CookTime"`   // TAG_Short(3) = 0
	FuelAmount int16                    `nbt:"FuelAmount"` // TAG_Short(3) = 0
	FuelTotal  int16                    `nbt:"FuelTotal"`  // TAG_Short(3) = 0
	Items      marshal.ItemInstanceList `nbt:"Items"`      // TAG_List[TAG_Compound] (9[10])
	general.Global
}

酿造台

func (*BrewingStand) FromNBT

func (b *BrewingStand) FromNBT(x map[string]any)

func (*BrewingStand) ID

func (*BrewingStand) ID() string

ID ...

func (*BrewingStand) Marshal

func (b *BrewingStand) Marshal(io marshal.IO)

func (*BrewingStand) ToNBT

func (b *BrewingStand) ToNBT() map[string]any

type BrushableBlock

type BrushableBlock struct {
	LootTable      string `nbt:"LootTable"`       // Not used; TAG_String(8) = "loot_tables/entities/empty_brushable_block.json"
	LootTableSeed  int32  `nbt:"LootTableSeed"`   // Not used; TAG_Int(4) = 0
	BrushCount     int32  `nbt:"brush_count"`     // Not used; TAG_Int(4) = 0
	BrushDirection byte   `nbt:"brush_direction"` // Not used; AG_Byte(1) = 6
	general.Global
}

可疑的方块

func (*BrushableBlock) FromNBT

func (b *BrushableBlock) FromNBT(x map[string]any)

func (*BrushableBlock) ID

func (*BrushableBlock) ID() string

ID ...

func (*BrushableBlock) Marshal

func (b *BrushableBlock) Marshal(io marshal.IO)

func (*BrushableBlock) ToNBT

func (b *BrushableBlock) ToNBT() map[string]any

type CalibratedSculkSensor

type CalibratedSculkSensor struct {
	SculkSensor
}

校频幽匿感测体

func (*CalibratedSculkSensor) ID

ID ...

type Campfire

type Campfire struct {
	Item1     marshal.Optional[marshal.ItemInstance] `nbt:"Item1"`     // TAG_Compound(10)
	Item2     marshal.Optional[marshal.ItemInstance] `nbt:"Item2"`     // TAG_Compound(10)
	Item3     marshal.Optional[marshal.ItemInstance] `nbt:"Item3"`     // TAG_Compound(10)
	Item4     marshal.Optional[marshal.ItemInstance] `nbt:"Item4"`     // TAG_Compound(10)
	ItemTime1 int32                                  `nbt:"ItemTime1"` // TAG_Int(4) = 0
	ItemTime2 int32                                  `nbt:"ItemTime2"` // TAG_Int(4) = 0
	ItemTime3 int32                                  `nbt:"ItemTime3"` // TAG_Int(4) = 0
	ItemTime4 int32                                  `nbt:"ItemTime4"` // TAG_Int(4) = 0
	general.Global
}

营火

func (*Campfire) FromNBT

func (c *Campfire) FromNBT(x map[string]any)

func (*Campfire) ID

func (*Campfire) ID() string

ID ...

func (*Campfire) Marshal

func (c *Campfire) Marshal(io marshal.IO)

func (*Campfire) ToNBT

func (c *Campfire) ToNBT() map[string]any

type Cauldron

type Cauldron struct {
	Items       marshal.ItemInstanceList `nbt:"Items"`       // TAG_List[TAG_Compound] (9[10])
	PotionId    int16                    `nbt:"PotionId"`    // TAG_Short(3) = -1
	PotionType  int16                    `nbt:"PotionType"`  // TAG_Short(3) = -1
	CustomColor int32                    `nbt:"CustomColor"` // TAG_Int(4) = 0
	general.Global
}

炼药锅

func (*Cauldron) FromNBT

func (c *Cauldron) FromNBT(x map[string]any)

func (*Cauldron) ID

func (*Cauldron) ID() string

ID ...

func (*Cauldron) Marshal

func (c *Cauldron) Marshal(io marshal.IO)

func (*Cauldron) ToNBT

func (c *Cauldron) ToNBT() map[string]any

type ChemistryTable

type ChemistryTable struct {
	Item marshal.Optional[general.ChemistryTableItem]
	general.Global
}

化合物创建器

func (*ChemistryTable) FromNBT

func (c *ChemistryTable) FromNBT(x map[string]any)

func (*ChemistryTable) ID

func (*ChemistryTable) ID() string

ID ...

func (*ChemistryTable) Marshal

func (c *ChemistryTable) Marshal(io marshal.IO)

func (*ChemistryTable) ToNBT

func (c *ChemistryTable) ToNBT() map[string]any

type Chest

type Chest struct {
	Findable byte                     `nbt:"Findable"` // TAG_Byte(1) = 0
	Items    marshal.ItemInstanceList `nbt:"Items"`    // TAG_List[TAG_Compound] (9[10])

	HasPair     byte  // Not a TAG, but a mark used to decide how to decode these four fields.
	Pairlead    byte  `nbt:"pairlead"`    // TAG_Byte(1) = 0
	Pairx       int32 `nbt:"pairx"`       // TAG_Int(4) = 0
	Pairz       int32 `nbt:"Pairz"`       // TAG_Int(4) = 0
	ForceUnpair byte  `nbt:"forceunpair"` // TAG_Byte(1) = 1

	CustomSize marshal.Optional[int16] `nbt:"CustomSize"` // TAG_Short(3) = 0

	general.Loot
	general.Global
}

箱子

func (*Chest) FromNBT

func (c *Chest) FromNBT(x map[string]any)

func (*Chest) ID

func (c *Chest) ID() string

ID ...

func (*Chest) Marshal

func (c *Chest) Marshal(io marshal.IO)

func (*Chest) ToNBT

func (c *Chest) ToNBT() map[string]any

type ChiseledBookshelf

type ChiseledBookshelf struct {
	general.Global
}

雕纹书架

func (*ChiseledBookshelf) ID

func (*ChiseledBookshelf) ID() string

ID ...

type CommandBlock

type CommandBlock struct {
	Command            string   `nbt:"Command"`            // TAG_String(8) = ""
	CustomName         string   `nbt:"CustomName"`         // TAG_String(8) = ""
	ExecuteOnFirstTick byte     `nbt:"ExecuteOnFirstTick"` // TAG_Byte(1) = 0
	LPCommandMode      int32    `nbt:"LPCommandMode"`      // TAG_Int(4) = 0
	LPCondionalMode    byte     `nbt:"LPCondionalMode"`    // TAG_Byte(1) = 0
	LPRedstoneMode     byte     `nbt:"LPRedstoneMode"`     // TAG_Byte(1) = 0
	LastExecution      int64    `nbt:"LastExecution"`      // TAG_Long(5) = 0
	LastOutput         string   `nbt:"LastOutput"`         // TAG_Byte(8) = ""
	LastOutputParams   []string `nbt:"LastOutputParams"`   // TAG_List[TAG_String] (9[8]) = []
	SuccessCount       int32    `nbt:"SuccessCount"`       // TAG_Int(4) = 0
	TickDelay          int32    `nbt:"TickDelay"`          // TAG_Int(4) = 0
	TrackOutput        byte     `nbt:"TrackOutput"`        // TAG_Byte(1) = 1
	Version            int32    `nbt:"Version"`            // TAG_Int(4) = 35
	Auto               byte     `nbt:"auto"`               // TAG_Byte(1) = 1
	ConditionMet       byte     `nbt:"conditionMet"`       // TAG_Byte(1) = 0
	ConditionalMode    byte     `nbt:"conditionalMode"`    // Not used; TAG_Byte(1) = 0
	general.RedstoneBlock
	general.Global
}

命令方块

func (*CommandBlock) FromNBT

func (c *CommandBlock) FromNBT(x map[string]any)

func (*CommandBlock) ID

func (*CommandBlock) ID() string

ID ...

func (*CommandBlock) Marshal

func (c *CommandBlock) Marshal(io marshal.IO)

func (*CommandBlock) ToNBT

func (c *CommandBlock) ToNBT() map[string]any

type Comparator

type Comparator struct {
	OutputSignal int32 `nbt:"OutputSignal"` // TAG_Int(4) = 0
	general.Global
}

比较器

func (*Comparator) FromNBT

func (c *Comparator) FromNBT(x map[string]any)

func (*Comparator) ID

func (*Comparator) ID() string

ID ...

func (*Comparator) Marshal

func (c *Comparator) Marshal(io marshal.IO)

func (*Comparator) ToNBT

func (c *Comparator) ToNBT() map[string]any

type Conduit

type Conduit struct {
	Active byte  `nbt:"Active"` // TAG_Byte(1) = 0
	Target int64 `nbt:"Target"` // TAG_Long(5) = -1
	general.Global
}

潮涌核心

func (*Conduit) FromNBT

func (c *Conduit) FromNBT(x map[string]any)

func (*Conduit) ID

func (*Conduit) ID() string

ID ...

func (*Conduit) Marshal

func (c *Conduit) Marshal(io marshal.IO)

func (*Conduit) ToNBT

func (c *Conduit) ToNBT() map[string]any

type DayLightDetector

type DayLightDetector struct {
	general.Global
}

阳光探测器

func (*DayLightDetector) ID

func (*DayLightDetector) ID() string

ID ...

type DecoratedPot

type DecoratedPot struct {
	Animation byte                 `nbt:"animation"` // Not used; TAG_Byte(1) = 0
	Item      marshal.ItemInstance `nbt:"item"`      // Not used; TAG_Compound(10)
	general.Global
}

饰纹陶罐

func (*DecoratedPot) FromNBT

func (d *DecoratedPot) FromNBT(x map[string]any)

func (*DecoratedPot) ID

func (*DecoratedPot) ID() string

ID ...

func (*DecoratedPot) Marshal

func (d *DecoratedPot) Marshal(io marshal.IO)

func (*DecoratedPot) ToNBT

func (d *DecoratedPot) ToNBT() map[string]any

type Dispenser

type Dispenser struct {
	Items marshal.ItemInstanceList `nbt:"Items"`      // TAG_List[TAG_Compound] (9[10])
	Name  string                   `nbt:"CustomName"` // TAG_String(8) = ""
	general.Loot
	general.Global
}

发射器

func (*Dispenser) FromNBT

func (d *Dispenser) FromNBT(x map[string]any)

func (*Dispenser) ID

func (*Dispenser) ID() string

ID ...

func (*Dispenser) Marshal

func (d *Dispenser) Marshal(io marshal.IO)

func (*Dispenser) ToNBT

func (d *Dispenser) ToNBT() map[string]any

type Dropper

type Dropper struct {
	Dispenser
}

投掷器

func (*Dropper) ID

func (*Dropper) ID() string

ID ...

type EnchantingTable

type EnchantingTable struct {
	Rotation float32 `nbt:"rott"`       // TAG_Float(6) = 0
	Name     string  `nbt:"CustomName"` // TAG_String(8) = ""
	general.Global
}

附魔台

func (*EnchantingTable) FromNBT

func (e *EnchantingTable) FromNBT(x map[string]any)

func (*EnchantingTable) ID

func (*EnchantingTable) ID() string

ID ...

func (*EnchantingTable) Marshal

func (e *EnchantingTable) Marshal(io marshal.IO)

func (*EnchantingTable) ToNBT

func (e *EnchantingTable) ToNBT() map[string]any

type EndPortal

type EndPortal struct {
	general.Global
}

末地折跃门

func (*EndPortal) ID

func (*EndPortal) ID() string

ID ...

type EnderChest

type EnderChest struct {
	Chest
}

末影箱

func (*EnderChest) ID

func (*EnderChest) ID() string

ID ...

type FlowerPot

type FlowerPot struct {
	PlantBlock map[string]any `nbt:"PlantBlock"` // TAG_Compound(10)
	general.Global
}

花盆

func (*FlowerPot) FromNBT

func (f *FlowerPot) FromNBT(x map[string]any)

func (*FlowerPot) ID

func (*FlowerPot) ID() string

ID ...

func (*FlowerPot) Marshal

func (f *FlowerPot) Marshal(io marshal.IO)

func (*FlowerPot) ToNBT

func (f *FlowerPot) ToNBT() map[string]any

type Frame

type Frame struct {
	Frame marshal.Optional[general.Frame]
	general.Global
}

物品展示框

func (*Frame) FromNBT

func (f *Frame) FromNBT(x map[string]any)

func (*Frame) ID

func (*Frame) ID() string

ID ...

func (*Frame) Marshal

func (f *Frame) Marshal(io marshal.IO)

func (*Frame) ToNBT

func (f *Frame) ToNBT() map[string]any

type Furnace

type Furnace struct {
	BurnDuration int16                    `nbt:"BurnDuration"` // TAG_Short(3) = 0
	BurnTime     int16                    `nbt:"BurnTime"`     // TAG_Short(3) = 0
	CookTime     int16                    `nbt:"CookTime"`     // TAG_Short(3) = 0
	Items        marshal.ItemInstanceList `nbt:"Items"`        // TAG_List[TAG_Compound] (9[10])
	StoredXPInt  int32                    `nbt:"StoredXPInt"`  // TAG_Int(4) = 0
	general.Global
}

熔炉

func (*Furnace) FromNBT

func (f *Furnace) FromNBT(x map[string]any)

func (*Furnace) ID

func (*Furnace) ID() string

ID ...

func (*Furnace) Marshal

func (f *Furnace) Marshal(io marshal.IO)

func (*Furnace) ToNBT

func (f *Furnace) ToNBT() map[string]any

type GlowFrame

type GlowFrame struct {
	Frame
}

荧光物品展示框

func (*GlowFrame) ID

func (*GlowFrame) ID() string

ID ...

type HangingSign

type HangingSign struct {
	Sign
}

悬挂式告示牌

func (*HangingSign) ID

func (*HangingSign) ID() string

ID ...

type Hopper

type Hopper struct {
	Items            marshal.ItemInstanceList `nbt:"Items"`            // TAG_List[TAG_Compound] (9[10])
	TransferCooldown int32                    `nbt:"TransferCooldown"` // TAG_Int(4) = 0
	MoveItemSpeed    int16                    `nbt:"MoveItemSpeed"`    // TAG_Short(3) = 0
	general.Global
}

漏斗

func (*Hopper) FromNBT

func (h *Hopper) FromNBT(x map[string]any)

func (*Hopper) ID

func (*Hopper) ID() string

ID ...

func (*Hopper) Marshal

func (h *Hopper) Marshal(io marshal.IO)

func (*Hopper) ToNBT

func (h *Hopper) ToNBT() map[string]any

type Jigsaw

type Jigsaw struct {
	FinalState        string `nbt:"final_state"`        // TAG_String(8) = "minecraft:air"
	Joint             string `nbt:"joint"`              // TAG_String(8) = "rollable"
	Name              string `nbt:"name"`               // TAG_String(8) = "minecraft:empty"
	PlacementPriority int32  `nbt:"placement_priority"` // Not used; TAG_Int(4) = 0
	SelectionPriority int32  `nbt:"selection_priority"` // Not used; TAG_Int(4) = 0
	Target            string `nbt:"target"`             // TAG_String(8) = "minecraft:empty"
	TargetPool        string `nbt:"target_pool"`        // TAG_String(8) = "minecraft:empty"
	general.Global
}

拼图方块

func (*Jigsaw) FromNBT

func (j *Jigsaw) FromNBT(x map[string]any)

func (*Jigsaw) ID

func (*Jigsaw) ID() string

ID ...

func (*Jigsaw) Marshal

func (j *Jigsaw) Marshal(io marshal.IO)

func (*Jigsaw) ToNBT

func (j *Jigsaw) ToNBT() map[string]any

type Jukebox

type Jukebox struct {
	RecordItem marshal.Optional[marshal.ItemInstance] `nbt:"RecordItem"` // TAG_Compound(10)
	general.Global
}

唱片机

func (*Jukebox) FromNBT

func (j *Jukebox) FromNBT(x map[string]any)

func (*Jukebox) ID

func (j *Jukebox) ID() string

ID ...

func (*Jukebox) Marshal

func (j *Jukebox) Marshal(io marshal.IO)

func (*Jukebox) ToNBT

func (j *Jukebox) ToNBT() map[string]any

type Lectern

type Lectern struct {
	Book       marshal.ItemInstance `nbt:"book"`       // TAG_Compound(10)
	HasBook    byte                 `nbt:"hasBook"`    // TAG_Byte(1) = 0
	Page       int32                `nbt:"page"`       // TAG_Int(4) = 0
	TotalPages int32                `nbt:"totalPages"` // TAG_Int(4) = 1
	general.Global
}

讲台

func (*Lectern) CheckExist

func (l *Lectern) CheckExist(x map[string]any) (exist bool)

检查 x 是否存在 Lectern 中记录的所有数据

func (*Lectern) FromNBT

func (l *Lectern) FromNBT(x map[string]any)

func (*Lectern) ID

func (*Lectern) ID() string

ID ...

func (*Lectern) Marshal

func (l *Lectern) Marshal(io marshal.IO)

func (*Lectern) ToNBT

func (l *Lectern) ToNBT() map[string]any

type Lodestone

type Lodestone struct {
	TrackingHandle marshal.Optional[int32] `nbt:"trackingHandle"` // TAG_Int(4) = 0
	general.Global
}

磁石

func (*Lodestone) FromNBT

func (l *Lodestone) FromNBT(x map[string]any)

func (*Lodestone) ID

func (*Lodestone) ID() string

ID ...

func (*Lodestone) Marshal

func (l *Lodestone) Marshal(io marshal.IO)

func (*Lodestone) ToNBT

func (l *Lodestone) ToNBT() map[string]any

type MobSpawner

type MobSpawner struct {
	Delay               int16   `nbt:"Delay"`               // TAG_Short(3) = 20
	DisplayEntityHeight float32 `nbt:"DisplayEntityHeight"` // TAG_Float(6) = 1.7999999523162842
	DisplayEntityScale  float32 `nbt:"DisplayEntityScale"`  // TAG_Float(6) = 1
	DisplayEntityWidth  float32 `nbt:"DisplayEntityWidth"`  // TAG_Float(6) = 0.800000011920929
	EntityIdentifier    string  `nbt:"EntityIdentifier"`    // TAG_String(8) = ""
	MaxNearbyEntities   int16   `nbt:"MaxNearbyEntities"`   // TAG_Short(3) = 6
	MaxSpawnDelay       int16   `nbt:"MaxSpawnDelay"`       // TAG_Short(3) = 800
	MinSpawnDelay       int16   `nbt:"MinSpawnDelay"`       // TAG_Short(3) = 200
	RequiredPlayerRange int16   `nbt:"RequiredPlayerRange"` // TAG_Short(3) = 16
	SpawnCount          int16   `nbt:"SpawnCount"`          // TAG_Short(3) = 4
	SpawnRange          int16   `nbt:"SpawnRange"`          // TAG_Short(3) = 4

	SpawnData       marshal.Optional[general.SpawnData]      `nbt:"SpawnData"`       // TAG_Compound(10)
	SpawnPotentials marshal.Optional[general.MultiSpawnData] `nbt:"SpawnPotentials"` // TAG_List(9)

	general.Global
}

刷怪笼

func (*MobSpawner) FromNBT

func (m *MobSpawner) FromNBT(x map[string]any)

func (*MobSpawner) ID

func (*MobSpawner) ID() string

ID ...

func (*MobSpawner) Marshal

func (m *MobSpawner) Marshal(io marshal.IO)

func (*MobSpawner) ToNBT

func (m *MobSpawner) ToNBT() map[string]any

type ModBlock

type ModBlock struct {
	Tick       byte   `nbt:"_tick"`       // TAG_Byte(1) = 0
	Movable    byte   `nbt:"_movable"`    // TAG_Byte(1) = 1
	ExData     uint32 `nbt:"exData"`      // * TAG_Int(4) = 0
	BlockName  string `nbt:"_blockName"`  // TAG_String(8) = ""
	UniqueId   int64  `nbt:"_uniqueId"`   // TAG_Long(5) = 0
	TickClient byte   `nbt:"_tickClient"` // TAG_Byte(1) = 0
	general.Global
}

网易特有方块,可能被用于储存模组的自定义数据

func (*ModBlock) FromNBT

func (m *ModBlock) FromNBT(x map[string]any)

func (*ModBlock) ID

func (*ModBlock) ID() string

ID ...

func (*ModBlock) Marshal

func (m *ModBlock) Marshal(io marshal.IO)

func (*ModBlock) ToNBT

func (m *ModBlock) ToNBT() map[string]any

type MovingBlock

type MovingBlock struct {
	MovingBlock      map[string]any                   `nbt:"movingBlock"`      // TAG_Compound(10)
	MovingBlockExtra map[string]any                   `nbt:"movingBlockExtra"` // TAG_Compound(10)
	PistonPosX       int32                            `nbt:"pistonPosX"`       // TAG_Int(4) = 0
	PistonPosY       int32                            `nbt:"pistonPosY"`       // TAG_Int(4) = 0
	PistonPosZ       int32                            `nbt:"pistonPosZ"`       // TAG_Int(4) = 0
	Expanding        byte                             `nbt:"expanding"`        // Not used; TAG_Byte(1) = 0 or 1 (Boolean)
	MovingEntity     marshal.Optional[map[string]any] `nbt:"movingEntity"`     // TAG_Compound(10)
	general.Global
}

移动的方块

func (*MovingBlock) FromNBT

func (m *MovingBlock) FromNBT(x map[string]any)

func (*MovingBlock) ID

func (*MovingBlock) ID() string

ID ...

func (*MovingBlock) Marshal

func (m *MovingBlock) Marshal(io marshal.IO)

func (*MovingBlock) ToNBT

func (m *MovingBlock) ToNBT() map[string]any

type NetherReactor

type NetherReactor struct {
	HasFinished   byte  `nbt:"HasFinished"`   // TAG_Byte(1) = 0
	IsInitialized byte  `nbt:"IsInitialized"` // TAG_Byte(1) = 0
	Progress      int16 `nbt:"Progress"`      // TAG_Short(3) = 0
	general.Global
}

下界反应核

func (*NetherReactor) FromNBT

func (n *NetherReactor) FromNBT(x map[string]any)

func (*NetherReactor) ID

func (*NetherReactor) ID() string

ID ...

func (*NetherReactor) Marshal

func (n *NetherReactor) Marshal(io marshal.IO)

func (*NetherReactor) ToNBT

func (n *NetherReactor) ToNBT() map[string]any

type NoteBlock

type NoteBlock struct {
	Note uint32 `nbt:"note"` // * TAG_Byte(1) = 0
	general.Global
}

音符盒

func (*NoteBlock) FromNBT

func (n *NoteBlock) FromNBT(x map[string]any)

func (*NoteBlock) ID

func (*NoteBlock) ID() string

ID ...

func (*NoteBlock) Marshal

func (n *NoteBlock) Marshal(io marshal.IO)

func (*NoteBlock) ToNBT

func (n *NoteBlock) ToNBT() map[string]any

type Piston

type Piston struct {
	AttachedBlocks []marshal.BlockPos `nbt:"AttachedBlocks"` // * TAG_List[TAG_Int] (9[4])
	BreakBlocks    []marshal.BlockPos `nbt:"BreakBlocks"`    // * TAG_List[TAG_Int] (9[4])
	LastProgress   float32            `nbt:"LastProgress"`   // TAG_Float(6) = 0
	NewState       uint32             `nbt:"NewState"`       // * TAG_Byte(1) = 0
	Progress       float32            `nbt:"Progress"`       // TAG_Float(6) = 0
	State          uint32             `nbt:"State"`          // * TAG_Byte(1) = 0
	Sticky         byte               `nbt:"Sticky"`         // TAG_Byte(1) = 0
	general.Global
}

活塞

func (*Piston) FromNBT

func (p *Piston) FromNBT(x map[string]any)

func (*Piston) ID

func (*Piston) ID() string

ID ...

func (*Piston) Marshal

func (p *Piston) Marshal(io marshal.IO)

func (*Piston) ToNBT

func (p *Piston) ToNBT() map[string]any

type SculkCatalyst

type SculkCatalyst struct {
	general.Global
}

幽匿催发体

func (*SculkCatalyst) ID

func (*SculkCatalyst) ID() string

ID ...

type SculkSensor

type SculkSensor struct {
	VibrationListener map[string]any `nbt:"VibrationListener"` // Not used; TAG_Compound(10)
	general.Global
}

幽匿感测体

func (*SculkSensor) FromNBT

func (s *SculkSensor) FromNBT(x map[string]any)

func (*SculkSensor) ID

func (*SculkSensor) ID() string

ID ...

func (*SculkSensor) Marshal

func (s *SculkSensor) Marshal(io marshal.IO)

func (*SculkSensor) ToNBT

func (s *SculkSensor) ToNBT() map[string]any

type SculkShrieker

type SculkShrieker struct {
	SculkSensor
}

幽匿尖啸体

func (*SculkShrieker) ID

func (*SculkShrieker) ID() string

ID ...

type ShulkerBox

type ShulkerBox struct {
	Facing uint32 `nbt:"facing"` // * TAG_Byte(1) = 0
	Chest
}

潜影盒

func (*ShulkerBox) FromNBT

func (s *ShulkerBox) FromNBT(x map[string]any)

func (*ShulkerBox) ID

func (*ShulkerBox) ID() string

ID ...

func (*ShulkerBox) Marshal

func (s *ShulkerBox) Marshal(io marshal.IO)

func (*ShulkerBox) ToNBT

func (s *ShulkerBox) ToNBT() map[string]any

type Sign

type Sign struct {
	BackText  general.SignText
	FrontText general.SignText
	IsWaxed   byte `nbt:"IsWaxed"` // TAG_Byte(1) = 0
	general.Global
}

告示牌

func (*Sign) FromNBT

func (s *Sign) FromNBT(x map[string]any)

func (*Sign) ID

func (*Sign) ID() string

ID ...

func (*Sign) Marshal

func (s *Sign) Marshal(io marshal.IO)

func (*Sign) ToNBT

func (s *Sign) ToNBT() map[string]any

type Skull

type Skull struct {
	DoingAnimation byte    `nbt:"DoingAnimation"` // * TAG_Byte(1) = 0
	MouthTickCount uint16  `nbt:"MouthTickCount"` // * TAG_Int(4) = 0
	Rotation       float32 `nbt:"Rotation"`       // TAG_Float(6) = 0
	SkullType      uint16  `nbt:"SkullType"`      // * TAG_Byte(1) = 0
	general.Global
}

头颅

func (*Skull) FromNBT

func (s *Skull) FromNBT(x map[string]any)

func (*Skull) ID

func (*Skull) ID() string

ID ...

func (*Skull) Marshal

func (s *Skull) Marshal(io marshal.IO)

func (*Skull) ToNBT

func (s *Skull) ToNBT() map[string]any

type Smoker

type Smoker struct {
	Furnace
}

烟熏炉

func (*Smoker) ID

func (*Smoker) ID() string

ID ...

type SporeBlossom

type SporeBlossom struct {
	general.Global
}

孢子花

func (*SporeBlossom) ID

func (*SporeBlossom) ID() string

ID ...

type StructureBlock

type StructureBlock struct {
	AnimationMode    uint32  `nbt:"animationMode"`    // * TAG_Byte(1) = 0
	AnimationSeconds float32 `nbt:"animationSeconds"` // TAG_Float(6) = 0
	Data             int32   `nbt:"data"`             // TAG_Int(4) = 1
	DataField        string  `nbt:"dataField"`        // TAG_String(8) = ""
	IgnoreEntities   byte    `nbt:"ignoreEntities"`   // TAG_Byte(1) = 0
	IncludePlayers   byte    `nbt:"includePlayers"`   // TAG_Byte(1) = 0
	Integrity        float32 `nbt:"integrity"`        // TAG_Float(6) = 100
	IsPowered        byte    `nbt:"isPowered"`        // TAG_Byte(1) = 0
	Mirror           uint32  `nbt:"mirror"`           // * TAG_Byte(1) = 0
	RedstoneSaveMode int32   `nbt:"redstoneSaveMode"` // TAG_Int(4) = 0
	RemoveBlocks     byte    `nbt:"removeBlocks"`     // TAG_Byte(1) = 0
	Rotation         uint32  `nbt:"rotation"`         // * TAG_Byte(1) = 0
	Seed             int64   `nbt:"seed"`             // TAG_Long(5) = 0
	ShowBoundingBox  byte    `nbt:"showBoundingBox"`  // TAG_Byte(1) = 0
	StructureName    string  `nbt:"structureName"`    // TAG_String(8) = ""
	XStructureOffset int32   `nbt:"xStructureOffset"` // TAG_Int(4) = 0
	XStructureSize   int32   `nbt:"xStructureSize"`   // TAG_Int(4) = 5
	YStructureOffset int32   `nbt:"yStructureOffset"` // TAG_Int(4) = -1
	YStructureSize   int32   `nbt:"yStructureSize"`   // TAG_Int(4) = 5
	ZStructureOffset int32   `nbt:"zStructureOffset"` // TAG_Int(4) = 0
	ZStructureSize   int32   `nbt:"zStructureSize"`   // TAG_Int(4) = 5
	general.Global
}

结构方块

func (*StructureBlock) FromNBT

func (s *StructureBlock) FromNBT(x map[string]any)

func (*StructureBlock) ID

func (*StructureBlock) ID() string

ID ...

func (*StructureBlock) Marshal

func (s *StructureBlock) Marshal(io marshal.IO)

func (*StructureBlock) ToNBT

func (s *StructureBlock) ToNBT() map[string]any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL