Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cCraftingGrid Class Reference

#include <CraftingRecipes.h>

Collaboration diagram for cCraftingGrid:
Collaboration graph
[legend]

Public Member Functions

 cCraftingGrid (const cCraftingGrid &a_Original)
 
 cCraftingGrid (const cItem *a_Items, int a_Width, int a_Height)
 
 cCraftingGrid (int a_Width, int a_Height)
 
void Clear (void)
 
void ConsumeGrid (const cCraftingGrid &a_Grid)
 Removes items in a_Grid from m_Items[] (used by cCraftingRecipe::ConsumeIngredients()) More...
 
void CopyToItems (cItem *a_Items) const
 Copies internal contents into the item array specified. More...
 
void Dump (void)
 Dumps the entire crafting grid using LOGD() More...
 
int GetHeight (void) const
 
cItemGetItem (int x, int y) const
 
cItemGetItems (void) const
 
int GetWidth (void) const
 
void SetItem (int x, int y, const cItem &a_Item)
 
void SetItem (int x, int y, ENUM_ITEM_TYPE a_ItemType, char a_ItemCount, short a_ItemHealth)
 
 ~cCraftingGrid ()
 

Protected Attributes

int m_Height
 
cItemm_Items
 
int m_Width
 

Detailed Description

Definition at line 20 of file CraftingRecipes.h.

Constructor & Destructor Documentation

◆ cCraftingGrid() [1/3]

cCraftingGrid::cCraftingGrid ( const cCraftingGrid a_Original)

Definition at line 42 of file CraftingRecipes.cpp.

◆ cCraftingGrid() [2/3]

cCraftingGrid::cCraftingGrid ( int  a_Width,
int  a_Height 
)

Definition at line 18 of file CraftingRecipes.cpp.

◆ cCraftingGrid() [3/3]

cCraftingGrid::cCraftingGrid ( const cItem a_Items,
int  a_Width,
int  a_Height 
)

Definition at line 29 of file CraftingRecipes.cpp.

◆ ~cCraftingGrid()

cCraftingGrid::~cCraftingGrid ( )

Definition at line 55 of file CraftingRecipes.cpp.

Member Function Documentation

◆ Clear()

void cCraftingGrid::Clear ( void  )

Definition at line 118 of file CraftingRecipes.cpp.

◆ ConsumeGrid()

void cCraftingGrid::ConsumeGrid ( const cCraftingGrid a_Grid)

Removes items in a_Grid from m_Items[] (used by cCraftingRecipe::ConsumeIngredients())

Definition at line 130 of file CraftingRecipes.cpp.

◆ CopyToItems()

void cCraftingGrid::CopyToItems ( cItem a_Items) const

Copies internal contents into the item array specified.

Assumes that the array has the same dimensions as self

Definition at line 183 of file CraftingRecipes.cpp.

◆ Dump()

void cCraftingGrid::Dump ( void  )

Dumps the entire crafting grid using LOGD()

Definition at line 195 of file CraftingRecipes.cpp.

◆ GetHeight()

int cCraftingGrid::GetHeight ( void  ) const
inline

Definition at line 30 of file CraftingRecipes.h.

◆ GetItem()

cItem & cCraftingGrid::GetItem ( int  x,
int  y 
) const

Definition at line 65 of file CraftingRecipes.cpp.

◆ GetItems()

cItem* cCraftingGrid::GetItems ( void  ) const
inline

Definition at line 44 of file CraftingRecipes.h.

◆ GetWidth()

int cCraftingGrid::GetWidth ( void  ) const
inline

Definition at line 29 of file CraftingRecipes.h.

◆ SetItem() [1/2]

void cCraftingGrid::SetItem ( int  x,
int  y,
const cItem a_Item 
)

Definition at line 100 of file CraftingRecipes.cpp.

◆ SetItem() [2/2]

void cCraftingGrid::SetItem ( int  x,
int  y,
ENUM_ITEM_TYPE  a_ItemType,
char  a_ItemCount,
short  a_ItemHealth 
)

Definition at line 82 of file CraftingRecipes.cpp.

Member Data Documentation

◆ m_Height

int cCraftingGrid::m_Height
protected

Definition at line 52 of file CraftingRecipes.h.

◆ m_Items

cItem* cCraftingGrid::m_Items
protected

Definition at line 53 of file CraftingRecipes.h.

◆ m_Width

int cCraftingGrid::m_Width
protected

Definition at line 51 of file CraftingRecipes.h.


The documentation for this class was generated from the following files: