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!!
28 lines
No EOL
712 B
TypeScript
28 lines
No EOL
712 B
TypeScript
import Block from "../blocks/Block";
|
|
import TileEntityType from "../enums/TileEntityType";
|
|
import TileEntity from "./TileEntity";
|
|
import Vec3 from "../Vec3";
|
|
import { IReader, IWriter } from "bufferstuff";
|
|
import Inventory from "../inventories/Inventory";
|
|
|
|
export default class TileEntityChest extends TileEntity {
|
|
public inventory:Inventory;
|
|
|
|
public constructor(type: TileEntityType, forBlockId: Block, position: Vec3) {
|
|
super(type, forBlockId, position);
|
|
|
|
this.inventory = new Inventory(9 * 3, "Chest");
|
|
}
|
|
|
|
public fromSave(reader:IReader) {
|
|
super.fromSave(reader);
|
|
|
|
this.inventory.fromSave(reader);
|
|
}
|
|
|
|
public toSave(writer:IWriter) {
|
|
super.toSave(writer);
|
|
|
|
this.inventory.toSave(writer);
|
|
}
|
|
} |