Documentation ¶
Index ¶
- Constants
- func NewPool() map[string]BlockNBT
- type Banner
- type Barrel
- type Beacon
- type Bed
- type Beehive
- type Bell
- type BlastFurnace
- type BlockNBT
- type BrewingStand
- type BrushableBlock
- type CalibratedSculkSensor
- type Campfire
- type Cauldron
- type ChemistryTable
- type Chest
- type ChiseledBookshelf
- type CommandBlock
- type Comparator
- type Conduit
- type DayLightDetector
- type DecoratedPot
- type Dispenser
- type Dropper
- type EnchantingTable
- type EndPortal
- type EnderChest
- type FlowerPot
- type Frame
- type Furnace
- type GlowFrame
- type HangingSign
- type Hopper
- type Jigsaw
- type Jukebox
- type Lectern
- type Lodestone
- type MobSpawner
- type ModBlock
- type MovingBlock
- type NetherReactor
- type NoteBlock
- type Piston
- type SculkCatalyst
- type SculkSensor
- type SculkShrieker
- type ShulkerBox
- type Sign
- type Skull
- type Smoker
- type SporeBlossom
- type StructureBlock
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 ¶
Types ¶
type Banner ¶
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 }
旗帜
type Beacon ¶
type Beacon struct { Primary int32 `nbt:"primary"` // TAG_Int(4) = 0 Secondary int32 `nbt:"secondary"` // TAG_Int(4) = 0 general.Global }
信标
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 }
蜂箱
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 }
钟
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) 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) Marshal ¶
func (b *BrushableBlock) Marshal(io marshal.IO)
func (*BrushableBlock) ToNBT ¶
func (b *BrushableBlock) ToNBT() map[string]any
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 }
营火
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 }
炼药锅
type ChemistryTable ¶
化合物创建器
func (*ChemistryTable) FromNBT ¶
func (c *ChemistryTable) FromNBT(x map[string]any)
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 }
箱子
type ChiseledBookshelf ¶
雕纹书架
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) Marshal ¶
func (c *CommandBlock) Marshal(io marshal.IO)
func (*CommandBlock) ToNBT ¶
func (c *CommandBlock) ToNBT() map[string]any
type Comparator ¶
比较器
func (*Comparator) FromNBT ¶
func (c *Comparator) FromNBT(x map[string]any)
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 }
潮涌核心
type DayLightDetector ¶
阳光探测器
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) 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 }
发射器
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) Marshal ¶
func (e *EnchantingTable) Marshal(io marshal.IO)
func (*EnchantingTable) ToNBT ¶
func (e *EnchantingTable) ToNBT() map[string]any
type FlowerPot ¶
type FlowerPot struct { PlantBlock map[string]any `nbt:"PlantBlock"` // TAG_Compound(10) general.Global }
花盆
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 }
熔炉
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 }
漏斗
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 }
拼图方块
type Jukebox ¶
type Jukebox struct { RecordItem marshal.Optional[marshal.ItemInstance] `nbt:"RecordItem"` // TAG_Compound(10) general.Global }
唱片机
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 ¶
检查 x 是否存在 Lectern 中记录的所有数据
type Lodestone ¶
type Lodestone struct { TrackingHandle marshal.Optional[int32] `nbt:"trackingHandle"` // TAG_Int(4) = 0 general.Global }
磁石
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) 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 }
网易特有方块,可能被用于储存模组的自定义数据
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) 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) Marshal ¶
func (n *NetherReactor) Marshal(io marshal.IO)
func (*NetherReactor) ToNBT ¶
func (n *NetherReactor) 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 }
活塞
type SculkCatalyst ¶
幽匿催发体
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) Marshal ¶
func (s *SculkSensor) Marshal(io marshal.IO)
func (*SculkSensor) ToNBT ¶
func (s *SculkSensor) ToNBT() map[string]any
type ShulkerBox ¶
潜影盒
func (*ShulkerBox) FromNBT ¶
func (s *ShulkerBox) FromNBT(x map[string]any)
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 }
告示牌
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 }
头颅
type SporeBlossom ¶
孢子花
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) Marshal ¶
func (s *StructureBlock) Marshal(io marshal.IO)
func (*StructureBlock) ToNBT ¶
func (s *StructureBlock) ToNBT() map[string]any
Source Files ¶
- banner.go
- barrel.go
- beacon.go
- bed.go
- beehive.go
- bell.go
- blast_furnace.go
- brewing_stand.go
- brushable_block.go
- calibrated_sculk_sensor.go
- campfire.go
- cauldron.go
- chemistry_table.go
- chest.go
- chiseled_bookshelf.go
- command_block.go
- comparator.go
- conduit.go
- daylight_detector.go
- decorated_pot.go
- dispenser.go
- dropper.go
- enchanting_table.go
- end_portal.go
- ender_chest.go
- flower_pot.go
- frame.go
- furnace.go
- glow_frame.go
- hanging_sign.go
- hopper.go
- jigsaw.go
- jukebox.go
- lectern.go
- lodestone.go
- mob_spawner.go
- mod_block.go
- moving_block.go
- nether_reactor.go
- noteblock.go
- piston.go
- protocol.go
- sculk_catalyst.go
- sculk_sensor.go
- sculk_shrieker.go
- shulker_box.go
- sign.go
- skull.go
- smoker.go
- spore_blossom.go
- structure_block.go
Click to show internal directories.
Click to hide internal directories.