fix typo
This commit is contained in:
@ -173,7 +173,7 @@ func (p *Packet) unpackWithoutCompression(r io.Reader) error {
|
||||
|
||||
lengthOfData := int(Length) - int(n)
|
||||
if lengthOfData < 0 || lengthOfData > MaxDataLength {
|
||||
return fmt.Errorf("uncompressed packet error: lenght is %d", lengthOfData)
|
||||
return fmt.Errorf("uncompressed packet error: length is %d", lengthOfData)
|
||||
}
|
||||
if cap(p.Data) < lengthOfData {
|
||||
p.Data = make([]byte, lengthOfData)
|
||||
|
@ -111,7 +111,7 @@ func ExamplePacket_Scan_joinGame() {
|
||||
Hardcore pk.Boolean
|
||||
Gamemode pk.UnsignedByte
|
||||
PreGamemode pk.Byte
|
||||
WorldNames = make([]pk.Identifier, 0) // This cannot replace with "var DimensionNames []pk.Identifier" because "nil" has no type information
|
||||
WorldNames = []pk.Identifier{} // This cannot replace with "var DimensionNames []pk.Identifier" because "nil" has no type information
|
||||
DimensionCodec struct {
|
||||
DimensionType interface{} `nbt:"minecraft:dimension_type"`
|
||||
WorldgenBiome interface{} `nbt:"minecraft:worldgen/biome"`
|
||||
|
Reference in New Issue
Block a user