From 3c102870f600178b7cabf6714f83e06fc05b42fd Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 1 May 2014 00:47:57 +0200 Subject: Add anvil window and slot area. --- src/Items/ItemHandler.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Items/ItemHandler.h') diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h index 4993eac85..420eefcf1 100644 --- a/src/Items/ItemHandler.h +++ b/src/Items/ItemHandler.h @@ -85,6 +85,12 @@ public: /** Blocks simply get placed */ virtual bool IsPlaceable(void); + /** Can the anvil repair this item, when a_Item is the second input? */ + virtual bool CanRepairWithItem(const cItem & a_Item); + + /** Get the repair cost from the item, or 0 if the item hasn't repair cost. */ + virtual int GetRepairCost(void); + /** Called before a block is placed into a world. The handler should return true to allow placement, false to refuse. Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block. -- cgit v1.2.3 From 954b59d6f460106e93efab39c8666d4692db25b6 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 6 May 2014 19:38:09 +0200 Subject: Rename CanRepairWithItem to CanRepairWithRawMaterial and rename Size() to Count() --- src/Items/ItemHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items/ItemHandler.h') diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h index 420eefcf1..ca090eb29 100644 --- a/src/Items/ItemHandler.h +++ b/src/Items/ItemHandler.h @@ -86,7 +86,7 @@ public: virtual bool IsPlaceable(void); /** Can the anvil repair this item, when a_Item is the second input? */ - virtual bool CanRepairWithItem(const cItem & a_Item); + virtual bool CanRepairWithRawMaterial(short a_ItemType); /** Get the repair cost from the item, or 0 if the item hasn't repair cost. */ virtual int GetRepairCost(void); -- cgit v1.2.3 From d6cb6e0423fe38478c69f5d249882a01d727f0ed Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 12:30:30 +0200 Subject: Add repair cost to cItem, add custom name to NBTChunkSerializer and fix anvil bugs. --- src/Items/ItemHandler.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/Items/ItemHandler.h') diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h index ca090eb29..e13198cd7 100644 --- a/src/Items/ItemHandler.h +++ b/src/Items/ItemHandler.h @@ -88,9 +88,6 @@ public: /** Can the anvil repair this item, when a_Item is the second input? */ virtual bool CanRepairWithRawMaterial(short a_ItemType); - /** Get the repair cost from the item, or 0 if the item hasn't repair cost. */ - virtual int GetRepairCost(void); - /** Called before a block is placed into a world. The handler should return true to allow placement, false to refuse. Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block. -- cgit v1.2.3