Cuberite
A lightweight, fast and extensible game server for Minecraft
EnderChestWindow.h
Go to the documentation of this file.
1 
2 // EnderChestWindow.h
3 
4 // Representing the UI window for the enderchest block
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "Window.h"
13 #include "../BlockEntities/EnderChestEntity.h"
14 
15 
16 
17 
18 
20  public cWindow
21 {
22  typedef cWindow super;
23 
24 public:
25  cEnderChestWindow(cEnderChestEntity * a_EnderChest);
26 
27  virtual ~cEnderChestWindow() override;
28 
29  virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
30 
31 protected:
33  Vector3i m_BlockPos; // Position of the enderchest, for the window-close packet
34 };
35 
36 
37 
38 
virtual void DistributeStack(cItem &a_ItemStack, int a_Slot, cPlayer &a_Player, cSlotArea *a_ClickedArea, bool a_ShouldApply) override
Called on shift-clicking to distribute the stack into other areas; Modifies a_ItemStack as it is dist...
virtual ~cEnderChestWindow() override
Definition: Player.h:27
cEnderChestWindow(cEnderChestEntity *a_EnderChest)
Definition: World.h:65
Represents a UI window.
Definition: Window.h:53
Definition: Item.h:36