Documentation ¶
Index ¶
- Variables
- type BiomeEffects
- type BiomeProperties
- type BiomeRegistry
- type BiomeRegistryEntry
- type BiomesArray
- type BlockChange
- type BlockEntities
- type BlockLight
- type ChatMessage
- type ChunkData
- type ChunkDataArray
- type ChunkPalette
- type ChunkSection
- type CombatEvent
- type DeclareRecipes
- type DestroyEntities
- type DimensionCodec
- type DimensionType
- type DimensionTypeRegistry
- type DimensionTypeRegistryEntry
- type EntityAnimation
- type EntityHeadLook
- type EntityMetadata
- type EntityPosition
- type EntityPositionAndRotation
- type EntityRotation
- type EntityStatus
- type Heightmap
- type HeldItemChange
- type JoinGame
- type KeepAlive
- type MetadataField
- type NamedSoundEffect
- type PlayerInfo
- type PlayerInfoAddPlayer
- type PlayerInfoRemovePlayer
- type PlayerPositionAndLook
- type Properties
- type Property
- type Respawn
- type SetSlot
- type SkyLight
- type SpawnEntity
- type SpawnLivingEntity
- type SpawnPlayer
- type SpawnPosition
- type StatusPong
- type StatusResponse
- type Tag
- type Tags
- type TagsArray
- type TimeUpdate
- type UnloadChunk
- type UpdateHealth
- type UpdateLight
- type UpdateViewPosition
- type WindowItems
Constants ¶
This section is empty.
Variables ¶
View Source
var MinecraftBiomeRegistry = BiomeRegistry{ Type: "minecraft:worldgen/biome", Value: []BiomeRegistryEntry{ MinecraftPlains, }, }
View Source
var MinecraftDimensionCodec = DimensionCodec{ DimensionTypes: MinecraftDimensionTypeRegistry, BiomeRegistry: MinecraftBiomeRegistry, }
View Source
var MinecraftDimensionTypeRegistry = DimensionTypeRegistry{ Type: "minecraft:dimension_type", Value: []DimensionTypeRegistryEntry{ { Name: "minecraft:overworld", ID: 0, Element: MinecraftOverworld, }, }, }
View Source
var MinecraftOverworld = DimensionType{
PiglinSafe: 0,
Natural: 1,
AmbientLight: 0.0,
Infiniburn: "minecraft:infiniburn_overworld",
RespawnAnchorWorks: 0,
HasSkylight: 1,
BedWorks: 1,
Effects: "minecraft:overworld",
HasRaids: 0,
LogicalHeight: 256,
CoordinateScale: 1.0,
Ultrawarm: 0,
HasCeiling: 0,
}
View Source
var MinecraftPlains = BiomeRegistryEntry{ Name: "minecraft:plains", ID: 0, Element: BiomeProperties{ Precipitation: "none", Depth: 0.125, Temperature: 0.8, Scale: 0.05, Downfall: 0.4, Category: "plains", Effects: BiomeEffects{ SkyColor: 7907327, WaterFogColor: 329011, FogColor: 12638463, WaterColor: 4159204, }, }, }
Functions ¶
This section is empty.
Types ¶
type BiomeEffects ¶
type BiomeProperties ¶
type BiomeRegistry ¶
type BiomeRegistry struct { Type string `nbt:"type"` Value []BiomeRegistryEntry `nbt:"value"` }
type BiomeRegistryEntry ¶
type BiomeRegistryEntry struct { Name string `nbt:"name"` ID int32 `nbt:"id"` Element BiomeProperties `nbt:"element"` }
type BiomesArray ¶
func (BiomesArray) Encode ¶
func (a BiomesArray) Encode() []byte
type BlockChange ¶
func (BlockChange) CreatePacket ¶
func (p BlockChange) CreatePacket() pk.Packet
type BlockEntities ¶
func (BlockEntities) Encode ¶
func (a BlockEntities) Encode() []byte
type BlockLight ¶
func (BlockLight) Encode ¶
func (s BlockLight) Encode() []byte
type ChatMessage ¶
func (ChatMessage) CreatePacket ¶
func (p ChatMessage) CreatePacket() pk.Packet
type ChunkData ¶
type ChunkData struct { ChunkX pk.Int ChunkZ pk.Int FullChunk pk.Boolean PrimaryBitMask pk.VarInt Heightmaps pk.NBT BiomesLength pk.VarInt // Optional, not present if full chunk is false Biomes BiomesArray // Optional, not present if full chunk is false Size pk.VarInt Data ChunkDataArray NumBlockEntities pk.VarInt BlockEntities BlockEntities }
func (ChunkData) CreatePacket ¶
type ChunkDataArray ¶
type ChunkDataArray []ChunkSection
func (ChunkDataArray) Encode ¶
func (a ChunkDataArray) Encode() []byte
type ChunkPalette ¶
func (ChunkPalette) Encode ¶
func (s ChunkPalette) Encode() []byte
type ChunkSection ¶
type ChunkSection struct { BlockCount pk.Short BitsPerBlock pk.UByte Palette ChunkPalette DataArrayLength pk.VarInt DataArray []pk.Long }
func (ChunkSection) Encode ¶
func (s ChunkSection) Encode() []byte
type CombatEvent ¶
https://wiki.vg/Protocol#Combat_Event Since only entity dead event is used, other fields are ignored and assumed
func (CombatEvent) CreatePacket ¶
func (s CombatEvent) CreatePacket() pk.Packet
type DeclareRecipes ¶
func (DeclareRecipes) CreatePacket ¶
func (s DeclareRecipes) CreatePacket() pk.Packet
type DestroyEntities ¶
func (DestroyEntities) CreatePacket ¶
func (s DestroyEntities) CreatePacket() pk.Packet
type DimensionCodec ¶
type DimensionCodec struct { DimensionTypes DimensionTypeRegistry `nbt:"minecraft:dimension_type"` BiomeRegistry BiomeRegistry `nbt:"minecraft:worldgen/biome"` }
type DimensionType ¶
type DimensionType struct { PiglinSafe byte `nbt:"piglin_safe"` Natural byte `nbt:"natural"` AmbientLight float32 `nbt:"ambient_light"` Infiniburn string `nbt:"infiniburn"` RespawnAnchorWorks byte `nbt:"respawn_anchor_works"` HasSkylight byte `nbt:"has_skylight"` BedWorks byte `nbt:"bed_works"` Effects string `nbt:"effects"` HasRaids byte `nbt:"has_raids"` LogicalHeight int32 `nbt:"logical_height"` CoordinateScale float32 `nbt:"coordinate_scale"` Ultrawarm byte `nbt:"ultrawarm"` HasCeiling byte `nbt:"has_ceiling"` }
type DimensionTypeRegistry ¶
type DimensionTypeRegistry struct { Type string `nbt:"type"` Value []DimensionTypeRegistryEntry `nbt:"value"` }
type DimensionTypeRegistryEntry ¶
type DimensionTypeRegistryEntry struct { Name string `nbt:"name"` ID int32 `nbt:"id"` Element DimensionType `nbt:"element"` }
type EntityAnimation ¶
func (EntityAnimation) CreatePacket ¶
func (s EntityAnimation) CreatePacket() pk.Packet
type EntityHeadLook ¶
func (EntityHeadLook) CreatePacket ¶
func (s EntityHeadLook) CreatePacket() pk.Packet
type EntityMetadata ¶
func (EntityMetadata) CreatePacket ¶
func (s EntityMetadata) CreatePacket() pk.Packet
type EntityPosition ¶
type EntityPosition struct { EntityID pk.VarInt DeltaX pk.Short DeltaY pk.Short DeltaZ pk.Short OnGround pk.Boolean }
func (EntityPosition) CreatePacket ¶
func (s EntityPosition) CreatePacket() pk.Packet
type EntityPositionAndRotation ¶
type EntityPositionAndRotation struct { EntityID pk.VarInt DeltaX pk.Short DeltaY pk.Short DeltaZ pk.Short Yaw pk.Angle Pitch pk.Angle OnGround pk.Boolean }
func (EntityPositionAndRotation) CreatePacket ¶
func (s EntityPositionAndRotation) CreatePacket() pk.Packet
type EntityRotation ¶
func (EntityRotation) CreatePacket ¶
func (s EntityRotation) CreatePacket() pk.Packet
type EntityStatus ¶
func (EntityStatus) CreatePacket ¶
func (s EntityStatus) CreatePacket() pk.Packet
type HeldItemChange ¶
func (HeldItemChange) CreatePacket ¶
func (s HeldItemChange) CreatePacket() pk.Packet
type JoinGame ¶
type JoinGame struct { EntityID pk.Int IsHardcore pk.Boolean Gamemode pk.UByte PrevGamemode pk.Byte WorldCount pk.VarInt WorldNames worldNames // Array of Identifiers DimensionCodec pk.NBT Dimension pk.NBT WorldName pk.Identifier HashedSeed pk.Long MaxPlayers pk.VarInt // Now ignored ViewDistance pk.VarInt RDI pk.Boolean // Reduced Debug Info ERS pk.Boolean // Enable respawn screen IsDebug pk.Boolean IsFlat pk.Boolean }
func (JoinGame) CreatePacket ¶
type KeepAlive ¶
func (KeepAlive) CreatePacket ¶
type MetadataField ¶
type MetadataField struct { Index pk.UByte Type pk.VarInt // Optional, present if Index != 0xff Value pk.Encodable // Optional, present if Index != 0xff, type depends on Type }
https://wiki.vg/Entity_metadata#Entity_Metadata_Format
func (MetadataField) Encode ¶
func (s MetadataField) Encode() []byte
type NamedSoundEffect ¶
type NamedSoundEffect struct { SoundName pk.Identifier SoundCategory pk.VarInt EffectPositionX pk.Int // https://wiki.vg/Data_types#Fixed-point_numbers EffectPositionY pk.Int // Fixed point with 3 bits for fractional part EffectPositionZ pk.Int // Equal to EffectX multiplied by 8 Volume pk.Float // 1 is 100%, can be greater Pitch pk.Float // Between 0.5 and 2.0 on Notchian clients }
func (NamedSoundEffect) CreatePacket ¶
func (s NamedSoundEffect) CreatePacket() pk.Packet
type PlayerInfo ¶
func (PlayerInfo) CreatePacket ¶
func (s PlayerInfo) CreatePacket() pk.Packet
type PlayerInfoAddPlayer ¶
type PlayerInfoAddPlayer struct { UUID pk.UUID Name pk.String // 16 NumProperties pk.VarInt Properties Properties Gamemode pk.VarInt Ping pk.VarInt HasDisplayName pk.Boolean DisplayName pk.Chat // Optional }
func (PlayerInfoAddPlayer) Encode ¶
func (s PlayerInfoAddPlayer) Encode() []byte
type PlayerInfoRemovePlayer ¶
func (PlayerInfoRemovePlayer) Encode ¶
func (s PlayerInfoRemovePlayer) Encode() []byte
type PlayerPositionAndLook ¶
type PlayerPositionAndLook struct { X pk.Double Y pk.Double Z pk.Double Yaw pk.Float Pitch pk.Float Flags pk.Byte TeleportID pk.VarInt }
func (PlayerPositionAndLook) CreatePacket ¶
func (s PlayerPositionAndLook) CreatePacket() pk.Packet
type Properties ¶
type Properties []Property
func (Properties) Encode ¶
func (a Properties) Encode() []byte
type Respawn ¶
type Respawn struct { Dimension pk.NBT WorldName pk.Identifier HashedSeed pk.Long Gamemode pk.UByte PreviousGamemode pk.UByte IsDebug pk.Boolean IsFlat pk.Boolean CopyMetadata pk.Boolean }
func (Respawn) CreatePacket ¶
type SetSlot ¶
func (SetSlot) CreatePacket ¶
type SpawnEntity ¶
type SpawnEntity struct { EntityID pk.VarInt ObjectUUID pk.UUID Type pk.VarInt X pk.Double Y pk.Double Z pk.Double Pitch pk.Angle Yaw pk.Angle Data pk.Int VelocityX pk.Short VelocityY pk.Short VelocityZ pk.Short }
func (SpawnEntity) CreatePacket ¶
func (s SpawnEntity) CreatePacket() pk.Packet
type SpawnLivingEntity ¶
type SpawnLivingEntity struct { EntityID pk.VarInt EntityUUID pk.UUID Type pk.VarInt X pk.Double Y pk.Double Z pk.Double Yaw pk.Angle Pitch pk.Angle HeadPitch pk.Angle VelocityX pk.Short VelocityY pk.Short VelocityZ pk.Short }
func (SpawnLivingEntity) CreatePacket ¶
func (s SpawnLivingEntity) CreatePacket() pk.Packet
type SpawnPlayer ¶
type SpawnPlayer struct { EntityID pk.VarInt PlayerUUID pk.UUID X pk.Double Y pk.Double Z pk.Double Yaw pk.Angle Pitch pk.Angle }
func (SpawnPlayer) CreatePacket ¶
func (s SpawnPlayer) CreatePacket() pk.Packet
type SpawnPosition ¶
func (SpawnPosition) CreatePacket ¶
func (s SpawnPosition) CreatePacket() pk.Packet
type StatusPong ¶
func (StatusPong) CreatePacket ¶
func (p StatusPong) CreatePacket() pk.Packet
type StatusResponse ¶
func (StatusResponse) CreatePacket ¶
func (p StatusResponse) CreatePacket() pk.Packet
type Tags ¶
type Tags struct { BlockTags TagsArray ItemTags TagsArray FluidTags TagsArray EntityTags TagsArray }
func VanillaTags ¶
func VanillaTags() Tags
func (Tags) CreatePacket ¶
type TimeUpdate ¶
func (TimeUpdate) CreatePacket ¶
func (p TimeUpdate) CreatePacket() pk.Packet
type UnloadChunk ¶
func (UnloadChunk) CreatePacket ¶
func (s UnloadChunk) CreatePacket() pk.Packet
type UpdateHealth ¶
func (UpdateHealth) CreatePacket ¶
func (s UpdateHealth) CreatePacket() pk.Packet
type UpdateLight ¶
type UpdateLight struct { ChunkX pk.VarInt ChunkZ pk.VarInt TrustEdges pk.Boolean SkyLightMask pk.VarInt BlockLightMask pk.VarInt EmptySkyLightMask pk.VarInt EmptyBlockLightMask pk.VarInt SkyLightArrays SkyLight BlockLightArrays BlockLight }
func (UpdateLight) CreatePacket ¶
func (s UpdateLight) CreatePacket() pk.Packet
type UpdateViewPosition ¶
func (UpdateViewPosition) CreatePacket ¶
func (s UpdateViewPosition) CreatePacket() pk.Packet
type WindowItems ¶
func (WindowItems) CreatePacket ¶
func (s WindowItems) CreatePacket() pk.Packet
Source Files ¶
- block_change.go
- chat_message.go
- chunk_data.go
- combat_event.go
- declare_recipes.go
- destroy_entities.go
- entity_animation.go
- entity_head_look.go
- entity_metadata.go
- entity_position.go
- entity_position_and_rotation.go
- entity_rotation.go
- entity_status.go
- held_item_change.go
- join_game.go
- keep_alive.go
- named_sound_effect.go
- player_info.go
- player_pos_and_look.go
- respawn.go
- set_slot.go
- spawn_entity.go
- spawn_living_entity.go
- spawn_player.go
- spawn_position.go
- status_pong.go
- status_response.go
- tags.go
- time_update.go
- unload_chunk.go
- update_health.go
- update_light.go
- update_view_position.go
- window_items.go
Click to show internal directories.
Click to hide internal directories.