summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-03 08:57:01 +0200
committerGitHub <noreply@github.com>2020-04-03 08:57:01 +0200
commit01b8ed5295875262a91b60af878bf2a18c1b7aae (patch)
tree52171974791a7529a3a69f9fe20d906158765954 /src/Items
parentUpdate Core (diff)
downloadcuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.gz
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.bz2
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.lz
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.xz
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.zst
cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemBigFlower.h1
-rw-r--r--src/Items/ItemBottle.h1
-rw-r--r--src/Items/ItemBucket.h3
-rw-r--r--src/Items/ItemChest.h1
-rw-r--r--src/Items/ItemPickaxe.h2
-rw-r--r--src/Items/ItemShears.h4
-rw-r--r--src/Items/ItemSword.h6
7 files changed, 11 insertions, 7 deletions
diff --git a/src/Items/ItemBigFlower.h b/src/Items/ItemBigFlower.h
index d433c4b87..8e96ad602 100644
--- a/src/Items/ItemBigFlower.h
+++ b/src/Items/ItemBigFlower.h
@@ -2,6 +2,7 @@
#pragma once
#include "ItemHandler.h"
+#include "../BlockInfo.h"
diff --git a/src/Items/ItemBottle.h b/src/Items/ItemBottle.h
index 18767dcde..319bc708f 100644
--- a/src/Items/ItemBottle.h
+++ b/src/Items/ItemBottle.h
@@ -2,6 +2,7 @@
#pragma once
#include "ItemHandler.h"
+#include "../BlockInfo.h"
#include "../World.h"
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h
index 8affff6ca..7b837d449 100644
--- a/src/Items/ItemBucket.h
+++ b/src/Items/ItemBucket.h
@@ -2,6 +2,7 @@
#pragma once
#include "ItemHandler.h"
+#include "../BlockInfo.h"
#include "../World.h"
#include "../Simulator/FluidSimulator.h"
#include "../Blocks/BlockHandler.h"
@@ -70,7 +71,7 @@ public:
}
BLOCKTYPE Block = a_World->GetBlock(BlockPos.x, BlockPos.y, BlockPos.z);
- ENUM_ITEM_ID NewItemType;
+ ENUM_ITEM_TYPE NewItemType;
if (IsBlockWater(Block))
{
diff --git a/src/Items/ItemChest.h b/src/Items/ItemChest.h
index 817020a25..ac4e4b471 100644
--- a/src/Items/ItemChest.h
+++ b/src/Items/ItemChest.h
@@ -2,6 +2,7 @@
#pragma once
#include "ItemHandler.h"
+#include "../BlockInfo.h"
#include "../Blocks/BlockChest.h"
diff --git a/src/Items/ItemPickaxe.h b/src/Items/ItemPickaxe.h
index a23e9ec6d..58df18428 100644
--- a/src/Items/ItemPickaxe.h
+++ b/src/Items/ItemPickaxe.h
@@ -168,7 +168,7 @@ public:
virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) override
{
- if (!IsBlockMaterialIron(a_Block) && !IsBlockMaterialAnvil(a_Block) && !IsBlockMaterialRock(a_Block))
+ if (!IsBlockMaterialIron(a_Block) && (a_Block != E_BLOCK_ANVIL) && !IsBlockMaterialRock(a_Block))
{
return super::GetBlockBreakingStrength(a_Block);
}
diff --git a/src/Items/ItemShears.h b/src/Items/ItemShears.h
index 9a6baa5e1..2ceb371f4 100644
--- a/src/Items/ItemShears.h
+++ b/src/Items/ItemShears.h
@@ -78,11 +78,11 @@ public:
virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) override
{
- if (IsBlocksWeb(a_Block) || IsBlockMaterialLeaves(a_Block))
+ if ((a_Block == E_BLOCK_COBWEB) || IsBlockMaterialLeaves(a_Block))
{
return 15.0f;
}
- else if (IsBlocksWool(a_Block))
+ else if (a_Block == E_BLOCK_WOOL)
{
return 5.0f;
}
diff --git a/src/Items/ItemSword.h b/src/Items/ItemSword.h
index 06543c37e..cdb85727c 100644
--- a/src/Items/ItemSword.h
+++ b/src/Items/ItemSword.h
@@ -2,6 +2,7 @@
#pragma once
#include "ItemHandler.h"
+#include "../BlockInfo.h"
@@ -12,8 +13,8 @@ class cItemSwordHandler :
{
typedef cItemHandler super;
public:
- cItemSwordHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+ cItemSwordHandler(int a_ItemType):
+ cItemHandler(a_ItemType)
{
}
@@ -66,7 +67,6 @@ public:
if (
IsBlockMaterialPlants(a_Block) ||
IsBlockMaterialVine(a_Block) ||
- IsBlockMaterialCoral(a_Block) ||
IsBlockMaterialLeaves(a_Block) ||
IsBlockMaterialGourd(a_Block)
)