summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Items/ItemDye.h15
-rw-r--r--source/Items/ItemHandler.cpp2
-rw-r--r--source/Items/ItemHandler.h2
-rw-r--r--source/Items/ItemPickaxe.h4
-rw-r--r--source/Items/ItemShears.h6
-rw-r--r--source/Items/ItemShovel.h4
-rw-r--r--source/Items/ItemSword.h4
7 files changed, 23 insertions, 14 deletions
diff --git a/source/Items/ItemDye.h b/source/Items/ItemDye.h
index 5b21a501c..16e850719 100644
--- a/source/Items/ItemDye.h
+++ b/source/Items/ItemDye.h
@@ -5,7 +5,12 @@
#include "../World.h"
#include "../Player.h"
-class cItemDyeHandler : public cItemHandler
+
+
+
+
+class cItemDyeHandler :
+ public cItemHandler
{
public:
cItemDyeHandler(int a_ItemID)
@@ -20,7 +25,7 @@ public:
// Handle growing the plants:
if (a_Item->m_ItemHealth == E_META_DYE_WHITE)
{
- if(a_World->GrowPlant(a_X, a_Y, a_Z, true))
+ if (a_World->GrowRipePlant(a_X, a_Y, a_Z, true))
{
if (a_Player->GetGameMode() == eGameMode_Survival)
{
@@ -32,4 +37,8 @@ public:
}
return false;
}
-}; \ No newline at end of file
+} ;
+
+
+
+
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index 49ed865e7..44177760a 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -334,7 +334,7 @@ bool cItemHandler::IsPlaceable()
-bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockID)
+bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockType)
{
return false;
}
diff --git a/source/Items/ItemHandler.h b/source/Items/ItemHandler.h
index 67935ecb4..23aa0448d 100644
--- a/source/Items/ItemHandler.h
+++ b/source/Items/ItemHandler.h
@@ -64,7 +64,7 @@ public:
//Returns the block meta on placement
virtual NIBBLETYPE GetBlockMeta(short a_ItemDamage);
// Returns whether this tool/item can harvest a specific block (e.g. wooden pickaxe can harvest stone, but wood canīt) DEFAULT: False
- virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID);
+ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType);
static cItemHandler *GetItemHandler(int a_ItemID);
diff --git a/source/Items/ItemPickaxe.h b/source/Items/ItemPickaxe.h
index 158aca44f..68a55470a 100644
--- a/source/Items/ItemPickaxe.h
+++ b/source/Items/ItemPickaxe.h
@@ -32,9 +32,9 @@ public:
}
}
- virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID) override
+ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{
- switch(a_BlockID)
+ switch(a_BlockType)
{
case E_BLOCK_OBSIDIAN:
return PickaxeLevel() >= 4;
diff --git a/source/Items/ItemShears.h b/source/Items/ItemShears.h
index 2f3476735..7e2ad61fe 100644
--- a/source/Items/ItemShears.h
+++ b/source/Items/ItemShears.h
@@ -34,9 +34,9 @@ public:
}
- virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID) override
+ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{
- return a_BlockID == E_BLOCK_COBWEB
- || a_BlockID == E_BLOCK_VINES;
+ return a_BlockType == E_BLOCK_COBWEB
+ || a_BlockType == E_BLOCK_VINES;
}
}; \ No newline at end of file
diff --git a/source/Items/ItemShovel.h b/source/Items/ItemShovel.h
index f5a65795a..f07820f8f 100644
--- a/source/Items/ItemShovel.h
+++ b/source/Items/ItemShovel.h
@@ -34,8 +34,8 @@ public:
return false;
}
- virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID) override
+ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{
- return a_BlockID == E_BLOCK_SNOW;
+ return a_BlockType == E_BLOCK_SNOW;
}
}; \ No newline at end of file
diff --git a/source/Items/ItemSword.h b/source/Items/ItemSword.h
index eb4aa0ef9..4eec4c5a0 100644
--- a/source/Items/ItemSword.h
+++ b/source/Items/ItemSword.h
@@ -14,8 +14,8 @@ public:
}
- virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID) override
+ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{
- return a_BlockID == E_BLOCK_COBWEB;
+ return a_BlockType == E_BLOCK_COBWEB;
}
}; \ No newline at end of file