package classic import "bytes" type DoubleString [128]byte func PadDString(str string) DoubleString { var pstr DoubleString copy(pstr[:], []byte(str)) if len(str) < 64 { copy(pstr[len(str):], bytes.Repeat([]byte(" "), 128 - len(str))) } return pstr } func UnpadDString(pstr DoubleString) string { return string(bytes.TrimRight(pstr[:], " ")) } func (s DoubleString) String() string { return UnpadDString(s) } type SetMapEnvUrl struct { TexturePackUrl DoubleString } func (p *SetMapEnvUrl) PacketId() byte { return 0x28 } const ( SideBlock = iota HorizonBlock EdgeHeight CloudsHeight ViewDistance CloudsSpeed WeatherSpeed WeatherFad ExpFog SidesEdgeOffset ) type SetMapEnvProperty struct { PropertyType byte PropertyVal int } func (p *SetMapEnvProperty) PacketId() byte { return 0x29 }