diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-09-19 16:12:54 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2017-09-19 16:12:54 +0200 |
commit | 30c8470a524f5d09f157d5c1c59eb72c205d5085 (patch) | |
tree | 38547152d6e7f4c3c9c2a5c1165f7d8bda52b8c8 /src/UI/EnderChestWindow.cpp | |
parent | cRoot: Make PollPeriod representation 32 bit (#4030) (diff) | |
download | cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.gz cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.bz2 cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.lz cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.xz cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.zst cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.zip |
Diffstat (limited to 'src/UI/EnderChestWindow.cpp')
-rw-r--r-- | src/UI/EnderChestWindow.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/UI/EnderChestWindow.cpp b/src/UI/EnderChestWindow.cpp index ed0fb499f..6c3bcff50 100644 --- a/src/UI/EnderChestWindow.cpp +++ b/src/UI/EnderChestWindow.cpp @@ -15,9 +15,7 @@ cEnderChestWindow::cEnderChestWindow(cEnderChestEntity * a_EnderChest) : cWindow(wtChest, "Ender Chest"), m_World(a_EnderChest->GetWorld()), - m_BlockX(a_EnderChest->GetPosX()), - m_BlockY(a_EnderChest->GetPosY()), - m_BlockZ(a_EnderChest->GetPosZ()) + m_BlockPos(a_EnderChest->GetPos()) { m_SlotAreas.push_back(new cSlotAreaEnderChest(a_EnderChest, *this)); m_SlotAreas.push_back(new cSlotAreaInventory(*this)); @@ -26,15 +24,13 @@ cEnderChestWindow::cEnderChestWindow(cEnderChestEntity * a_EnderChest) : // Play the opening sound: m_World->BroadcastSoundEffect( "block.enderchest.open", - static_cast<double>(m_BlockX), - static_cast<double>(m_BlockY), - static_cast<double>(m_BlockZ), + m_BlockPos, 1, 1 ); // Send out the chest-open packet: - m_World->BroadcastBlockAction(m_BlockX, m_BlockY, m_BlockZ, 1, 1, E_BLOCK_ENDER_CHEST); + m_World->BroadcastBlockAction(m_BlockPos, 1, 1, E_BLOCK_ENDER_CHEST); } @@ -44,14 +40,12 @@ cEnderChestWindow::cEnderChestWindow(cEnderChestEntity * a_EnderChest) : cEnderChestWindow::~cEnderChestWindow() { // Send out the chest-close packet: - m_World->BroadcastBlockAction(m_BlockX, m_BlockY, m_BlockZ, 1, 0, E_BLOCK_ENDER_CHEST); + m_World->BroadcastBlockAction(m_BlockPos, 1, 0, E_BLOCK_ENDER_CHEST); // Play the closing sound m_World->BroadcastSoundEffect( "block.enderchest.close", - static_cast<double>(m_BlockX), - static_cast<double>(m_BlockY), - static_cast<double>(m_BlockZ), + m_BlockPos, 1, 1 ); } |