Update level structure to 1.19.2
This commit is contained in:
126
save/level.go
126
save/level.go
@ -1,67 +1,83 @@
|
||||
package save
|
||||
|
||||
import (
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
"io"
|
||||
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
)
|
||||
|
||||
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"`
|
||||
Data LevelData
|
||||
}
|
||||
|
||||
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 LevelData struct {
|
||||
AllowCommands byte `nbt:"allowCommands"`
|
||||
BorderCenterX, BorderCenterZ float64
|
||||
BorderDamagePerBlock float64
|
||||
BorderSafeZone float64
|
||||
BorderSize float64
|
||||
BorderSizeLerpTarget float64
|
||||
BorderSizeLerpTime int64
|
||||
BorderWarningBlocks float64
|
||||
BorderWarningTime float64
|
||||
ClearWeatherTime int32 `nbt:"clearWeatherTime"`
|
||||
CustomBossEvents map[string]CustomBossEvent
|
||||
DataPacks struct {
|
||||
Enabled, Disabled []string
|
||||
}
|
||||
DataVersion int32
|
||||
DayTime int64
|
||||
Difficulty byte
|
||||
DifficultyLocked bool
|
||||
DimensionData struct {
|
||||
TheEnd struct {
|
||||
DragonFight struct {
|
||||
Gateways []int32
|
||||
DragonKilled byte
|
||||
PreviouslyKilled byte
|
||||
}
|
||||
} `nbt:"1"`
|
||||
}
|
||||
GameRules map[string]string
|
||||
WorldGenSettings WorldGenSettings
|
||||
GameType int32
|
||||
HardCore bool `nbt:"hardcore"`
|
||||
Initialized bool `nbt:"initialized"`
|
||||
LastPlayed int64
|
||||
LevelName string
|
||||
MapFeatures bool
|
||||
Player map[string]interface{}
|
||||
Raining bool `nbt:"raining"`
|
||||
RainTime int32 `nbt:"rainTime"`
|
||||
RandomSeed int64
|
||||
SizeOnDisk int64
|
||||
SpawnX, SpawnY, SpawnZ int32
|
||||
Thundering bool `nbt:"thundering"`
|
||||
ThunderTime int32 `nbt:"thunderTime"`
|
||||
Time int64
|
||||
Version struct {
|
||||
ID int32 `nbt:"Id"`
|
||||
Name string
|
||||
Series string
|
||||
Snapshot byte
|
||||
}
|
||||
WanderingTraderId []int32
|
||||
WanderingTraderSpawnChance int32
|
||||
WanderingTraderSpawnDelay int32
|
||||
WasModded bool
|
||||
}
|
||||
|
||||
type CustomBossEvent struct {
|
||||
Players [][]int32
|
||||
Color string
|
||||
CreateWorldFog bool
|
||||
DarkenScreen bool
|
||||
Max int32
|
||||
Value int32
|
||||
Name string
|
||||
Overlay string
|
||||
PlayBossMusic bool
|
||||
Visible bool
|
||||
}
|
||||
|
||||
func ReadLevel(r io.Reader) (data Level, err error) {
|
||||
|
Reference in New Issue
Block a user