mc-beta-server/server/queuedUpdateTypes/BlockUpdate.ts

24 lines
583 B
TypeScript
Raw Normal View History

2023-04-13 23:52:13 +01:00
import { Chunk } from "../Chunk";
import { IQueuedUpdate } from "./IQueuedUpdate";
export class QueuedBlockUpdate implements IQueuedUpdate {
public coordPair:number;
public x:number;
public y:number;
public z:number;
public blockId:number;
public metadata:number;
public constructor(coordPair:number, x:number, y:number, z:number, blockId:number, metadata?:number) {
this.coordPair = coordPair;
this.x = x;
this.y = y;
this.z = z;
this.blockId = blockId;
if (typeof(metadata) === "number") {
this.metadata = metadata;
} else {
this.metadata = 0;
}
}
}