Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitStorage ¶
type BitStorage struct {
// contains filtered or unexported fields
}
This implement the format since Minecraft 1.16
func NewBitStorage ¶
func NewBitStorage(bits, size int, arrl []uint64) (b *BitStorage)
NewBitStorage create a new BitStorage, // TODO: document
func (*BitStorage) Get ¶
func (b *BitStorage) Get(i int) int
func (*BitStorage) Set ¶
func (b *BitStorage) Set(i, v int)
func (*BitStorage) Swap ¶
func (b *BitStorage) Swap(i, v int) (old int)
type Column ¶
type Column struct {
DataVersion int
Level struct {
Heightmaps map[string][]int64
Structures struct {
References map[string][]int64
Starts map[string]struct {
ID string `nbt:"id"`
}
}
// Entities
// LiquidTicks
// PostProcessing
Sections []Chunk
// TileEntities
// TileTicks
InhabitedTime int64
IsLightOn byte `nbt:"isLightOn"`
LastUpdate int64
Status string
PosX int32 `nbt:"xPos"`
PosZ int32 `nbt:"zPos"`
Biomes []int32
}
}
Column is 16* chunk
type Level ¶
type Level struct {
Data struct {
DataVersion int32
NBTVersion int32 `nbt:"version"`
Version struct {
ID int32 `nbt:"Id"`
Name string
Snapshot byte
}
GameType int32
Difficulty byte
DifficultyLocked byte
HardCore byte `nbt:"hardcore"`
Initialized byte `nbt:"initialized"`
AllowCommands byte `nbt:"allowCommands"`
MapFeatures byte
LevelName string
GeneratorName string `nbt:"generatorName"`
GeneratorVersion int32 `nbt:"generatorVersion"`
RandomSeed int64
SpawnX, SpawnY, SpawnZ int32
BorderCenterX, BorderCenterZ float64
BorderDamagePerBlock float64
BorderSafeZone float64
BorderSize float64
BorderSizeLerpTarget float64
BorderSizeLerpTime int64
BorderWarningBlocks float64
BorderWarningTime float64
GameRules map[string]string
DataPacks struct {
Enabled, Disabled []string
}
DimensionData struct {
TheEnd struct {
DragonFight struct {
Gateways []int32
DragonKilled byte
PreviouslyKilled byte
}
} `nbt:"1"`
}
Raining byte `nbt:"raining"`
Thundering byte `nbt:"thundering"`
RainTime int32 `nbt:"rainTime"`
ThunderTime int32 `nbt:"thunderTime"`
ClearWeatherTime int32 `nbt:"clearWeatherTime"`
Time int64
DayTime int64
LastPlayed int64
}
}
type PlayerData ¶
type PlayerData struct {
DataVersion int32
Dimension int32
Pos [3]float64
Motion [3]float64
Rotation [2]float32
FallDistance float32
FallFlying byte
OnGround byte
UUID uuid.UUID `nbt:"-"`
UUIDLeast, UUIDMost int64
PlayerGameType int32 `nbt:"playerGameType"`
Air int16
DeathTime int16
Fire int16
HurtTime int16
Health float32
HurtByTimestamp int32
PortalCooldown int32
Invulnerable byte
SeenCredits byte `nbt:"seenCredits"`
SelectedItemSlot int32
Score int32
AbsorptionAmount float32
Inventory, EnderItems []Item
XpLevel int32
XpP float32
XpTotal int32
XpSeed int32
FoodExhaustionLevel float32 `nbt:"foodExhaustionLevel"`
FoodLevel int32 `nbt:"foodLevel"`
FoodSaturationLevel float32 `nbt:"foodSaturationLevel"`
FoodTickTimer int32 `nbt:"foodTickTimer"`
Attributes []struct {
Base float64
Name string
}
Abilities struct {
FlySpeed float32 `nbt:"flySpeed"`
WalkSpeed float32 `nbt:"walkSpeed"`
Flying byte `nbt:"flying"`
InstantBuild byte `nbt:"instabuild"`
Invulnerable byte `nbt:"invulnerable"`
MayBuild byte `nbt:"mayBuild"`
MayFly byte `nbt:"mayfly"`
} `nbt:"abilities"`
RecipeBook struct {
IsFilteringCraftable byte `nbt:"isFilteringCraftable"`
IsFurnaceFilteringCraftable byte `nbt:"isFurnaceFilteringCraftable"`
IsFurnaceGUIOpen byte `nbt:"isFurnaceGuiOpen"`
IsGUIOpen byte `nbt:"isGuiOpen"`
} `nbt:"recipeBook"`
}
func ReadPlayerData ¶
func ReadPlayerData(r io.Reader) (data PlayerData, err error)
Click to show internal directories.
Click to hide internal directories.