[Dev Tool] NamedBlocks
#2
Why would you need a plugin, when there's a set of API functions doing exactly the same? ItemToString(), ItemTypeToString() also accept cItem objects that represent blocks:
Code:
local TypeDesc = ItemTypeToString(BlockType);  -- returns e.g. "wood" or "torch"; no meta processing

local BlockItem = cItem(BlockType, 1, Meta);
local MetaDesc = ItemToString(BlockItem);  -- returns e.g. "birch wood" or "torch"
local FullDesc = ItemToFullString(BlockItem);  -- returns e.g. "birch wood:1 * 1" or "torch:4 * 1"

Sorry for the multiple edits, I had to look the functions up in the end, couldn't make it from the top of my head.

Also of note: these API calls actually use the items.ini file, so they are kept up-to-date easily with the rest of MCServer.
Reply
Thanks given by:


Messages In This Thread
[Dev Tool] NamedBlocks - by bearbin - 01-09-2013, 05:50 PM
RE: [Dev Tool] NamedBlocks - by xoft - 01-09-2013, 06:54 PM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-10-2013, 12:12 AM
RE: [Dev Tool] NamedBlocks - by xoft - 01-10-2013, 07:48 PM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-10-2013, 11:47 PM
RE: [Dev Tool] NamedBlocks - by xoft - 01-11-2013, 04:53 AM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-11-2013, 05:36 AM
RE: [Dev Tool] NamedBlocks - by xoft - 01-11-2013, 05:38 AM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-11-2013, 05:50 AM
RE: [Dev Tool] NamedBlocks - by Taugeshtu - 01-11-2013, 06:30 AM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-11-2013, 06:36 AM
RE: [Dev Tool] NamedBlocks - by Taugeshtu - 01-11-2013, 10:47 PM
RE: [Dev Tool] NamedBlocks - by bearbin - 01-13-2013, 05:57 AM



Users browsing this thread: 3 Guest(s)