Cuberite
A lightweight, fast and extensible game server for Minecraft
src
UI
ChestWindow.h
Go to the documentation of this file.
1
2
// ChestWindow.h
3
4
// Representing the UI window for the chest block
5
6
7
8
9
10
#pragma once
11
12
#include "
Window.h
"
13
14
15
16
17
18
class
cChestWindow
:
19
public
cWindow
20
{
21
using
Super
=
cWindow
;
22
23
public
:
24
25
cChestWindow
(
cChestEntity
* a_Chest);
26
27
cChestWindow
(
cChestEntity
* a_PrimaryChest,
cChestEntity
* a_SecondaryChest);
28
29
virtual
~cChestWindow
()
override
;
30
31
virtual
bool
ClosedByPlayer
(
cPlayer
& a_Player,
bool
a_CanRefuse)
override
;
32
33
virtual
void
OpenedByPlayer
(
cPlayer
& a_Player)
override
;
34
35
virtual
void
DistributeStack
(
cItem
& a_ItemStack,
int
a_Slot,
cPlayer
& a_Player,
cSlotArea
* a_ClickedArea,
bool
a_ShouldApply)
override
;
36
37
protected
:
38
cWorld
*
m_World
;
39
Vector3i
m_BlockPos
;
// Position of the chest, for the window-close packet
40
cChestEntity
*
m_PrimaryChest
;
41
cChestEntity
*
m_SecondaryChest
;
42
};
43
44
45
46
cChestWindow::m_World
cWorld * m_World
Definition:
ChestWindow.h:38
cChestWindow
Definition:
ChestWindow.h:18
cWindow
Represents a UI window.
Definition:
Window.h:53
cChestWindow::DistributeStack
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:
ChestWindow.cpp:109
cChestWindow::cChestWindow
cChestWindow(cChestEntity *a_Chest)
Definition:
ChestWindow.cpp:16
cChestWindow::m_SecondaryChest
cChestEntity * m_SecondaryChest
Definition:
ChestWindow.h:41
cWorld
Definition:
World.h:47
cItem
Definition:
Item.h:36
Window.h
cChestWindow::OpenedByPlayer
virtual void OpenedByPlayer(cPlayer &a_Player) override
Definition:
ChestWindow.cpp:91
cChestEntity
Definition:
ChestEntity.h:18
cPlayer
Definition:
Player.h:27
cChestWindow::~cChestWindow
virtual ~cChestWindow() override
Definition:
ChestWindow.cpp:60
cChestWindow::m_BlockPos
Vector3i m_BlockPos
Definition:
ChestWindow.h:39
cChestWindow::ClosedByPlayer
virtual bool ClosedByPlayer(cPlayer &a_Player, bool a_CanRefuse) override
Called when a player closes this window; notifies all slot areas.
Definition:
ChestWindow.cpp:72
cChestWindow::m_PrimaryChest
cChestEntity * m_PrimaryChest
Definition:
ChestWindow.h:40
cSlotArea
Definition:
SlotArea.h:33
cWindow::cWindow
cWindow(WindowType a_WindowType, const AString &a_WindowTitle)
Definition:
Window.cpp:30
Vector3< int >
Generated on Fri Oct 28 2022 17:01:08 for Cuberite by
1.8.17