Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <FurnaceRecipe.h>
Classes | |
struct | cFuel |
struct | cRecipe |
struct | sFurnaceRecipeState |
Public Member Functions | |
cFurnaceRecipe (void) | |
int | GetBurnTime (const cItem &a_Fuel) const |
Returns the amount of time that the specified fuel burns, in ticks. More... | |
const cRecipe * | GetRecipeFrom (const cItem &a_Ingredient) const |
Returns a recipe for the specified input, nullptr if no recipe found. More... | |
bool | IsFuel (const cItem &a_Item) const |
Returns true if the item is a fuel, false if not. More... | |
void | ReloadRecipes (void) |
~cFurnaceRecipe () | |
Private Member Functions | |
void | AddFuelFromLine (const AString &a_Line, unsigned int a_LineNum) |
Parses the fuel contained in the line, adds it to m_pState's fuels. More... | |
void | AddRecipeFromLine (const AString &a_Line, unsigned int a_LineNum) |
Parses the recipe contained in the line, adds it to m_pState's recipes. More... | |
void | ClearRecipes (void) |
bool | ParseItem (const AString &a_String, cItem &a_Item) |
Parses an item string in the format "<ItemType>[: <Damage>][, <Amount>]", returns true if successful. More... | |
Private Attributes | |
sFurnaceRecipeState * | m_pState |
Definition at line 14 of file FurnaceRecipe.h.
cFurnaceRecipe::cFurnaceRecipe | ( | void | ) |
Definition at line 32 of file FurnaceRecipe.cpp.
cFurnaceRecipe::~cFurnaceRecipe | ( | ) |
Definition at line 42 of file FurnaceRecipe.cpp.
|
private |
Parses the fuel contained in the line, adds it to m_pState's fuels.
Logs a warning to the console on input error.
Definition at line 114 of file FurnaceRecipe.cpp.
|
private |
Parses the recipe contained in the line, adds it to m_pState's recipes.
Logs a warning to the console on input error.
Definition at line 156 of file FurnaceRecipe.cpp.
|
private |
Definition at line 256 of file FurnaceRecipe.cpp.
int cFurnaceRecipe::GetBurnTime | ( | const cItem & | a_Fuel | ) | const |
Returns the amount of time that the specified fuel burns, in ticks.
Definition at line 322 of file FurnaceRecipe.cpp.
const cFurnaceRecipe::cRecipe * cFurnaceRecipe::GetRecipeFrom | ( | const cItem & | a_Ingredient | ) | const |
Returns a recipe for the specified input, nullptr if no recipe found.
Definition at line 281 of file FurnaceRecipe.cpp.
bool cFurnaceRecipe::IsFuel | ( | const cItem & | a_Item | ) | const |
Returns true if the item is a fuel, false if not.
Definition at line 306 of file FurnaceRecipe.cpp.
Parses an item string in the format "<ItemType>[: <Damage>][, <Amount>]", returns true if successful.
Definition at line 219 of file FurnaceRecipe.cpp.
void cFurnaceRecipe::ReloadRecipes | ( | void | ) |
Definition at line 53 of file FurnaceRecipe.cpp.
|
private |
Definition at line 60 of file FurnaceRecipe.h.