1.18 update for bot/server

This commit is contained in:
Tnze
2021-12-03 11:58:28 +08:00
parent 43ae82a858
commit bcae505a59
3 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,7 @@ type WorldInfo struct {
HashedSeed int64 // First 8 bytes of the SHA-256 hash of the world's seed. Used client side for biome noise
MaxPlayers int32 // Was once used by the client to draw the player list, but now is ignored.
ViewDistance int32 // Render distance (2-32).
SimulationDistance int32 // The distance that the client will process specific things, such as entities.
ReducedDebugInfo bool // If true, a Notchian client shows reduced information on the debug screen. For servers in development, this should almost always be false.
EnableRespawnScreen bool // Set to false when the doImmediateRespawn gamerule is true.
IsDebug bool // True if the world is a debug mode world; debug mode worlds cannot be modified and have predefined blocks.
@ -54,6 +55,7 @@ func (p *Player) handleJoinGamePacket(packet pk.Packet) error {
(*pk.Long)(&p.HashedSeed),
(*pk.VarInt)(&p.MaxPlayers),
(*pk.VarInt)(&p.ViewDistance),
(*pk.VarInt)(&p.SimulationDistance),
(*pk.Boolean)(&p.ReducedDebugInfo),
(*pk.Boolean)(&p.EnableRespawnScreen),
(*pk.Boolean)(&p.IsDebug),