Documentation
¶
Index ¶
- func ByteUUIDToIntUUID(uuid uuid2.UUID) (u []int32)
- func CreateWorld(hardcore bool)
- func GenerateWorldData(hardcore int8) worldData
- func IntUUIDToByteUUID(u []int32) (uuid2.UUID, error)
- func ParsePosition(pos int64) (x, y, z int64)
- func RandomSeed() int64
- type Abilities
- type Attribute
- type BiomeSource
- type Brain
- type DataPacks
- type Dimension
- func (d *Dimension) Block(x, y, z int64) chunk.Block
- func (d *Dimension) Chunk(x, z int32) (*chunk.Chunk, error)
- func (d *Dimension) Chunks() map[chunk.Hash]*chunk.Chunk
- func (d *Dimension) LoadedChunks() int
- func (d *Dimension) Seed() int64
- func (d *Dimension) SetBlock(x, y, z int64, b chunk.Block)
- func (d *Dimension) SetGenerator(g Generator)
- func (d *Dimension) Type() string
- func (d *Dimension) World() *World
- type DimensionData
- type DimensionGenerator
- type DimensionGeneratorLayer
- type DimensionGeneratorSettings
- type Dimensions
- type DragonFight
- type GameRule
- type GameRules
- type Generator
- type PlayerData
- type RecipeBook
- type SetBlockHandling
- type Version
- type WardenSpawnTracker
- type World
- func (w *World) Gamerules() map[string]string
- func (world *World) GeneratePlayerData(uuid string) *PlayerData
- func (w *World) GetDimension(typ string) *Dimension
- func (world *World) GetPlayerData(uuid string) (data *PlayerData)
- func (w *World) IncrementTime() (worldAge int64, dayTime int64)
- func (w *World) LoadSpawnChunks(rd int32) (success int)
- func (w *World) Nether() *Dimension
- func (w *World) NewDimension(typ string, rd *anvil.Reader) *Dimension
- func (w *World) Overworld() *Dimension
- func (w *World) Save()
- func (w *World) Seed() int64
- func (w *World) Spawn() (x, y, z int32, angle float32)
- func (w *World) TheEnd() *Dimension
- type WorldData
- type WorldGenSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteUUIDToIntUUID ¶
func CreateWorld ¶
func CreateWorld(hardcore bool)
func GenerateWorldData ¶
func GenerateWorldData(hardcore int8) worldData
func ParsePosition ¶
func RandomSeed ¶
func RandomSeed() int64
Types ¶
type BiomeSource ¶
type Dimension ¶
type Dimension struct {
// contains filtered or unexported fields
}
func (*Dimension) LoadedChunks ¶
func (*Dimension) SetGenerator ¶
type DimensionData ¶
type DimensionData struct { Generator DimensionGenerator `nbt:"generator"` Type string `nbt:"type"` }
type DimensionGenerator ¶
type DimensionGenerator struct { BiomeSource BiomeSource `nbt:"biome_source"` Type string `nbt:"type"` Settings string `nbt:"settings"` }
type DimensionGeneratorLayer ¶
type DimensionGeneratorSettings ¶
type DimensionGeneratorSettings struct { Biome string `nbt:"biome"` Features int32 `nbt:"features"` Lakes int32 `nbt:"lakes"` Layers []DimensionGeneratorLayer `nbt:"layers"` StructureOverrides []string `nbt:"structure_overrides"` }
type Dimensions ¶
type Dimensions struct { End DimensionData `nbt:"minecraft:the_end"` Overworld DimensionData `nbt:"minecraft:overworld"` Nether DimensionData `nbt:"minecraft:the_nether"` }
type DragonFight ¶
type GameRules ¶
type GameRules struct { DoDaylightCycle string `nbt:"doDaylightCycle"` DoInsomnia string `nbt:"doInsomnia"` DoEntityDrops string `nbt:"doEntityDrops"` SpectatorsGenerateChunks string `nbt:"spectatorsGenerateChunks"` DisableElytraMovementCheck string `nbt:"disableElytraMovementCheck"` DisableRaids string `nbt:"disableRaids"` CommandModificationBlockLimit string `nbt:"commandModificationBlockLimit"` ForgiveDeadPlayers string `nbt:"forgiveDeadPlayers"` MaxEntityCramming string `nbt:"maxEntityCramming"` SpawnRadius string `nbt:"spawnRadius"` AnnounceAdvancements string `nbt:"announceAdvancements"` UniversalAnger string `nbt:"universalAnger"` FallDamage string `nbt:"fallDamage"` RandomTickSpeed string `nbt:"randomTickSpeed"` DoTraderSpawning string `nbt:"doTraderSpawning"` DrowningDamage string `nbt:"drowningDamage"` ShowDeathMessages string `nbt:"showDeathMessages"` PlayersSleepingPercentage string `nbt:"playersSleepingPercentage"` DoImmediateRespawn string `nbt:"doImmediateRespawn"` NaturalRegeneration string `nbt:"naturalRegeneration"` KeepInventory string `nbt:"keepInventory"` DoVinesSpread string `nbt:"doVinesSpread"` DoTileDrops string `nbt:"doTileDrops"` MaxCommandChainLength string `nbt:"maxCommandChainLength"` FireDamage string `nbt:"fireDamage"` WaterSourceConversion string `nbt:"waterSourceConversion"` CommandBlockOutput string `nbt:"commandBlockOutput"` DoWeatherCycle string `nbt:"doWeatherCycle"` SnowAccumulationHeight string `nbt:"snowAccumulationHeight"` DoWardenSpawning string `nbt:"doWardenSpawning"` DoFireTick string `nbt:"doFireTick"` DoPatrolSpawning string `nbt:"doPatrolSpawning"` DoMobLoot string `nbt:"doMobLoot"` SendCommandFeedback string `nbt:"sendCommandFeedback"` DoMobSpawning string `nbt:"doMobSpawning"` MobExplosionDropDecay string `nbt:"mobExplosionDropDecay"` MobGriefing string `nbt:"mobGriefing"` FreezeDamage string `nbt:"freezeDamage"` LogAdminCommands string `nbt:"logAdminCommands"` GlobalSoundEvents string `nbt:"globalSoundEvents"` TntExplosionDropDecay string `nbt:"tntExplosionDropDecay"` BlockExplosionDropDecay string `nbt:"blockExplosionDropDecay"` DoLimitedCrafting string `nbt:"doLimitedCrafting"` ReducedDebugInfo string `nbt:"reducedDebugInfo"` LavaSourceConversion string `nbt:"lavaSourceConversion"` }
type PlayerData ¶
type PlayerData struct { Invulnerable bool `nbt:"Invulnerable"` FoodSaturationLevel float32 `nbt:"foodSaturationLevel"` UUID []int32 `nbt:"UUID"` EnderItems []item.Item `nbt:"EnderItems"` DataVersion int32 `nbt:"DataVersion"` SelectedItemSlot int32 `nbt:"SelectedItemSlot"` SleepTimer int16 `nbt:"SleepTimer"` Abilities Abilities `nbt:"abilities"` RecipeBook RecipeBook `nbt:"recipeBook"` XpSeed int32 `nbt:"XpSeed"` Inventory []item.Item `nbt:"Inventory"` FoodLevel int32 `nbt:"foodLevel"` HurtByTimestamp int32 `nbt:"HurtByTimestamp"` FallDistance float32 `nbt:"FallDistance"` PlayerGameType int32 `nbt:"playerGameType"` SeenCredits bool `nbt:"seenCredits"` Pos []float64 `nbt:"Pos"` FoodTickTimer int32 `nbt:"foodTickTimer"` Brain Brain `nbt:"Brain"` AbsorptionAmount float32 `nbt:"AbsorptionAmount"` DeathTime int16 `nbt:"DeathTime"` XpLevel int32 `nbt:"XpLevel"` XpP float32 `nbt:"XpP"` FallFlying int8 `nbt:"FallFlying"` Motion []float64 `nbt:"Motion"` OnGround bool `nbt:"OnGround"` Rotation []float32 `nbt:"Rotation"` Score int32 `nbt:"Score"` Fire int16 `nbt:"Fire"` FoodExhaustionLevel float32 `nbt:"foodExhaustionLevel"` Attributes []Attribute `nbt:"Attributes"` EnteredNetherPosition []float64 `nbt:"enteredNetherPosition"` PortalCooldown int32 `nbt:"PortalCooldown"` Health float32 `nbt:"Health"` Dimension string `nbt:"Dimension"` XpTotal int32 `nbt:"XpTotal"` Air int16 `nbt:"Air"` WardenSpawnTracker WardenSpawnTracker `nbt:"warden_spawn_tracker"` HurtTime int16 `nbt:"HurtTime"` // contains filtered or unexported fields }
func (*PlayerData) Save ¶
func (data *PlayerData) Save()
type RecipeBook ¶
type RecipeBook struct { IsGuiOpen int8 `nbt:"isGuiOpen"` IsBlastingFurnaceGuiOpen int8 `nbt:"isBlastingFurnaceGuiOpen"` IsSmokerGuiOpen int8 `nbt:"isSmokerGuiOpen"` IsBlastingFurnaceFilteringCraftable int8 `nbt:"isBlastingFurnaceFilteringCraftable"` IsFilteringCraftable int8 `nbt:"isFilteringCraftable"` ToBeDisplayed []string `nbt:"toBeDisplayed"` IsFurnaceGuiOpen int8 `nbt:"isFurnaceGuiOpen"` IsFurnaceFilteringCraftable int8 `nbt:"isFurnaceFilteringCraftable"` IsSmokerFilteringCraftable int8 `nbt:"isSmokerFilteringCraftable"` Recipes []string `nbt:"recipes"` }
type SetBlockHandling ¶
type SetBlockHandling = int8
const ( SetBlockReplace SetBlockHandling = iota SetBlockKeep SetBlockDestroy )
type WardenSpawnTracker ¶
type World ¶
type World struct { Gamemode byte // contains filtered or unexported fields }
func (*World) GeneratePlayerData ¶
func (world *World) GeneratePlayerData(uuid string) *PlayerData
func (*World) GetDimension ¶
func (*World) GetPlayerData ¶
func (world *World) GetPlayerData(uuid string) (data *PlayerData)
func (*World) IncrementTime ¶
func (*World) LoadSpawnChunks ¶
type WorldData ¶
type WorldData struct { ServerBrands []string `nbt:"ServerBrands"` SpawnY int32 `nbt:"SpawnY"` ThunderTime int32 `nbt:"thunderTime"` LastPlayed int64 `nbt:"LastPlayed"` BorderSize float64 `nbt:"BorderSize"` DataVersion int32 `nbt:"DataVersion"` Time int64 `nbt:"Time"` Difficulty int8 `nbt:"Difficulty"` Raining int8 `nbt:"raining"` BorderWarningBlocks float64 `nbt:"BorderWarningBlocks"` WorldGenSettings WorldGenSettings `nbt:"WorldGenSettings"` BorderSizeLerpTarget float64 `nbt:"BorderSizeLerpTarget"` Version Version `nbt:"Version"` DayTime int64 `nbt:"DayTime"` WanderingTraderSpawnChance int32 `nbt:"WanderingTraderSpawnChance"` Hardcore int8 `nbt:"hardcore"` SpawnX int32 `nbt:"SpawnX"` BorderWarningTime float64 `nbt:"BorderWarningTime"` WanderingTraderSpawnDelay int32 `nbt:"WanderingTraderSpawnDelay"` CustomBossEvents struct{} `nbt:"CustomBossEvents"` ClearWeatherTime int32 `nbt:"clearWeatherTime"` Thundering int8 `nbt:"thundering"` SpawnAngle float32 `nbt:"SpawnAngle"` ScheduledEvents []interface{} `nbt:"ScheduledEvents"` BorderCenterZ float64 `nbt:"BorderCenterZ"` RainTime int32 `nbt:"rainTime"` LevelName string `nbt:"LevelName"` WasModded int8 `nbt:"WasModded"` BorderCenterX float64 `nbt:"BorderCenterX"` AllowCommands int8 `nbt:"allowCommands"` DragonFight DragonFight `nbt:"DragonFight"` BorderDamagePerBlock float64 `nbt:"BorderDamagePerBlock"` Initialized int8 `nbt:"initialized"` GameRules map[string]string `nbt:"GameRules"` SpawnZ int32 `nbt:"SpawnZ"` BorderSafeZone float64 `nbt:"BorderSafeZone"` DataPacks DataPacks `nbt:"DataPacks"` GameType int32 `nbt:"GameType"` DifficultyLocked int8 `nbt:"DifficultyLocked"` BorderSizeLerpTime int64 `nbt:"BorderSizeLerpTime"` VersionNumber int32 `nbt:"version"` }
type WorldGenSettings ¶
type WorldGenSettings struct { BonusChest int8 `nbt:"bonus_chest"` Seed int64 `nbt:"seed"` GenerateFeatures int8 `nbt:"generate_features"` Dimensions Dimensions `nbt:"dimensions"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.