From 9dd0486faf6f52eb40e47f003d4c02eefc28c8f9 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 22 Jun 2013 18:41:08 +0000 Subject: Added the End height and composition generators. Also made the dimension in world.ini specifiable by a string. Exported StringToDimension() and StringToBiome() to Lua API. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1621 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockID.h | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'source/BlockID.h') diff --git a/source/BlockID.h b/source/BlockID.h index cc89ad503..7e03388d3 100644 --- a/source/BlockID.h +++ b/source/BlockID.h @@ -602,6 +602,18 @@ enum E_ENTITY_TYPE_IRON_GOLEM = 99, E_ENTITY_TYPE_VILLAGER = 120, } ; + + + + +enum eDimension +{ + dimNether = -1, + dimOverworld = 0, + dimEnd = 1, +} ; + + // tolua_end @@ -614,24 +626,31 @@ class cItem; +// tolua_begin + /// Translates a blocktype string into blocktype. Takes either a number or an items.ini alias as input. Returns -1 on failure. -extern BLOCKTYPE BlockStringToType(const AString & a_BlockTypeString); // tolua_export +extern BLOCKTYPE BlockStringToType(const AString & a_BlockTypeString); /// Translates an itemtype string into an item. Takes either a number, number^number, number:number or an items.ini alias as input. Returns true if successful. -extern bool StringToItem(const AString & a_ItemTypeString, cItem & a_Item); // tolua_export +extern bool StringToItem(const AString & a_ItemTypeString, cItem & a_Item); /// Translates a full item into a string. If the ItemType is not recognized, the ItemType number is output into the string. -extern AString ItemToString(const cItem & a_Item); // tolua_export +extern AString ItemToString(const cItem & a_Item); /// Translates itemtype into a string. If the type is not recognized, the itemtype number is output into the string. -extern AString ItemTypeToString(short a_ItemType); // tolua_export +extern AString ItemTypeToString(short a_ItemType); /// Translates a full item into a fully-specified string (including meta and count). If the ItemType is not recognized, the ItemType number is output into the string. -extern AString ItemToFullString(const cItem & a_Item); // tolua_export +extern AString ItemToFullString(const cItem & a_Item); /// Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns -1 on failure. extern EMCSBiome StringToBiome(const AString & a_BiomeString); +/// Translates a dimension string to dimension enum. Takes either a number or a dimension alias (built-in). Returns -1000 on failure +extern eDimension StringToDimension(const AString & a_DimensionString); + +// tolua_end + -- cgit v1.2.3