diff options
author | Mattes D <github@xoft.cz> | 2014-09-30 17:16:15 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-30 17:16:15 +0200 |
commit | 1531511bbe6affcb26e6ade17e4a313f5209e8e7 (patch) | |
tree | e9aa42ac32fcb72bf306e679be80cf0082694fc8 /src/UI/Window.cpp | |
parent | Merge pull request #1484 from SphinxC0re/master (diff) | |
parent | Compilation fix (diff) | |
download | cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.gz cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.bz2 cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.lz cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.xz cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.zst cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.zip |
Diffstat (limited to 'src/UI/Window.cpp')
-rw-r--r-- | src/UI/Window.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp index 1b7b07f77..d83336f75 100644 --- a/src/UI/Window.cpp +++ b/src/UI/Window.cpp @@ -14,6 +14,7 @@ #include "../BlockEntities/DropSpenserEntity.h" #include "../BlockEntities/EnderChestEntity.h" #include "../BlockEntities/HopperEntity.h" +#include "../Entities/Minecart.h" #include "../Root.h" #include "../Bindings/PluginManager.h" @@ -1076,6 +1077,34 @@ cChestWindow::~cChestWindow() //////////////////////////////////////////////////////////////////////////////// +// cMinecartWithChestWindow: + +cMinecartWithChestWindow::cMinecartWithChestWindow(cMinecartWithChest * a_ChestCart) : + cWindow(wtChest, "Minecart with Chest"), + m_ChestCart(a_ChestCart) +{ + m_ShouldDistributeToHotbarFirst = false; + m_SlotAreas.push_back(new cSlotAreaMinecartWithChest(a_ChestCart, *this)); + m_SlotAreas.push_back(new cSlotAreaInventory(*this)); + m_SlotAreas.push_back(new cSlotAreaHotBar(*this)); + + a_ChestCart->GetWorld()->BroadcastSoundEffect("random.chestopen", a_ChestCart->GetPosX(), a_ChestCart->GetPosY(), a_ChestCart->GetPosZ(), 1, 1); +} + + + + + +cMinecartWithChestWindow::~cMinecartWithChestWindow() +{ + m_ChestCart->GetWorld()->BroadcastSoundEffect("random.chestclosed", m_ChestCart->GetPosX(), m_ChestCart->GetPosY(), m_ChestCart->GetPosZ(), 1, 1); +} + + + + + +//////////////////////////////////////////////////////////////////////////////// // cDropSpenserWindow: cDropSpenserWindow::cDropSpenserWindow(int a_BlockX, int a_BlockY, int a_BlockZ, cDropSpenserEntity * a_DropSpenser) : @@ -1101,6 +1130,7 @@ cEnderChestWindow::cEnderChestWindow(cEnderChestEntity * a_EnderChest) : m_BlockY(a_EnderChest->GetPosY()), m_BlockZ(a_EnderChest->GetPosZ()) { + m_ShouldDistributeToHotbarFirst = false; m_SlotAreas.push_back(new cSlotAreaEnderChest(a_EnderChest, *this)); m_SlotAreas.push_back(new cSlotAreaInventory(*this)); m_SlotAreas.push_back(new cSlotAreaHotBar(*this)); |