From 706257f8fbd897dc6087fa93269dd964d633d0f8 Mon Sep 17 00:00:00 2001 From: QUSpilPrgm Date: Sun, 29 May 2016 10:30:47 +0200 Subject: Update Dispensers and let them act more like in Vanilla - Added code to make bonemeal, potions, minecarts, XP bottles and boats work inside dispensers - Dispensers are now able to place TNT if the block is transparent but not air - Added return value that indicates the success of pumpkin, melon, sugarcane and cactus growing functions - Changed return value of "GrowRipePlant" so that it actually indicates if the block was able to grow - Fixed "GrowSugarcane" and "GrowCactus" in "GrowRipePlant" so that it only grows them a single block --- src/Defines.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Defines.h') diff --git a/src/Defines.h b/src/Defines.h index 37b80cca3..13049ce4f 100644 --- a/src/Defines.h +++ b/src/Defines.h @@ -788,6 +788,19 @@ namespace ItemCategory + inline bool IsMinecart(short a_ItemType) + { + return ( + (a_ItemType == E_ITEM_MINECART) || + (a_ItemType == E_ITEM_CHEST_MINECART) || + (a_ItemType == E_ITEM_FURNACE_MINECART) || + (a_ItemType == E_ITEM_MINECART_WITH_TNT) || + (a_ItemType == E_ITEM_MINECART_WITH_HOPPER) + ); + } + + + inline bool IsArmor(short a_ItemType) { return ( -- cgit v1.2.3