summaryrefslogtreecommitdiffstats
path: root/src/UI/Window.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-13 00:18:02 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-13 00:18:02 +0200
commit3e741134279e02d204a8d4638f2d46dfbf814d0c (patch)
treea6781315a66a2fb6f8c16ab21f9f36ea7741fb6d /src/UI/Window.cpp
parentFixed friction being applied whilst airborne (diff)
downloadcuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.gz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.bz2
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.lz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.xz
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.tar.zst
cuberite-3e741134279e02d204a8d4638f2d46dfbf814d0c.zip
Diffstat (limited to 'src/UI/Window.cpp')
-rw-r--r--src/UI/Window.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 66900269f..fd80a017d 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"
@@ -1048,6 +1049,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) :
@@ -1073,6 +1102,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));