2021-08-24 15:29:46 +01:00
|
|
|
/*
|
|
|
|
=======- Packet1LoginRequest.js -=======
|
|
|
|
Created by Holly (tgpethan) (c) 2021
|
|
|
|
Licenced under MIT
|
|
|
|
========================================
|
|
|
|
*/
|
|
|
|
|
2021-08-12 04:58:56 +01:00
|
|
|
const Packet = require("./Packet.js");
|
|
|
|
|
|
|
|
class Packet1LoginRequest extends Packet {
|
|
|
|
constructor(protocol_version = 0, username = "", map_seed = BigInt(0), dimension = 0) {
|
|
|
|
super(0x01);
|
|
|
|
|
|
|
|
this.protocol_version = protocol_version;
|
|
|
|
this.username = username;
|
|
|
|
this.map_seed = map_seed;
|
|
|
|
this.dimension = dimension;
|
|
|
|
}
|
|
|
|
|
|
|
|
readPacket() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
writePacket(EID = 0) {
|
|
|
|
super.writePacket();
|
|
|
|
|
|
|
|
this.writer.writeInt(EID);
|
|
|
|
this.writer.writeString("");
|
|
|
|
this.writer.writeLong(971768181197178410);
|
|
|
|
this.writer.writeByte(0);
|
|
|
|
|
|
|
|
return this.toBuffer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Packet1LoginRequest;
|