Cuberite
A lightweight, fast and extensible game server for Minecraft
AnvilWindow.h
Go to the documentation of this file.
1 
2 // AnvilWindow.h
3 
4 // Representing the UI window for the anvil block
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "Window.h"
13 
14 
15 
16 
17 
19  public cWindow
20 {
21  using Super = cWindow;
22 
23 public:
24 
25  cAnvilWindow(Vector3i a_BlockPos);
26 
28  AString GetRepairedItemName(void) const;
29 
31  void SetRepairedItemName(const AString & a_Name, cPlayer * a_Player);
32 
34  const Vector3i & GetBlockPos() { return m_BlockPos; }
35 
36  virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
37 
38 protected:
42 };
43 
44 
45 
46 
std::string AString
Definition: StringUtils.h:11
Definition: Player.h:29
Definition: Item.h:37
AString m_RepairedItemName
Definition: AnvilWindow.h:40
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...
Definition: AnvilWindow.cpp:50
void SetRepairedItemName(const AString &a_Name, cPlayer *a_Player)
Set the repaired item name.
Definition: AnvilWindow.cpp:37
const Vector3i & GetBlockPos()
Gets the Position from the Anvil.
Definition: AnvilWindow.h:34
AString GetRepairedItemName(void) const
Gets the repaired item name.
Definition: AnvilWindow.cpp:28
Vector3i m_BlockPos
Definition: AnvilWindow.h:41
cAnvilWindow(Vector3i a_BlockPos)
Definition: AnvilWindow.cpp:13
cSlotAreaAnvil * m_AnvilSlotArea
Definition: AnvilWindow.h:39
Represents a UI window.
Definition: Window.h:54
cWindow(WindowType a_WindowType, const AString &a_WindowTitle)
Definition: Window.cpp:30