summaryrefslogtreecommitdiffstats
path: root/source/FurnaceRecipe.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-16 22:24:07 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-16 22:24:07 +0200
commit97eda34a9437abe732cf6b60711828bbe4f0cb2e (patch)
treef06f2a5bb2ad7efd0d09d9cba0b2f8fe586a53e0 /source/FurnaceRecipe.h
parentCore: fixed a warning message when using the /item command (diff)
downloadcuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar.gz
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar.bz2
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar.lz
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar.xz
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.tar.zst
cuberite-97eda34a9437abe732cf6b60711828bbe4f0cb2e.zip
Diffstat (limited to 'source/FurnaceRecipe.h')
-rw-r--r--source/FurnaceRecipe.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/source/FurnaceRecipe.h b/source/FurnaceRecipe.h
index ccb008604..2f91e9bcb 100644
--- a/source/FurnaceRecipe.h
+++ b/source/FurnaceRecipe.h
@@ -14,31 +14,35 @@ class cItem;
class cFurnaceRecipe
{
public:
- cFurnaceRecipe();
+ cFurnaceRecipe(void);
~cFurnaceRecipe();
- void ReloadRecipes();
+ void ReloadRecipes(void);
struct Fuel
{
- cItem* In;
- float BurnTime;
+ cItem * In;
+ int BurnTime; ///< How long this fuel burns, in ticks
};
struct Recipe
{
- cItem* In;
- cItem* Out;
- float CookTime;
+ cItem * In;
+ cItem * Out;
+ int CookTime; ///< How long this recipe takes to smelt, in ticks
};
- const Recipe* GetRecipeFrom( const cItem & a_Ingredient ) const;
- float GetBurnTime( const cItem & a_Fuel ) const;
+
+ /// Returns a recipe for the specified input, NULL if no recipe found
+ const Recipe * GetRecipeFrom(const cItem & a_Ingredient) const;
+
+ /// Returns the amount of time that the specified fuel burns, in ticks
+ int GetBurnTime(const cItem & a_Fuel) const;
private:
- void ClearRecipes();
+ void ClearRecipes(void);
struct sFurnaceRecipeState;
- sFurnaceRecipeState* m_pState;
+ sFurnaceRecipeState * m_pState;
};