fix more codefactor issues
This commit is contained in:
parent
16c7b5ddcc
commit
e5ba93ce9c
|
@ -2,7 +2,6 @@ import { Block } from "../blocks/Block";
|
|||
import { Chunk } from "../Chunk";
|
||||
import { IGenerator } from "./IGenerator";
|
||||
import { Noise2D, makeNoise2D } from "../../external/OpenSimplex2D";
|
||||
import shuffle_seed from "../../external/shuffle_seed";
|
||||
|
||||
export class HillyGenerator implements IGenerator {
|
||||
private seed:number;
|
||||
|
|
|
@ -6,11 +6,16 @@ export class PacketDisconnectKick implements IPacket {
|
|||
public packetId = Packets.DisconnectKick;
|
||||
public reason:string;
|
||||
|
||||
public constructor(reason:string) {
|
||||
this.reason = reason;
|
||||
public constructor(reason?:string) {
|
||||
if (typeof(reason) === "string") {
|
||||
this.reason = reason;
|
||||
} else {
|
||||
this.reason = "";
|
||||
}
|
||||
}
|
||||
|
||||
public readData(reader:Reader) {
|
||||
this.reason = reader.readString();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Reader, Writer } from "../../bufferStuff";
|
||||
import { Reader } from "../../bufferStuff";
|
||||
import { Packets } from "../enums/Packets";
|
||||
|
||||
export interface IPacket {
|
||||
|
|
|
@ -7,6 +7,7 @@ export class PacketKeepAlive implements IPacket {
|
|||
private static readonly KeepAliveBuffer:Buffer = new Writer(1).writeByte(Packets.KeepAlive).toBuffer();
|
||||
|
||||
public readData(reader:Reader) {
|
||||
reader;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ export class PacketMapChunk implements IPacket {
|
|||
}
|
||||
|
||||
public readData(reader:Reader) {
|
||||
|
||||
// TODO: Implement MapChunk reading
|
||||
reader.readBool();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue