summaryrefslogtreecommitdiffstats
path: root/source/cPlugin.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-12 23:30:32 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-12 23:30:32 +0200
commit223967b80d783df1be2df5f74ddf198f373fbc57 (patch)
tree6bf155fc8cfbdf635b6ef40d4e7ab200029de6d9 /source/cPlugin.h
parentUpdated the crafting recipes architecture to better support crafting hooks. Removed the old recipe file and implementation altogether. (diff)
downloadcuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.gz
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.bz2
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.lz
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.xz
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.zst
cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.zip
Diffstat (limited to '')
-rw-r--r--source/cPlugin.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/cPlugin.h b/source/cPlugin.h
index 737c0c382..ec7baaab3 100644
--- a/source/cPlugin.h
+++ b/source/cPlugin.h
@@ -1,3 +1,4 @@
+
#pragma once
class cPacket_BlockPlace;
@@ -17,6 +18,13 @@ class cWorld;
class cLuaChunk;
struct TakeDamageInfo;
+// fwd: cPlayer.h
+class cPlayer;
+
+// fwd: CraftingRecipes.h
+class cCraftingGrid;
+class cCraftingRecipe;
+
@@ -51,6 +59,9 @@ public:
virtual bool OnKilled( cPawn* a_Killed, cEntity* a_Killer ) { (void)a_Killed; (void)a_Killer; return false; }
virtual void OnChunkGenerated(cWorld * a_World, int a_ChunkX, int a_ChunkZ) {}
virtual bool OnChunkGenerating( int a_ChunkX, int a_ChunkZ, cLuaChunk * a_pLuaChunk ) { return false; }
+ virtual bool OnPreCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
+ virtual bool OnCraftingNoRecipe(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
+ virtual bool OnPostCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) {return false; }
// Accessors
const char* GetName() const { return m_Name.c_str(); }