Holly
c0872ead39
All checks were successful
Node.js Build / build (20.x) (push) Successful in 5m17s
- Tile Entities - TextColorParser for chat colours on the console - package.json ver bumps - De-dupe WorldSaveManager!!
25 lines
No EOL
724 B
TypeScript
25 lines
No EOL
724 B
TypeScript
import { IReader, IWriter } from "bufferstuff";
|
|
import Block from "../blocks/Block";
|
|
import TileEntityType from "../enums/TileEntityType";
|
|
import Vec3 from "../Vec3";
|
|
import TileEntityChest from "./TileEntityChest";
|
|
|
|
export default class TileEntity {
|
|
public readonly type: TileEntityType;
|
|
public readonly forBlock: Block;
|
|
public readonly pos: Vec3;
|
|
|
|
public constructor(type: TileEntityType, forBlock: Block, pos: Vec3) {
|
|
this.type = type;
|
|
this.forBlock = forBlock;
|
|
this.pos = pos;
|
|
}
|
|
|
|
public fromSave(reader:IReader) {}
|
|
|
|
public toSave(writer:IWriter) {
|
|
writer.writeUByte(this.type);
|
|
writer.writeUByte(this.forBlock.blockId);
|
|
writer.writeUByte(this.pos.x).writeUByte(this.pos.y).writeUByte(this.pos.z);
|
|
}
|
|
} |