2021-08-24 15:29:46 +01:00
|
|
|
/*
|
|
|
|
======- Packet6SpawnPosition.js -=======
|
|
|
|
Created by Holly (tgpethan) (c) 2021
|
|
|
|
Licenced under MIT
|
|
|
|
========================================
|
|
|
|
*/
|
|
|
|
|
2021-08-12 04:58:56 +01:00
|
|
|
const Packet = require("./Packet.js");
|
|
|
|
|
|
|
|
class Packet6SpawnPosition extends Packet {
|
|
|
|
constructor(x = 8.5, y = 65.5, z = 8.5) {
|
|
|
|
super(0x06);
|
|
|
|
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
|
|
|
}
|
|
|
|
|
|
|
|
writePacket() {
|
|
|
|
super.writePacket();
|
|
|
|
|
|
|
|
this.writer.writeInt(this.x);
|
|
|
|
this.writer.writeInt(this.y);
|
|
|
|
this.writer.writeInt(this.z);
|
|
|
|
|
|
|
|
return this.toBuffer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Packet6SpawnPosition;
|