diff options
author | Alexander Harkness <me@bearbin.net> | 2014-09-22 21:45:22 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2014-09-22 21:45:22 +0200 |
commit | 5f823fd18dbfc097b45957d05aeb4d04bf5099fd (patch) | |
tree | 8fa683aca43dfabd59c7c90e06c2d1f1a4549bed /src/UI/Window.cpp | |
parent | Merge pull request #1446 from cedeel/patch-1 (diff) | |
parent | Changed metadata reading again. (diff) | |
download | cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar.gz cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar.bz2 cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar.lz cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar.xz cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.tar.zst cuberite-5f823fd18dbfc097b45957d05aeb4d04bf5099fd.zip |
Diffstat (limited to 'src/UI/Window.cpp')
-rw-r--r-- | src/UI/Window.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp index 66900269f..1b7b07f77 100644 --- a/src/UI/Window.cpp +++ b/src/UI/Window.cpp @@ -57,6 +57,34 @@ cWindow::~cWindow() +const AString cWindow::GetWindowTypeName(void) const +{ + switch (m_WindowType) + { + case wtChest: return "minecraft:chest"; + case wtWorkbench: return "minecraft:crafting_table"; + case wtFurnace: return "minecraft:furnace"; + case wtDropSpenser: return "minecraft:dispenser"; + case wtEnchantment: return "minecraft:enchanting_table"; + case wtBrewery: return "minecraft:brewing_stand"; + case wtNPCTrade: return "minecraft:villager"; + case wtBeacon: return "minecraft:beacon"; + case wtAnvil: return "minecraft:anvil"; + case wtHopper: return "minecraft:hopper"; + case wtDropper: return "minecraft:dropper"; + case wtAnimalChest: return "EntityHorse"; + default: + { + ASSERT(!"Unknown inventory type!"); + return ""; + } + } +} + + + + + int cWindow::GetNumSlots(void) const { int res = 0; |